ac-g-module-supported.m4 839 B

123456789101112131415161718192021222324252627282930313233
  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], mc_cv_g_module_supported, [
  8. ac_save_CFLAGS="$CFLAGS"
  9. ac_save_LIBS="$LIBS"
  10. CFLAGS="$CFLAGS $GMODULE_CFLAGS"
  11. LIBS="$GMODULE_LIBS $LIBS"
  12. AC_TRY_RUN([
  13. #include <gmodule.h>
  14. int main ()
  15. {
  16. int ret = (g_module_supported () == TRUE) ? 0 : 1;
  17. return ret;
  18. }
  19. ],
  20. [mc_cv_g_module_supported=yes],
  21. [mc_cv_g_module_supported=no],
  22. [mc_cv_g_module_supported=no]
  23. )
  24. CFLAGS="$ac_save_CFLAGS"
  25. LIBS="$ac_save_LIBS"
  26. ])
  27. if test x"$mc_cv_g_module_supported" = xyes; then
  28. AC_DEFINE(HAVE_GMODULE, 1,
  29. [Define if gmodule functionality is supported])
  30. fi
  31. ])