diff --git a/ChangeLog b/ChangeLog index 304e86a9..c3206b50 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Oct 28 10:36:10 CEST 2005 Daniel Veillard + + * xmlmodule.c configure.in: applied 2 patches from Albert Chin for + module portability + Fri Oct 28 10:24:39 CEST 2005 Daniel Veillard * error.c: fixing a portability problem on some old Unices with diff --git a/configure.in b/configure.in index e80e1c6b..f3969f55 100644 --- a/configure.in +++ b/configure.in @@ -724,18 +724,34 @@ if test "$with_modules" != "no" ; then ]) ;; *) - MODULE_EXTENSION=".so" - AC_CHECK_LIB(dld, shl_load, [ + AC_CHECK_FUNC(shl_load, libxml_have_shl_load=yes, [ + AC_CHECK_LIB(dld, shl_load, [ + MODULE_PLATFORM_LIBS="-ldld" + libxml_have_shl_load=yes], [ + AC_CHECK_FUNC(dlopen, libxml_have_dlopen=yes, [ + AC_CHECK_LIB(dl, dlopen, [ + MODULE_PLATFORM_LIBS="-ldl" + libxml_have_dlopen=yes])])])]) + + if test "${libxml_have_shl_load}" = "yes"; then + MODULE_EXTENSION=".sl" WITH_MODULES=1 - MODULE_PLATFORM_LIBS="-ldld" AC_DEFINE([HAVE_SHLLOAD], [], [Have shl_load based dso]) - ]) + fi - AC_CHECK_LIB(dl, dlopen, [ + if test "${libxml_have_dlopen}" = "yes"; then + case "${host}" in + *-*-hpux* ) + MODULE_EXTENSION=".sl" + ;; + * ) + MODULE_EXTENSION=".so" + ;; + esac + WITH_MODULES=1 - MODULE_PLATFORM_LIBS="-ldl" AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso]) - ]) + fi ;; esac fi diff --git a/xmlmodule.c b/xmlmodule.c index 6cc86ee6..a26089a7 100644 --- a/xmlmodule.c +++ b/xmlmodule.c @@ -277,7 +277,7 @@ xmlModulePlatformSymbol(void *handle, const char *name, void **symbol) int rc; errno = 0; - rc = shl_findsym(handle, name, TYPE_PROCEDURE, symbol); + rc = shl_findsym(&handle, name, TYPE_PROCEDURE, symbol); if ((-1 == rc) && (0 == errno)) { rc = shl_findsym(handle, name, TYPE_DATA, symbol); }