[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
C++ fix and test
From: |
Pavel Roskin |
Subject: |
C++ fix and test |
Date: |
Mon, 18 Dec 2000 01:21:29 -0500 (EST) |
Hello!
This patch should close a long standing bug with C++. Also it adds the
first test involving a C++ compiler.
ChangeLog:
* aclang.m4: (AC_LANG_SOURCE(C++)): Don't declare exit().
Define it as a macro.
* tests/compile.at: (AC_CHECK_LIB, C++): Test for AC_CHECK_LIB
when the current language is C++.
Regards,
Pavel Roskin
_________________________________
Index: aclang.m4
--- aclang.m4
+++ aclang.m4
@@ -423,7 +423,8 @@
[#line __oline__ "configure"
#include "confdefs.h"
#ifdef __cplusplus
-extern "C" void exit (int);
+#undef exit
+#define exit(x) return (x)
#endif
$1])
Index: tests/compile.at
--- tests/compile.at
+++ tests/compile.at
@@ -115,6 +115,24 @@
+## -------------- ##
+## C++ Compiler. ##
+## -------------- ##
+
+
+# AC_CHECK_LIB, C++
+# -----------------
+# `cos' should be either in libc or in libm.
+# The compiler can issue warnings about `cos' being defined differently,
+# but configure should find it.
+AT_CHECK_MACRO([AC_CHECK_LIB, C++],
+[AC_LANG(C++)
+AC_TRY_LINK_FUNC(cos, [AS_EXIT(0)])
+AC_CHECK_LIB(m, cos,,
+ [AC_MSG_ERROR([cannot find `cos'])])])
+
+
+
## --------------------- ##
## Fortran 77 Compiler. ##
## --------------------- ##
_________________________________
- C++ fix and test,
Pavel Roskin <=
- Re: C++ fix and test, Alexandre Oliva, 2000/12/18
- Re: C++ fix and test, Pavel Roskin, 2000/12/18
- Re: C++ fix and test, Alexandre Oliva, 2000/12/18
- Re: C++ fix and test, Akim Demaille, 2000/12/19
- Re: C++ fix and test, Pavel Roskin, 2000/12/19
- Re: C++ fix and test, Alexandre Oliva, 2000/12/20
- Re: C++ fix and test, Akim Demaille, 2000/12/20
- Re: C++ fix and test, Alexandre Oliva, 2000/12/20
- Re: C++ fix and test, Akim Demaille, 2000/12/20
- Re: C++ fix and test, Alexandre Oliva, 2000/12/20