summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2013-02-16 18:30:45 +0100
committerGravatar Martin Szulecki2013-02-16 18:30:45 +0100
commit7d61535076aa1ca484f453594b29e2ca052c2505 (patch)
tree17c558addadc0ac4f1c9843271ab3f3e678da2ac /util
parent37268e184e6f5202c34b00be2478f33f8819d0ee (diff)
downloadaxis2c-7d61535076aa1ca484f453594b29e2ca052c2505.tar.gz
axis2c-7d61535076aa1ca484f453594b29e2ca052c2505.tar.bz2
Fix building with mingw and make sure linking generates proper DLL files
Diffstat (limited to 'util')
-rw-r--r--util/configure.ac14
-rw-r--r--util/src/Makefile.am5
-rw-r--r--util/src/minizip/Makefile.am2
3 files changed, 18 insertions, 3 deletions
diff --git a/util/configure.ac b/util/configure.ac
index 65555da..ccb808b 100644
--- a/util/configure.ac
+++ b/util/configure.ac
@@ -196,6 +196,20 @@ AC_SUBST([PLATFORM])
AC_DEFINE([HOST_OS_MINGW], 1, [define if we are on mingw])
+dnl Check for cygwin and mingw builds to allow building DLLs
+WIN32_EXTRA_LIBADD=
+WIN32_EXTRA_LDFLAGS=
+case "$host" in
+ *-*-cygwin*)
+ WIN32_EXTRA_LDFLAGS="-no-undefined -avoid-version"
+ ;;
+ *-*-mingw*)
+ WIN32_EXTRA_LDFLAGS="-no-undefined -avoid-version"
+ ;;
+esac
+AC_SUBST(WIN32_EXTRA_LIBADD)
+AC_SUBST(WIN32_EXTRA_LDFLAGS)
+
AC_MSG_CHECKING(whether to build guththila xml parser library)
AC_ARG_ENABLE(guththila, [ --enable-guththila build guththila xml parser library wrapper. default=no],
[ case "${enableval}" in
diff --git a/util/src/Makefile.am b/util/src/Makefile.am
index fb40027..0cc7fbf 100644
--- a/util/src/Makefile.am
+++ b/util/src/Makefile.am
@@ -56,9 +56,10 @@ libaxutil_la_SOURCES = hash.c \
libaxutil_la_LIBADD = $(top_builddir)/src/platforms/$(PLATFORM)/libaxis2_$(PLATFORM).la \
-lpthread \
- @ZLIBLIBS@
+ @ZLIBLIBS@ \
+ $(WIN32_EXTRA_LIBADD)
-libaxutil_la_LDFLAGS = -version-info $(VERSION_NO)
+libaxutil_la_LDFLAGS = -version-info $(VERSION_NO) $(WIN32_EXTRA_LDFLAGS)
INCLUDES = -I$(top_builddir)/include
diff --git a/util/src/minizip/Makefile.am b/util/src/minizip/Makefile.am
index f9e239e..9cf9fe1 100644
--- a/util/src/minizip/Makefile.am
+++ b/util/src/minizip/Makefile.am
@@ -19,7 +19,7 @@ libaxis2_minizip_la_SOURCES = ioapi.c \
archive_extract.c \
crypt.c
-libaxis2_minizip_la_LDFLAGS = -version-info $(VERSION_NO)
+libaxis2_minizip_la_LDFLAGS = -version-info $(VERSION_NO) $(WIN32_EXTRA_LDFLAGS)
INCLUDES = -I$(top_builddir)/include \
-I$(top_builddir)/platforms