mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Much simmplified NeXT checks for configure tests
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@9706 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
45388db20c
commit
f8a7f50981
7 changed files with 386 additions and 541 deletions
|
@ -1,3 +1,9 @@
|
|||
2001-04-25 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* configure.in: Much simplified NeXT checks. Just use LIBRARY_COMBO
|
||||
to check runtime.
|
||||
* Source/o_vscanf.c: Remove objc-gnu2next.h
|
||||
|
||||
2001-04-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Headers/Foundation/GSXML.h: Many changes to restore encapsulation
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
|
||||
#undef CON_AUTOLOAD
|
||||
|
||||
#undef NeXT_cc
|
||||
#undef NeXT_runtime
|
||||
|
||||
#undef VSPRINTF_RETURNS_LENGTH
|
||||
#undef VASPRINTF_RETURNS_LENGTH
|
||||
|
||||
|
|
|
@ -60,7 +60,6 @@ Cambridge, MA 02111, USA. */
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <objc/objc-api.h>
|
||||
#include <base/objc-gnu2next.h>
|
||||
|
||||
extern double strtod(const char *str, char **ptr);
|
||||
extern long strtol(const char *str, char** ptr, int base);
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
|
||||
#undef CON_AUTOLOAD
|
||||
|
||||
#undef NeXT_cc
|
||||
#undef NeXT_runtime
|
||||
|
||||
#undef VSPRINTF_RETURNS_LENGTH
|
||||
#undef VASPRINTF_RETURNS_LENGTH
|
||||
|
||||
|
|
20
aclocal.m4
vendored
20
aclocal.m4
vendored
|
@ -176,26 +176,6 @@ ac_link='${OBJCC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest
|
|||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
])
|
||||
|
||||
dnl AC_PROG_NEXTCC
|
||||
dnl Check for NeXT compiler.
|
||||
AC_DEFUN(AC_PROG_NEXTCC,
|
||||
[ AC_CACHE_CHECK(whether we are using the NeXT compiler, ac_prog_nextcc,
|
||||
[AC_EGREP_CPP(yes,
|
||||
[#if defined(NeXT)
|
||||
#if defined(_NEXT_SOURCE)
|
||||
no
|
||||
#else
|
||||
yes
|
||||
#endif
|
||||
#else
|
||||
no
|
||||
#endif], ac_prog_nextcc=yes, ac_prog_nextcc=no)])
|
||||
|
||||
if test "$ac_prog_nextcc" = yes; then
|
||||
NeXTCC=yes
|
||||
fi
|
||||
])
|
||||
|
||||
dnl AC_SYS_PROCFS
|
||||
dnl This macro defines HAVE_PROCFS if either it finds a mounted /proc
|
||||
dnl or the user explicitly enables it for cross-compiles.
|
||||
|
|
97
configure.in
97
configure.in
|
@ -52,72 +52,41 @@ case "$target_os" in
|
|||
LIBS="$LIBS -L/usr/local/lib";;
|
||||
esac
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Find out if we\'re using NeXT\'s compiler.
|
||||
# if yes:
|
||||
# add -cpp-traditional to CPP
|
||||
#--------------------------------------------------------------------
|
||||
AC_PROG_NEXTCC
|
||||
if test "$NeXTCC" != yes; then
|
||||
#----------------------------------------------------------------
|
||||
# Find out if nested functions work on this machine
|
||||
#----------------------------------------------------------------
|
||||
AC_MSG_CHECKING(whether nested functions work)
|
||||
AC_TRY_RUN([#include "$srcdir/config/config.nested.c"],
|
||||
gcc_nested=1, gcc_nested=0,
|
||||
gcc_nested=1)
|
||||
if test $gcc_nested = 0; then
|
||||
AC_MSG_RESULT(no)
|
||||
echo
|
||||
echo "The GCC 'nested functions' feature does not seem to be working on"
|
||||
echo "this machine. "
|
||||
echo "Read the bug-report instructions in the GCC texinfo manual"
|
||||
echo "and submit a bug report."
|
||||
echo "I'm not even sure gstep-base uses nested functions anymore"
|
||||
echo "but if it does, gstep-base will not compile. Try it"
|
||||
echo "The program this configure script used to test nested functions"
|
||||
echo "can be found in the file 'config/config.nested.c'"
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
#----------------------------------------------------------------
|
||||
# Find out if we're on a NEXTSTEP machine
|
||||
#----------------------------------------------------------------
|
||||
AC_MSG_CHECKING(whether we are running under NEXTSTEP)
|
||||
AC_TRY_CPP([#if defined(NeXT)
|
||||
#error
|
||||
#endif], NeXTSTEP=0, NeXTSTEP=1)
|
||||
if test $NeXTSTEP = 0; then
|
||||
AC_MSG_RESULT(no)
|
||||
NeXT_cc=0
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
#----------------------------------------------------------------
|
||||
# Find out if we are using NeXT or GNU runtime
|
||||
#----------------------------------------------------------------
|
||||
saved_ac_ext=$ac_ext
|
||||
ac_ext=m
|
||||
AC_MSG_CHECKING(whether we are using GNU Objective C runtime)
|
||||
AC_TRY_LINK([#include "$srcdir/config/config.nextrt.m"], ;,
|
||||
NeXT_RUNTIME=1, NeXT_RUNTIME=0)
|
||||
ac_ext=$saved_ac_ext
|
||||
if test $NeXT_RUNTIME = 1; then
|
||||
AC_MSG_RESULT(no: NeXT runtime)
|
||||
LIBOBJC=''
|
||||
CPPFLAGS="$CPPFLAGS -fnext-runtime -DNeXT_RUNTIME"
|
||||
NeXT_cc=0
|
||||
else
|
||||
AC_MSG_RESULT(yes)
|
||||
LIBOBJC='-lobjc'
|
||||
CPPFLAGS="$CPPFLAGS -fgnu-runtime"
|
||||
NeXT_cc=0
|
||||
fi
|
||||
fi
|
||||
|
||||
#----------------------------------------------------------------
|
||||
# Find out if nested functions work on this machine
|
||||
#----------------------------------------------------------------
|
||||
AC_MSG_CHECKING(whether nested functions work)
|
||||
AC_TRY_RUN([#include "$srcdir/config/config.nested.c"],
|
||||
gcc_nested=1, gcc_nested=0, gcc_nested=1)
|
||||
if test $gcc_nested = 0; then
|
||||
AC_MSG_RESULT(no)
|
||||
echo
|
||||
echo "The GCC 'nested functions' feature does not seem to be working on"
|
||||
echo "this machine. "
|
||||
echo "Read the bug-report instructions in the GCC texinfo manual"
|
||||
echo "and submit a bug report."
|
||||
echo "I'm not even sure gstep-base uses nested functions anymore"
|
||||
echo "but if it does, gstep-base will not compile. Try it"
|
||||
echo "The program this configure script used to test nested functions"
|
||||
echo "can be found in the file 'config/config.nested.c'"
|
||||
else
|
||||
AC_MSG_ERROR(Sorry, $(LIBRARY_NAME) does not work with NeXT's cc; use gcc)
|
||||
AC_MSG_RESULT(yes)
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Set Apple/Darwin/OSX/NeXT information for other tests
|
||||
#--------------------------------------------------------------------
|
||||
OBJC_RUNTIME_LIB=`echo $LIBRARY_COMBO | tr '-' ' ' | awk '{print $1}'`
|
||||
AC_MSG_CHECKING(the Objective-C runtime)
|
||||
if test "$OBJC_RUNTIME_LIB" = "nx"; then
|
||||
AC_MSG_RESULT(NeXT)
|
||||
LIBOBJC=''
|
||||
CPPFLAGS="$CPPFLAGS -fnext-runtime -DNeXT_RUNTIME"
|
||||
else
|
||||
AC_MSG_RESULT(GNU)
|
||||
LIBOBJC='-lobjc'
|
||||
CPPFLAGS="$CPPFLAGS -fgnu-runtime"
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(NeXT_cc, $NeXT_cc)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Miscellaneous flags
|
||||
|
|
Loading…
Reference in a new issue