From 4ba0d9c68c67602f7ca83a3a3f90497f753549af Mon Sep 17 00:00:00 2001 From: David MacKenzie Date: Thu, 3 Nov 1994 19:52:24 +0000 Subject: [PATCH] fix up c++ --- acgeneral.m4 | 4 ++-- acspecific.m4 | 16 +++++++++------- lib/autoconf/general.m4 | 4 ++-- lib/autoconf/specific.m4 | 16 +++++++++------- 4 files changed, 22 insertions(+), 18 deletions(-) diff --git a/acgeneral.m4 b/acgeneral.m4 index 64be7ec0e..cb6a54b4e 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -1017,8 +1017,8 @@ AC_DEFUN(AC_LANG_CPLUSPLUS, ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-gcc} $CXXFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&AC_FD_CC 2>&AC_FD_CC' -ac_link='${CXX-gcc} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&AC_FD_CC 2>&AC_FD_CC' +ac_compile='${CXX-g++} $CXXFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&AC_FD_CC 2>&AC_FD_CC' +ac_link='${CXX-g++} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&AC_FD_CC 2>&AC_FD_CC' ]) dnl Push the current language on a stack. diff --git a/acspecific.m4 b/acspecific.m4 index 31298040f..3c07bc921 100644 --- a/acspecific.m4 +++ b/acspecific.m4 @@ -117,25 +117,27 @@ AC_DEFUN(AC_PROG_CXX, [AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx, gcc) -# Find out if we are using GNU C++, under whatever name. +AC_MSG_CHECKING(whether we are using GNU C++) AC_CACHE_VAL(ac_cv_prog_gxx, -[cat > conftest.C < conftest.C <&AC_FD_CC | egrep yes >/dev/null 2>&1; then +if ${CXX-g++} -E conftest.C 2>&AC_FD_CC | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no fi])dnl +AC_MSG_RESULT($ac_cv_prog_gxx) if test $ac_cv_prog_gxx = yes; then GXX=yes if test "${CXXFLAGS+set}" != set; then - AC_MSG_CHECKING(whether ${CXX-gcc} accepts -g) + AC_MSG_CHECKING(whether ${CXX-g++} accepts -g) AC_CACHE_VAL(ac_cv_prog_gxx_g, [echo 'void f(){}' > conftest.cc -if test -z "`${CXX-gcc} -g -c conftest.cc 2>&1`"; then +if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then ac_cv_prog_gxx_g=yes else ac_cv_prog_gxx_g=no @@ -288,7 +290,7 @@ if test -z "$CXXCPP"; then AC_CACHE_VAL(ac_cv_prog_CXXCPP, [AC_LANG_SAVE[]dnl AC_LANG_CPLUSPLUS[]dnl - CXXCPP="${CXX-gcc} -E" + CXXCPP="${CXX-g++} -E" AC_TRY_CPP([#include ], , CXXCPP=/lib/cpp) ac_cv_prog_CXXCPP="$CXXCPP" AC_LANG_RESTORE[]dnl diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 64be7ec0e..cb6a54b4e 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -1017,8 +1017,8 @@ AC_DEFUN(AC_LANG_CPLUSPLUS, ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='${CXX-gcc} $CXXFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&AC_FD_CC 2>&AC_FD_CC' -ac_link='${CXX-gcc} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&AC_FD_CC 2>&AC_FD_CC' +ac_compile='${CXX-g++} $CXXFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&AC_FD_CC 2>&AC_FD_CC' +ac_link='${CXX-g++} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&AC_FD_CC 2>&AC_FD_CC' ]) dnl Push the current language on a stack. diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index 31298040f..3c07bc921 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -117,25 +117,27 @@ AC_DEFUN(AC_PROG_CXX, [AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx, gcc) -# Find out if we are using GNU C++, under whatever name. +AC_MSG_CHECKING(whether we are using GNU C++) AC_CACHE_VAL(ac_cv_prog_gxx, -[cat > conftest.C < conftest.C <&AC_FD_CC | egrep yes >/dev/null 2>&1; then +if ${CXX-g++} -E conftest.C 2>&AC_FD_CC | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no fi])dnl +AC_MSG_RESULT($ac_cv_prog_gxx) if test $ac_cv_prog_gxx = yes; then GXX=yes if test "${CXXFLAGS+set}" != set; then - AC_MSG_CHECKING(whether ${CXX-gcc} accepts -g) + AC_MSG_CHECKING(whether ${CXX-g++} accepts -g) AC_CACHE_VAL(ac_cv_prog_gxx_g, [echo 'void f(){}' > conftest.cc -if test -z "`${CXX-gcc} -g -c conftest.cc 2>&1`"; then +if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then ac_cv_prog_gxx_g=yes else ac_cv_prog_gxx_g=no @@ -288,7 +290,7 @@ if test -z "$CXXCPP"; then AC_CACHE_VAL(ac_cv_prog_CXXCPP, [AC_LANG_SAVE[]dnl AC_LANG_CPLUSPLUS[]dnl - CXXCPP="${CXX-gcc} -E" + CXXCPP="${CXX-g++} -E" AC_TRY_CPP([#include ], , CXXCPP=/lib/cpp) ac_cv_prog_CXXCPP="$CXXCPP" AC_LANG_RESTORE[]dnl -- 2.47.3