--- configure.ac.orig 2006-11-05 14:57:30.000000000 +0100 +++ configure.ac 2007-01-17 20:04:35.000000000 +0100 @@ -119,14 +119,13 @@ AC_SUBST(GW_LANGUAGES) dnl Check for optional libraries -AC_CHECK_PROG(have_glib, glib-config, yes, no) -if test "$have_glib" = yes; then - PKG_CHECK_MODULES(GLIB, glib, [echo building GLib 1.2 support]) -else - echo Not building Glib 1.2 support +AC_ARG_WITH([glib], AS_HELP_STRING([--without-glib], [Build without glib-2 (default: test)])) +AM_CONDITIONAL(HAVE_GLIB, test "$GLIB" = yes) +if test "x$with_glib" != "xno"; then + PKG_CHECK_MODULES([GLIB], [glib-2.0], + [echo building GLib 2.0 support], + [echo Not building GLib 2.0 support]) fi -AM_CONDITIONAL(HAVE_GLIB, test "$have_glib" = yes) - dnl Check for compiler flags and warnings. This should be last, since dnl it can infere with other checks due to changed CFLAGS.