summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2001-01-04 17:48:43 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-01-04 17:48:43 +0000
commitc7826b5f63930c960cdb53aa4935ee1f8f7f3b18 (patch)
treee62c661b717b8350d09f12113bdaead0a2f46483 /configure.in
parent7b8ec35897a3221780c73d47c08b82d7aa7f73dd (diff)
downloadgtk+-c7826b5f63930c960cdb53aa4935ee1f8f7f3b18.tar.gz
Adapt to uscore-ification of gtktextiterprivate
2001-01-03 Havoc Pennington <hp@redhat.com> * gtk/gtktextbtree.c: Adapt to uscore-ification of gtktextiterprivate * gtk/gtktextdisplay.c (gtk_text_layout_draw): remove use of private functions; remove inclusion of private headers. * gtk/gtktextlayout.c (gtk_text_layout_get_iter_at_line): Add this function, so we don't need private functions in gtktextdisplay.c * gtk/gtktextiterprivate.h: underscore-ification * gtk/gtkwidget.c: Clean up a bunch of docs that said "INTERNAL" to instead say "only useful to implement widgets" * gtk/gtkenums.h (GtkMovementStep): Rename GTK_MOVEMENT_CHARS, GTK_MOVEMENT_POSITIONS to GTK_MOVEMENT_LOGICAL_POSITIONS, GTK_MOVEMENT_VISUAL_POSITIONS. Resolves bug 40249. * gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_set_colormap): This function was completely broken * gtk/testtext.c (line_numbers_expose): use gtk_paint_layout * gtk/gtkvscale.c (gtk_vscale_draw_value): use gtk_paint_layout * gtk/gtkvruler.c (gtk_vruler_draw_ticks): use gtk_paint_layout * gtk/gtklabel.c (gtk_label_expose): use gtk_paint_layout * gtk/gtkhscale.c (gtk_hscale_draw_value): use gtk_paint_layout * gtk/gtkhruler.c (gtk_hruler_draw_ticks): use gtk_paint_layout * gtk/gtkcellrenderertext.c (gtk_cell_renderer_text_render): use gtk_paint_layout * gtk/gtkaccellabel.c (gtk_accel_label_expose_event): use gtk_paint_layout * gtk/gtkstyle.h: Add draw/paint expander to draw tree expanders. Progress on bug 40103. Add draw_layout to draw a PangoLayout. (struct _GtkStyleClass): Remove draw_cross, draw_oval, draw_ramp, which were not implemented. * gtk/gtktextbuffer.h (struct _GtkTextBufferClass): Add insert_pixbuf signal. Rename delete_text to delete_range since it also deletes pixbufs and child anchors. This almost closes bug 40245 (still need to deal with child anchors) * gtk/gtktextbuffer.c (gtk_text_buffer_class_init): Add insert_pixbuf, change signal names as appropriate, change types of signals taking marks/tags to have the specific type, not just G_TYPE_OBJECT * gtk/gtkmain.c (gtk_get_current_event_state): Add this function; closes bug 40051 * gtk/gtkoptionmenu.c (gtk_option_menu_set_history): clean up unnecessary remove_contents() call (gtk_option_menu_class_init): add a "changed" signal, closes bug 40039 (gtk_option_menu_update_contents): emit "changed" if the active menu item changes * gtk/gdk-pixbuf-loader.c (gdk_pixbuf_loader_frame_done): fix bad cast to GtkObject, reported by Jonas Borgstrom (gdk_pixbuf_loader_finalize): don't close the loader on finalize; we can't do stuff with side effects in finalize. Instead, spew a warning if the loader isn't closed. * gdk/x11/gdkdrawable-x11.c (gdk_drawable_impl_x11_finalize): free colormap in here, non-X ports probably need to sync to this change * gdk/x11/gdkdrawable-x11.c (gdk_x11_set_colormap): remove assertion that colormap != NULL, you can set the colormap to NULL if you like. * Makefile.am: remove gtk-config-2.0 * configure.in: Use pkg-config to locate GLib. Remove separated-out GMODULE_LIBS, GMODULE_CFLAGS; these were not used, and the gmodule libs/cflags were in GLIB_LIBS GLIB_CFLAGS anyhow. Use pkg-config to locate Pango. Output correct Pango libs to gdk-2.0.pc.in. Fix test for FREETYPE_CONFIG (typo fix). * Makefile.am (pkgconfig_DATA): install only target-specific pc files (install-data-local): symlink gtk+-2.0.pc and gdk-2.0.pc to the X11 pc files * gtk+-2.0.pc.in (Requires): require the GDK for the current target unref from here
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in122
1 files changed, 69 insertions, 53 deletions
diff --git a/configure.in b/configure.in
index ab6b123cc8..1ba38f09f5 100644
--- a/configure.in
+++ b/configure.in
@@ -7,10 +7,12 @@ AC_INIT(gdk/gdktypes.h)
# GLIB_CFLAGS: cflags for compiling libraries and example progs
# GLIB_LIBS: libraries for linking example programs
# GLIB_DEPLIBS: libraries for linking libraries against
-# glib_cflags: cflags to store in gtk-config
-# glib_libs: libs to store in gtk-config
-# glib_thread_cflags: cflags to store in gtk-config for gtk-config gthread
-# glib_thread_libs: libs to store in gtk-config for gtk-config gthread
+
+
+## We could have pkg-config uniquify the ldflags and cflags by calling
+## it once with both the GLib and Pango package names, but we don't,
+## someone should fix that.
+
# Save this value here, since automake will set cflags later
cflags_set=${CFLAGS+set}
@@ -280,45 +282,54 @@ AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
CFLAGS="$gtk_save_CFLAGS"
AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
+
+#
+# Find pkg-config
+#
+AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+if test x$PKG_CONFIG = xno ; then
+ AC_MSG_ERROR([*** pkg-config not found. See http://pkgconfig.sourceforge.net])
+fi
+
+if ! pkg-config --atleast-pkgconfig-version 0.5 ; then
+ AC_MSG_ERROR([*** pkg-config too old; version 0.5 or better required.])
+fi
+
if test x$with_glib = xyes ; then
AC_MSG_ERROR([
*** Directory must be specified for --with-glib])
fi
if test x$with_glib = x ; then
+
# Look for separately installed glib
- AM_PATH_GLIB_2_0(1.3.1,,
- AC_MSG_ERROR([
-*** GLIB 1.3.1 or better is required. The latest version of GLIB
-*** is always available from ftp://ftp.gtk.org/.]),
- gobject gmodule gthread)
-
- # we do not want to make all gtk progs to link to thread libraries.
- glib_cflags=`$GLIB_CONFIG_2_0 glib gobject gmodule --cflags`
- glib_thread_cflags="$GLIB_CFLAGS"
- glib_libs=`$GLIB_CONFIG_2_0 glib gobject gmodule --libs`
- glib_thread_libs="$GLIB_LIBS"
- GLIB_LIBS="$glib_libs"
- GLIB_DEPLIBS="$glib_libs"
+ GLIB_PACKAGES="gobject-2.0 gmodule-2.0 gthread-2.0"
+ GLIB_REQUIRED_VERSION=1.3.2
+
+ AC_MSG_CHECKING(GLib flags)
+ if $PKG_CONFIG --atleast-version $GLIB_REQUIRED_VERSION glib-2.0 ; then
+ GLIB_CFLAGS=`$PKG_CONFIG --cflags $GLIB_PACKAGES`
+ GLIB_LIBS=`$PKG_CONFIG --libs $GLIB_PACKAGES`
+ GLIB_DEPLIBS=$GLIB_LIBS
+
+ AC_MSG_RESULT($GLIB_CFLAGS $GLIB_LIBS)
+ else
+ AC_MSG_ERROR([
+*** GLIB $GLIB_REQUIRED_VERSION or newer is required. The latest version of GLIB
+*** is always available from ftp://ftp.gtk.org/.
+ ])
+ fi
+
else
# Use uninstalled glib (assume they got the version right)
- GLIB_CONFIG_2_0=$with_glib/glib-config-2.0
- if test -x $GLIB_CONFIG_2_0 ; then
+ if test -e glib-2.0.pc ; then
:
else
AC_MSG_ERROR([GLIB directory ($with_glib) not present or not configured])
fi
- # For use in gtk-config
- glib_cflags=`$GLIB_CONFIG_2_0 --cflags gmodule`
- glib_thread_cflags=`$GLIB_CONFIG_2_0 --cflags gmodule gthread`
- glib_libs=`$GLIB_CONFIG_2_0 --libs gmodule`
- glib_thread_libs=`$GLIB_CONFIG_2_0 --libs gmodule gthread`
-
- glib_release=`$GLIB_CONFIG_2_0 --version | sed 's%\\.[[0-9]]*$%%'`
-
# canonicalize relative paths
case $with_glib in
/*)
@@ -332,15 +343,11 @@ else
GLIB_CFLAGS="-I$glib_dir -I$glib_dir/gmodule"
GLIB_LIBS="$glib_dir/libglib-1.3.la $glib_dir/gmodule/libgmodule-1.3.la"
GLIB_DEPLIBS=
-
- AC_SUBST(GLIB_CFLAGS)
- AC_SUBST(GLIB_LIBS)
fi
-AC_SUBST(glib_cflags)
-AC_SUBST(glib_libs)
-AC_SUBST(glib_thread_cflags)
-AC_SUBST(glib_thread_libs)
+CFLAGS="$CFLAGS $GLIB_CFLAGS"
+AC_SUBST(GLIB_CFLAGS)
+AC_SUBST(GLIB_LIBS)
AC_SUBST(GLIB_DEPLIBS)
AC_CHECK_HEADERS(dirent.h, AC_DEFINE(HAVE_DIRENT_H))
@@ -410,7 +417,7 @@ if test "x$gdktarget" = "xx11"; then
FREETYPE_CFLAGS=
have_freetype=false
AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
- if test "x$FREE_CONFIG" != "xno" ; then
+ if test "x$FREETYPE_CONFIG" != "xno" ; then
FREETYPE_CFLAGS=`freetype-config --cflags`
FREETYPE_LIBS=`freetype-config --libs`
@@ -593,32 +600,46 @@ AC_SUBST(FREETYPE_LIBS)
AC_SUBST(FREETYPE_CFLAGS)
#
-# Check for Pango
+# Pick correct Pango packages to use
#
-AC_PATH_PROG(PANGO_CONFIG, pango-config, no)
-if test x$PANGO_CONFIG = xno ; then
- AC_MSG_ERROR([*** pango-config not found])
-fi
if test "x$gdktarget" = "xx11"; then
- PANGO_CFLAGS="`$PANGO_CONFIG --cflags pangox`"
- PANGO_LIBS="`$PANGO_CONFIG --libs pangox`"
if $have_xft = true ; then
- PANGO_LIBS="$PANGO_LIBS -lpangoxft"
+ PANGO_PACKAGES="pangox pangoxft"
+ else
+ PANGO_PACKAGES=pangox
fi
elif test "x$gdktarget" = "xlinux-fb"; then
- PANGO_CFLAGS="`$PANGO_CONFIG --cflags pangoft2`"
- PANGO_LIBS="`$PANGO_CONFIG --libs pangoft2`"
+ PANGO_PACKAGES=pangoft2
else
- PANGO_CFLAGS="`$PANGO_CONFIG --cflags pango`"
- PANGO_LIBS="`$PANGO_CONFIG --libs pango`"
+ PANGO_PACKAGES=pango
fi
+
+AC_SUBST(PANGO_PACKAGES)
+
+# Check for Pango flags
+
+AC_MSG_CHECKING(Pango flags)
+if $PKG_CONFIG --exists $PANGO_PACKAGES ; then
+ PANGO_CFLAGS=`$PKG_CONFIG --cflags $PANGO_PACKAGES`
+ PANGO_LIBS=`$PKG_CONFIG --libs $PANGO_PACKAGES`
+
+ AC_MSG_RESULT($PANGO_CFLAGS $PANGO_LIBS)
+else
+ AC_MSG_ERROR([
+*** Pango not found. Pango is required to build GTK+.
+*** See http://www.pango.org for Pango information.
+*** For the framebuffer target, you will need to build
+*** Pango with freetype support.
+])
+fi
+
CFLAGS="$CFLAGS $PANGO_CFLAGS"
AC_SUBST(PANGO_LIBS)
AC_SUBST(PANGO_CFLAGS)
AC_CHECK_LIB(pango, pango_context_new, :, AC_MSG_ERROR([
-*** Pango not found. Pango is required to build
+*** Can't link to Pango. Pango is required to build
*** GTK+. For more information see http://www.pango.org]), $PANGO_LIBS $x_ldflags $x_libs)
CFLAGS="$saved_cflags"
@@ -794,10 +815,6 @@ fi
if $dynworks; then
AC_DEFINE(USE_GMODULE)
- GMODULE_LIBS="`$GLIB_CONFIG_2_0 --libs gmodule`"
- GMODULE_FLAGS="`$GLIB_CONFIG_2_0 --cflags gmodule`"
- AC_SUBST(GMODULE_LIBS)
- AC_SUBST(GMODULE_FLAGS)
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
@@ -1086,7 +1103,6 @@ AC_OUTPUT([
gtk+.spec
docs/gtk-config.1
Makefile
-gtk-config-2.0
gdk-pixbuf-2.0.pc
gdk-2.0.pc
gtk+-2.0.pc