*** empty log message ***

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2359 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Scott Christley 1997-07-08 18:41:13 +00:00
parent 9dd614a626
commit 6d89ea0b85
3 changed files with 92 additions and 35 deletions

16
aclocal.m4 vendored
View file

@ -164,6 +164,7 @@ dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_C_CROSS])dnl
AC_MSG_CHECKING(for the Foundation library)
OBJC_LIBS=
AC_CACHE_VAL(ac_cv_foundation_library,
[AC_LANG_SAVE[]dnl
AC_LANG_OBJECTIVE_C[]
@ -205,19 +206,19 @@ case "$FOUNDATION_LIBRARY" in
# restore the value of prefix
prefix=$old_prefix
LIBS="$LIBS -lFoundation_s";
OBJC_LIBS="-lFoundation_s";
AC_DEFINE(NeXT_foundation_LIBRARY);;
libobjects)
LIBS="$LIBS -lobjects"
OBJC_LIBS="-lobjects"
AC_DEFINE(GNUSTEP_BASE_LIBRARY);;
gnustep-base)
LIBS="$LIBS -lgnustep-base"
OBJC_LIBS="-lgnustep-base"
AC_DEFINE(GNUSTEP_BASE_LIBRARY);;
libFoundation)
if test "$FOUNDATION_LIB" = ""; then
FOUNDATION_LIB=Foundation
fi
LIBS="-l${FOUNDATION_LIB} $LIBS"
OBJC_LIBS="-l${FOUNDATION_LIB}"
AC_DEFINE(LIB_FOUNDATION_LIBRARY);;
*)
AC_MSG_ERROR(Unknown $FOUNDATION_LIBRARY library!);;
@ -246,13 +247,15 @@ AC_CACHE_VAL(ac_cv_objc_runtime,
], ac_cv_objc_runtime=NeXT, ac_cv_objc_runtime=unknown)
if test $ac_cv_objc_runtime = unknown; then
OBJC_RUNTIME_FLAG=-fgnu-runtime
LIBS="$LIBS -lobjc"
saved_LIBS=$LIBS
LIBS="$OBJC_LIBS -lobjc $LIBS"
AC_TRY_LINK([#include <Foundation/NSString.h>
#include <objc/objc-api.h>],
[id class = objc_lookup_class("NSObject");
id obj = [class alloc];
puts([[obj description] cString]);
], ac_cv_objc_runtime=GNU, ac_cv_objc_runtime=unknown)
LIBS=$saved_LIBS
fi
AC_LANG_RESTORE[]
fi
@ -262,7 +265,7 @@ if test "`echo ${OBJC_RUNTIME} | tr a-z A-Z`" = "GNU"; then
OBJC_RUNTIME=GNU
OBJC_RUNTIME_FLAG=-fgnu-runtime
ac_cv_objc_runtime=GNU
LIBS="$LIBS -lobjc"
OBJC_LIBS="$OBJC_LIBS -lobjc"
AC_DEFINE(GNU_RUNTIME)
elif test "`echo ${OBJC_RUNTIME} | tr a-z A-Z`" = "NEXT"; then
OBJC_RUNTIME=NeXT
@ -280,4 +283,5 @@ to specify some additional libraries needed to link an ObjC program, so please
take a look in the config.log file to see the reason and try again.])
fi
AC_MSG_RESULT(${ac_cv_objc_runtime})
LIBS="$OBJC_LIBS $LIBS"
])dnl

107
configure vendored
View file

