]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Skip the lang-c++ test if configuring with --disable-libasprintf.
authorBruno Haible <bruno@clisp.org>
Sat, 27 Dec 2003 17:08:54 +0000 (17:08 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:11:32 +0000 (12:11 +0200)
gettext-tools/ChangeLog
gettext-tools/configure.ac
gettext-tools/tests/ChangeLog
gettext-tools/tests/Makefile.am
gettext-tools/tests/lang-c++

index 838b2bde2d71787e986419e936e6211b49e2dda0..b6f32a22f2f767c63ee645d04f4da936763b9cbb 100644 (file)
@@ -1,3 +1,7 @@
+2003-12-27  Bruno Haible  <bruno@clisp.org>
+
+       * configure.ac: Set and AC_SUBST the TESTLIBASPRINTF variable.
+
 2003-12-12  Bruno Haible  <bruno@clisp.org>
 
        Assume automake-1.8.
index 80c1387b97c872fefb9f3995dfdb5e396413ab7f..997a7539d527c10f84ca31c4cc144fd105640942 100644 (file)
@@ -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
index 3d4e1e335ee89383023db9cd916ae214ffafdcd5..04ac83ff22e5a92cce17aa26f3eccea393089497 100644 (file)
@@ -1,3 +1,9 @@
+2003-12-27  Bruno Haible  <bruno@clisp.org>
+
+       * lang-c++: Skip the test if TESTLIBASPRINTF is not set to "yes".
+       * Makefile.am (TESTS_ENVIRONMENT): Also set TESTLIBASPRINTF.
+       Reported by Adrian Bunk <bunk@fs.tum.de>.
+
 2003-12-12  Bruno Haible  <bruno@clisp.org>
 
        Assume automake-1.8.
index ba134821b57e5955e912e817d209d781ca27c4f0..5f90ea7c63a902b186dfaa72d6e2b643017bf043 100644 (file)
@@ -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)
index aa2e8f3520dcee2ff6ca9f4ec2649a3ec386ed69..496ad2f1874788a66e5969135c9532634e4402dc 100755 (executable)
@@ -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