LIB_SUBST_FLAGS(id3tag)
UNSTASH_FLAGS
########################################################################### oss
-OLD_CPPFLAGS="$CPPFLAGS"
-OLD_LDFLAGS="$LDFLAGS"
-OLD_LIBS="$LIBS"
-
-have_oss="yes"
-msg="=> will not build oss writer"
-
-AC_CHECK_HEADER(sys/soundcard.h, [
- AC_CHECK_LIB(ossaudio, _oss_ioctl, [
- oss_ldflags="-lossaudio"
- AC_SUBST(oss_ldflags)
- ]
- )
- ],
- [
- have_oss="no"
- AC_MSG_WARN([no sys/soundcard.h $msg])
- ]
-)
-CPPFLAGS="$OLD_CPPFLAGS"
-LDFLAGS="$OLD_LDFLAGS"
-LIBS="$OLD_LIBS"
-
+STASH_FLAGS
+LIB_ARG_WITH([oss], [])
+AC_CHECK_HEADER(sys/soundcard.h, [HAVE_OSS=yes], [HAVE_OSS=no])
+AC_CHECK_LIB(ossaudio, _oss_ioctl, [oss_ldflags="$oss_ldflags -lossaudio"], [])
+LIB_SUBST_FLAGS(oss)
+UNSTASH_FLAGS
########################################################################### alsa
STASH_FLAGS
LIB_ARG_WITH([alsa], [-lasound])
audiod_cmdline_objs="$audiod_cmdline_objs mp3dec_filter"
audiod_errlist_objs="$audiod_errlist_objs mp3dec_filter"
fi
- if test "$have_oss" = "yes"; then
+ if test $HAVE_OSS = yes; then
audiod_errlist_objs="$audiod_errlist_objs oss_write"
audiod_cmdline_objs="$audiod_cmdline_objs oss_write"
fi
build_audiod="no"
fi
########################################################################### fade
-if test "$have_oss" = "yes" -o $HAVE_ALSA = yes; then
+if test $HAVE_OSS = yes -o $HAVE_ALSA = yes; then
build_fade="yes"
executables="$executables fade"
fade_cmdline_objs="fade"
fade_errlist_objs="fade exec string fd version ggo"
- if test "$have_oss" = "yes"; then
+ if test $HAVE_OSS = yes; then
fade_errlist_objs="$fade_errlist_objs oss_mix"
mixers="${mixers}oss "
default_mixer="OSS_MIX"
play_cmdline_objs="$play_cmdline_objs mp3dec_filter"
play_errlist_objs="$play_errlist_objs mp3dec_filter"
fi
-if test "$have_oss" = "yes"; then
+if test $HAVE_OSS = yes; then
play_errlist_objs="$play_errlist_objs oss_write"
play_cmdline_objs="$play_cmdline_objs oss_write"
fi
writers="$writers ao"
default_writer="AO_WRITE"
}
-if test "$have_oss" = "yes"; then
+if test $HAVE_OSS = yes; then
write_errlist_objs="$write_errlist_objs oss_write"
write_cmdline_objs="$write_cmdline_objs oss_write"
writers="$writers oss"