more mingw fixes
authorJosh Coalson <jcoalson@users.sourceforce.net>
Wed, 1 Aug 2007 03:03:51 +0000 (03:03 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Wed, 1 Aug 2007 03:03:51 +0000 (03:03 +0000)
configure.in
src/flac/Makefile.am
src/metaflac/Makefile.am
src/test_libFLAC++/Makefile.am
src/test_libFLAC/Makefile.am
src/test_seeking/Makefile.am

index 8826f19..9bbae79 100644 (file)
@@ -74,6 +74,7 @@ esac
 AM_CONDITIONAL(FLaC__CPU_IA32, test "x$cpu_ia32" = xtrue)
 AM_CONDITIONAL(FLaC__CPU_PPC, test "x$cpu_ppc" = xtrue)
 AM_CONDITIONAL(FLaC__CPU_SPARC, test "x$cpu_sparc" = xtrue)
+
 case "$host" in
        i386-*-openbsd3.[[0-3]]) OBJ_FORMAT=aoutb ;;
        *-*-cygwin|*mingw*) OBJ_FORMAT=win32 ;;
@@ -81,6 +82,14 @@ case "$host" in
        *) OBJ_FORMAT=elf ;;
 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= ;;
+esac
+AC_SUBST(MINGW_WINSOCK_LIBS)
+
 case "$host" in
        *-pc-linux-gnu)
                sys_linux=true
index 94669e2..3ebd8e3 100644 (file)
@@ -48,4 +48,5 @@ flac_LDADD = \
        $(top_builddir)/src/libFLAC/libFLAC.la \
        @OGG_LIBS@ \
        @LIBICONV@ \
+       @MINGW_WINSOCK_LIBS@ \
        -lm
index 31e5c60..e7024a2 100644 (file)
@@ -49,4 +49,5 @@ metaflac_LDADD = \
        $(top_builddir)/src/libFLAC/libFLAC.la \
        @OGG_LIBS@ \
        @LIBICONV@ \
+       @MINGW_WINSOCK_LIBS@ \
        -lm
index fcc33af..462cbf2 100644 (file)
@@ -28,6 +28,7 @@ test_libFLAC___LDADD = \
        $(top_builddir)/src/libFLAC++/libFLAC++.la \
        $(top_builddir)/src/libFLAC/libFLAC.la \
        @OGG_LIBS@ \
+       @MINGW_WINSOCK_LIBS@ \
        -lm
 test_libFLAC___SOURCES = \
        decoders.cpp \
index 07a0d45..d38f299 100644 (file)
@@ -29,6 +29,7 @@ test_libFLAC_LDADD = \
        $(top_builddir)/src/test_libs_common/libtest_libs_common.la \
        $(top_builddir)/src/libFLAC/libFLAC.la \
        @OGG_LIBS@ \
+       @MINGW_WINSOCK_LIBS@ \
        -lm
 test_libFLAC_SOURCES = \
        bitwriter.c \
index 335bddc..120e233 100644 (file)
@@ -28,6 +28,7 @@ noinst_PROGRAMS = test_seeking
 test_seeking_LDADD = \
        $(top_builddir)/src/libFLAC/libFLAC.la \
        @OGG_LIBS@ \
+       @MINGW_WINSOCK_LIBS@ \
        -lm
 test_seeking_SOURCES = \
        main.c