[Python-checkins] python/dist/src configure,1.407,1.408 configure.in,1.418,1.419
loewis@users.sourceforge.net
loewis@users.sourceforge.net
2003年6月28日 00:46:41 -0700
Update of /cvsroot/python/python/dist/src
In directory sc8-pr-cvs1:/tmp/cvs-serv29066
Modified Files:
configure configure.in
Log Message:
Patch #758910: Add pthread flag to CXX if possible.
Index: configure
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure,v
retrieving revision 1.407
retrieving revision 1.408
diff -C2 -d -r1.407 -r1.408
*** configure 14 Jun 2003 21:03:05 -0000 1.407
--- configure 28 Jun 2003 07:46:31 -0000 1.408
***************
*** 1,4 ****
#! /bin/sh
! # From configure.in Revision: 1.417 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.53 for python 2.3.
--- 1,4 ----
#! /bin/sh
! # From configure.in Revision: 1.418 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.53 for python 2.3.
***************
*** 4018,4021 ****
--- 4018,4064 ----
echo "${ECHO_T}$ac_cv_pthread" >&6
fi
+
+ # If we have set a CC compiler flag for thread support then
+ # check if it works for CXX, too.
+ ac_cv_cxx_thread=no
+ if test ! -z "$CXX"
+ then
+ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
+ echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
+ ac_save_cxx="$CXX"
+
+ if test "$ac_cv_kpthread" = "yes"
+ then
+ CXX="$CXX -Kpthread"
+ ac_cv_cxx_thread=yes
+ elif test "$ac_cv_kthread" = "yes"
+ then
+ CXX="$CXX -Kthread"
+ ac_cv_cxx_thread=yes
+ elif test "$ac_cv_pthread" = "yes"
+ then
+ CXX="$CXX -pthread"
+ ac_cv_cxx_thread=yes
+ fi
+
+ if test $ac_cv_cxx_thread = yes
+ then
+ echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
+ $CXX -c conftest.$ac_ext 2>&5
+ if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
+ && test -s conftest$ac_exeext && ./conftest$ac_exeext
+ 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
+ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
+ echo "${ECHO_T}$ac_cv_cxx_thread" >&6
Index: configure.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure.in,v
retrieving revision 1.418
retrieving revision 1.419
diff -C2 -d -r1.418 -r1.419
*** configure.in 14 Jun 2003 21:03:05 -0000 1.418
--- configure.in 28 Jun 2003 07:46:38 -0000 1.419
***************
*** 833,836 ****
--- 833,877 ----
fi
+ # If we have set a CC compiler flag for thread support then
+ # check if it works for CXX, too.
+ ac_cv_cxx_thread=no
+ if test ! -z "$CXX"
+ then
+ AC_MSG_CHECKING(whether $CXX also accepts flags for thread support)
+ ac_save_cxx="$CXX"
+
+ if test "$ac_cv_kpthread" = "yes"
+ then
+ CXX="$CXX -Kpthread"
+ ac_cv_cxx_thread=yes
+ elif test "$ac_cv_kthread" = "yes"
+ then
+ CXX="$CXX -Kthread"
+ ac_cv_cxx_thread=yes
+ elif test "$ac_cv_pthread" = "yes"
+ then
+ CXX="$CXX -pthread"
+ ac_cv_cxx_thread=yes
+ fi
+
+ if test $ac_cv_cxx_thread = yes
+ then
+ echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
+ $CXX -c conftest.$ac_ext 2>&5
+ if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
+ && test -s conftest$ac_exeext && ./conftest$ac_exeext
+ 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
+ AC_MSG_RESULT($ac_cv_cxx_thread)
+
dnl # check for ANSI or K&R ("traditional") preprocessor
dnl AC_MSG_CHECKING(for C preprocessor type)