[Python-checkins] CVS: python/dist/src configure,1.262,1.263 configure.in,1.270,1.271
Martin v. L?wis
loewis@users.sourceforge.net
Thu, 18 Oct 2001 08:35:40 -0700
Update of /cvsroot/python/python/dist/src
In directory usw-pr-cvs1:/tmp/cvs-serv17976
Modified Files:
configure configure.in
Log Message:
Use CXX in LINKCC if CXX is used to build main() and the system requires
to link a C++ main using the C++ compiler. Fixes #472007.
Index: configure
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure,v
retrieving revision 1.262
retrieving revision 1.263
diff -C2 -d -r1.262 -r1.263
*** configure 2001/10/18 04:05:59 1.262
--- configure 2001/10/18 15:35:37 1.263
***************
*** 1,5 ****
#! /bin/sh
! # From configure.in Revision: 1.269
# Guess values for system-dependent variables and create Makefiles.
--- 1,5 ----
#! /bin/sh
! # From configure.in Revision: 1.270
[...4377 lines suppressed...]
if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 7310 "configure"
#include "confdefs.h"
#include <sys/types.h>
***************
*** 7340,7344 ****
SRCDIRS="Parser Grammar Objects Python Modules"
echo $ac_n "checking for build directories""... $ac_c" 1>&6
! echo "configure:7343: checking for build directories" >&5
for dir in $SRCDIRS; do
if test ! -d $dir; then
--- 7356,7360 ----
SRCDIRS="Parser Grammar Objects Python Modules"
echo $ac_n "checking for build directories""... $ac_c" 1>&6
! echo "configure:7359: checking for build directories" >&5
for dir in $SRCDIRS; do
if test ! -d $dir; then
Index: configure.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure.in,v
retrieving revision 1.270
retrieving revision 1.271
diff -C2 -d -r1.270 -r1.271
*** configure.in 2001/10/18 04:06:00 1.270
--- configure.in 2001/10/18 15:35:38 1.271
***************
*** 255,258 ****
--- 255,261 ----
# LINKCC is the command that links the python executable -- default is $(CC).
+ # If CXX is set, and if it is needed to link a main function that was
+ # compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
+ # python might then depend on the C++ runtime
# This is altered for AIX in order to build the export list before
# linking.
***************
*** 261,272 ****
if test -z "$LINKCC"
then
case $ac_sys_system in
AIX*)
! LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
dgux*)
! LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Monterey64*)
! LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
! *) LINKCC="\$(PURIFY) \$(CC)";;
esac
fi
--- 264,288 ----
if test -z "$LINKCC"
then
+ if test -z "$CXX"; then
+ LINKCC="\$(PURIFY) \$(CC)"
+ else
+ echo 'int main(){return 0;}' > conftest.$ac_ext
+ $CXX -c conftest.$ac_ext 2>&5
+ if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
+ && test -s conftest$ac_exeext && ./conftest$ac_exeext
+ then
+ LINKCC="\$(PURIFY) \$(CC)"
+ else
+ LINKCC="\$(PURIFY) \$(CXX)"
+ fi
+ rm -fr conftest*
+ fi
case $ac_sys_system in
AIX*)
! LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $(LINKCC)";;
dgux*)
! LINKCC="LD_RUN_PATH=$libdir $(LINKCC)";;
Monterey64*)
! LINKCC="$(LINKCC) -L/usr/lib/ia64l64";;
esac
fi