diff options
author | Matt Messier <mmessier@grapetv.org> | 2007-05-12 16:16:48 -0400 |
---|---|---|
committer | Matt Messier <mmessier@grapetv.org> | 2007-05-12 16:16:48 -0400 |
commit | 51e8dac9666d4f18a352ff61063464c02e7be6aa (patch) | |
tree | 63c5130cb195d4fbd1d732634c4c28e9293616d1 /m4 | |
parent | 75417b28a7b623141262a12e3a71c451d9b6c7cf (diff) | |
download | xine-lib-51e8dac9666d4f18a352ff61063464c02e7be6aa.tar.gz xine-lib-51e8dac9666d4f18a352ff61063464c02e7be6aa.tar.bz2 |
Final pass over audio_out configure checks
Diffstat (limited to 'm4')
-rw-r--r-- | m4/arts.m4 | 272 | ||||
-rw-r--r-- | m4/audio_out.m4 | 104 | ||||
-rw-r--r-- | m4/summary.m4 | 44 |
3 files changed, 200 insertions, 220 deletions
diff --git a/m4/arts.m4 b/m4/arts.m4 index 079c21ba8..ae34b5f04 100644 --- a/m4/arts.m4 +++ b/m4/arts.m4 @@ -1,168 +1,148 @@ -# Configure paths for ARTS -# Philip Stadermann 2001-06-21 -# stolen from esd.m4 +dnl Configure paths for ARTS +dnl Philip Stadermann 2001-06-21 +dnl stolen from esd.m4 dnl AM_PATH_ARTS([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl Test for ARTS, and define ARTS_CFLAGS and ARTS_LIBS dnl -AC_DEFUN([AM_PATH_ARTS], -[dnl -dnl Get the cflags and libraries from the artsc-config script -dnl -AC_ARG_WITH(arts-prefix, AS_HELP_STRING([--with-arts-prefix=DIR], [prefix where ARTS is installed (optional)]), - arts_prefix="$withval", arts_prefix="") -AC_ARG_ENABLE(artstest, AS_HELP_STRING([--disable-artstest], [do not try to compile and run a test ARTS program]), - enable_artstest=$enableval, enable_artstest=yes) +AC_DEFUN([AM_PATH_ARTS], [ + AC_ARG_WITH([arts-prefix], + [AS_HELP_STRING([--with-arts-prefix=DIR], [prefix where ARTS is installed (optional)])], + [arts_prefix="$withval"], [arts_prefix=""]) + AC_ARG_ENABLE([artstest], + [AS_HELP_STRING([--disable-artstest], [do not try to compile and run a test ARTS program])], + [], [enable_artstest=yes]) - if test x$arts_prefix != x ; then - arts_args="$arts_args --arts-prefix=$arts_prefix" - if test x${ARTS_CONFIG+set} != xset ; then - ARTS_CONFIG=$arts_prefix/bin/artsc-config - fi - fi + AC_LANG_PUSH([C]) - AC_PATH_TOOL(ARTS_CONFIG, artsc-config, no) - - min_arts_version=ifelse([$1], ,0.9.5,$1) - AC_MSG_CHECKING(for ARTS artsc - version >= $min_arts_version) - no_arts="" - if test "$ARTS_CONFIG" = "no" ; then - no_arts=yes - else - ARTS_CFLAGS=`$ARTS_CONFIG $artsconf_args --cflags` - ARTS_LIBS=`$ARTS_CONFIG $artsconf_args --libs` + if test x"$arts_prefix" != x""; then + arts_args="$arts_args --arts-prefix=$arts_prefix" + test x"${ARTS_CONFIG+set}" != x"set" && ARTS_CONFIG="$arts_prefix/bin/artsc-config" + fi - arts_major_version=`$ARTS_CONFIG $arts_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` - arts_minor_version=`$ARTS_CONFIG $arts_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` - arts_micro_version=`$ARTS_CONFIG $arts_config_args --version | \ - sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` - if test "x$enable_artstest" = "xyes" ; then - ac_save_CFLAGS="$CFLAGS" - ac_save_LIBS="$LIBS" - CFLAGS="$CFLAGS $ARTS_CFLAGS" - LIBS="$LIBS $ARTS_LIBS" -dnl -dnl Check if the installed ARTS is actually available -- when cross-compiling, -dnl we have probably detected the build system's version of artsc-config -dnl - AC_CHECK_LIB([artsc], [arts_init], [], [no_arts=yes], [$ARTS_LIBS]) + min_arts_version=ifelse([$1], , [0.9.5], [$1]) + if test x"$enable_artstest" = x"no"; then + AC_MSG_CHECKING([for ARTS artsc - version >= $min_arts_version]) + else + AC_PATH_TOOL([ARTS_CONFIG], [artsc-config], [no]) + AC_MSG_CHECKING([for ARTS artsc - version >= $min_arts_version]) -dnl -dnl Now check if the installed ARTS is sufficiently new. (Also sanity -dnl checks the results of artsc-config to some extent) -dnl - rm -f conf.artstest - AC_RUN_IFELSE([AC_LANG_SOURCE([[ + if test x"$ARTS_CONFIG" = x"no"; then + with_arts=no + else + ARTS_CFLAGS=`$ARTS_CONFIG $artsconf_args --cflags` + ARTS_LIBS=`$ARTS_CONFIG $artsconf_args --libs` + arts_major_version=`$ARTS_CONFIG $arts_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + arts_minor_version=`$ARTS_CONFIG $arts_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + arts_micro_version=`$ARTS_CONFIG $arts_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $ARTS_CFLAGS" + ac_save_LIBS="$LIBS" LIBS="$ARTS_LIBS $LIBS" + + # Now check if the installed ARTS is sufficiently new. (Also sanity + # checks the results of arts-config to some extent) + + rm -f conf.artstest + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <artsc.h> -char* -my_strdup (char *str) -{ - char *new_str; - - if (str) - { - new_str = malloc ((strlen (str) + 1) * sizeof(char)); - strcpy (new_str, str); - } - else - new_str = NULL; - - return new_str; -} - -int main () +int main(int argc, char *argv[]) { - int major, minor, micro; - char *tmp_version; + int major, minor, micro; + char *tmp_version; + FILE *fp; - system ("touch conf.artstest"); - - /* HP/UX 9 (%@#!) writes to sscanf strings */ - tmp_version = my_strdup("$min_arts_version"); - if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { - printf("%s, bad version string\n", "$min_arts_version"); - exit(1); - } + if ((fp = fopen("conf.artstest", "w")) != NULL) { + fclose(fp); + } + else { + printf("*** could not write to file conf.artstest\n"); + exit(1); + } - if (($arts_major_version > major) || - (($arts_major_version == major) && ($arts_minor_version > minor)) || - (($arts_major_version == major) && ($arts_minor_version == minor) && ($arts_micro_version >= micro))) - { - return 0; + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = strdup("$min_arts_version"); + if (!tmp_version || sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_arts_version"); + exit(1); } - else + + if (($arts_major_version > major) || + (($arts_major_version == major) && ($arts_minor_version > minor)) || + (($arts_major_version == major) && ($arts_minor_version == minor) && + ($arts_micro_version >= micro))) { - printf("\n*** 'artsc-config --version' returned %d.%d.%d, but the minimum version\n", $arts_major_version, $arts_minor_version, $arts_micro_version); - printf("*** of ARTS required is %d.%d.%d. If artsc-config is correct, then it is\n", major, minor, micro); - printf("*** best to upgrade to the required version.\n"); - printf("*** If artsc-config was wrong, set the environment variable ARTS_CONFIG\n"); - printf("*** to point to the correct copy of artsc-config, and remove the file\n"); - printf("*** config.cache before re-running configure\n"); - return 1; + return 0; } -} + printf("\n*** 'artsc-config --version' returned %d.%d.%d, but the minimum version\n", $arts_major_version, $arts_minor_version, $arts_micro_version); + printf("*** of ARTS required is %d.%d.%d. If artsc-config is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If artsc-config was wrong, set the environment variable ARTS_CONFIG\n"); + printf("*** to point to the correct copy of artsc-config, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); -]])],[],[no_arts=yes],[no_arts=cc]) + return 1; +} + ]])], [], [with_arts=no], [with_arts=cc]) + if test x"$with_arts" = x"cc"; then + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> + #include <artsc.h>]], [[return 0]])], + [with_arts=yes], [with_arts=no]) + fi + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi - if test "x$no_arts" = "xcc"; then - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -#include <stdio.h> -#include <artsc.h> -]], [[ return 0; ]])],[no_arts=''],[no_arts=yes]) - fi - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - if test "x$no_arts" = x ; then - AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - else - AC_MSG_RESULT(no) - if test "$ARTS_CONFIG" = "no" ; then - echo "*** The artsc-config script installed by ARTS could not be found" - echo "*** If ARTS was installed in PREFIX, make sure PREFIX/bin is in" - echo "*** your path, or set the ARTS_CONFIG environment variable to the" - echo "*** full path to artsc-config." - else - if test -f conf.artstest ; then - : - else - echo "*** Could not run ARTS test program, checking why..." - CFLAGS="$CFLAGS $ARTS_CFLAGS" - LIBS="$LIBS $ARTS_LIBS" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ -#include <stdio.h> -#include <artsc.h> -]], [[ return 0; ]])], - [ echo "*** The test program compiled, but did not run. This usually means" - echo "*** that the run-time linker is not finding ARTS or finding the wrong" - echo "*** version of ARTS. If it is not finding ARTS, you'll need to set your" - echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" - echo "*** to the installed location Also, make sure you have run ldconfig if that" - echo "*** is required on your system" - echo "***" - echo "*** If you have an old version installed, it is best to remove it, although" - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], - [ echo "*** The test program failed to compile or link. See the file config.log for the" - echo "*** exact error that occured. This usually means ARTS was incorrectly installed" - echo "*** or that you have moved ARTS since it was installed. In the latter case, you" - echo "*** may want to edit the artsc-config script: $ARTS_CONFIG" ]) - CFLAGS="$ac_save_CFLAGS" - LIBS="$ac_save_LIBS" - fi - fi - ARTS_CFLAGS="" - ARTS_LIBS="" - ifelse([$3], , :, [$3]) - fi - AC_SUBST(ARTS_CFLAGS) - AC_SUBST(ARTS_LIBS) - rm -f conf.artstest + if test x"$with_arts" != x"no"; then + AC_MSG_RESULT([yes]) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT([no]) + if test x"$enable_artstest" != x"no"; then + if test x"$ARTS_CONFIG" = x"no"; then + echo "*** The arts-config script installed by aRts could not be found" + echo "*** If aRts was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the ARTS_CONFIG environment variable to the" + echo "*** full path to arts-config." + else + if test ! -f conf.artstest ; then + echo "*** Could not run aRts test program, checking why..." + CFLAGS="$CFLAGS $ARTS_CFLAGS" + LIBS="$ARTS_LIBS $LIBS" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h> + #include <artsc.h>]], [[return 0]])], + [echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding aRts or finding the wrong" + echo "*** version of aRts. If it is not finding aRts, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location. Also, make sure you have run ldconfig if that" + echo "*** is required on your system." + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH." + echo "***"], + [echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occurred. This usually means aRtS was incorrectly installed" + echo "*** or that you have moved aRts since it was installed. In the latter case, you" + echo "*** may want to edit the arts-config script: $ARTS_CONFIG"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + else + rm -f conf.artstest + fi + fi + fi + ARTS_CFLAGS="" + ARTS_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(ARTS_CFLAGS) + AC_SUBST(ARTS_LIBS) + AC_LANG_POP([C]) ]) diff --git a/m4/audio_out.m4 b/m4/audio_out.m4 index 625124ac7..8c2d63f86 100644 --- a/m4/audio_out.m4 +++ b/m4/audio_out.m4 @@ -67,13 +67,15 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ dnl Alsa support AC_ARG_WITH([alsa], [AS_HELP_STRING([--with-alsa], [Build with ALSA audio output support])], - [], [test $default_with_alsa = without && with_alsa="no"]) + [test x"$withval" != x"no" && with_alsa="yes"], + [test $default_with_alsa = without && with_alsa="no"]) if test x"$with_alsa" != x"no"; then PKG_CHECK_MODULES([ALSA], [alsa >= 0.9.0], [have_alsa=yes], [have_alsa=no]) - if test x"$have_alsa" = x"yes"; then - AC_DEFINE([HAVE_ALSA], 1, [Define this if you have ALSA installed]) - elif test x"$with_alsa" = x"yes"; then + if test x"$with_alsa" = x"yes" && test x"$have_alsa" != x"yes"; then AC_MSG_ERROR([ALSA support requested but not found.]) + elif test x"$have_alsa" = x"yes"; then + dnl This is needed by src/input/input_v4l.c + AC_DEFINE([HAVE_ALSA], 1, [Define this if you have ALSA installed]) fi fi AM_CONDITIONAL([ENABLE_ALSA], [test x"$have_alsa" = x"yes"]) @@ -82,35 +84,42 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ dnl aRts support AC_ARG_WITH([arts], [AS_HELP_STRING([--with-arts], [Build with aRts audio output support])], - [], [test $default_with_arts = without && with_arts="no"]) + [test x"$withval" != x"no" && with_arts="yes"], + [test $default_with_arts = without && with_arts="no"]) if test x"$with_arts" != x"no"; then AM_PATH_ARTS([0.9.5], [AC_DEFINE([HAVE_ARTS], 1, [Define this if you have aRts (libartsc) installed])]) - else - no_arts=yes fi - AM_CONDITIONAL([ENABLE_ARTS], [test x"$no_arts" != x"yes"]) + AM_CONDITIONAL([ENABLE_ARTS], [test x"$with_arts" != x"no"]) dnl CoreAudio for Mac OS X - dnl TODO: CoreAudio tests could be much better, but there's not really much need AC_ARG_ENABLE([coreaudio], [AS_HELP_STRING([--enable-coreaudio], [Enable support for Mac OS X CoreAudio])], - [have_coreaudio="$enableval"], - [test $default_enable_coreaudio = disable && have_coreaudio="no"]) - AM_CONDITIONAL([ENABLE_COREAUDIO], [test x"$have_coreaudio" != x"no"]) + [test x"$enableval" != x"no" && enable_coreaudio="yes"], + [test $default_enable_coreaudio = disable && enable_coreaudio="no"]) + if test x"$enable_coreaudio" != x"no"; then + AC_MSG_CHECKING([for CoreAudio frameworks]) + ac_save_LIBS="$LIBS" LIBS="$LIBS -framework CoreAudio -framework AudioUnit" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[return 0]])], [have_coreaudio=yes], [have_coreaudio=no]) + LIBS="$ac_save_LIBS" + AC_MSG_RESULT([$have_coreaudio]) + if test x"$enable_coreaudio" = x"yes" && test x$"have_coreaudio" != x"yes"; then + AC_MSG_ERROR([CoreAudio support requested, but CoreAudio not found]) + fi + fi + AM_CONDITIONAL([ENABLE_COREAUDIO], [test x"$have_coreaudio" = x"yes"]) dnl EsounD support AC_ARG_WITH([esound], [AS_HELP_STRING([--with-esound], [Build with EsounD audio output support])], - [], [test $default_with_esound = without && with_esound="no"]) + [test x"$withval" != x"no" && with_esound="yes"], + [test $default_with_esound = without && with_esound="no"]) if test x"$with_esound" != x"no"; then PKG_CHECK_MODULES([ESD], [esound], [have_esound=yes], [have_esound=no]) - if test x"$with_esound" = x"yes" && test x"$have_esound" = x"no"; then - AC_MSG_ERROR([EsounD support requested, but libesd not found]) - elif test x"$have_esound" = x"yes"; then - AC_DEFINE([HAVE_ESD], 1, [Define this if you have EsounD installed]) + if test x"$with_esound" = x"yes" && test x"$have_esound" != x"yes"; then + AC_MSG_ERROR([EsounD support requested, but EsounD not found]) fi fi AM_CONDITIONAL([ENABLE_ESD], [test x"$have_esound" = x"yes"]) @@ -119,20 +128,22 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ dnl FusionSound support AC_ARG_WITH([fusionsound], [AS_HELP_STRING([--with-fusionsound], [Build with FunsionSound audio output support])], - [], [test $default_with_fusionsound = without && with_fusionsound="no"]) + [test x"$withval" != x"no" && with_fusionsound="yes"], + [test $default_with_fusionsound = without && with_fusionsound="no"]) if test x"$with_fusionsound" != x"no"; then - PKG_CHECK_MODULES([FUSIONSOUND], [fusionsound >= 0.9.23], - [AC_DEFINE([HAVE_FUSIONSOUND], 1, [Define to 1 if you have FusionSound.])], []) - else - no_fusionsound=yes + PKG_CHECK_MODULES([FUSIONSOUND], [fusionsound >= 0.9.23], [have_fusionsound=yes], [have_fusionsound=no]) + if test x"$with_fusionsound" = x"yes" && test x"$have_fusionsound" != x"yes"; then + AC_MSG_ERROR([FusionSound support requested, but FusionSound not found]) + fi fi - AM_CONDITIONAL([ENABLE_FUSIONSOUND], [test x"$no_fusionsound" != x"yes"]) + AM_CONDITIONAL([ENABLE_FUSIONSOUND], [test x"$have_fusionsound" = x"yes"]) dnl IRIX style audio interface AC_ARG_ENABLE([irixal], [AS_HELP_STRING([--enable-irixal], [Enable support for IRIX libaudio])], - [], [test $default_enable_irixal = disable && enable_irixal="no"]) + [test x"$enableval" != x"no" && enable_irixal="yes"], + [test $default_enable_irixal = disable && enable_irixal="no"]) if test x"$enable_irixal" != x"no"; then AC_CACHE_CHECK([for IRIX libaudio support], [am_cv_have_irixal], [AC_CHECK_HEADER([dmedia/audio.h], @@ -151,10 +162,11 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ dnl JACK support AC_ARG_WITH([jack], [AS_HELP_STRING([--with-jack], [Build with Jack support])], - [], [test $default_with_jack = without && with_jack="no"]) + [test x"$withval" != x"no" && with_jack="yes"], + [test $default_with_jack = without && with_jack="no"]) if test x"$with_jack" != x"no"; then PKG_CHECK_MODULES([JACK], [jack >= 0.100], [have_jack=yes], [have_jack=no]) - if test x"$with_jack" = x"yes" && test x"$have_jack" = x"no"; then + if test x"$with_jack" = x"yes" && test x"$have_jack" != x"yes"; then AC_MSG_ERROR([Jack support requested, but Jack not found]) fi fi @@ -164,20 +176,23 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ dnl OSS (Open Sound System) AC_ARG_ENABLE([oss], [AS_HELP_STRING([--enable-oss], [Enable OSS (Open Sound System) support])], - [], [test $default_enable_oss = disable && enable_oss="no"]) + [test x"$enableval" != x"no" && enable_oss="yes"], + [test $default_enable_oss = disable && enable_oss="no"]) if test x"$enable_oss" != x"no"; then AC_CHECK_HEADERS([sys/soundcard.h machine/soundcard.h soundcard.h], [break]) - AC_CHECK_DECL([SNDCTL_DSP_SETFRAGMENT], [have_ossaudio=yes], [], - [#ifdef HAVE_SYS_SOUNDCARD_H - # include <sys/soundcard.h> - #endif - #ifdef HAVE_MACHINE_SOUNDCARD_H - # include <sys/soundcard.h> - #endif - #ifdef HAVE_SOUNDCARD_H - # include <soundcard.h> - #endif - ]) + AC_CHECK_DECL([SNDCTL_DSP_SETFRAGMENT], [have_oss=yes], [have_oss=no], + [#ifdef HAVE_SYS_SOUNDCARD_H + # include <sys/soundcard.h> + #endif + #ifdef HAVE_MACHINE_SOUNDCARD_H + # include <sys/soundcard.h> + #endif + #ifdef HAVE_SOUNDCARD_H + # include <soundcard.h> + #endif]) + if test x"$enable_oss" = x"yes" && test x"$have_oss" != x"yes"; then + AC_MSG_ERROR([OSS support requested, but OSS not found]) + fi fi AM_CONDITIONAL([ENABLE_OSS], [test x"$have_ossaudio" = x"yes"]) @@ -185,9 +200,13 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ dnl PulseAudio AC_ARG_WITH([pulseaudio], [AS_HELP_STRING([--with-pulseaudio], [Build with PulseAudio support])], - [], [test $default_with_pulseaudio = without && with_pulseaudio="no"]) + [test x"$withval" != x"no" && with_pulseaudio="yes"], + [test $default_with_pulseaudio = without && with_pulseaudio="no"]) if test x"$with_pulseaudio" != x"no"; then PKG_CHECK_MODULES([PULSEAUDIO], [libpulse], [have_pulseaudio="yes"], [have_pulseaudio="no"]) + if test x"$with_pulseaudio" = x"yes" && test x"$have_pulseaudio" != x"yes"; then + AC_MSG_ERROR([PulseAudio support requested, but PulseAudio not found]) + fi fi AM_CONDITIONAL([ENABLE_PULSEAUDIO], [test x"$have_pulseaudio" = x"yes"]) @@ -195,7 +214,8 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ dnl SUN style audio interface AC_ARG_ENABLE([sunaudio], [AS_HELP_STRING([--enable-sunaudio], [Enable Sun audio support])], - [], [test $default_enable_sunaudio = disable && enable_sunaudio="no"]) + [test x"$enableval" != x"no" && enable_sunaudio="yes"], + [test $default_enable_sunaudio = disable && enable_sunaudio="no"]) if test x"$enable_sunaudio" != x"no"; then AC_MSG_CHECKING([for Sun audio support]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> @@ -203,7 +223,9 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ [[audio_info_t audio_info; AUDIO_INITINFO(&audio_info)]])], [have_sunaudio=yes], [have_sunaudio=no]) AC_MSG_RESULT([$have_sunaudio]) - if test x"$have_sunaudio" = x"yes"; then + if test x"$enable_sunaudio" = x"yes" && test x"$have_sunaudio" != x"yes"; then + AC_MSG_ERROR([Sun audio support requested, but Sun audio not found]) + elif test x"$have_sunaudio" = x"yes"; then dnl NetBSD and OpenBSD don't have this, but check for it dnl rather than assuming that it doesn't happen elsewhere. AC_CHECK_MEMBERS([audio_info_t.output_muted]) diff --git a/m4/summary.m4 b/m4/summary.m4 index a93e3f79c..67a1522f4 100644 --- a/m4/summary.m4 +++ b/m4/summary.m4 @@ -322,39 +322,17 @@ AC_DEFUN([XINE_LIB_SUMMARY], [ dnl Audio plugins echo " * audio driver plugins:" - if test "x$have_ossaudio" = "xyes"; then - echo " - oss (Open Sound System)" - fi - if test "x$have_alsa" = "xyes"; then - echo " - alsa" - fi - if test "x$have_esound" = "xyes"; then - echo " - esd (Enlightened Sound Daemon)" - fi - if test "x$no_arts" != "xyes"; then - echo " - arts (aRts - KDE soundserver)" - fi - if test "x$no_fusionsound" != "xyes"; then - echo " - fusionsound (FusionSound driver)" - fi - if test "x$have_sunaudio" = "xyes"; then - echo " - sun ()" - fi - if test "x$am_cv_have_irixal" = xyes; then - echo " - irixal (Irix audio library)" - fi - if test "x$have_directx" = "xyes"; then - echo " - directx (DirectX audio driver)" - fi - if test "x$have_coreaudio" = "xyes"; then - echo " - CoreAudio (Mac OS X audio driver)" - fi - if test "x$have_pulseaudio" = "xyes"; then - echo " - pulseaudio sound server" - fi - if test "x$have_jack" = "xyes"; then - echo " - Jack" - fi + test x"$have_alsa" = x"yes" && echo " - alsa (ALSA - Advanced Linux Sound Architecture)" + test x"$with_arts" != x"no" && echo " - arts (aRts - KDE soundserver)" + test x"$have_coreaudio" = x"yes" && echo " - CoreAudio (Mac OS X audio driver)" + test x"$have_directx" = x"yes" && echo " - directx (DirectX audio driver)" + test x"$have_esound" = x"yes" && echo " - esd (Enlightened Sound Daemon)" + test x"$have_fusionsound" = x"yes" && echo " - fusionsound (FusionSound driver)" + test x"$am_cv_have_irixal" = x"yes" && echo " - irixal (Irix audio library)" + test x"$have_jack" = x"yes" && echo " - Jack" + test x"$have_oss" = x"yes" && echo " - oss (Open Sound System)" + test x"$have_pulseaudio" = x"yes" && echo " - pulseaudio (PulseAudio sound server)" + test x"$have_sunaudio" = x"yes" && echo " - sun (Sun audio interface)" echo "---" |