X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=aclocal.m4;h=87149a7dc151547e1ff21e21607a75c04a66083e;hp=9d1e1cab9b0228665917e32a19228e3a63bd7ab7;hb=06decfcd62d1ca9069cd4707115ecb92bea39064;hpb=51f782f416a8aa05153a9f2dcef34d8bcb79f1ed diff --git a/aclocal.m4 b/aclocal.m4 index 9d1e1ca..87149a7 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -168,6 +168,10 @@ case $HostPlatform in alpha-dec-osf*) fptools_cv_leading_underscore=no;; *cygwin32) fptools_cv_leading_underscore=yes;; *mingw32) fptools_cv_leading_underscore=yes;; + + # HACK: Apple doesn't seem to provide nlist in the 64-bit-libraries +x86_64-apple-darwin*) fptools_cv_leading_underscore=yes;; + *) AC_RUN_IFELSE([AC_LANG_SOURCE([[#ifdef HAVE_NLIST_H #include struct nlist xYzzY1[] = {{"xYzzY1", 0},{0}}; @@ -950,10 +954,39 @@ if test "$fp_cv_gcc_has_no_unit_at_a_time" = "yes"; then AC_DEFINE([HAVE_GCC_HAS_NO_UNIT_AT_A_TIME], [1], [Define to 1 if gcc supports -fno-unit-at-a-time.]) fi]) +# FP_GCC_HAS_WRAPV +# -------------------------- +AC_DEFUN([FP_GCC_HAS_WRAPV], +[AC_REQUIRE([FP_HAVE_GCC]) +AC_CACHE_CHECK([whether gcc has -fwrapv], [fp_cv_gcc_has_wrapv], +[FP_COMPARE_VERSIONS([$fp_gcc_version], [-ge], [3.4], + [fp_cv_gcc_has_wrapv=yes], + [fp_cv_gcc_has_wrapv=no])]) +if test "$fp_cv_gcc_has_wrapv" = "yes"; then + AC_DEFINE([HAVE_GCC_HAS_WRAPV], [1], [Define to 1 if gcc supports -fwrapv.]) +fi]) + # FP_SETUP_PROJECT_VERSION # --------------------- AC_DEFUN([FP_SETUP_PROJECT_VERSION], -[# Some renamings +[ +if test "$RELEASE" = "NO"; then + AC_MSG_CHECKING([for GHC version date]) + if test -d _darcs; then + changequote(, )dnl + ver_date=`darcs changes --last=100 --xml | 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` + changequote([, ])dnl + PACKAGE_VERSION=${PACKAGE_VERSION}.$ver_date + AC_MSG_RESULT($PACKAGE_VERSION) + elif test -f VERSION; then + PACKAGE_VERSION=`cat VERSION` + AC_MSG_RESULT($PACKAGE_VERSION) + else + AC_MSG_ERROR([no version found]) + fi +fi + +# Some renamings AC_SUBST([ProjectName], [$PACKAGE_NAME]) AC_SUBST([ProjectVersion], [$PACKAGE_VERSION])