+2006-06-03 Bruno Haible <bruno@clisp.org>
+
+ Explain why tests are skipped.
+ * Makefile.am (TESTS_ENVIRONMENT): Also define JAVA_CHOICE, BUILDJAVA,
+ CSHARPCHOICE, BUILDCSHARP.
+ * testlocale.c (main): Don't print "Couldn't set locale.".
+ * format-c-5-prg.c (main): Likewise.
+ * format-c-5: Print a message explaining why the test is skipped.
+ * gettext-3: Likewise.
+ * gettext-4: Likewise.
+ * gettext-5: Likewise.
+ * gettext-6: Likewise.
+ * gettext-7: Likewise.
+ * lang-bash: Likewise.
+ * lang-clisp: Likewise.
+ * lang-csharp: Likewise.
+ * lang-gawk: Likewise.
+ * lang-guile: Likewise.
+ * lang-java: Likewise.
+ * lang-librep: Likewise.
+ * lang-pascal: Likewise.
+ * lang-perl-1: Likewise.
+ * lang-perl-2: Likewise.
+ * lang-php: Likewise.
+ * lang-python-1: Likewise.
+ * lang-python-2: Likewise.
+ * lang-sh: Likewise.
+ * lang-smalltalk: Likewise.
+ * lang-tcl: Likewise.
+ * msgfilter-1: Likewise.
+ * msgfilter-2: Likewise.
+ * msgfilter-3: Likewise.
+ * msgfilter-4: Likewise.
+ * msgunfmt-csharp-1: Likewise.
+ * msgunfmt-java-1: Likewise.
+ * msgunfmt-tcl-1: Likewise.
+ * recode-sr-latin-1: Likewise.
+ * recode-sr-latin-2: Likewise.
+ * xgettext-glade-1: Likewise.
+ * xgettext-glade-2: Likewise.
+ * xgettext-glade-3: Likewise.
+ * lang-c: Print a message explaining why the test is skipped. Don't
+ print "Couldn't set locale.".
+ * lang-c++: Likewise.
+ * lang-objc: Likewise.
+
2006-05-31 Bruno Haible <bruno@clisp.org>
* xgettext-ycp-3: New file, from Karl Eichwalder <ke@suse.de>.
CXX='@CXX@' CXXFLAGS='@CXXFLAGS@' \
CPPFLAGS='@CPPFLAGS@' LDFLAGS='@LDFLAGS@' \
LTLIBINTL='@LTLIBINTL@' \
+ JAVA_CHOICE='@JAVA_CHOICE@' \
+ BUILDJAVA='@BUILDJAVA@' \
TESTJAVA='@TESTJAVA@' \
+ CSHARP_CHOICE='@CSHARP_CHOICE@' \
+ BUILDCSHARP='@BUILDCSHARP@' \
TESTCSHARP='@TESTCSHARP@' \
TESTLIBASPRINTF='@TESTLIBASPRINTF@' \
LOCALE_FR='@LOCALE_FR@' \
LANGUAGE= ./fc5 fa_IR
case $? in
0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
+ 77)
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: locale fa_IR not installed"
+ else
+ echo "Skipping test: locale fa_IR not supported"
+ fi
+ rm -fr $tmpfiles; exit 77;;
*) exit 1;;
esac
/* Test program, used by the format-c-5 test.
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
xsetenv ("LC_ALL", argv[1], 1);
if (setlocale (LC_ALL, "") == NULL)
- {
- fprintf (stderr, "Couldn't set locale.\n");
- exit (77);
- }
+ /* Couldn't set locale. */
+ exit (77);
textdomain ("fc5");
bindtextdomain ("fc5", ".");
trap 'rm -fr $tmpfiles' 1 2 3 15
# This test works only on glibc systems.
-grep '@GLIBC2@.*yes' ../config.status >/dev/null || exit 77
+grep '@GLIBC2@.*yes' ../config.status >/dev/null || {
+ echo "Skipping test: not a glibc system"
+ exit 77
+}
# This test works only on systems that have a de_DE and fr_FR locale installed.
-LC_ALL=de_DE ./testlocale || exit 77
-LC_ALL=fr_FR ./testlocale || exit 77
+LC_ALL=de_DE ./testlocale || {
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: locale de_DE not installed"
+ else
+ echo "Skipping test: locale de_DE not supported"
+ fi
+ exit 77
+}
+LC_ALL=fr_FR ./testlocale || {
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: locale fr_FR not installed"
+ else
+ echo "Skipping test: locale fr_FR not supported"
+ fi
+ exit 77
+}
tmpfiles="$tmpfiles de_DE fr_FR"
test -d de_DE || mkdir de_DE
trap 'rm -fr $tmpfiles' 1 2 3 15
# This test works only on systems that have a de_DE.ISO-8859-1 locale installed.
-LC_ALL=de_DE.ISO-8859-1 ./testlocale || exit 77
+LC_ALL=de_DE.ISO-8859-1 ./testlocale || {
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: locale de_DE.ISO-8859-1 not installed"
+ else
+ echo "Skipping test: locale de_DE.ISO-8859-1 not supported"
+ fi
+ exit 77
+}
tmpfiles="$tmpfiles de_DE"
test -d de_DE || mkdir de_DE
trap 'rm -fr $tmpfiles' 1 2 3 15
# This test works only on glibc systems.
-grep '@GLIBC2@.*yes' ../config.status >/dev/null || exit 77
+grep '@GLIBC2@.*yes' ../config.status >/dev/null || {
+ echo "Skipping test: not a glibc system"
+ exit 77
+}
# This test works only on systems that have a de_DE.ISO-8859-1 and
# de_DE.UTF-8 locale installed.
-LC_ALL=de_DE.ISO-8859-1 ./testlocale || exit 77
-LC_ALL=de_DE.UTF-8 ./testlocale || exit 77
+LC_ALL=de_DE.ISO-8859-1 ./testlocale || {
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: locale de_DE.ISO-8859-1 not installed"
+ else
+ echo "Skipping test: locale de_DE.ISO-8859-1 not supported"
+ fi
+ exit 77
+}
+LC_ALL=de_DE.UTF-8 ./testlocale || {
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: locale de_DE.UTF-8 not installed"
+ else
+ echo "Skipping test: locale de_DE.UTF-8 not supported"
+ fi
+ exit 77
+}
tmpfiles="$tmpfiles de_DE"
test -d de_DE || mkdir de_DE
trap 'rm -fr $tmpfiles' 1 2 3 15
# This test works only on glibc systems.
-grep '@GLIBC2@.*yes' ../config.status >/dev/null || exit 77
+grep '@GLIBC2@.*yes' ../config.status >/dev/null || {
+ echo "Skipping test: not a glibc system"
+ exit 77
+}
# This test works only on systems that have a de_DE and fr_FR locale installed.
-LC_ALL=de_DE ./testlocale || exit 77
-LC_ALL=fr_FR ./testlocale || exit 77
+LC_ALL=de_DE ./testlocale || {
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: locale de_DE not installed"
+ else
+ echo "Skipping test: locale de_DE not supported"
+ fi
+ exit 77
+}
+LC_ALL=fr_FR ./testlocale || {
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: locale fr_FR not installed"
+ else
+ echo "Skipping test: locale fr_FR not supported"
+ fi
+ exit 77
+}
tmpfiles="$tmpfiles de_DE fr_FR"
test -d de_DE || mkdir de_DE
trap 'rm -fr $tmpfiles' 1 2 3 15
# This test works only on glibc systems.
-grep '@GLIBC2@.*yes' ../config.status >/dev/null || exit 77
+grep '@GLIBC2@.*yes' ../config.status >/dev/null || {
+ echo "Skipping test: not a glibc system"
+ exit 77
+}
# This test works only on systems that have a de_DE.ISO-8859-1 and
# de_DE.UTF-8 locale installed.
-LC_ALL=de_DE.ISO-8859-1 ./testlocale || exit 77
-LC_ALL=de_DE.UTF-8 ./testlocale || exit 77
+LC_ALL=de_DE.ISO-8859-1 ./testlocale || {
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: locale de_DE.ISO-8859-1 not installed"
+ else
+ echo "Skipping test: locale de_DE.ISO-8859-1 not supported"
+ fi
+ exit 77
+}
+LC_ALL=de_DE.UTF-8 ./testlocale || {
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: locale de_DE.UTF-8 not installed"
+ else
+ echo "Skipping test: locale de_DE.UTF-8 not supported"
+ fi
+ exit 77
+}
tmpfiles="$tmpfiles de_DE"
test -d de_DE || mkdir de_DE
# Test for presence of bash version 2.0 or newer.
(bash -c :) >/dev/null 2>/dev/null \
- || { rm -fr $tmpfiles; exit 77; }
+ || { echo "Skipping test: bash not found"; rm -fr $tmpfiles; exit 77; }
case `bash -c 'echo $BASH_VERSION'` in
[2-9].*) ;;
- *) rm -fr $tmpfiles; exit 77;;
+ *) echo "Skipping test: bash version too old"; rm -fr $tmpfiles; exit 77;;
esac
# Test which of the fr_FR locales are installed.
esac
fi
if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french locale is installed"
+ else
+ echo "Skipping test: no french locale is supported"
+ fi
rm -fr $tmpfiles; exit 77
fi
if test $LOCALE_FR != none; then
LANGUAGE= LC_ALL=$LOCALE_FR bash ./prog.sh 2 > prog.out || exit 1
: ${DIFF=diff}
- ${DIFF} prog.nok prog.out > /dev/null && { rm -fr $tmpfiles; exit 77; }
+ ${DIFF} prog.nok prog.out > /dev/null && {
+ echo "Skipping test: bash is built without i18n support"
+ rm -fr $tmpfiles; exit 77
+ }
${DIFF} prog.ok prog.out || exit 1
fi
if test $LOCALE_FR_UTF8 != none; then
LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 bash ./prog.sh 2 > prog.out || exit 1
: ${DIFF=diff}
- ${DIFF} prog.nok prog.out > /dev/null && { rm -fr $tmpfiles; exit 77; }
+ ${DIFF} prog.nok prog.out > /dev/null && {
+ echo "Skipping test: bash is built without i18n support"
+ rm -fr $tmpfiles; exit 77
+ }
${DIFF} prog.oku prog.out || exit 1
fi
xsetenv ("LC_ALL", argv[1], 1);
if (setlocale (LC_ALL, "") == NULL)
- {
- fprintf (stderr, "Couldn't set locale.\n");
- exit (77);
- }
+ /* Couldn't set locale. */
+ exit (77);
textdomain ("prog");
bindtextdomain ("prog", ".");
esac
fi
if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french locale is installed"
+ else
+ echo "Skipping test: no french locale is supported"
+ fi
rm -fr $tmpfiles; exit 77
fi
trap 'rm -fr $tmpfiles' 1 2 3 15
# Test whether a C++ compiler is found and libasprintf is built.
-test "${CXX}" != ":" || exit 77
-test "${TESTLIBASPRINTF}" = yes || exit 77
+test "${CXX}" != ":" || {
+ echo "Skipping test: no C++ compiler found"
+ exit 77
+}
+test "${TESTLIBASPRINTF}" = yes || {
+ echo "Skipping test: configured with --disable-libasprintf"
+ exit 77
+}
tmpfiles="$tmpfiles prog.cc"
cat <<\EOF > prog.cc
xsetenv ("LC_ALL", argv[1], 1);
if (setlocale (LC_ALL, "") == NULL)
- {
- cerr << "Couldn't set locale." << endl;
- exit (77);
- }
+ // Couldn't set locale.
+ exit (77);
textdomain ("prog");
bindtextdomain ("prog", ".");
esac
fi
if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french locale is installed"
+ else
+ echo "Skipping test: no french locale is supported"
+ fi
rm -fr $tmpfiles; exit 77
fi
# Use clisp for the comparison of the version numbers; neither 'expr' nor 'bc'
# can deal with floating-point numbers.
(clisp --version) >/dev/null 2>/dev/null \
- || { rm -fr $tmpfiles; exit 77; }
+ || { echo "Skipping test: clisp not found"; rm -fr $tmpfiles; exit 77; }
version=`clisp --version | sed -n -e 1p | sed -e 's/^[^0-9]*//'`
case $version in
19* | 20*) # older than 2.25
- rm -fr $tmpfiles; exit 77;;
+ echo "Skipping test: clisp version too old"; rm -fr $tmpfiles; exit 77;;
esac
version=`echo $version | sed -e 's/^\([0-9]*\.[0-9]*\).*/\1/'`
clisp -norc -x "(sys::exit #+GETTEXT (not (>= $version 2.28)) #-GETTEXT t)" \
>/dev/null \
- || { rm -fr $tmpfiles; exit 77; }
+ || { echo "Skipping test: clisp was built without gettext support"
+ rm -fr $tmpfiles; exit 77
+ }
# Test which of the fr_FR locales are installed.
: ${LOCALE_FR=fr_FR}
esac
fi
if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french locale is installed"
+ else
+ echo "Skipping test: no french locale is supported"
+ fi
rm -fr $tmpfiles; exit 77
fi
trap 'rm -fr $tmpfiles' 1 2 3 15
# Test whether we can build and test C# programs.
-test "${TESTCSHARP}" = yes || exit 77
+test "${CSHARP_CHOICE}" != no || {
+ echo "Skipping test: configured with --disable-csharp"
+ exit 77
+}
+test "${BUILDCSHARP}" = yes || {
+ echo "Skipping test: C# compiler not found"
+ exit 77
+}
+test "${TESTCSHARP}" = yes || {
+ echo "Skipping test: C# engine not found"
+ exit 77
+}
tmpfiles="$tmpfiles program.cs"
cat <<\EOF > program.cs
esac
fi
if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french locale is installed"
+ else
+ echo "Skipping test: no french locale is supported"
+ fi
rm -fr $tmpfiles; exit 77
fi
# Test for presence of gawk version 3.1.1 or newer.
(gawk --version) >/dev/null 2>/dev/null \
- || { rm -fr $tmpfiles; exit 77; }
+ || { echo "Skipping test: gawk not found"; rm -fr $tmpfiles; exit 77; }
case `gawk --version 2>&1 | sed -e 's/^[^0-9]*//'` in
0.* | 1.* | 2.* | 3.0* | 3.1.0*)
- rm -fr $tmpfiles; exit 77;;
+ echo "Skipping test: gawk version too old"; rm -fr $tmpfiles; exit 77;;
esac
# Test which of the fr_FR locales are installed.
esac
fi
if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french locale is installed"
+ else
+ echo "Skipping test: no french locale is supported"
+ fi
rm -fr $tmpfiles; exit 77
fi
: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
if test $LOCALE_FR != none; then
LANGUAGE= LC_ALL=$LOCALE_FR gawk --version | grep logiciel > /dev/null
- test $? = 0 || { rm -fr $tmpfiles; exit 77; }
+ test $? = 0 || {
+ echo "Skipping test: gawk was built without i18n support"
+ rm -fr $tmpfiles; exit 77
+ }
fi
if test $LOCALE_FR_UTF8 != none; then
LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 gawk --version | grep logiciel > /dev/null
- test $? = 0 || { rm -fr $tmpfiles; exit 77; }
+ test $? = 0 || {
+ echo "Skipping test: gawk was built without i18n support"
+ rm -fr $tmpfiles; exit 77
+ }
fi
tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
# Test for presence of guile version 1.7 or newer.
(guile --version) >/dev/null 2>/dev/null \
- || { rm -fr $tmpfiles; exit 77; }
+ || { echo "Skipping test: guile not found"; rm -fr $tmpfiles; exit 77; }
case `guile --version | sed -e 1q | sed -e 's/^[^0-9]*//'` in
0.* | 1.[0-6] | 1.[0-6].* )
- rm -fr $tmpfiles; exit 77;;
+ echo "Skipping test: guile version too old"; rm -fr $tmpfiles; exit 77;;
esac
# Test which of the fr_FR locales are installed.
esac
fi
if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french locale is installed"
+ else
+ echo "Skipping test: no french locale is supported"
+ fi
rm -fr $tmpfiles; exit 77
fi
trap 'rm -fr $tmpfiles' 1 2 3 15
# Test whether we can build and test Java programs.
-test "${TESTJAVA}" = yes || exit 77
+test "${JAVA_CHOICE}" != no || {
+ echo "Skipping test: configured with --disable-java"
+ exit 77
+}
+test "${BUILDJAVA}" = yes || {
+ echo "Skipping test: Java compiler or jar not found"
+ exit 77
+}
+test "${TESTJAVA}" = yes || {
+ echo "Skipping test: Java engine not found"
+ exit 77
+}
tmpfiles="$tmpfiles Program.java"
cat <<\EOF > Program.java
esac
fi
if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french locale is installed"
+ else
+ echo "Skipping test: no french locale is supported"
+ fi
rm -fr $tmpfiles; exit 77
fi
# Test for presence of rep version 0.15.3 or newer.
(rep --version) >/dev/null 2>/dev/null \
- || { rm -fr $tmpfiles; exit 77; }
+ || { echo "Skipping test: rep not found"; rm -fr $tmpfiles; exit 77; }
case `rep --version | sed -e 's/^[^0-9]*//'` in
0.[0-9] | 0.1[0-5] | 0.[0-9].* | 0.1[0-4].* | 0.15.[0-2] )
- rm -fr $tmpfiles; exit 77;;
+ echo "Skipping test: rep version too old"; rm -fr $tmpfiles; exit 77;;
esac
# Test which of the fr_FR locales are installed.
esac
fi
if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french locale is installed"
+ else
+ echo "Skipping test: no french locale is supported"
+ fi
rm -fr $tmpfiles; exit 77
fi
}
EOF
${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o hello hello.m 2>/dev/null \
- || { rm -fr $tmpfiles; exit 77; }
+ || { echo "Skipping test: Objective C compiler not found"
+ rm -fr $tmpfiles; exit 77
+ }
tmpfiles="$tmpfiles prog.m"
cat <<\EOF > prog.m
xsetenv ("LC_ALL", argv[1], 1);
if (setlocale (LC_ALL, "") == NULL)
- {
- fprintf (stderr, "Couldn't set locale.\n");
- exit (77);
- }
+ /* Couldn't set locale. */
+ exit (77);
textdomain ("prog");
bindtextdomain ("prog", ".");
esac
fi
if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french locale is installed"
+ else
+ echo "Skipping test: no french locale is supported"
+ fi
rm -fr $tmpfiles; exit 77
fi
EOF
tmpfiles="$tmpfiles prog.o prog.rst prog"
-(ppc386 prog.pp) >/dev/null 2>&1 || { rm -fr $tmpfiles; exit 77; }
+(ppc386 prog.pp) >/dev/null 2>&1 || {
+ echo "Skipping test: ppc386 compiler not found"
+ rm -fr $tmpfiles; exit 77
+}
tmpfiles="$tmpfiles prog.pot"
: ${XGETTEXT=xgettext}
${DIFF} prog.oku prog.out || exit 1
fi
if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french locale is installed"
+ else
+ echo "Skipping test: no french locale is supported"
+ fi
rm -fr $tmpfiles; exit 77
fi
# Test for perl with Locale::Messages package.
perl -e 'use Locale::Messages;' 2>/dev/null \
- || { rm -fr $tmpfiles; exit 77; }
+ || { echo "Skipping test: perl package Locale::Messages is not installed"
+ rm -fr $tmpfiles; exit 77
+ }
: ${LOCALE_FR=fr_FR}
: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
${DIFF} prog.oku prog.out || exit 1
fi
if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french locale is installed"
+ else
+ echo "Skipping test: no french locale is supported"
+ fi
rm -fr $tmpfiles; exit 77
fi
# Test for perl with libintl-perl package.
perl -M'Locale::TextDomain' -e '' 2>/dev/null \
- || { rm -fr $tmpfiles; exit 77; }
+ || { echo "Skipping test: perl package libintl-perl is not installed"
+ rm -fr $tmpfiles; exit 77
+ }
: ${LOCALE_FR=fr_FR}
: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
${DIFF} prog.oku prog.out || exit 1
fi
if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french locale is installed"
+ else
+ echo "Skipping test: no french locale is supported"
+ fi
rm -fr $tmpfiles; exit 77
fi
# Test for presence of php version 4.0 or newer.
case `(php -v) 2>/dev/null` in
[4-9].*) ;;
- *) rm -fr $tmpfiles; exit 77;;
+ *) echo "Skipping test: php not found or too old"; rm -fr $tmpfiles; exit 77;;
esac
# Test which of the fr_FR locales are installed.
esac
fi
if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french locale is installed"
+ else
+ echo "Skipping test: no french locale is supported"
+ fi
rm -fr $tmpfiles; exit 77
fi
# Test for presence of python version 2.0 or newer.
(python -V) >/dev/null 2>/dev/null \
- || { rm -fr $tmpfiles; exit 77; }
+ || { echo "Skipping test: python not found"; rm -fr $tmpfiles; exit 77; }
case `python -c 'import sys; print sys.hexversion >= 0x20000F0'` in
1 | True) ;;
- *) rm -fr $tmpfiles; exit 77;;
+ *) echo "Skipping test: python version too old"; rm -fr $tmpfiles; exit 77;;
esac
tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
${DIFF} prog.oku prog.out || exit 1
fi
if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french locale is installed"
+ else
+ echo "Skipping test: no french locale is supported"
+ fi
rm -fr $tmpfiles; exit 77
fi
# Test for presence of python version 2.3 or newer.
(python -V) >/dev/null 2>/dev/null \
- || { rm -fr $tmpfiles; exit 77; }
+ || { echo "Skipping test: python not found"; rm -fr $tmpfiles; exit 77; }
case `python -c 'import sys; print sys.hexversion >= 0x20300F0'` in
1 | True) ;;
- *) rm -fr $tmpfiles; exit 77;;
+ *) echo "Skipping test: python version too old"; rm -fr $tmpfiles; exit 77;;
esac
tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
${DIFF} prog.oku prog.out || exit 1
fi
if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french locale is installed"
+ else
+ echo "Skipping test: no french locale is supported"
+ fi
rm -fr $tmpfiles; exit 77
fi
esac
fi
if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french locale is installed"
+ else
+ echo "Skipping test: no french locale is supported"
+ fi
rm -fr $tmpfiles; exit 77
fi
# Test for presence of gst version 2.0.6 or newer.
(gst --version) >/dev/null 2>/dev/null \
- || { rm -fr $tmpfiles; exit 77; }
+ || { echo "Skipping test: gst not found"; rm -fr $tmpfiles; exit 77; }
case `gst --version | sed -n -e 1p | sed -e 's/^[^0-9]*//'` in
0.* | 1.* | 2.0 | 2.0.[0-5] | 2.1 | 2.1.[0-1])
- rm -fr $tmpfiles; exit 77;;
+ echo "Skipping test: gst version too old"; rm -fr $tmpfiles; exit 77;;
esac
tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
${DIFF} prog.oku prog.out || exit 1
fi
if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french locale is installed"
+ else
+ echo "Skipping test: no french locale is supported"
+ fi
rm -fr $tmpfiles; exit 77
fi
puts $tcl_version
EOF
(tclsh version.tcl) >/dev/null 2>/dev/null \
- || { rm -fr $tmpfiles; exit 77; }
+ || { echo "Skipping test: tclsh not found or msgcat extension not present"
+ rm -fr $tmpfiles; exit 77
+ }
tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
${DIFF} prog.oku prog.out || exit 1
fi
if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french locale is installed"
+ else
+ echo "Skipping test: no french locale is supported"
+ fi
rm -fr $tmpfiles; exit 77
fi
# Some fold programs (like SunOS4 and FreeBSD) don't have an option to wrap at
# spaces.
-echo abc | fold -b -s -w 20 >/dev/null 2>&1 || { rm -fr $tmpfiles; exit 77; }
+echo abc | fold -b -s -w 20 >/dev/null 2>&1 || {
+ echo "Skipping test: fold program not POSIX compliant"
+ rm -fr $tmpfiles; exit 77
+}
# Some fold programs (like HP-UX) insert a newline at the end, if the last
# line was not terminated with a newline and the -s option was given.
foldoutputcount=`echo $ac_n "abc$ac_c" | fold -b -s -w 20 | wc -c`
foldoutputcount=`echo "$foldoutputcount" | sed -e 's/[ ]//g'`
-test "$foldoutputcount" = 3 || { rm -fr $tmpfiles; exit 77; }
+test "$foldoutputcount" = 3 || {
+ echo "Skipping test: fold program inserts extra newline"
+ rm -fr $tmpfiles; exit 77
+}
tmpfiles="$tmpfiles mfi-test1.po"
cat <<\EOF > mfi-test1.po
# Some sed programs (Solaris etc.) omit the last line if it ended without
# a newline. We must skip this test when we encounter such a broken sed.
sedoutput=`echo $ac_n "abc$ac_c" | sed -e s/x/x/`
-test -n "$sedoutput" || { rm -fr $tmpfiles; exit 77; }
+test -n "$sedoutput" || {
+ echo "Skipping test: sed program is broken"
+ rm -fr $tmpfiles; exit 77
+}
# Some sed programs (IRIX, OSF/1 etc.) add a newline to the last line if it
# doesn't end with a newline.
sedoutputcount=`echo $ac_n "abc$ac_c" | sed -e s/x/x/ | wc -c`
sedoutputcount=`echo "$sedoutputcount" | sed -e 's/[ ]//g'`
-test "$sedoutputcount" = 3 || { rm -fr $tmpfiles; exit 77; }
+test "$sedoutputcount" = 3 || {
+ echo "Skipping test: sed program inserts extra newline"
+ rm -fr $tmpfiles; exit 77
+}
tmpfiles="$tmpfiles mfi-test2.po"
cat <<\EOF > mfi-test2.po
# Some fold programs (like SunOS4 and FreeBSD) don't have an option to wrap at
# spaces.
-echo abc | fold -b -s -w 20 >/dev/null 2>&1 || { rm -fr $tmpfiles; exit 77; }
+echo abc | fold -b -s -w 20 >/dev/null 2>&1 || {
+ echo "Skipping test: fold program not POSIX compliant"
+ rm -fr $tmpfiles; exit 77
+}
# Some fold programs (like HP-UX) insert a newline at the end, if the last
# line was not terminated with a newline and the -s option was given.
foldoutputcount=`echo $ac_n "abc$ac_c" | fold -b -s -w 20 | wc -c`
foldoutputcount=`echo "$foldoutputcount" | sed -e 's/[ ]//g'`
-test "$foldoutputcount" = 3 || { rm -fr $tmpfiles; exit 77; }
+test "$foldoutputcount" = 3 || {
+ echo "Skipping test: fold program inserts extra newline"
+ rm -fr $tmpfiles; exit 77
+}
tmpfiles="$tmpfiles mfi-test3.properties"
cat <<\EOF > mfi-test3.properties
# Some sed programs (Solaris etc.) omit the last line if it ended without
# a newline. We must skip this test when we encounter such a broken sed.
sedoutput=`echo $ac_n "abc$ac_c" | sed -e s/x/x/`
-test -n "$sedoutput" || { rm -fr $tmpfiles; exit 77; }
+test -n "$sedoutput" || {
+ echo "Skipping test: sed program is broken"
+ rm -fr $tmpfiles; exit 77
+}
# Some sed programs (IRIX, OSF/1 etc.) add a newline to the last line if it
# doesn't end with a newline.
sedoutputcount=`echo $ac_n "abc$ac_c" | sed -e s/x/x/ | wc -c`
sedoutputcount=`echo "$sedoutputcount" | sed -e 's/[ ]//g'`
-test "$sedoutputcount" = 3 || { rm -fr $tmpfiles; exit 77; }
+test "$sedoutputcount" = 3 || {
+ echo "Skipping test: sed program inserts extra newline"
+ rm -fr $tmpfiles; exit 77
+}
tmpfiles="$tmpfiles mfi-test4.po"
cat <<\EOF > mfi-test4.po
trap 'rm -fr $tmpfiles' 1 2 3 15
# Test whether we can compile and execute C# programs.
-test "${TESTCSHARP}" = yes || exit 77
+test "${CSHARP_CHOICE}" != no || {
+ echo "Skipping test: configured with --disable-csharp"
+ exit 77
+}
+test "${BUILDCSHARP}" = yes || {
+ echo "Skipping test: C# compiler not found"
+ exit 77
+}
+test "${TESTCSHARP}" = yes || {
+ echo "Skipping test: C# engine not found"
+ exit 77
+}
tmpfiles="$tmpfiles fr.po"
cat <<\EOF > fr.po
trap 'rm -fr $tmpfiles' 1 2 3 15
# Test whether we can compile and execute Java programs.
-test "${TESTJAVA}" = yes || exit 77
+test "${JAVA_CHOICE}" != no || {
+ echo "Skipping test: configured with --disable-java"
+ exit 77
+}
+test "${BUILDJAVA}" = yes || {
+ echo "Skipping test: Java compiler or jar not found"
+ exit 77
+}
+test "${TESTJAVA}" = yes || {
+ echo "Skipping test: Java engine not found"
+ exit 77
+}
tmpfiles="$tmpfiles fr.po"
cat <<\EOF > fr.po
puts $tcl_version
EOF
(tclsh version.tcl) >/dev/null 2>/dev/null \
- || { rm -fr $tmpfiles; exit 77; }
+ || { echo "Skipping test: tclsh not found or Tcl too old"
+ rm -fr $tmpfiles; exit 77
+ }
tmpfiles="$tmpfiles fr.po"
cat <<\EOF > fr.po
esac
fi
if test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french UTF-8 locale is installed"
+ else
+ echo "Skipping test: no french UTF-8 locale is supported"
+ fi
rm -fr $tmpfiles; exit 77
fi
esac
fi
if test $LOCALE_JA_EUCJP = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no japanese EUC-JP locale is installed"
+ else
+ echo "Skipping test: no japanese EUC-JP locale is supported"
+ fi
rm -fr $tmpfiles; exit 77
fi
/* testlocale - test whether the locale given by the environment is installed.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
/* This test must match the one in intl/localename.c. */
#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
if (setlocale (LC_ALL, "") == NULL)
- {
- fprintf (stderr, "Couldn't set locale.\n");
- exit (77);
- }
+ /* Couldn't set locale. */
+ exit (77);
#endif
exit (0);
}
tmpfiles="$tmpfiles xg-gl-1.pot"
: ${XGETTEXT=xgettext}
${XGETTEXT} -o xg-gl-1.pot empty.glade 2>/dev/null
-test $? = 0 || { rm -fr $tmpfiles; exit 77; }
+test $? = 0 || {
+ echo "Skipping test: xgettext was built without Glade support"
+ rm -fr $tmpfiles; exit 77
+}
tmpfiles="$tmpfiles widgets.glade"
cat <<EOF > widgets.glade
tmpfiles="$tmpfiles xg-gl-2.pot"
: ${XGETTEXT=xgettext}
${XGETTEXT} -o xg-gl-2.pot empty.glade 2>/dev/null
-test $? = 0 || { rm -fr $tmpfiles; exit 77; }
+test $? = 0 || {
+ echo "Skipping test: xgettext was built without Glade support"
+ rm -fr $tmpfiles; exit 77
+}
tmpfiles="$tmpfiles simple.glade"
cat <<\EOF > simple.glade
tmpfiles="$tmpfiles xg-gl-3.pot"
: ${XGETTEXT=xgettext}
${XGETTEXT} -o xg-gl-3.pot empty.glade 2>/dev/null
-test $? = 0 || { rm -fr $tmpfiles; exit 77; }
+test $? = 0 || {
+ echo "Skipping test: xgettext was built without Glade support"
+ rm -fr $tmpfiles; exit 77
+}
tmpfiles="$tmpfiles asciitable.glade2"
cat <<EOF > asciitable.glade2