From: Bruno Haible Date: Wed, 12 Dec 2001 11:55:56 +0000 (+0000) Subject: Avoid unnecessary test failures. X-Git-Tag: v0.11~197 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b2c64ef29f7b1aa4db9afe6a9eb1a190827c114;p=thirdparty%2Fgettext.git Avoid unnecessary test failures. --- diff --git a/ChangeLog b/ChangeLog index db7de7c39..5bef7d25c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-12-11 Bruno Haible + + * configure.in: Use a variant of AC_PROG_CXX_WORKS that doesn't abort + upon failure. + 2001-12-11 Bruno Haible * configure.in: Change version number to 0.11-pre3. diff --git a/configure.in b/configure.in index 819ead43c..fe1889eea 100644 --- a/configure.in +++ b/configure.in @@ -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. diff --git a/m4/ChangeLog b/m4/ChangeLog index a8e996980..2641aa326 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,7 @@ +2001-12-11 Bruno Haible + + * javacomp.m4 (gt_JAVACOMP): Fix typo in jikes test. + 2001-12-11 Bruno Haible * gettext.m4 (AM_PO_SUBDIRS): Don't insert obsolete Rules-* files into diff --git a/m4/javacomp.m4 b/m4/javacomp.m4 index 732641a57..04a8a956d 100644 --- a/m4/javacomp.m4 +++ b/m4/javacomp.m4 @@ -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" diff --git a/tests/ChangeLog b/tests/ChangeLog index 200e62751..46a89173f 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,13 @@ +2001-12-11 Bruno Haible + + * 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 * lang-objc: If the locale couldn't be set, exit with code 77, not 1. diff --git a/tests/lang-c++ b/tests/lang-c++ index 47df59f48..cf2ee8bf8 100755 --- a/tests/lang-c++ +++ b/tests/lang-c++ @@ -17,6 +17,7 @@ cat <<\EOF > prog.cc #include #include #include +#include #include #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 diff --git a/tests/lang-java b/tests/lang-java index 9a09b3406..f9abd65db 100755 --- a/tests/lang-java +++ b/tests/lang-java @@ -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.")); diff --git a/tests/lang-objc b/tests/lang-objc index df3347e2d..e798403e0 100755 --- a/tests/lang-objc +++ b/tests/lang-objc @@ -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"