X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=pkgsrc-ghc.git;a=blobdiff_plain;f=patches%2Fpatch-libraries_integer-gmp_configure.ac;fp=patches%2Fpatch-libraries_integer-gmp_configure.ac;h=3b92847316036f049469e16d81d1ac210c7c78e9;hp=0000000000000000000000000000000000000000;hb=ed8454824e2b9eabe0ed6deebff5b57d97373028;hpb=2cc2db8deb54ee91ac126e3e66c59be2facb848d diff --git a/patches/patch-libraries_integer-gmp_configure.ac b/patches/patch-libraries_integer-gmp_configure.ac new file mode 100644 index 0000000..3b92847 --- /dev/null +++ b/patches/patch-libraries_integer-gmp_configure.ac @@ -0,0 +1,42 @@ +$NetBSD$ + +In Darwin, integer-gmp prefers GMP.framework when it happens to be +installed somewhere in the system, even though it doesn't come with +Darwin. Let it stop that. + + +--- libraries/integer-gmp/configure.ac.orig 2012-02-01 18:10:52.000000000 +0000 ++++ libraries/integer-gmp/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], ++ [HaveFrameworkGMP=NO]) ++ LIBS="$save_libs" ++ AC_MSG_RESULT([$HaveFrameworkGMP]) ++ ;; ++ esac ++fi + + AC_CHECK_HEADER([gmp.h], , [HaveFrameworkGMP=NO; HaveLibGmp=NO; GMP_LIBS=]) +