mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-23 22:33:28 +00:00
Better thread testing
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@16871 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
dc2d4957fa
commit
244789c8b5
4 changed files with 23 additions and 16 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-06-05 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* config_thread.m: More complete thread test.
|
||||
* configure.ac: Add runtime based on RUNTIME_LIB
|
||||
|
||||
2003-06-03 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* target.make (darwin/BUNDLE_LD): Use libtool
|
||||
|
|
|
@ -7,11 +7,13 @@
|
|||
@end
|
||||
#endif
|
||||
|
||||
/* From thr.c */
|
||||
extern int __objc_init_thread_system(void);
|
||||
#include <objc/thr.h>
|
||||
#include <objc/Object.h>
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
return (__objc_init_thread_system());
|
||||
id o = [Object new];
|
||||
|
||||
return (objc_thread_detach (@selector(hash), o, nil) == NULL) ? -1 : 0;
|
||||
}
|
||||
|
|
14
configure
vendored
14
configure
vendored
|
@ -3803,6 +3803,9 @@ esac
|
|||
saved_CFLAGS="$CFLAGS"
|
||||
saved_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS -x objective-c -I$srcdir $OBJC_CPPFLAGS $OBJC_LDFLAGS"
|
||||
if test "$OBJC_RUNTIME_LIB" = "gnu"; then
|
||||
CFLAGS="$CFLAGS -fgnu-runtime"
|
||||
fi
|
||||
if test "$OBJC_RUNTIME_LIB" = "nx"; then
|
||||
CFLAGS="$CFLAGS -DNeXT_RUNTIME"
|
||||
fi
|
||||
|
@ -4019,7 +4022,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
objc_threaded="OK"
|
||||
objc_threaded="works"
|
||||
else
|
||||
echo "$as_me: program exited with status $ac_status" >&5
|
||||
echo "$as_me: failed program was:" >&5
|
||||
|
@ -4093,9 +4096,6 @@ fi
|
|||
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
fi
|
||||
if test x"$objc_threaded" = x"OK"; then
|
||||
objc_threaded="$extra_LIBS"
|
||||
fi
|
||||
fi
|
||||
LIBS="$saved_LIBS"
|
||||
CFLAGS="$saved_CFLAGS"
|
||||
|
@ -4103,11 +4103,11 @@ if test x"$objc_threaded" = x""; then
|
|||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
else
|
||||
if test x"$objc_threaded" = x"works"; then
|
||||
objc_threaded="$extra_LIBS"
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: yes: $objc_threaded" >&5
|
||||
echo "${ECHO_T}yes: $objc_threaded" >&6
|
||||
if test x"$objc_threaded" = x"works"; then
|
||||
objc_threaded=""
|
||||
fi
|
||||
fi
|
||||
ac_cv_objc_threaded="$objc_threaded"
|
||||
|
||||
|
|
12
configure.ac
12
configure.ac
|
@ -379,6 +379,9 @@ esac
|
|||
saved_CFLAGS="$CFLAGS"
|
||||
saved_LIBS="$LIBS"
|
||||
CFLAGS="$CFLAGS -x objective-c -I$srcdir $OBJC_CPPFLAGS $OBJC_LDFLAGS"
|
||||
if test "$OBJC_RUNTIME_LIB" = "gnu"; then
|
||||
CFLAGS="$CFLAGS -fgnu-runtime"
|
||||
fi
|
||||
if test "$OBJC_RUNTIME_LIB" = "nx"; then
|
||||
CFLAGS="$CFLAGS -DNeXT_RUNTIME"
|
||||
fi
|
||||
|
@ -417,7 +420,7 @@ elif test "$MINGW32" = yes; then
|
|||
else
|
||||
LIBS="-lobjc $LIBS $extra_LIBS"
|
||||
AC_TRY_RUN([#include "config_thread.m"],
|
||||
objc_threaded="OK",
|
||||
objc_threaded="works",
|
||||
objc_threaded="", objc_threaded="")
|
||||
if test x"$objc_threaded" = x""; then
|
||||
LIBS="-lobjc $saved_LIBS -lpthread $extra_LIBS"
|
||||
|
@ -431,19 +434,16 @@ else
|
|||
objc_threaded="-lthread $extra_LIBS",
|
||||
objc_threaded="", objc_threaded="")
|
||||
fi
|
||||
if test x"$objc_threaded" = x"OK"; then
|
||||
objc_threaded="$extra_LIBS"
|
||||
fi
|
||||
fi
|
||||
LIBS="$saved_LIBS"
|
||||
CFLAGS="$saved_CFLAGS"
|
||||
if test x"$objc_threaded" = x""; then
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
AC_MSG_RESULT(yes: $objc_threaded)
|
||||
if test x"$objc_threaded" = x"works"; then
|
||||
objc_threaded=""
|
||||
objc_threaded="$extra_LIBS"
|
||||
fi
|
||||
AC_MSG_RESULT(yes: $objc_threaded)
|
||||
fi
|
||||
ac_cv_objc_threaded="$objc_threaded"
|
||||
AC_SUBST(objc_threaded)
|
||||
|
|
Loading…
Reference in a new issue