diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2020-08-23 22:20:28 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-08-25 16:00:11 +0100 |
commit | 2457432ad9a1f232dd67e06918bc2d7e3831d305 (patch) | |
tree | c4651d363bf6201bbc17e076d2933d6b62280242 /meta/recipes-core/gettext/gettext-0.21 | |
parent | 742c773a93d1b7a5ca9d2f04e15492b170439180 (diff) | |
download | poky-2457432ad9a1f232dd67e06918bc2d7e3831d305.tar.gz |
gettext: update 0.20.2 -> 0.21
Drop add-with-bisonlocaledir.patch as upstream (gnulib, not bison)
now determines the directory from datadir.
(From OE-Core rev: 8a89c77e5b5a7915b9cce4979ee8caa593847e51)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/gettext/gettext-0.21')
7 files changed, 876 insertions, 0 deletions
diff --git a/meta/recipes-core/gettext/gettext-0.21/0001-init-env.in-do-not-add-C-CXX-parameters.patch b/meta/recipes-core/gettext/gettext-0.21/0001-init-env.in-do-not-add-C-CXX-parameters.patch new file mode 100644 index 0000000000..d45b75869a --- /dev/null +++ b/meta/recipes-core/gettext/gettext-0.21/0001-init-env.in-do-not-add-C-CXX-parameters.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 9b912a47f790a7b282ec0c2295a188c5d8fb6a7c Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Fri, 6 Mar 2020 21:04:05 +0000 | ||
4 | Subject: [PATCH] init-env.in: do not add C/CXX parameters | ||
5 | |||
6 | These are taken from the cross environment and include | ||
7 | sysroot paths, so are not reproducible. | ||
8 | |||
9 | Upstream-Status: Inappropriate [oe-core specific] | ||
10 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
11 | --- | ||
12 | gettext-tools/tests/init-env.in | 4 ---- | ||
13 | 1 file changed, 4 deletions(-) | ||
14 | |||
15 | diff --git a/gettext-tools/tests/init-env.in b/gettext-tools/tests/init-env.in | ||
16 | index cc84ffd..b69c990 100644 | ||
17 | --- a/gettext-tools/tests/init-env.in | ||
18 | +++ b/gettext-tools/tests/init-env.in | ||
19 | @@ -3,10 +3,6 @@ top_builddir=../.. | ||
20 | |||
21 | OBJEXT="@OBJEXT@" | ||
22 | EXEEXT="@EXEEXT@" | ||
23 | -CC="@CC@" | ||
24 | -CFLAGS="@CFLAGS@" | ||
25 | -CXX="@CXX@" | ||
26 | -CXXFLAGS="@CXXFLAGS@" | ||
27 | CPPFLAGS="@CPPFLAGS@" | ||
28 | LDFLAGS="@LDFLAGS@" | ||
29 | LTLIBINTL="@LTLIBINTL@" | ||
diff --git a/meta/recipes-core/gettext/gettext-0.21/0001-tests-autopoint-3-unset-MAKEFLAGS.patch b/meta/recipes-core/gettext/gettext-0.21/0001-tests-autopoint-3-unset-MAKEFLAGS.patch new file mode 100644 index 0000000000..b0bc6b97a6 --- /dev/null +++ b/meta/recipes-core/gettext/gettext-0.21/0001-tests-autopoint-3-unset-MAKEFLAGS.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From 38b256e5aa7dfeb42acffd89565e53a2c0bab3e3 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Tue, 7 Jan 2020 16:44:38 +0100 | ||
4 | Subject: [PATCH] tests/autopoint-3: unset MAKEFLAGS | ||
5 | |||
6 | This is needed when running ptests, as the MAKEFLAGS value (set up by run-ptest) | ||
7 | is messing up the test. | ||
8 | |||
9 | Upstream-Status: Inappropriate [oe-core specific] | ||
10 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
11 | --- | ||
12 | gettext-tools/tests/autopoint-3 | 1 + | ||
13 | 1 file changed, 1 insertion(+) | ||
14 | |||
15 | diff --git a/gettext-tools/tests/autopoint-3 b/gettext-tools/tests/autopoint-3 | ||
16 | index e13552b..55188df 100755 | ||
17 | --- a/gettext-tools/tests/autopoint-3 | ||
18 | +++ b/gettext-tools/tests/autopoint-3 | ||
19 | @@ -126,6 +126,7 @@ test $? = 0 || { cat autopoint.err; Exit 1; } | ||
20 | ${CONFIG_SHELL} ./configure >/dev/null 2>autpoint.err | ||
21 | test $? = 0 || { cat autopoint.err; Exit 1; } | ||
22 | |||
23 | +unset MAKEFLAGS | ||
24 | ${MAKE} >/dev/null 2>autopoint.err | ||
25 | test $? = 0 || { cat autopoint.err; Exit 1; } | ||
26 | |||
diff --git a/meta/recipes-core/gettext/gettext-0.21/mingw.patch b/meta/recipes-core/gettext/gettext-0.21/mingw.patch new file mode 100644 index 0000000000..b062c784f6 --- /dev/null +++ b/meta/recipes-core/gettext/gettext-0.21/mingw.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 7cf68dffb2adb76375bfb0781e277510523a1f3e Mon Sep 17 00:00:00 2001 | ||
2 | From: Michele Locati <michele@locati.it> | ||
3 | Date: Thu, 30 Jul 2020 18:58:02 +0200 | ||
4 | Subject: [PATCH] build: Fix build failure on Cygwin and mingw. | ||
5 | |||
6 | * gettext-tools/woe32dll/gettextsrc-exports.c: Export formatstring_ruby. | ||
7 | |||
8 | Upstream-Status: Backport | ||
9 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
10 | --- | ||
11 | gettext-tools/woe32dll/gettextsrc-exports.c | 1 + | ||
12 | 1 file changed, 1 insertion(+) | ||
13 | |||
14 | diff --git a/gettext-tools/woe32dll/gettextsrc-exports.c b/gettext-tools/woe32dll/gettextsrc-exports.c | ||
15 | index 4477ae8..6d76089 100644 | ||
16 | --- a/gettext-tools/woe32dll/gettextsrc-exports.c | ||
17 | +++ b/gettext-tools/woe32dll/gettextsrc-exports.c | ||
18 | @@ -50,6 +50,7 @@ VARIABLE(formatstring_python) | ||
19 | VARIABLE(formatstring_python_brace) | ||
20 | VARIABLE(formatstring_qt) | ||
21 | VARIABLE(formatstring_qt_plural) | ||
22 | +VARIABLE(formatstring_ruby) | ||
23 | VARIABLE(formatstring_scheme) | ||
24 | VARIABLE(formatstring_sh) | ||
25 | VARIABLE(formatstring_smalltalk) | ||
26 | -- | ||
27 | 1.9.1 | ||
28 | |||
diff --git a/meta/recipes-core/gettext/gettext-0.21/parallel.patch b/meta/recipes-core/gettext/gettext-0.21/parallel.patch new file mode 100644 index 0000000000..d96a376b7d --- /dev/null +++ b/meta/recipes-core/gettext/gettext-0.21/parallel.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From 4a2a0a93b469093b60ffd0bec55d33d1e03d4713 Mon Sep 17 00:00:00 2001 | ||
2 | From: Joe Slater <jslater@windriver.com> | ||
3 | Date: Thu, 7 Jun 2012 16:37:01 -0700 | ||
4 | Subject: [PATCH] instal libgettextlib.a before removing it | ||
5 | |||
6 | In a multiple job build, Makefile can simultaneously | ||
7 | be installing and removing libgettextlib.a. We serialize | ||
8 | the operations. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Joe Slater <jslater@windriver.com> | ||
13 | |||
14 | --- | ||
15 | gettext-tools/gnulib-lib/Makefile.am | 4 ++++ | ||
16 | 1 file changed, 4 insertions(+) | ||
17 | |||
18 | diff --git a/gettext-tools/gnulib-lib/Makefile.am b/gettext-tools/gnulib-lib/Makefile.am | ||
19 | index 2126699..d2dd7e4 100644 | ||
20 | --- a/gettext-tools/gnulib-lib/Makefile.am | ||
21 | +++ b/gettext-tools/gnulib-lib/Makefile.am | ||
22 | @@ -58,6 +58,10 @@ endif | ||
23 | # Rules generated and collected by gnulib-tool. | ||
24 | include Makefile.gnulib | ||
25 | |||
26 | +# defined in Makefile.gnulib but missing this dependency | ||
27 | +# | ||
28 | +install-exec-clean: install-libLTLIBRARIES | ||
29 | + | ||
30 | # OS/2 does not support a DLL name longer than 8 characters. | ||
31 | if OS2 | ||
32 | libgettextlib_la_LDFLAGS += -os2dllname gtlib | ||
diff --git a/meta/recipes-core/gettext/gettext-0.21/run-ptest b/meta/recipes-core/gettext/gettext-0.21/run-ptest new file mode 100644 index 0000000000..f17f3c87a7 --- /dev/null +++ b/meta/recipes-core/gettext/gettext-0.21/run-ptest | |||
@@ -0,0 +1,6 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | #This script is used to run gettext test suites | ||
4 | cd tests | ||
5 | |||
6 | make -k runtest-TESTS top_srcdir=.. srcdir=. abs_srcdir=$PWD top_builddir=$PWD/../ abs_top_srcdir=$PWD/../ | cat | ||
diff --git a/meta/recipes-core/gettext/gettext-0.21/serial-tests-config.patch b/meta/recipes-core/gettext/gettext-0.21/serial-tests-config.patch new file mode 100644 index 0000000000..93f7c03334 --- /dev/null +++ b/meta/recipes-core/gettext/gettext-0.21/serial-tests-config.patch | |||
@@ -0,0 +1,56 @@ | |||
1 | From ed64a5724ef7d6eb4e9a876f817ea266a536e195 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Hongjun.Yang" <hongjun.yang@windriver.com> | ||
3 | Date: Thu, 28 Jul 2016 12:36:15 +0800 | ||
4 | Subject: [PATCH] fix for ptest | ||
5 | |||
6 | Add serial-tests support, ptest need it | ||
7 | |||
8 | Upstream-Status: Inappropriate [oe specific] | ||
9 | |||
10 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
11 | |||
12 | --- | ||
13 | configure.ac | 2 +- | ||
14 | gettext-runtime/configure.ac | 2 +- | ||
15 | gettext-tools/configure.ac | 2 +- | ||
16 | 3 files changed, 3 insertions(+), 3 deletions(-) | ||
17 | |||
18 | diff --git a/configure.ac b/configure.ac | ||
19 | index 38db6fd..f019ae0 100644 | ||
20 | --- a/configure.ac | ||
21 | +++ b/configure.ac | ||
22 | @@ -22,7 +22,7 @@ AC_INIT([gettext], | ||
23 | [bug-gettext@gnu.org]) | ||
24 | AC_CONFIG_SRCDIR([gettext-tools/src/msgfmt.c]) | ||
25 | AC_CONFIG_AUX_DIR([build-aux]) | ||
26 | -AM_INIT_AUTOMAKE([1.13 silent-rules parallel-tests tar-ustar]) | ||
27 | +AM_INIT_AUTOMAKE([1.13 silent-rules serial-tests tar-ustar]) | ||
28 | |||
29 | dnl Override automake's tar command used for creating distributions. | ||
30 | am__tar='${AMTAR} chf - --format=ustar --owner=root --group=root "$$tardir"' | ||
31 | diff --git a/gettext-runtime/configure.ac b/gettext-runtime/configure.ac | ||
32 | index de203e7..138a07f 100644 | ||
33 | --- a/gettext-runtime/configure.ac | ||
34 | +++ b/gettext-runtime/configure.ac | ||
35 | @@ -22,7 +22,7 @@ AC_INIT([gettext-runtime], | ||
36 | [bug-gettext@gnu.org]) | ||
37 | AC_CONFIG_SRCDIR([intl/dcigettext.c]) | ||
38 | AC_CONFIG_AUX_DIR([../build-aux]) | ||
39 | -AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests]) | ||
40 | +AM_INIT_AUTOMAKE([1.11.1 silent-rules serial-tests]) | ||
41 | AC_CONFIG_HEADERS([config.h]) | ||
42 | |||
43 | dnl Installation directories. | ||
44 | diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac | ||
45 | index cf1dd73..b544d6d 100644 | ||
46 | --- a/gettext-tools/configure.ac | ||
47 | +++ b/gettext-tools/configure.ac | ||
48 | @@ -22,7 +22,7 @@ AC_INIT([gettext-tools], | ||
49 | [bug-gettext@gnu.org]) | ||
50 | AC_CONFIG_SRCDIR([src/msgfmt.c]) | ||
51 | AC_CONFIG_AUX_DIR([../build-aux]) | ||
52 | -AM_INIT_AUTOMAKE([1.11.1 silent-rules parallel-tests]) | ||
53 | +AM_INIT_AUTOMAKE([1.11.1 silent-rules serial-tests]) | ||
54 | AC_CONFIG_HEADERS([config.h]) | ||
55 | |||
56 | dnl Installation directories. | ||
diff --git a/meta/recipes-core/gettext/gettext-0.21/use-pkgconfig.patch b/meta/recipes-core/gettext/gettext-0.21/use-pkgconfig.patch new file mode 100644 index 0000000000..fc77feb270 --- /dev/null +++ b/meta/recipes-core/gettext/gettext-0.21/use-pkgconfig.patch | |||
@@ -0,0 +1,699 @@ | |||
1 | From 15647f679834be633fb4a9aeff4671b9cb95ccb8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Ross Burton <ross.burton@intel.com> | ||
3 | Date: Tue, 23 Jan 2018 00:54:13 +0000 | ||
4 | Subject: [PATCH] gettext: beat library detection into shape | ||
5 | |||
6 | For reasons which I just can't fathom gnulib doesn't use the expected tools to | ||
7 | find libraries but badly reinvents the wheel. This will trivially lead to host | ||
8 | contamination (explicit searches of /usr/lib) or incorrect RPATHs (bad | ||
9 | canonicalisation resulting in relative paths). | ||
10 | |||
11 | Simply delete all the crazy, and replace with a single call to pkg-config. | ||
12 | |||
13 | Upstream-Status: Inappropriate [upstream still refuse to consider pkg-config] | ||
14 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
15 | |||
16 | --- | ||
17 | gettext-tools/gnulib-m4/libxml.m4 | 99 +---------------- | ||
18 | .../gnulib-local/lib/term-styled-ostream.oo.c | 12 +-- | ||
19 | libtextstyle/gnulib-local/m4/libcroco.m4 | 99 +++-------------- | ||
20 | libtextstyle/gnulib-local/m4/libglib.m4 | 100 +++--------------- | ||
21 | libtextstyle/gnulib-m4/libcroco.m4 | 99 +++-------------- | ||
22 | libtextstyle/gnulib-m4/libglib.m4 | 100 +++--------------- | ||
23 | libtextstyle/lib/term-styled-ostream.c | 12 +-- | ||
24 | libtextstyle/lib/term-styled-ostream.oo.c | 12 +-- | ||
25 | 8 files changed, 83 insertions(+), 450 deletions(-) | ||
26 | |||
27 | diff --git a/gettext-tools/gnulib-m4/libxml.m4 b/gettext-tools/gnulib-m4/libxml.m4 | ||
28 | index 2f80c37..30ce58e 100644 | ||
29 | --- a/gettext-tools/gnulib-m4/libxml.m4 | ||
30 | +++ b/gettext-tools/gnulib-m4/libxml.m4 | ||
31 | @@ -13,6 +13,7 @@ dnl gl_LIBXML(FORCE-INCLUDED) | ||
32 | dnl forces the use of the included or an external libxml. | ||
33 | AC_DEFUN([gl_LIBXML], | ||
34 | [ | ||
35 | + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | ||
36 | AC_REQUIRE([AM_ICONV_LINK]) | ||
37 | |||
38 | ifelse([$1], , [ | ||
39 | @@ -30,100 +31,10 @@ AC_DEFUN([gl_LIBXML], | ||
40 | INCXML= | ||
41 | ifelse([$1], [yes], , [ | ||
42 | if test "$gl_cv_libxml_use_included" != yes; then | ||
43 | - dnl Figure out whether we can use a preinstalled libxml2, or have to use | ||
44 | - dnl the included one. | ||
45 | - AC_CACHE_VAL([gl_cv_libxml], [ | ||
46 | - gl_cv_libxml=no | ||
47 | - gl_cv_LIBXML= | ||
48 | - gl_cv_LTLIBXML= | ||
49 | - gl_cv_INCXML= | ||
50 | - gl_save_LIBS="$LIBS" | ||
51 | - LIBS="$LIBS $LIBICONV" | ||
52 | - dnl Search for libxml2 and define LIBXML2, LTLIBXML2 and INCXML2 | ||
53 | - dnl accordingly. | ||
54 | - dnl Don't use xml2-config nor pkg-config, since it doesn't work when | ||
55 | - dnl cross-compiling or when the C compiler in use is different from the | ||
56 | - dnl one that built the library. | ||
57 | - dnl Use a test program that tries to invoke xmlFree. On Cygwin 1.7.x, | ||
58 | - dnl libxml2 is built in such a way that uses of xmlFree work fine with | ||
59 | - dnl -Wl,--enable-auto-import but lead to a link error with | ||
60 | - dnl -Wl,--disable-auto-import. | ||
61 | - AC_LIB_LINKFLAGS_BODY([xml2]) | ||
62 | - LIBS="$gl_save_LIBS $LIBXML2 $LIBICONV" | ||
63 | - AC_TRY_LINK([#include <libxml/xmlversion.h> | ||
64 | - #include <libxml/xmlmemory.h> | ||
65 | - #include <libxml/xpath.h> | ||
66 | - ], | ||
67 | - [xmlCheckVersion (0); | ||
68 | - xmlFree ((void *) 0); | ||
69 | - xmlXPathSetContextNode ((void *)0, (void *)0); | ||
70 | - ], | ||
71 | - [gl_cv_libxml=yes | ||
72 | - gl_cv_LIBXML="$LIBXML2 $LIBICONV" | ||
73 | - gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" | ||
74 | - ]) | ||
75 | - if test "$gl_cv_libxml" != yes; then | ||
76 | - gl_save_CPPFLAGS="$CPPFLAGS" | ||
77 | - CPPFLAGS="$CPPFLAGS $INCXML2" | ||
78 | - AC_TRY_LINK([#include <libxml/xmlversion.h> | ||
79 | - #include <libxml/xmlmemory.h> | ||
80 | - #include <libxml/xpath.h> | ||
81 | - ], | ||
82 | - [xmlCheckVersion (0); | ||
83 | - xmlFree ((void *) 0); | ||
84 | - xmlXPathSetContextNode ((void *)0, (void *)0); | ||
85 | - ], | ||
86 | - [gl_cv_libxml=yes | ||
87 | - gl_cv_LIBXML="$LIBXML2 $LIBICONV" | ||
88 | - gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" | ||
89 | - gl_cv_INCXML="$INCXML2" | ||
90 | - ]) | ||
91 | - if test "$gl_cv_libxml" != yes; then | ||
92 | - dnl Often the include files are installed in /usr/include/libxml2. | ||
93 | - dnl In libxml2-2.5, <libxml/xmlversion.h> is self-contained. | ||
94 | - dnl In libxml2-2.6, it includes <libxml/xmlexports.h> which is | ||
95 | - dnl self-contained. | ||
96 | - libxml2_include_dir= | ||
97 | - AC_TRY_CPP([#include <libxml2/libxml/xmlexports.h>], | ||
98 | - [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlexports.h]) | ||
99 | - libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlexports_h" | sed -e 's,.libxml.xmlexports\.h$,,'` | ||
100 | - ]) | ||
101 | - if test -z "$libxml2_include_dir"; then | ||
102 | - AC_TRY_CPP([#include <libxml2/libxml/xmlversion.h>], | ||
103 | - [gl_ABSOLUTE_HEADER([libxml2/libxml/xmlversion.h]) | ||
104 | - libxml2_include_dir=`echo "$gl_cv_absolute_libxml2_libxml_xmlversion_h" | sed -e 's,.libxml.xmlversion\.h$,,'` | ||
105 | - ]) | ||
106 | - fi | ||
107 | - if test -n "$libxml2_include_dir" && test -d "$libxml2_include_dir"; then | ||
108 | - CPPFLAGS="$gl_save_CPPFLAGS -I$libxml2_include_dir" | ||
109 | - AC_TRY_LINK([#include <libxml/xmlversion.h> | ||
110 | - #include <libxml/xmlmemory.h> | ||
111 | - #include <libxml/xpath.h> | ||
112 | - ], | ||
113 | - [xmlCheckVersion (0); | ||
114 | - xmlFree ((void *) 0); | ||
115 | - xmlXPathSetContextNode ((void *)0, (void *)0); | ||
116 | - ], | ||
117 | - [gl_cv_libxml=yes | ||
118 | - gl_cv_LIBXML="$LIBXML2 $LIBICONV" | ||
119 | - gl_cv_LTLIBXML="$LTLIBXML2 $LTLIBICONV" | ||
120 | - gl_cv_INCXML="-I$libxml2_include_dir" | ||
121 | - ]) | ||
122 | - fi | ||
123 | - fi | ||
124 | - CPPFLAGS="$gl_save_CPPFLAGS" | ||
125 | - fi | ||
126 | - LIBS="$gl_save_LIBS" | ||
127 | - ]) | ||
128 | - AC_MSG_CHECKING([for libxml]) | ||
129 | - AC_MSG_RESULT([$gl_cv_libxml]) | ||
130 | - if test $gl_cv_libxml = yes; then | ||
131 | - LIBXML="$gl_cv_LIBXML" | ||
132 | - LTLIBXML="$gl_cv_LTLIBXML" | ||
133 | - INCXML="$gl_cv_INCXML" | ||
134 | - else | ||
135 | - gl_cv_libxml_use_included=yes | ||
136 | - fi | ||
137 | + PKG_CHECK_MODULES([XML], [libxml-2.0]) | ||
138 | + LIBXML=$XML_LIBS | ||
139 | + LTLIBXML=$XML_LIBS | ||
140 | + INCXML=$XML_CFLAGS | ||
141 | fi | ||
142 | ]) | ||
143 | AC_SUBST([LIBXML]) | ||
144 | diff --git a/libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c b/libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c | ||
145 | index 2ff978f..5ffb17a 100644 | ||
146 | --- a/libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c | ||
147 | +++ b/libtextstyle/gnulib-local/lib/term-styled-ostream.oo.c | ||
148 | @@ -22,15 +22,15 @@ | ||
149 | |||
150 | #include <stdlib.h> | ||
151 | |||
152 | -#include <cr-om-parser.h> | ||
153 | -#include <cr-sel-eng.h> | ||
154 | -#include <cr-style.h> | ||
155 | -#include <cr-rgb.h> | ||
156 | +#include <libcroco/cr-om-parser.h> | ||
157 | +#include <libcroco/cr-sel-eng.h> | ||
158 | +#include <libcroco/cr-style.h> | ||
159 | +#include <libcroco/cr-rgb.h> | ||
160 | /* <cr-fonts.h> has a broken double-inclusion guard in libcroco-0.6.1. */ | ||
161 | #ifndef __CR_FONTS_H__ | ||
162 | -# include <cr-fonts.h> | ||
163 | +# include <libcroco/cr-fonts.h> | ||
164 | #endif | ||
165 | -#include <cr-string.h> | ||
166 | +#include <libcroco/cr-string.h> | ||
167 | |||
168 | #include "term-ostream.h" | ||
169 | #include "mem-hash-map.h" | ||
170 | diff --git a/libtextstyle/gnulib-local/m4/libcroco.m4 b/libtextstyle/gnulib-local/m4/libcroco.m4 | ||
171 | index bc53cc6..10b2455 100644 | ||
172 | --- a/libtextstyle/gnulib-local/m4/libcroco.m4 | ||
173 | +++ b/libtextstyle/gnulib-local/m4/libcroco.m4 | ||
174 | @@ -1,99 +1,34 @@ | ||
175 | -# libcroco.m4 serial 3 | ||
176 | -dnl Copyright (C) 2006-2007, 2019 Free Software Foundation, Inc. | ||
177 | +# libcroco.m4 serial 2 (gettext-0.17) | ||
178 | +dnl Copyright (C) 2006, 2015-2016 Free Software Foundation, Inc. | ||
179 | dnl This file is free software; the Free Software Foundation | ||
180 | dnl gives unlimited permission to copy and/or distribute it, | ||
181 | dnl with or without modifications, as long as this notice is preserved. | ||
182 | |||
183 | dnl From Bruno Haible. | ||
184 | |||
185 | -dnl gl_LIBCROCO | ||
186 | -dnl gives the user the option to decide whether to use the included or | ||
187 | -dnl an external libcroco. | ||
188 | -dnl gl_LIBCROCO(FORCE-INCLUDED) | ||
189 | -dnl forces the use of the included or an external libcroco. | ||
190 | AC_DEFUN([gl_LIBCROCO], | ||
191 | [ | ||
192 | - ifelse([$1], [yes], , [ | ||
193 | - dnl libcroco depends on libglib. | ||
194 | - AC_REQUIRE([gl_LIBGLIB]) | ||
195 | - ]) | ||
196 | + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | ||
197 | + dnl libcroco depends on libglib. | ||
198 | + AC_REQUIRE([gl_LIBGLIB]) | ||
199 | |||
200 | - ifelse([$1], , [ | ||
201 | - AC_MSG_CHECKING([whether included libcroco is requested]) | ||
202 | - AC_ARG_WITH([included-libcroco], | ||
203 | - [ --with-included-libcroco use the libcroco included here], | ||
204 | - [gl_cv_libcroco_force_included=$withval], | ||
205 | - [gl_cv_libcroco_force_included=no]) | ||
206 | - AC_MSG_RESULT([$gl_cv_libcroco_force_included]) | ||
207 | - ], [gl_cv_libcroco_force_included=$1]) | ||
208 | + AC_MSG_CHECKING([whether included libcroco is requested]) | ||
209 | + AC_ARG_WITH([included-libcroco], | ||
210 | + [ --with-included-libcroco use the libcroco included here], | ||
211 | + [gl_cv_libcroco_force_included=$withval], | ||
212 | + [gl_cv_libcroco_force_included=no]) | ||
213 | + AC_MSG_RESULT([$gl_cv_libcroco_force_included]) | ||
214 | |||
215 | gl_cv_libcroco_use_included="$gl_cv_libcroco_force_included" | ||
216 | LIBCROCO= | ||
217 | LTLIBCROCO= | ||
218 | INCCROCO= | ||
219 | - ifelse([$1], [yes], , [ | ||
220 | - if test "$gl_cv_libcroco_use_included" != yes; then | ||
221 | - dnl Figure out whether we can use a preinstalled libcroco-0.6, or have to | ||
222 | - dnl use the included one. | ||
223 | - AC_CACHE_VAL([gl_cv_libcroco], [ | ||
224 | - gl_cv_libcroco=no | ||
225 | - gl_cv_LIBCROCO= | ||
226 | - gl_cv_LTLIBCROCO= | ||
227 | - gl_cv_INCCROCO= | ||
228 | - gl_save_LIBS="$LIBS" | ||
229 | - dnl Search for libcroco and define LIBCROCO_0_6, LTLIBCROCO_0_6 and | ||
230 | - dnl INCCROCO_0_6 accordingly. | ||
231 | - dnl Don't use croco-0.6-config nor pkg-config, since it doesn't work when | ||
232 | - dnl cross-compiling or when the C compiler in use is different from the | ||
233 | - dnl one that built the library. | ||
234 | - AC_LIB_LINKFLAGS_BODY([croco-0.6], [glib-2.0]) | ||
235 | - LIBS="$gl_save_LIBS $LIBCROCO_0_6" | ||
236 | - AC_TRY_LINK([#include <libcroco-config.h>], | ||
237 | - [const char *version = LIBCROCO_VERSION; return !version;], | ||
238 | - [gl_cv_libcroco=yes | ||
239 | - gl_cv_LIBCROCO="$LIBCROCO_0_6" | ||
240 | - gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" | ||
241 | - ]) | ||
242 | - if test "$gl_cv_libcroco" != yes; then | ||
243 | - gl_save_CPPFLAGS="$CPPFLAGS" | ||
244 | - CPPFLAGS="$CPPFLAGS $INCCROCO_0_6" | ||
245 | - AC_TRY_LINK([#include <libcroco-config.h>], | ||
246 | - [const char *version = LIBCROCO_VERSION; return !version;], | ||
247 | - [gl_cv_libcroco=yes | ||
248 | - gl_cv_LIBCROCO="$LIBCROCO_0_6" | ||
249 | - gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" | ||
250 | - gl_cv_INCCROCO="$INCCROCO_0_6" | ||
251 | - ]) | ||
252 | - if test "$gl_cv_libcroco" != yes; then | ||
253 | - dnl Often the include files are installed in | ||
254 | - dnl /usr/include/libcroco-0.6/libcroco. | ||
255 | - AC_TRY_LINK([#include <libcroco-0.6/libcroco/libcroco-config.h>], | ||
256 | - [const char *version = LIBCROCO_VERSION; return !version;], | ||
257 | - [gl_ABSOLUTE_HEADER([libcroco-0.6/libcroco/libcroco-config.h]) | ||
258 | - libcroco_include_dir=`echo "$gl_cv_absolute_libcroco_0_6_libcroco_libcroco_config_h" | sed -e 's,.libcroco-config\.h$,,'` | ||
259 | - if test -d "$libcroco_include_dir"; then | ||
260 | - gl_cv_libcroco=yes | ||
261 | - gl_cv_LIBCROCO="$LIBCROCO_0_6" | ||
262 | - gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" | ||
263 | - gl_cv_INCCROCO="-I$libcroco_include_dir" | ||
264 | - fi | ||
265 | - ]) | ||
266 | - fi | ||
267 | - CPPFLAGS="$gl_save_CPPFLAGS" | ||
268 | - fi | ||
269 | - LIBS="$gl_save_LIBS" | ||
270 | - ]) | ||
271 | - AC_MSG_CHECKING([for libcroco]) | ||
272 | - AC_MSG_RESULT([$gl_cv_libcroco]) | ||
273 | - if test $gl_cv_libcroco = yes; then | ||
274 | - LIBCROCO="$gl_cv_LIBCROCO" | ||
275 | - LTLIBCROCO="$gl_cv_LTLIBCROCO" | ||
276 | - INCCROCO="$gl_cv_INCCROCO" | ||
277 | - else | ||
278 | - gl_cv_libcroco_use_included=yes | ||
279 | - fi | ||
280 | - fi | ||
281 | - ]) | ||
282 | + if test "$gl_cv_libcroco_use_included" != yes; then | ||
283 | + PKG_CHECK_MODULES([CROCO], [libcroco-0.6]) | ||
284 | + LIBCROCO=$CROCO_LIBS | ||
285 | + LTLIBCROCO=$CROCO_LIBS | ||
286 | + INCCROCO=$CROCO_CFLAGS | ||
287 | + fi | ||
288 | AC_SUBST([LIBCROCO]) | ||
289 | AC_SUBST([LTLIBCROCO]) | ||
290 | AC_SUBST([INCCROCO]) | ||
291 | diff --git a/libtextstyle/gnulib-local/m4/libglib.m4 b/libtextstyle/gnulib-local/m4/libglib.m4 | ||
292 | index 5853772..767fba2 100644 | ||
293 | --- a/libtextstyle/gnulib-local/m4/libglib.m4 | ||
294 | +++ b/libtextstyle/gnulib-local/m4/libglib.m4 | ||
295 | @@ -6,100 +6,26 @@ dnl with or without modifications, as long as this notice is preserved. | ||
296 | |||
297 | dnl From Bruno Haible. | ||
298 | |||
299 | -dnl gl_LIBGLIB | ||
300 | -dnl gives the user the option to decide whether to use the included or | ||
301 | -dnl an external libglib. | ||
302 | -dnl gl_LIBGLIB(FORCE-INCLUDED) | ||
303 | -dnl forces the use of the included or an external libglib. | ||
304 | AC_DEFUN([gl_LIBGLIB], | ||
305 | [ | ||
306 | - ifelse([$1], , [ | ||
307 | - AC_MSG_CHECKING([whether included glib is requested]) | ||
308 | - AC_ARG_WITH([included-glib], | ||
309 | - [ --with-included-glib use the glib2 included here], | ||
310 | - [gl_cv_libglib_force_included=$withval], | ||
311 | - [gl_cv_libglib_force_included=no]) | ||
312 | - AC_MSG_RESULT([$gl_cv_libglib_force_included]) | ||
313 | - ], [gl_cv_libglib_force_included=$1]) | ||
314 | + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | ||
315 | + AC_MSG_CHECKING([whether included glib is requested]) | ||
316 | + AC_ARG_WITH([included-glib], | ||
317 | + [ --with-included-glib use the glib2 included here], | ||
318 | + [gl_cv_libglib_force_included=$withval], | ||
319 | + [gl_cv_libglib_force_included=no]) | ||
320 | + AC_MSG_RESULT([$gl_cv_libglib_force_included]) | ||
321 | |||
322 | gl_cv_libglib_use_included="$gl_cv_libglib_force_included" | ||
323 | LIBGLIB= | ||
324 | LTLIBGLIB= | ||
325 | INCGLIB= | ||
326 | - ifelse([$1], [yes], , [ | ||
327 | - if test "$gl_cv_libglib_use_included" != yes; then | ||
328 | - dnl Figure out whether we can use a preinstalled libglib-2.0, or have to use | ||
329 | - dnl the included one. | ||
330 | - AC_CACHE_VAL([gl_cv_libglib], [ | ||
331 | - gl_cv_libglib=no | ||
332 | - gl_cv_LIBGLIB= | ||
333 | - gl_cv_LTLIBGLIB= | ||
334 | - gl_cv_INCGLIB= | ||
335 | - gl_save_LIBS="$LIBS" | ||
336 | - dnl Search for libglib2 and define LIBGLIB_2_0, LTLIBGLIB_2_0 and | ||
337 | - dnl INCGLIB_2_0 accordingly. | ||
338 | - dnl Don't use glib-config nor pkg-config, since it doesn't work when | ||
339 | - dnl cross-compiling or when the C compiler in use is different from the | ||
340 | - dnl one that built the library. | ||
341 | - AC_LIB_LINKFLAGS_BODY([glib-2.0]) | ||
342 | - LIBS="$gl_save_LIBS $LIBGLIB_2_0" | ||
343 | - AC_TRY_LINK([#include <glib.h> | ||
344 | -#ifndef G_BEGIN_DECLS | ||
345 | -error this glib.h includes a glibconfig.h from a glib version 1.x | ||
346 | -#endif | ||
347 | -], | ||
348 | - [g_string_new ("foo");], | ||
349 | - [gl_cv_libglib=yes | ||
350 | - gl_cv_LIBGLIB="$LIBGLIB_2_0" | ||
351 | - gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" | ||
352 | - ]) | ||
353 | - if test "$gl_cv_libglib" != yes; then | ||
354 | - gl_save_CPPFLAGS="$CPPFLAGS" | ||
355 | - CPPFLAGS="$CPPFLAGS $INCGLIB_2_0" | ||
356 | - AC_TRY_LINK([#include <glib.h> | ||
357 | -#ifndef G_BEGIN_DECLS | ||
358 | -error this glib.h includes a glibconfig.h from a glib version 1.x | ||
359 | -#endif | ||
360 | -], | ||
361 | - [g_string_new ("foo");], | ||
362 | - [gl_cv_libglib=yes | ||
363 | - gl_cv_LIBGLIB="$LIBGLIB_2_0" | ||
364 | - gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" | ||
365 | - gl_cv_INCGLIB="$INCGLIB_2_0" | ||
366 | - ]) | ||
367 | - if test "$gl_cv_libglib" != yes; then | ||
368 | - dnl Often the include files are installed in /usr/include/glib-2.0 | ||
369 | - dnl and /usr/lib/glib-2.0/include. | ||
370 | - if test -n "$LIBGLIB_2_0_PREFIX"; then | ||
371 | - CPPFLAGS="$gl_save_CPPFLAGS -I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include" | ||
372 | - AC_TRY_LINK([#include <glib.h> | ||
373 | -#ifndef G_BEGIN_DECLS | ||
374 | -error this glib.h includes a glibconfig.h from a glib version 1.x | ||
375 | -#endif | ||
376 | -], | ||
377 | - [g_string_new ("foo");], | ||
378 | - [gl_cv_libglib=yes | ||
379 | - gl_cv_LIBGLIB="$LIBGLIB_2_0" | ||
380 | - gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" | ||
381 | - gl_cv_INCGLIB="-I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include" | ||
382 | - ]) | ||
383 | - fi | ||
384 | - fi | ||
385 | - CPPFLAGS="$gl_save_CPPFLAGS" | ||
386 | - fi | ||
387 | - LIBS="$gl_save_LIBS" | ||
388 | - ]) | ||
389 | - AC_MSG_CHECKING([for glib]) | ||
390 | - AC_MSG_RESULT([$gl_cv_libglib]) | ||
391 | - if test $gl_cv_libglib = yes; then | ||
392 | - LIBGLIB="$gl_cv_LIBGLIB" | ||
393 | - LTLIBGLIB="$gl_cv_LTLIBGLIB" | ||
394 | - INCGLIB="$gl_cv_INCGLIB" | ||
395 | - else | ||
396 | - gl_cv_libglib_use_included=yes | ||
397 | - fi | ||
398 | - fi | ||
399 | - ]) | ||
400 | + if test "$gl_cv_libglib_use_included" != yes; then | ||
401 | + PKG_CHECK_MODULES([GLIB], [glib-2.0]) | ||
402 | + LIBGLIB="$GLIB_LIBS" | ||
403 | + LTLIBGLIB="$GLIB_LIBS" | ||
404 | + INCGLIB="$GLIB_CFLAGS" | ||
405 | + fi | ||
406 | AC_SUBST([LIBGLIB]) | ||
407 | AC_SUBST([LTLIBGLIB]) | ||
408 | AC_SUBST([INCGLIB]) | ||
409 | diff --git a/libtextstyle/gnulib-m4/libcroco.m4 b/libtextstyle/gnulib-m4/libcroco.m4 | ||
410 | index bc53cc6..10b2455 100644 | ||
411 | --- a/libtextstyle/gnulib-m4/libcroco.m4 | ||
412 | +++ b/libtextstyle/gnulib-m4/libcroco.m4 | ||
413 | @@ -1,99 +1,34 @@ | ||
414 | -# libcroco.m4 serial 3 | ||
415 | -dnl Copyright (C) 2006-2007, 2019 Free Software Foundation, Inc. | ||
416 | +# libcroco.m4 serial 2 (gettext-0.17) | ||
417 | +dnl Copyright (C) 2006, 2015-2016 Free Software Foundation, Inc. | ||
418 | dnl This file is free software; the Free Software Foundation | ||
419 | dnl gives unlimited permission to copy and/or distribute it, | ||
420 | dnl with or without modifications, as long as this notice is preserved. | ||
421 | |||
422 | dnl From Bruno Haible. | ||
423 | |||
424 | -dnl gl_LIBCROCO | ||
425 | -dnl gives the user the option to decide whether to use the included or | ||
426 | -dnl an external libcroco. | ||
427 | -dnl gl_LIBCROCO(FORCE-INCLUDED) | ||
428 | -dnl forces the use of the included or an external libcroco. | ||
429 | AC_DEFUN([gl_LIBCROCO], | ||
430 | [ | ||
431 | - ifelse([$1], [yes], , [ | ||
432 | - dnl libcroco depends on libglib. | ||
433 | - AC_REQUIRE([gl_LIBGLIB]) | ||
434 | - ]) | ||
435 | + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | ||
436 | + dnl libcroco depends on libglib. | ||
437 | + AC_REQUIRE([gl_LIBGLIB]) | ||
438 | |||
439 | - ifelse([$1], , [ | ||
440 | - AC_MSG_CHECKING([whether included libcroco is requested]) | ||
441 | - AC_ARG_WITH([included-libcroco], | ||
442 | - [ --with-included-libcroco use the libcroco included here], | ||
443 | - [gl_cv_libcroco_force_included=$withval], | ||
444 | - [gl_cv_libcroco_force_included=no]) | ||
445 | - AC_MSG_RESULT([$gl_cv_libcroco_force_included]) | ||
446 | - ], [gl_cv_libcroco_force_included=$1]) | ||
447 | + AC_MSG_CHECKING([whether included libcroco is requested]) | ||
448 | + AC_ARG_WITH([included-libcroco], | ||
449 | + [ --with-included-libcroco use the libcroco included here], | ||
450 | + [gl_cv_libcroco_force_included=$withval], | ||
451 | + [gl_cv_libcroco_force_included=no]) | ||
452 | + AC_MSG_RESULT([$gl_cv_libcroco_force_included]) | ||
453 | |||
454 | gl_cv_libcroco_use_included="$gl_cv_libcroco_force_included" | ||
455 | LIBCROCO= | ||
456 | LTLIBCROCO= | ||
457 | INCCROCO= | ||
458 | - ifelse([$1], [yes], , [ | ||
459 | - if test "$gl_cv_libcroco_use_included" != yes; then | ||
460 | - dnl Figure out whether we can use a preinstalled libcroco-0.6, or have to | ||
461 | - dnl use the included one. | ||
462 | - AC_CACHE_VAL([gl_cv_libcroco], [ | ||
463 | - gl_cv_libcroco=no | ||
464 | - gl_cv_LIBCROCO= | ||
465 | - gl_cv_LTLIBCROCO= | ||
466 | - gl_cv_INCCROCO= | ||
467 | - gl_save_LIBS="$LIBS" | ||
468 | - dnl Search for libcroco and define LIBCROCO_0_6, LTLIBCROCO_0_6 and | ||
469 | - dnl INCCROCO_0_6 accordingly. | ||
470 | - dnl Don't use croco-0.6-config nor pkg-config, since it doesn't work when | ||
471 | - dnl cross-compiling or when the C compiler in use is different from the | ||
472 | - dnl one that built the library. | ||
473 | - AC_LIB_LINKFLAGS_BODY([croco-0.6], [glib-2.0]) | ||
474 | - LIBS="$gl_save_LIBS $LIBCROCO_0_6" | ||
475 | - AC_TRY_LINK([#include <libcroco-config.h>], | ||
476 | - [const char *version = LIBCROCO_VERSION; return !version;], | ||
477 | - [gl_cv_libcroco=yes | ||
478 | - gl_cv_LIBCROCO="$LIBCROCO_0_6" | ||
479 | - gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" | ||
480 | - ]) | ||
481 | - if test "$gl_cv_libcroco" != yes; then | ||
482 | - gl_save_CPPFLAGS="$CPPFLAGS" | ||
483 | - CPPFLAGS="$CPPFLAGS $INCCROCO_0_6" | ||
484 | - AC_TRY_LINK([#include <libcroco-config.h>], | ||
485 | - [const char *version = LIBCROCO_VERSION; return !version;], | ||
486 | - [gl_cv_libcroco=yes | ||
487 | - gl_cv_LIBCROCO="$LIBCROCO_0_6" | ||
488 | - gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" | ||
489 | - gl_cv_INCCROCO="$INCCROCO_0_6" | ||
490 | - ]) | ||
491 | - if test "$gl_cv_libcroco" != yes; then | ||
492 | - dnl Often the include files are installed in | ||
493 | - dnl /usr/include/libcroco-0.6/libcroco. | ||
494 | - AC_TRY_LINK([#include <libcroco-0.6/libcroco/libcroco-config.h>], | ||
495 | - [const char *version = LIBCROCO_VERSION; return !version;], | ||
496 | - [gl_ABSOLUTE_HEADER([libcroco-0.6/libcroco/libcroco-config.h]) | ||
497 | - libcroco_include_dir=`echo "$gl_cv_absolute_libcroco_0_6_libcroco_libcroco_config_h" | sed -e 's,.libcroco-config\.h$,,'` | ||
498 | - if test -d "$libcroco_include_dir"; then | ||
499 | - gl_cv_libcroco=yes | ||
500 | - gl_cv_LIBCROCO="$LIBCROCO_0_6" | ||
501 | - gl_cv_LTLIBCROCO="$LTLIBCROCO_0_6" | ||
502 | - gl_cv_INCCROCO="-I$libcroco_include_dir" | ||
503 | - fi | ||
504 | - ]) | ||
505 | - fi | ||
506 | - CPPFLAGS="$gl_save_CPPFLAGS" | ||
507 | - fi | ||
508 | - LIBS="$gl_save_LIBS" | ||
509 | - ]) | ||
510 | - AC_MSG_CHECKING([for libcroco]) | ||
511 | - AC_MSG_RESULT([$gl_cv_libcroco]) | ||
512 | - if test $gl_cv_libcroco = yes; then | ||
513 | - LIBCROCO="$gl_cv_LIBCROCO" | ||
514 | - LTLIBCROCO="$gl_cv_LTLIBCROCO" | ||
515 | - INCCROCO="$gl_cv_INCCROCO" | ||
516 | - else | ||
517 | - gl_cv_libcroco_use_included=yes | ||
518 | - fi | ||
519 | - fi | ||
520 | - ]) | ||
521 | + if test "$gl_cv_libcroco_use_included" != yes; then | ||
522 | + PKG_CHECK_MODULES([CROCO], [libcroco-0.6]) | ||
523 | + LIBCROCO=$CROCO_LIBS | ||
524 | + LTLIBCROCO=$CROCO_LIBS | ||
525 | + INCCROCO=$CROCO_CFLAGS | ||
526 | + fi | ||
527 | AC_SUBST([LIBCROCO]) | ||
528 | AC_SUBST([LTLIBCROCO]) | ||
529 | AC_SUBST([INCCROCO]) | ||
530 | diff --git a/libtextstyle/gnulib-m4/libglib.m4 b/libtextstyle/gnulib-m4/libglib.m4 | ||
531 | index 5853772..767fba2 100644 | ||
532 | --- a/libtextstyle/gnulib-m4/libglib.m4 | ||
533 | +++ b/libtextstyle/gnulib-m4/libglib.m4 | ||
534 | @@ -6,100 +6,26 @@ dnl with or without modifications, as long as this notice is preserved. | ||
535 | |||
536 | dnl From Bruno Haible. | ||
537 | |||
538 | -dnl gl_LIBGLIB | ||
539 | -dnl gives the user the option to decide whether to use the included or | ||
540 | -dnl an external libglib. | ||
541 | -dnl gl_LIBGLIB(FORCE-INCLUDED) | ||
542 | -dnl forces the use of the included or an external libglib. | ||
543 | AC_DEFUN([gl_LIBGLIB], | ||
544 | [ | ||
545 | - ifelse([$1], , [ | ||
546 | - AC_MSG_CHECKING([whether included glib is requested]) | ||
547 | - AC_ARG_WITH([included-glib], | ||
548 | - [ --with-included-glib use the glib2 included here], | ||
549 | - [gl_cv_libglib_force_included=$withval], | ||
550 | - [gl_cv_libglib_force_included=no]) | ||
551 | - AC_MSG_RESULT([$gl_cv_libglib_force_included]) | ||
552 | - ], [gl_cv_libglib_force_included=$1]) | ||
553 | + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) | ||
554 | + AC_MSG_CHECKING([whether included glib is requested]) | ||
555 | + AC_ARG_WITH([included-glib], | ||
556 | + [ --with-included-glib use the glib2 included here], | ||
557 | + [gl_cv_libglib_force_included=$withval], | ||
558 | + [gl_cv_libglib_force_included=no]) | ||
559 | + AC_MSG_RESULT([$gl_cv_libglib_force_included]) | ||
560 | |||
561 | gl_cv_libglib_use_included="$gl_cv_libglib_force_included" | ||
562 | LIBGLIB= | ||
563 | LTLIBGLIB= | ||
564 | INCGLIB= | ||
565 | - ifelse([$1], [yes], , [ | ||
566 | - if test "$gl_cv_libglib_use_included" != yes; then | ||
567 | - dnl Figure out whether we can use a preinstalled libglib-2.0, or have to use | ||
568 | - dnl the included one. | ||
569 | - AC_CACHE_VAL([gl_cv_libglib], [ | ||
570 | - gl_cv_libglib=no | ||
571 | - gl_cv_LIBGLIB= | ||
572 | - gl_cv_LTLIBGLIB= | ||
573 | - gl_cv_INCGLIB= | ||
574 | - gl_save_LIBS="$LIBS" | ||
575 | - dnl Search for libglib2 and define LIBGLIB_2_0, LTLIBGLIB_2_0 and | ||
576 | - dnl INCGLIB_2_0 accordingly. | ||
577 | - dnl Don't use glib-config nor pkg-config, since it doesn't work when | ||
578 | - dnl cross-compiling or when the C compiler in use is different from the | ||
579 | - dnl one that built the library. | ||
580 | - AC_LIB_LINKFLAGS_BODY([glib-2.0]) | ||
581 | - LIBS="$gl_save_LIBS $LIBGLIB_2_0" | ||
582 | - AC_TRY_LINK([#include <glib.h> | ||
583 | -#ifndef G_BEGIN_DECLS | ||
584 | -error this glib.h includes a glibconfig.h from a glib version 1.x | ||
585 | -#endif | ||
586 | -], | ||
587 | - [g_string_new ("foo");], | ||
588 | - [gl_cv_libglib=yes | ||
589 | - gl_cv_LIBGLIB="$LIBGLIB_2_0" | ||
590 | - gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" | ||
591 | - ]) | ||
592 | - if test "$gl_cv_libglib" != yes; then | ||
593 | - gl_save_CPPFLAGS="$CPPFLAGS" | ||
594 | - CPPFLAGS="$CPPFLAGS $INCGLIB_2_0" | ||
595 | - AC_TRY_LINK([#include <glib.h> | ||
596 | -#ifndef G_BEGIN_DECLS | ||
597 | -error this glib.h includes a glibconfig.h from a glib version 1.x | ||
598 | -#endif | ||
599 | -], | ||
600 | - [g_string_new ("foo");], | ||
601 | - [gl_cv_libglib=yes | ||
602 | - gl_cv_LIBGLIB="$LIBGLIB_2_0" | ||
603 | - gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" | ||
604 | - gl_cv_INCGLIB="$INCGLIB_2_0" | ||
605 | - ]) | ||
606 | - if test "$gl_cv_libglib" != yes; then | ||
607 | - dnl Often the include files are installed in /usr/include/glib-2.0 | ||
608 | - dnl and /usr/lib/glib-2.0/include. | ||
609 | - if test -n "$LIBGLIB_2_0_PREFIX"; then | ||
610 | - CPPFLAGS="$gl_save_CPPFLAGS -I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include" | ||
611 | - AC_TRY_LINK([#include <glib.h> | ||
612 | -#ifndef G_BEGIN_DECLS | ||
613 | -error this glib.h includes a glibconfig.h from a glib version 1.x | ||
614 | -#endif | ||
615 | -], | ||
616 | - [g_string_new ("foo");], | ||
617 | - [gl_cv_libglib=yes | ||
618 | - gl_cv_LIBGLIB="$LIBGLIB_2_0" | ||
619 | - gl_cv_LTLIBGLIB="$LTLIBGLIB_2_0" | ||
620 | - gl_cv_INCGLIB="-I$LIBGLIB_2_0_PREFIX/include/glib-2.0 -I$LIBGLIB_2_0_PREFIX/$acl_libdirstem/glib-2.0/include" | ||
621 | - ]) | ||
622 | - fi | ||
623 | - fi | ||
624 | - CPPFLAGS="$gl_save_CPPFLAGS" | ||
625 | - fi | ||
626 | - LIBS="$gl_save_LIBS" | ||
627 | - ]) | ||
628 | - AC_MSG_CHECKING([for glib]) | ||
629 | - AC_MSG_RESULT([$gl_cv_libglib]) | ||
630 | - if test $gl_cv_libglib = yes; then | ||
631 | - LIBGLIB="$gl_cv_LIBGLIB" | ||
632 | - LTLIBGLIB="$gl_cv_LTLIBGLIB" | ||
633 | - INCGLIB="$gl_cv_INCGLIB" | ||
634 | - else | ||
635 | - gl_cv_libglib_use_included=yes | ||
636 | - fi | ||
637 | - fi | ||
638 | - ]) | ||
639 | + if test "$gl_cv_libglib_use_included" != yes; then | ||
640 | + PKG_CHECK_MODULES([GLIB], [glib-2.0]) | ||
641 | + LIBGLIB="$GLIB_LIBS" | ||
642 | + LTLIBGLIB="$GLIB_LIBS" | ||
643 | + INCGLIB="$GLIB_CFLAGS" | ||
644 | + fi | ||
645 | AC_SUBST([LIBGLIB]) | ||
646 | AC_SUBST([LTLIBGLIB]) | ||
647 | AC_SUBST([INCGLIB]) | ||
648 | diff --git a/libtextstyle/lib/term-styled-ostream.c b/libtextstyle/lib/term-styled-ostream.c | ||
649 | index 5484800..16793fa 100644 | ||
650 | --- a/libtextstyle/lib/term-styled-ostream.c | ||
651 | +++ b/libtextstyle/lib/term-styled-ostream.c | ||
652 | @@ -28,15 +28,15 @@ | ||
653 | |||
654 | #include <stdlib.h> | ||
655 | |||
656 | -#include <cr-om-parser.h> | ||
657 | -#include <cr-sel-eng.h> | ||
658 | -#include <cr-style.h> | ||
659 | -#include <cr-rgb.h> | ||
660 | +#include <libcroco/cr-om-parser.h> | ||
661 | +#include <libcroco/cr-sel-eng.h> | ||
662 | +#include <libcroco/cr-style.h> | ||
663 | +#include <libcroco/cr-rgb.h> | ||
664 | /* <cr-fonts.h> has a broken double-inclusion guard in libcroco-0.6.1. */ | ||
665 | #ifndef __CR_FONTS_H__ | ||
666 | -# include <cr-fonts.h> | ||
667 | +# include <libcroco/cr-fonts.h> | ||
668 | #endif | ||
669 | -#include <cr-string.h> | ||
670 | +#include <libcroco/cr-string.h> | ||
671 | |||
672 | #include "term-ostream.h" | ||
673 | #include "mem-hash-map.h" | ||
674 | diff --git a/libtextstyle/lib/term-styled-ostream.oo.c b/libtextstyle/lib/term-styled-ostream.oo.c | ||
675 | index 2ff978f..5ffb17a 100644 | ||
676 | --- a/libtextstyle/lib/term-styled-ostream.oo.c | ||
677 | +++ b/libtextstyle/lib/term-styled-ostream.oo.c | ||
678 | @@ -22,15 +22,15 @@ | ||
679 | |||
680 | #include <stdlib.h> | ||
681 | |||
682 | -#include <cr-om-parser.h> | ||
683 | -#include <cr-sel-eng.h> | ||
684 | -#include <cr-style.h> | ||
685 | -#include <cr-rgb.h> | ||
686 | +#include <libcroco/cr-om-parser.h> | ||
687 | +#include <libcroco/cr-sel-eng.h> | ||
688 | +#include <libcroco/cr-style.h> | ||
689 | +#include <libcroco/cr-rgb.h> | ||
690 | /* <cr-fonts.h> has a broken double-inclusion guard in libcroco-0.6.1. */ | ||
691 | #ifndef __CR_FONTS_H__ | ||
692 | -# include <cr-fonts.h> | ||
693 | +# include <libcroco/cr-fonts.h> | ||
694 | #endif | ||
695 | -#include <cr-string.h> | ||
696 | +#include <libcroco/cr-string.h> | ||
697 | |||
698 | #include "term-ostream.h" | ||
699 | #include "mem-hash-map.h" | ||