bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patches for OS/2 (1)


From: Andreas Buening
Subject: Patches for OS/2 (1)
Date: Fri, 01 Nov 2002 17:21:39 +0100

Bruno Haible wrote:
> 
> Andreas Buening writes:
> > I'd like to submit some patches so that the normal configure/make
> > procedure works also on OS/2. I also changed some of the earlier
> > OS/2 patches that didn't work suitably for me.
> 
> Hello,
> 
> You are welcome to submit OS/2 patches to this mailing list. Please CC
> the one who last worked on the OS/2 port; you find his email address
> in the ChangeLog. Also if you undo some of his changes, please explain
> why (e.g. what's so different in your environment).

Thanks. I'll do that.

First, I have some notes to the configure process:

m4/progtest.m4 can't find executables (due to their ".exe" extension
and because PATH uses ';' rather than ':'). I used PATH_SEPARATOR which
is defined since autoconf 2.5x and ac_executable_extensions which
enables ".exe" support in autoconf since 2.53 (?).

---------------------------
--- old/gettext-0.11.5/m4/progtest.m4   Wed Jan 16 12:19:34 2002
+++ gnu/gettext-0.11.5/m4/progtest.m4   Fri Nov  1 14:47:52 2002
@@ -32,15 +32,18 @@
   ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
   ;;
   *)
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in ifelse([$5], , $PATH, [$5]); do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if [$3]; then
-       ac_cv_path_$1="$ac_dir/$ac_word"
-       break
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_exec_ext in '' $ac_executable_extensions; do
+    for ac_dir in ifelse([$5], , $PATH, [$5]); do
+      test -z "$ac_dir" && ac_dir=.
+      if test -f $ac_dir/$ac_word; then
+        if [$3]; then
+         ac_cv_path_$1="$ac_dir/$ac_word"
+         break
+        fi
       fi
-    fi
+    done
+   test -z "[$]ac_cv_path_$1" || break
   done
   IFS="$ac_save_ifs"
 dnl If no 4th arg is given, leave the cache variable unset,
---------------------------


I added PATH_SEPARATOR to config.h so that no #ifdef's are
necessary for this.

---------------------------
--- old/gettext-0.11.5/configure.in     Tue Aug  6 13:54:56 2002
+++ gnu/gettext-0.11.5/configure.in     Sun Oct 13 21:48:36 2002
@@ -234,6 +234,10 @@
 changequote([, ])dnl
 AC_SUBST(LTALLOCA)

+AC_DEFINE_UNQUOTED([PATH_SEPARATOR],
+  ['${PATH_SEPARATOR-:}'], [Define to ':' or ';']
+)
+
 AC_OUTPUT([Makefile \
            lib/Makefile lib/javacomp.sh lib/javaexec.sh \
            intl/Makefile intl-java/Makefile \
---------------------------


Please provide a Makefile.am for the intl subdirectory. Otherwise
odd patches like that one below are necessary:

---------------------------
--- old/gettext-0.11.5/intl/Makefile.in Thu Jul 25 12:49:56 2002
+++ gnu/gettext-0.11.5/intl/Makefile.in Sat Oct 19 20:39:38 2002
@@ -55,7 +55,8 @@
 -DLIBDIR=\"$(libdir)\" -DIN_LIBINTL @DEFS@
 CPPFLAGS = @CPPFLAGS@
 CFLAGS = @CFLAGS@
-LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+LDFLAGS = @LDFLAGS@ $(LIBS)

 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)

@@ -294,7 +295,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
---------------------------


I also had to update doc/mdate-sh because the output of "ls" has less
columns on OS/2.

---------------------------
--- old/gettext-0.11.5/doc/mdate-sh     Fri Jun 16 07:49:22 2000
+++ gnu/gettext-0.11.5/doc/mdate-sh     Sun Oct 13 20:46:04 2002
@@ -35,8 +35,8 @@
 # The month is at least the fourth argument
 # (3 shifts here, the next inside the loop).
 shift
-shift
-shift
+#shift
+#shift

 # Find the month.  Next argument is day, followed by the year or time.
 month=
---------------------------


After that, I have some general notes about the current gettext:

1) Something that was driving me nuts: When configure checks for an
   existing libintl it prints messages like
   checking for msgfmt... /usr/bin/msgfmt
   but there is no message that informs the user about the final
   decision whether the internal or the external gettext will be used
   or even none of them.
   The worst case happened when out admins upgraded our Linux PC's
   partially. The executables of the gettext package had different sizes
   when compiled on different machines and NLS worked differently on
   those systems. So I had no clue why it worked for that PC but not
   for the other one. Please, add a AC_MSG_NOTICE([using internal gettext])
   or something like that.

2) aclocal files are installed into prefix/share/aclocal without
   any further notice. If I haven't installed aclocal at the same
   location these files are completely useless for me. E.g. the admin
   has installed the auto* tools to /usr/local and I install gettext
   to ~/my_stuff. I think there should be at least a notice that aclocal
   files will be installed to prefix/share/aclocal or even better
   a message that prefix/share/aclocal is not identical to what
   "aclocal --print-ac-dir" delivers.

3) There is no option to change aclocaldir and docdir by a configure
   option. Please add --with-aclocaldir and --with-docdir to the options.
   E.g. the File Hierarchy Standard requires additional docs to be installed
   into prefix/share/doc, not prefix/doc. Fiddling around with make
   options "make install docdir=/usr/local/share/doc/gettext" is nasty
   as well as unexpected.


The "real" stuff will follow. ;-)

Thanks,
Andreas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]