-])
-AC_CHECK_LIB([asound], [snd_pcm_open], [], [
- AC_MSG_WARN([no libasound $msg])
- have_alsa="no"
-])
+fi
+msg="=> can not build para_fade, and no alsa support for para_audiod/para_write"
+if test "$have_alsa" = "yes"; then
+ AC_CHECK_HEADER(linux/soundcard.h,
+ [extras="$extras para_fade"],
+ [
+ have_alsa="no"
+ AC_MSG_WARN([no linux/soundcard.h $msg])
+ ]
+ )
+fi
+
+if test "$have_alsa" = "yes"; then
+ AC_CHECK_HEADERS([alsa/asoundlib.h], [], [
+ have_alsa="no"
+ AC_MSG_WARN([no alsa/asoundlib $msg])
+ ])
+fi
+
+if test "$have_alsa" = "yes"; then
+ AC_CHECK_LIB([asound], [snd_pcm_open], [], [
+ have_alsa="no"
+ AC_MSG_WARN([no libasound $msg])
+ ])
+fi
+