X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=distrib%2Fconfigure-bin.ac;h=425e906b00c3dd1717acd934de8ebc829f706fc0;hb=f58ede205875622262d7377093b785b84f5805d9;hp=ca29d7de2108a4dbc8f5a525c88a0ca24ff3acb9;hpb=81cb7610337b33508066dd400cd371ff6033c987;p=ghc-hetmet.git diff --git a/distrib/configure-bin.ac b/distrib/configure-bin.ac index ca29d7d..425e906 100644 --- a/distrib/configure-bin.ac +++ b/distrib/configure-bin.ac @@ -5,92 +5,28 @@ dnl # # Is it there? -AC_INIT(Makefile.in) +AC_INIT(mk/config.mk.in) -exeext='' +FP_FIND_ROOT -# -# First off, what system are we running under? -# -AC_CANONICAL_SYSTEM - -dnl ** canonicalize platform names -# Canonicali[sz]e the platform name -TargetPlatform=`/bin/sh $srcdir/config.sub $target` || exit 1 +dnl-------------------------------------------------------------------- +dnl * Deal with arguments telling us gmp is somewhere odd +dnl-------------------------------------------------------------------- -# -# The following will be more difficult when we *are* cross-compiling. -# Suitable names to slam in *_CPP are in platform.h.in. -# We also record the architecture, vendor, and operating system (OS) -# separately. -case $TargetPlatform in -alpha*-dec-osf[[12]]*) - TargetPlatform=alpha-dec-osf1;; -alpha*-dec-osf[[345]]*) - TargetPlatform=alpha-dec-osf3;; -alpha*-unknown-linux) - TargetPlatform=alpha-unknown-linux;; -alpha*-unknown-freebsd*) - TargetPlatform=alpha-unknown-freebsd;; -hppa1.1-hp-hpux*) - TargetPlatform=hppa1.1-hp-hpux;; -i[[3456]]86-*-linuxaout*) - TargetPlatform=i386-unknown-linuxaout;; -i[[3456]]86-*-linux*) - TargetPlatform=i386-unknown-linux;; -i[[3456]]86-*-freebsd2*) - TargetPlatform=i386-unknown-freebsd2;; -i[[3456]]86-*-freebsd[[3-9]]*) - TargetPlatform=i386-unknown-freebsd;; -i[[3456]]86-*-netbsd*) - TargetPlatform=i386-unknown-netbsd;; -i[[3456]]86-*-openbsd*) - TargetPlatform=i386-unknown-openbsd;; -i[[3456]]86-*-solaris2*) - TargetPlatform=i386-unknown-solaris2;; -i[[3456]]86-*-cygwin*) - exeext='.exe' - TargetPlatform=i386-unknown-cygwin32;; -i[[3456]]86-*-mingw32*) - exeext='.exe' - # We assume you're using mingw32 via the gcc that comes - # with cygwin, and not the native port, so let's augment - # the gcc command-line used here with -mno-cygwin -mwin32 - # to arrange for good things to happen. - CFLAGS="-mno-cygwin -mwin32 $CFLAGS" - TargetPlatform=i386-unknown-mingw32 - ;; -m68k-next-nextstep2) - TargetPlatform=m68k-next-nextstep2;; -m68k-next-nextstep3) - TargetPlatform=m68k-next-nextstep3;; -i[[3456]]86-next-nextstep3) - TargetPlatform=i386-next-nextstep3;; -m68k-sun-sunos4*) - TargetPlatform=m68k-sun-sunos4;; -mips-dec-ultrix*) - TargetPlaformP=mips-dec-ultrix;; -mips-sgi-irix*) - TargetPlatform=mips-sgi-irix;; -powerpc-ibm-aix*) - TargetPlatform=powerpc-ibm-aix;; -rs6000-ibm-aix*) - TargetPlatform=rs6000-ibm-aix;; -powerpc-apple-darwin*) - TargetPlatform=powerpc-apple-darwin;; -sparc-sun-sunos4*) - TargetPlatform=sparc-sun-sunos4;; -sparc-sun-solaris2*) - TargetPlatform=sparc-sun-solaris2;; -*) - echo "Unrecognised platform: $TargetPlatform" - exit 1 - ;; -esac -echo "Which we'll further canonicalise into: $TargetPlatform" +FP_ARG_GMP -AC_SUBST(TargetPlatform) -AC_SUBST(exeext) +GMP_INCLUDE_DIRS= +GMP_LIB_DIRS= +if test "x$gmp_libraries" != "xNONE"; then + LDFLAGS="-L$gmp_libraries $LDFLAGS" + GMP_LIB_DIRS=$gmp_libraries +fi +if test "x$gmp_includes" != "xNONE"; then + CPPFLAGS="-I$gmp_includes $CPPFLAGS" + GMP_INCLUDE_DIRS=$gmp_includes +fi +AC_SUBST(GMP_INCLUDE_DIRS) +AC_SUBST(GMP_LIB_DIRS) # dnl ** Check Perl installation ** @@ -114,6 +50,11 @@ dnl ** how to do symlinks ** AC_PROG_LN_S() # +dnl ** how to invoke `ar' and `ranlib' +# +FP_PROG_AR_NEEDS_RANLIB + +# dnl ** Find the path to sed ** # AC_PATH_PROG(SedCmd,sed) @@ -121,15 +62,19 @@ AC_PATH_PROG(SedCmd,sed) # dnl ** How to invoke cpp directly ** # -AC_PROG_CC -FPTOOLS_HAVE_GCC +FP_HAVE_GCC AC_PROG_CPP # -AC_OUTPUT(Makefile) +dnl ** Check gcc version and flags we need to pass it ** +# +FP_GCC_EXTRA_FLAGS + +# +AC_CONFIG_FILES(extra-gcc-opts mk/config.mk mk/install.mk) +AC_OUTPUT echo "****************************************************" -echo "Configuration done, ready to either 'make install'" -echo "or 'make in-place'." +echo "Configuration done, ready to 'make install'" echo "(see README and INSTALL files for more info.)" echo "****************************************************"