]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
fix up c++
authorDavid MacKenzie <djm@djmnet.org>
Thu, 3 Nov 1994 19:52:24 +0000 (19:52 +0000)
committerDavid MacKenzie <djm@djmnet.org>
Thu, 3 Nov 1994 19:52:24 +0000 (19:52 +0000)
acgeneral.m4
acspecific.m4
lib/autoconf/general.m4
lib/autoconf/specific.m4

index 64be7ec0ee049aab120e00cd4bcab68b3e42ccec..cb6a54b4ec2212c34446966ae5f4d5a9d2a6883c 100644 (file)
@@ -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.
index 31298040faf9dc4f9d8bc9424287ee0f0b8525b0..3c07bc92143a79705b91e317af9bf12c9bc85d73 100644 (file)
@@ -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 <<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
@@ -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 <stdlib.h>], , CXXCPP=/lib/cpp)
   ac_cv_prog_CXXCPP="$CXXCPP"
 AC_LANG_RESTORE[]dnl
index 64be7ec0ee049aab120e00cd4bcab68b3e42ccec..cb6a54b4ec2212c34446966ae5f4d5a9d2a6883c 100644 (file)
@@ -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.
index 31298040faf9dc4f9d8bc9424287ee0f0b8525b0..3c07bc92143a79705b91e317af9bf12c9bc85d73 100644 (file)
@@ -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 <<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
@@ -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 <stdlib.h>], , CXXCPP=/lib/cpp)
   ac_cv_prog_CXXCPP="$CXXCPP"
 AC_LANG_RESTORE[]dnl