comparison config/plugins.m4 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents 77e2b8dfacca
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 AC_DEFUN([AC_PLUGINS], 1 AC_DEFUN([AC_PLUGINS],
2 [ 2 [
3 AC_ARG_ENABLE([plugins], 3 maybe_plugins=no
4 AS_HELP_STRING([--enable-plugins], [Enable support for plugins (defaults no)]), 4 AC_CHECK_HEADERS([dlfcn.h], [maybe_plugins=yes], [], [AC_INCLUDES_DEFAULT])
5 [case "${enableval}" in 5 AC_CHECK_HEADERS([windows.h], [maybe_plugins=yes], [], [AC_INCLUDES_DEFAULT])
6 yes | "") plugins=yes ;; 6
7 no) plugins=no ;; 7 AC_ARG_ENABLE([plugins],
8 *) plugins=yes ;; 8 AS_HELP_STRING([--enable-plugins], [Enable support for plugins]),
9 esac], 9 [case "${enableval}" in
10 [plugins=no]) 10 no) plugins=no ;;
11 *) plugins=yes
12 if test "$maybe_plugins" != "yes" ; then
13 AC_MSG_ERROR([Building with plugin support requires a host that supports dlopen.])
14 fi ;;
15 esac],
16 [plugins=$maybe_plugins]
17 )
18 if test "$plugins" = "yes"; then
19 AC_SEARCH_LIBS([dlopen], [dl])
20 fi
11 ]) 21 ])