# # Copyright (c) 2003 Don Stewart - http://www.cse.unsw.edu.au/~dons # GPL version 2 or later (see http://www.gnu.org/copyleft/gpl.html) # # sanity test AC_INIT(Main.hs) AC_PREREQ(2.57) # allow user supplied haskell compiler AC_ARG_WITH(ghc, AC_HELP_STRING([--with-ghc=],[use a specific Haskell compiler]), [ GHC="$withval" ], [ AC_CHECK_PROG(GHC,ghc,ghc) if test -z "$GHC" ; then AC_MSG_ERROR(You need GHC to build this project) fi ] ) # check ghc version here if test -n "$GHC" ; then AC_MSG_CHECKING([for ghc version]) GHC_VERSION=`$GHC --numeric-version` AC_MSG_RESULT([$GHC_VERSION]) fi AC_SUBST(GHC_VERSION) # Work out value of __GLASGOW_HASKELL__ if test -n "$GHC" ; then AC_MSG_CHECKING([for value of __GLASGOW_HASKELL__]) echo "main = print __GLASGOW_HASKELL__" > t.hs GLASGOW_HASKELL=`echo 'main' | "$GHC" --interactive -v0 -cpp t.hs` rm t.hs AC_MSG_RESULT([$GLASGOW_HASKELL]) fi AC_SUBST(GLASGOW_HASKELL) AC_CHECK_PROG(ALEX,alex,alex) if test -z "$ALEX" ; then AC_MSG_WARN(You need Alex if you modify the lexer) fi AC_CHECK_PROG(HAPPY,happy,happy) if test -z "$HAPPY" ; then AC_MSG_WARN(You need Happy if you modify the lexer) fi AC_PATH_PROG(PERL,perl,perl) if test -z "$PERL" ; then AC_MSG_WARN(You will need perl if you want to run the testsuite) fi AC_PATH_PROG(DIFF,diff,diff) if test -z "$DIFF" ; then AC_MSG_WARN(You will need diff if you want to run the testsuite) fi AC_CHECK_PROG(STRIP,strip,strip) WorkingDirectory=`pwd` AC_SUBST(WorkingDirectory) AC_CONFIG_FILES(mk/config.mk Phrac/Constants.hs) AC_OUTPUT