From: Bruno Haible Date: Sat, 27 Dec 2003 17:08:54 +0000 (+0000) Subject: Skip the lang-c++ test if configuring with --disable-libasprintf. X-Git-Tag: v0.14~105 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82d6332c7609113b9bd4d76efd5daac03be2ccd8;p=thirdparty%2Fgettext.git Skip the lang-c++ test if configuring with --disable-libasprintf. --- diff --git a/gettext-tools/ChangeLog b/gettext-tools/ChangeLog index 838b2bde2..b6f32a22f 100644 --- a/gettext-tools/ChangeLog +++ b/gettext-tools/ChangeLog @@ -1,3 +1,7 @@ +2003-12-27 Bruno Haible + + * configure.ac: Set and AC_SUBST the TESTLIBASPRINTF variable. + 2003-12-12 Bruno Haible Assume automake-1.8. diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac index 80c1387b9..997a7539d 100644 --- a/gettext-tools/configure.ac +++ b/gettext-tools/configure.ac @@ -217,6 +217,22 @@ dnl Checks for optional programs for the tests/lang-* tests. gt_PROG_ANSI_CXX gt_LOCALE_FR +dnl Check whether to execute tests that rely on libasprintf. +dnl This test must be consistent with gettext-runtime/configure.ac. +if test "${enable_libasprintf+set}" = set; then + if test "$enable_libasprintf" != no; then + TESTLIBASPRINTF=yes + else + TESTLIBASPRINTF=no + fi +else + TESTLIBASPRINTF=yes +fi +if test "$CXX" = ":"; then + TESTLIBASPRINTF=no +fi +AC_SUBST(TESTLIBASPRINTF) + dnl Generate the version information file in the intl/ directory. test -d intl || mkdir intl echo "GNU gettext library from gettext-$VERSION" > intl/VERSION diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index 3d4e1e335..04ac83ff2 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,9 @@ +2003-12-27 Bruno Haible + + * lang-c++: Skip the test if TESTLIBASPRINTF is not set to "yes". + * Makefile.am (TESTS_ENVIRONMENT): Also set TESTLIBASPRINTF. + Reported by Adrian Bunk . + 2003-12-12 Bruno Haible Assume automake-1.8. diff --git a/gettext-tools/tests/Makefile.am b/gettext-tools/tests/Makefile.am index ba134821b..5f90ea7c6 100644 --- a/gettext-tools/tests/Makefile.am +++ b/gettext-tools/tests/Makefile.am @@ -136,6 +136,7 @@ TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) \ CPPFLAGS='@CPPFLAGS@' LDFLAGS='@LDFLAGS@' \ LTLIBINTL='@LTLIBINTL@' \ TESTJAVA='@TESTJAVA@' \ + TESTLIBASPRINTF='@TESTLIBASPRINTF@' \ LOCALE_FR='@LOCALE_FR@' \ CONFIG_SHELL='$(SHELL)' \ $(SHELL) diff --git a/gettext-tools/tests/lang-c++ b/gettext-tools/tests/lang-c++ index aa2e8f352..496ad2f18 100755 --- a/gettext-tools/tests/lang-c++ +++ b/gettext-tools/tests/lang-c++ @@ -7,10 +7,9 @@ tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 -# Test whether a C++ compiler is found. -if test "${CXX}" = ":"; then - exit 77 -fi +# Test whether a C++ compiler is found and libasprintf is built. +test "${CXX}" != ":" || exit 77 +test "${TESTLIBASPRINTF}" = yes || exit 77 tmpfiles="$tmpfiles prog.cc" cat <<\EOF > prog.cc