i am testing on an older system that doesnt have pkg-config. is there another way to test the presence of gtk, then if it is there find the version(s) ? i tried AM_PATH_GTK(1.2.8,,AC_MSG_ERROR(mypkgname 0.1 needs GTK)) but that fails i alse tried #pkg_modules="gtk+-2.0 >= 2.0.0" #PKG_CHECK_MODULES(GTKCONFIG, [$pkg_modules]) that fails thanks matt On Mon, 2 Jan 2006, Giles wrote: > On Monday 02 January 2006 01:58, Matt Hull wrote: > > > i am trying to write a hello world app that can use nothing, gtk 1.2, or > > 2.0. > > > > sofar, nothing with autoconf works > > Have a look at 'man pkg-config'. > > In particular the section 'AUTOCONF MACROS'. > > It's very helpful. > > Giles > > > > > i tried this: > > > > # check if gtk should be used > > AC_ARG_WITH(gtk, [ --with-gtk use GTK GUI toolkit ]) > > if test "$with_gtk" = "yes" -o "$enable_gtk" = "yes" ; then > > if test "$withval" = "no" ; then > > with_gtk="no" > > else > > with_gtk="yes" > > fi > > fi > > > > if test "$with_gtk" = "yes"; then > > HAVE_GTK=yes > > AC_SUBST(HAVE_GTK) > > fi > > > > that works but i do not see HAVE_GTK in config.h > > > > > > then i tried: > > > > #AC_MSG_CHECKING(checking if gtk should be used) > > > > AC_ARG_WITH(gtk, > > [ --with-gtk enable gtk support], > > with_gtk=$withval, > > with_gtk=yes) > > AC_MSG_RESULT($with_foo) > > > > if test "$with_gtk" = "yes"; then > > AC_DEFINE(HAVE_GTK) > > fi > > > > and that fails with: > > > > /usr/bin/autoheader: Symbol `HAVE_GTK' is not covered by > > /usr/share/autoconf/acconfig.h > > > > but still writes the configure script, and when i run make it wants to run > > autoconf and automake again, no idea why. > > > > can anyone help ??? > > > > then if i get that working i need to determine the gtk version so i use > > the right code as gtk 1.2 and gtk 2.0 are different. > > > > if i choose not to use gtk at all from the configure script, how can i > > have the make files skip it. > > > > right now if it is not selected the make file still try to compile both > > versions and fail because one or both versions are not there. > > > > thanks > > > > matt > > > > > > _______________________________________________ > > Autoconf mailing list > > Autoconf@xxxxxxx > > http://lists.gnu.org/mailman/listinfo/autoconf > > > _______________________________________________ > Autoconf mailing list > Autoconf@xxxxxxx > http://lists.gnu.org/mailman/listinfo/autoconf > _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf