On MacOS X, with GNU gettext 0.15 installed, in a German environment, "make; make install; make check" fails:
Making check in tests make check-TESTS PASS: greeting-1 1c1 < Hello, world! --- > Hallo, Welt! FAIL: hello-1 1c1 < hello, world --- > hallo, Welt FAIL: traditional-1 ================================== 2 of 3 tests failed Please report to [email protected] ================================== make[2]: *** [check-TESTS] Error 1 make[1]: *** [check-am] Error 2 make: *** [check-recursive] Error 1 The reason is that the default locale (= the locale in effect when none of the LC_*, LANG environments are set - see POSIX) is different from the C locale (see POSIX also). Citing http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html#tag_07_02 : "POSIX Locale The POSIX locale can be specified by assigning to the appropriate environment variables the values "C" or "POSIX" . All implementations shall define a locale as the default locale, to be invoked when no environment variables are set, or set to the empty string. This default locale can be the POSIX locale or any other implementation-defined locale. Some implementations may provide facilities for local installation administrators to set the default locale ..." Here is the fix. As a side effect, you can see which tests need to run in the C locale and which don't :-) tests/ChangeLog: 2006-08-21 Bruno Haible <[EMAIL PROTECTED]> * greeting-1: Remove locale setting. This test must work in all locales. * hello-1: Run the test in the C locale, not in the default locale. * traditional-1: Likewise. *** tests/greeting-1.bak Sun Aug 13 17:01:47 2006 --- tests/greeting-1 Tue Aug 22 02:45:12 2006 *************** *** 9,20 **** trap 'rm -fr $tmpfiles' 1 2 3 15 - LANGUAGE= - LC_ALL= - LC_MESSAGES= - LANG= - export LANGUAGE LC_ALL LC_MESSAGES LANG - tmpfiles="greeting-test1.ok" cat <<EOF > greeting-test1.ok Nothing happens here. --- 9,14 ---- *** tests/hello-1.bak Sun Aug 13 16:58:47 2006 --- tests/hello-1 Tue Aug 22 02:45:19 2006 *************** *** 11,17 **** trap 'rm -fr $tmpfiles' 1 2 3 15 LANGUAGE= ! LC_ALL= LC_MESSAGES= LANG= export LANGUAGE LC_ALL LC_MESSAGES LANG --- 11,17 ---- trap 'rm -fr $tmpfiles' 1 2 3 15 LANGUAGE= ! LC_ALL=C LC_MESSAGES= LANG= export LANGUAGE LC_ALL LC_MESSAGES LANG *** tests/traditional-1.bak Sun Aug 13 17:01:24 2006 --- tests/traditional-1 Tue Aug 22 02:45:24 2006 *************** *** 10,16 **** trap 'rm -fr $tmpfiles' 1 2 3 15 LANGUAGE= ! LC_ALL= LC_MESSAGES= LANG= export LANGUAGE LC_ALL LC_MESSAGES LANG --- 10,16 ---- trap 'rm -fr $tmpfiles' 1 2 3 15 LANGUAGE= ! LC_ALL=C LC_MESSAGES= LANG= export LANGUAGE LC_ALL LC_MESSAGES LANG
