From 494d9ab0113fe04669759d2908682cbdb57e3679 Mon Sep 17 00:00:00 2001 From: Josh Coalson Date: Sat, 3 Jan 2009 01:59:10 +0000 Subject: [PATCH] mingw fixes, enable build dll w/ mingw (SF#2000973: https://sourceforge.net/tracker2/?func=detail&aid=2000973&group_id=13478&atid=313478) --- configure.in | 17 ++++++++++++++--- doc/html/changelog.html | 2 +- src/libFLAC++/Makefile.am | 2 +- src/libFLAC/Makefile.am | 4 ++-- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/configure.in b/configure.in index 73cdf89..e1e2efc 100644 --- a/configure.in +++ b/configure.in @@ -25,6 +25,9 @@ AM_INIT_AUTOMAKE(flac, 1.2.1) # explicitly requested. Eases autobuilding -mdz AM_MAINTAINER_MODE +# Enable the generation of shared libraries under Win32 +AC_LIBTOOL_WIN32_DLL + # We need two libtools, one that builds both shared and static, and # one that builds only static. This is because the resulting libtool # does not allow us to choose which to build at runtime. @@ -93,11 +96,19 @@ case "$host" in esac AC_SUBST(OBJ_FORMAT) -# only needed because of ntohl() usage, can get rid of after that's gone: case "$host" in - *-*-cygwin|*mingw*) MINGW_WINSOCK_LIBS=-lwsock32 ;; - *) MINGW_WINSOCK_LIBS= ;; + *-*-cygwin|*mingw*) + # define this variable for enabling strict exports with libtool; for now, it's only supported by Win32 + LT_NO_UNDEFINED="-no-undefined" + # -lwsock32 only needed because of ntohl() usage, can get rid of after that's gone: + MINGW_WINSOCK_LIBS=-lwsock32 + ;; + *) + LT_NO_UNDEFINED= + MINGW_WINSOCK_LIBS= + ;; esac +AC_SUBST(LT_NO_UNDEFINED) AC_SUBST(MINGW_WINSOCK_LIBS) case "$host" in diff --git a/doc/html/changelog.html b/doc/html/changelog.html index 3c11cea..d812626 100644 --- a/doc/html/changelog.html +++ b/doc/html/changelog.html @@ -104,7 +104,7 @@
  • build system: diff --git a/src/libFLAC++/Makefile.am b/src/libFLAC++/Makefile.am index 0304127..3cd6577 100644 --- a/src/libFLAC++/Makefile.am +++ b/src/libFLAC++/Makefile.am @@ -46,7 +46,7 @@ EXTRA_DIST = \ libFLAC++.m4 # see 'http://www.gnu.org/software/libtool/manual.html#Libtool-versioning' for numbering convention -libFLAC___la_LDFLAGS = -version-info 8:0:2 +libFLAC___la_LDFLAGS = -version-info 8:0:2 @LT_NO_UNDEFINED@ libFLAC___la_LIBADD = ../libFLAC/libFLAC.la libFLAC___la_SOURCES = \ diff --git a/src/libFLAC/Makefile.am b/src/libFLAC/Makefile.am index a8e98db..d9669e1 100644 --- a/src/libFLAC/Makefile.am +++ b/src/libFLAC/Makefile.am @@ -69,7 +69,7 @@ endif endif endif -libFLAC_la_LIBADD = $(LOCAL_EXTRA_LIBADD) @OGG_LIBS@ +libFLAC_la_LIBADD = $(LOCAL_EXTRA_LIBADD) @OGG_LIBS@ @MINGW_WINSOCK_LIBS@ SUBDIRS = $(ARCH_SUBDIRS) include . @@ -96,7 +96,7 @@ extra_ogg_sources = \ ogg_mapping.c endif # see 'http://www.gnu.org/software/libtool/manual.html#Libtool-versioning' for numbering convention -libFLAC_la_LDFLAGS = -version-info 10:0:2 -lm $(LOCAL_EXTRA_LDFLAGS) +libFLAC_la_LDFLAGS = -version-info 10:0:2 -lm $(LOCAL_EXTRA_LDFLAGS) @LT_NO_UNDEFINED@ libFLAC_la_SOURCES = \ bitmath.c \ bitreader.c \ -- 2.7.4