summaryrefslogtreecommitdiff
path: root/lib/localcharset.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2005-02-24 19:54:14 +0000
committerBruno Haible <bruno@clisp.org>2005-02-24 19:54:14 +0000
commitd427c96ee152df514e6eb0f73dd4f65021961bca (patch)
tree02a3764c033f10961f4990be325cec3c90922a0e /lib/localcharset.c
parentd6820d8c726d8c26fd77de5bd741bc3195de2b5a (diff)
downloadgnulib-d427c96ee152df514e6eb0f73dd4f65021961bca.tar.gz
Update from GNU gettext 0.14.2.
Diffstat (limited to 'lib/localcharset.c')
-rw-r--r--lib/localcharset.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/localcharset.c b/lib/localcharset.c
index 66099d5e31..662f3ad336 100644
--- a/lib/localcharset.c
+++ b/lib/localcharset.c
@@ -115,10 +115,16 @@ get_charset_aliases ()
{
#if !(defined VMS || defined WIN32)
FILE *fp;
- const char *dir = relocate (LIBDIR);
+ const char *dir;
const char *base = "charset.alias";
char *file_name;
+ /* Make it possible to override the charset.alias location. This is
+ necessary for running the testsuite before "make install". */
+ dir = getenv ("CHARSETALIASDIR");
+ if (dir == NULL || dir[0] == '\0')
+ dir = relocate (LIBDIR);
+
/* Concatenate dir and base into freshly allocated file_name. */
{
size_t dir_len = strlen (dir);