1 1.1 christos AC_DEFUN([AC_PLUGINS], 2 1.1 christos [ 3 1.1.1.2 christos maybe_plugins=no 4 1.1.1.2 christos AC_CHECK_HEADERS([dlfcn.h], [maybe_plugins=yes], [], [AC_INCLUDES_DEFAULT]) 5 1.1.1.2 christos AC_CHECK_HEADERS([windows.h], [maybe_plugins=yes], [], [AC_INCLUDES_DEFAULT]) 6 1.1.1.2 christos 7 1.1.1.2 christos AC_ARG_ENABLE([plugins], 8 1.1.1.2 christos AS_HELP_STRING([--enable-plugins], [Enable support for plugins]), 9 1.1.1.2 christos [case "${enableval}" in 10 1.1.1.2 christos no) plugins=no ;; 11 1.1.1.2 christos *) plugins=yes 12 1.1.1.2 christos if test "$maybe_plugins" != "yes" ; then 13 1.1.1.2 christos AC_MSG_ERROR([Building with plugin support requires a host that supports dlopen.]) 14 1.1.1.2 christos fi ;; 15 1.1.1.2 christos esac], 16 1.1.1.2 christos [plugins=$maybe_plugins] 17 1.1.1.2 christos ) 18 1.1.1.2 christos if test "$plugins" = "yes"; then 19 1.1.1.3 christos AC_SEARCH_LIBS([dlsym], [dl]) 20 1.1.1.2 christos fi 21 1.1 christos ]) 22