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"
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
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"
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