mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 09:02:01 +00:00
Simplified code to get the threading flags - get them from make
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8691 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e59030fd14
commit
e7c6b56e8a
1 changed files with 11 additions and 49 deletions
60
configure.in
60
configure.in
|
@ -227,54 +227,16 @@ if test $ac_cv_header_objc_objc_h = no; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
# Check if libobjc was compiled with thread support.
|
# Check for thread flags for libobjc.
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
AC_MSG_CHECKING(whether objc has thread support)
|
#
|
||||||
saved_LIBS="$LIBS"
|
AC_MSG_CHECKING(for objc threading flags)
|
||||||
extra_LIBS=""
|
#
|
||||||
case "${target_os}" in
|
# Get them from gnustep-make which contains the real code to get them
|
||||||
solaris*)
|
#
|
||||||
extra_LIBS="-lposix4"
|
objc_threaded=`grep objc_threaded: $GNUSTEP_SYSTEM_ROOT/Makefiles/$obj_dir/config.make | sed -e 's/objc_threaded:=//'`
|
||||||
;;
|
#
|
||||||
esac
|
AC_MSG_RESULT($objc_threaded)
|
||||||
objc_thread_lib=""
|
|
||||||
if test $host_os = linux-gnu; then
|
|
||||||
LIBS="-lobjc -lpthread"
|
|
||||||
AC_TRY_RUN([#include "config/config_thread.m"], objc_threaded="-lpthread",
|
|
||||||
objc_threaded="", objc_threaded="-lpthread")
|
|
||||||
if test x"$objc_threaded" = x""; then
|
|
||||||
LIBS="-lobjc -lpcthread"
|
|
||||||
AC_TRY_RUN([#include "config/config_thread.m"], objc_threaded="-lpcthread",
|
|
||||||
objc_threaded="", objc_threaded="-lpcthread")
|
|
||||||
fi
|
|
||||||
elif test "`echo $host_os|sed 's/[[0-9]].*//'|sed s/elf//`" = freebsd; then
|
|
||||||
LIBS="-pthread -lobjc"
|
|
||||||
AC_TRY_RUN([#include "config/config_thread.m"], objc_threaded="-pthread",
|
|
||||||
objc_threaded="", objc_threaded="-pthread")
|
|
||||||
if test x"$objc_threaded" = x""; then
|
|
||||||
LIBS="-lpthread -lobjc"
|
|
||||||
AC_TRY_RUN([#include "config/config_thread.m"], objc_threaded="-lpthread",
|
|
||||||
objc_threaded="", objc_threaded="-lpthread")
|
|
||||||
fi
|
|
||||||
if test x"$objc_threaded" = x""; then
|
|
||||||
LIBS="-lobjc -lpcthread"
|
|
||||||
AC_TRY_RUN([#include "config/config_thread.m"], objc_threaded="-lpcthread",
|
|
||||||
objc_threaded="", objc_threaded="-lpcthread")
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
LIBS="-lobjc $LIBS $extra_LIBS"
|
|
||||||
AC_TRY_RUN([#include "config/config_thread.m"], objc_threaded="-lthread",
|
|
||||||
objc_threaded="", objc_threaded="-lthread")
|
|
||||||
fi
|
|
||||||
LIBS="$saved_LIBS"
|
|
||||||
if test x"$objc_threaded" = x""; then
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
fi
|
|
||||||
ac_cv_objc_threaded=$objc_threaded
|
|
||||||
AC_SUBST(objc_threaded)
|
|
||||||
AC_SUBST(ac_cv_objc_threaded)
|
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
# Byte order information needed for foundation headers.
|
# Byte order information needed for foundation headers.
|
||||||
|
@ -496,8 +458,8 @@ saved_LIBS="$LIBS"
|
||||||
saved_CPPFLAGS="$CPPFLAGS"
|
saved_CPPFLAGS="$CPPFLAGS"
|
||||||
LIBS="$LIBS -lobjc"
|
LIBS="$LIBS -lobjc"
|
||||||
CPPFLAGS="$CPPFLAGS -x objective-c"
|
CPPFLAGS="$CPPFLAGS -x objective-c"
|
||||||
if test x"$ac_cv_objc_threaded" != x""; then
|
if test x"$objc_threaded" != x""; then
|
||||||
LIBS="$LIBS $ac_cv_objc_threaded"
|
LIBS="$LIBS $objc_threaded"
|
||||||
fi
|
fi
|
||||||
LIBS="$LIBS $extra_LIBS"
|
LIBS="$LIBS $extra_LIBS"
|
||||||
AC_MSG_CHECKING(if +load method is executed before main)
|
AC_MSG_CHECKING(if +load method is executed before main)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue