summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkira TAGOH <akira@tagoh.org>2014-05-09 19:11:09 +0900
committerAkira TAGOH <akira@tagoh.org>2014-05-09 19:11:09 +0900
commit9cedd1cf0f4d6ea791f058a31ba77129febb97b5 (patch)
tree12fc85b2446646acc251d71b134289c75fdd400c
parentd3bf8cd284f239b290415e4232d8dba0366533f0 (diff)
Fix the module build on NetBSD (fixed issue#7)
Patch from Jaap Boender
-rw-r--r--configure.ac8
1 files changed, 5 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 5bf4f96..79ba005 100644
--- a/configure.ac
+++ b/configure.ac
@@ -325,14 +325,16 @@ if test "x$enable_modules" != "xno"; then
AC_MSG_ERROR(Unable to determine shared libreary suffix from libtool)
fi
use_modules=0
- AC_CHECK_LIB([dl], [dlopen],
- [AC_CHECK_LIB([dl], [dlsym], [MODULE_LIBS=-ldl; use_modules=1])])
+
+ AC_CHECK_FUNC([dlopen], [use_modules=1],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [AC_CHECK_LIB([dl], [dlsym], [MODULE_LIBS=-ldl; use_modules=1])])])
AC_SUBST(MODULE_LIBS)
AC_DEFINE_UNQUOTED(ENABLE_MODULE, $use_modules, [Use modules])
AC_DEFINE_UNQUOTED(LT_MODULE_SUFFIX, "$lt_module_suffix", [Shared library suffix])
fi
-AM_CONDITIONAL(ENABLE_MODULE, test x$MODULE_LIBS != x)
+AM_CONDITIONAL(ENABLE_MODULE, test $use_modules = 1)
dnl ======================================================================
dnl options - rebuild-data