--- a/configure Mon Jan 28 02:38:09 2008 +0000 +++ b/configure Sun Mar 02 11:38:08 2008 +0000 @@ -717,6 +717,10 @@ ESOUND_LIBS AUDIO_ESOUND_TRUE AUDIO_ESOUND_FALSE +ALSA_CFLAGS +ALSA_LIBS +AUDIO_ALSA_TRUE +AUDIO_ALSA_FALSE CDROM_LINUX_TRUE CDROM_LINUX_FALSE JOY_LINUX_TRUE @@ -766,7 +770,9 @@ GTK_CFLAGS GTK_LIBS ESOUND_CFLAGS -ESOUND_LIBS' +ESOUND_LIBS +ALSA_CFLAGS +ALSA_LIBS' # Initialize some variables set by options. @@ -1371,6 +1377,8 @@ ESOUND_CFLAGS C compiler flags for ESOUND, overriding pkg-config ESOUND_LIBS linker flags for ESOUND, overriding pkg-config + ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config + ALSA_LIBS linker flags for ALSA, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -5957,9 +5965,9 @@ { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } - echo "Warning: esound not found - building without audio support" + echo "Warning: esound not found - building without esd audio support" elif test $pkg_failed = untried; then - echo "Warning: esound not found - building without audio support" + echo "Warning: esound not found - building without esd audio support" else ESOUND_CFLAGS=$pkg_cv_ESOUND_CFLAGS ESOUND_LIBS=$pkg_cv_ESOUND_LIBS @@ -5984,6 +5992,94 @@ fi + +pkg_failed=no +{ echo "$as_me:$LINENO: checking for ALSA" >&5 +echo $ECHO_N "checking for ALSA... $ECHO_C" >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$ALSA_CFLAGS"; then + pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"alsa\"") >&5 + ($PKG_CONFIG --exists --print-errors "alsa") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$ALSA_LIBS"; then + pkg_cv_ALSA_LIBS="$ALSA_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"alsa\"") >&5 + ($PKG_CONFIG --exists --print-errors "alsa") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "alsa"` + else + ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "alsa"` + fi + # Put the nasty error message in config.log where it belongs + echo "$ALSA_PKG_ERRORS" >&5 + + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + echo "Warning: alsa not found - building without alsa audio support" +elif test $pkg_failed = untried; then + echo "Warning: alsa not found - building without alsa audio support" +else + ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS + ALSA_LIBS=$pkg_cv_ALSA_LIBS + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + + HAVE_ALSA='yes' + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALSA 1 +_ACEOF + +fi + + +if test "$HAVE_ALSA" = 'yes' ; then + AUDIO_ALSA_TRUE= + AUDIO_ALSA_FALSE='#' +else + AUDIO_ALSA_TRUE='#' + AUDIO_ALSA_FALSE= +fi + + if test "${ac_cv_header_linux_cdrom_h+set}" = set; then { echo "$as_me:$LINENO: checking for linux/cdrom.h" >&5 echo $ECHO_N "checking for linux/cdrom.h... $ECHO_C" >&6; } @@ -8239,6 +8335,13 @@ Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${AUDIO_ALSA_TRUE}" && test -z "${AUDIO_ALSA_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AUDIO_ALSA\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AUDIO_ALSA\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${CDROM_LINUX_TRUE}" && test -z "${CDROM_LINUX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"CDROM_LINUX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -8948,6 +9051,10 @@ ESOUND_LIBS!$ESOUND_LIBS$ac_delim AUDIO_ESOUND_TRUE!$AUDIO_ESOUND_TRUE$ac_delim AUDIO_ESOUND_FALSE!$AUDIO_ESOUND_FALSE$ac_delim +ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim +ALSA_LIBS!$ALSA_LIBS$ac_delim +AUDIO_ALSA_TRUE!$AUDIO_ALSA_TRUE$ac_delim +AUDIO_ALSA_FALSE!$AUDIO_ALSA_FALSE$ac_delim CDROM_LINUX_TRUE!$CDROM_LINUX_TRUE$ac_delim CDROM_LINUX_FALSE!$CDROM_LINUX_FALSE$ac_delim JOY_LINUX_TRUE!$JOY_LINUX_TRUE$ac_delim @@ -8983,7 +9090,7 @@ LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 40; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 44; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5