ac-g-module-supported.m4 897 B

12345678910111213141516171819202122232425
  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. ])
  16. if test x"$mc_cv_g_module_supported" = "xyes"; then
  17. if test x`$PKG_CONFIG --variable=gmodule_supported gmodule-2.0` = xtrue; then
  18. GLIB_LIBS="$GMODULE_LIBS $GLIB_LIBS"
  19. CFLAGS="$GMODULE_CFLAGS $CFLAGS"
  20. AC_DEFINE([HAVE_GMODULE], [1],
  21. [Defined if gmodule functionality is supported])
  22. fi
  23. fi
  24. ])