[PATCH] Improved Alsa configure-time detection
Pavel Troller
patrol at sinus.cz
Mon Nov 28 05:34:35 GMT 2005
Hi!
For a long time, I have a problem with Alsa detection when various parts of
KDE are to be configured. The trick is that in my system setup, Alsa subsystem
(includes/libs) is not located in standard directories, but in /opt/alsa.
Almost all Alsa tests through the whole KDE with a few exceptions cannot find
it even it's mentioned in --with-extra-includes and --with-extra-libs config
options.
The following set of patches (for 3.5 branch) fixes the problem. One of the
patches fixes oss detection, too. I hope they are harmless. Please review and
possibly apply them if possible.
With regards,
Pavel Troller
-------------- next part --------------
Index: arts/configure.in.in
===================================================================
--- arts/configure.in.in (revision 483451)
+++ arts/configure.in.in (working copy)
@@ -594,10 +594,12 @@
AC_DEFUN([AC_CHECK_LIBASOUND],
[
ac_ldflags_save="$LDFLAGS"
+ ac_CPPFLAGS_save="$CPPFLAGS"
LDFLAGS="$all_libraries $LDFLAGS"
+ CPPFLAGS="$CPPFLAGS $all_includes"
kde_has_asoundlib=no
- AC_CHECK_HEADERS([ sys/asoundlib.h alsa/asoundlib.h ],
+ KDE_CHECK_HEADERS([ sys/asoundlib.h alsa/asoundlib.h ],
[
kde_has_asoundlib=yes
])
@@ -667,7 +669,7 @@
AC_LANG_RESTORE
if test "x$kde_has_asoundlib" = "xyes"; then
- AC_CHECK_LIB(asound,snd_seq_create_simple_port,[
+ KDE_CHECK_LIB(asound,snd_seq_create_simple_port,[
if test "x$kde_has_alsa_0_5" = "xyes"; then
LIBASOUND="-lasound"
AC_DEFINE(HAVE_LIBASOUND, 1,
@@ -697,6 +699,7 @@
fi
AC_SUBST(LIBASOUND)
LDFLAGS="$ac_ldflags_save"
+ CPPFLAGS="$ac_CPPFLAGS_save"
])
AC_CHECK_LIBASOUND
fi
-------------- next part --------------
Index: kdelibs/libkmid/configure.in.in
===================================================================
--- kdelibs/libkmid/configure.in.in (revision 483453)
+++ kdelibs/libkmid/configure.in.in (working copy)
@@ -50,10 +50,12 @@
AC_DEFUN([AC_CHECK_LIBASOUND],
[
ac_ldflags_save="$LDFLAGS"
+ ac_CPPFLAGS_save="$CPPFLAGS"
LDFLAGS="$all_libraries $LDFLAGS"
+ CPPFLAGS="$CPPFLAGS $all_includes"
kde_has_asoundlib=no
- AC_CHECK_HEADERS([ sys/asoundlib.h alsa/asoundlib.h ],
+ KDE_CHECK_HEADERS([ sys/asoundlib.h alsa/asoundlib.h ],
[
kde_has_asoundlib=yes
])
@@ -103,7 +105,7 @@
AC_LANG_RESTORE
if test "x$kde_has_asoundlib" = "xyes"; then
- AC_CHECK_LIB(asound,snd_seq_create_simple_port,[
+ KDE_CHECK_LIB(asound,snd_seq_create_simple_port,[
if test "x$kde_has_alsa_0_5" = "xyes"; then
LIBASOUND="-lasound"
AC_DEFINE(HAVE_LIBASOUND, 1,
@@ -121,6 +123,7 @@
fi
AC_SUBST(LIBASOUND)
LDFLAGS="$ac_ldflags_save"
+ CPPFLAGS="$ac_CPPFLAGS_save"
])
AC_CHECK_LIBASOUND
fi
-------------- next part --------------
Index: kdemultimedia/configure.in.in
===================================================================
--- kdemultimedia/configure.in.in (revision 483492)
+++ kdemultimedia/configure.in.in (working copy)
@@ -136,10 +136,10 @@
[
have_ossaudio=no
- AC_CHECK_HEADERS([soundcard.h sys/soundcard.h],
+ KDE_CHECK_HEADERS([soundcard.h sys/soundcard.h],
[have_ossaudio=yes])
- AC_CHECK_LIB(ossaudio, _oss_ioctl,
+ KDE_CHECK_LIB(ossaudio, _oss_ioctl,
[:], [have_ossaudio=no])
if test "x$have_ossaudio" = xyes; then
@@ -153,11 +153,15 @@
AC_DEFUN([KDE_CHECK_ALSA],
[
have_alsa=no
+ ac_ldflags_save="$LDFLAGS"
+ ac_CPPFLAGS_save="$CPPFLAGS"
+ LDFLAGS="$all_libraries $LDFLAGS"
+ CPPFLAGS="$CPPFLAGS $all_includes"
- AC_CHECK_HEADERS([sys/asoundlib.h alsa/asoundlib.h],
+ KDE_CHECK_HEADERS([sys/asoundlib.h alsa/asoundlib.h],
[have_alsa=yes])
- AC_CHECK_LIB(asound, snd_seq_create_simple_port,
+ KDE_CHECK_LIB(asound, snd_seq_create_simple_port,
[:], [have_alsa=no])
AC_LANG_SAVE
@@ -234,6 +238,8 @@
AC_SUBST(LIBASOUND)
AC_SUBST(ARTS_LIBASOUND)
+ LDFLAGS="$ac_ldflags_save"
+ CPPFLAGS="$ac_CPPFLAGS_save"
])
AC_DEFUN([KDE_CHECK_CDPARANOIA],
-------------- next part --------------
_______________________________________________
kde-multimedia mailing list
kde-multimedia at kde.org
https://mail.kde.org/mailman/listinfo/kde-multimedia
More information about the kde-multimedia
mailing list