pike.git/
src/
configure.in
Branch:
Tag:
Non-build tags
All tags
No tags
1997-01-26
1997-01-26 23:46:13 by Henrik Grubbström (Grubba) <grubba@grubba.org>
50b039bae8b74b9bf147cd7163d917386c74ef14 (
116
lines) (+
66
/-
50
)
[
Show
|
Annotate
]
Branch:
7.9
Added test for sproc-style threads.
Rev: src/configure.in:1.47
1:
-
AC_REVISION("$Id: configure.in,v 1.
46
1997/01/26
22
:
47
:
50
per
Exp $")
+
AC_REVISION("$Id: configure.in,v 1.
47
1997/01/26
23
:
46
:
13
grubba
Exp $")
AC_INIT(interpret.c) AC_CONFIG_HEADER(machine.h)
154:
for test_path in . .. /lib /usr/lib .:.. /lib:/usr/lib; do if test x$ac_cv_prog_gcc ; then #
-
# On Linux -R apparently
only
causes
a
gcc
warning
otherwise
+
# On Linux -R apparently causes gcc
to
warn, but it doesn't fail,
+
# so we force the -R option to the linker.
# LDFLAGS="$OLD_LDFLAGS -Xlinker -R$test_path" AC_TRY_LINK([],[ exit(0); ],[],[ pike_cv_ld_accepts_r=no; break ])
414:
;; esac
-
AC_CACHE_VAL(pike_cv_unix_threads,
-
[
+
AC_CACHE_VAL(pike_cv_unix_threads,
[
AC_TRY_RUN([ #define _REENTRANT #define _THREAD_SAFE
438:
],pike_cv_unix_threads=yes,pike_cv_unix_threads=no) ])
-
if test
$pike
_cv_unix_threads =
yes
; then
+
if test
x$pike
_cv_unix_threads =
xyes
; then
AC_MSG_RESULT(yes) AC_DEFINE(_REENTRANT) AC_DEFINE(_THREAD_SAFE) AC_DEFINE(_UNIX_THREADS) else AC_MSG_RESULT(no)
-
LIBS="$OLDLIBS"
-
fi
+
-
if
test
$pike_cv_unix_threads
=
"no"
;
then
+
#
Test
for
POSIX threads instead
+
AC_MSG_CHECKING(posix threads)
-
OLDLIBS="$LIBS"
-
+
case "x$pike_cv_sys_os" in xOSF1)
-
LIBS="
${LIBS}
-lpthread -lmach -lexc -lc"
+
LIBS="
${OLDLIBS}
-lpthread -lmach -lexc -lc"
;; *)
-
LIBS="
${LIBS}
-lpthread"
+
LIBS="
${OLDLIBS}
-lpthread"
;; esac
-
AC_CACHE_VAL(pike_cv_posix_threads,
-
[
+
AC_CACHE_VAL(pike_cv_posix_threads, [
AC_TRY_RUN([ #define _REENTRANT #define _THREAD_SAFE
496:
else AC_MSG_RESULT(no) LIBS="$OLDLIBS"
-
fi
+
-
+
# Now we've sunk really low -- test for proprietary threads
+
+
# SGI old-style shared group processes
+
AC_CHECK_FUNCS(sproc oserror)
+
+
AC_MSG_CHECKING(Fallback to sproc)
+
+
if test x$ac_cv_func_sproc$ac_cv_func_oserror = xyesyes; then
+
AC_MSG_RESULT(yes)
+
AC_DEFINE(_REENTRANT)
+
AC_DEFINE(_THREAD_SAFE)
+
AC_DEFINE(_SGI_SPROC_THREADS)
+
else
+
AC_MSG_RESULT(no)
+
:
fi fi
-
+
fi
+
else
+
# Without threads
+
:
+
fi
########################################################################