Take into account the value of the "Search for content" checkbox
[midnight-commander.git] / m4.include / ac-g-module-supported.m4
blobb9bcc8820bc2b8f1d99381f437000cf6f984bef9
1 dnl
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.
5 dnl
6 AC_DEFUN([AC_G_MODULE_SUPPORTED], [
7     AC_CACHE_CHECK([if gmodule functionality is supported],
8     [mc_cv_g_module_supported],
9     [
10         mc_cv_g_module_supported=no;
11         PKG_CHECK_MODULES(GMODULE, [gmodule-2.0 >= 2.8], [found_gmodule=yes], [:])
12         if test x"$found_gmodule" = "xyes"; then
13             mc_cv_g_module_supported=yes
14         fi
15     ])
17     if test x"$mc_cv_g_module_supported" = "xyes"; then
18         if test x`$PKG_CONFIG --variable=gmodule_supported gmodule-2.0` = xtrue; then
19             GLIB_LIBS="$GMODULE_LIBS $GLIB_LIBS"
20             CFLAGS="$GMODULE_CFLAGS $CFLAGS"
21             AC_DEFINE([HAVE_GMODULE], [1],
22                 [Defined if gmodule functionality is supported])
23         fi
24     fi