summaryrefslogtreecommitdiff
path: root/lib/localcharset.c
diff options
context:
space:
mode:
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 66099d5e3..662f3ad33 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);