Kaydet (Commit) 95012193 authored tarafından Guido van Rossum's avatar Guido van Rossum

Patch by Geoff Furnish to make compiling with C++ more gentle.

(The configure script is regenerated, not from his patch.)
üst ec3caccb
This diff is collapsed.
...@@ -82,19 +82,19 @@ AC_MSG_RESULT($MACHDEP) ...@@ -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], [ ...@@ -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='' ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment