]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix the build of libgettextpo with a separate gnulib checkout.
authorBruno Haible <bruno@clisp.org>
Mon, 23 Oct 2006 11:18:26 +0000 (11:18 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:14:11 +0000 (12:14 +0200)
ChangeLog
autogen.sh
gettext-tools/ChangeLog
gettext-tools/Makefile.am
gettext-tools/configure.ac
gettext-tools/libgettextpo/ChangeLog
gettext-tools/libgettextpo/Makefile.am
gnulib-local/ChangeLog
gnulib-local/Makefile.am
gnulib-local/lib/obstack.c.diff [new file with mode: 0644]
gnulib-local/lib/obstack.h.diff

index 24045e4da1b72ac61c300ee305e68978037dcc5e..5ea653ca942d0ade61eeb5594ce231e0333277c9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-10-20  Bruno Haible  <bruno@clisp.org>
+
+       * autogen.sh: Don't remove gettext-tools/libgettextpo/gnulib-m4.
+       Move the "-I gnulib-m4" to the end of the aclocal command lines.
+       Also add "-I libgettextpo/gnulib-m4".
+
 2006-10-16  Bruno Haible  <bruno@clisp.org>
 
        * autogen.sh (GNULIB_MODULES_FOR_LIBGETTEXTPO): New variable.
index c94a2f928cab32b72bf9afb3a8adc2b2539078fe..3767f55cab95e3599c83f071171eb938dc4eaa22 100755 (executable)
@@ -201,7 +201,6 @@ if test -n "$GNULIB_TOOL"; then
   GNULIB_MODULES_OTHER=''
   $GNULIB_TOOL --dir=gettext-tools --source-base=libgettextpo --m4-base=libgettextpo/gnulib-m4 --macro-prefix=gtpo --makefile-name=Makefile.gnulib --libtool --local-dir=gnulib-local \
     --import $GNULIB_MODULES_FOR_LIBGETTEXTPO $GNULIB_MODULES_OTHER
-  rm -rf gettext-tools/libgettextpo/gnulib-m4
 fi
 
 (cd autoconf-lib-link
@@ -211,7 +210,7 @@ fi
 )
 
 (cd gettext-runtime
- aclocal -I m4 -I gnulib-m4 -I ../autoconf-lib-link/m4 -I ../m4
+ aclocal -I m4 -I ../autoconf-lib-link/m4 -I ../m4 -I gnulib-m4
  autoconf
  autoheader && touch config.h.in
  automake
@@ -227,7 +226,7 @@ fi
 cp -p gettext-runtime/ABOUT-NLS gettext-tools/ABOUT-NLS
 
 (cd gettext-tools
- aclocal -I m4 -I gnulib-m4 -I ../gettext-runtime/m4 -I ../autoconf-lib-link/m4 -I ../m4
+ aclocal -I m4 -I ../gettext-runtime/m4 -I ../autoconf-lib-link/m4 -I ../m4 -I gnulib-m4 -I libgettextpo/gnulib-m4
  autoconf
  autoheader && touch config.h.in
  automake
index 666b8c759d58fba8fee3ad2843373edbaa9907b6..cfe9d1e9aad3868ca9de028371725ee9b59d5f25 100644 (file)
@@ -1,3 +1,8 @@
+2006-10-20  Bruno Haible  <bruno@clisp.org>
+
+       * Makefile.am (ACLOCAL_AMFLAGS): Add -I libgettextpo/gnulib-m4.
+       * configure.ac: Also invoke gtpo_EARLY, gtpo_INIT.
+
 2006-10-18  Bruno Haible  <bruno@clisp.org>
 
        * woe32dll/gettextsrc-exports.c: Add {input,output}_format_*.
index 7a731e23dd51f093c358c927c3b150ff62b04239..9d92c3205f7dacbc0006ef2944dada0efd2bd552 100644 (file)
@@ -18,7 +18,7 @@
 ## Process this file with automake to produce Makefile.in.
 
 AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
-ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../autoconf-lib-link/m4 -I ../m4 -I gnulib-m4
+ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../autoconf-lib-link/m4 -I ../m4 -I gnulib-m4 -I libgettextpo/gnulib-m4
 
 SUBDIRS = doc intl gnulib-lib libgrep libuniname src libgettextpo po projects misc man m4 tests examples
 
index 1a4114ce2208f6d9dc5897e99649b12e18a3d56f..88f49da119bf6f36c9f480bb01b09dac58e471db 100644 (file)
@@ -84,6 +84,7 @@ AC_EXEEXT
 
 dnl Make sure we see all GNU and Solaris extensions.
 gl_EARLY
+gtpo_EARLY
 
 dnl Check for build configuration.
 gl_WOE32_DLL
@@ -131,6 +132,7 @@ gt_OPENMP
 
 dnl Checks for header files, functions and declarations.
 gl_INIT
+gtpo_INIT
 
 dnl Checks for header files.
 AC_CHECK_HEADERS(pwd.h)
index a89ccb2a82b6e10a63251a5979aebbc110335e77..ef310513ad041ef597d18d19bb2e52fafe015eeb 100644 (file)
@@ -1,3 +1,9 @@
+2006-10-20  Bruno Haible  <bruno@clisp.org>
+
+       * Makefile.am (config.h): Treat .lo files like .o files. Define
+       DLL_VARIABLE to empty. Avoid warning when config.h is included twice.
+       Add special hack for obstack_free.
+
 2006-10-16  Bruno Haible  <bruno@clisp.org>
 
        * gettext-po.h.in: New file, moved here from ../src/.
index 2faadefa0c18257e6a31eb122f14ea848babf7c9..c1144401af2a866703f4d0404e414ca53c428690 100644 (file)
@@ -111,15 +111,26 @@ endif
 BUILT_SOURCES += config.h
 config.h:
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         : "Avoid double inclusion, to avoid a warning about redefinition of DLL_VARIABLE."; \
+         echo '#ifndef GTPO_CONFIG_H'; \
+         echo '#define GTPO_CONFIG_H'; \
+         echo; \
          echo '#include "../config.h"'; \
+         : "Turn all gettext() calls into dgettext() calls."; \
          echo '#define DEFAULT_TEXT_DOMAIN "gettext-tools"'; \
+         : "All code is collected in a single library,"; \
+         : "No references to variables in other libraries exist."; \
+         echo '#undef DLL_VARIABLE'; \
+         echo '#define DLL_VARIABLE'; \
+         echo; \
+         echo '#endif /* GTPO_CONFIG_H */'; \
        } > config.h; \
        $(MAKE) $(BUILT_SOURCES) || { rm -f config.h; exit 1; }; \
        if test -n "$(HAVE_GLOBAL_SYMBOL_PIPE)"; then \
          { \
            for f in $(libgettextpo_la_AUXSOURCES) $(libgnu_la_SOURCES) $(libgnu_la_LIBADD); do \
              case $$f in \
-               *.c | *.$(OBJEXT) ) \
+               *.c | *.$(OBJEXT) | *.lo ) \
                  sf=`echo "$$f" | sed -e 's,\\.[^.]*$$,,'`.c; \
                  of=`echo "$$f" | sed -e 's,^.*/,,' -e 's,\\.[^.]*$$,,'`.$(OBJEXT); \
                  $(COMPILE) -c $(srcdir)/$$sf || { rm -f config.h; exit 1; }; \
@@ -130,6 +141,7 @@ config.h:
            done; \
          } 5>&1 \
            | sed -e 's,.* ,,' | LC_ALL=C sort | LC_ALL=C uniq \
