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--------------------------------------------------------------------
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"
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"
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"
soext='.dylib'
CFLAGS="$CFLAGS -m64"
LDFLAGS="$LDFLAGS -m64"
+ SRC_CC_OPTS="$SRC_CC_OPTS -m64"
+ SRC_LD_OPTS="$SRC_LD_OPTS -m64"
;;
esac
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
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)