diff options
Diffstat (limited to 'm4/modules.m4')
-rw-r--r-- | m4/modules.m4 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/m4/modules.m4 b/m4/modules.m4 new file mode 100644 index 0000000..855b21b --- /dev/null +++ b/m4/modules.m4 @@ -0,0 +1,16 @@ +dnl * dynamic modules? +AC_DEFUN([DOVECOT_MODULES], [ + have_modules=no + AC_CHECK_FUNC(dlopen, [ + have_modules=yes + MODULE_LIBS="-export-dynamic" + ], [ + AC_CHECK_LIB(dl, dlopen, [ + have_modules=yes + MODULE_LIBS="-export-dynamic -ldl" + DLLIB=-ldl + ]) + ]) + AC_SUBST(MODULE_LIBS) + AC_SUBST(DLLIB) +]) |