X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=configure.ac;h=c6ce56c468cf222d871995db1901e1209508fcd5;hb=aa0c0de94e25aa64139688f8e4c4ba51ddca6f54;hp=2d8fbe13118195f88049f24a24782a1c3e22aeac;hpb=a6ce3525d991c7df80aec6355b9d0aa941810a94;p=ghc-hetmet.git diff --git a/configure.ac b/configure.ac index 2d8fbe1..c6ce56c 100644 --- a/configure.ac +++ b/configure.ac @@ -175,6 +175,9 @@ then fi AC_SUBST([WithGhc]) +dnl ** Without optimization some INLINE trickery fails for GHCi +SRC_CC_OPTS="-O" + dnl-------------------------------------------------------------------- dnl * Choose host(/target/build) platform dnl-------------------------------------------------------------------- @@ -193,7 +196,7 @@ if test "$build" = "" then if test "${WithGhc}" != "" then - build=`${WithGhc} +RTS --info | grep '^ ,("Target platform"' | sed -e 's/.*, "//' -e 's/")//'` + build=`${WithGhc} +RTS --info | grep '^ ,("Target platform"' | sed -e 's/.*, "//' -e 's/")//' | tr -d '\r'` echo "Build platform inferred as: $build" else echo "Can't work out build platform" @@ -205,7 +208,7 @@ if test "$host" = "" then if test "${WithGhc}" != "" then - host=`${WithGhc} +RTS --info | grep '^ ,("Target platform"' | sed -e 's/.*, "//' -e 's/")//'` + host=`${WithGhc} +RTS --info | grep '^ ,("Target platform"' | sed -e 's/.*, "//' -e 's/")//' | tr -d '\r'` echo "Host platform inferred as: $host" else echo "Can't work out host platform" @@ -217,7 +220,7 @@ if test "$target" = "" then if test "${WithGhc}" != "" then - target=`${WithGhc} +RTS --info | grep '^ ,("Target platform"' | sed -e 's/.*, "//' -e 's/")//'` + target=`${WithGhc} +RTS --info | grep '^ ,("Target platform"' | sed -e 's/.*, "//' -e 's/")//' | tr -d '\r'` echo "Target platform inferred as: $target" else echo "Can't work out target platform" @@ -244,6 +247,8 @@ x86_64-apple-darwin) soext='.dylib' CFLAGS="$CFLAGS -m64" LDFLAGS="$LDFLAGS -m64" + SRC_CC_OPTS="$SRC_CC_OPTS -m64" + SRC_LD_OPTS="$SRC_LD_OPTS -m64" ;; esac @@ -274,7 +279,7 @@ checkOS() { linux|freebsd|netbsd|openbsd|osf1|osf3|hpux|linuxaout|kfreebsdgnu|freebsd2|solaris2|cygwin32|mingw32|darwin|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix) ;; *) - echo "Unknown OS $1" + echo "Unknown OS '$1'" exit 1 ;; esac @@ -551,12 +556,6 @@ FP_GCC_EXTRA_FLAGS dnl ** figure out how to invoke cpp directly (gcc -E is no good) AC_PROG_CPP -dnl ** Without optimization some INLINE trickery fails for GHCi -SRC_CC_OPTS="-O" - -SRC_CC_OPTS="$SRC_CC_OPTS $CFLAGS" -SRC_LD_OPTS="$SRC_LD_OPTS $LDFLAGS" - AC_SUBST(SRC_CC_OPTS) AC_SUBST(SRC_LD_OPTS)