* 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>
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.
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