[Python-checkins] r45387 - in python/trunk: Makefile.pre.in Misc/NEWS Modules/ccpython.cc README configure configure.in (original) (raw)

martin.v.loewis python-checkins at python.org
Fri Apr 14 16:34:28 CEST 2006


Author: martin.v.loewis Date: Fri Apr 14 16:34:26 2006 New Revision: 45387

Removed: python/trunk/Modules/ccpython.cc Modified: python/trunk/Makefile.pre.in python/trunk/Misc/NEWS python/trunk/README python/trunk/configure python/trunk/configure.in Log: Patch #1324762: Change --with-cxx to --with-cxx-main.

Modified: python/trunk/Makefile.pre.in

--- python/trunk/Makefile.pre.in (original) +++ python/trunk/Makefile.pre.in Fri Apr 14 16:34:26 2006 @@ -30,6 +30,7 @@

CC= @CC@ CXX= @CXX@ +MAINCC= @MAINCC@ LINKCC= @LINKCC@ AR= @AR@ RANLIB= @RANLIB@ @@ -157,7 +158,6 @@ SYSLIBS= (LIBM)(LIBM) (LIBM)(LIBC) SHLIBS= @SHLIBS@

-MAINOBJ= @MAINOBJ@ THREADOBJ= @THREADOBJ@ DLINCLDIR= @DLINCLDIR@ DYNLOADFILE= @DYNLOADFILE@ @@ -326,9 +326,9 @@ all: $(BUILDPYTHON) oldsharedmods sharedmods

Build the interpreter

-$(BUILDPYTHON): Modules/$(MAINOBJ) (LIBRARY)(LIBRARY) (LIBRARY)(LDLIBRARY) +$(BUILDPYTHON): Modules/python.o (LIBRARY)(LIBRARY) (LIBRARY)(LDLIBRARY) (LINKCC)(LINKCC) (LINKCC)(LDFLAGS) (LINKFORSHARED)−o(LINKFORSHARED) -o (LINKFORSHARED)o@
- Modules/$(MAINOBJ)
+ Modules/python.o
(BLDLIBRARY)(BLDLIBRARY) (BLDLIBRARY)(LIBS) (MODLIBS)(MODLIBS) (MODLIBS)(SYSLIBS) $(LDLAST)

platform: $(BUILDPYTHON) @@ -448,8 +448,8 @@ -DVPATH='"$(VPATH)"'
-o @@ @(srcdir)/Modules/getpath.c

-Modules/ccpython.o: $(srcdir)/Modules/ccpython.cc

(GRAMMARH)(GRAMMAR_H) (GRAMMARH)(GRAMMAR_C): (PGEN)(PGEN) (PGEN)(GRAMMAR_INPUT) @@ -537,7 +537,7 @@ Include/weakrefobject.h
pyconfig.h

-$(LIBRARY_OBJS) (MODOBJS)Modules/(MODOBJS) Modules/(MODOBJS)Modules/(MAINOBJ): $(PYTHON_HEADERS) +$(LIBRARY_OBJS) (MODOBJS)Modules/python.o:(MODOBJS) Modules/python.o: (MODOBJS)Modules/python.o:(PYTHON_HEADERS)

###################################################################### @@ -813,7 +813,7 @@ fi;
fi (INSTALLDATA)Modules/config.c(INSTALL_DATA) Modules/config.c (INSTALLDATA)Modules/config.c(DESTDIR)$(LIBPL)/config.c

Modified: python/trunk/Misc/NEWS

--- python/trunk/Misc/NEWS (original) +++ python/trunk/Misc/NEWS Fri Apr 14 16:34:26 2006 @@ -82,6 +82,11 @@ Build

+- Patch #1324762:Remove ccpython.cc; replace --with-cxx with

Deleted: /python/trunk/Modules/ccpython.cc

--- /python/trunk/Modules/ccpython.cc Fri Apr 14 16:34:26 2006 +++ (empty file) @@ -1,11 +0,0 @@ -/* Minimal main program -- everything is loaded from the library */

-#include "Python.h"

-extern "C" -DL_EXPORT(int) Py_Main( int argc, char *argv[] );

-int main( int argc, char *argv[] ) -{ - return Py_Main(argc, argv); -}

Modified: python/trunk/README

--- python/trunk/README (original) +++ python/trunk/README Fri Apr 14 16:34:26 2006 @@ -1045,13 +1045,35 @@ --with-libs='libs': Add 'libs' to the LIBS that the python interpreter is linked against.

---with-cxx=: Some C++ compilers require that main() is

+--with-cxx-main=: If you plan to use C++ extension modules,

--with-pydebug: Enable additional debugging code to help track down

Modified: python/trunk/configure

-if test "${with_cxx+set}" = set; then - withval="$with_cxx"