+           | sed -e 's,^obstack_free$$,_obstack_free,' \
            | sed -e 's,^\(.*\)$$,#define \1 libgettextpo_\1,' > config.h-t; \
          cat config.h-t >> config.h; \
        fi
index f0a9566439322d7bfd843ed261565f93135d37a5..aa3acf6fdb2bf2e4b0822e98d75aca78b66b99f6 100644 (file)
@@ -1,3 +1,10 @@
+2006-10-20  Bruno Haible  <bruno@clisp.org>
+
+       * lib/obstack.h.diff: Use _obstack_free instead of obstack_free, but
+       define _obstack_free to obstack_free by default.
+       * lib/obstack.c.diff: New file.
+       * Makefile.am (EXTRA_DIST): Add it.
+
 2006-10-17  Bruno Haible  <bruno@clisp.org>
 
        * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
index 8aad33860c2032b7c241904de168f36ca0002ee8..827f0c8c67ee707ab151c28563f9766678228fd0 100644 (file)
@@ -51,6 +51,7 @@ lib/hash.c \
 lib/hash.h \
 lib/javacomp.c.diff \
 lib/linebreak.c.diff \
+lib/obstack.c.diff \
 lib/obstack.h.diff \
 lib/progname.h.diff \
 lib/propername.c \
