From 909a6fb5c7699b252014a894f72dac24be7a22fd Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 23 Sep 2012 09:29:41 -0500 Subject: [PATCH] Mac OS X: make --disable-libffi the default Avoids a common problem with libffi installed by MacPorts causing problems with a mismatch between an iconv installed by MacPorts and the system iconv. (When libffi is installed, then -I/opt/include for the libffi heads also picks up the iconv headers, but the ordering of the lib flags doesn't pick up libiconv from /opt/lib. We could try to hack around this by ordering the flags just right, but it seems better to avoid the issue.) --- src/configure | 16 ++++++++++++++-- src/racket/configure.ac | 14 +++++++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/configure b/src/configure index a0ebf8bdad..5f78312c24 100755 --- a/src/configure +++ b/src/configure @@ -1341,7 +1341,7 @@ Optional Features: --enable-shared create shared libraries --enable-dynlib same as --enable-shared --enable-lt= use instead of libtool; disable to use bundled - --enable-libffi use installed libffi (enabled by default) + --enable-libffi use installed libffi (enabled by default for Unix) --enable-sdk= use Mac OS X 10.4 SDK directory --enable-xonx use Unix style (e.g., use Gtk) for Mac OS X --enable-libfw install Mac OS X frameworks to /Library/Frameworks @@ -2043,7 +2043,7 @@ fi if test "${enable_libffi+set}" = set; then enableval=$enable_libffi; else - enable_libffi=yes + enable_libffi=default fi @@ -2322,6 +2322,7 @@ show_explicitly_enabled "${enable_orig}" "Original install tree" show_explicitly_disabled "${enable_jit}" JIT show_explicitly_disabled "${enable_foreign}" Foreign +show_explicitly_enabled "${enable_libffi}" "Installed libffi" show_explicitly_disabled "${enable_libffi}" "Installed libffi" show_explicitly_enabled "${enable_places}" Places @@ -5363,6 +5364,17 @@ _ACEOF fi fi +if test "${enable_libffi}" = "default" ; then + case "$host_os" in + darwin*) + enable_libffi=no + ;; + *) + enable_libffi=yes + ;; + esac +fi + if test "${enable_libffi}" = "yes" ; then if test "${enable_foreign}" = "yes" ; then { echo "$as_me:$LINENO: checking for libffi" >&5 diff --git a/src/racket/configure.ac b/src/racket/configure.ac index e39b4614e1..397f2c2089 100644 --- a/src/racket/configure.ac +++ b/src/racket/configure.ac @@ -44,7 +44,7 @@ AC_ARG_ENABLE(shared, [ --enable-shared create shared libraries]) AC_ARG_ENABLE(dynlib, [ --enable-dynlib same as --enable-shared]) AC_ARG_ENABLE(lt, [ --enable-lt= use instead of libtool; disable to use bundled], LIBTOOLPROG="$enableval", enable_lt=default) -AC_ARG_ENABLE(libffi, [ --enable-libffi use installed libffi (enabled by default)], , enable_libffi=yes) +AC_ARG_ENABLE(libffi, [ --enable-libffi use installed libffi (enabled by default for Unix)], , enable_libffi=default) AC_ARG_ENABLE(sdk, [ --enable-sdk= use Mac OS X 10.4 SDK directory]) AC_ARG_ENABLE(xonx, [ --enable-xonx use Unix style (e.g., use Gtk) for Mac OS X]) @@ -255,6 +255,7 @@ show_explicitly_enabled "${enable_orig}" "Original install tree" show_explicitly_disabled "${enable_jit}" JIT show_explicitly_disabled "${enable_foreign}" Foreign +show_explicitly_enabled "${enable_libffi}" "Installed libffi" show_explicitly_disabled "${enable_libffi}" "Installed libffi" show_explicitly_enabled "${enable_places}" Places @@ -860,6 +861,17 @@ if test "${try_kqueue_syscall}" = "yes" ; then fi fi +if test "${enable_libffi}" = "default" ; then + case "$host_os" in + darwin*) + enable_libffi=no + ;; + *) + enable_libffi=yes + ;; + esac +fi + if test "${enable_libffi}" = "yes" ; then if test "${enable_foreign}" = "yes" ; then AC_MSG_CHECKING([for libffi])