]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Patch #805604: Do not check for sem_init, do not use -Kthread,
authorMartin v. Löwis <martin@v.loewis.de>
Sat, 20 Sep 2003 10:47:28 +0000 (10:47 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sat, 20 Sep 2003 10:47:28 +0000 (10:47 +0000)
if configured --without-threads.

configure
configure.in

index 4e714324051b6c097a640cc2660844bec52a44fc..3517e2c91b161d20ff2ae8c7c1b4f567c17cd35e 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 1.427.4.2 .
+# From configure.in Revision: 1.427.4.3 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.57 for python 2.3.
 #
@@ -4451,13 +4451,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"
 echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
 echo "${ECHO_T}$ac_cv_cxx_thread" >&6
 
@@ -10362,7 +10360,10 @@ _ACEOF
 
 fi
        # Dynamic linking for HP-UX
-echo "$as_me:$LINENO: checking for library containing sem_init" >&5
+
+# only check for sem_ini if thread support is requested
+if test "$with_threads" = "yes" -o -z "$with_threads"; then
+    echo "$as_me:$LINENO: checking for library containing sem_init" >&5
 echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
 if test "${ac_cv_search_sem_init+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10468,8 +10469,10 @@ if test "$ac_cv_search_sem_init" != no; then
 
 fi
  # 'Real Time' functions on Solaris
-                                           # posix4 on Solaris 2.6
-                                           # pthread (first!) on Linux
+                                               # posix4 on Solaris 2.6
+                                               # pthread (first!) on Linux
+fi
+
 # check if we need libintl for locale functions
 echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
 echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
@@ -10888,6 +10891,9 @@ _ACEOF
 elif test "$ac_cv_kpthread" = "yes"
 then
     CC="$CC -Kpthread"
+    if test "$ac_cv_cxx_thread" = "yes"; then
+        CXX="$CXX -Kpthread"
+    fi
     cat >>confdefs.h <<\_ACEOF
 #define WITH_THREAD 1
 _ACEOF
@@ -10897,6 +10903,9 @@ _ACEOF
 elif test "$ac_cv_kthread" = "yes"
 then
     CC="$CC -Kthread"
+    if test "$ac_cv_cxx_thread" = "yes"; then
+        CXX="$CXX -Kthread"
+    fi
     cat >>confdefs.h <<\_ACEOF
 #define WITH_THREAD 1
 _ACEOF
@@ -10906,6 +10915,9 @@ _ACEOF
 elif test "$ac_cv_pthread" = "yes"
 then
     CC="$CC -pthread"
+    if test "$ac_cv_cxx_thread" = "yes"; then
+        CXX="$CXX -pthread"
+    fi
     cat >>confdefs.h <<\_ACEOF
 #define WITH_THREAD 1
 _ACEOF
index 03d89d5f102ea374b853dc817c81ae41872d3bf5..1cae9612c170a803fac6fa06462abbfd5228f7d0 100644 (file)
@@ -868,7 +868,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
@@ -890,13 +890,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
@@ -1410,9 +1408,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,
@@ -1530,18 +1533,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"