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 --- configure.ac | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 0d0a308..7c0b8a8 100644 --- a/configure.ac +++ b/configure.ac @@ -106,6 +106,20 @@ AC_CHECK_HEADERS([linux/if.h],[],[], AC_CHECK_HEADERS([net/if_types.h]) AC_CHECK_HEADERS([net/if_dl.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_HEADERS([sys/appleapiopts.h]) -- cgit v1.1-32-gdbae