mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
Patch by Geoff Furnish to make compiling with C++ more gentle.
(The configure script is regenerated, not from his patch.)
This commit is contained in:
parent
ec3caccb17
commit
9501219303
2 changed files with 362 additions and 284 deletions
60
configure.in
60
configure.in
|
|
@ -82,19 +82,19 @@ AC_MSG_RESULT($MACHDEP)
|
||||||
#
|
#
|
||||||
# Not all make programs have this predefined.
|
# Not all make programs have this predefined.
|
||||||
#
|
#
|
||||||
AC_SUBST(SET_CCC)
|
#AC_SUBST(SET_CCC)
|
||||||
AC_MSG_CHECKING(CCC)
|
#AC_MSG_CHECKING(CCC)
|
||||||
if test -z "$CCC"
|
#if test -z "$CCC"
|
||||||
then
|
#then
|
||||||
case $ac_sys_system in
|
# case $ac_sys_system in
|
||||||
IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
|
# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
|
||||||
Linux*) SET_CCC="CCC= g++";;
|
# Linux*) SET_CCC="CCC= g++";;
|
||||||
*) SET_CCC=""
|
# *) SET_CCC=""
|
||||||
esac
|
# esac
|
||||||
else
|
#else
|
||||||
SET_CCC="CCC= ${CCC}"
|
# SET_CCC="CCC= ${CCC}"
|
||||||
fi
|
#fi
|
||||||
AC_MSG_RESULT($SET_CCC)
|
#AC_MSG_RESULT($SET_CCC)
|
||||||
|
|
||||||
|
|
||||||
# checks for alternative programs
|
# checks for alternative programs
|
||||||
|
|
@ -152,6 +152,36 @@ AC_ARG_WITH(gcc, [--without-gcc never use gcc], [
|
||||||
esac])
|
esac])
|
||||||
AC_MSG_RESULT($without_gcc)
|
AC_MSG_RESULT($without_gcc)
|
||||||
|
|
||||||
|
AC_SUBST(SET_CXX)
|
||||||
|
AC_SUBST(MAINOBJ)
|
||||||
|
MAINOBJ=python.o
|
||||||
|
AC_MSG_CHECKING(for --with-cxx=<compiler>)
|
||||||
|
AC_ARG_WITH(cxx, [--with-cxx=<compiler> enable C++ support],[
|
||||||
|
case $withval in
|
||||||
|
no) CXX=
|
||||||
|
with_cxx=no;;
|
||||||
|
*) CXX=$withval
|
||||||
|
MAINOBJ=ccpython.o
|
||||||
|
with_cxx=$withval;;
|
||||||
|
esac], [
|
||||||
|
with_cxx=no
|
||||||
|
])
|
||||||
|
AC_MSG_RESULT($with_cxx)
|
||||||
|
SET_CXX="CXX = $CXX"
|
||||||
|
|
||||||
|
#AC_MSG_CHECKING(CCC)
|
||||||
|
#if test -z "$CCC"
|
||||||
|
#then
|
||||||
|
# case $ac_sys_system in
|
||||||
|
# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
|
||||||
|
# Linux*) SET_CCC="CCC= g++";;
|
||||||
|
# *) SET_CCC=""
|
||||||
|
# esac
|
||||||
|
#else
|
||||||
|
# SET_CCC="CCC= ${CCC}"
|
||||||
|
#fi
|
||||||
|
#AC_MSG_RESULT($SET_CCC)
|
||||||
|
|
||||||
# If the user switches compilers, we can't believe the cache
|
# 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 ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
|
||||||
then
|
then
|
||||||
|
|
@ -192,6 +222,10 @@ LDLIBRARY=''
|
||||||
# linking.
|
# linking.
|
||||||
AC_SUBST(LINKCC)
|
AC_SUBST(LINKCC)
|
||||||
AC_MSG_CHECKING(LINKCC)
|
AC_MSG_CHECKING(LINKCC)
|
||||||
|
if test -z "$LINKCC" -a ! -z "$CXX"
|
||||||
|
then
|
||||||
|
LINKCC="$CXX"
|
||||||
|
fi
|
||||||
if test -z "$LINKCC"
|
if test -z "$LINKCC"
|
||||||
then
|
then
|
||||||
case $ac_sys_system in
|
case $ac_sys_system in
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue