ac-g-module-supported.m4 1012 B

123456789101112131415161718192021222324252627
  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 "$enable_static_build" = "yes" ; then
  17. AC_WARN([Static build enabled ... cannot use gmodule])
  18. elif test x"$mc_cv_g_module_supported" = "xyes"; then
  19. if test x`$PKG_CONFIG --variable=gmodule_supported gmodule-2.0` = xtrue; then
  20. GLIB_LIBS="$GMODULE_LIBS $GLIB_LIBS"
  21. CFLAGS="$GMODULE_CFLAGS $CFLAGS"
  22. AC_DEFINE([HAVE_GMODULE], [1],
  23. [Defined if gmodule functionality is supported])
  24. fi
  25. fi
  26. ])