Thread support is turned on my default now. To disable building

threads use --without-threads.  No extra tests of thread/compiler
combinations have been added.

--with(out)-thread and --with(out)-threads are completely
interchangeable.

--with-threads still supports the =DIRECTORY option for specifying
where to find thread libraries.
This commit is contained in:
Barry Warsaw 2000-06-29 16:12:00 +00:00
parent 3937c8a738
commit c0d24d8bbf
3 changed files with 542 additions and 542 deletions

View File

@ -285,6 +285,9 @@
/* Define if you have the fork function. */
#undef HAVE_FORK
/* Define if you have the forkpty function. */
#undef HAVE_FORKPTY
/* Define if you have the fpathconf function. */
#undef HAVE_FPATHCONF
@ -366,6 +369,9 @@
/* Define if you have the nice function. */
#undef HAVE_NICE
/* Define if you have the openpty function. */
#undef HAVE_OPENPTY
/* Define if you have the pathconf function. */
#undef HAVE_PATHCONF
@ -483,6 +489,9 @@
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define if you have the <libutil.h> header file. */
#undef HAVE_LIBUTIL_H
/* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
@ -498,6 +507,9 @@
/* Define if you have the <pthread.h> header file. */
#undef HAVE_PTHREAD_H
/* Define if you have the <pty.h> header file. */
#undef HAVE_PTY_H
/* Define if you have the <signal.h> header file. */
#undef HAVE_SIGNAL_H

