From: Bruno Haible Date: Fri, 9 Jun 2006 20:26:31 +0000 (+0000) Subject: php versions without gettext built-in cannot pass the test. X-Git-Tag: v0.15~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6098ff68112729d0e86cbfcd879475d2469124a8;p=thirdparty%2Fgettext.git php versions without gettext built-in cannot pass the test. --- diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index aa6b6e545..23e465f5e 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,8 @@ +2006-06-04 Bruno Haible + + * lang-php: Skip the test if php does not have the 'gettext' module + built-in. + 2006-06-04 Bruno Haible * lang-gawk: Require gawk-3.1.3 or newer. diff --git a/gettext-tools/tests/lang-php b/gettext-tools/tests/lang-php index a42f944b7..992c19200 100755 --- a/gettext-tools/tests/lang-php +++ b/gettext-tools/tests/lang-php @@ -65,7 +65,7 @@ test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES : ${MSGFMT=msgfmt} ${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po -# Test for presence of php version 4.0 or newer. +# Test for presence of php version 4.0 or newer with gettext support. (php -v) >/dev/null 2>/dev/null test $? -le 1 \ || { echo "Skipping test: php not found"; rm -fr $tmpfiles; exit 77; } @@ -73,6 +73,10 @@ case `php -v | sed -n -e 1p | sed -e 's/^[^0-9]*//'` in [4-9].*) ;; *) echo "Skipping test: php version too old"; rm -fr $tmpfiles; exit 77;; esac +{ php -m | grep '^gettext$' >/dev/null; } \ + || { echo "Skipping test: php was built without gettext support" + rm -fr $tmpfiles; exit 77 + } # Test which of the fr_FR locales are installed. : ${LOCALE_FR=fr_FR}