diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2000-12-13 17:37:02 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2000-12-13 17:37:02 (GMT) |
commit | 537970fe267cf02ea490402b4de02e84ee48c168 (patch) | |
tree | 654a94ba14500388eba7fb0f111311353de2ee74 /configure.in | |
parent | 5d1b5eaf55b5245d9a368811ab32cea6b080a1f9 (diff) | |
download | cpython-537970fe267cf02ea490402b4de02e84ee48c168.zip cpython-537970fe267cf02ea490402b4de02e84ee48c168.tar.gz cpython-537970fe267cf02ea490402b4de02e84ee48c168.tar.bz2 |
Set CXX even when --with-cxx is not specified. Closes bug #124782
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.in b/configure.in index bf21e51..07072c5 100644 --- a/configure.in +++ b/configure.in @@ -153,6 +153,7 @@ AC_SUBST(MAINOBJ) MAINOBJ=python.o AC_MSG_CHECKING(for --with-cxx=<compiler>) AC_ARG_WITH(cxx, [ --with-cxx=<compiler> enable C++ support],[ + check_cxx=no case $withval in no) CXX= with_cxx=no;; @@ -161,10 +162,29 @@ AC_ARG_WITH(cxx, [ --with-cxx=<compiler> enable C++ support],[ with_cxx=$withval;; esac], [ with_cxx=no + check_cxx=yes ]) AC_MSG_RESULT($with_cxx) + +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 --with-cxx was given. +dnl Finally, it does not test whether CXX is g++. + +if test "$check_cxx" = "yes" +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 + fi +fi + SET_CXX="CXX=$CXX" + #AC_MSG_CHECKING(CCC) #if test -z "$CCC" #then |