Update from GNU gettext 0.14.2.
[pspp] / lib / localcharset.c
index 66099d5e315bfbddc1118042a4a9eb9b3ac61b90..662f3ad336cdd3fb710364de87372a67b4c20760 100644 (file)
@@ -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);