]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Skip `Multiple languages' test if CC is a C++ compiler.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 10 Apr 2009 14:44:08 +0000 (16:44 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 10 Apr 2009 14:44:08 +0000 (16:44 +0200)
* tests/compile.at (Multiple languages): Before starting the
test proper, build and run a configure script that tests the
C compiler only, and skips the test if this is found to be a
C++ compiler.
Report by Eric Blake.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
tests/compile.at

index 5daf08b5977197077e5bc3540ebc3492788b5fc4..3272e5f6cf212f6fb20e3cf546f158e127406988 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2009-04-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       Skip `Multiple languages' test if CC is a C++ compiler.
+       * tests/compile.at (Multiple languages): Before starting the
+       test proper, build and run a configure script that tests the
+       C compiler only, and skips the test if this is found to be a
+       C++ compiler.
+       Report by Eric Blake.
+
        Note that AC_DEFUN is needed for aclocal.
        * doc/autoconf.texi (Coding Style): Public third-party macros
        should be AC_DEFUN'ed.
index 628996002bc53ba5b76e7373cf6d5f92129da6f7..6ca4ef433d9ebebc3d65bfd8e8893a82ae1ca047 100644 (file)
@@ -203,6 +203,22 @@ AC_TRY_LINK_FUNC(Be_doomed_if_your_libc_has_a_function_named_like_this,
 
 AT_SETUP([Multiple languages])
 
+# This test should be skipped if the C compiler is a C++ compiler.
+AT_DATA([configure.ac],
+[[AC_INIT
+
+AC_PROG_CC
+AC_COMPILE_IFELSE([
+  AC_LANG_PROGRAM([[
+    #ifdef __cplusplus
+    choke me
+    #endif
+  ]])], [], AS_EXIT([77]))
+]])
+
+AT_CHECK_AUTOCONF
+AT_CHECK_CONFIGURE
+
 AT_DATA([configure.ac],
 [[AC_INIT