|
Lines 152-239
AC_DEFUN([KDE_CHECK_OSSAUDIO],
Link Here
|
| 152 |
|
152 |
|
| 153 |
AC_DEFUN([KDE_CHECK_ALSA], |
153 |
AC_DEFUN([KDE_CHECK_ALSA], |
| 154 |
[ |
154 |
[ |
| 155 |
have_alsa=no |
155 |
AC_CHECK_LIB([asound], [snd_pcm_open], [have_alsa05=yes], [have_alsa04=no]) |
| 156 |
|
156 |
|
| 157 |
AC_CHECK_HEADERS([sys/asoundlib.h alsa/asoundlib.h], |
157 |
PKG_CHECK_MODULES([ALSA], [alsa >= 0.9], [have_alsa09=yes], [have_alsa09=no]) |
| 158 |
[have_alsa=yes]) |
|
|
| 159 |
|
158 |
|
| 160 |
AC_CHECK_LIB(asound, snd_seq_create_simple_port, |
159 |
if test "x$have_alsa09" = "xyes"; then |
| 161 |
[:], [have_alsa=no]) |
160 |
have_alsa="yes" |
| 162 |
|
|
|
| 163 |
AC_LANG_SAVE |
| 164 |
AC_LANG_C |
| 165 |
if test "x$have_alsa" = xyes; then |
| 166 |
AC_TRY_COMPILE([ |
| 167 |
#include "confdefs.h" |
| 168 |
#ifdef HAVE_SYS_ASOUNDLIB_H |
| 169 |
#include <sys/asoundlib.h> |
| 170 |
#endif |
| 171 |
#ifdef HAVE_ALSA_ASOUNDLIB_H |
| 172 |
#include <alsa/asoundlib.h> |
| 173 |
#endif |
| 174 |
],[ |
| 175 |
#if (SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 5) |
| 176 |
/* we have ALSA 0.5.x */ |
| 177 |
#else |
| 178 |
#error not ALSA 0.5.x |
| 179 |
#endif |
| 180 |
], |
| 181 |
have_alsa_0_5=yes) |
| 182 |
|
| 183 |
AC_TRY_COMPILE([ |
| 184 |
#include "confdefs.h" |
| 185 |
#ifdef HAVE_SYS_ASOUNDLIB_H |
| 186 |
#include <sys/asoundlib.h> |
| 187 |
#endif |
| 188 |
#ifdef HAVE_ALSA_ASOUNDLIB_H |
| 189 |
#include <alsa/asoundlib.h> |
| 190 |
#endif |
| 191 |
],[ |
| 192 |
#if (SND_LIB_MAJOR == 0) && (SND_LIB_MINOR == 9) |
| 193 |
/* we have ALSA 0.9.x */ |
| 194 |
#else |
| 195 |
#error not ALSA 0.9.x |
| 196 |
#endif |
| 197 |
], |
| 198 |
have_alsa_0_9=yes) |
| 199 |
|
| 200 |
AC_TRY_COMPILE([ |
| 201 |
#include "confdefs.h" |
| 202 |
#ifdef HAVE_SYS_ASOUNDLIB_H |
| 203 |
#include <sys/asoundlib.h> |
| 204 |
#endif |
| 205 |
#ifdef HAVE_ALSA_ASOUNDLIB_H |
| 206 |
#include <alsa/asoundlib.h> |
| 207 |
#endif |
| 208 |
],[ |
| 209 |
#if (SND_LIB_MAJOR == 1) |
| 210 |
/* we have ALSA 1.x */ |
| 211 |
#else |
| 212 |
#error not ALSA 1.x |
| 213 |
#endif |
| 214 |
], |
| 215 |
have_alsa_1=yes) |
| 216 |
fi |
| 217 |
AC_LANG_RESTORE |
| 218 |
|
| 219 |
if test "x$have_alsa_0_9" = xyes || test "x$have_alsa_1" = xyes; then |
| 220 |
# for kmix/ and akode/ |
| 221 |
LIBASOUND="-lasound" |
| 222 |
AC_DEFINE(HAVE_LIBASOUND2, 1, [Define if you have libasound.so.2 (required for ALSA 0.9.x/1.x support)]) |
161 |
AC_DEFINE(HAVE_LIBASOUND2, 1, [Define if you have libasound.so.2 (required for ALSA 0.9.x/1.x support)]) |
| 223 |
|
162 |
elif test "x$have_alsa05" = "xyes"; then |
| 224 |
# for arts/ |
163 |
have_alsa="yes" |
| 225 |
ARTS_LIBASOUND="-lasound" |
164 |
AC_CHECK_HEADERS([sys/asoundlib.h]) |
| 226 |
AC_DEFINE(HAVE_ARTS_LIBASOUND2, 1, [Define if you have libasound.so.2 (required for ALSA 0.9.x/1.x support)]) |
165 |
AC_DEFINE(HAVE_LIBASOUND1, 1, [Define if you have libasound.so.1 (required for ALSA 0.5.x support)]) |
| 227 |
fi |
166 |
ALSA_LIBS="-lasound" |
| 228 |
|
|
|
| 229 |
if test "x$have_alsa_0_5" = xyes; then |
| 230 |
# for arts/ |
| 231 |
ARTS_LIBASOUND="-lasound" |
| 232 |
AC_DEFINE(HAVE_ARTS_LIBASOUND, 1, [Define if you have libasound.so.1 (required for ALSA 0.5.x support)]) |
| 233 |
fi |
167 |
fi |
| 234 |
|
168 |
|
| 235 |
AC_SUBST(LIBASOUND) |
169 |
AC_SUBST([ALSA_CFLAGS]) |
| 236 |
AC_SUBST(ARTS_LIBASOUND) |
170 |
AC_SUBST([ALSA_LIBS]) |
| 237 |
]) |
171 |
]) |
| 238 |
|
172 |
|
| 239 |
AC_DEFUN([KDE_CHECK_CDPARANOIA], |
173 |
AC_DEFUN([KDE_CHECK_CDPARANOIA], |