[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: AC_PROG_CPP requires AC_PROG_CC
From: |
Akim Demaille |
Subject: |
FYI: AC_PROG_CPP requires AC_PROG_CC |
Date: |
15 Dec 2000 12:58:06 +0100 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) |
Arg.
Index: ChangeLog
from Akim Demaille <address@hidden>
* aclang.m4 (AC_PROG_CXXCPP, AC_PROG_CPP): Require AC_PROG_CXX/CC.
2000-12-15 Akim Demaille <address@hidden>
Index: aclang.m4
===================================================================
RCS file: /cvs/autoconf/aclang.m4,v
retrieving revision 1.97
diff -u -u -r1.97 aclang.m4
--- aclang.m4 2000/12/15 07:49:13 1.97
+++ aclang.m4 2000/12/15 11:40:35
@@ -749,16 +749,19 @@
# AC_PROG_CPP
# -----------
-# Find a working C preprocessor
+# Find a working C preprocessor.
+# We shouldn't have to require AC_PROG_CC, but this is due to the concurrency
+# between the AC_LANG_COMPILER_REQUIRE family and that of AC_PROG_CC.
AC_DEFUN([AC_PROG_CPP],
-[AC_MSG_CHECKING([how to run the C preprocessor])
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_MSG_CHECKING([how to run the C preprocessor])
AC_LANG_ASSERT(C)dnl
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
- AC_CACHE_VAL(ac_cv_prog_CPP,
+ AC_CACHE_VAL([ac_cv_prog_CPP],
[dnl
# Double quotes because CPP needs to be expanded
for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
@@ -951,9 +954,12 @@
# AC_PROG_CXXCPP
# --------------
-# Find a working C++ preprocessor
+# Find a working C++ preprocessor.
+# We shouldn't have to require AC_PROG_CC, but this is due to the concurrency
+# between the AC_LANG_COMPILER_REQUIRE family and that of AC_PROG_CXX.
AC_DEFUN([AC_PROG_CXXCPP],
-[AC_MSG_CHECKING([how to run the C++ preprocessor])
+[AC_REQUIRE([AC_PROG_CXX])dnl
+AC_MSG_CHECKING([how to run the C++ preprocessor])
AC_LANG_ASSERT(C++)dnl
if test -z "$CXXCPP"; then
AC_CACHE_VAL(ac_cv_prog_CXXCPP,
Index: tests/compile.at
===================================================================
RCS file: /cvs/autoconf/tests/compile.at,v
retrieving revision 1.7
diff -u -u -r1.7 compile.at
--- tests/compile.at 2000/12/15 10:55:10 1.7
+++ tests/compile.at 2000/12/15 11:40:35
@@ -7,6 +7,36 @@
# primitive, so check those first.
+## ------------ ##
+## C keywords. ##
+## ------------ ##
+
+# GCC supports `const', `volatile', and `inline'.
+AT_CHECK_MACRO([C keywords],
+[[AC_PROG_CC
+AC_C_CONST
+AC_C_INLINE
+AC_C_VOLATILE
+case "$GCC,$ac_cv_c_const,$ac_cv_c_inline,$ac_cv_c_volatile" in
+ yes,*no*)
+ AC_MSG_ERROR([failed to detect `const', `inline' or `volatile' support]);;
+esac]])
+
+
+
+## --------------------------------- ##
+## AC_PROG_CPP requires AC_PROG_CC. ##
+## --------------------------------- ##
+
+# Must invoke AC_PROG_CC.
+AT_CHECK_MACRO([AC_PROG_CPP requires AC_PROG_CC],
+[[AC_PROG_CPP
+test -n "$CC" &&
+ AC_MSG_ERROR([looked for a C preprocessor without looking for a compiler])
+]])
+
+
+
## --------------------------- ##
## AC_PROG_CPP with warnings. ##
## --------------------------- ##
@@ -82,23 +112,6 @@
[AC_MSG_ERROR([cannot find `exit'])])
AC_TRY_LINK_FUNC(Be_doomed_if_your_libc_has_a_function_named_like_this,
[AC_MSG_ERROR([found a nonexistent function])])])
-
-
-
-## ------------ ##
-## C keywords. ##
-## ------------ ##
-
-# GCC supports `const', `volatile', and `inline'.
-AT_CHECK_MACRO([C keywords],
-[[AC_PROG_CC
-AC_C_CONST
-AC_C_INLINE
-AC_C_VOLATILE
-case "$GCC,$ac_cv_c_const,$ac_cv_c_inline,$ac_cv_c_volatile" in
- yes,*no*)
- AC_MSG_ERROR([failed to detect `const', `inline' or `volatile' support]);;
-esac]])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: AC_PROG_CPP requires AC_PROG_CC,
Akim Demaille <=