From 7d61535076aa1ca484f453594b29e2ca052c2505 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Sat, 16 Feb 2013 18:30:45 +0100 Subject: Fix building with mingw and make sure linking generates proper DLL files --- neethi/configure.ac | 15 +++++++++++++++ neethi/src/Makefile.am | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'neethi') diff --git a/neethi/configure.ac b/neethi/configure.ac index 688f53d..fc4cb82 100644 --- a/neethi/configure.ac +++ b/neethi/configure.ac @@ -113,6 +113,21 @@ dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([stdio.h stdlib.h string.h]) AC_CHECK_HEADERS([sys/socket.h]) + +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/neethi/src/Makefile.am b/neethi/src/Makefile.am index bb45bc6..4bd6128 100644 --- a/neethi/src/Makefile.am +++ b/neethi/src/Makefile.am @@ -47,7 +47,7 @@ libneethi_la_LIBADD = ../../axiom/src/om/libaxis2_axiom.la \ # $(top_builddir)/axiom/src/om/libaxis2_axiom.la -libneethi_la_LDFLAGS = -version-info $(VERSION_NO) +libneethi_la_LDFLAGS = -version-info $(VERSION_NO) $(WIN32_EXTRA_LDFLAGS) INCLUDES = -I$(top_builddir)/include \ -I ../../util/include \ -- cgit v1.1-32-gdbae