From: Andre P. <at...@us...> - 2004-05-14 06:05:52
|
Update of /cvsroot/hoc/hoc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10883 Modified Files: configure.ac config.mk.in Log Message: More build system changes ... Build system now actually implements the --with-ghc parameter :) -- define a $GHC variable in config.mk Added --with-ghc-pkg parameter (if you want to e.g. do "--with-ghc-pkg=ghc-pkg-6.2.1") Define $GHC_LIB_PATH in config.mk and use that rather than `ghc --print-libdir` in all the Makefiles Lifted DOT and POD2HTML autoconf substitutions to config.mk, rather than being output directly to docs/Makefile Index: configure.ac =================================================================== RCS file: /cvsroot/hoc/hoc/configure.ac,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- configure.ac 12 May 2004 05:51:13 -0000 1.3 +++ configure.ac 14 May 2004 06:05:10 -0000 1.4 @@ -38,13 +38,13 @@ # -# Test for GHC: this handy autoconf macro blatantly stolen from HDoc +# Test for GHC: this handy autoconf macro blatantly stolen from HDoc: # http://www.fmi.uni-passau.de/~groessli/hdoc/ # AC_ARG_WITH(ghc, - [ --with-ghc=GHC where to find ghc], - [GHC=$withval]) + [ --with-ghc=... command to run ghc (e.g. $HOME/bin/ghc-6.2.1)], + [GHC=$withval]) if test -z "$GHC"; then AC_CHECK_TOOL(GHC, ghc, ghc) @@ -53,30 +53,40 @@ GHC_FLAGS="" if test "$GHC"; then - AC_MSG_CHECKING([for ghc version]) - changequote(<<, >>) - ghc_version=`$GHC --version 2>&1 | sed -n -e 's/.* version \([0-9.][0-9.]*\).*/\1/p'` - ghc_major=`echo "$ghc_version" | sed -n -e 's/\([0-9][0-9]*\).*/\1/p'` - ghc_minor=`echo "$ghc_version" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/p'` - changequote([, ]) - AC_MSG_RESULT([$ghc_version]) - if test '(' "$ghc_major" -ge 6 -a "$ghc_minor" -ge 2 ')' -o \ + AC_MSG_CHECKING([for ghc version]) + changequote(<<, >>) + ghc_version=`$GHC --version 2>&1 | sed -n -e 's/.* version \([0-9.][0-9.]*\).*/\1/p'` + ghc_major=`echo "$ghc_version" | sed -n -e 's/\([0-9][0-9]*\).*/\1/p'` + ghc_minor=`echo "$ghc_version" | sed -n -e 's/[0-9][0-9]*\.\([0-9][0-9]*\).*/\1/p'` + changequote([, ]) + AC_MSG_RESULT([$ghc_version]) + if test '(' "$ghc_major" -ge 6 -a "$ghc_minor" -ge 2 ')' -o \ '(' "$ghc_major" -ge 6 ')'; then - AC_MSG_CHECKING([for ghc library directory]) - GHC_LIB_PATH=`$GHC --print-libdir` - AC_MSG_RESULT([$GHC_LIB_PATH]) - else - AC_MSG_ERROR([** Sorry, your GHC is too old. GHC >= 6.2 required.]) - GHC="" - fi + AC_MSG_CHECKING([for ghc library directory]) + GHC_LIB_PATH=`$GHC --print-libdir` + AC_MSG_RESULT([$GHC_LIB_PATH]) + else + AC_MSG_ERROR([** Sorry, your GHC is too old. GHC >= 6.2 required.]) + GHC="" + fi else - AC_MSG_ERROR([** Could not find GHC.]) + AC_MSG_ERROR([** Could not find GHC.]) fi AC_SUBST(GHC) AC_SUBST(GHC_LIB_PATH) -AC_CHECK_TOOL(GHC_PKG, ghc-pkg, ghc-pkg) +# Check for ghc-pkg +AC_ARG_WITH(ghc-pkg, + [ --with-ghc-pkg=... command to run ghc-pkg (e.g. $HOME/bin/ghc-pkg-6.2.1)], + [GHC_PKG="$withval"]) + +if test -n "$GHC_PKG"; then + AC_SUBST(GHC_PKG) + true +else + AC_CHECK_TOOL(GHC_PKG, ghc-pkg, ghc-pkg) +fi # Index: config.mk.in =================================================================== RCS file: /cvsroot/hoc/hoc/config.mk.in,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- config.mk.in 12 May 2004 05:44:08 -0000 1.1 +++ config.mk.in 14 May 2004 06:05:10 -0000 1.2 @@ -6,3 +6,10 @@ DEFINES=@HOC_DEFINES@ CFLAGS=@HOC_CFLAGS@ +GHC=@GHC@ +GHC_PKG=@GHC_PKG@ +GHC_LIB_PATH=@GHC_LIB_PATH@ + +DOT=@DOT@ +POD2HTML=@POD2HTML@ + |