$OpenBSD: patch-configure_in,v 1.1 2001/12/14 02:00:53 naddy Exp $ --- configure.in.orig Sun Nov 18 17:13:28 2001 +++ configure.in Sun Dec 9 19:33:07 2001 @@ -166,6 +166,11 @@ AC_CHECK_LIB(tiff, main, GLIBS="$GLIBS - AC_CHECK_LIB(z, main, GLIBS="$GLIBS -lz") dnl Check if system supports the gdk_imlib library +AC_ARG_ENABLE(imlib, + [ --disable-imlib Do not use imlib], + [ac_cv_enable_imlib=$enableval], [ac_cv_enable_imlib=yes]) + +if test "$ac_cv_enable_imlib" = yes; then HAVE_LIBGDK_IMLIB="" AC_PATH_PROG(IMLIB_CONFIG,imlib-config,no) if test "$IMLIB_CONFIG" != "no"; then @@ -176,18 +181,27 @@ dnl Check if system supports the gdk_iml ,AC_MSG_WARN(*** imlib disabled (library not found) ***) ) fi +fi dnl Check if system supports the gdk_pixbuf library - HAVE_GDK_PIXBUF="" - AC_PATH_PROG(GNOME_CONFIG,gnome-config,no) - if test "$GNOME_CONFIG" != "no"; then - LIBS="$LIBS `$GNOME_CONFIG --libs gdk_pixbuf`" - CFLAGS="$CFLAGS `$GNOME_CONFIG --cflags gnomeui`" - AC_CHECK_LIB(gdk_pixbuf, gdk_pixbuf_new, +AC_ARG_ENABLE(gdk-pixbuf, + [ --disable-gdk-pixbuf Do not use gdk-pixbuf], + [ac_cv_enable_gdk_pixbuf=$enableval], [ac_cv_enable_gdk_pixbuf=yes]) + +if test "$ac_cv_enable_gdk_pixbuf" = yes; then + HAVE_GDK_PIXBUF="" + AC_PATH_PROG(gdkpixbufpath, gdk-pixbuf-config) + GDK_PIXBUF_CFLAGS=`$gdkpixbufpath --cflags 2>/dev/null` + GDK_PIXBUF_LIBS=`$gdkpixbufpath --libs 2>/dev/null` + if test "_$GDK_PIXBUF_CFLAGS" = _; then + AC_MSG_RESULT([not found, building without gdk-pixbuf.]) + else + AC_MSG_RESULT(found) AC_DEFINE(HAVE_GDK_PIXBUF,1) - ,AC_MSG_WARN(*** gdk_pixbuf disabled (library not found) ***) - ) - fi + LIBS="$LIBS $GDK_PIXBUF_LIBS" + CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS" + fi +fi localedir='${prefix}/share/locale' AC_SUBST(localedir)