[Python-checkins] CVS: python/dist/src configure.in,1.132,1.133 configure,1.123,1.124

Greg Stein python-dev@python.org
Wed, 5 Jul 2000 03:38:12 -0700


Update of /cvsroot/python/python/dist/src
In directory slayer.i.sourceforge.net:/tmp/cvs-serv30979

Modified Files:
	configure.in configure 
Log Message:
check for Pth *after* the standard system threading libraries. Pth should
not override those.

Submitted by: flight@users.sourceforge.net



Index: configure.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure.in,v
retrieving revision 1.132
retrieving revision 1.133
diff -C2 -r1.132 -r1.133
*** configure.in	2000/06/30 16:39:35	1.132
--- configure.in	2000/07/05 10:38:09	1.133
***************
*** 685,692 ****
      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)
--- 685,688 ----
***************
*** 711,714 ****
--- 707,714 ----
      LIBS="$LIBS -lthread"
      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(cma, pthread_create, [AC_DEFINE(WITH_THREAD)
      AC_DEFINE(_POSIX_THREADS)

Index: configure
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure,v
retrieving revision 1.123
retrieving revision 1.124
diff -C2 -r1.123 -r1.124
*** configure	2000/06/30 16:39:35	1.123
--- configure	2000/07/05 10:38:09	1.124
***************
*** 1,5 ****
  #! /bin/sh
  
! # From configure.in Revision: 1.131 
  
  # Guess values for system-dependent variables and create Makefiles.
--- 1,5 ----
  #! /bin/sh
  
! # From configure.in Revision: 1.132 
  
  # Guess values for system-dependent variables and create Makefiles.
***************
*** 2990,3043 ****
    echo "$ac_t""no" 1>&6
  
-     echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
- echo "configure:2994: checking for pth_init in -lpth" >&5
- ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
- if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-   echo $ac_n "(cached) $ac_c" 1>&6
- else
-   ac_save_LIBS="$LIBS"
- LIBS="-lpth  $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 3002 "configure"
- #include "confdefs.h"
- /* Override any gcc2 internal prototype to avoid an error.  */
- /* We use char because int might match the return type of a gcc2
-     builtin and then its argument prototype would still apply.  */
- char pth_init();
- 
- int main() {
- pth_init()
- ; return 0; }
- EOF
- if { (eval echo configure:3013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=yes"
- else
-   echo "configure: failed program was:" >&5
-   cat conftest.$ac_ext >&5
-   rm -rf conftest*
-   eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- 
- fi
- if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-   echo "$ac_t""yes" 1>&6
-   cat >> confdefs.h <<\EOF
- #define WITH_THREAD 1
- EOF
- 
-     cat >> confdefs.h <<\EOF
- #define _GNU_PTH 1
- EOF
- 
-     LIBS="-lpth $LIBS"
-     LIBOBJS="$LIBOBJS thread.o"
- else
-   echo "$ac_t""no" 1>&6
- 
      echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
! echo "configure:3042: checking for pthread_create in -lpthread" >&5
  ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
--- 2990,2995 ----
    echo "$ac_t""no" 1>&6
  
      echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
! echo "configure:2994: checking for pthread_create in -lpthread" >&5
  ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
***************
*** 3047,3051 ****
  LIBS="-lpthread  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3050 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
--- 2999,3003 ----
  LIBS="-lpthread  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3002 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
***************
*** 3058,3062 ****
  ; return 0; }
  EOF
! if { (eval echo configure:3061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
--- 3010,3014 ----
  ; return 0; }
  EOF
! if { (eval echo configure:3013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
***************
*** 3087,3096 ****
  
      echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
! echo "configure:3090: checking for pthread_detach" >&5
  if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3095 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
--- 3039,3048 ----
  
      echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
! echo "configure:3042: checking for pthread_detach" >&5
  if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3047 "configure"
  #include "confdefs.h"
  /* System header to define __stub macros and hopefully few prototypes,
***************
*** 3115,3119 ****
  ; return 0; }
  EOF
! if { (eval echo configure:3118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_pthread_detach=yes"
--- 3067,3071 ----
  ; return 0; }
  EOF
! if { (eval echo configure:3070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_func_pthread_detach=yes"
***************
*** 3143,3157 ****
      ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
! echo "configure:3146: checking for kernel/OS.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3151 "configure"
  #include "confdefs.h"
  #include <kernel/OS.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:3156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
--- 3095,3109 ----
      ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
  echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
! echo "configure:3098: checking for kernel/OS.h" >&5
  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    cat > conftest.$ac_ext <<EOF
! #line 3103 "configure"
  #include "confdefs.h"
  #include <kernel/OS.h>
  EOF
  ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:3108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  if test -z "$ac_err"; then
***************
*** 3182,3186 ****
  
      echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
! echo "configure:3185: checking for pthread_create in -lpthreads" >&5
  ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
--- 3134,3138 ----
  
      echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
! echo "configure:3137: checking for pthread_create in -lpthreads" >&5
  ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
***************
*** 3190,3194 ****
  LIBS="-lpthreads  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3193 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
--- 3142,3146 ----
  LIBS="-lpthreads  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3145 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
***************
*** 3201,3205 ****
  ; return 0; }
  EOF
! if { (eval echo configure:3204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
--- 3153,3157 ----
  ; return 0; }
  EOF
! if { (eval echo configure:3156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
***************
*** 3230,3234 ****
  
      echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
! echo "configure:3233: checking for pthread_create in -lc_r" >&5
  ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
--- 3182,3186 ----
  
      echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
! echo "configure:3185: checking for pthread_create in -lc_r" >&5
  ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
***************
*** 3238,3242 ****
  LIBS="-lc_r  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3241 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
--- 3190,3194 ----
  LIBS="-lc_r  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3193 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
***************
*** 3249,3253 ****
  ; return 0; }
  EOF
! if { (eval echo configure:3252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
--- 3201,3205 ----
  ; return 0; }
  EOF
! if { (eval echo configure:3204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
***************
*** 3278,3282 ****
  
      echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
! echo "configure:3281: checking for __d6_pthread_create in -lthread" >&5
  ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
--- 3230,3234 ----
  
      echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
! echo "configure:3233: checking for __d6_pthread_create in -lthread" >&5
  ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
***************
*** 3286,3290 ****
  LIBS="-lthread  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3289 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
--- 3238,3242 ----
  LIBS="-lthread  $LIBS"
  cat > conftest.$ac_ext <<EOF
! #line 3241 "configure"
  #include "confdefs.h"
  /* Override any gcc2 internal prototype to avoid an error.  */
***************
*** 3297,3301 ****
  ; return 0; }
  EOF
! if { (eval echo configure:3300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
--- 3249,3253 ----
  ; return 0; }
  EOF
! if { (eval echo configure:3252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
    rm -rf conftest*
    eval "ac_cv_lib_$ac_lib_var=yes"
***************
*** 3321,3324 ****
--- 3273,3324 ----
  
      LIBS="$LIBS -lthread"
+     LIBOBJS="$LIBOBJS thread.o"
+ else
+   echo "$ac_t""no" 1>&6
+ 
+     echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
+ echo "configure:3281: checking for pth_init in -lpth" >&5
+ ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
+ if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+   echo $ac_n "(cached) $ac_c" 1>&6
+ else
+   ac_save_LIBS="$LIBS"
+ LIBS="-lpth  $LIBS"
+ cat > conftest.$ac_ext <<EOF
+ #line 3289 "configure"
+ #include "confdefs.h"
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ /* We use char because int might match the return type of a gcc2
+     builtin and then its argument prototype would still apply.  */
+ char pth_init();
+ 
+ int main() {
+ pth_init()
+ ; return 0; }
+ EOF
+ if { (eval echo configure:3300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=yes"
+ else
+   echo "configure: failed program was:" >&5
+   cat conftest.$ac_ext >&5
+   rm -rf conftest*
+   eval "ac_cv_lib_$ac_lib_var=no"
+ fi
+ rm -f conftest*
+ LIBS="$ac_save_LIBS"
+ 
+ fi
+ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+   echo "$ac_t""yes" 1>&6
+   cat >> confdefs.h <<\EOF
+ #define WITH_THREAD 1
+ EOF
+ 
+     cat >> confdefs.h <<\EOF
+ #define _GNU_PTH 1
+ EOF
+ 
+     LIBS="-lpth $LIBS"
      LIBOBJS="$LIBOBJS thread.o"
  else