2 dnl Check whether the g_module_* family of functions works
3 dnl on this system. We need to know that at the compile time to
4 dnl decide whether to link with X11.
6 AC_DEFUN([AC_G_MODULE_SUPPORTED], [
9 if test x"$no_x" = xyes; then
10 textmode_x11_support="no"
13 PKG_CHECK_MODULES(GMODULE, [gmodule-no-export-2.0 >= 2.8], [found_gmodule=yes], [:])
14 if test x"$found_gmodule" = xyes; then
15 g_module_supported="gmodule-no-export-2.0"
17 dnl try fallback to the generic gmodule
18 PKG_CHECK_MODULES(GMODULE, [gmodule-2.0 >= 2.8], [found_gmodule=yes], [:])
19 if test x"$found_gmodule" = xyes; then
20 g_module_supported="gmodule-2.0"
24 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
25 case x"$g_module_supported" in
26 xgmodule-no-export-2.0|xgmodule-2.0)
27 if test x`$PKG_CONFIG --variable=gmodule_supported "$g_module_supported"` = xtrue; then
28 AC_DEFINE([HAVE_GMODULE], [1], [Defined if gmodule functionality is supported])
34 MCLIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
39 AC_DEFINE([HAVE_TEXTMODE_X11_SUPPORT], [1],
40 [Define to enable getting events from X Window System])
41 textmode_x11_support="yes"
44 AM_CONDITIONAL([HAVE_GMODULE], [test x"$g_module_supported" != x])