From cbd1507a8efe438a5473ce643cda9656748c0b67 Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Wed, 10 Aug 2011 21:28:02 +0200 Subject: [PATCH] Some older versions of libffi do not provide ffi_closure_alloc -- change the autoconf check to verify that. --- src/aclocal.m4 | 2 +- src/configure | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 118925197..6a3a388ba 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -981,7 +981,7 @@ if test "${enable_libffi}" = auto -o "${enable_libffi}" = system; then dnl dnl Try first with the prebuilt versions, if installed and accessible dnl - AC_CHECK_LIB( ffi, ffi_call, [system_libffi=yes], [system_libffi=no] ) + AC_CHECK_LIB( ffi, ffi_closure_alloc, [system_libffi=yes], [system_libffi=no] ) if test "${system_libffi}" = yes; then AC_CHECK_HEADER([ffi/ffi.h],[ECL_LIBFFI_HEADER='ffi/ffi.h'],[],[]) if test -z "$ECL_LIBFFI_HEADER"; then diff --git a/src/configure b/src/configure index 5e4114574..0903ee1f4 100755 --- a/src/configure +++ b/src/configure @@ -6649,9 +6649,9 @@ echo "$as_me: error: Invalid value of --enable-dffi: ${enable_libffi} " >&2;} { (exit 1); exit 1; }; };; esac if test "${enable_libffi}" = auto -o "${enable_libffi}" = system; then - { echo "$as_me:$LINENO: checking for ffi_call in -lffi" >&5 -echo $ECHO_N "checking for ffi_call in -lffi... $ECHO_C" >&6; } -if test "${ac_cv_lib_ffi_ffi_call+set}" = set; then + { echo "$as_me:$LINENO: checking for ffi_closure_alloc in -lffi" >&5 +echo $ECHO_N "checking for ffi_closure_alloc in -lffi... $ECHO_C" >&6; } +if test "${ac_cv_lib_ffi_ffi_closure_alloc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -6669,11 +6669,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char ffi_call (); +char ffi_closure_alloc (); int main () { -return ffi_call (); +return ffi_closure_alloc (); ; return 0; } @@ -6696,21 +6696,21 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_lib_ffi_ffi_call=yes + ac_cv_lib_ffi_ffi_closure_alloc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_ffi_ffi_call=no + ac_cv_lib_ffi_ffi_closure_alloc=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ffi_ffi_call" >&5 -echo "${ECHO_T}$ac_cv_lib_ffi_ffi_call" >&6; } -if test $ac_cv_lib_ffi_ffi_call = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ffi_ffi_closure_alloc" >&5 +echo "${ECHO_T}$ac_cv_lib_ffi_ffi_closure_alloc" >&6; } +if test $ac_cv_lib_ffi_ffi_closure_alloc = yes; then system_libffi=yes else system_libffi=no