From b6d8893eb718ed3c0354f53cdf67d1268fb96de3 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Fri, 28 Sep 2001 23:44:46 +0000 Subject: [PATCH] Fix macros from libcharset to work with autoconf-2.5x. (From Laszlo Fri Sep 28 19:41:32 2001 Owen Taylor * glib/libcharset/* configure.in: Fix macros from libcharset to work with autoconf-2.5x. (From Laszlo Peter.) --- ChangeLog | 5 +++ ChangeLog.pre-2-0 | 5 +++ ChangeLog.pre-2-10 | 5 +++ ChangeLog.pre-2-12 | 5 +++ ChangeLog.pre-2-2 | 5 +++ ChangeLog.pre-2-4 | 5 +++ ChangeLog.pre-2-6 | 5 +++ ChangeLog.pre-2-8 | 5 +++ aclibcharset.m4 | 47 --------------------------- configure.in | 3 +- docs/reference/glib/tmpl/memory.sgml | 8 +++++ glib/libcharset/Makefile.am | 2 ++ glib/libcharset/codeset.m4 | 20 ++++++++++++ glib/libcharset/glibc21.m4 | 26 +++++++++++++++ glib/libcharset/libcharset-glib.patch | 22 +++++++++++++ glib/libcharset/make-patch.sh | 4 +++ glib/libcharset/update.sh | 7 ++-- 17 files changed, 128 insertions(+), 51 deletions(-) delete mode 100644 aclibcharset.m4 create mode 100644 glib/libcharset/codeset.m4 create mode 100644 glib/libcharset/glibc21.m4 diff --git a/ChangeLog b/ChangeLog index 7e32b46ed..c21a84a92 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Sep 28 19:41:32 2001 Owen Taylor + + * glib/libcharset/* configure.in: Fix macros from libcharset + to work with autoconf-2.5x. (From Laszlo Peter.) + 2001-09-27 Matthias Clasen * glib/gstring.c: Fix inline docs for g_string_prepend_unichar. diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 7e32b46ed..c21a84a92 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,8 @@ +Fri Sep 28 19:41:32 2001 Owen Taylor + + * glib/libcharset/* configure.in: Fix macros from libcharset + to work with autoconf-2.5x. (From Laszlo Peter.) + 2001-09-27 Matthias Clasen * glib/gstring.c: Fix inline docs for g_string_prepend_unichar. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 7e32b46ed..c21a84a92 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Fri Sep 28 19:41:32 2001 Owen Taylor + + * glib/libcharset/* configure.in: Fix macros from libcharset + to work with autoconf-2.5x. (From Laszlo Peter.) + 2001-09-27 Matthias Clasen * glib/gstring.c: Fix inline docs for g_string_prepend_unichar. diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 7e32b46ed..c21a84a92 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +Fri Sep 28 19:41:32 2001 Owen Taylor + + * glib/libcharset/* configure.in: Fix macros from libcharset + to work with autoconf-2.5x. (From Laszlo Peter.) + 2001-09-27 Matthias Clasen * glib/gstring.c: Fix inline docs for g_string_prepend_unichar. diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 7e32b46ed..c21a84a92 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +Fri Sep 28 19:41:32 2001 Owen Taylor + + * glib/libcharset/* configure.in: Fix macros from libcharset + to work with autoconf-2.5x. (From Laszlo Peter.) + 2001-09-27 Matthias Clasen * glib/gstring.c: Fix inline docs for g_string_prepend_unichar. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 7e32b46ed..c21a84a92 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +Fri Sep 28 19:41:32 2001 Owen Taylor + + * glib/libcharset/* configure.in: Fix macros from libcharset + to work with autoconf-2.5x. (From Laszlo Peter.) + 2001-09-27 Matthias Clasen * glib/gstring.c: Fix inline docs for g_string_prepend_unichar. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 7e32b46ed..c21a84a92 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Fri Sep 28 19:41:32 2001 Owen Taylor + + * glib/libcharset/* configure.in: Fix macros from libcharset + to work with autoconf-2.5x. (From Laszlo Peter.) + 2001-09-27 Matthias Clasen * glib/gstring.c: Fix inline docs for g_string_prepend_unichar. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 7e32b46ed..c21a84a92 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Fri Sep 28 19:41:32 2001 Owen Taylor + + * glib/libcharset/* configure.in: Fix macros from libcharset + to work with autoconf-2.5x. (From Laszlo Peter.) + 2001-09-27 Matthias Clasen * glib/gstring.c: Fix inline docs for g_string_prepend_unichar. diff --git a/aclibcharset.m4 b/aclibcharset.m4 deleted file mode 100644 index 4f7c20bed..000000000 --- a/aclibcharset.m4 +++ /dev/null @@ -1,47 +0,0 @@ -dnl From libcharset 1.1 -#serial 2 - -dnl From Bruno Haible. - -AC_DEFUN(jm_LANGINFO_CODESET, -[ - AC_CHECK_HEADERS(langinfo.h) - AC_CHECK_FUNCS(nl_langinfo) - - AC_CACHE_CHECK([for nl_langinfo and CODESET], jm_cv_langinfo_codeset, - [AC_TRY_LINK([#include ], - [char* cs = nl_langinfo(CODESET);], - jm_cv_langinfo_codeset=yes, - jm_cv_langinfo_codeset=no) - ]) - if test $jm_cv_langinfo_codeset = yes; then - AC_DEFINE(HAVE_LANGINFO_CODESET, 1, - [Define if you have and nl_langinfo(CODESET).]) - fi -]) -#serial 2 - -# Test for the GNU C Library, version 2.1 or newer. -# From Bruno Haible. - -AC_DEFUN(jm_GLIBC21, - [ - AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, - ac_cv_gnu_library_2_1, - [AC_EGREP_CPP([Lucky GNU user], - [ -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) - Lucky GNU user - #endif -#endif - ], - ac_cv_gnu_library_2_1=yes, - ac_cv_gnu_library_2_1=no) - ] - ) - AC_SUBST(GLIBC21) - GLIBC21="$ac_cv_gnu_library_2_1" - ] -) diff --git a/configure.in b/configure.in index 31c10bcc1..e2b180d24 100644 --- a/configure.in +++ b/configure.in @@ -2,7 +2,8 @@ dnl *********************************** dnl *** include special GLib macros *** dnl *********************************** builtin(include, acglib.m4)dnl -builtin(include, aclibcharset.m4)dnl +builtin(include, glib/libcharset/codeset.m4)dnl +builtin(include, glib/libcharset/glibc21.m4)dnl # require autoconf 2.13 AC_PREREQ(2.13) diff --git a/docs/reference/glib/tmpl/memory.sgml b/docs/reference/glib/tmpl/memory.sgml index 1df03a075..22feb9414 100644 --- a/docs/reference/glib/tmpl/memory.sgml +++ b/docs/reference/glib/tmpl/memory.sgml @@ -201,6 +201,14 @@ function has been called. @vtable: table of memory allocation routines. + + + + + +@Returns: + + diff --git a/glib/libcharset/Makefile.am b/glib/libcharset/Makefile.am index 859fc8601..0ba6bda67 100644 --- a/glib/libcharset/Makefile.am +++ b/glib/libcharset/Makefile.am @@ -14,6 +14,8 @@ EXTRA_DIST = \ charset.alias \ ref-add.sed \ ref-del.sed \ + glibc21.m4 \ + codeset.m4 \ update.sh \ make-patch.sh diff --git a/glib/libcharset/codeset.m4 b/glib/libcharset/codeset.m4 new file mode 100644 index 000000000..e08ec6665 --- /dev/null +++ b/glib/libcharset/codeset.m4 @@ -0,0 +1,20 @@ +#serial 2 + +dnl From Bruno Haible. + +AC_DEFUN([jm_LANGINFO_CODESET], +[ + AC_CHECK_HEADERS(langinfo.h) + AC_CHECK_FUNCS(nl_langinfo) + + AC_CACHE_CHECK([for nl_langinfo and CODESET], jm_cv_langinfo_codeset, + [AC_TRY_LINK([#include ], + [char* cs = nl_langinfo(CODESET);], + jm_cv_langinfo_codeset=yes, + jm_cv_langinfo_codeset=no) + ]) + if test $jm_cv_langinfo_codeset = yes; then + AC_DEFINE(HAVE_LANGINFO_CODESET, 1, + [Define if you have and nl_langinfo(CODESET).]) + fi +]) diff --git a/glib/libcharset/glibc21.m4 b/glib/libcharset/glibc21.m4 new file mode 100644 index 000000000..5b88ef231 --- /dev/null +++ b/glib/libcharset/glibc21.m4 @@ -0,0 +1,26 @@ +#serial 2 + +# Test for the GNU C Library, version 2.1 or newer. +# From Bruno Haible. + +AC_DEFUN([jm_GLIBC21], + [ + AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, + ac_cv_gnu_library_2_1, + [AC_EGREP_CPP([Lucky GNU user], + [ +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif +#endif + ], + ac_cv_gnu_library_2_1=yes, + ac_cv_gnu_library_2_1=no) + ] + ) + AC_SUBST(GLIBC21) + GLIBC21="$ac_cv_gnu_library_2_1" + ] +) diff --git a/glib/libcharset/libcharset-glib.patch b/glib/libcharset/libcharset-glib.patch index 92895899a..c1069abd7 100644 --- a/glib/libcharset/libcharset-glib.patch +++ b/glib/libcharset/libcharset-glib.patch @@ -30,6 +30,28 @@ *aliases != '\0'; aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) if (strcmp (codeset, aliases) == 0 +--- /home/otaylor/ftp/libiconv-1.7.0.1/libcharset/m4/glibc21.m4 Sat Jun 17 14:31:21 2000 ++++ glibc21.m4 Fri Sep 28 12:12:39 2001 +@@ -3,7 +3,7 @@ + # Test for the GNU C Library, version 2.1 or newer. + # From Bruno Haible. + +-AC_DEFUN(jm_GLIBC21, ++AC_DEFUN([jm_GLIBC21], + [ + AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, + ac_cv_gnu_library_2_1, +--- /home/otaylor/ftp/libiconv-1.7.0.1/libcharset/m4/codeset.m4 Mon Apr 3 04:06:24 2000 ++++ codeset.m4 Fri Sep 28 12:12:44 2001 +@@ -2,7 +2,7 @@ + + dnl From Bruno Haible. + +-AC_DEFUN(jm_LANGINFO_CODESET, ++AC_DEFUN([jm_LANGINFO_CODESET], + [ + AC_CHECK_HEADERS(langinfo.h) + AC_CHECK_FUNCS(nl_langinfo) --- /home/otaylor/ftp/libiconv-1.7.0.1/libcharset/include/libcharset.h.in Tue Mar 27 08:34:42 2001 +++ libcharset.h Wed Sep 26 21:55:40 2001 @@ -30,8 +30,8 @@ diff --git a/glib/libcharset/make-patch.sh b/glib/libcharset/make-patch.sh index 9548708c5..e8156bbbe 100755 --- a/glib/libcharset/make-patch.sh +++ b/glib/libcharset/make-patch.sh @@ -20,4 +20,8 @@ for i in localcharset.c ref-add.sin ref-del.sin ; do diff -u $ORIGINAL/lib/$i $i >> libcharset-glib.patch done +for i in glibc21.m4 codeset.m4 ; do + diff -u $ORIGINAL/m4/$i $i >> libcharset-glib.patch +done + diff -u $ORIGINAL/include/libcharset.h.in libcharset.h >> libcharset-glib.patch diff --git a/glib/libcharset/update.sh b/glib/libcharset/update.sh index 6e2dfce55..9548d3608 100755 --- a/glib/libcharset/update.sh +++ b/glib/libcharset/update.sh @@ -20,11 +20,12 @@ done cp $ORIGINAL/include/libcharset.h.in ./libcharset.h +for i in codeset.m4 glibc21.m4 ; do + cp $ORIGINAL/m4/$i . +done + patch -p0 < libcharset-glib.patch echo "dnl From libcharset $VERSION" > ../../aclibcharset.m4 -for i in codeset.m4 glibc21.m4 ; do - cat $ORIGINAL/m4/$i >> ../../aclibcharset.m4 -done