[commit: ghc] master: Rearrange configure.ac a bit (3c06c09)

Simon Peyton Jones <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/3c06c09f61cc0980771668ad480b1539fbf44253

>---------------------------------------------------------------

commit 3c06c09f61cc0980771668ad480b1539fbf44253
Author: Ian Lynagh <[email protected]>
Date:   Tue Dec 4 15:12:11 2012 +0000

    Rearrange configure.ac a bit
    
    Anything that uses gcc needs to happen after we've made the mingw
    inplace tree on Windows.

>---------------------------------------------------------------

 configure.ac |  118 +++++++++++++++++++++++++++++-----------------------------
 1 files changed, 59 insertions(+), 59 deletions(-)

diff --git a/configure.ac b/configure.ac
index e5841ed..de2fd03 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.