--- old/gettext-0.10.39/configure.in Tue Jul 24 14:27:00 2001 +++ gnu/gettext-0.10.39/configure.in Mon Sep 3 22:13:24 2001 @@ -64,7 +64,7 @@ AC_DEFINE(HAVE_PARSE_PRINTF_FORMAT, 1, [Define if you have the parse_printf_format() function.]) else - LIBOBJS="$LIBOBJS printf-prs.o" + LIBOBJS="$LIBOBJS printf-prs.$OBJEXT" fi AM_FUNC_ERROR_AT_LINE --- old/gettext-0.10.39/intl/config.charset Tue Jul 3 12:27:58 2001 +++ gnu/gettext-0.10.39/intl/config.charset Sat Sep 1 22:36:06 2001 @@ -274,7 +274,7 @@ # BeOS has a single locale, and it has UTF-8 encoding. echo "* UTF-8" ;; - msdosdjgpp*) + msdosdjgpp* | os2*) # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. --- old/gettext-0.10.39/intl/dcigettext.c Thu Jun 14 14:42:24 2001 +++ gnu/gettext-0.10.39/intl/dcigettext.c Sat Sep 15 16:58:14 2001 @@ -56,6 +56,14 @@ #include #include +#ifdef __EMX__ +# define INCL_WINCOUNTRY +# include +# ifdef __EMX_DEBUG__ +# include +# endif +#endif + #include #if !HAVE_STRCHR && !defined _LIBC # ifndef strchr @@ -394,6 +402,88 @@ } #endif + +#ifdef __EMX__ +static unsigned + _nl_os2_translate(unsigned incharset, const char *inbuf, unsigned outcharset, + size_t outleft, char *outbuf) +{ + const char *input = inbuf; + char *output = outbuf; + size_t inleft = strlen(inbuf); + size_t len; + char buf[inleft + 1]; + + if (outleft < inleft + 1) return 0; /* outbuf definitely too small */ + + outleft -= 1; /* outleft is physical size of outbuf excluding trailing '\0' */ + + if (incharset == 0 || outcharset == 0 || incharset == outcharset) { + /* - if incharset is 0 then there is an error in cp_table (loadmsgcat.c) + but it's to late to correct it + - if outcharset is 0 then either we could not determine which codepage + has to be used (running in DOS-mode) or we have no direct keyboard + access (i.e. running within XFree or detached). In both cases + we don't want to change the charsets + - if incharset == outcharset then nothing to do */ + strcpy(outbuf, inbuf); + return 1; + } + + while(inbuf[0] != '\0') { + if (outleft < inleft) return 0; /* not enough memory */ + + else if(inbuf[0] == '\n' || inbuf[0] == '\r') { + /* WinCpTranslateString cannot handle line feeds properly */ + *outbuf++ = *inbuf++; + outleft--; + inleft--; + } + + else { /* process the next line */ + { + register char *p = buf; + register const char *q = inbuf; + + /* copy the next line into buf */ + while(q[0] != '\0' && q[0] != '\n' && q[0] != '\r') { + *p++ = *q++; /* copy character */ + } + *p = '\0'; + + len = p - buf; /* len = strlen(p) */ + } + + /* WinCpTranslateString() requires length of outbuf excluding the trailing '\0'! */ + if (WinCpTranslateString(0, incharset, buf, outcharset, outleft, outbuf) == 0) { + if (len * 5 < outleft) { + /* we have really enough memory. Either the codepage is invalid or + there are problems with double byte character sets */ + /* to make sure we don't replace any '\n' or '\r' in a 16 bit charset + we're using output and input instead of outbuf and inbuf */ + strcpy(output, input); + return 1; + } + + return 0; /* not enough memory */ + } + + /* all right, string has been converted */ + inbuf += len; + inleft -= len; + len = strlen(outbuf); + outbuf += len; /* now: outbuf[0] == '\0' */ + outleft -= len; + } + } /* while(...) */ + + outbuf[0] = '\0'; /* trailing '\0' */ + + return 1; +} +#endif /* __EMX__ */ + + /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY locale and, if PLURAL is nonzero, search over string depending on the plural form determined by N. */ @@ -765,7 +855,7 @@ + W (domain->must_swap, domain->trans_tab[act].offset)); resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1; -#if defined _LIBC || HAVE_ICONV +#if defined _LIBC || HAVE_ICONV || defined __EMX__ if (domain->codeset_cntr != (domainbinding != NULL ? domainbinding->codeset_cntr : 0)) { @@ -782,8 +872,15 @@ # else # if HAVE_ICONV domain->conv != (iconv_t) -1 -# endif -# endif +# ifdef __EMX__ + && +# endif /* __EMX__ */ +# endif /* HAVE_ICONV */ +# ifdef __EMX__ + (_osmode == OS2_MODE && domain->incharset != 0 && domain->outcharset != 0 + && domain->incharset != domain->outcharset) +# endif /* __EMX__ */ +# endif /* NOT _LIBC */ ) { /* We are supposed to do a conversion. First allocate an @@ -859,30 +956,63 @@ inbuf = result; # else # if HAVE_ICONV - const char *inptr = (const char *) inbuf; - size_t inleft = resultlen; - char *outptr = (char *) outbuf; - size_t outleft; - - if (freemem_size < sizeof (size_t)) - goto resize_freemem; - - outleft = freemem_size - sizeof (size_t); - if (iconv (domain->conv, - (ICONV_CONST char **) &inptr, &inleft, - &outptr, &outleft) - != (size_t) (-1)) - { - outbuf = (unsigned char *) outptr; - break; - } - if (errno != E2BIG) - { +# ifdef __EMX__ + /* for EMX we need this condition because there is an additional + charset conversion mechanism if libiconv fails or is + not available */ + if (domain->conv != (iconv_t) -1) { +# endif + const char *inptr = (const char *) inbuf; + size_t inleft = resultlen; + char *outptr = (char *) outbuf; + size_t outleft; + + if (freemem_size < sizeof (size_t)) + goto resize_freemem; + + outleft = freemem_size - sizeof (size_t); + if (iconv (domain->conv, + (ICONV_CONST char **) &inptr, &inleft, + &outptr, &outleft) + != (size_t) (-1)) + { + outbuf = (unsigned char *) outptr; + break; + } + if (errno != E2BIG) + { __libc_lock_unlock (lock); goto converted; } -# endif -# endif +# ifdef __EMX__ + } + else +# endif +# endif /* HAVE_ICONV */ + +# ifdef __EMX__ + { + if (_osmode == OS2_MODE) { + size_t outleft; + + if (freemem_size < sizeof (size_t)) + goto resize_freemem; + + outleft = freemem_size - sizeof(size_t); + + if (_nl_os2_translate(domain->incharset, inbuf, + domain->outcharset, outleft, outbuf) == 0) { + goto resize_freemem; /* not enough memory for this string */ + } + else { /* success */ + outbuf += strlen(outbuf) + 1; /* including trailing '\0' */ + break; + } + } + } +# endif /* __EMX__ */ + +# endif /* NOT _LIBC */ resize_freemem: /* We must allocate a new buffer or resize the old one. */ --- old/gettext-0.10.39/intl/gettextP.h Mon Apr 9 19:53:30 2001 +++ gnu/gettext-0.10.39/intl/gettextP.h Tue Sep 4 00:32:02 2001 @@ -132,6 +132,9 @@ #ifdef _LIBC __gconv_t conv; #else +# ifdef __EMX__ + int incharset, outcharset; /* OS/2 codepages */ +# endif # if HAVE_ICONV iconv_t conv; # endif --- old/gettext-0.10.39/intl/loadmsgcat.c Thu Apr 19 12:31:40 2001 +++ gnu/gettext-0.10.39/intl/loadmsgcat.c Sat Oct 6 19:39:38 2001 @@ -126,10 +126,59 @@ # define O_BINARY 0 #endif +#ifdef __EMX__ +struct os2_codepage { + const char *charset; + int codepage; +}; + +/* note: we could also read this data from $ULSPATH/CODEPAGE/UCSTBL.LST, but + a static data table is faster */ +static struct os2_codepage cp_table[] = { + { "ISO-8859-1", 819 }, + { "ISO-8859-2", 912 }, + { "ISO-8859-7", 813 }, + { "ISO-8859-8", 916 }, + { "ISO-8859-9", 920 }, + { "ISO-8859-15", 0 }, /* unknown */ + { "UTF-8", 1208 }, + { "SJIS", 943 }, + { "EUC-KR", 970 }, + { "KOI8-R", 878 }, + { "BIG5", 0 } /* unknown */ +}; + + +/* charset will be transformed into a codepage number. If an error + occurrs 0 is returned */ +static int +_nl_os2_codepage(const char *charset) +{ + if (charset == NULL || charset[0] == '\0') return 0; /* error */ + + if (toupper(charset[0]) == 'C' && toupper(charset[1]) == 'P') { + /* trivial charset name like "cp850" */ + return atoi(charset + 2); /* returns 0 on error */ + } + else { + /* no trivial charset name like "cp850" */ + size_t i; + for(i = 0; i < sizeof(cp_table) / sizeof(struct os2_codepage); i++) { + if (strcasecmp(charset, cp_table[i].charset) == 0) + return cp_table[i].codepage; /* we have the codepage */ + } + } + + return 0; +} +#endif /* __EMX__ */ + + /* We need a sign, whether a new catalog was loaded, which can be associated with all translations. This is important if the translations are cached by one of GCC's features. */ int _nl_msg_cat_cntr; +extern int _nl_msg_cat_cntr; #if (defined __GNUC__ && !defined __APPLE_CC__) \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) @@ -225,6 +274,10 @@ # if HAVE_ICONV domain->conv = (iconv_t) -1; # endif +# ifdef __EMX__ + domain->incharset = 0; + domain->outcharset = 0; +# endif #endif domain->conv_tab = NULL; @@ -233,7 +286,7 @@ if (nullentry != NULL) { -#if defined _LIBC || HAVE_ICONV +#if defined _LIBC || HAVE_ICONV || defined __EMX__ const char *charsetstr; charsetstr = strstr (nullentry, "charset="); @@ -269,9 +322,11 @@ # ifdef _LIBC outcharset = (*_nl_current[LC_CTYPE])->values[_NL_ITEM_INDEX (CODESET)].string; # else -# if HAVE_ICONV +# if HAVE_ICONV || defined __EMX__ extern const char *locale_charset (void); - outcharset = locale_charset (); + outcharset = locale_charset (); + /* EMX: outcharset may be "" if we don't know the current code page + or if we don't want to use it */ # endif # endif } @@ -287,26 +342,52 @@ domain->conv = (__gconv_t) -1; # else # if HAVE_ICONV - /* When using GNU libiconv, we want to use transliteration. */ +# ifdef __EMX__ + { + const char *save_outcharset = outcharset; +# endif + /* When using GNU libiconv, we want to use transliteration. */ # if _LIBICONV_VERSION >= 0x0105 - len = strlen (outcharset); - { - char *tmp = (char *) alloca (len + 10 + 1); - memcpy (tmp, outcharset, len); - memcpy (tmp + len, "//TRANSLIT", 10 + 1); - outcharset = tmp; - } + len = strlen (outcharset); + { + char *tmp = (char *) alloca (len + 10 + 1); + memcpy (tmp, outcharset, len); + memcpy (tmp + len, "//TRANSLIT", 10 + 1); + outcharset = tmp; + } # endif - domain->conv = iconv_open (outcharset, charset); + domain->conv = iconv_open (outcharset, charset); # if _LIBICONV_VERSION >= 0x0105 - freea (outcharset); + freea (outcharset); # endif -# endif -# endif +# ifdef __EMX__ + /* if iconv_open() failed restore outcharset because the second + charset translation mechanism does not support transliteration */ + if (domain->conv == (iconv_t) -1) + outcharset = save_outcharset; + } +# endif +# endif /* HAVE_ICONV */ + +# ifdef __EMX__ + /* Initialize the second character translation method if libiconv + failed or was not available */ + if ( +# if HAVE_ICONV + domain->conv == (iconv_t) -1 && +# endif + _osmode == OS2_MODE) { + domain->incharset = _nl_os2_codepage(charset); + domain->outcharset = _nl_os2_codepage(outcharset); + /* if outcharset == "" either we don't know the current charset + or we don't want to use it */ + } +# endif /* __EMX__ */ +# endif /* NOT _LIBC */ freea (charset); } -#endif /* _LIBC || HAVE_ICONV */ +#endif /* _LIBC || HAVE_ICONV || __EMX__ */ } return nullentry; @@ -329,6 +410,10 @@ if (domain->conv != (iconv_t) -1) iconv_close (domain->conv); # endif +# ifdef __EMX__ + domain->incharset = 0; + domain->outcharset = 0; +# endif #endif } @@ -368,6 +453,33 @@ /* Try to open the addressed file. */ fd = open (domain_file->filename, O_RDONLY | O_BINARY); + +#ifdef __EMX__ + if (fd == -1) { +# if !defined _LIBC +# define _nl_default_dirname _nl_default_dirname__ +# endif + extern const char _nl_default_dirname[]; /* from dcigettext.c */ + extern char* _os2_unixroot_gettext(const char*); /* from localealias.c */ + char *new_file_name = _os2_unixroot_gettext(domain_file->filename); + if (new_file_name) fd = open (new_file_name, O_RDONLY | O_BINARY); + else fd = -1; + + if (fd != -1) { /* the second file exists, we have to change some internal structures */ + /* first: change domainbinding->dirname */ + char *p = _os2_unixroot_gettext(domainbinding->dirname); /* get new dir */ + if (domainbinding->dirname != _nl_default_dirname) + free(domainbinding->dirname); /* sic! */ + domainbinding->dirname = p; + + /* second: change domain_file->filename */ + p = _os2_unixroot_gettext(domain_file->filename); + free((char*) domain_file->filename); /* sic! */ + domain_file->filename = 0; + } + } +#endif /* __EMX__ */ + if (fd == -1) return; --- old/gettext-0.10.39/intl/localcharset.c Mon Apr 30 11:11:28 2001 +++ gnu/gettext-0.10.39/intl/localcharset.c Sat Oct 6 19:38:08 2001 @@ -55,6 +55,11 @@ # include #endif +#ifdef __EMX__ +# define INCL_KBD +# include +#endif + #ifndef DIRECTORY_SEPARATOR # define DIRECTORY_SEPARATOR '/' #endif @@ -107,9 +112,27 @@ } } +# ifdef __EMX__ + if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL) { + extern char* _os2_unixroot_gettext(const char*); /* from localealias.c */ + char *old_file_name = file_name; + file_name = _os2_unixroot_gettext(file_name); /* get new file name */ + + free(old_file_name); + + if (file_name != NULL) fp = fopen (file_name, "r"); /* second try */ + } + + if (file_name == NULL || fp == NULL) + /* Out of memory or file not found, treat it as empty. */ + cp = ""; + +# else /* NOT __EMX__ */ if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL) /* Out of memory or file not found, treat it as empty. */ - cp = ""; + cp = ""; +# endif + else { /* Parse the file's contents. */ @@ -120,7 +143,7 @@ size_t res_size = 0; size_t l1, l2; - for (;;) + for (;;) { c = getc (fp); if (c == EOF) @@ -217,6 +240,35 @@ /* On old systems which lack it, use setlocale or getenv. */ const char *locale = NULL; +# ifdef __EMX__ + /* Use KbdGetCp() here, if we have the codeset we can return immediatly */ + static char buf[2 + 10 + 1]; /* static buffer for codepage name */ + + /* OS/2 has a function returning the locale's codepage as a number */ + if (_osmode == OS2_MODE) { + USHORT codepage; + KBDINFO info; + info.cb = sizeof(info); /* to keep OS/2 happy */ + + if (KbdGetStatus(&info, 0) == 0 && KbdGetCp(0, &codepage, 0) == 0) + { + /* we are running in OS/2 mode and we have direct keyboard access and + we could get the current codepage */ + sprintf(buf, "CP%u", (unsigned) codepage); + codeset = buf; + return codeset; + } + else { + /* If we have no direct keyboard access then we are running within XFree or + even detached, it's better not to change the charset */ + codeset = ""; + return codeset; + } + } + /* we are running in DOS mode, we will try libiconv if available */ + +# endif /* __EMX__ */ + /* But most old systems don't have a complete set of locales. Some (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't use setlocale here; it would return "C" when it doesn't support the @@ -224,9 +276,11 @@ # if HAVE_SETLOCALE && 0 locale = setlocale (LC_CTYPE, NULL); # endif + if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_ALL"); + if (locale == NULL || locale[0] == '\0') { locale = getenv ("LC_CTYPE"); --- old/gettext-0.10.39/intl/localealias.c Fri Mar 9 13:14:30 2001 +++ gnu/gettext-0.10.39/intl/localealias.c Sat Oct 6 20:33:02 2001 @@ -123,15 +123,195 @@ const struct alias_map *map2)); +#ifdef __EMX__ +# ifndef PATH_SEPARATOR +# define PATH_SEPARATOR ';' +# endif + +/* result is 0 if dirname is no absolute path, 1 otherwise */ +static int +_os2_is_abs_path(const char *dirname) +{ + int result = 0; + if (dirname != NULL && dirname[0] != '\0') { + /* if dirname contains a valid drive letter like "c:" */ + if (((dirname[0] >= 'A' && dirname[0] <= 'Z') || (dirname[0] >= 'a' && dirname[0] <= 'z')) + && dirname[1] == ':') dirname += 2; /* remove the drive letter */ + + if (dirname[0] == '/' || dirname[0] == '\\') result = 1; /* asbolute path */ + } + + return result; +} + + +/* path is assumed to be a list of directories separated by PATH_SEPARATOR. + This function determines if the first directory of path is on the + drive specified by the environment variable UNIXROOT. + If it is the case, NULL is returned, otherwise a new directory name + is allocated using the drive letter from UNIXROOT and returned as result. + If the first directory is a relative path NULL is returned, too. + The new directory name is allocated by malloc(). + Example (UNIXROOT is set to "e:"): + "c:/usr/share" -> "e:/usr/share" + "e:/usr/share" -> NULL (already on the $UNIXROOT drive) + "/usr/share" -> "e:/usr/share" + "." -> NULL (not an absolute path) + "usr/share" -> NULL (not an absolute path) + "c:usr/share" -> NULL (not an absolute path) + "c:/usr/share;d:/etc" -> "e:/usr/share" (only the first directory in path is used) */ +char* +_os2_unixroot_gettext(const char *path) +{ + static const char *unixroot = NULL; + static int unixroot_init = 0; + char *result = NULL; + + if (unixroot_init == 0) { + /* get $UNIXROOT only one time */ + unixroot = getenv("UNIXROOT"); + + /* check whether unixroot is valid (must be "x:") */ + if (unixroot != NULL) { + int drive = toupper(unixroot[0]); + if (drive < 'A' || drive > 'Z' || unixroot[1] != ':' || unixroot[2] != '\0') + unixroot = NULL; /* unixroot not valid */ + } + + unixroot_init = 1; /* initialized */ + } + + /* note: if unixroot != NULL then it contains a valid drive letter */ + if (unixroot != NULL && _os2_is_abs_path(path)) { + /* dirname is an absolute path and unixroot is a drive letter, "c:" for example */ + size_t old_path_len = strlen(path); + + /* end points to the first ';' in path or to NULL */ + const char *end = strchr(path, PATH_SEPARATOR); + + /* dir_len is the length of the first directory in path */ + size_t dir_len = (end) ? end - path : old_path_len; + + if (toupper(unixroot[0]) != toupper(path[0]) || path[1] != ':') { + /* the first directory of path does not start with the string $UNIXROOT */ + if (path[1] == ':') { + /* if there is a drive letter remove it */ + dir_len -= 2; + path += 2; + } + + result = malloc(dir_len + 3); + if (result) { /* do nothing if we are out of memory */ + result[0] = unixroot[0]; + result[1] = unixroot[1]; + memcpy(result + 2, path, dir_len); + result[dir_len + 2] = '\0'; + } + } + } + return result; +} + +/* path is assumed to be a list of directories separated by PATH_SEPARATOR. + Every directory is processed. _os2_unixroot_gettext() is used to find out whether + these directories are on the drive specified by the environment variable + UNIXROOT. If this is not the case the same directory on the UNIXROOT drive + is added to the end of path. If path is a valid path this function returns a valid path, too. + Example ($UNIXROOT is set to "e:"): + ".;c:/usr/local;d:/usr/local;d:/etc;e:/etc" + -> ".;c:/usr/local;d:/usr/local;d:/etc;e:/etc;e:/usr/local;e:/usr/local;e:/etc" */ +static const char* +_os2_unixroot_path(const char *path) +{ + char *result = NULL; + const char *p = path; + unsigned dir_count = 1; + + if (path == NULL || path[0] == '\0') return NULL; /* empty path */ + + /* save number of path components in dir_count */ + while(*p) { + if (*p++ == PATH_SEPARATOR && *p != '\0' && *p != PATH_SEPARATOR) + dir_count += 1; + } + + { + const char *list[dir_count]; /* list of char pointers */ + size_t dir_len[dir_count]; /* the according directory length */ + size_t old_path_len = strlen(path); /* the old path length */ + size_t total_len; + unsigned i = 0; + + if (path[old_path_len - 1] == PATH_SEPARATOR) /* last character is ';' */ + old_path_len--; + + list[0] = p = path; /* first directory */ + + while(*p) { + if (*p++ == PATH_SEPARATOR && *p != '\0' && *p != PATH_SEPARATOR) + list[++i] = p; + } + /* now list[i] contains the ith directory of path (no 0-terminated strings!!!) */ + + /* determine the total length for the new path */ + total_len = old_path_len; + + for(i = 0; i < dir_count; i++) { + list[i] = _os2_unixroot_gettext(list[i]); + if (list[i] != NULL) { + dir_len[i] = strlen(list[i]); + total_len += dir_len[i] + 1; /* one character for ';' or '\0' */ + } + else dir_len[i] = 0; + } + /* now list[] contains the according directories on the UNIXROOT drive or NULL + total_len contains the total length for the new path */ + result = malloc(total_len + 1); + + if (result) { + /* copy the old path and the new directories into the new path */ + char *q = result; + memcpy(q, path, old_path_len); + q += old_path_len; + + for(i = 0; i < dir_count; i++) { + if (dir_len[i] != 0) { + *q++ = PATH_SEPARATOR; + memcpy(q, list[i], dir_len[i]); + q += dir_len[i]; + } + } + + *q = '\0'; /* terminating '\0' */ + } + + for(i = 0; i++; i < dir_count) free((void*) list[i]); + } + + return (result) ? (const char*) result : path; +} + + +#endif /* __EMX__ */ + + const char * _nl_expand_alias (name) const char *name; { +#ifndef __EMX__ static const char *locale_alias_path = LOCALE_ALIAS_PATH; +#else + static const char *locale_alias_path = NULL; +#endif struct alias_map *retval; const char *result = NULL; size_t added; +#ifdef __EMX__ + if (locale_alias_path == NULL) locale_alias_path = _os2_unixroot_path(LOCALE_ALIAS_PATH); +#endif + #ifdef _LIBC __libc_lock_lock (lock); #endif @@ -207,6 +387,7 @@ #endif fp = fopen (full_fname, "r"); + freea (full_fname); if (fp == NULL) return 0; --- old/gettext-0.10.39/intl/Makefile.in Tue May 22 16:57:18 2001 +++ gnu/gettext-0.10.39/intl/Makefile.in Sat Oct 6 21:54:50 2001 @@ -268,7 +268,7 @@ mostlyclean: - rm -f *.a *.la *.o *.lo core core.* + rm -f *.a *.la *.o *.obj *.lo core core.* rm -f libintl.h charset.alias ref-add.sed ref-del.sed rm -f -r .libs _libs --- old/gettext-0.10.39/lib/config.charset Tue Jul 3 12:27:58 2001 +++ gnu/gettext-0.10.39/lib/config.charset Sat Sep 1 22:36:06 2001 @@ -274,7 +274,7 @@ # BeOS has a single locale, and it has UTF-8 encoding. echo "* UTF-8" ;; - msdosdjgpp*) + msdosdjgpp* | os2*) # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. --- old/gettext-0.10.39/m4/libtool.m4 Mon Jun 25 12:09:06 2001 +++ gnu/gettext-0.10.39/m4/libtool.m4 Sat Sep 15 13:25:22 2001 @@ -1602,11 +1602,12 @@ ;; os2*) + if test "$ac_objext" = "obj"; then libext=lib; fi hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported - archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp -u $libobjs >> $output_objdir/$libname.def~$CC -Zdll $CFLAGS $LDFLAGS -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_from_new_cmds='emximp -o $output_objdir/$libname.$libext $output_objdir/$libname.def' ;; osf3*) @@ -2096,8 +2097,12 @@ os2*) libname_spec='$name' need_lib_prefix=no - library_names_spec='$libname.dll $libname.a' - dynamic_linker='OS/2 ld.exe' + library_names_spec='$libname.dll $libname.$libext' + if test "$ac_objext" = "o"; then + dynamic_linker='OS/2 ld.exe' + else + dynamic_linker='OS/2 link386.exe' + fi shlibpath_var=LIBPATH ;; @@ -2435,7 +2440,7 @@ libext="$libext" # Executable file suffix (normally ""). -exeext="$exeext" +exeext="$ac_exeext" # Additional compiler flags for building library objects. pic_flag=$lt_pic_flag --- old/gettext-0.10.39/m4/progtest.m4 Mon Jun 25 20:02:58 2001 +++ gnu/gettext-0.10.39/m4/progtest.m4 Tue Sep 18 21:46:38 2001 @@ -22,17 +22,17 @@ ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + ac_save_IFS=$IFS; IFS="$ac_path_separator" for ac_dir in ifelse([$5], , $PATH, [$5]); do + IFS=$ac_save_IFS test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$ac_word; then + if $as_executable_p $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done - IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" --- old/gettext-0.10.39/src/Makefile.am Tue Mar 20 15:01:38 2001 +++ gnu/gettext-0.10.39/src/Makefile.am Tue Sep 4 00:00:10 2001 @@ -64,7 +64,7 @@ BUILT_SOURCES = po-gram-gen.c po-hash-gen.c po-gram-gen.h po-hash-gen.h -po-lex.o: po-gram-gen2.h +po-lex.$(OBJEXT): po-gram-gen2.h po-gram-gen2.h: po-gram-gen.h $(SED) 's/[yY][yY]/po_gram_/g' $(srcdir)/po-gram-gen.h > $@-tmp mv $@-tmp $@