filename | configure |
changeset | 643:653b0a70f173 |
prev | 614:a2d239d4438a |
next | 653:3202ff01d48e |
author | bhaal22 |
date | Tue Feb 26 01:10:48 2008 +0000 (16 years ago) |
permissions | -rw-r--r-- |
last change | Commit initial ALSA audio driver Add init/shutdown stubs to audio driver structure |
file | annotate | diff | log | raw |
1.1 --- a/configure Mon Jan 28 02:38:09 2008 +00001.2 +++ b/configure Tue Feb 26 01:10:48 2008 +00001.3 @@ -717,6 +717,10 @@1.4 ESOUND_LIBS1.5 AUDIO_ESOUND_TRUE1.6 AUDIO_ESOUND_FALSE1.7 +ALSA_CFLAGS1.8 +ALSA_LIBS1.9 +AUDIO_ALSA_TRUE1.10 +AUDIO_ALSA_FALSE1.11 CDROM_LINUX_TRUE1.12 CDROM_LINUX_FALSE1.13 JOY_LINUX_TRUE1.14 @@ -766,7 +770,9 @@1.15 GTK_CFLAGS1.16 GTK_LIBS1.17 ESOUND_CFLAGS1.18 -ESOUND_LIBS'1.19 +ESOUND_LIBS1.20 +ALSA_CFLAGS1.21 +ALSA_LIBS'1.24 # Initialize some variables set by options.1.25 @@ -1371,6 +1377,8 @@1.26 ESOUND_CFLAGS1.27 C compiler flags for ESOUND, overriding pkg-config1.28 ESOUND_LIBS linker flags for ESOUND, overriding pkg-config1.29 + ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config1.30 + ALSA_LIBS linker flags for ALSA, overriding pkg-config1.32 Use these variables to override the choices made by `configure' or to help1.33 it to find libraries and programs with nonstandard names/locations.1.34 @@ -5957,9 +5965,9 @@1.36 { echo "$as_me:$LINENO: result: no" >&51.37 echo "${ECHO_T}no" >&6; }1.38 - echo "Warning: esound not found - building without audio support"1.39 + echo "Warning: esound not found - building without esd audio support"1.40 elif test $pkg_failed = untried; then1.41 - echo "Warning: esound not found - building without audio support"1.42 + echo "Warning: esound not found - building without esd audio support"1.43 else1.44 ESOUND_CFLAGS=$pkg_cv_ESOUND_CFLAGS1.45 ESOUND_LIBS=$pkg_cv_ESOUND_LIBS1.46 @@ -5984,6 +5992,94 @@1.47 fi1.50 +1.51 +pkg_failed=no1.52 +{ echo "$as_me:$LINENO: checking for ALSA" >&51.53 +echo $ECHO_N "checking for ALSA... $ECHO_C" >&6; }1.54 +1.55 +if test -n "$PKG_CONFIG"; then1.56 + if test -n "$ALSA_CFLAGS"; then1.57 + pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"1.58 + else1.59 + if test -n "$PKG_CONFIG" && \1.60 + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"alsa\"") >&51.61 + ($PKG_CONFIG --exists --print-errors "alsa") 2>&51.62 + ac_status=$?1.63 + echo "$as_me:$LINENO: \$? = $ac_status" >&51.64 + (exit $ac_status); }; then1.65 + pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`1.66 +else1.67 + pkg_failed=yes1.68 +fi1.69 + fi1.70 +else1.71 + pkg_failed=untried1.72 +fi1.73 +if test -n "$PKG_CONFIG"; then1.74 + if test -n "$ALSA_LIBS"; then1.75 + pkg_cv_ALSA_LIBS="$ALSA_LIBS"1.76 + else1.77 + if test -n "$PKG_CONFIG" && \1.78 + { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"alsa\"") >&51.79 + ($PKG_CONFIG --exists --print-errors "alsa") 2>&51.80 + ac_status=$?1.81 + echo "$as_me:$LINENO: \$? = $ac_status" >&51.82 + (exit $ac_status); }; then1.83 + pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`1.84 +else1.85 + pkg_failed=yes1.86 +fi1.87 + fi1.88 +else1.89 + pkg_failed=untried1.90 +fi1.91 +1.92 +1.93 +1.94 +if test $pkg_failed = yes; then1.95 +1.96 +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then1.97 + _pkg_short_errors_supported=yes1.98 +else1.99 + _pkg_short_errors_supported=no1.100 +fi1.101 + if test $_pkg_short_errors_supported = yes; then1.102 + ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "alsa"`1.103 + else1.104 + ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "alsa"`1.105 + fi1.106 + # Put the nasty error message in config.log where it belongs1.107 + echo "$ALSA_PKG_ERRORS" >&51.108 +1.109 + { echo "$as_me:$LINENO: result: no" >&51.110 +echo "${ECHO_T}no" >&6; }1.111 + echo "Warning: alsa not found - building without alsa audio support"1.112 +elif test $pkg_failed = untried; then1.113 + echo "Warning: alsa not found - building without alsa audio support"1.114 +else1.115 + ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS1.116 + ALSA_LIBS=$pkg_cv_ALSA_LIBS1.117 + { echo "$as_me:$LINENO: result: yes" >&51.118 +echo "${ECHO_T}yes" >&6; }1.119 +1.120 + HAVE_ALSA='yes'1.121 +1.122 +cat >>confdefs.h <<\_ACEOF1.123 +#define HAVE_ALSA 11.124 +_ACEOF1.125 +1.126 +fi1.127 +1.128 +1.129 +if test "$HAVE_ALSA" = 'yes' ; then1.130 + AUDIO_ALSA_TRUE=1.131 + AUDIO_ALSA_FALSE='#'1.132 +else1.133 + AUDIO_ALSA_TRUE='#'1.134 + AUDIO_ALSA_FALSE=1.135 +fi1.136 +1.137 +1.138 if test "${ac_cv_header_linux_cdrom_h+set}" = set; then1.139 { echo "$as_me:$LINENO: checking for linux/cdrom.h" >&51.140 echo $ECHO_N "checking for linux/cdrom.h... $ECHO_C" >&6; }1.141 @@ -8239,6 +8335,13 @@1.142 Usually this means the macro was only invoked conditionally." >&2;}1.143 { (exit 1); exit 1; }; }1.144 fi1.145 +if test -z "${AUDIO_ALSA_TRUE}" && test -z "${AUDIO_ALSA_FALSE}"; then1.146 + { { echo "$as_me:$LINENO: error: conditional \"AUDIO_ALSA\" was never defined.1.147 +Usually this means the macro was only invoked conditionally." >&51.148 +echo "$as_me: error: conditional \"AUDIO_ALSA\" was never defined.1.149 +Usually this means the macro was only invoked conditionally." >&2;}1.150 + { (exit 1); exit 1; }; }1.151 +fi1.152 if test -z "${CDROM_LINUX_TRUE}" && test -z "${CDROM_LINUX_FALSE}"; then1.153 { { echo "$as_me:$LINENO: error: conditional \"CDROM_LINUX\" was never defined.1.154 Usually this means the macro was only invoked conditionally." >&51.155 @@ -8948,6 +9051,10 @@1.156 ESOUND_LIBS!$ESOUND_LIBS$ac_delim1.157 AUDIO_ESOUND_TRUE!$AUDIO_ESOUND_TRUE$ac_delim1.158 AUDIO_ESOUND_FALSE!$AUDIO_ESOUND_FALSE$ac_delim1.159 +ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim1.160 +ALSA_LIBS!$ALSA_LIBS$ac_delim1.161 +AUDIO_ALSA_TRUE!$AUDIO_ALSA_TRUE$ac_delim1.162 +AUDIO_ALSA_FALSE!$AUDIO_ALSA_FALSE$ac_delim1.163 CDROM_LINUX_TRUE!$CDROM_LINUX_TRUE$ac_delim1.164 CDROM_LINUX_FALSE!$CDROM_LINUX_FALSE$ac_delim1.165 JOY_LINUX_TRUE!$JOY_LINUX_TRUE$ac_delim1.166 @@ -8983,7 +9090,7 @@1.167 LTLIBOBJS!$LTLIBOBJS$ac_delim1.168 _ACEOF1.170 - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 40; then1.171 + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 44; then1.172 break1.173 elif $ac_last_try; then1.174 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
.