Fix the $(GMP_DIR) path that we remove
[packages/integer-gmp.git] / configure.ac
index 428e151..b6a8003 100644 (file)
@@ -51,13 +51,15 @@ case $target_os in
     save_libs="$LIBS"
     LIBS="-framework GMP"
     AC_TRY_LINK_FUNC(__gmpz_fdiv_qr,
-      [HaveFrameworkGMP=yes; GMP_FRAMEWORK=GMP; GMP_LIBS=],
-      [HaveFrameworkGMP=no])
+      [HaveFrameworkGMP=YES; GMP_FRAMEWORK=GMP; GMP_LIBS=],
+      [HaveFrameworkGMP=NO])
     LIBS="$save_libs"
     AC_MSG_RESULT([$HaveFrameworkGMP])
     ;;
 esac
 
+AC_CHECK_HEADER([gmp.h], , [HaveFrameworkGMP=NO; HaveLibGmp=NO; GMP_LIBS=])
+
 dnl--------------------------------------------------------------------
 dnl * Make sure we got some form of gmp
 dnl--------------------------------------------------------------------
@@ -69,15 +71,10 @@ AC_SUBST(GMP_FRAMEWORK)
 AC_SUBST(HaveLibGmp)
 AC_SUBST(HaveFrameworkGMP)
 
-AC_CONFIG_FILES([integer.buildinfo gmp/config.mk])
+AC_CONFIG_FILES([integer-gmp.buildinfo gmp/config.mk])
 
 dnl--------------------------------------------------------------------
 dnl * Generate the header cbits/GmpDerivedConstants.h
 dnl--------------------------------------------------------------------
 
-AC_MSG_NOTICE([generating GmpDerivedConstants.h])
-${CC} $CFLAGS cbits/mkGmpDerivedConstants.c -o cbits/mkGmpDerivedConstants
-cbits/mkGmpDerivedConstants > cbits/GmpDerivedConstants.h
-rm cbits/mkGmpDerivedConstants
-
 AC_OUTPUT