Re: AM_PATH_GLIB_2_0 macro broken



Eric Lemings <eric b lemings lmco com> writes:
> Anyone planning to fix the AM_PATH_GLIB_2_0 macro?
> 

Yeah, it's probably on my TODO list ;-) Owen and I were talking about
how it should work in the brave new pkg-config world. Also Tim had
some changes he wanted in pkg-config that I have to get to.

Not sure it's in bugzilla, you might want to do that.

For now a simple test like this should work fine:

#
# 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

# Check for GTK+ flags

AC_MSG_CHECKING(GTK flags)
if $PKG_CONFIG --exact-version=1.3.3 gtk+-2.0 ; then
        GTK_CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0`
        GTK_LIBS=`$PKG_CONFIG --libs gtk+-2.0`

        AC_MSG_RESULT($GTK_CFLAGS $GTK_LIBS)
else
        AC_MSG_ERROR([
*** GTK+ not found or wrong version. GTK+ is required to build this package.
*** See http://www.gtk.org for GTK+ information.
])
fi

CFLAGS="$CFLAGS $GTK_CFLAGS"
AC_SUBST(GTK_LIBS)
AC_SUBST(GTK_CFLAGS)

Once GTK 2.0 is released, you probably want to change
--exact-version=1.3.3 to --atleast-version=2.0.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]