-# -------------------------------------------------------------------------
-dnl
-dnl * `NoFib' CONFIGURATION STUFF
-
-if test "xxx$DoingNoFib" = 'xxxnofib' ; then
-# a very big "if"!
-
-dnl ** which Haskell compiler to test with NoFib?
-WithNoFibHc='haskell-compiler-unspecified'
-WithNoFibHcType='HC_UNSPECIFIED'
-
-AC_ARG_WITH(hc-for-nofib,
- [
-*******************************************************************
-** NoFib HASKELL BENCHMARK SUITE OPTIONS:
-
-The Haskell compiler to compile the NoFib programs; this option, if
-used, overrides --with-hc=<...>:
-
- --with-hc-for-nofib=<Haskell compiler>
- ghc* => Glasgow Haskell invoked by the name given
- hbc* => Chalmers HBC, invoked by the name given
- nhc* => Niklas Rojemo's "nhc", invoked by the name given
- in-place => Use ghc/driver/ghc; i.e. you've built GHC
- and you want to use it un-installed ("in-place").
- ],
- [case "$withval" in
- ghc* | glhc* )
- WithNoFibHc=$withval
- ;;
- hbc* ) WithNoFibHc=$withval
- ;;
- nhc* ) WithNoFibHc=$withval
- ;;
- in-place )
- WithNoFibHc='IN-PLACE'
- ;;
- *) echo "I don't understand this option: --with-hc-for-nofib=$withval"
- exit 1
- ;;
- esac])
-
-# make sure that what they said makes sense.... set WithHappyHcType
-case $WithNoFibHc in
- haskell-compiler-unspecified ) # maybe they said something earlier...
- if test $WithHc = 'haskell-compiler-unspecified' ; then
- echo "Neither --with-hc nor --with-hc-for-nofib was properly set"
- exit 1
- fi
- ;;
- ghc* | glhc* )
- WithNoFibHcType='HC_GLASGOW_GHC'
- AC_CHECK_PROG(have_ghc_nofib,$WithNoFibHc,$ac_dir/$ac_word)
- if test -z "$have_ghc_nofib"; then
- echo "Can't find Glasgow Haskell to compile NoFib with: $WithNoFibHc"
- exit 1
- fi
- ;;
- hbc* ) # Look for the dastardly competition
- WithNoFibHcType='HC_CHALMERS_HBC'
- AC_CHECK_PROG(have_hbc,$WithNoFibHc,YES,NO)
- if test $have_hbc = 'NO' ; then
- echo "Can't find Chalmers HBC to compile NoFib with: $WithNoFibHc"
- exit 1
- fi
- ;;
- nhc* ) # Look for Niklas Rojemo's "nhc"
- WithNoFibHcType='HC_ROJEMO_NHC'
- AC_CHECK_PROG(have_nhc,$WithNoFibHc,YES,NO)
- if test $have_nhc = 'NO' ; then
- echo "Can't find Niklas Rojemo's NHC to compile NoFib with: $WithNoFibHc"
- exit 1
- fi
- ;;
- IN-PLACE) WithNoFibHcType='HC_GLASGOW_GHC'
- WithNoFibHc='$(TOP_PWD)/ghc/driver/ghc'
- ;;
-esac
-AC_SUBST(WithNoFibHc)
-AC_SUBST(WithNoFibHcType)
-
-dnl ** what mkworld \`setup' should be used?
-AC_ARG_WITH(setup,
- [
---with-setup=<setup> : What mkworld \`setup' should be used?
- Choices: ghc, hbc, nhc
-],
- [case "$withval" in
- ghc ) MkWorldSetup='ghc'
- ;;
- hbc ) MkWorldSetup='hbc'
- ;;
- nhc ) MkWorldSetup='nhc'
- ;;
- *) echo "I don't understand this option: --with-setup=$withval"
- exit 1
- ;;
- esac])
-
-if test $MkWorldSetup = 'std' ; then
- echo 'You must do --with-setup=... (one of: ghc, hbc, or nhc) for NoFib'
- exit 1
-fi
-
-# ---------------------------------------
-# What sets of tests should be run.
-#
-IncludeRealNoFibTests='YES' # defaults
-IncludeSpectralNoFibTests='YES'
-IncludeImaginaryNoFibTests='YES'
-IncludeSpecialiseNoFibTests='NO'
-IncludeGHC_ONLYNoFibTests='NO'
-IncludePRIVATENoFibTests='NO'
-IncludeParallelNoFibTests='NO'
-
-dnl ** should *all* NoFib tests be run?
-# special catch-all variant
-AC_ARG_ENABLE(all-tests,
- [Possibly turn on *all* of the possible tests (a sane choice
-only if using GHC):
-
---enable-all-tests do *all* tests],
- [case "$enableval" in
- yes) IncludeGHC_ONLYNoFibTests='YES'
- IncludeSpecialiseNoFibTests='YES'
- IncludePRIVATENoFibTests='YES'
- IncludeParallelNoFibTests='YES'
- ;;
- no) IncludeGHC_ONLYNoFibTests='NO'
- IncludeSpecialiseNoFibTests='NO'
- IncludePRIVATENoFibTests='NO'
- IncludeParallelNoFibTests='NO'
-
- IncludeRealNoFibTests='NO'
- IncludeSpectralNoFibTests='NO'
- IncludeImaginaryNoFibTests='NO'
- ;;
- *) echo "I don't understand this option: --enable-all-tests=$enableval"
- exit 1
- ;;
- esac])
-
-dnl ** turn on/off individual categories of tests...
-# individual categories
-AC_ARG_ENABLE(imaginary-tests,
- [
-Enable/disable individual categories of tests:
-
---disable-imaginary-tests do *not* include imaginary tests],
- [case "$enableval" in
- yes) IncludeImaginaryNoFibTests='YES'
- ;;
- no) IncludeImaginaryNoFibTests='NO'
- ;;
- *) echo "I don't understand this option: --enable-imaginary-tests=$enableval"
- exit 1
- ;;
- esac])
-
-AC_ARG_ENABLE(spectral-tests,
- [--disable-spectral-tests do *not* include spectral tests],
- [case "$enableval" in
- yes) IncludeSpectralNoFibTests='YES'
- ;;
- no) IncludeSpectralNoFibTests='NO'
- ;;
- *) echo "I don't understand this option: --enable-spectral-tests=$enableval"
- exit 1
- ;;
- esac])
-
-AC_ARG_ENABLE(real-tests,
- [--disable-real-tests do *not* include real tests],
- [case "$enableval" in
- yes) IncludeRealNoFibTests='YES'
- ;;
- no) IncludeRealNoFibTests='NO'
- ;;
- *) echo "I don't understand this option: --enable-real-tests=$enableval"
- exit 1
- ;;
- esac])
-
-AC_ARG_ENABLE(GHC-ONLY-tests,
- [--enable-GHC-ONLY-tests include GHC_ONLY tests],
- [case "$enableval" in
- yes) IncludeGHC_ONLYNoFibTests='YES'
- ;;
- no) IncludeGHC_ONLYNoFibTests='NO'
- ;;
- *) echo "I don't understand this option: --enable-GHC-ONLY-tests=$enableval"
- exit 1
- ;;
- esac])
-
-AC_ARG_ENABLE(specialise-tests,
- [--enable-specialise-tests include specialisation tests],
- [case "$enableval" in
- yes) IncludeSpecialiseNoFibTests='YES'
- ;;
- no) IncludeSpecialiseNoFibTests='NO'
- ;;
- *) echo "I don't understand this option: --enable-specialise-tests=$enableval"
- exit 1
- ;;
- esac])
-
-AC_ARG_ENABLE(PRIVATE-tests,
- [--enable-PRIVATE-tests include PRIVATE tests],
- [case "$enableval" in
- yes) IncludePRIVATENoFibTests='YES'
- ;;
- no) IncludePRIVATENoFibTests='NO'
- ;;
- *) echo "I don't understand this option: --enable-PRIVATE-tests=$enableval"
- exit 1
- ;;
- esac])
-
-AC_ARG_ENABLE(parallel-tests,
- [--enable-parallel-tests include parallel tests
-],
- [case "$enableval" in
- yes) IncludeParallelNoFibTests='YES'
- ;;
- no) IncludeParallelNoFibTests='NO'
- ;;
- *) echo "I don't understand this option: --enable-parallel-tests=$enableval"
- exit 1
- ;;
- esac])
-
-dnl not AC_SUBSTd because of 99-command seds (sigh)
-dnl (See what follows instead)
-dnl AC_SUBST(IncludeRealNoFibTests)
-dnl AC_SUBST(IncludeSpectralNoFibTests)
-dnl AC_SUBST(IncludeImaginaryNoFibTests)
-dnl AC_SUBST(IncludeGHC_ONLYNoFibTests)
-dnl AC_SUBST(IncludeSpecialiseNoFibTests)
-dnl AC_SUBST(IncludePRIVATENoFibTests)
-dnl AC_SUBST(IncludeParallelNoFibTests)
-
-# Here, by HACK means, we dump all the Include*NoFibTests info
-# into a file. See comment above.
-rm -f nofib/mkworld/buildinfo.jm
-echo creating nofib/mkworld/buildinfo.jm
-cat > nofib/mkworld/buildinfo.jm <<EOF
-XCOMM ** DO NOT EDIT! **
-XCOMM This file is obliterated every time 'configure' is run!
-
-EOF
-for xx in Real Spectral Imaginary GHC_ONLY Specialise PRIVATE Parallel ; do
- eval "yy=\$Include${xx}NoFibTests"
- echo "#ifndef Include${xx}NoFibTests" >> nofib/mkworld/buildinfo.jm
- echo "#define Include${xx}NoFibTests $yy" >> nofib/mkworld/buildinfo.jm
- echo "#endif" >> nofib/mkworld/buildinfo.jm
-done
-
-# Here, by HACK means, we add all the Build_ info
-# into a file. See comment above.
-
-for xx in normal p t u mc mr mt mp mg 2s 1s du a b c d e f g h i j k l m n o A B ; do
- eval "yy=\$Build_$xx"
- echo "#ifndef Build_$xx" >> nofib/mkworld/buildinfo.jm
- echo "#define Build_$xx $yy" >> nofib/mkworld/buildinfo.jm
- echo "#endif" >> nofib/mkworld/buildinfo.jm
-done