-set dummy acprog;acword=ac_prog; ac_word=acprog;acword=2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo ECHON"checkingforECHO_N "checking for ECHON"checkingforac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CXX+set}" = set; then - echo ECHON"(cached)ECHO_N "(cached) ECHON"(cached)ECHO_C" >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if asexecutablep"as_executable_p "asexecutablep"as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CXX="$ac_prog" - echo "$as_me:$LINENO: found asdir/as_dir/asdir/ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done

-fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - echo "$as_me:$LINENO: result: $CXX" >&5 -echo "${ECHO_T}$CXX" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi

-ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c CXXFLAGSCXXFLAGS CXXFLAGSCPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext CXXFLAGSCXXFLAGS CXXFLAGSCPPFLAGS LDFLAGSconftest.LDFLAGS conftest.LDFLAGSconftest.ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. / -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/ end confdefs.h. */

-int -main () -{

-# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort.

-# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of no' led to EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - . ) - ac_cv_exeext=expr "$ac_file" : '[^.]*\(\..*\)' - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext - break;; - * ) - break;; - esac -done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5

-{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables -See `config.log' for more details." >&5 -echo "$as_me: error: C++ compiler cannot create executables -See `config.log' for more details." >&2;} - { (exit 77); exit 77; }; } -fi

-ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6

-# Check the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5 -echo ECHON"checkingwhethertheC++compilerworks...ECHO_N "checking whether the C++ compiler works... ECHON"checkingwhethertheC++compilerworks...ECHO_C" >&6 -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: "$ac_try"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: $? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs. -If you meant to cross compile, use `--host'. -See `config.log' for more details." >&5 -echo "$as_me: error: cannot run C++ compiled programs. -If you meant to cross compile, use `--host'. -See `config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - fi - fi -fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6

-rm -f a.out a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo ECHON"checkingwhetherwearecrosscompiling...ECHO_N "checking whether we are cross compiling... ECHON"checkingwhetherwearecrosscompiling...ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6

-rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6

-rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT

-ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c CFLAGSCFLAGS CFLAGSCPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext CFLAGSCFLAGS CFLAGSCPPFLAGS LDFLAGSconftest.LDFLAGS conftest.LDFLAGSconftest.ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu

+if test "${with_cxx_main+set}" = set; then

+set dummy g++; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo ECHON"checkingforECHO_N "checking for ECHON"checkingforac_word... $ECHO_C" >&6 +if test "${ac_cv_path_CXX+set}" = set; then

+set dummy c++; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo ECHON"checkingforECHO_N "checking for ECHON"checkingforac_word... $ECHO_C" >&6 +if test "${ac_cv_path_CXX+set}" = set; then

+set dummy acprog;acword=ac_prog; ac_word=acprog;acword=2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo ECHON"checkingforECHO_N "checking for ECHON"checkingforac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CXX+set}" = set; then

@@ -3274,22 +3208,7 @@ echo ECHON"checkingLINKCC...ECHO_N "checking LINKCC... ECHON"checkingLINKCC...ECHO_C" >&6 if test -z "$LINKCC" then

@@ -22485,15 +22404,15 @@ s, at EXTRAPLATDIR@,$EXTRAPLATDIR,;t t s, at EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t s, at CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t -s, at CXX@,$CXX,;t t -s, at MAINOBJ@,$MAINOBJ,;t t -s, at EXEEXT@,$EXEEXT,;t t s, at CC@,$CC,;t t s, at CFLAGS@,$CFLAGS,;t t s, at LDFLAGS@,$LDFLAGS,;t t s, at CPPFLAGS@,$CPPFLAGS,;t t s, at ac_ct_CC@,$ac_ct_CC,;t t +s, at EXEEXT@,$EXEEXT,;t t s, at OBJEXT@,$OBJEXT,;t t +s, at CXX@,$CXX,;t t +s, at MAINCC@,$MAINCC,;t t s, at CPP@,$CPP,;t t s, at EGREP@,$EGREP,;t t s, at BUILDEXEEXT@,$BUILDEXEEXT,;t t

Modified: python/trunk/configure.in

-dnl The following fragment works similar to AC_PROG_CXX. -dnl It does not fail if CXX is not found, and it is not executed if -dnl --without-cxx was given. -dnl Finally, it does not test whether CXX is g++.

-dnl Autoconf 2.5x does not have AC_PROG_CXX_WORKS anymore -ifdef([AC_PROG_CXX_WORKS],[], - [AC_DEFUN([AC_PROG_CXX_WORKS], - [AC_LANG_PUSH(C++)dnl - _AC_COMPILER_EXEEXT - AC_LANG_POP() - ] -)])

-if test "$check_cxx" = "yes" +if test -z "$CXX" then AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, notfound) if test "$CXX" = "notfound" then - CXX= - else - AC_PROG_CXX_WORKS + CXX="" fi fi

-# If the user switches compilers, we can't believe the cache -if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" +if test "$preset_cxx" != "$CXX" then

-AC_PROG_CC

checks for UNIX variants that set C preprocessor variables

AC_AIX @@ -480,22 +485,7 @@ AC_MSG_CHECKING(LINKCC) if test -z "$LINKCC" then



More information about the Python-checkins mailing list