summaryrefslogtreecommitdiffstats
path: root/axiom
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 /axiom
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 'axiom')
-rw-r--r--axiom/configure.ac14
-rw-r--r--axiom/src/om/Makefile.am2
-rw-r--r--axiom/src/parser/guththila/Makefile.am2
-rw-r--r--axiom/src/parser/libxml2/Makefile.am2
-rw-r--r--axiom/src/xpath/Makefile.am2
5 files changed, 18 insertions, 4 deletions
diff --git a/axiom/configure.ac b/axiom/configure.ac
index d3cdd1f..9cee511 100644
--- a/axiom/configure.ac
+++ b/axiom/configure.ac
@@ -89,6 +89,20 @@ AC_CHECK_HEADERS([linux/if.h],[],[],
#endif
])
+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)
+
dnl This is a check to see if we are running MacOS X
dnl It may be better to do a Darwin check
AC_CHECK_HEADER([sys/appleapiopts.h],
diff --git a/axiom/src/om/Makefile.am b/axiom/src/om/Makefile.am
index 1740883..06ba246 100644
--- a/axiom/src/om/Makefile.am
+++ b/axiom/src/om/Makefile.am
@@ -37,7 +37,7 @@ libaxis2_axiom_la_LIBADD = $(top_builddir)/src/soap/libaxis2_soap.la \
../parser/${WRAPPER_DIR}/libaxis2_parser.la \
../../../util/src/libaxutil.la
-libaxis2_axiom_la_LDFLAGS = -version-info $(VERSION_NO)
+libaxis2_axiom_la_LDFLAGS = -version-info $(VERSION_NO) $(WIN32_EXTRA_LDFLAGS)
INCLUDES = -I$(top_builddir)/include \
-I$(top_builddir)/src/parser \
diff --git a/axiom/src/parser/guththila/Makefile.am b/axiom/src/parser/guththila/Makefile.am
index 51a6667..9682e75 100644
--- a/axiom/src/parser/guththila/Makefile.am
+++ b/axiom/src/parser/guththila/Makefile.am
@@ -20,7 +20,7 @@ libaxis2_parser_la_LIBADD = ../../../../guththila/src/libguththila.la \
libaxis2_parser_la_SOURCES = ../xml_reader.c ../xml_writer.c guththila_xml_writer_wrapper.c \
guththila_xml_reader_wrapper.c
-libaxis2_parser_la_LDFLAGS = -version-info $(VERSION_NO)
+libaxis2_parser_la_LDFLAGS = -version-info $(VERSION_NO) $(WIN32_EXTRA_LDFLAGS)
INCLUDES = -I$(top_builddir)/include \
-I ../../../../util/include \
diff --git a/axiom/src/parser/libxml2/Makefile.am b/axiom/src/parser/libxml2/Makefile.am
index 8e67318..53f5ac7 100644
--- a/axiom/src/parser/libxml2/Makefile.am
+++ b/axiom/src/parser/libxml2/Makefile.am
@@ -21,7 +21,7 @@ libaxis2_parser_la_SOURCES = ../xml_reader.c ../xml_writer.c \
libaxis2_parser_la_LIBADD = @LIBXML2_LIBS@ \
../../../../util/src/libaxutil.la
-libaxis2_parser_la_LDFLAGS = -version-info $(VERSION_NO)
+libaxis2_parser_la_LDFLAGS = -version-info $(VERSION_NO) $(WIN32_EXTRA_LDFLAGS)
INCLUDES = -I$(top_builddir)/include \
diff --git a/axiom/src/xpath/Makefile.am b/axiom/src/xpath/Makefile.am
index 0fd3152..2fd9dcb 100644
--- a/axiom/src/xpath/Makefile.am
+++ b/axiom/src/xpath/Makefile.am
@@ -21,7 +21,7 @@ libaxis2_xpath_la_SOURCES = xpath.c \
xpath_internals_parser.c \
xpath_streaming.c
-libaxis2_xpath_la_LDFLAGS = -version-info $(VERSION_NO)
+libaxis2_xpath_la_LDFLAGS = -version-info $(VERSION_NO) $(WIN32_EXTRA_LDFLAGS)
libaxis2_xpath_la_LIBADD = $(top_builddir)/../util/src/libaxutil.la \
$(top_builddir)/src/om/libaxis2_axiom.la