From 84624418d6fe3744877d19df8f17277a237159bc Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 25 Aug 2014 00:24:29 +0200 Subject: [PATCH] build: Convert libsamplerate detection to new macros. --- configure.ac | 44 ++++++++++---------------------------------- 1 file changed, 10 insertions(+), 34 deletions(-) diff --git a/configure.ac b/configure.ac index ac4192f2..81f1e64c 100644 --- a/configure.ac +++ b/configure.ac @@ -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 -- 2.39.2