summaryrefslogtreecommitdiffstats
path: root/m4/modules.m4
blob: 855b21bb4e8afd2ef46be463697083df571b10c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)
])