]> git.tue.mpg.de Git - paraslash.git/commitdiff
build: Convert libsamplerate detection to new macros.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 24 Aug 2014 22:24:29 +0000 (00:24 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 30 Mar 2015 16:45:41 +0000 (16:45 +0000)
configure.ac

index ac4192f2ecb276435cdb0e54bed659f4596a634c..81f1e64c1d1da2e1f746df8a98382a84eba04d2f 100644 (file)
@@ -473,37 +473,13 @@ CPPFLAGS="$OLD_CPPFLAGS"
 LDFLAGS="$OLD_LDFLAGS"
 LIBS="$OLD_LIBS"
 ############################################################# libsamplerate
-OLD_CPPFLAGS="$CPPFLAGS"
-OLD_LDFLAGS="$LDFLAGS"
-OLD_LIBS="$LIBS"
-
-have_samplerate="yes"
-AC_ARG_WITH(samplerate_headers, [AS_HELP_STRING(--with-samplerate-headers=dir,
-       [look for samplerate headers also in dir])])
-if test -n "$with_samplerate_headers"; then
-       samplerate_cppflags="-I$with_samplerate_headers"
-       CPPFLAGS="$CPPFLAGS $samplerate_cppflags"
-fi
-AC_ARG_WITH(samplerate_libs, [AS_HELP_STRING(--with-samplerate-libs=dir,
-       [look for samplerate libs also in dir])])
-if test -n "$with_samplerate_libs"; then
-       samplerate_libs="-L$with_samplerate_libs"
-       LDFLAGS="$LDFLAGS $samplerate_libs"
-fi
-
-AC_CHECK_HEADER(samplerate.h, [], have_samplerate=no)
-AC_CHECK_LIB([samplerate], [src_process], [], have_samplerate=no, [])
-
-if test "$have_samplerate" = "yes"; then
-       AC_SUBST(samplerate_cppflags)
-       samplerate_ldflags="$samplerate_libs -lsamplerate"
-       AC_SUBST(samplerate_ldflags)
-else
-       AC_MSG_WARN([no resample support in para_audiod/para_filter])
-fi
-CPPFLAGS="$OLD_CPPFLAGS"
-LDFLAGS="$OLD_LDFLAGS"
-LIBS="$OLD_LIBS"
+STASH_FLAGS
+LIB_ARG_WITH([samplerate], [-lsamplerate])
+HAVE_SAMPLERATE=yes
+AC_CHECK_HEADER(samplerate.h, [], HAVE_SAMPLERATE=no)
+AC_CHECK_LIB([samplerate], [src_process], [], HAVE_SAMPLERATE=no)
+LIB_SUBST_FLAGS(samplerate)
+UNSTASH_FLAGS
 ######################################################################### server
 if test -n "$CRYPTOLIB" && test $HAVE_OSL = yes; then
        build_server="yes"
@@ -703,7 +679,7 @@ if test -n "$CRYPTOLIB"; then
                audiod_errlist_objs="$audiod_errlist_objs ao_write"
                audiod_cmdline_objs="$audiod_cmdline_objs ao_write"
        }
-       if test "$have_samplerate" = "yes"; then
+       if test $HAVE_SAMPLERATE = yes; then
                audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
                audiod_cmdline_objs="$audiod_cmdline_objs resample_filter"
        fi
@@ -859,7 +835,7 @@ if test $HAVE_MAD = yes; then
        filter_errlist_objs="$filter_errlist_objs mp3dec_filter"
        filters="$filters mp3dec"
 fi
-if test "$have_samplerate" = "yes"; then
+if test $HAVE_SAMPLERATE = yes; then
        filter_errlist_objs="$filter_errlist_objs resample_filter check_wav"
        filter_cmdline_objs="$filter_cmdline_objs resample_filter"
        filters="$filters resample"
@@ -1053,7 +1029,7 @@ NEED_AO_OBJECTS && {
 if test "$have_readline" = "yes"; then
        play_errlist_objs="$play_errlist_objs interactive"
 fi
-if test "$have_samplerate" = "yes"; then
+if test $HAVE_SAMPLERATE = yes; then
        play_errlist_objs="$play_errlist_objs resample_filter check_wav"
        play_cmdline_objs="$play_cmdline_objs resample_filter"
 fi