From: Bruno Haible Date: Mon, 11 Nov 2002 20:56:11 +0000 (+0000) Subject: Require a C++ compiler with namespaces support. X-Git-Tag: v0.12~1216 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f29a54cc5be4acf9c49f55f8a7253858318eac4;p=thirdparty%2Fgettext.git Require a C++ compiler with namespaces support. --- diff --git a/ChangeLog b/ChangeLog index 6d8decda3..d259b7bb8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,8 +10,8 @@ 2002-10-27 Bruno Haible * 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. diff --git a/configure.in b/configure.in index 76d51e338..ca07c27cb 100644 --- a/configure.in +++ b/configure.in @@ -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 < conftest.$ac_ext +#include +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