Re: AM_PATH_GLIB_2_0
- From: Havoc Pennington <hp redhat com>
- To: Eric Lemings <eric b lemings lmco com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: AM_PATH_GLIB_2_0
- Date: 22 Jan 2001 10:18:47 -0500
Eric Lemings <eric b lemings lmco com> writes:
How do you configure a package with GLib now that the AM_PATH_GLIB_2_0
Autoconf macro does not work anymore?
Well, you could wait for it to get fixed, which will happen
eventually. ;-)
A short-term workaround is just some configure.in code like this:
#
# 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])
fi
# Check glib
AC_MSG_CHECKING(GLib flags)
GLIB_PKGS='glib-2.0 gobject-2.0 gmodule-2.0 gthread-2.0'
if $PKG_CONFIG --exists $GLIB_PKGS; then
GLIB_CFLAGS=`$PKG_CONFIG --cflags $GLIB_PKGS`
GLIB_LIBS=`$PKG_CONFIG --libs $GLIB_PKGS`
AC_SUBST(GLIB_LIBS)
AC_SUBST(GLIB_CFLAGS)
AC_MSG_RESULT($GLIB_CFLAGS $GLIB_LIBS)
else
AC_MSG_ERROR([
*** GLib not found. GLib is required.
])
fi
You can probably see from that how to replace glib-2.0 with
gtk+-2.0, etc.
Also, pkg-config has tests other than --exists, such as
--atleast-version, if you want to use those (since GTK 1.3.x breaks
with every version, you are probably well-advised to use
--exact-version).
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]