summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2006-10-23 11:18:26 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:14:11 +0200
commitf6fb612653067742d0962cb0350bb280be78f188 (patch)
treef96d22b4e8513734cd3746570033f3bf42b0888c
parent73d9fc78d55e20be296f136d67fa78e22b61af56 (diff)
downloadexternal_gettext-f6fb612653067742d0962cb0350bb280be78f188.zip
external_gettext-f6fb612653067742d0962cb0350bb280be78f188.tar.gz
external_gettext-f6fb612653067742d0962cb0350bb280be78f188.tar.bz2
Fix the build of libgettextpo with a separate gnulib checkout.
-rw-r--r--ChangeLog6
-rwxr-xr-xautogen.sh5
-rw-r--r--gettext-tools/ChangeLog5
-rw-r--r--gettext-tools/Makefile.am2
-rw-r--r--gettext-tools/configure.ac2
-rw-r--r--gettext-tools/libgettextpo/ChangeLog6
-rw-r--r--gettext-tools/libgettextpo/Makefile.am14
-rw-r--r--gnulib-local/ChangeLog7
-rw-r--r--gnulib-local/Makefile.am1
-rw-r--r--gnulib-local/lib/obstack.c.diff29
-rw-r--r--gnulib-local/lib/obstack.h.diff60
11 files changed, 130 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 24045e4..5ea653c 100644
--- 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.
diff --git a/autogen.sh b/autogen.sh
index c94a2f9..3767f55 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -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
diff --git a/gettext-tools/ChangeLog b/gettext-tools/ChangeLog
index 666b8c7..cfe9d1e 100644
--- a/gettext-tools/ChangeLog
+++ b/gettext-tools/ChangeLog
@@ -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_*.
diff --git a/gettext-tools/Makefile.am b/gettext-tools/Makefile.am
index 7a731e2..9d92c32 100644
--- a/gettext-tools/Makefile.am
+++ b/gettext-tools/Makefile.am
@@ -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
diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac
index 1a4114c..88f49da 100644
--- a/gettext-tools/configure.ac
+++ b/gettext-tools/configure.ac
@@ -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)
diff --git a/gettext-tools/libgettextpo/ChangeLog b/gettext-tools/libgettextpo/ChangeLog
index a89ccb2..ef31051 100644
--- a/gettext-tools/libgettextpo/ChangeLog
+++ b/gettext-tools/libgettextpo/ChangeLog
@@ -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/.
diff --git a/gettext-tools/libgettextpo/Makefile.am b/gettext-tools/libgettextpo/Makefile.am
index 2faadef..c114440 100644
--- a/gettext-tools/libgettextpo/Makefile.am
+++ b/gettext-tools/libgettextpo/Makefile.am
@@ -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
diff --git a/gnulib-local/ChangeLog b/gnulib-local/ChangeLog
index f0a9566..aa3acf6 100644
--- a/gnulib-local/ChangeLog
+++ b/gnulib-local/ChangeLog
@@ -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
diff --git a/gnulib-local/Makefile.am b/gnulib-local/Makefile.am
index 8aad338..827f0c8 100644
--- a/gnulib-local/Makefile.am
+++ b/gnulib-local/Makefile.am
@@ -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
index 0000000..d62f2b9
--- /dev/null
+++ b/gnulib-local/lib/obstack.c.diff
@@ -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)
diff --git a/gnulib-local/lib/obstack.h.diff b/gnulib-local/lib/obstack.h.diff
index c2dc6ae..4808fb9 100644
--- a/gnulib-local/lib/obstack.h.diff
+++ b/gnulib-local/lib/obstack.h.diff
@@ -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);
+
+
+ /* 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);
+
+
+ /* Error handler called when `obstack_chunk_alloc' failed to allocate
***************
*** 193,202 ****
more memory. This can be set to a user defined function which
@@ -23,3 +45,37 @@
/* 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); })
+
+ #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); })
+
+ #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__ */
+