GNOME Bugzilla – Bug 102825
add --enable-gtk=yes/no/auto
Last modified: 2004-12-22 21:47:04 UTC
As I see from the configure.in and Makefile's, GConf2 can be built without GTK. It seems to me that gtk is disabled when it is not found by the pkg-config stuff. This is right. Although the user must have the ability to disable gtk support explicitly (with something like --disable-gtk), so that he can say "Yes, I have gtk installed, but I do not want GConf to use it". Why, you may ask... It seems to me that GConf is an UI independant library, so I would like to (easily) remove the gtk dependancy in a package I'm maintaining (I'm currently trying it by patching configure...), but the patch is a hack and will become outdated on the next gconf release.
Seems reasonable. What I've done in other cases is --enable-gtk=[yes/no/auto] defaulting to auto, where if you specify yes it fails if gtk not found, if you specify no it never uses it.
That sounds good and more flexible :)
Created attachment 24363 [details] [review] Patch for configure.in to implement --with-gtk
I've just added a patch that implements what you suggested, a tristate variable. If it's auto, the default, configure will use gtk if found. If set to yes, it will abort as soon as possible if gtk is missing. And at last, if set to no, gtk won't be used at all.
I've committed a fixed up version of this to HEAD and gnome-2-6. Changes I made were: + Used AC_ARG_ENABLE rather than AC_ARG_WITH + define DEPENDENT_WITH_XML_AND_GTK_CFLAGS/LIBS even when GTK isn't found or it won't build Thanks :-) 2004-04-19 Mark McLoughlin <mark@skynet.ie> Based on a patch from Julio Merino <jmmv@hispabsd.org> in bug #102825 * configure.in: add a --enable-gtk=yes/no/auto (defaults to auto)