diff options
Diffstat (limited to 'm4/audio_out.m4')
-rw-r--r-- | m4/audio_out.m4 | 122 |
1 files changed, 47 insertions, 75 deletions
diff --git a/m4/audio_out.m4 b/m4/audio_out.m4 index 569d72cc2..85ea5cd00 100644 --- a/m4/audio_out.m4 +++ b/m4/audio_out.m4 @@ -15,60 +15,59 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ dnl - PulseAudio has been tested on Linux, Solaris, FreeBSD, Windows dnl - SunAudio is NetBSD, OpenBSD, Solaris (anything else?) - default_enable_coreaudio=disable - default_enable_irixal=disable - default_enable_oss=enable - default_enable_sunaudio=disable - - default_with_alsa=without - default_with_esound=with - default_with_fusionsound=without - default_with_jack=without - default_with_pulseaudio=without + default_enable_coreaudio=no + default_enable_irixal=no + default_enable_oss=yes + default_enable_sunaudio=no + default_enable_sndio=no + + default_with_alsa=no + default_with_esound=yes + default_with_fusionsound=no + default_with_jack=no + default_with_pulseaudio=no case "$host_os" in cygwin* | mingw*) - default_enable_oss=disable - default_with_pulseaudio=with + default_enable_oss=no + default_with_pulseaudio=yes ;; darwin*) - default_enable_coreaudio=enable - default_with_jack=with - default_enable_oss=disable + default_enable_coreaudio=yes + default_with_jack=yes + default_enable_oss=no ;; freebsd*) - default_with_pulseaudio=with + default_with_pulseaudio=yes ;; irix*) - default_enable_irixal=enable - default_enable_oss=disable + default_enable_irixal=yes + default_enable_oss=no ;; linux*) - default_with_alsa=with - default_with_jack=with - default_with_pulseaudio=with + default_with_alsa=yes + default_with_jack=yes + default_with_pulseaudio=yes ;; netbsd*) - default_enable_sunaudio=enable + default_enable_sunaudio=yes ;; openbsd*) - default_enable_sunaudio=enable + default_enable_sunaudio=yes + default_enable_sndio=yes ;; solaris*) - default_with_pulseaudio=with - default_enable_sunaudio=enable + default_with_pulseaudio=yes + default_enable_sunaudio=yes ;; esac dnl Alsa support - AC_ARG_WITH([alsa], - [AS_HELP_STRING([--with-alsa], [Build with ALSA audio output support])], - [test x"$withval" != x"no" && with_alsa="yes"], - [test $default_with_alsa = without && with_alsa="no"]) + XINE_ARG_WITH([alsa], [Build with ALSA audio output support]) 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"$with_alsa" = x"yes" && test x"$have_alsa" != x"yes"; then + if test x"$hard_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 @@ -79,17 +78,14 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ dnl CoreAudio for Mac OS X - AC_ARG_ENABLE([coreaudio], - [AS_HELP_STRING([--enable-coreaudio], [Enable support for Mac OS X CoreAudio])], - [test x"$enableval" != x"no" && enable_coreaudio="yes"], - [test $default_enable_coreaudio = disable && enable_coreaudio="no"]) + XINE_ARG_ENABLE([coreaudio], [Enable support for Mac OS X CoreAudio]) 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 + if test x"hard_$enable_coreaudio" = x"yes" && test x"$have_coreaudio" != x"yes"; then AC_MSG_ERROR([CoreAudio support requested, but CoreAudio not found]) fi fi @@ -97,13 +93,10 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ dnl EsounD support - AC_ARG_WITH([esound], - [AS_HELP_STRING([--with-esound], [Build with EsounD audio output support])], - [test x"$withval" != x"no" && with_esound="yes"], - [test $default_with_esound = without && with_esound="no"]) + XINE_ARG_WITH([esound], [Build with EsounD audio output support]) 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"yes"; then + if test x"$hard_with_esound" = x"yes" && test x"$have_esound" != x"yes"; then AC_MSG_ERROR([EsounD support requested, but EsounD not found]) fi fi @@ -111,13 +104,10 @@ 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 x"$withval" != x"no" && with_fusionsound="yes"], - [test $default_with_fusionsound = without && with_fusionsound="no"]) + XINE_ARG_WITH([fusionsound], [Build with FunsionSound audio output support]) if test x"$with_fusionsound" != x"no"; then 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 + if test x"$hard_with_fusionsound" = x"yes" && test x"$have_fusionsound" != x"yes"; then AC_MSG_ERROR([FusionSound support requested, but FusionSound not found]) fi fi @@ -125,10 +115,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ dnl IRIX style audio interface - AC_ARG_ENABLE([irixal], - [AS_HELP_STRING([--enable-irixal], [Enable support for IRIX libaudio])], - [test x"$enableval" != x"no" && enable_irixal="yes"], - [test $default_enable_irixal = disable && enable_irixal="no"]) + XINE_ARG_ENABLE([irixal], [Enable support for IRIX libaudio]) 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], @@ -145,13 +132,10 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ dnl JACK support - AC_ARG_WITH([jack], - [AS_HELP_STRING([--with-jack], [Build with Jack support])], - [test x"$withval" != x"no" && with_jack="yes"], - [test $default_with_jack = without && with_jack="no"]) + XINE_ARG_WITH([jack], [Build with Jack support]) 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"yes"; then + if test x"$hard_with_jack" = x"yes" && test x"$have_jack" != x"yes"; then AC_MSG_ERROR([Jack support requested, but Jack not found]) fi fi @@ -159,10 +143,7 @@ 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 x"$enableval" != x"no" && enable_oss="yes"], - [test $default_enable_oss = disable && enable_oss="no"]) + XINE_ARG_ENABLE([oss], [Enable OSS (Open Sound System) support]) 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_oss=yes], [have_oss=no], @@ -175,7 +156,7 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ #ifdef HAVE_SOUNDCARD_H # include <soundcard.h> #endif]) - if test x"$enable_oss" = x"yes" && test x"$have_oss" != x"yes"; then + if test x"$hard_enable_oss" = x"yes" && test x"$have_oss" != x"yes"; then AC_MSG_ERROR([OSS support requested, but OSS not found]) fi fi @@ -183,13 +164,10 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ dnl PulseAudio - AC_ARG_WITH([pulseaudio], - [AS_HELP_STRING([--with-pulseaudio], [Build with PulseAudio support])], - [test x"$withval" != x"no" && with_pulseaudio="yes"], - [test $default_with_pulseaudio = without && with_pulseaudio="no"]) + XINE_ARG_WITH([pulseaudio], [Build with PulseAudio support]) 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 + if test x"$hard_with_pulseaudio" = x"yes" && test x"$have_pulseaudio" != x"yes"; then AC_MSG_ERROR([PulseAudio support requested, but PulseAudio not found]) fi if test x"$have_pulseaudio" = xyes; then @@ -207,10 +185,7 @@ 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 x"$enableval" != x"no" && enable_sunaudio="yes"], - [test $default_enable_sunaudio = disable && enable_sunaudio="no"]) + XINE_ARG_ENABLE([sunaudio], [Enable Sun audio support]) 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> @@ -218,7 +193,7 @@ 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"$enable_sunaudio" = x"yes" && test x"$have_sunaudio" != x"yes"; then + if test x"$hard_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 @@ -230,14 +205,11 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [ dnl sndio support - AC_ARG_ENABLE([sndio], - [AS_HELP_STRING([--without-sndio], [Build without sndio support])], - [test x"$enableval" != x"no" && enable_sndio="yes"], - [test x"$default_enable_sndio" = x"disable" && enable_sndio="no"]) - if test "x$enable_sndio" != "xno"; then + XINE_ARG_ENABLE([sndio], [Enable sndio support]) + if test x"$enable_sndio" != "xno"; then AC_CHECK_LIB([sndio], [sio_open], [SNDIO_LIBS=-lsndio; have_sndio=yes], [have_sndio=no]) - if test "x$enable_sndio" = "xyes" && test "x$have_sndio" = "xno"; then + if test "x$hard_enable_sndio" = "xyes" && test "x$have_sndio" = "xno"; then AC_MSG_ERROR([sndio support requested, but sndio not found]) fi fi |