X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=aclocal.m4;h=f98d5f3f085d99c6f484e64fb2f7183462409155;hb=39a924f10cb4fed95d8fc0caf209876a693ab1f9;hp=d614effe9cdb9d44f965037cbf4434360805e6d1;hpb=cfe2fd2a36f43c1f998bb5e7c0cec15480ed3f96;p=ghc-hetmet.git diff --git a/aclocal.m4 b/aclocal.m4 index d614eff..f98d5f3 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -558,20 +558,20 @@ fi if test "$fp_have_gcc" = "NO" -a -d $srcdir/ghc; then AC_MSG_ERROR([gcc is required]) fi -AC_CACHE_CHECK([version of gcc], [fp_gcc_version], +AC_CACHE_CHECK([version of gcc], [fp_cv_gcc_version], [if test "$fp_have_gcc" = "YES"; then - fp_gcc_version="`$CC -v 2>&1 | grep 'version ' | sed -e 's/.*version [[^0-9]]*\([[0-9.]]*\).*/\1/g'`" - FP_COMPARE_VERSIONS([$fp_gcc_version], [-lt], [3.0], + fp_cv_gcc_version="`$CC -v 2>&1 | grep 'version ' | sed -e 's/.*version [[^0-9]]*\([[0-9.]]*\).*/\1/g'`" + FP_COMPARE_VERSIONS([$fp_cv_gcc_version], [-lt], [3.0], [AC_MSG_ERROR([Need at least gcc version 3.0 (3.4+ recommended)])]) # See #2770: gcc 2.95 doesn't work any more, apparently. There probably # isn't a very good reason for that, but for now just make configure # fail. else - fp_gcc_version="not-installed" + fp_cv_gcc_version="not-installed" fi ]) AC_SUBST([HaveGcc], [$fp_have_gcc]) -AC_SUBST([GccVersion], [$fp_gcc_version]) +AC_SUBST([GccVersion], [$fp_cv_gcc_version]) ])# FP_HAVE_GCC AC_DEFUN([FP_MINGW_GCC], @@ -747,14 +747,28 @@ AS_VAR_POPDEF([fp_func])dnl # FP_GEN_DOCBOOK_XML # ------------------ # Generates a DocBook XML V4.2 document in conftest.xml. +# +# It took a lot of experimentation to find a document that will cause +# xsltproc to fail with an error code when the relevant +# stylesheets/DTDs are not found. I couldn't make xsltproc fail with +# a single-file document, it seems a multi-file document is needed. +# -- SDM 2009-06-03 +# AC_DEFUN([FP_GEN_DOCBOOK_XML], -[rm -f conftest.xml +[rm -f conftest.xml conftest-book.xml cat > conftest.xml << EOF + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [[ + +]]> - A DocBook Test Document +&conftest-book; + +EOF +cat >conftest-book.xml << EOF + + A DocBook “Test Document” A Chapter Title This is a paragraph, referencing . @@ -763,7 +777,6 @@ cat > conftest.xml << EOF Another Chapter Title This is another paragraph, referencing . - EOF ]) # FP_GEN_DOCBOOK_XML @@ -793,11 +806,9 @@ fi ])# FP_PROG_XSLTPROC -# FP_DOCBOOK_XSL(XSL-DIRS) +# FP_DOCBOOK_XSL # ---------------------------- -# Check which of the directories XSL-DIRS contains DocBook XSL stylesheets. The -# output variable HAVE_DOCBOOK_XSL will contain the first usable directory or -# will be empty if none could be found. +# Check that we can process a DocBook XML document to HTML using xsltproc. AC_DEFUN([FP_DOCBOOK_XSL], [AC_REQUIRE([FP_PROG_XSLTPROC])dnl if test -n "$XsltprocCmd"; then @@ -838,7 +849,7 @@ AC_DEFUN([FP_CHECK_DOCBOOK_DTD], if test -n "$XmllintCmd"; then AC_MSG_CHECKING([for DocBook DTD]) FP_GEN_DOCBOOK_XML - if $XmllintCmd --nonet --valid --noout conftest.xml > /dev/null 2>&1; then + if $XmllintCmd --nonet --valid --noout conftest.xml ; then AC_MSG_RESULT([ok]) else AC_MSG_RESULT([failed]) @@ -959,23 +970,23 @@ AC_DEFUN([FP_GCC_EXTRA_FLAGS], [AC_REQUIRE([FP_HAVE_GCC]) AC_CACHE_CHECK([for extra options to pass gcc when compiling via C], [fp_cv_gcc_extra_opts], [fp_cv_gcc_extra_opts= - FP_COMPARE_VERSIONS([$fp_gcc_version], [-ge], [3.4], + FP_COMPARE_VERSIONS([$fp_cv_gcc_version], [-ge], [3.4], [fp_cv_gcc_extra_opts="$fp_cv_gcc_extra_opts -fwrapv"], []) case $TargetPlatform in i386-*|x86_64-*) - FP_COMPARE_VERSIONS([$fp_gcc_version], [-ge], [3.2], + FP_COMPARE_VERSIONS([$fp_cv_gcc_version], [-ge], [3.2], [fp_cv_gcc_extra_opts="$fp_cv_gcc_extra_opts -mno-omit-leaf-frame-pointer"], []) - FP_COMPARE_VERSIONS([$fp_gcc_version], [-ge], [3.4], - [FP_COMPARE_VERSIONS([$fp_gcc_version], [-ge], [4.2], + FP_COMPARE_VERSIONS([$fp_cv_gcc_version], [-ge], [3.4], + [FP_COMPARE_VERSIONS([$fp_cv_gcc_version], [-ge], [4.2], [fp_cv_gcc_extra_opts="$fp_cv_gcc_extra_opts -fno-toplevel-reorder"], [fp_cv_gcc_extra_opts="$fp_cv_gcc_extra_opts -fno-unit-at-a-time"] )], []) ;; sparc-*-solaris2) - FP_COMPARE_VERSIONS([$fp_gcc_version], [-ge], [4.2], + FP_COMPARE_VERSIONS([$fp_cv_gcc_version], [-ge], [4.2], [fp_cv_gcc_extra_opts="$fp_cv_gcc_extra_opts -fno-toplevel-reorder"], []) ;; @@ -1006,7 +1017,7 @@ if test "$RELEASE" = "NO"; then elif test -d _darcs; then # TODO: Remove this branch after conversion to Git changequote(, )dnl - ver_date=`darcs changes --quiet --no-summary --xml | head -500 | grep 'date=' | sed "s/^.*date='\([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\).*$/\1/g" | sort -n | tail -1` + ver_date=`darcs changes --quiet --no-summary --xml | head -500 | grep 'date=' | sed "s/^.*date='\([0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]\).*$/\1/g" | ${SortCmd} -n | tail -1` if echo $ver_date | grep '^[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]$' 2>&1 >/dev/null; then true; else changequote([, ])dnl AC_MSG_ERROR([failed to detect version date: check that darcs is in your path])