]> git.tue.mpg.de Git - paraslash.git/commitdiff
build: Convert oss detection to new macros.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 25 Aug 2014 21:50:01 +0000 (23:50 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 30 Mar 2015 16:45:41 +0000 (16:45 +0000)
This also adds the missing oss_cppflags autoconf variable and the
corresponding make rule for building the oss writer.

Makefile.in
Makefile.real
configure.ac

index d8c6ed83d4e835f5b38f77a5f679cda51faaf3f2..14015c9bf5915e8a3f2355e1947d50ea6aced07e 100644 (file)
@@ -50,6 +50,7 @@ flac_cppflags := @flac_cppflags@
 samplerate_cppflags := @samplerate_cppflags@
 readline_cppflags := @readline_cppflags@
 alsa_cppflags := @alsa_cppflags@
+oss_cppflags := @oss_cppflags@
 
 clock_gettime_ldflags := @clock_gettime_ldflags@
 id3tag_ldflags := @id3tag_ldflags@
index 55d9e18c4c2a4f216767393510c84b447efff6b4..c5d6405846d1afe50e5e6179058467c3f65fc9bd 100644 (file)
@@ -204,6 +204,9 @@ $(object_dir)/interactive.o $(dep_dir)/interactive.d \
 $(object_dir)/resample_filter.o $(dep_dir)/resample_filter.d \
 : CPPFLAGS += $(samplerate_cppflags)
 
+$(object_dir)/oss_write.o $(dep_dir)/oss_write.d \
+: CPPFLAGS += $(oss_cppflags)
+
 $(object_dir)/ao_write.o $(dep_dir)/ao_write.d \
 : CPPFLAGS += $(ao_cppflags) $(pthread_cppflags)
 
index 81f1e64c1d1da2e1f746df8a98382a84eba04d2f..98d75c78501e3d22ed934c5395c0c65c96dcd178 100644 (file)
@@ -354,29 +354,12 @@ AC_CHECK_LIB([id3tag], [id3_file_fdopen], [], HAVE_ID3TAG=no)
 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])
@@ -667,7 +650,7 @@ if test -n "$CRYPTOLIB"; then
                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
@@ -697,12 +680,12 @@ else
        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"
@@ -1014,7 +997,7 @@ if test $HAVE_MAD = yes; then
        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
@@ -1072,7 +1055,7 @@ NEED_AO_OBJECTS && {
        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"