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.)
This commit is contained in:
Matthew Flatt 2012-09-23 09:29:41 -05:00
parent 1eabd154fb
commit 909a6fb5c7
2 changed files with 27 additions and 3 deletions

16
src/configure vendored
View File

@ -1341,7 +1341,7 @@ Optional Features:
--enable-shared create shared libraries
--enable-dynlib same as --enable-shared
--enable-lt=<prog> use <prog> 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=<path> 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

View File

@ -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=<prog> use <prog> 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=<path> 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])