El mar, 09 de 03 de 2004 a las 11:46, Russell Shaw escribiÃ:
Hi, Which configure.ac macro should i use for a gtk2 app?
PKG_CHECK_MODULES(PACKAGE, ["gtk+-2.0 >= 2.0.0"]) But first check this working example: ------------------------------------------------------------------- echo -n "checking for gtk+-2.0... " if pkg-config --exists gtk+-2.0 ; then echo "yes" pkg_modules="gtk+-2.0 >= 2.0.0" else echo "no" AC_MSG_ERROR(libgtk2.0 not found please install libgtk2.0-dev) fi PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) AC_SUBST(CFLAGS) AC_SUBST(LIBS) ------------------------------------------------------------------ If you do it this way, and you need to add an extra check, you should just add it to the variable $package_modules to be checked by PKG_CHECK_MODULES As example to add gthread, you can add this before PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]): ---- echo -n "checking for gthread-2.0... " if pkg-config --exists gthread-2.0 ; then echo "yes" pkg_modules="$pkg_modules gthread-2.0" else echo "no" AC_MSG_ERROR(gthread-2.0 not found please install glib2-dev) fi --- This make easier to add checks to your configure.ac Hope this helps. -- Iago Rubio http://www.iagorubio.com GPGkey pgp.rediris.es id 0x909BD4DD fingerprint = D18A B950 5F03 BB9A DD89 AA75 FEDF 1978 909B D4DD ********** iago.rubio(AT)hispalinux.es ********** --------------------------------------------------
Attachment:
signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente