1
0
mirror of http://mpg123.de/trunk/.git synced 2025-08-04 22:42:07 +03:00

Sync inline scripts for current module list; prevent win32_wasapi from occuring in configure output unconditionally.

The test script just tries to build all supported modules into a static output each; providing some testing for the more rare configuration.



git-svn-id: svn://scm.orgis.org/mpg123/trunk@3423 35dc7657-300d-0410-a2e5-dc2837fedb53
This commit is contained in:
thor
2013-09-29 15:07:52 +00:00
parent c93d03a97a
commit db32e632a1
3 changed files with 35 additions and 10 deletions

View File

@@ -1633,8 +1633,12 @@ int main(){
])], [HAVE_WIN32_WASAPI=yes], [HAVE_WIN32_WASAPI=no])
LIBS=$OLD_LIBS
WIN32_WASAPI_LIBS="-lole32 -lavrt"
output_modules="$output_modules win32_wasapi"
AC_MSG_RESULT([$HAVE_WIN32_WASAPI])
if test "x$HAVE_WIN32_WASAPI" = xyes; then
output_modules="$output_modules win32_wasapi"
else
check_failed=yes
fi
;;
sndio)
SNDIO_LIBS=-lsndio
@@ -1793,7 +1797,8 @@ if test "x$check_forced" = xyes -a "x$check_failed" = "xyes"; then
fi
# When you extend check_modules, you should extend this:
#for i in alsa oss coreaudio sndio sun win32 esd jack portaudio pulse sdl nas aix alib arts hp os2 sgi mint openal dummy; do echo $i; done |
#for i in alsa qsa oss coreaudio sndio sun win32 win32_wasapi esd jack portaudio pulse sdl nas aix alib arts hp os2 sgi mint openal dummy
#do echo $i; done |
#perl -ne 'chomp; $big = uc($_); print <<EOT;
#AC_SUBST(${big}_LIBS)
#AC_SUBST(${big}_LDFLAGS)
@@ -1830,6 +1835,8 @@ AC_SUBST(WIN32_LDFLAGS)
AC_SUBST(WIN32_CFLAGS)
AM_CONDITIONAL( [HAVE_WIN32], [test "x$HAVE_WIN32" = xyes] )
AC_SUBST(WIN32_WASAPI_LIBS)
AC_SUBST(WIN32_WASAPI_LDFLAGS)
AC_SUBST(WIN32_WASAPI_CFLAGS)
AM_CONDITIONAL( [HAVE_WIN32_WASAPI], [test "x$HAVE_WIN32_WASAPI" = xyes] )
AC_SUBST(ESD_LIBS)
AC_SUBST(ESD_LDFLAGS)
@@ -1919,7 +1926,8 @@ then
# That feels stupid... what about hashed arrays?
case $OUTPUT_MOD in
# Here's a script for that tedious list, perhaps to be outsourced together with the one in src/output/Makefile.am
#for i in alsa coreaudio esd jack nas oss portaudio pulse sdl sndio sun win32 aix alib arts hp os2 sgi mint; do echo $i; done |
#for i in alsa qsa coreaudio esd jack nas oss portaudio pulse sdl sndio sun win32 win32_wasapi aix alib arts hp os2 sgi mint openal
#do echo $i; done |
#perl -ne 'chomp; $big = uc($_); print <<EOT;
# $_)
# OUTPUT_LIBS="\$${big}_LIBS"
@@ -1993,6 +2001,11 @@ then
OUTPUT_LDFLAGS="$WIN32_LDFLAGS"
OUTPUT_CFLAGS="$WIN32_CFLAGS"
;;
win32_wasapi)
OUTPUT_LIBS="$WIN32_WASAPI_LIBS"
OUTPUT_LDFLAGS="$WIN32_WASAPI_LDFLAGS"
OUTPUT_CFLAGS="$WIN32_WASAPI_CFLAGS"
;;
aix)
OUTPUT_LIBS="$AIX_LIBS"
OUTPUT_LDFLAGS="$AIX_LDFLAGS"

View File

@@ -0,0 +1,12 @@
#!/bin/bash
# test if build of supported modules works when linking in fixed one
modlist=$(./configure | perl -ne 'print $1 if /Detected audio support \.*\s*(.*)$/')
errsum=0
for m in $modlist
do
echo "==== testing $m ===="
make clean
# You can provide -j to speed things up.
./configure --with-audio=$m --disable-modules && make "$@" || exit 1
echo "==== success with $m ===="
done

View File

@@ -17,7 +17,7 @@ pkglib_LTLIBRARIES =
# These are not tested and _very_ likely need work: aix alib hp os2 sgi mint
# Use that sh/perl script to generate the module entries:
#for i in alsa coreaudio esd jack nas oss portaudio pulse sdl sndio sun win32 aix alib arts hp os2 sgi mint openal dummy; do echo $i; done |
#for i in alsa coreaudio esd jack nas oss portaudio pulse qsa sdl sndio sun win32 win32_wasapi aix alib arts hp os2 sgi mint openal dummy; do echo $i; done |
#perl -ne 'chomp; $big = uc($_); print <<EOT;
#
#if HAVE_$big
@@ -137,8 +137,8 @@ endif
if HAVE_WIN32_WASAPI
pkglib_LTLIBRARIES += output_win32_wasapi.la
output_win32_wasapi_la_SOURCES = win32_wasapi.c
output_win32_wasapi_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @WIN32_LDFLAGS@
output_win32_wasapi_la_CFLAGS = @WIN32_CFLAGS@
output_win32_wasapi_la_LDFLAGS = -module -no-undefined -avoid-version -export-dynamic -export-symbols-regex '^mpg123_' @WIN32_WASAPI_LDFLAGS@
output_win32_wasapi_la_CFLAGS = @WIN32_WASAPI_CFLAGS@
output_win32_wasapi_la_LIBADD = @WIN32_WASAPI_LIBS@
endif