]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Avoid unnecessary test failures.
authorBruno Haible <bruno@clisp.org>
Wed, 12 Dec 2001 11:55:56 +0000 (11:55 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jun 2009 21:42:59 +0000 (23:42 +0200)
ChangeLog
configure.in
m4/ChangeLog
m4/javacomp.m4
tests/ChangeLog
tests/lang-c++
tests/lang-java
tests/lang-objc

index db7de7c39f61e1d2715d4fec5348a6bd49b96692..5bef7d25c5c4f3b8acd32261fa33248c41c32873 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-12-11  Bruno Haible  <bruno@clisp.org>
+
+       * configure.in: Use a variant of AC_PROG_CXX_WORKS that doesn't abort
+       upon failure.
+
 2001-12-11  Bruno Haible  <bruno@clisp.org>
 
        * configure.in: Change version number to 0.11-pre3.
index 819ead43cf03fda695f53fe3c38a7f2a580eeee5..fe1889eea632fa755ba1d5bbc7cedf8bd103476c 100644 (file)
@@ -113,7 +113,17 @@ AC_SUBST(CROSS_COMPILING)
 dnl Checks for optional programs for the tests/lang-* tests.
 AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, :)
 if test "$CXX" != ":"; then
-  AC_PROG_CXX_WORKS
+  dnl Use a modified version of AC_PROG_CXX_WORKS that does not exit
+  dnl upon failure.
+  AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works])
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+  AC_TRY_COMPILER([int main(){return(0);}], ac_cv_prog_cxx_works, ac_cv_prog_cxx_cross)
+  AC_LANG_RESTORE
+  AC_MSG_RESULT($ac_cv_prog_cxx_works)
+  if test $ac_cv_prog_cxx_works = no; then
+    CXX=:
+  fi
 fi
 
 dnl Generate the version information file in the intl/ directory.
index a8e996980828b30c628c96b28d208b6c4acca1d4..2641aa326f0ac5936fe6df9f0b71c21aebaa841c 100644 (file)
@@ -1,3 +1,7 @@
+2001-12-11  Bruno Haible  <bruno@clisp.org>
+
+       * javacomp.m4 (gt_JAVACOMP): Fix typo in jikes test.
+
 2001-12-11  Bruno Haible  <bruno@clisp.org>
 
        * gettext.m4 (AM_PO_SUBDIRS): Don't insert obsolete Rules-* files into
index 732641a573b39f4ab15fc3642045708a70aead36..04a8a956d52e5c242ee2212cfe56b99794a4f59c 100644 (file)
@@ -46,10 +46,10 @@ public class conftest {
 }
 EOF
             unset JAVA_HOME
-            jikes conftest.java
+            jikes conftest.java 2>/dev/null
             error=$?
             rm -f conftest.java conftest.class
-            exit $?
+            exit $error
            ); then
           HAVE_JIKES=1
           ac_result="jikes"
index 200e62751addec06ab88b73cbd2eec1ddfc64620..46a89173f71bccbfbc83d76db2988aa896efd36c 100644 (file)
@@ -1,3 +1,13 @@
+2001-12-11  Bruno Haible  <bruno@clisp.org>
+
+       * lang-c++: Don't use ostream::form, it's a g++ 2.x extension not
+       present in ISO C++ or g++ 3.x.
+       * lang-objc: Drop error messages that can result from attempting to
+       compile an ObjectiveC program.
+       * lang-java: Set the default locale by hand. Some systems, like
+       Solaris, are not capable of setting the locale according to LC_ALL
+       by themselves.
+
 2001-12-11  Bruno Haible  <bruno@clisp.org>
 
        * lang-objc: If the locale couldn't be set, exit with code 77, not 1.
index 47df59f48b8fe6ca9f373988e3b98e105c13a4d4..cf2ee8bf80de21f660dc34ff39d5f28369be525a 100755 (executable)
@@ -17,6 +17,7 @@ cat <<\EOF > prog.cc
 #include <iostream.h>
 #include <libintl.h>
 #include <locale.h>
+#include <stdio.h>
 #include <stdlib.h>
 #define _(string) gettext (string)
 
@@ -35,11 +36,11 @@ int main (int argc, char *argv[])
 
   cout << _("'Your command, please?', asked the waiter.") << endl;
 
-  cout.form (ngettext ("a piece of cake", "%d pieces of cake", n), n);
-  cout << endl;
+  printf (ngettext ("a piece of cake", "%d pieces of cake", n), n);
+  printf ("\n");
 
-  cout.form (_("%s is replaced by %s."), "FF", "EUR");
-  cout << endl;
+  printf (_("%s is replaced by %s."), "FF", "EUR");
+  printf ("\n");
 }
 EOF
 
index 9a09b340677c5b92fb5565b73f0ff4f5f7549fb7..f9abd65dbbb2a6348fb6bc6d8e47af45a7a14b59 100755 (executable)
@@ -18,6 +18,9 @@ import gnu.gettext.*;
 
 public class Program {
   public static void main (String[] args) {
+    // Some systems (like Solaris) don't set Locale.getDefault()
+    // as specified by LC_ALL. So set it by hand.
+    Locale.setDefault(new Locale("fr","FR"));
     int n = Integer.parseInt(args[0]);
     ResourceBundle catalog = ResourceBundle.getBundle("prog");
     System.out.println(GettextResource.gettext(catalog,"'Your command, please?', asked the waiter."));
index df3347e2d3a5589b92ac5cb0579d6db261b31618..e798403e05d046f32567ed190469ac56040669f1 100755 (executable)
@@ -18,7 +18,7 @@ int main ()
   exit (0);
 }
 EOF
-${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o hello hello.m \
+${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o hello hello.m 2>/dev/null \
   || { echo "SKIP: lang-objc"; rm -fr $tmpfiles; exit 77; }
 
 tmpfiles="$tmpfiles prog.m"