X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=configure.ac;h=e9ad212a97ca4088752481ae9f04380740607978;hp=372287a330380647d713b6fcca92351f2ce7c113;hb=9da4639011348fb6c318e3cba4b08622f811d9c4;hpb=ede4c6f2996fce6f94c0edea7ef99da7e971396a diff --git a/configure.ac b/configure.ac index 372287a..e9ad212 100644 --- a/configure.ac +++ b/configure.ac @@ -15,6 +15,11 @@ dnl AC_INIT([The Glorious Glasgow Haskell Compilation System], [6.5], [glasgow-haskell-bugs@haskell.org], [ghc]) +if test ! -f mk/config.h.in; then + echo "mk/config.h.in doesn't exist: perhaps you haven't run 'autoreconf'?" + exit 1 +fi + FP_SETUP_PROJECT_VERSION # Hmmm, we fix the RPM release number to 1 here... Is this convenient? @@ -387,6 +392,15 @@ mips-*-linux*) HostVendor_CPP='unknown' HostOS_CPP='linux' ;; +mipsel-*-linux*) + HostPlatform=mipsel-unknown-linux # hack again + TargetPlatform=mipsel-unknown-linux + BuildPlatform=mipsel-unknown-linux + HostPlatform_CPP='mipsel_unknown_linux' + HostArch_CPP='mipsel' + HostVendor_CPP='unknown' + HostOS_CPP='linux' + ;; mips-dec-ultrix*) HostPlatform_CPP='mips_dec_ultrix' HostArch_CPP='mipsel' # NB a little different @@ -601,7 +615,12 @@ case $HostPlatform in hardtop=`cygpath -w ${cyghardtop} | sed -e 's@\\\\@/@g'` hardtop_plat=`cygpath -w ${cyghardtop} | sed -e 's@\\\\@\\\\\\\\@g'` else - hardtop_plat=${hardtop} +dnl OK, so we're in the MSYS case. hardtop looks like /c/.... +dnl We want to make hardtop_plat into c:/... +dnl Stop using [] for quotes temporarily, so we can use [] in the sed regexp +changequote(, )dnl + hardtop_plat=`echo ${hardtop} | sed -e 's@^/\\([a-zA-Z]\\)/@\\1:/@g'` +changequote([, ])dnl fi ;; *) @@ -899,7 +918,7 @@ AC_PATH_PROGS(TarCmd,gtar tar,tar) dnl ** check for DocBook toolchain FP_CHECK_DOCBOOK_DTD -FP_DIR_DOCBOOK_XSL([/usr/share/xml/docbook/stylesheet/nwalsh/current /usr/share/xml/docbook/stylesheet/nwalsh /usr/share/sgml/docbook/docbook-xsl-stylesheets* /usr/share/sgml/docbook/xsl-stylesheets* /opt/kde?/share/apps/ksgmltools2/docbook/xsl /usr/share/docbook-xsl /usr/share/sgml/docbkxsl /usr/local/share/xsl/docbook /sw/share/xml/xsl/docbook-xsl]) +FP_DIR_DOCBOOK_XSL([/usr/share/xml/docbook/stylesheet/nwalsh/current /usr/share/xml/docbook/stylesheet/nwalsh /usr/share/sgml/docbook/docbook-xsl-stylesheets* /usr/share/sgml/docbook/xsl-stylesheets* /opt/kde?/share/apps/ksgmltools2/docbook/xsl /usr/share/docbook-xsl /usr/share/sgml/docbkxsl /usr/local/share/xsl/docbook /sw/share/xml/xsl/docbook-xsl /opt/local/share/xsl/docbook-xsl]) FP_PROG_FO_PROCESSOR dnl ** check for ghc-pkg command @@ -962,12 +981,6 @@ AC_SUBST(GhcLibsWithReadline) dnl ** check if it is safe to include both and AC_HEADER_TIME -dnl ** how do we get a timezone name, and UTC offset ? -AC_STRUCT_TIMEZONE - -dnl ** do we have altzone? -FP_DECL_ALTZONE - dnl ** do we have long longs? AC_CHECK_TYPES([long long]) @@ -1136,17 +1149,25 @@ dnl (.subsections-via-symbols assembler directive) AC_MSG_CHECKING(for .subsections_via_symbols) -AC_TRY_COMPILE(,[__asm__ (".subsections_via_symbols");], - [ - AC_MSG_RESULT(yes) - AC_DEFINE([HAVE_SUBSECTIONS_VIA_SYMBOLS],[1], - [Define to 1 if Apple-style dead-stripping is supported.]) +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([], [__asm__ (".subsections_via_symbols");])], + [AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_SUBSECTIONS_VIA_SYMBOLS],[1], + [Define to 1 if Apple-style dead-stripping is supported.]) ], - [ - AC_MSG_RESULT(no) - AC_DEFINE([HAVE_SUBSECTIONS_VIA_SYMBOLS],[0], - [Define to 1 if Apple-style dead-stripping is supported.]) - ]) + [AC_MSG_RESULT(no)]) + +dnl *** check for GNU non-executable stack note support (ELF only) +dnl (.section .note.GNU-stack,"",@progbits) + +AC_MSG_CHECKING(for GNU non-executable stack support) +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([__asm__ (".section .note.GNU-stack,\"\",@progbits");], [0])], + [AC_MSG_RESULT(yes) + AC_DEFINE([HAVE_GNU_NONEXEC_STACK],[1], + [Define to 1 if GNU non-executable stack notes are supported.]) + ], + [AC_MSG_RESULT(no)]) dnl ** check for librt AC_CHECK_LIB(rt, clock_gettime)