]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Require a C++ compiler with namespaces support.
authorBruno Haible <bruno@clisp.org>
Mon, 11 Nov 2002 20:56:11 +0000 (20:56 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:08:51 +0000 (12:08 +0200)
ChangeLog
configure.in

index 6d8decda39f17bc0965f8073c555066492246b01..d259b7bb8111a3c35ea19356c8c55ea58cef4c69 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,8 +10,8 @@
 2002-10-27  Bruno Haible  <bruno@clisp.org>
 
        * libasprintf: New subdirectory.
-       * configure.in (CXX): Adjust to match the result in the libasprintf
-       subdirectory.
+       * configure.in (CXX): Adjust to match the result in and the
+       requirements of the libasprintf subdirectory.
        (SUBDIR_libasprintf): New AC_SUBST.
        (AC_CONFIG_SUBDIRS): Recurse into libasprintf.
        * Makefile.am (SUBDIRS): Add libasprintf conditionally.
index 76d51e33884de87358d43772f01bb8fcb343e63c..ca07c27cb224a7284e6b24a27e08226fbf656652 100644 (file)
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.52)
 AC_INIT
 AC_CONFIG_SRCDIR(src/msgfmt.c)
-AM_INIT_AUTOMAKE(gettext, 0.11.6-pre1)
+AM_INIT_AUTOMAKE(gettext, 0.11.6-pre2)
 RELEASE_DATE=2002-08-06      dnl in "date +%Y-%m-%d" format
 AM_CONFIG_HEADER(config.h)
 
@@ -206,6 +206,27 @@ if test "$CXX" != ":"; then
   AC_MSG_RESULT($ac_cv_prog_cxx_works)
   if test $ac_cv_prog_cxx_works = no; then
     CXX=:
+  else
+    dnl Test for namespaces. Both libasprintf and tests/lang-c++ need it.
+    dnl We don't bother supporting pre-ANSI-C++ compilers.
+    AC_MSG_CHECKING([whether the C++ compiler supports namespaces])
+    AC_LANG_PUSH(C++)
+    cat <<EOF > conftest.$ac_ext
+#include <iostream.h>
+namespace test { using namespace std; }
+int main () { return 0; }
+EOF
+    if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+      gt_cv_prog_cxx_namespaces=yes
+    else
+      gt_cv_prog_cxx_namespaces=no
+    fi
+    rm -fr conftest*
+    AC_LANG_POP(C++)
+    AC_MSG_RESULT($gt_cv_prog_cxx_namespaces)
+    if test $gt_cv_prog_cxx_namespaces = no; then
+      CXX=:
+    fi
   fi
 fi