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.
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)
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