1 dnl MODULE_HELPER(NAME, HELP, DEFAULT, COMMANDS)
2 AC_DEFUN([MODULE_HELPER],[
4 AC_ARG_ENABLE([$1], [$2],,[
5 if test "x${enable_all}" = "xdefault"; then
8 enable_[$1]="${enable_all}"
11 if test "x${enable_[$1]}" != "xno"; then
13 AC_MSG_CHECKING([whether to build $1 module])
14 if test -n "${have_module+set}"; then
15 if test "x${enable_[$1]}" = "xauto"; then
16 if test "x${enable_plugins}" != "xno"; then
17 AC_MSG_RESULT([yes, as plugin])
25 elif test "x${enable_[$1]}" = "xshared"; then
26 if test "x${enable_plugins}" != "xno"; then
27 AC_MSG_RESULT([yes, as plugin])
32 AC_MSG_ERROR([Can't build [$1] module, plugins are disabled])
39 elif test "x${enable_[$1]}" != "xauto"; then
41 AC_MSG_ERROR([Unable to build $1 plugin, see messages above])
48 AC_MSG_CHECKING([whether to build $1 module])