diff --git a/gnulib-local/lib/obstack.c.diff b/gnulib-local/lib/obstack.c.diff
new file mode 100644 (file)
index 0000000..d62f2b9
--- /dev/null
@@ -0,0 +1,29 @@
+*** obstack.c  2006-09-19 00:51:16.000000000 +0200
+--- obstack.c  2006-10-21 02:57:17.000000000 +0200
+***************
+*** 342,348 ****
+  # undef obstack_free
+  
+  void
+! obstack_free (struct obstack *h, void *obj)
+  {
+    register struct _obstack_chunk *lp;        /* below addr of any objects in this chunk */
+    register struct _obstack_chunk *plp;       /* point to previous chunk if any */
+--- 342,348 ----
+  # undef obstack_free
+  
+  void
+! _obstack_free (struct obstack *h, void *obj)
+  {
+    register struct _obstack_chunk *lp;        /* below addr of any objects in this chunk */
+    register struct _obstack_chunk *plp;       /* point to previous chunk if any */
+***************
+*** 372,377 ****
+--- 372,378 ----
+  }
+  
+  # ifdef _LIBC
++ #  undef _obstack_free
+  /* Older versions of libc used a function _obstack_free intended to be
+     called by non-GCC compilers.  */
+  strong_alias (obstack_free, _obstack_free)
index c2dc6ae5c7def6ceeabb5ace8e142bbeb95a8d72..4808fb9e3a1701ca669c0f15f2f9820ddb61c6a0 100644 (file)
@@ -1,5 +1,27 @@
-*** gnulib/lib/obstack.h       2005-10-15 01:23:50.000000000 +0200
---- gettext-tools/lib/obstack.h        2006-07-22 17:48:51.000000000 +0200
+*** obstack.h  2005-10-15 01:23:50.000000000 +0200
+--- obstack.h  2006-07-22 17:48:51.000000000 +0200
+***************
+*** 186,192 ****
+                            void (*) (void *, void *), void *);
+  extern int _obstack_memory_used (struct obstack *);
+  
+! void obstack_free (struct obstack *obstack, void *block);
+  
+  \f
+  /* Error handler called when `obstack_chunk_alloc' failed to allocate
+--- 186,197 ----
+                            void (*) (void *, void *), void *);
+  extern int _obstack_memory_used (struct obstack *);
+  
+! /* The default name of the function for freeing a chunk is 'obstack_free',
+!    but gnulib users can override this by defining '_obstack_free'.  */
+! #ifndef _obstack_free
+! # define _obstack_free obstack_free
+! #endif
+! void _obstack_free (struct obstack *obstack, void *block);
+  
+  \f
+  /* Error handler called when `obstack_chunk_alloc' failed to allocate
 ***************
 *** 193,202 ****
      more memory.  This can be set to a user defined function which
   \f
   /* Pointer to beginning of object being allocated or to be allocated next.
      Note that this might not be the final address of the object
+***************
+*** 399,405 ****
+     void *__obj = (OBJ);                                                      \
+     if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit)  \
+       __o->next_free = __o->object_base = (char *)__obj;                      \
+!    else (obstack_free) (__o, __obj); })
+  \f
+  #else /* not __GNUC__ or not __STDC__ */
+  
+--- 404,410 ----
+     void *__obj = (OBJ);                                                      \
+     if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit)  \
+       __o->next_free = __o->object_base = (char *)__obj;                      \
+!    else (_obstack_free) (__o, __obj); })
+  \f
+  #else /* not __GNUC__ or not __STDC__ */
+  
+***************
+*** 497,503 ****
+      && (h)->temp.tempint < (h)->chunk_limit - (char *) (h)->chunk))  \
+     ? (int) ((h)->next_free = (h)->object_base                                \
+           = (h)->temp.tempint + (char *) (h)->chunk)                  \
+!    : (((obstack_free) ((h), (h)->temp.tempint + (char *) (h)->chunk), 0), 0)))
+  
+  #endif /* not __GNUC__ or not __STDC__ */
+  
+--- 502,508 ----
+      && (h)->temp.tempint < (h)->chunk_limit - (char *) (h)->chunk))  \
+     ? (int) ((h)->next_free = (h)->object_base                                \
+           = (h)->temp.tempint + (char *) (h)->chunk)                  \
+!    : (((_obstack_free) ((h), (h)->temp.tempint + (char *) (h)->chunk), 0), 0)))
+  
+  #endif /* not __GNUC__ or not __STDC__ */
+