11debfc3dSmrgAC_DEFUN([AC_PLUGINS], 21debfc3dSmrg[ 31debfc3dSmrg maybe_plugins=no 41debfc3dSmrg AC_CHECK_HEADERS([dlfcn.h], [maybe_plugins=yes], [], [AC_INCLUDES_DEFAULT]) 51debfc3dSmrg AC_CHECK_HEADERS([windows.h], [maybe_plugins=yes], [], [AC_INCLUDES_DEFAULT]) 61debfc3dSmrg 71debfc3dSmrg AC_ARG_ENABLE([plugins], 81debfc3dSmrg AS_HELP_STRING([--enable-plugins], [Enable support for plugins]), 91debfc3dSmrg [case "${enableval}" in 101debfc3dSmrg no) plugins=no ;; 111debfc3dSmrg *) plugins=yes 121debfc3dSmrg if test "$maybe_plugins" != "yes" ; then 131debfc3dSmrg AC_MSG_ERROR([Building with plugin support requires a host that supports dlopen.]) 141debfc3dSmrg fi ;; 151debfc3dSmrg esac], 161debfc3dSmrg [plugins=$maybe_plugins] 171debfc3dSmrg ) 181debfc3dSmrg if test "$plugins" = "yes"; then 19*a2dc1f3fSmrg AC_SEARCH_LIBS([dlsym], [dl]) 201debfc3dSmrg fi 211debfc3dSmrg]) 22