[xiph-commits] r12983 - in trunk/ao: . src
ben at svn.xiph.org
ben at svn.xiph.org
Thu May 24 03:35:40 PDT 2007
Author: ben
Date: 2007-05-24 03:35:40 -0700 (Thu, 24 May 2007)
New Revision: 12983
Modified:
trunk/ao/ao.pc.in
trunk/ao/configure.ac
trunk/ao/src/Makefile.am
Log:
Get ready for win32 build.
Modified: trunk/ao/ao.pc.in
===================================================================
--- trunk/ao/ao.pc.in 2007-05-24 10:20:18 UTC (rev 12982)
+++ trunk/ao/ao.pc.in 2007-05-24 10:35:40 UTC (rev 12983)
@@ -10,5 +10,6 @@
Version: @VERSION@
Requires:
Conflicts:
-Libs: -L${libdir} -lao
+Libs: -L${libdir} -lao @LIBS@
Cflags: -I${includedir}
+
Modified: trunk/ao/configure.ac
===================================================================
--- trunk/ao/configure.ac 2007-05-24 10:20:18 UTC (rev 12982)
+++ trunk/ao/configure.ac 2007-05-24 10:35:40 UTC (rev 12983)
@@ -1,9 +1,11 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(src/audio_out.c)
+AC_INIT([liba0],[0.8.8],[benjihan at users.sourceforge.net])
+AM_INIT_AUTOMAKE([gnu 1.6])
-AM_INIT_AUTOMAKE(libao,0.8.6)
AM_MAINTAINER_MODE
+
+dnl $$$ben: Is that neccessary ? And why ?
AM_DISABLE_STATIC
dnl Library versioning
@@ -17,6 +19,7 @@
dnl Plugin versioning. We use an integer version number much like LIB_CURRENT.
PLUGIN_VERSION=2
+AC_CANONICAL_BUILD
AC_CANONICAL_HOST
plugindir=$libdir/ao/plugins-$PLUGIN_VERSION
@@ -27,10 +30,21 @@
dnl ====================================
AC_PROG_CC
+AC_LIBTOOL_WIN32_DLL
AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL
dnl ====================================
+dnl Check dlopen
+dnl ====================================
+
+dnl Currently use this to disable plugin support dlfcn.h
+AC_CHECK_HEADERS([dlfcn.h],
+ [AC_SEARCH_LIBS([dlopen],[dl],
+ [AC_DEFINE([HAVE_DLOPEN],[1],
+ [support dynamic linking loader])])])
+
+dnl ====================================
dnl Set some general compile options
dnl ====================================
@@ -89,6 +103,21 @@
AC_SUBST(DEBUG)
AC_SUBST(PROFILE)
+dnl =========================================
+dnl Need -no-undefined for building win32 dll
+dnl =========================================
+dnl Should we do that for cygwin too ???
+dnl I guess so but it needs to be tested.
+case $host in
+ *-mingw*|*-cygwin*)
+ LIBAO_LA_LDFLAGS="-no-undefined"
+ ;;
+ *)
+ LIBAO_LA_LDFLAGS=""
+ ;;
+esac
+AC_SUBST(LIBAO_LA_LDFLAGS)
+
dnl ==============================
dnl Check for libraries
dnl ==============================
@@ -154,7 +183,40 @@
dnl Detect possible output devices
dnl ======================================
+dnl Check for WMM
+[has_wmm="no"]
+AC_ARG_ENABLE([wmm],
+ [AS_HELP_STRING(
+ [--enable-wmm],
+ [include WMM output plugin @<:@default=check@:>@])],
+ [],[enable_wmm="check"]
+)
+AS_IF([test "x$enable_wmm" != "xno"],
+[AC_CHECK_HEADERS([mmsystem.h],
+ [
+ AC_MSG_CHECKING([waveOut family functions])
+ waveout_old_LIBS="$LIBS"; LIBS="$LIBS -lwinmm"
+dnl Can't use AC_SEARCH_LIBS because symbols are decorated
+ AC_LINK_IFELSE([
+#include <windows.h>
+#include <mmsystem.h>
+int main(int na, char ** a) {
+ return waveOutOpen(0,0,0,0,0,0);
+}
+],[
+has_wmm="yes";
+AC_MSG_RESULT([yes])
+AC_DEFINE([HAVE_WMM],[1],[Support Windows MultiMedia])
+],[
+AC_MSG_RESULT([no])
+LIBS="$waveout_old_LIBS"
+])
+],[],[#include <windows.h>])])
+AM_CONDITIONAL([HAVE_WMM],[test "x$has_wmm" = "xyes"])
+AS_IF([test "x${has_wmm}" = "xyes"],[WMM_LIBS="-lwinmm"],[WMM_LIBS=""])
+AC_SUBST([WMM_LIBS])
+
dnl Check for ESD
AC_ARG_ENABLE(esd, [ --enable-esd include ESD output plugin ],
Modified: trunk/ao/src/Makefile.am
===================================================================
--- trunk/ao/src/Makefile.am 2007-05-24 10:20:18 UTC (rev 12982)
+++ trunk/ao/src/Makefile.am 2007-05-24 10:35:40 UTC (rev 12983)
@@ -7,12 +7,20 @@
lib_LTLIBRARIES = libao.la
-libao_la_SOURCES = audio_out.c config.c ao_null.c ao_wav.c ao_au.c ao_raw.c ao_aixs.c ao_private.h
-libao_la_LDFLAGS = -version-info @LIB_CURRENT@:@LIB_REVISION@:@LIB_AGE@ -ldl
+if HAVE_WMM
+wmm=ao_wmm.c
+else
+wmm=
+endif
+libao_la_SOURCES = audio_out.c config.c ao_null.c ao_wav.c ao_au.c ao_raw.c ao_aixs.c ao_private.h $(wmm)
+libao_la_LDFLAGS = @LIBAO_LA_LDFLAGS@ -version-info @LIB_CURRENT@:@LIB_REVISION@:@LIB_AGE@
+
debug:
$(MAKE) all CFLAGS="@DEBUG@"
profile:
$(MAKE) all CFLAGS="@PROFILE@"
+
+EXTRA_DIST = ao_wmm.c
More information about the commits
mailing list