summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-12-04 15:12:11 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2012-12-04 15:18:57 +0000
commit3c06c09f61cc0980771668ad480b1539fbf44253 (patch)
tree191fd4a3bc7520fc8ff886189307b1e594285937 /configure.ac
parent88eeabcc2a5c9ded13efaac4bde4ff352ac57968 (diff)
downloadhaskell-3c06c09f61cc0980771668ad480b1539fbf44253.tar.gz
Rearrange configure.ac a bit
Anything that uses gcc needs to happen after we've made the mingw inplace tree on Windows.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac118
1 files changed, 59 insertions, 59 deletions
diff --git a/configure.ac b/configure.ac
index e5841ed854..de2fd03f4a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -86,62 +86,6 @@ AC_ARG_WITH([ghc],
fi
WithGhc="$GHC"])
-# system libffi
-
-AC_ARG_WITH([system-libffi],
-[AC_HELP_STRING([--with-system-libffi],
- [Use system provided libffi for RTS [default=no]])
-])
-
-AS_IF([test "x$with_system_libffi" = "xyes"],
- [UseSystemLibFFI="YES"], [UseSystemLibFFI="NO"]
-)
-
-
-AC_SUBST(UseSystemLibFFI)
-
-AC_ARG_WITH([ffi-includes],
-[AC_HELP_STRING([--with-ffi-includes=ARG]
- [Find includes for libffi in ARG [default=system default]])
-],
-[
- if test "x$UseSystemLibFFI" != "xYES"; then
- AC_MSG_WARN([--with-ffi-includes will be ignored, --with-system-libffi not set])
- else
- FFIIncludeDir="$withval"
- LIBFFI_CFLAGS="-I $withval"
- fi
-])
-
-AC_SUBST(FFIIncludeDir)
-
-AC_ARG_WITH([ffi-libraries],
-[AC_HELP_STRING([--with-ffi-libraries=ARG]
- [Find libffi in ARG [default=system default]])
-],
-[
- if test "x$UseSystemLibFFI" != "xYES"; then
- AC_MSG_WARN([--with-ffi-libraries will be ignored, --with-system-libffi not set])
- else
- FFILibDir="$withval" LIBFFI_LDFLAGS="-L$withval"
- fi
-])
-
-AC_SUBST(FFILibDir)
-
-AS_IF([test "$UseSystemLibFFI" = "YES"], [
- CFLAGS2="$CFLAGS"
- CFLAGS="$LIBFFI_CFLAGS $CFLAGS"
- LDFLAGS2="$LDFLAGS"
- LDFLAGS="$LIBFFI_LDFLAGS $LDFLAGS"
- AC_CHECK_LIB(ffi, ffi_call,
- [AC_CHECK_HEADERS([ffi.h], [break], [])
- AC_DEFINE([HAVE_LIBFFI], [1], [Define to 1 if you have libffi.])],
- [AC_MSG_ERROR([Cannot find system libffi])])
- CFLAGS="$CFLAGS2"
- LDFLAGS="$LDFLAGS2"
-])
-
dnl ** Tell the make system which OS we are using
dnl $OSTYPE is set by the operating system to "msys" or "cygwin" or something
AC_SUBST(OSTYPE)
@@ -241,9 +185,6 @@ AC_SUBST([WithGhc])
dnl ** Without optimization some INLINE trickery fails for GHCi
SRC_CC_OPTS="-O"
-FP_ICONV
-FP_GMP
-
dnl--------------------------------------------------------------------
dnl * Choose host(/target/build) platform
dnl--------------------------------------------------------------------
@@ -428,6 +369,65 @@ then
fi
fi
+# system libffi
+
+AC_ARG_WITH([system-libffi],
+[AC_HELP_STRING([--with-system-libffi],
+ [Use system provided libffi for RTS [default=no]])
+])
+
+AS_IF([test "x$with_system_libffi" = "xyes"],
+ [UseSystemLibFFI="YES"], [UseSystemLibFFI="NO"]
+)
+
+
+AC_SUBST(UseSystemLibFFI)
+
+AC_ARG_WITH([ffi-includes],
+[AC_HELP_STRING([--with-ffi-includes=ARG]
+ [Find includes for libffi in ARG [default=system default]])
+],
+[
+ if test "x$UseSystemLibFFI" != "xYES"; then
+ AC_MSG_WARN([--with-ffi-includes will be ignored, --with-system-libffi not set])
+ else
+ FFIIncludeDir="$withval"
+ LIBFFI_CFLAGS="-I $withval"
+ fi
+])
+
+AC_SUBST(FFIIncludeDir)
+
+AC_ARG_WITH([ffi-libraries],
+[AC_HELP_STRING([--with-ffi-libraries=ARG]
+ [Find libffi in ARG [default=system default]])
+],
+[
+ if test "x$UseSystemLibFFI" != "xYES"; then
+ AC_MSG_WARN([--with-ffi-libraries will be ignored, --with-system-libffi not set])
+ else
+ FFILibDir="$withval" LIBFFI_LDFLAGS="-L$withval"
+ fi
+])
+
+AC_SUBST(FFILibDir)
+
+AS_IF([test "$UseSystemLibFFI" = "YES"], [
+ CFLAGS2="$CFLAGS"
+ CFLAGS="$LIBFFI_CFLAGS $CFLAGS"
+ LDFLAGS2="$LDFLAGS"
+ LDFLAGS="$LIBFFI_LDFLAGS $LDFLAGS"
+ AC_CHECK_LIB(ffi, ffi_call,
+ [AC_CHECK_HEADERS([ffi.h], [break], [])
+ AC_DEFINE([HAVE_LIBFFI], [1], [Define to 1 if you have libffi.])],
+ [AC_MSG_ERROR([Cannot find system libffi])])
+ CFLAGS="$CFLAGS2"
+ LDFLAGS="$LDFLAGS2"
+])
+
+FP_ICONV
+FP_GMP
+
XCODE_VERSION()
SplitObjsBroken=NO