updated the build files to utilize the standalone libltdl library if available

This commit is contained in:
2018-03-07 07:50:28 +00:00
parent 474d48a211
commit de7db3e3bd
7 changed files with 159 additions and 20 deletions

View File

@ -117,7 +117,7 @@ dnl check header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([stddef.h wchar.h wctype.h errno.h signal.h fcntl.h dirent.h])
AC_CHECK_HEADERS([time.h sys/time.h utime.h spawn.h execinfo.h ucontext.h])
AC_CHECK_HEADERS([dlfcn.h sys/mman.h])
AC_CHECK_HEADERS([dlfcn.h ltdl.h sys/mman.h])
dnl check data types
dnl AC_CHECK_TYPE([wchar_t],
@ -146,6 +146,17 @@ AC_SEARCH_LIBS([dlopen], [dl dld], [
LIBS="$save_LIBS"
AC_SUBST(DL_LIBS)
save_LIBS="$LIBS"
AC_SEARCH_LIBS([lt_dlopen], [ltdl], [
LTDL_LIBS="$ac_cv_search_lt_dlopen"
if test "x${LTDL_LIBS}" = "xnone required"
then
LTDL_LIBS=""
fi
])
LIBS="$save_LIBS"
AC_SUBST(LTDL_LIBS)
dnl check is the import library for unicows.dll exists
dnl this check doesn't look for a particular symbol
dnl but for the symbol 'main' since i want to check
@ -479,6 +490,23 @@ then
fi
AM_CONDITIONAL(ENABLE_STATIC_MODULE, test "${enable_static_module_is}" = "yes")
dnl ===== enable-libltdl =====
AC_ARG_ENABLE([libltdl],
[AS_HELP_STRING([--enable-libltdl],[use libltdl(default. yes)])],
enable_libltdl_is=$enableval,
enable_libltdl_is=yes
)
if test "${enable_libltdl_is}" = "yes"
then
if test "${ac_cv_header_ltdl_h}" = "yes" -a "${LTDL_LIBS}" != ""
then
AC_DEFINE([HCL_ENABLE_LIBLTDL],[],[use libltdl when loading a dynamic module])
else
enable_libltdl_is="no"
fi
fi
AM_CONDITIONAL(ENABLE_LIBLTDL, test "${enable_libltdl_is}" = "yes")
AC_SUBST(HCL_SIZEOF_WCHAR_T, $ac_cv_sizeof_wchar_t)
AC_SUBST(HCL_SIZEOF_CHAR16_T, $ac_cv_sizeof_char16_t)
AC_SUBST(HCL_SIZEOF_CHAR32_T, $ac_cv_sizeof_char32_t)