diff --git a/ChangeLog b/ChangeLog index 64fbe92a..8eef61de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-10-16 Paolo Bonzini + + Add a testcase using more then one language. + * tests/compile.at (Multiple languages): New test. + 2008-10-16 Paolo Bonzini Fix Libtool's config.lt test. diff --git a/tests/compile.at b/tests/compile.at index 715fde88..6ee22ae4 100644 --- a/tests/compile.at +++ b/tests/compile.at @@ -150,3 +150,41 @@ AT_CHECK_MACRO([AC_TRY_LINK_FUNC], [AC_MSG_ERROR([cannot find `printf'])]) AC_TRY_LINK_FUNC(Be_doomed_if_your_libc_has_a_function_named_like_this, [AC_MSG_ERROR([found a nonexistent function])])]) + +## -------------------- ## +## Multiple languages. ## +## -------------------- ## + +AT_SETUP([Multiple languages]) + +AT_DATA([configure.ac], +[[AC_INIT + +AC_PROG_CC +AC_PROG_CXX + +AC_LANG_PUSH(C) +AC_MSG_CHECKING([a simple C program that is not valid C++]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([enum a { A, B, C }; + enum a f(enum a in) { return in++; }], [])], + [AC_MSG_RESULT([ok])], + [AC_MSG_RESULT([failed]) + AC_MSG_ERROR([could not compile test program])]) +AC_LANG_POP(C) + +AC_LANG_PUSH(C++) +AC_MSG_CHECKING([a simple C++ program that is not valid C]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([class A {};], [])], + [AC_MSG_RESULT([ok])], + [AC_MSG_RESULT([failed]) + AC_MSG_ERROR([could not compile test program])]) + +AC_CHECK_HEADER([cstring]) +AC_LANG_POP(C++) +]]) + +AT_CHECK_AUTOCONF +AT_CHECK_CONFIGURE([-q]) + +AT_CLEANUP +