try to build with correct ffcall/ffi depending on target system

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@26483 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2008-05-01 20:14:05 +00:00
parent fcd0003c7b
commit 7eb3e5eebd
4 changed files with 52 additions and 6 deletions

View file

@ -1,3 +1,8 @@
2008-05-01 Richard Frith-Macdonald <rfm@gnu.org>
* configure.ac: try to use libffi on sparc64 as libffcall does not
work. Warn if user tries to enable libffcall.
2008-04-25 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSPropertyList.m:

View file

@ -135,6 +135,9 @@ struct NCTbl; /* Notification Center Table structure */
* each -addObserver... request. It holds the requested selector,
* name and object. Each struct is placed in one LinkedList,
* as keyed by the NAME/OBJECT parameters.
* If 'next' is 0 then the observation is unused (ie it has been
* removed from, or not yet added to any list). The end of a
* list is marked by 'next' being set to 'ENDOBS'.
*/
typedef struct Obs {

26
configure vendored
View file

@ -16099,9 +16099,21 @@ fi
#--------------------------------------------------------------------
# Check for FFI interface libraries for invocations
# We enable ffcall by default now.
# We enable ffcall by default now, except on sparc64 (where we think
# it's broken).
#--------------------------------------------------------------------
do_enable_libffi=no
case "$target_cpu" in
sparc64*)
do_broken_libffi=no;
do_broken_libffcall=yes;
do_enable_libffi=yes;
do_enable_libffcall=no;;
*)
do_broken_libffi=no;
do_broken_libffcall=no;
do_enable_libffi=no;
do_enable_libffcall=yes;;
esac
# Check whether --enable-libffi was given.
if test "${enable_libffi+set}" = set; then
@ -16115,7 +16127,7 @@ fi
if test "${enable_ffcall+set}" = set; then
enableval=$enable_ffcall;
else
enable_ffcall=yes
enable_ffcall=$do_enable_libffcall
fi
@ -16588,6 +16600,10 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
{ echo "$as_me:$LINENO: result: libffi" >&5
echo "${ECHO_T}libffi" >&6; }
fi
if test $do_broken_libffi = yes; then
{ echo "$as_me:$LINENO: WARNING: ffi may be broken on this system ... try enabling ffcall" >&5
echo "$as_me: WARNING: ffi may be broken on this system ... try enabling ffcall" >&2;}
fi
elif test $enable_ffcall = yes; then
cat >>confdefs.h <<\_ACEOF
@ -16643,6 +16659,10 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
{ echo "$as_me:$LINENO: result: ffcall" >&5
echo "${ECHO_T}ffcall" >&6; }
fi
if test $do_broken_libffcall = yes; then
{ echo "$as_me:$LINENO: WARNING: ffcall may be broken on this system ... try enabling ffi" >&5
echo "$as_me: WARNING: ffcall may be broken on this system ... try enabling ffi" >&2;}
fi
else
ffi_ok=no
fi

View file

@ -1868,9 +1868,21 @@ fi
#--------------------------------------------------------------------
# Check for FFI interface libraries for invocations
# We enable ffcall by default now.
# We enable ffcall by default now, except on sparc64 (where we think
# it's broken).
#--------------------------------------------------------------------
do_enable_libffi=no
case "$target_cpu" in
sparc64*)
do_broken_libffi=no;
do_broken_libffcall=yes;
do_enable_libffi=yes;
do_enable_libffcall=no;;
*)
do_broken_libffi=no;
do_broken_libffcall=no;
do_enable_libffi=no;
do_enable_libffcall=yes;;
esac
AC_ARG_ENABLE(libffi,
[ --enable-libffi Enable use of libffi library],,
@ -1878,7 +1890,7 @@ AC_ARG_ENABLE(libffi,
AC_ARG_ENABLE(ffcall,
[ --enable-ffcall Enable use of ffcall library],,
enable_ffcall=yes)
enable_ffcall=$do_enable_libffcall)
AC_ARG_ENABLE(do,
[ --disable-do Compile even if DO-dependencies are not met],,
@ -1948,6 +1960,9 @@ if test $enable_libffi = yes; then
if test $ffi_ok = yes; then
AC_MSG_RESULT(libffi)
fi
if test $do_broken_libffi = yes; then
AC_MSG_WARN([ffi may be broken on this system ... try enabling ffcall])
fi
elif test $enable_ffcall = yes; then
AC_DEFINE(USE_FFCALL,1,
[Define if using the ffcall library for invocations])
@ -1957,6 +1972,9 @@ elif test $enable_ffcall = yes; then
if test $ffi_ok = yes; then
AC_MSG_RESULT(ffcall)
fi
if test $do_broken_libffcall = yes; then
AC_MSG_WARN([ffcall may be broken on this system ... try enabling ffi])
fi
else
ffi_ok=no
fi