summaryrefslogtreecommitdiff
path: root/test/nls/check-localedir.in
diff options
context:
space:
mode:
Diffstat (limited to 'test/nls/check-localedir.in')
-rw-r--r--test/nls/check-localedir.in25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/nls/check-localedir.in b/test/nls/check-localedir.in
new file mode 100644
index 0000000..9636d87
--- /dev/null
+++ b/test/nls/check-localedir.in
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+localedir="@localedir@"
+build_alias="@build_alias@"
+host_alias="@host_alias@"
+
+binlocaledir="`@PRINT_LOCALEDIR@ 2> /dev/null`"
+
+if test "${localedir}" = "${binlocaledir}"; then
+ echo "Makefile and binary agree on localedir \`${localedir}'. Good."
+ exit 0
+else
+ echo "Makefile and binary disagree on localedir. Bad."
+ echo " - Makefile says \`${localedir}'."
+ echo " - binary says \`${binlocaledir}'."
+
+ if test "${build_alias}" != "${host_alias}"; then
+ echo "However, you are cross-compiling, so this does not necessarily"
+ echo "have consequences."
+ exit 0
+ else
+ echo "Error: Could not determine binary localedir."
+ exit 1
+ fi
+fi