mirror of
https://github.com/python/cpython
synced 2024-09-16 00:07:33 +00:00
Three changes:
- Improved version of NeXT patching of $OPT - Added new option --with-libs='lib1 lib2 ...' - Define _REENTRANT when posix threads are in use
This commit is contained in:
parent
bed23fe1ce
commit
c5a3903472
18
configure.in
18
configure.in
|
@ -90,16 +90,15 @@ AC_SUBST(OPT)
|
||||||
if test -z "$OPT"
|
if test -z "$OPT"
|
||||||
then
|
then
|
||||||
case $ac_sys_system in
|
case $ac_sys_system in
|
||||||
NeXT|next) \
|
NeXT|next) OPT="-g -Wall -O3 -fomit-frame-pointer";;
|
||||||
if test -n "$ac_arch_flags"; then
|
|
||||||
OPT="-g -Wall -O3 -fomit-frame-pointer $ac_arch_flags";
|
|
||||||
else
|
|
||||||
OPT="-g -Wall -O3 -fomit-frame-pointer";
|
|
||||||
fi;;
|
|
||||||
*) OPT="-O";;
|
*) OPT="-O";;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test -z "$ac_arch_flags"
|
||||||
|
then
|
||||||
|
OPT="$OPT $ac_arch_flags"
|
||||||
|
fi
|
||||||
# checks for UNIX variants that set C preprocessor variables
|
# checks for UNIX variants that set C preprocessor variables
|
||||||
AC_AIX
|
AC_AIX
|
||||||
AC_MINIX
|
AC_MINIX
|
||||||
|
@ -205,6 +204,11 @@ AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
|
||||||
AC_CHECK_LIB(inet, gethostbyname, [LIBS="-linet $LIBS"], [], -lnsl) # Sequent
|
AC_CHECK_LIB(inet, gethostbyname, [LIBS="-linet $LIBS"], [], -lnsl) # Sequent
|
||||||
AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets
|
AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets
|
||||||
fi
|
fi
|
||||||
|
AC_MSG_CHECKING(for --with-libs)
|
||||||
|
AC_ARG_WITH(libs, [--with-libs='lib1 ...' link against additional libs], [
|
||||||
|
AC_MSG_RESULT($withval)
|
||||||
|
LIBS="$withval $LIBS"
|
||||||
|
], AC_MSG_RESULT(no))
|
||||||
|
|
||||||
# XXX need to check whether libreadline.a actually exists there!
|
# XXX need to check whether libreadline.a actually exists there!
|
||||||
# XXX Also, on some systems, it's libreadline.so...
|
# XXX Also, on some systems, it's libreadline.so...
|
||||||
|
@ -242,10 +246,12 @@ AC_DEFINE(C_THREADS)
|
||||||
LIBOBJS="$LIBOBJS thread.o"],[
|
LIBOBJS="$LIBOBJS thread.o"],[
|
||||||
AC_CHECK_LIB(pthreads, pthread_create, [AC_DEFINE(WITH_THREAD)
|
AC_CHECK_LIB(pthreads, pthread_create, [AC_DEFINE(WITH_THREAD)
|
||||||
AC_DEFINE(_POSIX_THREADS)
|
AC_DEFINE(_POSIX_THREADS)
|
||||||
|
AC_DEFINE(_REENTRANT)
|
||||||
LIBS="$LIBS -lpthreads"
|
LIBS="$LIBS -lpthreads"
|
||||||
LIBOBJS="$LIBOBJS thread.o"], [
|
LIBOBJS="$LIBOBJS thread.o"], [
|
||||||
AC_CHECK_LIB(pthread, pthread_create, [AC_DEFINE(WITH_THREAD)
|
AC_CHECK_LIB(pthread, pthread_create, [AC_DEFINE(WITH_THREAD)
|
||||||
AC_DEFINE(_POSIX_THREADS)
|
AC_DEFINE(_POSIX_THREADS)
|
||||||
|
AC_DEFINE(_REENTRANT)
|
||||||
LIBS="$LIBS -lpthread"
|
LIBS="$LIBS -lpthread"
|
||||||
LIBOBJS="$LIBOBJS thread.o"])
|
LIBOBJS="$LIBOBJS thread.o"])
|
||||||
])])
|
])])
|
||||||
|
|
Loading…
Reference in a new issue