summaryrefslogtreecommitdiffstats
path: root/meta/recipes-gnome/gtk+
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-16 01:05:19 (GMT)
committerTudor Florea <tudor.florea@enea.com>2014-10-16 01:05:19 (GMT)
commitc527fd1f14c27855a37f2e8ac5346ce8d940ced2 (patch)
treebb002c1fdf011c41dbd2f0927bed23ecb5f83c97 /meta/recipes-gnome/gtk+
downloadpoky-c527fd1f14c27855a37f2e8ac5346ce8d940ced2.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta/recipes-gnome/gtk+')
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch48
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-bgo-584832-Duplicate-the-exec-string-returned-by-gtk.patch30
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/cellrenderer-cairo.patch31
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/configure-nm.patch21
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/configurefix.patch87
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/doc-fixes.patch22
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/entry-cairo.patch105
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/hardcoded_libtool.patch1814
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/run-iconcache.patch23
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/toggle-font.diff102
-rw-r--r--meta/recipes-gnome/gtk+/gtk+-2.24.22/xsettings.patch20
-rw-r--r--meta/recipes-gnome/gtk+/gtk+.inc90
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3.inc106
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3/fix-build-when-wayland-backend-enabled.patch43
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3/fix-flags-for-native.patch33
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3/hardcoded_libtool.patch35
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3_3.10.7.bb19
-rw-r--r--meta/recipes-gnome/gtk+/gtk+_2.24.22.bb50
-rw-r--r--meta/recipes-gnome/gtk+/gtk-update-icon-cache-native_3.4.4.bb47
19 files changed, 2726 insertions, 0 deletions
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch
new file mode 100644
index 0000000..71e334d
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch
@@ -0,0 +1,48 @@
1From d1f7a894674dfdd6769f1bbae31eb1a69e451a5c Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
3Date: Fri, 16 Nov 2012 22:07:28 +0100
4Subject: [PATCH] GtkButton: do not prelight in touchscreen mode
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Code was copied from GtkToggleButton.
10
11Upstream-Status: submitted [1]
12
13[1] https://bugzilla.gnome.org/show_bug.cgi?id=689138
14
15Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
16---
17 gtk/gtkbutton.c | 8 ++++++--
18 1 files changed, 6 insertions(+), 2 deletions(-)
19
20diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
21index f472007..1beb1b6 100644
22--- a/gtk/gtkbutton.c
23+++ b/gtk/gtkbutton.c
24@@ -2079,15 +2079,19 @@ _gtk_button_set_depressed (GtkButton *button,
25 static void
26 gtk_button_update_state (GtkButton *button)
27 {
28- gboolean depressed;
29+ gboolean depressed, touchscreen;
30 GtkStateType new_state;
31
32+ g_object_get (gtk_widget_get_settings (GTK_WIDGET (button)),
33+ "gtk-touchscreen-mode", &touchscreen,
34+ NULL);
35+
36 if (button->activate_timeout)
37 depressed = button->depress_on_activate;
38 else
39 depressed = button->in_button && button->button_down;
40
41- if (button->in_button && (!button->button_down || !depressed))
42+ if (!touchscreen && button->in_button && (!button->button_down || !depressed))
43 new_state = GTK_STATE_PRELIGHT;
44 else
45 new_state = depressed ? GTK_STATE_ACTIVE : GTK_STATE_NORMAL;
46--
471.7.6.5
48
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-bgo-584832-Duplicate-the-exec-string-returned-by-gtk.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-bgo-584832-Duplicate-the-exec-string-returned-by-gtk.patch
new file mode 100644
index 0000000..354f0ab
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+-2.24.22/0001-bgo-584832-Duplicate-the-exec-string-returned-by-gtk.patch
@@ -0,0 +1,30 @@
1From 69b9441eab2a7215509687dc22b48b6f212d22aa Mon Sep 17 00:00:00 2001
2From: Rob Bradford <rob@linux.intel.com>
3Date: Thu, 4 Jun 2009 15:43:20 +0100
4Subject: [PATCH] =?utf-8?q?bgo#584832=20=E2=80=93=20Duplicate=20the=20exec=20string=20returned=20by=20gtk=5Frecent=5Finfo=5Fget=5Fapplication=5Finfo?=
5MIME-Version: 1.0
6Content-Type: text/plain; charset=utf-8
7Content-Transfer-Encoding: 8bit
8
9This function states that the caller is responsible for freeing the string
10passed returned by reference. Unfortunately if you do this you get a crash
11since the internal value is returned without being duplicated.
12---
13 gtk/gtkrecentmanager.c | 2 +-
14 1 files changed, 1 insertions(+), 1 deletions(-)
15
16Upstream-Status: Pending
17
18Index: gtk+-2.21.2/gtk/gtkrecentmanager.c
19===================================================================
20--- gtk+-2.21.2.orig/gtk/gtkrecentmanager.c 2010-06-22 18:11:30.000000000 +0800
21+++ gtk+-2.21.2/gtk/gtkrecentmanager.c 2010-06-22 18:11:53.000000000 +0800
22@@ -1766,7 +1766,7 @@
23 }
24
25 if (app_exec)
26- *app_exec = ai->exec;
27+ *app_exec = g_strdup (ai->exec);
28
29 if (count)
30 *count = ai->count;
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/cellrenderer-cairo.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/cellrenderer-cairo.patch
new file mode 100644
index 0000000..ba89329
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+-2.24.22/cellrenderer-cairo.patch
@@ -0,0 +1,31 @@
1Upstream-Status: Pending
2
3Index: gtk/gtkcellrenderer.c
4===================================================================
5--- gtk/gtkcellrenderer.c.orig 2010-06-22 17:21:22.000000000 +0800
6+++ gtk/gtkcellrenderer.c 2010-06-22 17:21:25.000000000 +0800
7@@ -566,6 +566,7 @@
8
9 if (cell->cell_background_set && !selected)
10 {
11+#ifdef USE_CAIRO_INTERNALLY
12 cairo_t *cr = gdk_cairo_create (window);
13
14 gdk_cairo_rectangle (cr, background_area);
15@@ -573,6 +574,16 @@
16 cairo_fill (cr);
17
18 cairo_destroy (cr);
19+#else
20+ GdkGC *gc;
21+
22+ gc = gdk_gc_new (window);
23+ gdk_gc_set_rgb_fg_color (gc, &priv->cell_background);
24+ gdk_draw_rectangle (window, gc, TRUE,
25+ background_area->x, background_area->y,
26+ background_area->width, background_area->height);
27+ g_object_unref (gc);
28+#endif
29 }
30
31 GTK_CELL_RENDERER_GET_CLASS (cell)->render (cell,
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/configure-nm.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/configure-nm.patch
new file mode 100644
index 0000000..d67b797
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+-2.24.22/configure-nm.patch
@@ -0,0 +1,21 @@
1Upstream-Status: Pending
2https://bugzilla.gnome.org/show_bug.cgi?id=671515
3
4Signed-Off-By: Xiaofeng Yan <xiaofeng.yan@windriver.com>
5# Pick up ${NM} from the environment
6
7Updated to apply to gtk+-2.24.15
8
9Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
10diff -Nurd gtk+-2.24.15/configure.ac gtk+-2.24.15/configure.ac
11--- gtk+-2.24.15/configure.ac 2013-01-12 20:52:54.000000000 +0200
12+++ gtk+-2.24.15/configure.ac 2013-02-12 21:25:06.073937041 +0200
13@@ -190,7 +190,7 @@
14 AC_SYS_LARGEFILE
15
16 AM_PROG_AS
17-AC_PATH_PROG(NM, nm, nm)
18+AC_CHECK_TOOLS(NM, [$NM nm], nm)
19
20 dnl Initialize maintainer mode
21 AM_MAINTAINER_MODE([enable])
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/configurefix.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/configurefix.patch
new file mode 100644
index 0000000..2803691
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+-2.24.22/configurefix.patch
@@ -0,0 +1,87 @@
1Upstream-Status: Inappropriate [configuration]
2
3Index: gtk+-2.21.2/docs/faq/Makefile.am
4===================================================================
5--- gtk+-2.21.2.orig/docs/faq/Makefile.am 2010-04-09 10:29:53.000000000 +0800
6+++ gtk+-2.21.2/docs/faq/Makefile.am 2010-06-22 17:39:24.000000000 +0800
7@@ -3,34 +3,36 @@
8 EXTRA_DIST += \
9 gtk-faq.sgml
10
11-if HAVE_DOCBOOK
12+
13 html:
14+if HAVE_DOCBOOK
15 if test -w $(srcdir); then \
16 (cd $(srcdir); \
17 db2html gtk-faq.sgml; \
18 test -d html && rm -r html; \
19 mv gtk-faq html); \
20 fi
21-
22-pdf:
23- if test -w $(srcdir); then \
24- (cd $(srcdir); db2pdf gtk-faq.sgml); \
25- fi
26-
27-dist-hook: html
28- cp -Rp $(srcdir)/html $(distdir)
29 else
30-html:
31 echo "***"
32 echo "*** Warning: FAQ not built"
33 echo "***"
34+endif
35
36 pdf:
37+if HAVE_DOCBOOK
38+ if test -w $(srcdir); then \
39+ (cd $(srcdir); db2pdf gtk-faq.sgml); \
40+ fi
41+else
42 echo "***"
43 echo "*** Warning: FAQ not built"
44 echo "***"
45+endif
46
47-dist-hook:
48+dist-hook: html
49+if HAVE_DOCBOOK
50+ cp -Rp $(srcdir)/html $(distdir)
51+else
52 echo "***"
53 echo "*** Warning: FAQ not built"
54 echo "*** DISTRIBUTION IS INCOMPLETE"
55Index: gtk+-2.21.2/gtk-doc.make
56===================================================================
57--- gtk+-2.21.2.orig/gtk-doc.make 2010-05-28 00:01:48.000000000 +0800
58+++ gtk+-2.21.2/gtk-doc.make 2010-06-22 17:39:24.000000000 +0800
59@@ -23,7 +23,7 @@
60
61 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
62
63-EXTRA_DIST = \
64+EXTRA_DIST += \
65 $(content_files) \
66 $(HTML_IMAGES) \
67 $(DOC_MAIN_SGML_FILE) \
68Index: gtk+-2.21.2/gtk/tests/Makefile.am
69===================================================================
70--- gtk+-2.21.2.orig/gtk/tests/Makefile.am 2010-06-10 20:53:46.000000000 +0800
71+++ gtk+-2.21.2/gtk/tests/Makefile.am 2010-06-22 17:39:24.000000000 +0800
72@@ -58,13 +58,13 @@
73 # this doesn't work in make distcheck, since running
74 # on a naked X server creates slightly different event
75 # sequences than running on a normal desktop
76-# TEST_PROGS += crossingevents
77+#TEST_PROGS += crossingevents
78 crossingevents_SOURCES = crossingevents.c
79 crossingevents_LDADD = $(progs_ldadd)
80
81 # this doesn't work in make distcheck, since it doesn't
82 # find file-chooser-test-dir
83-# TEST_PROGS += filechooser
84+#TEST_PROGS += filechooser
85 filechooser_SOURCES = filechooser.c pixbuf-init.c
86 filechooser_LDADD = $(progs_ldadd)
87
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/doc-fixes.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/doc-fixes.patch
new file mode 100644
index 0000000..74e479f
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+-2.24.22/doc-fixes.patch
@@ -0,0 +1,22 @@
1There are issues building the gtk+ tutorial and faq documentation.
2Since they were removed in gtk+ upstream and are superfluous in
3embedded applications, just don't build them.
4
5Thanks to Joshua Lock for suggesting this approach.
6
7Signed-off-by: Scott Garman <scott.a.garman@intel.com>
8
9Upstream-Status: Inappropriate [embedded specific]
10
11diff -urN gtk+-2.22.1.orig/docs/Makefile.am gtk+-2.22.1/docs/Makefile.am
12--- gtk+-2.22.1.orig/docs/Makefile.am 2010-11-15 04:13:09.000000000 -0800
13+++ gtk+-2.22.1/docs/Makefile.am 2011-02-23 19:25:16.914815097 -0800
14@@ -1,7 +1,7 @@
15 ## Process this file with automake to produce Makefile.in
16 include $(top_srcdir)/Makefile.decl
17
18-SUBDIRS = tutorial faq reference tools
19+SUBDIRS = reference tools
20
21 EXTRA_DIST += \
22 defsformat.txt \
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/entry-cairo.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/entry-cairo.patch
new file mode 100644
index 0000000..3083b77
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+-2.24.22/entry-cairo.patch
@@ -0,0 +1,105 @@
1Upstream-Status: Pending
2
3Index: gtk/gtkentry.c
4===================================================================
5RCS file: /cvs/gnome/gtk+/gtk/gtkentry.c,v
6retrieving revision 1.317
7diff -u -r1.317 gtkentry.c
8--- gtk/gtkentry.c 29 Jun 2006 09:18:05 -0000 1.317
9+++ gtk/gtkentry.c 2 Jul 2006 14:14:24 -0000
10@@ -3337,7 +3337,9 @@
11 if (GTK_WIDGET_DRAWABLE (entry))
12 {
13 PangoLayout *layout = gtk_entry_ensure_layout (entry, TRUE);
14+#ifdef USE_CAIRO_INTERNALLY
15 cairo_t *cr;
16+#endif
17 gint x, y;
18 gint start_pos, end_pos;
19
20@@ -3345,23 +3347,35 @@
21
22 get_layout_position (entry, &x, &y);
23
24+#ifdef USE_CAIRO_INTERNALLY
25 cr = gdk_cairo_create (entry->text_area);
26
27 cairo_move_to (cr, x, y);
28 gdk_cairo_set_source_color (cr, &widget->style->text [widget->state]);
29 pango_cairo_show_layout (cr, layout);
30+#else
31+ gdk_draw_layout (entry->text_area, widget->style->text_gc [widget->state],
32+ x, y,
33+ layout);
34+#endif
35
36 if (gtk_editable_get_selection_bounds (GTK_EDITABLE (entry), &start_pos, &end_pos))
37 {
38 gint *ranges;
39 gint n_ranges, i;
40 PangoRectangle logical_rect;
41- GdkColor *selection_color, *text_color;
42 GtkBorder inner_border;
43+#ifdef USE_CAIRO_INTERNALLY
44+ GdkColor *selection_color, *text_color;
45+#else
46+ GdkGC *selection_gc, *text_gc;
47+ GdkRegion *clip_region;
48+#endif
49
50 pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
51 gtk_entry_get_pixel_ranges (entry, &ranges, &n_ranges);
52
53+#ifdef USE_CAIRO_INTERNALLY
54 if (GTK_WIDGET_HAS_FOCUS (entry))
55 {
56 selection_color = &widget->style->base [GTK_STATE_SELECTED];
57@@ -3390,11 +3404,46 @@
58 cairo_move_to (cr, x, y);
59 gdk_cairo_set_source_color (cr, text_color);
60 pango_cairo_show_layout (cr, layout);
61-
62+#else
63+ if (GTK_WIDGET_HAS_FOCUS (entry))
64+ {
65+ selection_gc = widget->style->base_gc [GTK_STATE_SELECTED];
66+ text_gc = widget->style->text_gc [GTK_STATE_SELECTED];
67+ }
68+ else
69+ {
70+ selection_gc = widget->style->base_gc [GTK_STATE_ACTIVE];
71+ text_gc = widget->style->text_gc [GTK_STATE_ACTIVE];
72+ }
73+
74+ clip_region = gdk_region_new ();
75+ for (i = 0; i < n_ranges; ++i)
76+ {
77+ GdkRectangle rect;
78+
79+ rect.x = inner_border.left - entry->scroll_offset + ranges[2 * i];
80+ rect.y = y;
81+ rect.width = ranges[2 * i + 1];
82+ rect.height = logical_rect.height;
83+
84+ gdk_draw_rectangle (entry->text_area, selection_gc, TRUE,
85+ rect.x, rect.y, rect.width, rect.height);
86+
87+ gdk_region_union_with_rect (clip_region, &rect);
88+ }
89+
90+ gdk_gc_set_clip_region (text_gc, clip_region);
91+ gdk_draw_layout (entry->text_area, text_gc,
92+ x, y,
93+ layout);
94+ gdk_gc_set_clip_region (text_gc, NULL);
95+ gdk_region_destroy (clip_region);
96+#endif
97 g_free (ranges);
98 }
99-
100+#ifdef USE_CAIRO_INTERNALLY
101 cairo_destroy (cr);
102+#endif
103 }
104 }
105
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/hardcoded_libtool.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/hardcoded_libtool.patch
new file mode 100644
index 0000000..13ff318
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+-2.24.22/hardcoded_libtool.patch
@@ -0,0 +1,1814 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Updated to apply to gtk+-2.24.15
4
5Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
6diff -Nurd gtk+-2.24.15/configure.ac gtk+-2.24.15/configure.ac
7--- gtk+-2.24.15/configure.ac 2013-01-12 20:52:54.000000000 +0200
8+++ gtk+-2.24.15/configure.ac 2013-02-12 21:33:30.689925967 +0200
9@@ -415,7 +415,7 @@
10 case $enable_explicit_deps in
11 auto)
12 export SED
13- deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
14+ deplibs_check_method=`(./$host_alias-libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
15 if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
16 enable_explicit_deps=yes
17 else
18@@ -774,7 +774,7 @@
19 dnl Now we check to see if our libtool supports shared lib deps
20 dnl (in a rather ugly way even)
21 if $dynworks; then
22- module_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
23+ module_libtool_config="${CONFIG_SHELL-/bin/sh} $host_alias-libtool --config"
24 module_deplibs_check=`$module_libtool_config | \
25 grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
26 sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
27@@ -1574,7 +1574,7 @@
28 # We are using gmodule-no-export now, but I'm leaving the stripping
29 # code in place for now, since pango and atk still require gmodule.
30 export SED
31-export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
32+export_dynamic=`($host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
33 if test -n "$export_dynamic"; then
34 GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
35 GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
36diff -Nurd gtk+-2.24.15/configure.ac.orig gtk+-2.24.15/configure.ac.orig
37--- gtk+-2.24.15/configure.ac.orig 1970-01-01 02:00:00.000000000 +0200
38+++ gtk+-2.24.15/configure.ac.orig 2013-02-12 21:33:21.821926163 +0200
39@@ -0,0 +1,1775 @@
40+# Process this file with autoconf to produce a configure script.
41+# Process this file with autoconf to produce a configure script.
42+# require autoconf 2.54
43+AC_PREREQ(2.62)
44+
45+# Making releases:
46+# GTK_MICRO_VERSION += 1;
47+# GTK_INTERFACE_AGE += 1;
48+# GTK_BINARY_AGE += 1;
49+# if any functions have been added, set GTK_INTERFACE_AGE to 0.
50+# if backwards compatibility has been broken,
51+# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
52+
53+m4_define([gtk_major_version], [2])
54+m4_define([gtk_minor_version], [24])
55+m4_define([gtk_micro_version], [15])
56+m4_define([gtk_interface_age], [15])
57+m4_define([gtk_binary_age],
58+ [m4_eval(100 * gtk_minor_version + gtk_micro_version)])
59+m4_define([gtk_version],
60+ [gtk_major_version.gtk_minor_version.gtk_micro_version])
61+# This is the X.Y used in -lgtk-FOO-X.Y
62+m4_define([gtk_api_version], [2.0])
63+
64+# Define a string for the earliest version that this release has
65+# backwards binary compatibility with for all interfaces a module
66+# might. Unless we add module-only API with lower stability
67+# guarantees, this should be unchanged until we break binary compat
68+# for GTK+.
69+#
70+#GTK_BINARY_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$LT_CURRENT
71+m4_define([gtk_binary_version], [2.10.0])
72+
73+# required versions of other packages
74+m4_define([glib_required_version], [2.28.0])
75+m4_define([pango_required_version], [1.20])
76+m4_define([atk_required_version], [1.29.2])
77+m4_define([cairo_required_version], [1.6])
78+m4_define([gdk_pixbuf_required_version], [2.21.0])
79+
80+
81+AC_INIT([gtk+], [gtk_version],
82+ [http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
83+ [gtk+])
84+
85+AC_CONFIG_SRCDIR([gdk/gdktypes.h])
86+AC_CONFIG_HEADERS([config.h])
87+AC_CONFIG_MACRO_DIR([m4])
88+
89+# Save this value here, since automake will set cflags later
90+cflags_set=${CFLAGS+set}
91+
92+AM_INIT_AUTOMAKE([no-define -Wno-portability dist-bzip2])
93+
94+# Support silent build rules, requires at least automake-1.11. Enable
95+# by either passing --enable-silent-rules to configure or passing V=0
96+# to make
97+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
98+
99+#
100+# For each of the libraries we build, we define the following
101+
102+# substituted variables:
103+#
104+# foo_PACKAGES: pkg-config packages this library requires
105+# foo_EXTRA_LIBS: Libraries this module requires not pulled in by pkg-config
106+# foo_EXTRA_CFLAGS: cflags this module requires not pulled in by pkg-config
107+# foo_DEP_LIBS: All libraries this module requires
108+# foo_DEP_CFLAGS: All cflags this module requires
109+
110+
111+GTK_MAJOR_VERSION=gtk_major_version
112+GTK_MINOR_VERSION=gtk_minor_version
113+GTK_MICRO_VERSION=gtk_micro_version
114+GTK_INTERFACE_AGE=gtk_interface_age
115+GTK_BINARY_AGE=gtk_binary_age
116+GTK_VERSION=gtk_version
117+GTK_API_VERSION=gtk_api_version
118+GTK_BINARY_VERSION=gtk_binary_version
119+AC_SUBST(GTK_MAJOR_VERSION)
120+AC_SUBST(GTK_MINOR_VERSION)
121+AC_SUBST(GTK_MICRO_VERSION)
122+AC_SUBST(GTK_INTERFACE_AGE)
123+AC_SUBST(GTK_BINARY_AGE)
124+AC_SUBST(GTK_API_VERSION)
125+AC_SUBST(GTK_VERSION)
126+AC_SUBST(GTK_BINARY_VERSION)
127+
128+# libtool versioning
129+#LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION
130+#LT_CURRENT=`expr $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
131+#LT_REVISION=$GTK_INTERFACE_AGE
132+#LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE`
133+#LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
134+
135+m4_define([lt_current], [m4_eval(100 * gtk_minor_version + gtk_micro_version - gtk_interface_age)])
136+m4_define([lt_revision], [gtk_interface_age])
137+m4_define([lt_age], [m4_eval(gtk_binary_age - gtk_interface_age)])
138+LT_VERSION_INFO="lt_current:lt_revision:lt_age"
139+LT_CURRENT_MINUS_AGE=m4_eval(lt_current - lt_age)
140+AC_SUBST(LT_VERSION_INFO)
141+AC_SUBST(LT_CURRENT_MINUS_AGE)
142+
143+m4_define([gail_lt_current],[18])
144+m4_define([gail_lt_revision],[1])
145+m4_define([gail_lt_age],[0])
146+m4_define([gail_lt_version_info],[gail_lt_current:gail_lt_revision:gail_lt_age])
147+m4_define([gail_lt_current_minus_age],[m4_eval(gail_lt_current - gail_lt_age)])
148+AC_SUBST([GAIL_LT_VERSION_INFO],[gail_lt_version_info])
149+AC_SUBST([GAIL_LT_CURRENT_MINUS_AGE],[gail_lt_current_minus_age])
150+
151+GETTEXT_PACKAGE=gtk20
152+AC_SUBST(GETTEXT_PACKAGE)
153+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
154+ [The prefix for our gettext translation domains.])
155+
156+AC_CANONICAL_HOST
157+
158+MATH_LIB=-lm
159+AC_MSG_CHECKING([for native Win32])
160+LIB_EXE_MACHINE_FLAG=X86
161+EXE_MANIFEST_ARCHITECTURE=X86
162+case "$host" in
163+ *-*-mingw*)
164+ os_win32=yes
165+ gio_can_sniff=no
166+ MATH_LIB=
167+ case "$host" in
168+ x86_64-*-*)
169+ LIB_EXE_MACHINE_FLAG=X64
170+ EXE_MANIFEST_ARCHITECTURE=AMD64
171+ ;;
172+ esac
173+ ;;
174+ *)
175+ os_win32=no
176+ ;;
177+esac
178+AC_MSG_RESULT([$os_win32])
179+
180+AC_SUBST(LIB_EXE_MACHINE_FLAG)
181+AC_SUBST(EXE_MANIFEST_ARCHITECTURE)
182+
183+case $host in
184+ *-*-linux*)
185+ os_linux=yes
186+ ;;
187+esac
188+
189+dnl Initialize libtool
190+AC_PROG_CC
191+AM_DISABLE_STATIC
192+
193+dnl
194+dnl Check for a working C++ compiler, but do not bail out, if none is found.
195+dnl We use this for an automated test for C++ header correctness.
196+dnl
197+AC_CHECK_TOOLS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], gcc)
198+AC_LANG_SAVE
199+AC_LANG_CPLUSPLUS
200+
201+AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=)
202+AM_CONDITIONAL(HAVE_CXX, test "$CXX" != "")
203+
204+gtk_save_cxxflags="$CXXFLAGS"
205+CXXFLAGS="$CXXFLAGS -x objective-c++"
206+AC_TRY_COMPILE([@interface Foo @end],,OBJC=yes,OBJC=no)
207+AM_CONDITIONAL(HAVE_OBJC, test "$OBJC" = "yes")
208+CXXFLAGS="$gtk_save_cxxflags"
209+AC_LANG_RESTORE
210+
211+if test "$os_win32" = "yes"; then
212+ if test x$enable_static = xyes -o x$enable_static = x; then
213+ AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.])
214+ enable_static=no
215+ fi
216+ if test x$enable_shared = xno; then
217+ AC_MSG_WARN([Enabling shared library build, must build as DLL on Windows.])
218+ fi
219+ enable_shared=yes
220+fi
221+
222+AC_LIBTOOL_WIN32_DLL
223+AM_PROG_LIBTOOL
224+dnl when using libtool 2.x create libtool early, because it's used in configure
225+m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
226+
227+
228+# Make sure we use 64-bit versions of various file stuff.
229+AC_SYS_LARGEFILE
230+
231+AM_PROG_AS
232+AC_PATH_PROG(NM, nm, nm)
233+
234+dnl Initialize maintainer mode
235+AM_MAINTAINER_MODE([enable])
236+
237+AC_MSG_CHECKING([for some Win32 platform])
238+case "$host" in
239+ *-*-mingw*|*-*-cygwin*)
240+ platform_win32=yes
241+ ;;
242+ *)
243+ platform_win32=no
244+ ;;
245+esac
246+AC_MSG_RESULT([$platform_win32])
247+AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
248+
249+AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
250+AM_CONDITIONAL(OS_UNIX, test "$os_win32" != "yes")
251+AM_CONDITIONAL(OS_LINUX, test "$os_linux" = "yes")
252+
253+if test "$os_win32" = "yes"; then
254+ AC_CHECK_TOOL(WINDRES, windres, no)
255+ if test "$WINDRES" = no; then
256+ AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.])
257+ fi
258+ AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
259+fi
260+AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
261+
262+m4_define([debug_default],
263+ m4_if(m4_eval(gtk_minor_version % 2), [1], [yes], [minimum]))
264+
265+dnl declare --enable-* args and collect ac_help strings
266+AC_ARG_ENABLE(debug,
267+ AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
268+ [turn on debugging @<:@default=debug_default@:>@]),,
269+ enable_debug=debug_default)
270+AC_ARG_ENABLE(shm,
271+ [AC_HELP_STRING([--enable-shm],
272+ [support shared memory if available [default=yes]])],,
273+ [enable_shm="yes"])
274+AC_ARG_ENABLE(xkb,
275+ [AC_HELP_STRING([--enable-xkb],
276+ [support XKB [default=maybe]])],,
277+ [enable_xkb="maybe"])
278+AC_ARG_ENABLE(xinerama,
279+ [AC_HELP_STRING([--enable-xinerama],
280+ [support xinerama extension if available [default=yes]])],,
281+ [enable_xinerama="yes"])
282+AC_ARG_ENABLE(rebuilds,
283+ [AC_HELP_STRING([--disable-rebuilds],
284+ [disable all source autogeneration rules])],,
285+ [enable_rebuilds=yes])
286+AC_ARG_ENABLE(visibility,
287+ [AC_HELP_STRING([--disable-visibility],
288+ [don't use ELF visibility attributes])],,
289+ [enable_visibility=yes])
290+
291+AC_ARG_WITH(xinput,
292+ [AC_HELP_STRING([--with-xinput=@<:@no/yes@:>@], [support XInput])])
293+
294+if test "$platform_win32" = yes; then
295+ gdktarget=win32
296+else
297+ gdktarget=x11
298+fi
299+
300+AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/win32/quartz/directfb]] select non-default GDK target],
301+ gdktarget=$with_gdktarget)
302+
303+AC_SUBST(gdktarget)
304+case $gdktarget in
305+ x11|win32|quartz|directfb) ;;
306+ *) AC_MSG_ERROR([Invalid target for GDK: use x11, quartz, directfb or win32.]);;
307+esac
308+
309+gdktargetlib=libgdk-$gdktarget-$GTK_API_VERSION.la
310+gtktargetlib=libgtk-$gdktarget-$GTK_API_VERSION.la
311+
312+AC_SUBST(gdktargetlib)
313+AC_SUBST(gtktargetlib)
314+
315+if test "x$enable_debug" = "xyes"; then
316+ test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
317+ GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG -DG_ERRORCHECK_MUTEXES"
318+else
319+ if test "x$enable_debug" = "xno"; then
320+ GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
321+ else
322+ GTK_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS"
323+ fi
324+fi
325+
326+
327+if test "x$enable_visibility" = "xno"; then
328+ GTK_DEBUG_FLAGS="$GTK_DEBUG_FLAGS -DDISABLE_VISIBILITY"
329+fi
330+
331+
332+AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}",
333+ [Define if debugging is enabled])
334+
335+
336+# Build time sanity check...
337+AM_SANITY_CHECK
338+
339+# Checks for programs.
340+AC_ISC_POSIX
341+AM_PROG_CC_C_O
342+AC_PROG_INSTALL
343+AC_PROG_MAKE_SET
344+
345+changequote(,)dnl
346+if test "x$GCC" = "xyes"; then
347+ case " $CFLAGS " in
348+ *[\ \ ]-Wall[\ \ ]*) ;;
349+ *) CFLAGS="$CFLAGS -Wall" ;;
350+ esac
351+
352+ if test "x$enable_ansi" = "xyes"; then
353+ case " $CFLAGS " in
354+ *[\ \ ]-ansi[\ \ ]*) ;;
355+ *) CFLAGS="$CFLAGS -ansi" ;;
356+ esac
357+
358+ case " $CFLAGS " in
359+ *[\ \ ]-pedantic[\ \ ]*) ;;
360+ *) CFLAGS="$CFLAGS -pedantic" ;;
361+ esac
362+ fi
363+fi
364+changequote([,])dnl
365+
366+CPPFLAGS="$CPPFLAGS -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
367+
368+# Ensure MSVC-compatible struct packing convention is used when
369+# compiling for Win32 with gcc.
370+# What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
371+# gcc2 uses "-fnative-struct".
372+if test x"$os_win32" = xyes; then
373+ if test x"$GCC" = xyes; then
374+ msnative_struct=''
375+ AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
376+ if test -z "$ac_cv_prog_CC"; then
377+ our_gcc="$CC"
378+ else
379+ our_gcc="$ac_cv_prog_CC"
380+ fi
381+ case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
382+ 2.)
383+ if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
384+ msnative_struct='-fnative-struct'
385+ fi
386+ ;;
387+ *)
388+ if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
389+ msnative_struct='-mms-bitfields'
390+ fi
391+ ;;
392+ esac
393+ if test x"$msnative_struct" = x ; then
394+ AC_MSG_RESULT([no way])
395+ AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
396+ else
397+ CFLAGS="$CFLAGS $msnative_struct"
398+ AC_MSG_RESULT([${msnative_struct}])
399+ fi
400+ fi
401+fi
402+
403+# Honor aclocal flags
404+ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
405+
406+## Initial sanity check, done here so that users get told they
407+## have the wrong dependencies as early in the process as possible.
408+## Later on we actually use the cflags/libs from separate pkg-config
409+## calls. Oh, also the later pkg-config calls don't include
410+## the version requirements since those make the module lists
411+## annoying to construct
412+PKG_CHECK_MODULES(BASE_DEPENDENCIES,
413+ [glib-2.0 >= glib_required_version dnl
414+ atk >= atk_required_version dnl
415+ pango >= pango_required_version dnl
416+ cairo >= cairo_required_version dnl
417+ gdk-pixbuf-2.0 >= gdk_pixbuf_required_version])
418+
419+## In addition to checking that cairo is present, we also need to
420+## check that the correct cairo backend is there. E.g. if the GDK
421+## target is win32 we need the cairo-win32 backend and so on.
422+cairo_backend=$gdktarget
423+
424+# GDK calls the xlib backend "x11," cairo calls it "xlib." Other
425+# backend names are identical.
426+if test "x$cairo_backend" = "xx11"; then
427+ cairo_backend=xlib
428+fi
429+PKG_CHECK_MODULES(CAIRO_BACKEND,
430+ [cairo-$cairo_backend >= cairo_required_version])
431+
432+PKG_CHECK_MODULES(GMODULE, [gmodule-2.0])
433+
434+if test "$os_win32" != yes; then
435+ # libtool option to control which symbols are exported
436+ # right now, symbols starting with _ are not exported
437+ LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
438+else
439+ # We currently use .def files on Windows (for gdk and gtk)
440+ LIBTOOL_EXPORT_OPTIONS=
441+fi
442+AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
443+
444+dnl ******************************************************
445+dnl * See whether to include shared library dependencies *
446+dnl ******************************************************
447+
448+AC_ARG_ENABLE(explicit-deps,
449+ [AC_HELP_STRING([--enable-explicit-deps=@<:@yes/no/auto@:>@],
450+ [use explicit dependencies in .pc files [default=auto]])],,
451+ [enable_explicit_deps=auto])
452+
453+AC_MSG_CHECKING([Whether to write dependencies into .pc files])
454+case $enable_explicit_deps in
455+ auto)
456+ export SED
457+ deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
458+ if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
459+ enable_explicit_deps=yes
460+ else
461+ enable_explicit_deps=no
462+ fi
463+ ;;
464+ yes|no)
465+ ;;
466+ *) AC_MSG_ERROR([Value given to --enable-explicit-deps must be one of yes, no or auto])
467+ ;;
468+esac
469+AC_MSG_RESULT($enable_explicit_deps)
470+
471+AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no)
472+
473+# define a MAINT-like variable REBUILD which is set if Perl
474+# and awk are found, so autogenerated sources can be rebuilt
475+
476+AC_PATH_PROGS(PERL, perl5 perl)
477+
478+# We would like indent, but don't require it.
479+AC_CHECK_PROG(INDENT, indent, indent)
480+
481+REBUILD=\#
482+if test "x$enable_rebuilds" = "xyes" && \
483+ test -n "$PERL" && \
484+ $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then
485+ REBUILD=
486+fi
487+AC_SUBST(REBUILD)
488+
489+AC_CHECK_FUNCS(lstat mkstemp flockfile getc_unlocked)
490+AC_CHECK_FUNCS(localtime_r)
491+
492+# _NL_TIME_FIRST_WEEKDAY is an enum and not a define
493+AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
494+AC_TRY_LINK([#include <langinfo.h>], [
495+char c;
496+c = *((unsigned char *) nl_langinfo(_NL_TIME_FIRST_WEEKDAY));
497+], gtk_ok=yes, gtk_ok=no)
498+AC_MSG_RESULT($gtk_ok)
499+if test "$gtk_ok" = "yes"; then
500+ AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1],
501+ [Define if _NL_TIME_FIRST_WEEKDAY is available])
502+fi
503+
504+# _NL_MEASUREMENT_MEASUREMENT is an enum and not a define
505+AC_MSG_CHECKING([for _NL_MEASUREMENT_MEASUREMENT])
506+AC_TRY_LINK([#include <langinfo.h>], [
507+char c;
508+c = *((unsigned char *) nl_langinfo(_NL_MEASUREMENT_MEASUREMENT));
509+], gtk_ok=yes, gtk_ok=no)
510+AC_MSG_RESULT($gtk_ok)
511+if test "$gtk_ok" = "yes"; then
512+ AC_DEFINE([HAVE__NL_MEASUREMENT_MEASUREMENT], [1],
513+ [Define if _NL_MEASUREMENT_MEASUREMENT is available])
514+fi
515+
516+# _NL_PAPER_HEIGHT is an enum and not a define
517+AC_MSG_CHECKING([for _NL_PAPER_HEIGHT])
518+AC_TRY_LINK([#include <langinfo.h>], [
519+char c;
520+c = *((unsigned char *) nl_langinfo(_NL_PAPER_HEIGHT));
521+], gtk_ok=yes, gtk_ok=no)
522+AC_MSG_RESULT($gtk_ok)
523+if test "$gtk_ok" = "yes"; then
524+ AC_DEFINE([HAVE__NL_PAPER_HEIGHT], [1],
525+ [Define if _NL_PAPER_HEIGHT is available])
526+fi
527+
528+# _NL_PAPER_WIDTH is an enum and not a define
529+AC_MSG_CHECKING([for _NL_PAPER_WIDTH])
530+AC_TRY_LINK([#include <langinfo.h>], [
531+char c;
532+c = *((unsigned char *) nl_langinfo(_NL_PAPER_WIDTH));
533+], gtk_ok=yes, gtk_ok=no)
534+AC_MSG_RESULT($gtk_ok)
535+if test "$gtk_ok" = "yes"; then
536+ AC_DEFINE([HAVE__NL_PAPER_WIDTH], [1],
537+ [Define if _NL_PAPER_WIDTH is available])
538+fi
539+
540+# sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
541+AC_MSG_CHECKING(for sigsetjmp)
542+AC_TRY_LINK([#include <setjmp.h>], [
543+sigjmp_buf env;
544+sigsetjmp(env, 0);
545+], gtk_ok=yes, gtk_ok=no)
546+AC_MSG_RESULT($gtk_ok)
547+if test "$gtk_ok" = "yes"; then
548+ AC_DEFINE(HAVE_SIGSETJMP, 1,
549+ [Define to 1 if sigsetjmp is available])
550+fi
551+
552+# i18n stuff
553+ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
554+AM_GLIB_GNU_GETTEXT
555+LIBS="$LIBS $INTLLIBS"
556+AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
557+ sed -e "/POTFILES =/r po-properties/POTFILES" po-properties/Makefile.in > po-properties/Makefile
558+ esac])
559+
560+dnl Snippet below is copied from AM_GLIB_GNU_GETTEXT to generate a first
561+dnl po-properties/POTFILES during configure; see GNOME #573515.
562+dnl
563+dnl Generate list of files to be processed by xgettext which will
564+dnl be included in po-properties/Makefile.
565+test -d po-properties || mkdir po-properties
566+if test "x$srcdir" != "x."; then
567+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
568+ popropsrcprefix="$srcdir/"
569+ else
570+ popropsrcprefix="../$srcdir/"
571+ fi
572+else
573+ popropsrcprefix="../"
574+fi
575+rm -f po-properties/POTFILES
576+sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $popropsrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
577+< $srcdir/po-properties/POTFILES.in > po-properties/POTFILES
578+dnl (End of adapted AM_GLIB_GNU_GETTEXT snippet.)
579+
580+AM_GLIB_DEFINE_LOCALEDIR(GTK_LOCALEDIR)
581+
582+dnl The DU4 header files don't provide library prototypes unless
583+dnl -std1 is given to the native cc.
584+AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
585+
586+gtk_save_LIBS=$LIBS
587+LIBS="$LIBS -lm"
588+AC_TRY_RUN([#include <math.h>
589+ int main (void) { return (log(1) != log(1.)); }],
590+ AC_MSG_RESULT(none needed),
591+ gtk_save_CFLAGS="$CFLAGS"
592+ CFLAGS="$CFLAGS -std1"
593+ AC_TRY_RUN([#include <math.h>
594+ int main (void) { return (log(1) != log(1.)); }],
595+ AC_MSG_RESULT(-std1),
596+ AC_MSG_RESULT()
597+ CFLAGS="$gtk_save_CFLAGS"
598+ AC_MSG_WARN(
599+ [No ANSI prototypes found in library. (-std1 didn't work.)]),
600+ true
601+ ),
602+ AC_MSG_RESULT(none needed)
603+)
604+LIBS=$gtk_save_LIBS
605+
606+AC_MSG_CHECKING(for the BeOS)
607+case $host in
608+ *-*-beos*)
609+ AC_MSG_RESULT(yes)
610+ MATH_LIB=
611+ ;;
612+ *)
613+ AC_MSG_RESULT(no)
614+ ;;
615+esac
616+
617+AC_SUBST(MATH_LIB)
618+#
619+# see bug 162979
620+#
621+AC_MSG_CHECKING(for HP-UX)
622+case $host_os in
623+ hpux9* | hpux10* | hpux11*)
624+ AC_MSG_RESULT(yes)
625+ CFLAGS="$CFLAGS -DHPPEX -DSHMLINK"
626+ ;;
627+ *)
628+ AC_MSG_RESULT(no)
629+ ;;
630+esac
631+
632+dnl NeXTStep cc seems to need this
633+AC_MSG_CHECKING([for extra flags for POSIX compliance])
634+AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
635+ AC_MSG_RESULT(none needed),
636+ gtk_save_CFLAGS="$CFLAGS"
637+ CFLAGS="$CFLAGS -posix"
638+ AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
639+ AC_MSG_RESULT(-posix),
640+ AC_MSG_RESULT()
641+ CFLAGS="$gtk_save_CFLAGS"
642+ AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
643+
644+#
645+# Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working
646+#
647+
648+GLIB_PACKAGES="gobject-2.0 gio-2.0 gmodule-no-export-2.0"
649+
650+AM_PATH_GLIB_2_0(glib_required_version, :,
651+ AC_MSG_ERROR([
652+*** GLIB glib_required_version or better is required. The latest version of
653+*** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.]),
654+ gobject gmodule-no-export gthread)
655+
656+# See if it's safe to turn G_DISABLE_DEPRECATED on.
657+GLIB_VERSION_MAJOR_MINOR=`$PKG_CONFIG --modversion glib-2.0 | sed "s/\.@<:@^.@:>@*\$//"`
658+GLIB_REQUIRED_VERSION_MAJOR_MINOR=`echo glib_required_version | sed "s/\.@<:@^.@:>@*\$//"`
659+if test "x$GLIB_VERSION_MAJOR_MINOR" = "x$GLIB_REQUIRED_VERSION_MAJOR_MINOR"; then
660+ CFLAGS="-DG_DISABLE_DEPRECATED $CFLAGS"
661+fi
662+
663+CFLAGS="-DGDK_PIXBUF_DISABLE_DEPRECATED $CFLAGS"
664+
665+
666+dnl
667+dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
668+dnl
669+gtk_save_LIBS=$LIBS
670+LIBS="$LIBS $GLIB_LIBS"
671+AC_CHECK_FUNCS(bind_textdomain_codeset)
672+LIBS=$gtk_save_LIBS
673+
674+AC_CHECK_HEADERS(pwd.h,
675+ AC_DEFINE(HAVE_PWD_H, 1,
676+ [Define to 1 if pwd.h is available]))
677+AC_CHECK_HEADERS(sys/time.h,
678+ AC_DEFINE(HAVE_SYS_TIME_H, 1,
679+ [Define to 1 if time.h is available]))
680+AC_CHECK_HEADERS(unistd.h,
681+ AC_DEFINE(HAVE_UNISTD_H, 1,
682+ [Define to 1 if unistd.h is available]))
683+AC_CHECK_HEADERS(ftw.h,
684+ AC_DEFINE(HAVE_FTW_H, 1,
685+ [Define to 1 if ftw.h is available]))
686+
687+AC_MSG_CHECKING([for GNU ftw extensions])
688+AC_TRY_COMPILE([#define _XOPEN_SOURCE 500
689+#define _GNU_SOURCE
690+#include <ftw.h>], [int flags = FTW_ACTIONRETVAL;], gtk_ok=yes, gtk_ok=no)
691+if test $gtk_ok = yes; then
692+ AC_MSG_RESULT([yes])
693+ AC_DEFINE(HAVE_GNU_FTW, 1, [Have GNU ftw])
694+else
695+ AC_MSG_RESULT([no])
696+fi
697+
698+saved_cflags="$CFLAGS"
699+saved_ldflags="$LDFLAGS"
700+
701+
702+# Checks for header files.
703+AC_HEADER_STDC
704+
705+# Checks for typedefs, structures, and compiler characteristics.
706+AC_C_CONST
707+
708+# Checks for library functions.
709+AC_TYPE_SIGNAL
710+AC_FUNC_MMAP
711+
712+AC_CHECK_FUNCS(mallinfo)
713+AC_CHECK_FUNCS(getresuid)
714+AC_TYPE_UID_T
715+
716+# Check if <sys/select.h> needs to be included for fd_set
717+AC_MSG_CHECKING([for fd_set])
718+AC_TRY_COMPILE([#include <sys/types.h>],
719+ [fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no)
720+if test $gtk_ok = yes; then
721+ AC_MSG_RESULT([yes, found in sys/types.h])
722+else
723+ AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
724+ if test $gtk_ok = yes; then
725+ AC_DEFINE(HAVE_SYS_SELECT_H, 1,
726+ [Define to 1 if sys/select.h is available])
727+ AC_MSG_RESULT([yes, found in sys/select.h])
728+ else
729+ AC_DEFINE(NO_FD_SET, 1,
730+ [Define to 1 if fd_set is not available])
731+ AC_MSG_RESULT(no)
732+ fi
733+fi
734+
735+# `widechar' tests for gdki18n.h
736+AC_MSG_CHECKING(for wchar.h)
737+AC_TRY_CPP([#include <wchar.h>], gdk_wchar_h=yes, gdk_wchar_h=no)
738+if test $gdk_wchar_h = yes; then
739+ AC_DEFINE(HAVE_WCHAR_H, 1, [Have wchar.h include file])
740+fi
741+AC_MSG_RESULT($gdk_wchar_h)
742+
743+# Check for wctype.h (for iswalnum)
744+AC_MSG_CHECKING(for wctype.h)
745+AC_TRY_CPP([#include <wctype.h>], gdk_wctype_h=yes, gdk_wctype_h=no)
746+if test $gdk_wctype_h = yes; then
747+ AC_DEFINE(HAVE_WCTYPE_H, 1, [Have wctype.h include file])
748+fi
749+AC_MSG_RESULT($gdk_wctype_h)
750+
751+# in Solaris 2.5, `iswalnum' is in -lw
752+GDK_WLIBS=
753+AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
754+
755+oLIBS="$LIBS"
756+LIBS="$LIBS $GDK_WLIBS"
757+# The following is necessary for Linux libc-5.4.38
758+AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
759+AC_TRY_LINK([#include <stdlib.h>],[
760+#if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
761+# ifdef HAVE_WCTYPE_H
762+# include <wctype.h>
763+# else
764+# ifdef HAVE_WCHAR_H
765+# include <wchar.h>
766+# endif
767+# endif
768+#else
769+# define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
770+#endif
771+iswalnum((wchar_t) 0);
772+], gdk_working_wctype=yes, gdk_working_wctype=no)
773+LIBS="$oLIBS"
774+
775+if test $gdk_working_wctype = no; then
776+ AC_DEFINE(HAVE_BROKEN_WCTYPE, 1, [Is the wctype implementation broken])
777+ GDK_WLIBS=
778+fi
779+AC_MSG_RESULT($gdk_working_wctype)
780+AC_SUBST(GDK_WLIBS)
781+
782+# Check for uxtheme.h (for MS-Windows Engine)
783+AC_MSG_CHECKING(for uxtheme.h)
784+AC_TRY_CPP([#include <uxtheme.h>], gtk_uxtheme_h=yes, gtk_uxtheme_h=no)
785+if test $gtk_uxtheme_h = yes; then
786+ AC_DEFINE(HAVE_UXTHEME_H, 1, [Have uxtheme.h include file])
787+fi
788+AC_MSG_RESULT($gtk_uxtheme_h)
789+
790+# Checks for gdkspawn
791+AC_CHECK_HEADERS(crt_externs.h)
792+AC_CHECK_FUNCS(_NSGetEnviron)
793+
794+AC_MSG_CHECKING(whether to build dynamic modules)
795+
796+AC_ARG_ENABLE(modules,
797+ [AC_HELP_STRING([--disable-modules],
798+ [disable dynamic module loading])])
799+
800+dynworks=false
801+deps=
802+if test x$enable_modules = xno; then
803+ AC_MSG_RESULT(no)
804+else
805+ AC_MSG_RESULT(yes)
806+ AC_MSG_CHECKING(whether dynamic modules work)
807+ ## for loop is to strip newline
808+ tmp=`$PKG_CONFIG --variable=gmodule_supported gmodule-no-export-2.0`
809+ for I in $tmp; do
810+ dynworks=$I
811+ done
812+
813+ dnl Now we check to see if our libtool supports shared lib deps
814+ dnl (in a rather ugly way even)
815+ if $dynworks; then
816+ module_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
817+ module_deplibs_check=`$module_libtool_config | \
818+ grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
819+ sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
820+ if test "x$module_deplibs_check" = "xnone" || \
821+ test "x$module_deplibs_check" = "xunknown" || \
822+ test "x$module_deplibs_check" = "x"; then
823+ dynworks=false
824+ fi
825+ fi
826+
827+ if $dynworks; then
828+ AC_DEFINE(USE_GMODULE, 1,
829+ [Define to 1 if gmodule works and should be used])
830+ AC_MSG_RESULT(yes)
831+ else
832+ AC_MSG_RESULT(no)
833+ fi
834+fi
835+
836+AM_CONDITIONAL(BUILD_DYNAMIC_MODULES, $dynworks)
837+
838+#
839+# Allow building some or all immodules included
840+#
841+AC_MSG_CHECKING(immodules to build)
842+
843+dnl due to an autoconf bug, commas in the first arg to
844+dnl AC_HELP_STRING cause problems.
845+dnl AC_HELP_STRING([--with-included-immodules=MODULE1 MODULE2 ...],
846+dnl [build the specified input method modules into gtk])
847+AC_ARG_WITH(included_immodules,
848+[ --with-included-immodules=MODULE1,MODULE2,...
849+ build the specified input methods into gtk])
850+
851+if $dynworks; then
852+ :
853+else
854+ ## if the option was specified, leave it; otherwise disable included immodules
855+ if test x$with_included_immodules = xno; then
856+ with_included_immodules=yes
857+ fi
858+fi
859+
860+all_immodules="am-et,cedilla,cyrillic-translit"
861+if test "$gdktarget" = "win32"; then
862+ all_immodules="${all_immodules},ime"
863+fi
864+all_immodules="${all_immodules},inuktitut,ipa,multipress,thai,ti-er,ti-et,viqr"
865+if test "$gdktarget" = "x11"; then
866+ all_immodules="${all_immodules},xim"
867+fi
868+
869+included_immodules=""
870+# If the switch specified without listing any specific ones, include all
871+if test "x$with_included_immodules" = xyes ; then
872+ included_immodules="$all_immodules"
873+else
874+ included_immodules="$with_included_immodules"
875+fi
876+
877+AC_MSG_RESULT($included_immodules)
878+AM_CONDITIONAL(HAVE_INCLUDED_IMMMODULES, test "x$included_immodules" != x)
879+
880+INCLUDED_IMMODULE_OBJ=
881+INCLUDED_IMMODULE_DEFINE=
882+
883+IFS="${IFS= }"; gtk_save_ifs="$IFS"; IFS=","
884+for immodule in $included_immodules; do
885+ immodule_underscores=`echo $immodule | sed -e 's/-/_/g'`
886+ if echo "$all_immodules" | egrep "(^|,)$immodule(\$|,)" > /dev/null; then
887+ :
888+ else
889+ AC_MSG_ERROR([the specified input method $immodule does not exist])
890+ fi
891+
892+ INCLUDED_IMMODULE_OBJ="$INCLUDED_IMMODULE_OBJ ../modules/input/libstatic-im-$immodule.la"
893+ INCLUDED_IMMODULE_DEFINE="$INCLUDED_IMMODULE_DEFINE -DINCLUDE_IM_$immodule_underscores"
894+ eval INCLUDE_$immodule_underscores=yes
895+done
896+IFS="$gtk_save_ifs"
897+AC_SUBST(INCLUDED_IMMODULE_OBJ)
898+AC_SUBST(INCLUDED_IMMODULE_DEFINE)
899+
900+AM_CONDITIONAL(INCLUDE_IM_AM_ET, [test x"$INCLUDE_am_et" = xyes])
901+AM_CONDITIONAL(INCLUDE_IM_CEDILLA, [test x"$INCLUDE_cedilla" = xyes])
902+AM_CONDITIONAL(INCLUDE_IM_CYRILLIC_TRANSLIT, [test x"$INCLUDE_cyrillic_translit" = xyes])
903+AM_CONDITIONAL(INCLUDE_IM_IME, [test x"$INCLUDE_ime" = xyes])
904+AM_CONDITIONAL(INCLUDE_IM_INUKTITUT, [test x"$INCLUDE_inuktitut" = xyes])
905+AM_CONDITIONAL(INCLUDE_IM_IPA, [test x"$INCLUDE_ipa" = xyes])
906+AM_CONDITIONAL(INCLUDE_IM_MULTIPRESS, [test x"$INCLUDE_multipress" = xyes])
907+AM_CONDITIONAL(INCLUDE_IM_THAI, [test x"$INCLUDE_thai" = xyes])
908+AM_CONDITIONAL(INCLUDE_IM_TI_ER, [test x"$INCLUDE_ti_er" = xyes])
909+AM_CONDITIONAL(INCLUDE_IM_TI_ET, [test x"$INCLUDE_ti_et" = xyes])
910+AM_CONDITIONAL(INCLUDE_IM_VIQR, [test x"$INCLUDE_viqr" = xyes])
911+AM_CONDITIONAL(INCLUDE_IM_XIM, [test x"$INCLUDE_xim" = xyes])
912+
913+AC_HEADER_SYS_WAIT
914+
915+AC_TYPE_SIGNAL
916+
917+# Checks to see whether we should include mediaLib
918+# support.
919+#
920+AC_CHECK_HEADER(sys/systeminfo.h,
921+ AC_DEFINE(HAVE_SYS_SYSTEMINFO_H, 1,
922+ [Define to 1 if sys/systeminfo.h is available]))
923+AC_CHECK_HEADER(sys/sysinfo.h,
924+ AC_DEFINE(HAVE_SYS_SYSINFO_H, 1,
925+ [Define to 1 if sys/sysinfo.h is available]))
926+
927+AC_MSG_CHECKING(for mediaLib 2.3)
928+use_mlib25=no
929+# Check for a mediaLib 2.3 function since that is what the GTK+ mediaLib
930+# patch requires.
931+AC_CHECK_LIB(mlib, mlib_ImageSetStruct, use_mlib=yes, use_mlib=no)
932+if test $use_mlib = yes; then
933+ AC_DEFINE(USE_MEDIALIB, 1,
934+ [Define to 1 if medialib is available and should be used])
935+ MEDIA_LIB=-lmlib
936+
937+ AC_MSG_CHECKING(for mediaLib 2.5)
938+ # Check for a mediaLib 2.5 function since that is what is needed for
939+ # gdk_rgb_convert integration.
940+ AC_CHECK_LIB(mlib, mlib_VideoColorRGBint_to_BGRAint, use_mlib25=yes, use_mlib25=no)
941+ if test $use_mlib25 = yes; then
942+ AC_DEFINE(USE_MEDIALIB25, 1,
943+ [Define to 1 if medialib 2.5 is available])
944+ fi
945+fi
946+AM_CONDITIONAL(USE_MEDIALIB, test $use_mlib = yes)
947+AM_CONDITIONAL(USE_MEDIALIB25, test $use_mlib25 = yes)
948+
949+dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
950+
951+AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
952+
953+if test $cross_compiling = yes; then
954+ AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
955+ if test x$GTK_UPDATE_ICON_CACHE = xno; then
956+ REBUILD_PNGS=#
957+ fi
958+fi
959+
960+AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
961+
962+if test ! -f $srcdir/gtk/gtkbuiltincache.h &&
963+ test "x$REBUILD_PNGS" = "x#" ; then
964+ AC_MSG_ERROR([
965+*** gtkbuiltincache.h is not in the tree, and cannot be built
966+*** because you don't have libpng, or (when cross-compiling) you
967+*** don't have a prebuilt gtk-update-icon-cache on the build system.])
968+fi
969+
970+########################################
971+# Windowing system checks
972+########################################
973+
974+GDK_EXTRA_LIBS="$GDK_WLIBS"
975+GDK_EXTRA_CFLAGS=
976+
977+# GTK+ uses some X calls, so needs to link against X directly
978+GTK_DEP_PACKAGES_FOR_X=
979+GTK_DEP_LIBS_FOR_X=
980+
981+if test "x$gdktarget" = "xx11"; then
982+ X_PACKAGES=fontconfig
983+
984+ #
985+ # We use fontconfig very peripherally when decoding the default
986+ # settings.
987+ #
988+ if $PKG_CONFIG --exists fontconfig; then : ; else
989+ AC_MSG_ERROR([
990+*** fontconfig (http://www.fontconfig.org) is required by the X11 backend.])
991+ fi
992+
993+ #
994+ # Check for basic X packages; we use pkg-config if available
995+ #
996+ if $PKG_CONFIG --exists x11 xext xrender; then
997+ have_base_x_pc=true
998+ X_PACKAGES="$X_PACKAGES x11 xext xrender"
999+ x_libs="`$PKG_CONFIG --libs x11 xext xrender`"
1000+ X_CFLAGS="`$PKG_CONFIG --cflags x11 xext xrender`"
1001+
1002+ # Strip out any .la files that pkg-config might give us (this happens
1003+ # with -uninstalled.pc files)
1004+ x_libs_for_checks=
1005+ for I in $x_libs ; do
1006+ case $I in
1007+ *.la) ;;
1008+ *) x_libs_for_checks="$x_libs_for_checks $I" ;;
1009+ esac
1010+ done
1011+
1012+ GTK_PACKAGES_FOR_X="x11"
1013+ else
1014+ have_base_x_pc=false
1015+ AC_PATH_XTRA
1016+ if test x$no_x = xyes ; then
1017+ AC_MSG_ERROR([X development libraries not found])
1018+ fi
1019+
1020+ x_cflags="$X_CFLAGS"
1021+ x_libs_for_checks="$X_LIBS -lXext -lXrender -lX11 $X_EXTRA_LIBS"
1022+
1023+ GTK_DEP_LIBS_FOR_X="$X_LIBS -lXrender -lX11 $X_EXTRA_LIBS"
1024+ fi
1025+
1026+ # Extra libraries found during checks (-lXinerama, etc), not from pkg-config.
1027+ x_extra_libs=
1028+
1029+ gtk_save_cppflags="$CPPFLAGS"
1030+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
1031+
1032+ gtk_save_LIBS=$LIBS
1033+ LIBS="$x_libs_for_checks $LIBS"
1034+
1035+ # Sanity check for the X11 and Xext libraries. While everything we need from
1036+ # Xext is optional, the chances a system has *none* of these things is so
1037+ # small that we just unconditionally require it.
1038+ AC_CHECK_FUNC(XOpenDisplay, :,
1039+ AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]))
1040+ AC_CHECK_FUNC(XextFindDisplay, :,
1041+ AC_MSG_ERROR([*** libXext not found. Check 'config.log' for more details.]))
1042+ AC_CHECK_FUNC(XRenderQueryExtension, :,
1043+ AC_MSG_ERROR([*** libXrender not found. Check 'config.log' for more details.]))
1044+
1045+ # Check for xReply
1046+
1047+ AC_MSG_CHECKING([if <X11/extensions/XIproto.h> is needed for xReply])
1048+ AC_TRY_COMPILE([#include <X11/Xlibint.h>],
1049+ [xReply *rep;],
1050+ [AC_MSG_RESULT([no])],
1051+ [AC_TRY_COMPILE([#include <X11/extensions/XIproto.h>
1052+#include <X11/Xlibint.h>],
1053+ [xReply *rep;],
1054+ [AC_MSG_RESULT([yes])
1055+ AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], 1,
1056+ [Define if <X11/extensions/XIproto.h> needed for xReply])],
1057+ [AC_MSG_RESULT([unknown])
1058+ AC_MSG_ERROR([xReply type unavailable. X11 is too old])])])
1059+
1060+ # Check for XConvertCase, XInternAtoms (X11R6 specific)
1061+
1062+ AC_CHECK_FUNCS(XConvertCase XInternAtoms)
1063+
1064+ # Generic X11R6 check needed for XIM support; we could
1065+ # probably use this to replace the above, but we'll
1066+ # leave the separate checks for XConvertCase and XInternAtoms
1067+ # for clarity
1068+
1069+ have_x11r6=false
1070+ AC_CHECK_FUNC(XAddConnectionWatch,
1071+ have_x11r6=true)
1072+
1073+ if $have_x11r6; then
1074+ AC_DEFINE(HAVE_X11R6, 1, [Define if we have X11R6])
1075+ fi
1076+ AM_CONDITIONAL(HAVE_X11R6, $have_x11r6)
1077+
1078+ # Check for XKB support.
1079+
1080+ if test "x$enable_xkb" = "xyes"; then
1081+ AC_MSG_WARN(XKB support explicitly enabled)
1082+ AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension])
1083+ elif test "x$enable_xkb" = "xmaybe"; then
1084+ AC_CHECK_FUNC(XkbQueryExtension,
1085+ AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension]))
1086+ else
1087+ AC_MSG_WARN(XKB support explicitly disabled)
1088+ fi
1089+
1090+ # Check for shaped window extension
1091+
1092+ AC_CHECK_FUNC(XShapeCombineMask, :,
1093+ [AC_MSG_ERROR([Shape extension not found, check your development headers])])
1094+
1095+ # X SYNC check
1096+ gtk_save_CFLAGS="$CFLAGS"
1097+ CFLAGS="$CFLAGS $x_cflags"
1098+
1099+ AC_CHECK_FUNC(XSyncQueryExtension,
1100+ [AC_CHECK_HEADER(X11/extensions/sync.h,
1101+ AC_DEFINE(HAVE_XSYNC, 1, [Have the SYNC extension library]),
1102+ :, [#include <X11/Xlib.h>])])
1103+
1104+ CFLAGS="$gtk_save_CFLAGS"
1105+
1106+ # Xshm checks
1107+
1108+ if test "x$enable_shm" = "xyes"; then
1109+ # Check for the XShm extension, normally in Xext
1110+ AC_CHECK_FUNC(XShmAttach,
1111+ :,
1112+ # On AIX, it is in XextSam instead
1113+ [AC_CHECK_LIB(XextSam, XShmAttach,
1114+ [GTK_ADD_LIB(x_extra_libs,XextSam)])])
1115+ fi
1116+
1117+ if test "x$enable_shm" = "xyes"; then
1118+ # Check for shared memory
1119+ AC_CHECK_HEADER(sys/ipc.h,
1120+ AC_DEFINE(HAVE_IPC_H, 1,
1121+ [Define to 1 if ipc.h is available]),
1122+ no_sys_ipc=yes)
1123+ AC_CHECK_HEADER(sys/shm.h,
1124+ AC_DEFINE(HAVE_SHM_H, 1,
1125+ [Define to 1 if shm.h is available]),
1126+ no_sys_shm=yes)
1127+
1128+ # Check for the X shared memory extension header file
1129+ have_xshm=no
1130+ AC_MSG_CHECKING(X11/extensions/XShm.h)
1131+ if test "x$no_xext_lib" = "xyes"; then
1132+ :
1133+ else
1134+ gtk_save_CFLAGS="$CFLAGS"
1135+ CFLAGS="$CFLAGS $x_cflags"
1136+ AC_TRY_COMPILE([
1137+#include <stdlib.h>
1138+#include <sys/types.h>
1139+#include <sys/ipc.h>
1140+#include <sys/shm.h>
1141+#include <X11/Xlib.h>
1142+#include <X11/Xutil.h>
1143+#include <X11/extensions/XShm.h>
1144+], [XShmSegmentInfo *x_shm_info;], have_xshm=yes)
1145+ CFLAGS="$gtk_save_CFLAGS"
1146+ fi
1147+ AC_MSG_RESULT($have_xshm)
1148+ if test $have_xshm = yes ; then
1149+ AC_DEFINE(HAVE_XSHM_H, 1,
1150+ [Define to 1 if xshm.h is available])
1151+ fi
1152+ fi
1153+
1154+ if test "x$enable_xinerama" = "xyes"; then
1155+ # Check for Xinerama extension (Solaris impl or Xfree impl)
1156+ gtk_save_cppflags="$CPPFLAGS"
1157+ CPPFLAGS="$CPPFLAGS $x_cflags"
1158+
1159+ # Check for XFree
1160+ AC_MSG_CHECKING(for Xinerama support on XFree86)
1161+
1162+ have_xfree_xinerama=false
1163+ if $PKG_CONFIG --exists xinerama ; then
1164+ have_xfree_xinerama=true
1165+ X_PACKAGES="$X_PACKAGES xinerama"
1166+ else
1167+ AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
1168+ [AC_CHECK_HEADER(X11/extensions/Xinerama.h,
1169+ [GTK_ADD_LIB(x_extra_libs,Xinerama)
1170+ have_xfree_xinerama=true], :,
1171+ [#include <X11/Xlib.h>])])
1172+ fi
1173+
1174+ if $have_xfree_xinerama ; then
1175+ AC_DEFINE(HAVE_XFREE_XINERAMA, 1,
1176+ [Define to 1 if XFree Xinerama is available])
1177+ AC_DEFINE(HAVE_XINERAMA, 1,
1178+ [Define to 1 is Xinerama is available])
1179+ AC_MSG_RESULT(yes)
1180+ else
1181+ AC_MSG_RESULT(no)
1182+
1183+ case "$host" in
1184+ *-*-solaris*)
1185+ # Check for solaris
1186+ AC_MSG_CHECKING(for Xinerama support on Solaris)
1187+
1188+ have_solaris_xinerama=false
1189+ AC_CHECK_FUNC(XineramaGetInfo,
1190+ [AC_CHECK_HEADER(X11/extensions/xinerama.h,
1191+ [have_solaris_xinerama=true], :,
1192+ [#include <X11/Xlib.h>])])
1193+
1194+ if $have_solaris_xinerama ; then
1195+ AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1,
1196+ [Define to 1 if solaris xinerama is available])
1197+ AC_DEFINE(HAVE_XINERAMA, 1,
1198+ [Define to 1 if xinerama is available])
1199+ AC_MSG_RESULT(yes)
1200+ else
1201+ AC_MSG_RESULT(no)
1202+ fi
1203+ ;;
1204+ *)
1205+ ;;
1206+ esac
1207+ fi
1208+ fi
1209+
1210+ # set up things for XInput
1211+
1212+ if test "x$with_xinput" = "xxfree" || test "x$with_xinput" = "xyes"; then
1213+ AC_DEFINE(XINPUT_XFREE, 1,
1214+ [Define to 1 if XFree XInput should be used])
1215+
1216+ if $PKG_CONFIG --exists xi ; then
1217+ X_PACKAGES="$X_PACKAGES xi"
1218+ else
1219+ GTK_ADD_LIB(x_extra_libs, Xi)
1220+ fi
1221+ else
1222+ AC_DEFINE(XINPUT_NONE, 1,
1223+ [Define to 1 if no XInput should be used])
1224+ fi
1225+
1226+ AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree || test x$with_xinput = xyes)
1227+
1228+ # Check for the RANDR extension
1229+ if $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
1230+ AC_DEFINE(HAVE_RANDR, 1, [Have the Xrandr extension library])
1231+
1232+ X_PACKAGES="$X_PACKAGES xrandr"
1233+ fi
1234+
1235+ # Checks for Xcursor library
1236+
1237+ if $PKG_CONFIG --exists xcursor ; then
1238+ AC_DEFINE(HAVE_XCURSOR, 1, [Have the Xcursor library])
1239+
1240+ X_PACKAGES="$X_PACKAGES xcursor"
1241+ fi
1242+
1243+ # Checks for XFixes extension
1244+
1245+ if $PKG_CONFIG --exists xfixes ; then
1246+ AC_DEFINE(HAVE_XFIXES, 1, [Have the XFIXES X extension])
1247+
1248+ X_PACKAGES="$X_PACKAGES xfixes"
1249+ GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xfixes"
1250+ fi
1251+
1252+ # Checks for Xcomposite extension
1253+
1254+ if $PKG_CONFIG --exists xcomposite ; then
1255+ AC_DEFINE(HAVE_XCOMPOSITE, 1, [Have the XCOMPOSITE X extension])
1256+
1257+ X_PACKAGES="$X_PACKAGES xcomposite"
1258+ GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xcomposite"
1259+ fi
1260+
1261+ # Checks for Xdamage extension
1262+
1263+ if $PKG_CONFIG --exists xdamage ; then
1264+ AC_DEFINE(HAVE_XDAMAGE, 1, [Have the XDAMAGE X extension])
1265+
1266+ X_PACKAGES="$X_PACKAGES xdamage"
1267+ GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xdamage"
1268+ fi
1269+
1270+ if $have_base_x_pc ; then
1271+ GDK_EXTRA_LIBS="$x_extra_libs"
1272+ else
1273+ GDK_EXTRA_LIBS="$X_LIBS $x_extra_libs -lXext -lX11 $GDK_EXTRA_LIBS"
1274+ fi
1275+
1276+ CPPFLAGS="$gtk_save_cppflags"
1277+ LIBS="$gtk_save_libs"
1278+
1279+ AM_CONDITIONAL(USE_X11, true)
1280+else
1281+ XPACKAGES=
1282+
1283+ AM_CONDITIONAL(XINPUT_XFREE, false)
1284+ AM_CONDITIONAL(USE_X11, false)
1285+ AM_CONDITIONAL(HAVE_X11R6, false)
1286+fi
1287+
1288+if test "x$gdktarget" = "xwin32"; then
1289+ GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid"
1290+ AM_CONDITIONAL(USE_WIN32, true)
1291+else
1292+ AM_CONDITIONAL(USE_WIN32, false)
1293+fi
1294+
1295+AC_ARG_ENABLE(quartz-relocation,
1296+ [AS_HELP_STRING([--enable-quartz-relocation],
1297+ [enable bundle-based relocation functions])],
1298+ [quartz_relocation=yes])
1299+
1300+if test "x$gdktarget" = "xquartz"; then
1301+ GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
1302+ AM_CONDITIONAL(USE_QUARTZ, true)
1303+ if test "x$quartz_relocation" = xyes; then
1304+ AC_DEFINE([QUARTZ_RELOCATION], [1], [Use NSBundle functions to determine load paths for libraries, translations, etc.])
1305+ fi
1306+
1307+else
1308+ AM_CONDITIONAL(USE_QUARTZ, false)
1309+fi
1310+
1311+if test "x$gdktarget" = "xdirectfb"; then
1312+ DIRECTFB_REQUIRED_VERSION=1.0.0
1313+ AC_MSG_CHECKING(for DirectFB)
1314+
1315+ PKG_CHECK_MODULES(DIRECTFB, [directfb >= $DIRECTFB_REQUIRED_VERSION])
1316+ AM_CONDITIONAL(USE_DIRECTFB, true)
1317+else
1318+ AM_CONDITIONAL(USE_DIRECTFB, false)
1319+fi
1320+
1321+
1322+# Check for Pango flags
1323+
1324+if test "x$gdktarget" = "xwin32"; then
1325+ PANGO_PACKAGES="pangowin32 pangocairo"
1326+else
1327+ PANGO_PACKAGES="pango pangocairo"
1328+fi
1329+
1330+AC_MSG_CHECKING(Pango flags)
1331+if $PKG_CONFIG --exists $PANGO_PACKAGES ; then
1332+ PANGO_CFLAGS=`$PKG_CONFIG --cflags $PANGO_PACKAGES`
1333+ PANGO_LIBS=`$PKG_CONFIG --libs $PANGO_PACKAGES`
1334+
1335+ AC_MSG_RESULT($PANGO_CFLAGS $PANGO_LIBS)
1336+else
1337+ AC_MSG_ERROR([
1338+*** Pango not found. Pango built with Cairo support is required
1339+*** to build GTK+. See http://www.pango.org for Pango information.
1340+])
1341+fi
1342+
1343+CFLAGS="$CFLAGS $PANGO_CFLAGS"
1344+
1345+if $PKG_CONFIG --uninstalled $PANGO_PACKAGES; then
1346+ :
1347+else
1348+ gtk_save_LIBS="$LIBS"
1349+ LIBS="$PANGO_LIBS $LIBS"
1350+ AC_TRY_LINK_FUNC(pango_context_new, :, AC_MSG_ERROR([
1351+*** Can't link to Pango. Pango is required to build
1352+*** GTK+. For more information see http://www.pango.org]))
1353+ LIBS="$gtk_save_LIBS"
1354+fi
1355+
1356+CFLAGS="$saved_cflags"
1357+LDFLAGS="$saved_ldflags"
1358+
1359+# Pull in gio-unix for GDesktopAppInfo usage, see at least gdkapplaunchcontext-x11.c
1360+if test "x$gdktarget" = "xx11"; then
1361+ GDK_PACKAGES="$PANGO_PACKAGES gio-unix-2.0 $X_PACKAGES gdk-pixbuf-2.0 cairo-$cairo_backend"
1362+else
1363+ GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 gdk-pixbuf-2.0 cairo-$cairo_backend"
1364+fi
1365+
1366+GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PACKAGES` $MATH_LIB"
1367+GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PACKAGES` $GDK_EXTRA_CFLAGS"
1368+#
1369+# If we aren't writing explicit dependencies, then don't put the extra libraries we need
1370+# into the pkg-config files
1371+#
1372+if test $enable_explicit_deps != yes ; then
1373+ GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0"
1374+ GDK_EXTRA_LIBS=
1375+fi
1376+
1377+AC_SUBST(GDK_PACKAGES)
1378+AC_SUBST(GDK_EXTRA_LIBS)
1379+AC_SUBST(GDK_EXTRA_CFLAGS)
1380+AC_SUBST(GDK_DEP_LIBS)
1381+AC_SUBST(GDK_DEP_CFLAGS)
1382+
1383+
1384+########################################
1385+# Check for Accessibility Toolkit flags
1386+########################################
1387+
1388+ATK_PACKAGES=atk
1389+AC_MSG_CHECKING(ATK flags)
1390+if $PKG_CONFIG --exists $ATK_PACKAGES ; then
1391+ ATK_CFLAGS=`$PKG_CONFIG --cflags $ATK_PACKAGES`
1392+ ATK_LIBS=`$PKG_CONFIG --libs $ATK_PACKAGES`
1393+
1394+ AC_MSG_RESULT($ATK_CFLAGS $ATK_LIBS)
1395+else
1396+ AC_MSG_ERROR([
1397+*** Accessibility Toolkit not found. Accessibility Toolkit is required
1398+*** to build GTK+.
1399+])
1400+fi
1401+
1402+if $PKG_CONFIG --uninstalled $ATK_PACKAGES; then
1403+ :
1404+else
1405+ gtk_save_LIBS="$LIBS"
1406+ LIBS="$ATK_LIBS $LIBS"
1407+ AC_TRY_LINK_FUNC(atk_object_get_type, : , AC_MSG_ERROR([
1408+ *** Cannot link to Accessibility Toolkit. Accessibility Toolkit is required
1409+ *** to build GTK+]))
1410+ LIBS="$gtk_save_LIBS"
1411+fi
1412+
1413+GTK_PACKAGES="atk cairo gdk-pixbuf-2.0 gio-2.0"
1414+if test "x$gdktarget" = "xx11"; then
1415+ GTK_PACKAGES="$GTK_PACKAGES pangoft2"
1416+fi
1417+GTK_EXTRA_LIBS=
1418+GTK_EXTRA_CFLAGS=
1419+GTK_DEP_LIBS="$GDK_EXTRA_LIBS $GTK_DEP_LIBS_FOR_X `$PKG_CONFIG --libs $PANGO_PACKAGES $GTK_PACKAGES_FOR_X $GTK_PACKAGES` $GTK_EXTRA_LIBS $MATH_LIB"
1420+GTK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PACKAGES $GTK_PACKAGES` $GDK_EXTRA_CFLAGS $GTK_EXTRA_CFLAGS"
1421+
1422+if test x"$os_win32" = xyes; then
1423+ GTK_EXTRA_CFLAGS="$msnative_struct"
1424+fi
1425+
1426+GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
1427+ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
1428+PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
1429+CAIRO_PREFIX="`pkg-config --variable=prefix cairo`"
1430+
1431+AC_SUBST(GTK_PACKAGES)
1432+AC_SUBST(GTK_EXTRA_LIBS)
1433+AC_SUBST(GTK_EXTRA_CFLAGS)
1434+AC_SUBST(GTK_DEP_LIBS)
1435+AC_SUBST(GTK_DEP_CFLAGS)
1436+
1437+AC_SUBST(GLIB_PREFIX)
1438+AC_SUBST(ATK_PREFIX)
1439+AC_SUBST(PANGO_PREFIX)
1440+AC_SUBST(CAIRO_PREFIX)
1441+
1442+AC_SUBST(GTK_DEBUG_FLAGS)
1443+AC_SUBST(GTK_XIM_FLAGS)
1444+
1445+GDK_PIXBUF_LIBS=`$PKG_CONFIG --libs gdk-pixbuf-2.0`
1446+AC_SUBST(GDK_PIXBUF_LIBS)
1447+
1448+########################
1449+# Checks needed for gail
1450+########################
1451+
1452+old_LIBS="$LIBS"
1453+dnl Checks for inet libraries:
1454+AC_SEARCH_LIBS(gethostent, nsl)
1455+AC_SEARCH_LIBS(setsockopt, socket)
1456+AC_SEARCH_LIBS(connect, inet)
1457+
1458+dnl check for the sockaddr_un.sun_len member
1459+AC_CHECK_MEMBER([struct sockaddr_un.sun_len],
1460+ [struct_sockaddr_un_sun_len=true],
1461+ [struct_sockaddr_un_suin_len=false],
1462+ [#include <sys/types.h>
1463+ #include <sys/un.h>]
1464+ )
1465+case $struct_sockaddr_un_sun_len in
1466+ true)
1467+ AC_DEFINE_UNQUOTED(HAVE_SOCKADDR_UN_SUN_LEN, 1,
1468+ [Have the sockaddr_un.sun_len member])
1469+ ;;
1470+ *)
1471+ ;;
1472+esac
1473+
1474+GAIL_INET_LIBS="$LIBS"
1475+AC_SUBST([GAIL_INET_LIBS])
1476+
1477+LIBS="$old_LIBS"
1478+
1479+################################################################
1480+# Printing system checks
1481+################################################################
1482+
1483+AC_ARG_ENABLE(cups,
1484+ [AC_HELP_STRING([--disable-cups]
1485+ [disable cups print backend])],,
1486+ [enable_cups=auto])
1487+
1488+if test "x$enable_cups" = "xno"; then
1489+ AM_CONDITIONAL(HAVE_CUPS, false)
1490+else
1491+ AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
1492+ if test "x$CUPS_CONFIG" = "xno"; then
1493+ if test "x$enable_cups" = "xauto"; then
1494+ AM_CONDITIONAL(HAVE_CUPS, false)
1495+ else
1496+ AC_MSG_ERROR([
1497+*** cups not found.
1498+])
1499+ fi
1500+ else
1501+ CUPS_CFLAGS=`$CUPS_CONFIG --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
1502+ CUPS_LIBS=`$CUPS_CONFIG --libs`
1503+
1504+ CUPS_API_VERSION=`$CUPS_CONFIG --api-version`
1505+ CUPS_API_MAJOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $1}'`
1506+ CUPS_API_MINOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $2}'`
1507+
1508+ if test $CUPS_API_MAJOR -gt 1 -o \
1509+ $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 2; then
1510+ AC_DEFINE(HAVE_CUPS_API_1_2, 1,
1511+ [Define to 1 if CUPS 1.2 API is available])
1512+ fi
1513+ if test $CUPS_API_MAJOR -gt 1 -o \
1514+ $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 6; then
1515+ AC_DEFINE(HAVE_CUPS_API_1_6, 1,
1516+ [Define to 1 if CUPS 1.6 API is available])
1517+
1518+ fi
1519+
1520+ AC_SUBST(CUPS_API_MAJOR)
1521+ AC_SUBST(CUPS_API_MINOR)
1522+ AC_SUBST(CUPS_CFLAGS)
1523+ AC_SUBST(CUPS_LIBS)
1524+
1525+ AC_CHECK_HEADER(cups/cups.h,,AC_MSG_ERROR([[*** Sorry, cups-config present but cups/cups.h missing.]]))
1526+
1527+ AM_CONDITIONAL(HAVE_CUPS, true)
1528+
1529+ gtk_save_cflags="$CFLAGS"
1530+ CFLAGS="$CUPS_CFLAGS"
1531+ AC_TRY_COMPILE([#include <cups/http.h>],
1532+ [http_t http; char *s = http.authstring;],
1533+ [AC_DEFINE(HAVE_HTTP_AUTHSTRING, [],
1534+ [Define if cups http_t authstring field is accessible])],)
1535+ CFLAGS="$gtk_save_cflags"
1536+
1537+ AC_SUBST(HAVE_HTTP_AUTHSTRING)
1538+
1539+ gtk_save_libs="$LIBS"
1540+ LIBS="$CUPS_LIBS"
1541+ AC_CHECK_FUNCS(httpGetAuthString)
1542+ LIBS="$gtk_save_libs"
1543+ fi
1544+fi
1545+
1546+# Checks to see if we should compile with PAPI backend for GTK+
1547+#
1548+
1549+AC_ARG_ENABLE(papi,
1550+ [AC_HELP_STRING([--disable-papi]
1551+ [disable papi print backend])],,
1552+ [enable_papi=auto])
1553+
1554+if test "x$enable_papi" = "xno"; then
1555+ AM_CONDITIONAL(HAVE_PAPI, false)
1556+else
1557+ AC_MSG_CHECKING(libpapi)
1558+ AC_CHECK_LIB(papi, papiServiceCreate, have_papi=yes, have_papi=no)
1559+ if test $have_papi = yes; then
1560+ AC_DEFINE([HAVE_PAPI], [], [Define to 1 if libpapi available])
1561+ fi
1562+ AM_CONDITIONAL(HAVE_PAPI, test $have_papi = yes)
1563+ if test "x$enable_papi" = "xyes" -a "x$have_papi" = "xno"; then
1564+ AC_MSG_ERROR([
1565+*** papi not found.
1566+])
1567+ fi
1568+fi
1569+
1570+AM_CONDITIONAL(HAVE_PAPI_CUPS, test "x$have_papi" = "xyes" -a "x$CUPS_CONFIG" != "xno")
1571+
1572+gtk_save_cppflags="$CPPFLAGS"
1573+CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS $GDK_DEP_CFLAGS"
1574+
1575+AC_CHECK_HEADER(cairo-pdf.h,,AC_MSG_ERROR([
1576+*** Can't find cairo-pdf.h. You must build Cairo with the pdf
1577+*** backend enabled.]))
1578+
1579+if test "$os_win32" != "yes"; then
1580+ AC_CHECK_HEADER(cairo-ps.h,,AC_MSG_ERROR([
1581+*** Can't find cairo-ps.h. You must build Cairo with the
1582+*** postscript backend enabled.]))
1583+
1584+ AC_CHECK_HEADER(cairo-svg.h,,AC_MSG_ERROR([
1585+*** Can't find cairo-svg.h. You must build Cairo with the
1586+*** svg backend enabled.]))
1587+fi
1588+
1589+CPPFLAGS="$gtk_save_cppflags"
1590+
1591+
1592+AC_ARG_ENABLE(test-print-backend,
1593+ [AC_HELP_STRING([--enable-test-print-backend],
1594+ [build test print backend])],,
1595+ [enable_test_print_backend=no])
1596+AM_CONDITIONAL(TEST_PRINT_BACKEND, test "x$enable_test_print_backend" != "xno")
1597+
1598+if test "$os_win32" = "yes"; then
1599+ AC_CHECK_TYPES([IPrintDialogCallback],[],[],[[#include <windows.h>]])
1600+fi
1601+
1602+################################################################
1603+# Strip -export-dynamic from the link lines of various libraries
1604+################################################################
1605+
1606+#
1607+# pkg-config --libs gmodule includes the "export_dynamic" flag,
1608+# but this flag is only meaningful for executables. For libraries
1609+# the effect is undefined; what it causes on Linux is that the
1610+# export list from -export-symbols-regex is ignored and everything
1611+# is exported
1612+#
1613+# We are using gmodule-no-export now, but I'm leaving the stripping
1614+# code in place for now, since pango and atk still require gmodule.
1615+export SED
1616+export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
1617+if test -n "$export_dynamic"; then
1618+ GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
1619+ GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
1620+fi
1621+
1622+##################################################
1623+# GObject introspection
1624+##################################################
1625+
1626+GOBJECT_INTROSPECTION_CHECK([0.9.3])
1627+
1628+##################################################
1629+# Checks for gtk-doc and docbook-tools
1630+##################################################
1631+
1632+GTK_DOC_CHECK([1.11])
1633+
1634+AC_CHECK_PROG(DB2HTML, db2html, true, false)
1635+AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
1636+
1637+AC_ARG_ENABLE(man,
1638+ [AC_HELP_STRING([--enable-man],
1639+ [regenerate man pages from Docbook [default=no]])],enable_man=yes,
1640+ enable_man=no)
1641+
1642+if test "${enable_man}" != no; then
1643+ dnl
1644+ dnl Check for xsltproc
1645+ dnl
1646+ AC_PATH_PROG([XSLTPROC], [xsltproc])
1647+ if test -z "$XSLTPROC"; then
1648+ enable_man=no
1649+ fi
1650+
1651+ dnl check for DocBook DTD and stylesheets in the local catalog.
1652+ JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN],
1653+ [DocBook XML DTD V4.1.2],,enable_man=no)
1654+ JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
1655+ [DocBook XSL Stylesheets],,enable_man=no)
1656+fi
1657+
1658+AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
1659+
1660+
1661+##################################################
1662+# Output commands
1663+##################################################
1664+
1665+AC_CONFIG_COMMANDS([gdk/gdkconfig.h], [
1666+ outfile=gdkconfig.h-tmp
1667+ cat > $outfile <<\_______EOF
1668+/* gdkconfig.h
1669+ *
1670+ * This is a generated file. Please modify `configure.in'
1671+ */
1672+
1673+#ifndef GDKCONFIG_H
1674+#define GDKCONFIG_H
1675+
1676+#ifdef __cplusplus
1677+extern "C" {
1678+#endif /* __cplusplus */
1679+
1680+#ifndef GSEAL
1681+/* introduce GSEAL() here for all of Gdk and Gtk+ without the need to modify GLib */
1682+# ifdef GSEAL_ENABLE
1683+# define GSEAL(ident) _g_sealed__ ## ident
1684+# else
1685+# define GSEAL(ident) ident
1686+# endif
1687+#endif /* !GSEAL */
1688+
1689+_______EOF
1690+
1691+ cat >>$outfile <<_______EOF
1692+$gdk_windowing
1693+$gdk_wc
1694+_______EOF
1695+
1696+ cat >>$outfile <<_______EOF
1697+
1698+#ifdef __cplusplus
1699+}
1700+#endif /* __cplusplus */
1701+
1702+#endif /* GDKCONFIG_H */
1703+_______EOF
1704+
1705+
1706+ if cmp -s $outfile gdk/gdkconfig.h; then
1707+ AC_MSG_NOTICE([gdk/gdkconfig.h is unchanged])
1708+ rm -f $outfile
1709+ else
1710+ mv $outfile gdk/gdkconfig.h
1711+ fi
1712+],[
1713+if test "x$gdktarget" = "xx11" ; then
1714+ gdk_windowing='
1715+#define GDK_WINDOWING_X11'
1716+elif test "x$gdktarget" = "xwin32" ; then
1717+ gdk_windowing='
1718+#define GDK_NATIVE_WINDOW_POINTER
1719+
1720+#define GDK_WINDOWING_WIN32'
1721+elif test "x$gdktarget" = "xquartz" ; then
1722+ gdk_windowing='
1723+#define GDK_WINDOWING_QUARTZ'
1724+elif test "x$gdktarget" = "xdirectfb" ; then
1725+ gdk_windowing='
1726+#define GDK_WINDOWING_DIRECTFB'
1727+fi
1728+
1729+if test x$gdk_wchar_h = xyes; then
1730+ gdk_wc='
1731+#define GDK_HAVE_WCHAR_H 1'
1732+fi
1733+if test x$gdk_wctype_h = xyes; then
1734+ gdk_wc="\$gdk_wc
1735+#define GDK_HAVE_WCTYPE_H 1"
1736+fi
1737+if test x$gdk_working_wctype = xno; then
1738+ gdk_wc="\$gdk_wc
1739+#define GDK_HAVE_BROKEN_WCTYPE 1"
1740+fi
1741+
1742+
1743+])
1744+
1745+AC_CONFIG_FILES([
1746+config.h.win32
1747+gtk-zip.sh
1748+Makefile
1749+gdk-2.0.pc
1750+gtk+-2.0.pc
1751+gtk+-unix-print-2.0.pc
1752+gail.pc
1753+gdk-2.0-uninstalled.pc
1754+gtk+-2.0-uninstalled.pc
1755+gail-uninstalled.pc
1756+m4macros/Makefile
1757+po/Makefile.in
1758+po-properties/Makefile.in
1759+demos/Makefile
1760+demos/gtk-demo/Makefile
1761+demos/gtk-demo/geninclude.pl
1762+tests/Makefile
1763+docs/Makefile
1764+docs/reference/Makefile
1765+docs/reference/gdk/Makefile
1766+docs/reference/gdk/version.xml
1767+docs/reference/gtk/Makefile
1768+docs/reference/gtk/version.xml
1769+docs/reference/libgail-util/Makefile
1770+docs/faq/Makefile
1771+docs/tools/Makefile
1772+docs/tutorial/Makefile
1773+build/Makefile
1774+build/win32/Makefile
1775+build/win32/vs9/Makefile
1776+build/win32/vs10/Makefile
1777+gdk/Makefile
1778+gdk/x11/Makefile
1779+gdk/win32/Makefile
1780+gdk/win32/rc/Makefile
1781+gdk/win32/rc/gdk.rc
1782+gdk/quartz/Makefile
1783+gdk/directfb/Makefile
1784+gdk/tests/Makefile
1785+gtk/Makefile
1786+gtk/makefile.msc
1787+gtk/gtkversion.h
1788+gtk/gtk-win32.rc
1789+gtk/theme-bits/Makefile
1790+gtk/tests/Makefile
1791+modules/Makefile
1792+modules/other/Makefile
1793+modules/other/gail/Makefile
1794+modules/other/gail/libgail-util/Makefile
1795+modules/other/gail/tests/Makefile
1796+modules/engines/Makefile
1797+modules/engines/pixbuf/Makefile
1798+modules/engines/ms-windows/Makefile
1799+modules/engines/ms-windows/Theme/Makefile
1800+modules/engines/ms-windows/Theme/gtk-2.0/Makefile
1801+modules/input/Makefile
1802+modules/printbackends/Makefile
1803+modules/printbackends/cups/Makefile
1804+modules/printbackends/lpr/Makefile
1805+modules/printbackends/file/Makefile
1806+modules/printbackends/papi/Makefile
1807+modules/printbackends/test/Makefile
1808+perf/Makefile
1809+])
1810+
1811+AC_OUTPUT
1812+
1813+echo "configuration:
1814+ target: $gdktarget"
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/run-iconcache.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/run-iconcache.patch
new file mode 100644
index 0000000..597ba32
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+-2.24.22/run-iconcache.patch
@@ -0,0 +1,23 @@
1Upstream-Status: Inappropriate [configuration]
2
3Index: gtk+-2.21.2/gtk/Makefile.am
4===================================================================
5--- gtk+-2.21.2.orig/gtk/Makefile.am 2010-06-22 17:21:41.000000000 +0800
6+++ gtk+-2.21.2/gtk/Makefile.am 2010-06-22 17:28:12.000000000 +0800
7@@ -1376,11 +1376,11 @@
8 ./gtk-update-icon-cache
9 endif
10
11-gtkbuiltincache.h: @REBUILD@ stamp-icons
12- $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT) $(GTK_UPDATE_ICON_CACHE_MANIFEST)
13- $(gtk_update_icon_cache_program) --force --ignore-theme-index \
14- --source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \
15- mv gtkbuiltincache.h.tmp gtkbuiltincache.h
16+#gtkbuiltincache.h: @REBUILD@ stamp-icons
17+# $(MAKE) $(AM_MAKEFLAGS) gtk-update-icon-cache$(EXEEXT) $(GTK_UPDATE_ICON_CACHE_MANIFEST)
18+# $(gtk_update_icon_cache_program) --force --ignore-theme-index \
19+# --source builtin_icons stock-icons > gtkbuiltincache.h.tmp && \
20+# mv gtkbuiltincache.h.tmp gtkbuiltincache.h
21
22 EXTRA_DIST += \
23 $(STOCK_ICONS) \
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/toggle-font.diff b/meta/recipes-gnome/gtk+/gtk+-2.24.22/toggle-font.diff
new file mode 100644
index 0000000..340d120
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+-2.24.22/toggle-font.diff
@@ -0,0 +1,102 @@
1Upstream-Status: Pending
2
3Index: gtk/gtkcellrenderertoggle.c
4===================================================================
5--- gtk/gtkcellrenderertoggle.c.orig 2010-06-22 18:11:33.000000000 +0800
6+++ gtk/gtkcellrenderertoggle.c 2010-06-22 18:11:43.000000000 +0800
7@@ -71,6 +71,8 @@
8 PROP_INDICATOR_SIZE
9 };
10
11+/* This is a hard-coded default which promptly gets overridden by a size
12+ calculated from the font size. */
13 #define TOGGLE_WIDTH 13
14
15 static guint toggle_cell_signals[LAST_SIGNAL] = { 0 };
16@@ -80,8 +82,9 @@
17 typedef struct _GtkCellRendererTogglePrivate GtkCellRendererTogglePrivate;
18 struct _GtkCellRendererTogglePrivate
19 {
20- gint indicator_size;
21-
22+ gint indicator_size; /* This is the real size */
23+ gint override_size; /* This is the size set from the indicator-size property */
24+ GtkWidget *cached_widget;
25 guint inconsistent : 1;
26 };
27
28@@ -104,6 +107,7 @@
29 GTK_CELL_RENDERER (celltoggle)->ypad = 2;
30
31 priv->indicator_size = TOGGLE_WIDTH;
32+ priv->override_size = 0;
33 priv->inconsistent = FALSE;
34 }
35
36@@ -210,7 +214,7 @@
37 g_value_set_boolean (value, celltoggle->radio);
38 break;
39 case PROP_INDICATOR_SIZE:
40- g_value_set_int (value, priv->indicator_size);
41+ g_value_set_int (value, priv->override_size ? priv->override_size : priv->indicator_size);
42 break;
43 default:
44 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
45@@ -245,7 +249,7 @@
46 celltoggle->radio = g_value_get_boolean (value);
47 break;
48 case PROP_INDICATOR_SIZE:
49- priv->indicator_size = g_value_get_int (value);
50+ priv->override_size = g_value_get_int (value);
51 break;
52 default:
53 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
54@@ -273,6 +277,27 @@
55 }
56
57 static void
58+on_widget_style_set (GtkWidget *widget, GtkStyle *previous, gpointer user_data)
59+{
60+ GtkCellRendererTogglePrivate *priv = user_data;
61+ PangoContext *context;
62+ PangoFontMetrics *metrics;
63+ int height;
64+
65+ context = gtk_widget_get_pango_context (widget);
66+ metrics = pango_context_get_metrics (context,
67+ widget->style->font_desc,
68+ pango_context_get_language (context));
69+
70+ height = pango_font_metrics_get_ascent (metrics) +
71+ pango_font_metrics_get_descent (metrics);
72+
73+ pango_font_metrics_unref (metrics);
74+
75+ priv->indicator_size = PANGO_PIXELS (height * 0.85);
76+}
77+
78+static void
79 gtk_cell_renderer_toggle_get_size (GtkCellRenderer *cell,
80 GtkWidget *widget,
81 GdkRectangle *cell_area,
82@@ -287,6 +312,20 @@
83
84 priv = GTK_CELL_RENDERER_TOGGLE_GET_PRIVATE (cell);
85
86+ if (priv->override_size) {
87+ priv->indicator_size = priv->override_size;
88+ } else if (priv->cached_widget != widget) {
89+ if (priv->cached_widget) {
90+ g_object_remove_weak_pointer (widget, &priv->cached_widget);
91+ g_signal_handlers_disconnect_by_func (priv->cached_widget, on_widget_style_set, priv);
92+ }
93+ priv->cached_widget = widget;
94+ g_object_add_weak_pointer (widget, &priv->cached_widget);
95+ g_signal_connect (widget, "style-set", on_widget_style_set, priv);
96+
97+ on_widget_style_set (widget, NULL, priv);
98+ }
99+
100 calc_width = (gint) cell->xpad * 2 + priv->indicator_size;
101 calc_height = (gint) cell->ypad * 2 + priv->indicator_size;
102
diff --git a/meta/recipes-gnome/gtk+/gtk+-2.24.22/xsettings.patch b/meta/recipes-gnome/gtk+/gtk+-2.24.22/xsettings.patch
new file mode 100644
index 0000000..d0a970a
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+-2.24.22/xsettings.patch
@@ -0,0 +1,20 @@
1Upstream-Status: Pending
2
3Index: gtk+-2.21.2/gdk/x11/gdkevents-x11.c
4===================================================================
5--- gtk+-2.21.2.orig/gdk/x11/gdkevents-x11.c 2010-06-22 17:28:04.000000000 +0800
6+++ gtk+-2.21.2/gdk/x11/gdkevents-x11.c 2010-06-22 17:28:06.000000000 +0800
7@@ -3062,10 +3062,9 @@
8 {
9 GdkScreenX11 *screen = data;
10
11- if (xsettings_client_process_event (screen->xsettings_client, (XEvent *)xevent))
12- return GDK_FILTER_REMOVE;
13- else
14- return GDK_FILTER_CONTINUE;
15+ xsettings_client_process_event (screen->xsettings_client, (XEvent *)xevent);
16+
17+ return GDK_FILTER_CONTINUE;
18 }
19
20 static Bool
diff --git a/meta/recipes-gnome/gtk+/gtk+.inc b/meta/recipes-gnome/gtk+/gtk+.inc
new file mode 100644
index 0000000..73d624c
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+.inc
@@ -0,0 +1,90 @@
1SUMMARY = "Multi-platform toolkit for creating GUIs"
2DESCRIPTION = "GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete \
3set of widgets, GTK+ is suitable for projects ranging from small one-off projects to complete application suites."
4HOMEPAGE = "http://www.gtk.org"
5BUGTRACKER = "https://bugzilla.gnome.org/"
6
7LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
8
9LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7"
10
11SECTION = "libs"
12
13X11DEPENDS = "virtual/libx11 libxext libxcursor libxrandr libxdamage libxrender libxcomposite"
14DEPENDS = "glib-2.0 pango atk jpeg libpng gdk-pixbuf-native docbook-utils-native \
15 cairo gdk-pixbuf"
16
17PACKAGECONFIG ??= "${@base_contains('DISTRO_FEATURES', 'x11', 'x11', '', d)}"
18
19PACKAGECONFIG[x11] = "--with-x=yes --with-gdktarget=x11,--with-x=no,${X11DEPENDS}"
20
21inherit autotools gtk-doc pkgconfig update-alternatives gtk-immodules-cache
22
23PACKAGES += "libgail gtk-demo"
24
25FILES_${PN} = "${bindir}/gtk-update-icon-cache-2.0 \
26 ${bindir}/gtk-query-immodules-2.0 \
27 ${libdir}/lib*${SOLIBS} \
28 ${datadir}/themes ${sysconfdir} \
29 ${libdir}/gtk-2.0/${LIBV}/engines/libpixmap.so"
30
31FILES_${PN}-dev += " \
32 ${datadir}/gtk-2.0/include \
33 ${libdir}/gtk-2.0/include \
34 ${libdir}/gtk-2.0/modules/*.la \
35 ${libdir}/gtk-2.0/${LIBV}/loaders/*.la \
36 ${libdir}/gtk-2.0/${LIBV}/immodules/*.la \
37 ${libdir}/gtk-2.0/${LIBV}/printbackends/*.la \
38 ${libdir}/gtk-2.0/${LIBV}/engines/*.la \
39 ${bindir}/gtk-builder-convert"
40
41FILES_${PN}-dbg += " \
42 ${libdir}/gtk-2.0/modules/.debug/* \
43 ${libdir}/gtk-2.0/${LIBV}/loaders/.debug/* \
44 ${libdir}/gtk-2.0/${LIBV}/immodules/.debug/* \
45 ${libdir}/gtk-2.0/${LIBV}/engines/.debug/* \
46 ${libdir}/gtk-2.0/${LIBV}/printbackends/.debug/*"
47
48FILES_gtk-demo = " \
49 ${datadir}/gtk-2.0/demo/* \
50 ${bindir}/gtk-demo \
51 "
52
53FILES_libgail = " \
54 ${libdir}/gtk-2.0/modules/libgail.so \
55 ${libdir}/gtk-2.0/modules/libferret.so \
56 "
57
58GTKBASE_RRECOMMENDS ?= "liberation-fonts gdk-pixbuf-loader-png gdk-pixbuf-loader-jpeg gdk-pixbuf-loader-gif gdk-pixbuf-loader-xpm shared-mime-info"
59GTKGLIBC_RRECOMMENDS ?= "${GTKBASE_RRECOMMENDS} glibc-gconv-iso8859-1"
60
61RRECOMMENDS_${PN} = "${GTKBASE_RRECOMMENDS}"
62RRECOMMENDS_${PN}_libc-glibc = "${GTKGLIBC_RRECOMMENDS}"
63
64ALTERNATIVE_${PN} = "gtk-update-icon-cache"
65ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-2.0"
66
67do_install () {
68 autotools_do_install
69
70 install -d ${D}${sysconfdir}/gtk-2.0
71
72 mkdir -p ${D}${libdir}/gtk-2.0/include
73 install -m 0644 gdk/gdkconfig.h ${D}${libdir}/gtk-2.0/include/gdkconfig.h
74
75 install -m 0644 ${S}/gtk/gtkfilechooserprivate.h ${D}${includedir}/gtk-2.0/gtk/
76 install -m 0644 ${S}/gtk/gtkfilechooserutils.h ${D}${includedir}/gtk-2.0/gtk/
77 install -m 0644 ${S}/gtk/gtkfilesystemmodel.h ${D}${includedir}/gtk-2.0/gtk/
78
79 mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-2.0
80}
81
82SYSROOT_PREPROCESS_FUNCS += "gtk_sysroot_preprocess"
83
84gtk_sysroot_preprocess () {
85 if [ -e ${D}${bindir}/gtk-builder-convert ]; then
86 install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/
87 install -m 755 ${D}${bindir}/gtk-builder-convert ${SYSROOT_DESTDIR}${bindir_crossscripts}/
88 fi
89}
90
diff --git a/meta/recipes-gnome/gtk+/gtk+3.inc b/meta/recipes-gnome/gtk+/gtk+3.inc
new file mode 100644
index 0000000..e769ca5
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+3.inc
@@ -0,0 +1,106 @@
1SUMMARY = "Multi-platform toolkit for creating GUIs"
2DESCRIPTION = "GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete \
3set of widgets, GTK+ is suitable for projects ranging from small one-off projects to complete application suites."
4HOMEPAGE = "http://www.gtk.org"
5BUGTRACKER = "https://bugzilla.gnome.org/"
6SECTION = "libs"
7
8DEPENDS = "glib-2.0 cairo pango atk jpeg libpng gdk-pixbuf \
9 docbook-utils-native gdk-pixbuf-native"
10
11LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
12
13inherit autotools pkgconfig gtk-doc update-alternatives gtk-immodules-cache gsettings
14
15# This should be in autotools.bbclass, but until something elses uses it putting
16# it here avoids rebuilding everything.
17export PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native"
18
19do_configure_prepend() {
20 # Do this because the configure script is running ./libtool directly
21 rm -f libtool
22 ln -s ${TARGET_PREFIX}libtool libtool
23}
24
25# Forcibly disable the GTK+ 2 dependency as we don't want to natively build the
26# entire GTK+ stack, or need GTK+ 2 for gtk-update-icon-cache.
27EXTRA_OECONF += " \
28 --disable-gtk2-dependency \
29 --disable-glibtest \
30 --disable-xinerama \
31 --enable-modules \
32 --disable-cups \
33 --disable-introspection \
34"
35
36PACKAGECONFIG ??= "${@base_contains("DISTRO_FEATURES", "x11", "x11", "", d)} \
37 ${@base_contains("DISTRO_FEATURES", "wayland", "wayland", "", d)}"
38
39PACKAGECONFIG[x11] = "--enable-x11-backend,--disable-x11-backend,at-spi2-atk fontconfig libx11 libxext libxcursor libxi libxdamage libxrandr libxrender libxcomposite libxfixes"
40PACKAGECONFIG[wayland] = "--enable-wayland-backend,--disable-wayland-backend,wayland libxkbcommon"
41
42do_install_append() {
43 mv ${D}${bindir}/gtk-update-icon-cache ${D}${bindir}/gtk-update-icon-cache-3.0
44}
45
46PACKAGES =+ "${PN}-demo"
47LIBV = "3.0.0"
48
49FILES_${PN}-demo = "${bindir}/gtk3-demo \
50 ${bindir}/gtk3-demo-application \
51 ${bindir}/gtk3-widget-factory \
52 ${datadir}/gtk-3.0/demo"
53
54# The demo uses PNG files and mime type sniffing, so ensure that these
55# dependencies are present.
56RDEPENDS_${PN}-demo += "gdk-pixbuf-loader-png shared-mime-info"
57
58FILES_${PN} = "${bindir}/gtk-update-icon-cache-3.0 \
59 ${bindir}/gtk-query-immodules-3.0 \
60 ${bindir}/gtk-launch \
61 ${libdir}/lib*${SOLIBS} \
62 ${datadir}/themes ${sysconfdir} ${datadir}/glib-2.0/schemas/ \
63 ${libdir}/gtk-3.0/${LIBV}/engines/libpixmap.so \
64 ${libdir}/gtk-3.0/modules/*.so"
65
66FILES_${PN}-dev += " \
67 ${datadir}/gtk-3.0/gtkbuilder.rng \
68 ${datadir}/gtk-3.0/include \
69 ${libdir}/gtk-3.0/include \
70 ${libdir}/gtk-3.0/${LIBV}/loaders/*.la \
71 ${libdir}/gtk-3.0/${LIBV}/immodules/*.la \
72 ${libdir}/gtk-3.0/3.0.0/printbackends/*.la \
73 ${libdir}/gtk-3.0/${LIBV}/engines/*.la \
74 ${libdir}/gtk-3.0/modules/*.la \
75 ${bindir}/gtk-builder-convert"
76
77FILES_${PN}-dbg += " \
78 ${libdir}/gtk-3.0/${LIBV}/loaders/.debug \
79 ${libdir}/gtk-3.0/${LIBV}/immodules/.debug \
80 ${libdir}/gtk-3.0/${LIBV}/engines/.debug \
81 ${libdir}/gtk-3.0/${LIBV}/printbackends/.debug \
82 ${libdir}/gtk-3.0/modules/.debug"
83
84
85PACKAGES_DYNAMIC += "^gtk3-immodule-.* ^gtk3-printbackend-.*"
86
87ALTERNATIVE_${PN} = "gtk-update-icon-cache"
88ALTERNATIVE_TARGET[gtk-update-icon-cache] = "${bindir}/gtk-update-icon-cache-3.0"
89
90python populate_packages_prepend () {
91 import os.path
92
93 gtk_libdir = d.expand('${libdir}/gtk-3.0/${LIBV}')
94 immodules_root = os.path.join(gtk_libdir, 'immodules')
95 printmodules_root = os.path.join(gtk_libdir, 'printbackends');
96
97 immodules = do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk3-immodule-%s', 'GTK input module for %s')
98 if immodules:
99 d.setVar("GTKIMMODULES_PACKAGES", " ".join(immodules))
100
101 do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk3-printbackend-%s', 'GTK printbackend module for %s')
102
103 if (d.getVar('DEBIAN_NAMES', 1)):
104 d.setVar('PKG_${PN}', 'libgtk-3.0')
105}
106
diff --git a/meta/recipes-gnome/gtk+/gtk+3/fix-build-when-wayland-backend-enabled.patch b/meta/recipes-gnome/gtk+/gtk+3/fix-build-when-wayland-backend-enabled.patch
new file mode 100644
index 0000000..b4b1a09
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+3/fix-build-when-wayland-backend-enabled.patch
@@ -0,0 +1,43 @@
1Fix build when wayland backend enabled
2
3Upstream-Status: Submitted
4https://bugzilla.gnome.org/show_bug.cgi?id=710584
5
6Author: Emilio Pozuelo Monfort
7
8--- gtk+-3.10.7/gtk/gtkapplication.c
9+++ gtk+-3.10.7/gtk/gtkapplication.c
10@@ -144,7 +144,6 @@
11
12 gboolean register_session;
13
14-#ifdef GDK_WINDOWING_X11
15 guint next_id;
16
17 GDBusConnection *session_bus;
18@@ -161,7 +160,6 @@
19 GDBusProxy *client_proxy;
20 gchar *app_id;
21 gchar *client_path;
22-#endif
23
24 #ifdef GDK_WINDOWING_QUARTZ
25 GMenu *combined;
26@@ -299,6 +297,8 @@
27 g_free (application->priv->client_path);
28 }
29
30+#endif
31+
32 const gchar *
33 gtk_application_get_app_menu_object_path (GtkApplication *application)
34 {
35@@ -311,8 +311,6 @@
36 return application->priv->menubar_path;
37 }
38
39-#endif
40-
41 #ifdef GDK_WINDOWING_QUARTZ
42
43 typedef struct {
diff --git a/meta/recipes-gnome/gtk+/gtk+3/fix-flags-for-native.patch b/meta/recipes-gnome/gtk+/gtk+3/fix-flags-for-native.patch
new file mode 100644
index 0000000..9ae1088
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+3/fix-flags-for-native.patch
@@ -0,0 +1,33 @@
1From 5e16904f94b5f5961f8f6e75716e6d7d228de119 Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Fri, 28 Mar 2014 03:10:12 +0000
4Subject: [PATCH] gtk/native/Makefile.am: unset target FLAGS for native build
5
6The target gtk+3 does a native build in its "native" directory, we need
7unset the target FLAGS for native build, otherwise, there might be build
8failures.
9
10Upstream-Status: Pending
11
12Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
13---
14 gtk/native/Makefile.am | 3 +++
15 1 file changed, 3 insertions(+)
16
17diff --git a/gtk/native/Makefile.am b/gtk/native/Makefile.am
18index 64899e9..a1c814a 100644
19--- a/gtk/native/Makefile.am
20+++ b/gtk/native/Makefile.am
21@@ -3,6 +3,9 @@ AM_CFLAGS = @CFLAGS_FOR_BUILD@
22 CPP = @CPP_FOR_BUILD@
23 AM_CPPFLAGS = @CPPFLAGS_FOR_BUILD@
24 AM_LDFLAGS = @LDFLAGS_FOR_BUILD@
25+CFLAGS =
26+CPPFLAGS =
27+LDFLAGS =
28
29 if CROSS_COMPILING
30 if !USE_EXTERNAL_ICON_CACHE
31--
321.8.3.4
33
diff --git a/meta/recipes-gnome/gtk+/gtk+3/hardcoded_libtool.patch b/meta/recipes-gnome/gtk+/gtk+3/hardcoded_libtool.patch
new file mode 100644
index 0000000..3b4beeb
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+3/hardcoded_libtool.patch
@@ -0,0 +1,35 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
4
5Index: gtk+-3.8.2/configure.ac
6===================================================================
7--- gtk+-3.8.2.orig/configure.ac
8+++ gtk+-3.8.2/configure.ac
9@@ -531,7 +531,7 @@ AC_MSG_CHECKING([Whether to write depend
10 case $enable_explicit_deps in
11 auto)
12 export SED
13- deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
14+ deplibs_check_method=`(./$host_alias-libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
15 if test "x$deplibs_check_method" != xpass_all || test "x$enable_static" = xyes ; then
16 enable_explicit_deps=yes
17 else
18@@ -793,7 +793,7 @@ else
19 dnl Now we check to see if our libtool supports shared lib deps
20 dnl (in a rather ugly way even)
21 if $dynworks; then
22- module_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
23+ module_libtool_config="${CONFIG_SHELL-/bin/sh} ./$host_alias-libtool --config"
24 module_deplibs_check=`$module_libtool_config | \
25 grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
26 sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
27@@ -1528,7 +1528,7 @@ fi
28 # We are using gmodule-no-export now, but I'm leaving the stripping
29 # code in place for now, since pango and atk still require gmodule.
30 export SED
31-export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
32+export_dynamic=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
33 if test -n "$export_dynamic"; then
34 GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
35 GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
diff --git a/meta/recipes-gnome/gtk+/gtk+3_3.10.7.bb b/meta/recipes-gnome/gtk+/gtk+3_3.10.7.bb
new file mode 100644
index 0000000..d0174f6
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+3_3.10.7.bb
@@ -0,0 +1,19 @@
1require gtk+3.inc
2
3MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}"
4
5SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar.xz \
6 file://hardcoded_libtool.patch \
7 file://fix-build-when-wayland-backend-enabled.patch \
8 file://fix-flags-for-native.patch \
9 "
10
11SRC_URI[md5sum] = "18a81944a8506231529a76bf2b68372b"
12SRC_URI[sha256sum] = "b7e9de15385031cff43897e7e59f6692eaabf500f36eef80e6b9d6486ad49427"
13
14S = "${WORKDIR}/gtk+-${PV}"
15
16LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
17 file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
18 file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
19 file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
diff --git a/meta/recipes-gnome/gtk+/gtk+_2.24.22.bb b/meta/recipes-gnome/gtk+/gtk+_2.24.22.bb
new file mode 100644
index 0000000..98c65a5
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+_2.24.22.bb
@@ -0,0 +1,50 @@
1require gtk+.inc
2
3LIC_FILES_CHKSUM = "file://COPYING;md5=3bf50002aefd002f49e7bb854063f7e7 \
4 file://gtk/gtk.h;endline=27;md5=c59e0b4490dd135a5726ebf851f9b17f \
5 file://gdk/gdk.h;endline=27;md5=07db285ec208fb3e0bf7d861b0614202 \
6 file://tests/testgtk.c;endline=27;md5=262db5db5f776f9863e56df31423e24c"
7SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-${PV}.tar.xz \
8 file://xsettings.patch \
9 file://run-iconcache.patch \
10 file://configure-nm.patch \
11 file://hardcoded_libtool.patch \
12 file://cellrenderer-cairo.patch;striplevel=0 \
13 file://toggle-font.diff;striplevel=0 \
14 file://0001-bgo-584832-Duplicate-the-exec-string-returned-by-gtk.patch \
15 file://doc-fixes.patch \
16 file://0001-GtkButton-do-not-prelight-in-touchscreen-mode.patch \
17 "
18
19# TO MERGE
20# file://entry-cairo.patch;striplevel=0
21# file://filesystem-volumes.patch
22# file://filechooser-props.patch
23# file://filechooser-default.patch
24# file://filechooser-sizefix.patch
25# temporary
26# file://gtklabel-resize-patch
27# file://menu-deactivate.patch
28# file://combo-arrow-size.patch;striplevel=0
29# file://configurefix.patch
30
31SRC_URI[md5sum] = "5fbbfb7637bbd571a572a2dae0e736d2"
32SRC_URI[sha256sum] = "b114b6e9fb389bf3aa8a6d09576538f58dce740779653084046852fb4140ae7f"
33
34EXTRA_OECONF = "--enable-xkb --disable-glibtest --disable-cups --disable-xinerama"
35
36LIBV = "2.10.0"
37
38PACKAGES_DYNAMIC += "^gtk-immodule-.* ^gtk-printbackend-.*"
39
40python populate_packages_prepend () {
41 gtk_libdir = d.expand('${libdir}/gtk-2.0/${LIBV}')
42 immodules_root = os.path.join(gtk_libdir, 'immodules')
43 printmodules_root = os.path.join(gtk_libdir, 'printbackends');
44
45 d.setVar('GTKIMMODULES_PACKAGES', ' '.join(do_split_packages(d, immodules_root, '^im-(.*)\.so$', 'gtk-immodule-%s', 'GTK input module for %s')))
46 do_split_packages(d, printmodules_root, '^libprintbackend-(.*)\.so$', 'gtk-printbackend-%s', 'GTK printbackend module for %s')
47
48 if (d.getVar('DEBIAN_NAMES', True)):
49 d.setVar('PKG_${PN}', '${MLPREFIX}libgtk-2.0')
50}
diff --git a/meta/recipes-gnome/gtk+/gtk-update-icon-cache-native_3.4.4.bb b/meta/recipes-gnome/gtk+/gtk-update-icon-cache-native_3.4.4.bb
new file mode 100644
index 0000000..73b7644
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk-update-icon-cache-native_3.4.4.bb
@@ -0,0 +1,47 @@
1SUMMARY = "gtk-update-icon-cache built natively"
2DESCRIPTION = "Just gtk-update-icon-cache built from GTK+ natively, for on-host postinst script execution."
3SECTION = "libs"
4
5DEPENDS = "gdk-pixbuf-native"
6
7LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
8
9LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2 \
10 file://gtk/gtk.h;endline=25;md5=1d8dc0fccdbfa26287a271dce88af737 \
11 file://gdk/gdk.h;endline=25;md5=c920ce39dc88c6f06d3e7c50e08086f2 \
12 file://tests/testgtk.c;endline=25;md5=cb732daee1d82af7a2bf953cf3cf26f1"
13
14SRC_URI = "http://download.gnome.org/sources/gtk+/3.4/gtk+-${PV}.tar.xz"
15SRC_URI[md5sum] = "1b2cf29502a6394e8d4b30f7f5bb9131"
16SRC_URI[sha256sum] = "f154e460075034da4c0ce89c320025dcd459da2a1fdf32d92a09522eaca242c7"
17
18S = "${WORKDIR}/gtk+-${PV}"
19
20inherit pkgconfig native
21
22PKG_CONFIG_FOR_BUILD = "${STAGING_BINDIR_NATIVE}/pkg-config-native"
23
24do_configure() {
25 # Quite ugly but defines enough to compile the tool.
26 if ! test -f gtk/config.h; then
27 echo "#define GETTEXT_PACKAGE \"gtk30\"" >> gtk/config.h
28 echo "#define HAVE_UNISTD_H 1" >> gtk/config.h
29 echo "#define HAVE_FTW_H 1" >> gtk/config.h
30
31 fi
32}
33
34do_compile() {
35 ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} ${S}/gtk/updateiconcache.c \
36 $(${PKG_CONFIG_FOR_BUILD} --cflags --libs gdk-pixbuf-2.0) \
37 -o gtk-update-icon-cache
38}
39
40do_install() {
41 install -d ${D}${bindir}
42 install -m 0755 ${B}/gtk-update-icon-cache ${D}${bindir}
43
44 create_wrapper ${D}/${bindir}/gtk-update-icon-cache \
45 GDK_PIXBUF_MODULE_FILE=${STAGING_LIBDIR_NATIVE}/gdk-pixbuf-2.0/2.10.0/loaders.cache
46
47}