summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2003-09-20 10:47:47 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2003-09-20 10:47:47 (GMT)
commit519adae1c10ac8d15e79668f696d4bfaf81cbf8c (patch)
treeb2bf49446b25489e15d2b8b321a3263dc6817bf7 /configure.in
parent1836781faee7628f9ebb2427470f3b34042dd4f8 (diff)
downloadcpython-519adae1c10ac8d15e79668f696d4bfaf81cbf8c.zip
cpython-519adae1c10ac8d15e79668f696d4bfaf81cbf8c.tar.gz
cpython-519adae1c10ac8d15e79668f696d4bfaf81cbf8c.tar.bz2
Patch #805604: Do not check for sem_init, do not use -Kthread,
if configured --without-threads. Backported to 2.3.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in26
1 files changed, 19 insertions, 7 deletions
diff --git a/configure.in b/configure.in
index 78ccfe1..bf11b92 100644
--- a/configure.in
+++ b/configure.in
@@ -875,7 +875,7 @@ ac_save_cxx="$CXX"
if test "$ac_cv_kpthread" = "yes"
then
- CXX="$CXX -Kpthread"
+ CXX="$CXX -Kpthread"
ac_cv_cxx_thread=yes
elif test "$ac_cv_kthread" = "yes"
then
@@ -897,13 +897,11 @@ then
ac_cv_cxx_thread=yes
else
ac_cv_cxx_thread=no
- CXX="$ac_save_cxx"
fi
rm -fr conftest*
-else
- CXX="$ac_save_cxx"
fi
fi
+CXX="$ac_save_cxx"
AC_MSG_RESULT($ac_cv_cxx_thread)
dnl # check for ANSI or K&R ("traditional") preprocessor
@@ -1422,9 +1420,14 @@ AC_MSG_RESULT($SHLIBS)
# checks for libraries
AC_CHECK_LIB(dl, dlopen) # Dynamic linking for SunOS/Solaris and SYSV
AC_CHECK_LIB(dld, shl_load) # Dynamic linking for HP-UX
-AC_SEARCH_LIBS(sem_init, pthread rt posix4) # 'Real Time' functions on Solaris
- # posix4 on Solaris 2.6
- # pthread (first!) on Linux
+
+# only check for sem_ini if thread support is requested
+if test "$with_threads" = "yes" -o -z "$with_threads"; then
+ AC_SEARCH_LIBS(sem_init, pthread rt posix4) # 'Real Time' functions on Solaris
+ # posix4 on Solaris 2.6
+ # pthread (first!) on Linux
+fi
+
# check if we need libintl for locale functions
AC_CHECK_LIB(intl, textdomain,
AC_DEFINE(WITH_LIBINTL, 1,
@@ -1542,18 +1545,27 @@ then
elif test "$ac_cv_kpthread" = "yes"
then
CC="$CC -Kpthread"
+ if test "$ac_cv_cxx_thread" = "yes"; then
+ CXX="$CXX -Kpthread"
+ fi
AC_DEFINE(WITH_THREAD)
posix_threads=yes
THREADOBJ="Python/thread.o"
elif test "$ac_cv_kthread" = "yes"
then
CC="$CC -Kthread"
+ if test "$ac_cv_cxx_thread" = "yes"; then
+ CXX="$CXX -Kthread"
+ fi
AC_DEFINE(WITH_THREAD)
posix_threads=yes
THREADOBJ="Python/thread.o"
elif test "$ac_cv_pthread" = "yes"
then
CC="$CC -pthread"
+ if test "$ac_cv_cxx_thread" = "yes"; then
+ CXX="$CXX -pthread"
+ fi
AC_DEFINE(WITH_THREAD)
posix_threads=yes
THREADOBJ="Python/thread.o"