[sword-devel] mingw patch

Matthew Talbert ransom1982 at gmail.com
Wed Dec 9 20:11:05 MST 2009

This patch solves two problems:

1. regex; what this does is creates an actual test to see whether
we're on mingw. Previously, you would have had to do ./configure
--target=mingw or something like that. By the way, using target in
this way really isn't accurate. At any rate, if we're on mingw (host,
not target), then it will first check to see if the regex library
exists and whether we can link to it. If so, it skips SWORD's regex.
If not, it enables it.

2. making a dll: the next two lines are both necessary to actually
create a dll with gcc. They aren't needed for making a static library,
but it doesn't hurt to include them anyway.

With this patch, anyone should be able to compile a dll with mingw
without resorting to any hacks. This is a very nice development :)


Index: configure.ac
--- configure.ac	(revision 2486)
+++ configure.ac	(working copy)
@@ -17,6 +17,16 @@


+case $host_os in
+     mingw*)
+	   # if we don't have system regex, use SWORD's copy
+           AC_CHECK_LIB(regex, regexec,,target_mingw32="yes")
+	   # both lines necessary to convince gcc to build dll
+	   LIBS="$LIBS -no-undefined";
+	   export lt_cv_deplibs_check_method=pass_all;
+	   ;;
 # ---------------------------------------------------------------------
 # Check Programs
 # ---------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mingw.patch
Type: application/octet-stream
Size: 671 bytes
Desc: not available
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20091209/14109202/attachment.obj>

More information about the sword-devel mailing list