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.
[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 <<EOF
+[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
+cat > conftest.C <<EOF
#ifdef __GNUC__
- yes
+ yes;
#endif
EOF
-if ${CXX-gcc} -E conftest.C 2>&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
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 <stdlib.h>], , CXXCPP=/lib/cpp)
ac_cv_prog_CXXCPP="$CXXCPP"
AC_LANG_RESTORE[]dnl
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.
[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 <<EOF
+[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
+cat > conftest.C <<EOF
#ifdef __GNUC__
- yes
+ yes;
#endif
EOF
-if ${CXX-gcc} -E conftest.C 2>&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
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 <stdlib.h>], , CXXCPP=/lib/cpp)
ac_cv_prog_CXXCPP="$CXXCPP"
AC_LANG_RESTORE[]dnl