920
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -13,7 +13,7 @@ if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices
AC_MSG_CHECKING(for --with-next-archs)
AC_ARG_WITH(next-archs,
[--with-next-archs='arch1 arch2 ..' build MAB binary], [
[ --with-next-archs='arch1 arch2 ..' build MAB binary], [
if test -n "$withval"; then
ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
# GCC does not currently support multi archs on the NeXT
@ -33,9 +33,9 @@ if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices
fi
AC_ARG_WITH(next-framework,
[--with-next-framework Build (OpenStep|Rhapsody|MacOS10) framework],,)
AC_ARG_WITH(dyld,
[--with-dyld Use (OpenStep|Rhapsody|MacOS10) dynamic linker],,)
[ --with-next-framework Build (OpenStep|Rhapsody|MacOSX) framework],,)
AC_ARG_WITH(dyld,
[ --with-dyld Use (OpenStep|Rhapsody|MacOSX) dynamic linker],,)
# Set name for machine-dependent library files
AC_SUBST(MACHDEP)
@ -99,7 +99,7 @@ AC_MSG_RESULT($MACHDEP)
# checks for alternative programs
AC_MSG_CHECKING(for --without-gcc)
AC_ARG_WITH(gcc, [--without-gcc never use gcc], [
AC_ARG_WITH(gcc, [ --without-gcc never use gcc], [
case $withval in
no) CC=cc
without_gcc=yes;;
@ -156,7 +156,7 @@ AC_SUBST(SET_CXX)
AC_SUBST(MAINOBJ)
MAINOBJ=python.o
AC_MSG_CHECKING(for --with-cxx=<compiler>)
AC_ARG_WITH(cxx, [--with-cxx=<compiler> enable C++ support],[
AC_ARG_WITH(cxx, [ --with-cxx=<compiler> enable C++ support],[
case $withval in
no) CXX=
with_cxx=no;;
@ -612,26 +612,27 @@ AC_CHECK_LIB(net, socket, [LIBS="-lnet $LIBS"], [], $LIBS) # BeOS
esac
AC_MSG_CHECKING(for --with-libs)
AC_ARG_WITH(libs, [--with-libs='lib1 ...' link against additional libs], [
AC_ARG_WITH(libs,
[ --with-libs='lib1 ...' link against additional libs], [
AC_MSG_RESULT($withval)
LIBS="$withval $LIBS"
], AC_MSG_RESULT(no))
AC_MSG_CHECKING(for --with(out)-readline)
AC_ARG_WITH(readline,
[--with(out)-readline obsolete, edit Modules/Setup instead],
[ --with(out)-readline obsolete, edit Modules/Setup instead],
[AC_MSG_RESULT($withval)
AC_ERROR(--with(out)-readline is obsolete, edit Modules/Setup instead)],
[AC_MSG_RESULT(not specified.)])
AC_SUBST(USE_THREAD_MODULE)
USE_THREAD_MODULE="#"
USE_THREAD_MODULE=""
AC_MSG_CHECKING(for --with-dec-threads)
AC_SUBST(LDLAST)
AC_ARG_WITH(dec-threads,
[--with-dec-threads use DEC Alpha/OSF1 thread-safe libraries],
[AC_MSG_RESULT($withval)
[ --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries], [
AC_MSG_RESULT($withval)
LDLAST=-threads
if test "${with_thread+set}" != set; then
with_thread="$withval";
@ -639,70 +640,78 @@ fi],
AC_MSG_RESULT(no))
AC_MSG_CHECKING(for --with-threads)
AC_ARG_WITH(threads, [--with-threads alias for --with-thread],
[AC_MSG_RESULT($withval)
if test "${with_thread+set}" != set; then
with_thread="$withval";
fi],
AC_MSG_RESULT(no))
AC_ARG_WITH(threads,
[ --with(out)-threads[=DIRECTORY] disable/enable thread support])
AC_MSG_CHECKING(for --with-thread)
AC_ARG_WITH(thread, [--with-thread[=DIRECTORY] make interpreter thread-safe], [
USE_THREAD_MODULE=
AC_MSG_RESULT($withval)
if test -d "$withval"
then LDFLAGS="$LDFLAGS -L$withval"
# --with-thread is deprecated, but check for it anyway
AC_ARG_WITH(thread,,[with_threads=$with_thread])
if test -z "$with_threads"
then with_threads="yes"
fi
AC_DEFINE(_REENTRANT)
AC_CHECK_HEADER(mach/cthreads.h, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(C_THREADS)
LIBOBJS="$LIBOBJS thread.o"],[
AC_CHECK_LIB(pth, pth_init, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(_GNU_PTH)
LIBS="-lpth $LIBS"
LIBOBJS="$LIBOBJS thread.o"],[
AC_CHECK_LIB(pthread, pthread_create, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(_POSIX_THREADS)
LIBS="-lpthread $LIBS"
LIBOBJS="$LIBOBJS thread.o"],[
AC_CHECK_FUNC(pthread_detach, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(_POSIX_THREADS)
LIBOBJS="$LIBOBJS thread.o"],[
AC_CHECK_HEADER(kernel/OS.h, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(BEOS_THREADS)
LIBOBJS="$LIBOBJS thread.o"],[
AC_CHECK_LIB(pthreads, pthread_create, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(_POSIX_THREADS)
LIBS="$LIBS -lpthreads"
LIBOBJS="$LIBOBJS thread.o"], [
AC_CHECK_LIB(c_r, pthread_create, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(_POSIX_THREADS)
LIBS="$LIBS -lc_r"
LIBOBJS="$LIBOBJS thread.o"], [
AC_CHECK_LIB(thread, __d6_pthread_create, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(_POSIX_THREADS)
LIBS="$LIBS -lthread"
LIBOBJS="$LIBOBJS thread.o"], [
AC_CHECK_LIB(cma, pthread_create, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(_POSIX_THREADS)
LIBS="$LIBS -lcma"
LIBOBJS="$LIBOBJS thread.o"])
])])])])])])])])
AC_MSG_RESULT($with_threads)
AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD)
LIBS="$LIBS -lmpc"
LIBOBJS="$LIBOBJS thread.o"])
AC_CHECK_LIB(thread, thr_create, [AC_DEFINE(WITH_THREAD)
LIBS="$LIBS -lthread"
LIBOBJS="$LIBOBJS thread.o"])
], AC_MSG_RESULT(no))
if test "$with_threads" = "no"
then
USE_THREAD_MODULE="#"
else
if test -d "$with_threads"
then LDFLAGS="$LDFLAGS -L$with_threads"
fi
if test -d "$withval"
then LDFLAGS="$LDFLAGS -L$withval"
fi
AC_DEFINE(_REENTRANT)
AC_CHECK_HEADER(mach/cthreads.h, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(C_THREADS)
LIBOBJS="$LIBOBJS thread.o"],[
AC_CHECK_LIB(pth, pth_init, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(_GNU_PTH)
LIBS="-lpth $LIBS"
LIBOBJS="$LIBOBJS thread.o"],[
AC_CHECK_LIB(pthread, pthread_create, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(_POSIX_THREADS)
LIBS="-lpthread $LIBS"
LIBOBJS="$LIBOBJS thread.o"],[
AC_CHECK_FUNC(pthread_detach, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(_POSIX_THREADS)
LIBOBJS="$LIBOBJS thread.o"],[
AC_CHECK_HEADER(kernel/OS.h, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(BEOS_THREADS)
LIBOBJS="$LIBOBJS thread.o"],[
AC_CHECK_LIB(pthreads, pthread_create, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(_POSIX_THREADS)
LIBS="$LIBS -lpthreads"
LIBOBJS="$LIBOBJS thread.o"], [
AC_CHECK_LIB(c_r, pthread_create, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(_POSIX_THREADS)
LIBS="$LIBS -lc_r"
LIBOBJS="$LIBOBJS thread.o"], [
AC_CHECK_LIB(thread, __d6_pthread_create, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(_POSIX_THREADS)
LIBS="$LIBS -lthread"
LIBOBJS="$LIBOBJS thread.o"], [
AC_CHECK_LIB(cma, pthread_create, [AC_DEFINE(WITH_THREAD)
AC_DEFINE(_POSIX_THREADS)
LIBS="$LIBS -lcma"
LIBOBJS="$LIBOBJS thread.o"])
])])])])])])])])
AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD)
LIBS="$LIBS -lmpc"
LIBOBJS="$LIBOBJS thread.o"])
AC_CHECK_LIB(thread, thr_create, [AC_DEFINE(WITH_THREAD)
LIBS="$LIBS -lthread"
LIBOBJS="$LIBOBJS thread.o"])
fi
# -I${DLINCLDIR} is added to the compile rule for importdl.o
AC_SUBST(DLINCLDIR)
DLINCLDIR=/
AC_MSG_CHECKING(for --with-sgi-dl)
AC_ARG_WITH(sgi-dl, [--with-sgi-dl=DIRECTORY IRIX 4 dynamic linking], [
AC_ARG_WITH(sgi-dl,
[ --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking], [
AC_MSG_RESULT($withval)
AC_DEFINE(WITH_SGI_DL)
DYNLOADFILE="dynload_dl.o"
@ -715,7 +724,7 @@ DLINCLDIR=${dldir}
LIBS="$LIBS -ldl -lmld"], AC_MSG_RESULT(no))
AC_MSG_CHECKING(for --with-dl-dld)
AC_ARG_WITH(dl-dld, [--with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking], [
AC_ARG_WITH(dl-dld, [ --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking], [
AC_MSG_RESULT($withval)
AC_DEFINE(WITH_DL_DLD)
DYNLOADFILE="dynload_dl.o"
@ -958,7 +967,8 @@ AC_CHECK_LIB(ieee, __fpu_control)
# Check for --with-fpectl
AC_MSG_CHECKING(for --with-fpectl)
AC_ARG_WITH(fpectl, [--with-fpectl enable SIGFPE catching], [
AC_ARG_WITH(fpectl,
[ --with-fpectl enable SIGFPE catching], [
if test "$withval" != no
then AC_DEFINE(WANT_SIGFPE_HANDLER) AC_MSG_RESULT(yes)
else AC_MSG_RESULT(no)
@ -973,7 +983,7 @@ BeOS) ;;
*) LIBM=-lm
esac
AC_MSG_CHECKING(for --with-libm=STRING)
AC_ARG_WITH(libm, [--with-libm=STRING math library], [
AC_ARG_WITH(libm, [ --with-libm=STRING math library], [
if test "$withval" = no
then LIBM=
AC_MSG_RESULT(force LIBM empty)
@ -987,7 +997,7 @@ fi],
# check for --with-libc=...
AC_SUBST(LIBC)
AC_MSG_CHECKING(for --with-libc=STRING)
AC_ARG_WITH(libc, [--with-libc=STRING C library], [
AC_ARG_WITH(libc, [ --with-libc=STRING C library], [
if test "$withval" = no
then LIBC=
AC_MSG_RESULT(force LIBC empty)
@ -1082,7 +1092,7 @@ AC_C_BIGENDIAN
# Check for --with-wctype-functions
AC_MSG_CHECKING(for --with-wctype-functions)
AC_ARG_WITH(wctype-functions,
[--with-wctype-functions use wctype.h functions], [
[ --with-wctype-functions use wctype.h functions], [
if test "$withval" != no
then AC_DEFINE(WANT_WCTYPE_FUNCTIONS) AC_MSG_RESULT(yes)
else AC_MSG_RESULT(no)