diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-05-20 18:25:34 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-05-20 18:25:34 +0000 |
commit | 6144752d201473e02d4001f95e9d500a2d6b601e (patch) | |
tree | 90894cc5713be340db9fd55406d008884377b969 /configure.in | |
parent | 673a746328fdab7cb004023c26634217ad8bd760 (diff) | |
download | gdk-pixbuf-6144752d201473e02d4001f95e9d500a2d6b601e.tar.gz |
Start checks for X from pangox/pangoxft CFLAGS to avoid duplicate
Sun May 20 13:59:20 2001 Owen Taylor <otaylor@redhat.com>
* configure.in: Start checks for X from pangox/pangoxft
CFLAGS to avoid duplicate libraries.
* gdk/Makefile.am (LDFLAGS): Remove extra -lm.
* configure.in (GDK_PIXBUF_PACKAGES): Fix GDK_PIXBUF_PACKAGES
to include gobject.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 108 |
1 files changed, 38 insertions, 70 deletions
diff --git a/configure.in b/configure.in index 82f62be04..2f4452760 100644 --- a/configure.in +++ b/configure.in @@ -619,7 +619,7 @@ fi AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes) -GDK_PIXBUF_PACKAGES=gmodule-2.0 +GDK_PIXBUF_PACKAGES="gmodule-2.0 gobject-2.0" GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB" GDK_PIXBUF_EXTRA_CFLAGS= GDK_PIXBUF_DEP_LIBS="`pkg-config --libs $GDK_PIXBUF_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS" @@ -640,48 +640,54 @@ GDK_EXTRA_LIBS=$GDK_WLIBS GDK_EXTRA_CFLAGS= if test "x$gdktarget" = "xx11"; then - # Find the X11 include and library directories - AC_PATH_X - AC_PATH_XTRA + # We start off with the libraries from Pango - if test "x$x_includes" = "x"; then - x_includes="/usr/include" + ## be sure we also have Pango built with xft support + if $PKG_CONFIG --exists pangoxft ; then + PANGO_PACKAGES="pangox pangoxft" + have_xft=true + AC_DEFINE(HAVE_XFT) + else + PANGO_PACKAGES="pangox" + have_xft=false fi + AM_CONDITIONAL(HAVE_XFT, $have_xft) - CFLAGS="$CFLAGS $X_CFLAGS" - LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS" - - if test "x$no_x" = "xyes"; then - AC_MSG_ERROR([ -*** X libraries or include files not found. Check 'config.log' for -*** more details.]) - fi + x_libs="`$PKG_CONFIG --libs $PANGO_PACKAGES`" + x_cflags="`$PKG_CONFIG --cflags $PANGO_PACKAGES`" + x_extra_libs= - # Checks for libraries. - # Check for the X11 library - AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", + # Sanity check for the X11 library + AC_CHECK_LIB(X11, XOpenDisplay, :, AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]), - $X_EXTRA_LIBS) + $x_libs) if test "x$enable_shm" = "xyes"; then # Check for the Xext library (needed for XShm extention) - AC_CHECK_LIB(Xext, XShmAttach, - x_libs="-lXext $x_libs", + AC_CHECK_LIB(Xext, XShmAttach, + if test -z "`echo $x_libs | grep "\-lXext" 2> /dev/null`"; then + x_extra_libs="-lXext" + fi, # On AIX, it is in XextSam instead, but we still need -lXext AC_CHECK_LIB(XextSam, XShmAttach, - x_libs="-lXextSam -lXext $x_libs", + if test -z "`echo $x_libs | grep "\-lXext" 2> /dev/null`"; then + x_extra_libs="-lXextSam -lXext" + else + x_extra_libs="-lXextSam" + fi no_xext_lib=yes, $x_libs), $x_libs) fi GDK_PIXBUF_XLIB_EXTRA_CFLAGS="$x_cflags" - GDK_PIXBUF_XLIB_EXTRA_LIBS="$x_ldflags $x_libs" + # Don't ever pull in the pangoxft libraries for gdk-pixbuf-x11 + GDK_PIXBUF_XLIB_EXTRA_LIBS="$x_extra_libs `$PKG_CONFIG --libs pangox`" # Check for shaped window extension AC_CHECK_LIB(Xext, XShapeCombineMask, - if test -z "`echo $x_libs | grep "\-lXext" 2> /dev/null`"; then - x_libs="-lXext $x_libs" + if test -z "`echo $x_extra_libs $x_libs | grep "\-lXext" 2> /dev/null`"; then + x_extra_libs="-lXext $x_extra_libs" fi AC_DEFINE(HAVE_SHAPE_EXT), , @@ -694,44 +700,6 @@ if test "x$gdktarget" = "xx11"; then , $x_libs) - # - # Checks for FreeType - # - FREETYPE_LIBS= - FREETYPE_CFLAGS= - have_freetype=false - AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no) - if test "x$FREETYPE_CONFIG" != "xno" ; then - FREETYPE_CFLAGS=`freetype-config --cflags` - FREETYPE_LIBS=`freetype-config --libs` - - AC_CHECK_LIB(freetype, FT_New_Face, have_freetype=true - ,:,$FREETYPE_LIBS) - fi - - # - # Checks for Xft/XRender - # - have_xft=false - if test $have_freetype = true ; then - AC_CHECK_LIB(Xrender, XRenderFindFormat, - AC_CHECK_LIB(Xft, XftFontOpen, have_xft=true, :, -lXrender -lXext $X_LIBS $FREETYPE_LIBS) - ,:,-lXext $X_LIBS) - - ## be sure we also have Pango built with xft support - if ! $PKG_CONFIG --exists pangoxft ; then - have_xft=false - AC_MSG_WARN([X render extension found, but Pango lacks Xft support]) - fi - - if $have_xft = 'true' ; then - X_LIBS="-lXft -lXrender -lXext $FREETYPE_LIBS $X_LIBS" - AC_DEFINE(HAVE_XFT) - fi - fi - - AM_CONDITIONAL(HAVE_XFT, $have_xft) - # Check for XIM support. AC_CHECK_LIB(X11, XUnregisterIMInstantiateCallback, @@ -783,10 +751,10 @@ if test "x$gdktarget" = "xx11"; then if test "x$with_xinput" = "xgxi" || test "x$with_xinput" = "xyes"; then AC_DEFINE(XINPUT_GXI) xinput_progs=gxid - x_libs="-lXi $x_libs" + x_extra_libs="-lXi $x_extra_libs" elif test "x$with_xinput" = "xxfree"; then AC_DEFINE(XINPUT_XFREE) - x_libs="-lXi $x_libs" + x_extra_libs="-lXi $x_extra_libs" else AC_DEFINE(XINPUT_NONE) fi @@ -815,8 +783,8 @@ if test "x$gdktarget" = "xx11"; then fi fi - GDK_EXTRA_CFLAGS="$GDK_EXTRA_CFLAGS $x_cflags" - GDK_EXTRA_LIBS="$x_ldflags $x_libs $GDK_EXTRA_LIBS" + GDK_EXTRA_CFLAGS= + GDK_EXTRA_LIBS="$x_extra_libs" # these are already defined above #gdktargetlib = "libgdk-x11-1.3.la" @@ -917,14 +885,14 @@ CFLAGS="$CFLAGS $PANGO_CFLAGS" AC_CHECK_LIB(pango, pango_context_new, :, AC_MSG_ERROR([ *** 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) +*** GTK+. For more information see http://www.pango.org]), $PANGO_LIBS) CFLAGS="$saved_cflags" LDFLAGS="$saved_ldflags" GDK_PACKAGES=$PANGO_PACKAGES -GDK_DEP_LIBS="`pkg-config --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS" -GDK_DEP_CFLAGS="`pkg-config --cflags $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS" +GDK_DEP_LIBS="$GDK_EXTRA_LIBS `pkg-config --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS" +GDK_DEP_CFLAGS="`pkg-config --cflags $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS" AC_SUBST(GDK_PACKAGES) AC_SUBST(GDK_EXTRA_LIBS) @@ -959,7 +927,7 @@ AC_CHECK_LIB(atk, atk_object_get_type, : , AC_MSG_ERROR([ GTK_PACKAGES=atk GTK_EXTRA_LIBS= GTK_EXTRA_CFLAGS= -GTK_DEP_LIBS="`pkg-config --libs $GTK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GTK_EXTRA_LIBS $GDK_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS" +GTK_DEP_LIBS="$GDK_EXTRA_LIBS `pkg-config --libs $GTK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GTK_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS" GTK_DEP_CFLAGS="`pkg-config --cflags $GTK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS $GTK_EXTRA_CFLAGS" AC_SUBST(GTK_PACKAGES) |