@ -1194,14 +1194,14 @@ else
echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
echo "configure:1199: checking for pthread_create in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
echo $ac_n "checking for pthread_create in -lpcthread""... $ac_c" 1>&6
echo "configure:1199: checking for pthread_create in -lpcthread" >&5
ac_lib_var=`echo pcthread'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
LIBS="-lpcthread $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1207 "configure"
#include "confdefs.h"
@ -1229,7 +1229,52 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \
ac_tr_lib=HAVE_LIB`echo pcthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
LIBS="-lpcthread $LIBS"
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
echo "configure:1244: checking for pthread_create in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1252 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char pthread_create();
int main() {
pthread_create()
; return 0; }
EOF
if { (eval echo configure:1263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/^a-zA-Z0-9_/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
@ -1241,8 +1286,10 @@ else
echo "$ac_t""no" 1>&6
fi
fi
echo $ac_n "checking for sqrt in -lm""... $ac_c" 1>&6
echo "configure:1246: checking for sqrt in -lm" >&5
echo "configure:1293: checking for sqrt in -lm" >&5
ac_lib_var=`echo m'_'sqrt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1250,7 +1297,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lm $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1254 "configure"
#line 1301 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -1261,7 +1308,7 @@ int main() {
sqrt()
; return 0; }
EOF
if { (eval echo configure:1265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:1312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -1292,7 +1339,8 @@ fi
# Determine the Foundation library
echo $ac_n "checking for the Foundation library""... $ac_c" 1>&6
echo "configure:1296: checking for the Foundation library" >&5
echo "configure:1343: checking for the Foundation library" >&5
OBJC_LIBS=
if eval "test \"`echo '$''{'ac_cv_foundation_library'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1303,7 +1351,7 @@ ac_compile='${CC-cc} -c $OBJC_RUNTIME_FLAG $CFLAGS conftest.$ac_ext 1>&5 2>&5'
ac_link='${CC-cc} -o conftest $OBJC_RUNTIME_FLAG $CFLAGS $LDFLAGS conftest.$ac_ext $LIBS $OBJC_LIBS 1>&5 2>&5'
cat > conftest.$ac_ext <<EOF
#line 1307 "configure"
#line 1355 "configure"
#include "confdefs.h"
#include <Foundation/preface.h>
@ -1311,7 +1359,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:1315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_foundation_library="$ac_cv_foundation_library gnustep-base"
else
@ -1320,7 +1368,7 @@ else
fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
#line 1324 "configure"
#line 1372 "configure"
#include "confdefs.h"
#include <Foundation/exceptions/FoundationException.h>
@ -1328,7 +1376,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:1332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_foundation_library="$ac_cv_foundation_library libFoundation"
else
@ -1337,7 +1385,7 @@ else
fi
rm -f conftest*
cat > conftest.$ac_ext <<EOF
#line 1341 "configure"
#line 1389 "configure"
#include "confdefs.h"
#include <objects/stdobjects.h>
@ -1345,7 +1393,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:1349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_foundation_library="$ac_cv_foundation_library libobjects"
else
@ -1361,13 +1409,13 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
cross_compiling=$ac_cv_prog_cc_cross
if test "$FOUNDATION" = ""; then
cat > conftest.$ac_ext <<EOF
#line 1365 "configure"
#line 1413 "configure"
#include "confdefs.h"
#include <foundation/NSObject.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -1400,19 +1448,19 @@ case "$FOUNDATION_LIBRARY" in
# restore the value of prefix
prefix=$old_prefix
LIBS="$LIBS -lFoundation_s";
OBJC_LIBS="-lFoundation_s";
cat >> confdefs.h <<\EOF
#define NeXT_foundation_LIBRARY 1
EOF
;;
libobjects)
LIBS="$LIBS -lobjects"
OBJC_LIBS="-lobjects"
cat >> confdefs.h <<\EOF
#define GNUSTEP_BASE_LIBRARY 1
EOF
;;
gnustep-base)
LIBS="$LIBS -lgnustep-base"
OBJC_LIBS="-lgnustep-base"
cat >> confdefs.h <<\EOF
#define GNUSTEP_BASE_LIBRARY 1
EOF
@ -1421,7 +1469,7 @@ EOF
if test "$FOUNDATION_LIB" = ""; then
FOUNDATION_LIB=Foundation
fi
LIBS="-l${FOUNDATION_LIB} $LIBS"
OBJC_LIBS="-l${FOUNDATION_LIB}"
cat >> confdefs.h <<\EOF
#define LIB_FOUNDATION_LIBRARY 1
EOF
@ -1431,7 +1479,7 @@ EOF
esac
echo "$ac_t""${ac_cv_foundation_library}" 1>&6
echo $ac_n "checking for the Objective-C runtime""... $ac_c" 1>&6
echo "configure:1435: checking for the Objective-C runtime" >&5
echo "configure:1483: checking for the Objective-C runtime" >&5
if eval "test \"`echo '$''{'ac_cv_objc_runtime'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1443,7 +1491,7 @@ ac_compile='${CC-cc} -c $OBJC_RUNTIME_FLAG $CFLAGS conftest.$ac_ext 1>&5 2>&5'
ac_link='${CC-cc} -o conftest $OBJC_RUNTIME_FLAG $CFLAGS $LDFLAGS conftest.$ac_ext $LIBS $OBJC_LIBS 1>&5 2>&5'
cat > conftest.$ac_ext <<EOF
#line 1447 "configure"
#line 1495 "configure"
#include "confdefs.h"
#include <Foundation/NSString.h>
int main() {
@ -1454,7 +1502,7 @@ extern id objc_lookUpClass(char*);
; return 0; }
EOF
if { (eval echo configure:1458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:1506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_objc_runtime=NeXT
else
@ -1466,9 +1514,10 @@ fi
rm -f conftest*
if test $ac_cv_objc_runtime = unknown; then
OBJC_RUNTIME_FLAG=-fgnu-runtime
LIBS="$LIBS -lobjc"
saved_LIBS=$LIBS
LIBS="$OBJC_LIBS -lobjc $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1472 "configure"
#line 1521 "configure"
#include "confdefs.h"
#include <Foundation/NSString.h>
#include <objc/objc-api.h>
@ -1479,7 +1528,7 @@ id class = objc_lookup_class("NSObject");
; return 0; }
EOF
if { (eval echo configure:1483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:1532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_objc_runtime=GNU
else
@ -1489,6 +1538,7 @@ else
ac_cv_objc_runtime=unknown
fi
rm -f conftest*
LIBS=$saved_LIBS
fi
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@ -1505,7 +1555,7 @@ if test "`echo ${OBJC_RUNTIME} | tr a-z A-Z`" = "GNU"; then
OBJC_RUNTIME=GNU
OBJC_RUNTIME_FLAG=-fgnu-runtime
ac_cv_objc_runtime=GNU
LIBS="$LIBS -lobjc"
OBJC_LIBS="$OBJC_LIBS -lobjc"
cat >> confdefs.h <<\EOF
#define GNU_RUNTIME 1
EOF
@ -1529,6 +1579,7 @@ to specify some additional libraries needed to link an ObjC program, so please
take a look in the config.log file to see the reason and try again." 1>&2; exit 1; }
fi
echo "$ac_t""${ac_cv_objc_runtime}" 1>&6
LIBS="$OBJC_LIBS $LIBS"

View file

@ -93,7 +93,9 @@ AC_SUBST(config_include)
# Checking for some additional libraries we might need
AC_CHECK_LIB(dl, dlopen)
AC_CHECK_LIB(pthread, pthread_create)
AC_CHECK_LIB(pcthread, pthread_create,
,
AC_CHECK_LIB(pthread, pthread_create))
AC_CHECK_LIB(m, sqrt)
# Determine the Foundation library