mirror of
git://git.sv.gnu.org/autoconf
synced 2024-12-15 02:20:10 +08:00
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. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
This commit is contained in:
parent
d882037ec0
commit
e65a39811a
@ -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.
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user