to avoid potential ambiguities on case-insensitive shells.
+2000-05-24 Ossama Othman <ossama@debian.org>
+
+ * aclang.m4 (AC_LANG(C++)): Change `ac_ext' from from `C' to `cc'
+ to avoid potential ambiguities on case-insensitive shells.
+
2000-05-24 Mo DeJong <mdejong@cygnus.com>
Have --host=sun4 automatically look for CC=sun4-cc etc.
# Note that the order is important: first initialize, then set the
# AC_CONFIG_SRCDIR.
AC_DEFUN([AC_INIT],
-[AC_EXPAND_ONCE([_AC_INIT()])dnl
-ifval([$2], [_AC_INIT_PACKAGE($@)],
- [ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
+[ifval([$2], [_AC_INIT_PACKAGE($@)])dnl
+AC_EXPAND_ONCE([_AC_INIT()])dnl
+ifval([$2], , [ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
])
# AC_LANG(C++)
# ------------
define([AC_LANG(C++)],
-[ac_ext=C
+[ac_ext=cc
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
define([_AC_PROG_CXX_GNU],
[AC_CACHE_CHECK(whether we are using GNU C++, ac_cv_prog_gxx,
[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
-cat >conftest.C <<EOF
+cat >conftest.cc <<EOF
#ifdef __GNUC__
yes;
#endif
EOF
-if AC_TRY_COMMAND(${CXX-g++} -E conftest.C) | egrep yes >/dev/null 2>&1; then
+if AC_TRY_COMMAND(${CXX-g++} -E conftest.cc) | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
# AC_LANG(C++)
# ------------
define([AC_LANG(C++)],
-[ac_ext=C
+[ac_ext=cc
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
define([_AC_PROG_CXX_GNU],
[AC_CACHE_CHECK(whether we are using GNU C++, ac_cv_prog_gxx,
[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
-cat >conftest.C <<EOF
+cat >conftest.cc <<EOF
#ifdef __GNUC__
yes;
#endif
EOF
-if AC_TRY_COMMAND(${CXX-g++} -E conftest.C) | egrep yes >/dev/null 2>&1; then
+if AC_TRY_COMMAND(${CXX-g++} -E conftest.cc) | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
# AC_LANG(C++)
# ------------
define([AC_LANG(C++)],
-[ac_ext=C
+[ac_ext=cc
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
define([_AC_PROG_CXX_GNU],
[AC_CACHE_CHECK(whether we are using GNU C++, ac_cv_prog_gxx,
[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
-cat >conftest.C <<EOF
+cat >conftest.cc <<EOF
#ifdef __GNUC__
yes;
#endif
EOF
-if AC_TRY_COMMAND(${CXX-g++} -E conftest.C) | egrep yes >/dev/null 2>&1; then
+if AC_TRY_COMMAND(${CXX-g++} -E conftest.cc) | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
# Note that the order is important: first initialize, then set the
# AC_CONFIG_SRCDIR.
AC_DEFUN([AC_INIT],
-[AC_EXPAND_ONCE([_AC_INIT()])dnl
-ifval([$2], [_AC_INIT_PACKAGE($@)],
- [ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
+[ifval([$2], [_AC_INIT_PACKAGE($@)])dnl
+AC_EXPAND_ONCE([_AC_INIT()])dnl
+ifval([$2], , [ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
])
# AC_LANG(C++)
# ------------
define([AC_LANG(C++)],
-[ac_ext=C
+[ac_ext=cc
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AC_FD_LOG'
define([_AC_PROG_CXX_GNU],
[AC_CACHE_CHECK(whether we are using GNU C++, ac_cv_prog_gxx,
[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
-cat >conftest.C <<EOF
+cat >conftest.cc <<EOF
#ifdef __GNUC__
yes;
#endif
EOF
-if AC_TRY_COMMAND(${CXX-g++} -E conftest.C) | egrep yes >/dev/null 2>&1; then
+if AC_TRY_COMMAND(${CXX-g++} -E conftest.cc) | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no