Make rule in configure.ac to autodetect ALSA and OSS suport
This simple disable ALSA or OSS:
dnl ================================================================
dnl Check for OSS
dnl ================================================================
AC_ARG_ENABLE(oss,
[AC_HELP_STRING([--disable-oss],
[OSS support [default=autodetect]])],,
enable_oss=yes)
if test "x$enable_oss" = xyes ; then
AC_CHECK_HEADER(sys/soundcard.h, have_oss=yes, have_oss=no)
AC_CHECK_HEADER(machine/soundcard.h, have_oss=yes, )
if test "$have_oss" = yes; then
AC_DEFINE(HAVE_OSS,,[Define to enable OSS input module])
fi
else
have_oss=no
fi
AM_CONDITIONAL(HAVE_OSS,test "$have_oss" = yes)
dnl ================================================================
dnl Check for ALSA audio
dnl ================================================================
AC_ARG_ENABLE(alsa,
[AC_HELP_STRING([--disable-alsa],
[ALSA support [default=autodetect]])],,
enable_alsa=yes)
if test "x$enable_alsa" = xyes ; then
AC_CHECK_HEADER(alsa/asoundlib.h, have_alsa=yes, have_alsa=no)
if test "$have_alsa" = yes; then
ALSA_LIBS="-lasound"
AC_DEFINE(HAVE_ALSA, ,[Define to enable ALSA input module])
fi
else
have_alsa=no
fi
AM_CONDITIONAL(HAVE_ALSA,test "$have_alsa" = yes)
I want to make rule in configure.ac to autodetect OSS and ALSA:
Autodetect ALSA and OSS
If ALSA found then disable OSS support
If ALSA not found then back to OSS and enable support
Any help is wellcome.
Best regards
No comments:
Post a Comment