X_CFLAGS="-I$x_includes"
AS_IF([test -n "$ac_x_libraries"], [X_LIBS="-L$ac_x_libraries"])
-PKG_CHECK_MODULES(GLIB, [glib-2.0 gthread-2.0], [glib=yes],[glib=no])
+# glib
+AC_ARG_ENABLE(glib, [ --disable-glib don't build with external glib], glib=$enableval, glib=yes)
+if test x"${glib}" = "xyes"; then
+ PKG_CHECK_MODULES(GLIB, [glib-2.0 gthread-2.0], [glib=yes],[glib=no])
+fi
if test "x${glib}" = "xyes"; then
AC_DEFINE(HAVE_GLIB, 1, [Define to 1 if you have (external) glib library])
else
fi
# gmodule
-PKG_CHECK_MODULES(GMODULE, [gmodule-2.0], [gmodule=yes], [gmodule=no])
+AC_ARG_ENABLE(gmodule, [ --disable-gmodule don't build with gmodule], gmodule=$enableval, gmodule=yes)
+if test x"${gmodule}" = "xyes"; then
+ PKG_CHECK_MODULES(GMODULE, [gmodule-2.0], [gmodule=yes], [gmodule=no])
+fi
if test "x${gmodule}" = "xyes"; then
AC_DEFINE(HAVE_GMODULE, 1, [Define to 1 if you have gmodule])
else