Add new `mpz_{sub,add}_ui`-based primop (re #8647)
[packages/integer-gmp.git] / configure.ac
index d7c0b3e..b91154a 100644 (file)
@@ -1,7 +1,7 @@
 AC_INIT([Haskell integer (GMP)], [0.1], [libraries@haskell.org], [integer])
 
 # Safety check: Ensure that we are in the correct source directory.
-AC_CONFIG_SRCDIR([cbits/mkGmpDerivedConstants.c])
+AC_CONFIG_SRCDIR([cbits/gmp-wrappers.cmm])
 
 AC_CANONICAL_TARGET
 
@@ -33,6 +33,12 @@ AC_ARG_WITH([gmp-framework-preferred],
     [GMP_PREFER_FRAMEWORK=YES],
     [GMP_PREFER_FRAMEWORK=NO])
 
+AC_ARG_WITH([intree-gmp],
+  [AC_HELP_STRING([--with-intree-gmp],
+    [force using the in-tree GMP])],
+    [GMP_FORCE_INTREE=YES],
+    [GMP_FORCE_INTREE=NO])
+
 dnl--------------------------------------------------------------------
 dnl * Detect gmp
 dnl--------------------------------------------------------------------
@@ -42,13 +48,16 @@ GMP_LIBS=
 HaveFrameworkGMP=NO
 GMP_FRAMEWORK=
 
-if test "$GMP_PREFER_FRAMEWORK" = "YES"
+if test "$GMP_FORCE_INTREE" != "YES"
 then
-    LOOK_FOR_GMP_FRAMEWORK
-    LOOK_FOR_GMP_LIB
-else
-    LOOK_FOR_GMP_LIB
-    LOOK_FOR_GMP_FRAMEWORK
+    if test "$GMP_PREFER_FRAMEWORK" = "YES"
+    then
+        LOOK_FOR_GMP_FRAMEWORK
+        LOOK_FOR_GMP_LIB
+    else
+        LOOK_FOR_GMP_LIB
+        LOOK_FOR_GMP_FRAMEWORK
+    fi
 fi
 if test "$HaveFrameworkGMP" = "YES" || test "$HaveLibGmp" = "YES"
 then