mingw fixes, enable build dll w/ mingw (SF#2000973: https://sourceforge.net/tracker2...
authorJosh Coalson <jcoalson@users.sourceforce.net>
Sat, 3 Jan 2009 01:59:10 +0000 (01:59 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Sat, 3 Jan 2009 01:59:10 +0000 (01:59 +0000)
configure.in
doc/html/changelog.html
src/libFLAC++/Makefile.am
src/libFLAC/Makefile.am

index 73cdf89..e1e2efc 100644 (file)
@@ -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
index 3c11cea..d812626 100644 (file)
                        <li>
                                build system:
                                <ul>
-                                       <li>Fixes for MinGW (<a href="https://sourceforge.net/tracker2/?func=detail&aid=2209829&group_id=13478&atid=113478">SF #2209829</a>).</li>
+                                       <li>Fixes for MinGW (<a href="https://sourceforge.net/tracker2/?func=detail&aid=2000973&group_id=13478&atid=113478">SF #2000973</a>, <a href="https://sourceforge.net/tracker2/?func=detail&aid=2209829&group_id=13478&atid=113478">SF #2209829</a>).</li>
                                        <li>Fixes for gcc 4.3 (<a href="https://sourceforge.net/tracker2/?func=detail&aid=1834168&group_id=13478&atid=113478">SF #1834168</a>, <a href="https://sourceforge.net/tracker2/?func=detail&aid=2002481&group_id=13478&atid=113478">SF #2002481</a>).</li>
                                        <li>Fixes for windows builds (<a href="https://sourceforge.net/tracker2/?func=detail&aid=1676822&group_id=13478&atid=113478">SF #1676822</a>, <a href="https://sourceforge.net/tracker2/?func=detail&aid=1756624&group_id=13478&atid=363478">SF #1756624</a>, <a href="https://sourceforge.net/tracker2/?func=detail&aid=1809863&group_id=13478&atid=113478">SF #1809863</a>, <a href="https://sourceforge.net/tracker2/?func=detail&aid=1911149&group_id=13478&atid=363478">SF #1911149</a>).</li>
                                </ul>
index 0304127..3cd6577 100644 (file)
@@ -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 = \
index a8e98db..d9669e1 100644 (file)
@@ -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 \