[xml] [patch] Add module suport for Cygwin



After I got problems building libxslt without libxml module support
I changed configure.in to enable module support for Cygwin, please
consider including this.

Patch against 2.6.20 (also attached to avoid linebreak and tab issues):

diff -purN -x .build -x .inst -x .sinst -x INSTALL libxml2-2.6.20-orig/configure.in libxml2-2.6.20/configure.in
--- libxml2-2.6.20-orig/configure.in    2005-07-10 23:44:45.000000000 +0200
+++ libxml2-2.6.20/configure.in 2005-07-13 02:31:28.353427200 +0200
@@ -673,21 +673,33 @@ AC_SUBST(PYTHON_SUBDIR)

 dnl check for dso support
 WITH_MODULES=0
-MODULE_EXTENSION=".so"
 TEST_MODULES=

 if test "$with_modules" != "no" ; then
-AC_CHECK_LIB(dld, shl_load, [
-  WITH_MODULES=1
-  MODULE_PLATFORM_LIBS="-ldld"
-  AC_DEFINE([HAVE_SHLLOAD], [], [Have shl_load based dso])
-])
-
-AC_CHECK_LIB(dl, dlopen, [
-  WITH_MODULES=1
-  MODULE_PLATFORM_LIBS="-ldl"
-  AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso])
-])
+ case "$host" in
+  *-*-cygwin*)
+  MODULE_EXTENSION=".dll"
+  AC_CHECK_LIB(cygwin, dlopen, [
+    WITH_MODULES=1
+    MODULE_PLATFORM_LIBS=
+    AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso])
+  ])
+  ;;
+  *)
+  MODULE_EXTENSION=".so"
+  AC_CHECK_LIB(dld, shl_load, [
+    WITH_MODULES=1
+    MODULE_PLATFORM_LIBS="-ldld"
+    AC_DEFINE([HAVE_SHLLOAD], [], [Have shl_load based dso])
+  ])
+
+  AC_CHECK_LIB(dl, dlopen, [
+    WITH_MODULES=1
+    MODULE_PLATFORM_LIBS="-ldl"
+    AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso])
+  ])
+ ;;
+ esac
 fi

 if test "${WITH_MODULES}" = "1"; then


Gerrit
diff -purN -x .build -x .inst -x .sinst -x INSTALL libxml2-2.6.20-orig/configure.in 
libxml2-2.6.20/configure.in
--- libxml2-2.6.20-orig/configure.in    2005-07-10 23:44:45.000000000 +0200
+++ libxml2-2.6.20/configure.in 2005-07-13 02:31:28.353427200 +0200
@@ -673,21 +673,33 @@ AC_SUBST(PYTHON_SUBDIR)
 
 dnl check for dso support
 WITH_MODULES=0
-MODULE_EXTENSION=".so"
 TEST_MODULES=
 
 if test "$with_modules" != "no" ; then
-AC_CHECK_LIB(dld, shl_load, [
-  WITH_MODULES=1
-  MODULE_PLATFORM_LIBS="-ldld"
-  AC_DEFINE([HAVE_SHLLOAD], [], [Have shl_load based dso])
-])
-
-AC_CHECK_LIB(dl, dlopen, [
-  WITH_MODULES=1
-  MODULE_PLATFORM_LIBS="-ldl"
-  AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso])
-])
+ case "$host" in
+  *-*-cygwin*)
+  MODULE_EXTENSION=".dll"
+  AC_CHECK_LIB(cygwin, dlopen, [
+    WITH_MODULES=1
+    MODULE_PLATFORM_LIBS=
+    AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso])
+  ])
+  ;;
+  *)
+  MODULE_EXTENSION=".so"
+  AC_CHECK_LIB(dld, shl_load, [
+    WITH_MODULES=1
+    MODULE_PLATFORM_LIBS="-ldld"
+    AC_DEFINE([HAVE_SHLLOAD], [], [Have shl_load based dso])
+  ])
+ 
+  AC_CHECK_LIB(dl, dlopen, [
+    WITH_MODULES=1
+    MODULE_PLATFORM_LIBS="-ldl"
+    AC_DEFINE([HAVE_DLOPEN], [], [Have dlopen based dso])
+  ])
+ ;;
+ esac
 fi
 
 if test "${WITH_MODULES}" = "1"; then


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]