Skip to content
Browse files

Prefer libgmp/libgmp3 over GMP.framework on Darwin

./configure should not ignore --with-gmp-includes/--with-gmp-libraries just because GMP.framework is found. It should search for GMP.framework only when libgmp/libgmp3 is absent.
  • Loading branch information...
1 parent 8c5a74f commit 2523eb35548e79f32506b9a7011f8ebbd355f5dc @phonohawk committed Dec 1, 2012
Showing with 14 additions and 12 deletions.
  1. +14 −12 configure.ac
View
26 configure.ac
@@ -45,18 +45,20 @@ dnl--------------------------------------------------------------------
dnl * Mac OS X only: check for GMP.framework
dnl--------------------------------------------------------------------
-case $target_os in
- darwin*)
- AC_MSG_CHECKING([for GMP.framework])
- save_libs="$LIBS"
- LIBS="-framework GMP"
- AC_TRY_LINK_FUNC(__gmpz_fdiv_qr,
- [HaveFrameworkGMP=YES; GMP_FRAMEWORK=GMP; GMP_LIBS=],
- [HaveFrameworkGMP=NO])
- LIBS="$save_libs"
- AC_MSG_RESULT([$HaveFrameworkGMP])
- ;;
-esac
+if test "$HaveLibGmp" = "NO"; then
+ case $target_os in
+ darwin*)
+ AC_MSG_CHECKING([for GMP.framework])
+ save_libs="$LIBS"
+ LIBS="-framework GMP"
+ AC_TRY_LINK_FUNC(__gmpz_fdiv_qr,
+ [HaveFrameworkGMP=YES; GMP_FRAMEWORK=GMP; GMP_LIBS=],
+ [HaveFrameworkGMP=NO])
+ LIBS="$save_libs"
+ AC_MSG_RESULT([$HaveFrameworkGMP])
+ ;;
+ esac
+fi
AC_CHECK_HEADER([gmp.h], , [HaveFrameworkGMP=NO; HaveLibGmp=NO; GMP_LIBS=])

0 comments on commit 2523eb3

Please sign in to comment.
Something went wrong with that request. Please try again.