+if test "$have_readline" = "yes"; then
+ all_errlist_objs="$all_errlist_objs interactive"
+ client_errlist_objs="$client_errlist_objs interactive"
+ client_ldflags="$client_ldflags $readline_libs"
+ audioc_errlist_objs="$audioc_errlist_objs buffer_tree interactive sched time"
+ audioc_ldflags="$audioc_ldflags $readline_libs"
+ play_errlist_objs="$play_errlist_objs interactive"
+ play_ldflags="$play_ldflags $readline_libs"
+ AC_SUBST(readline_cppflags)
+ AC_DEFINE(HAVE_READLINE, 1, define to 1 to turn on readline support)
+else
+ AC_MSG_WARN([libreadline not found or unusable])
+fi
+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
+ all_errlist_objs="$all_errlist_objs resample_filter"
+ filter_errlist_objs="$filter_errlist_objs resample_filter check_wav"
+ filter_cmdline_objs="$filter_cmdline_objs add_cmdline(resample_filter)"
+ audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
+ audiod_cmdline_objs="$audiod_cmdline_objs add_cmdline(resample_filter)"
+ play_errlist_objs="$play_errlist_objs resample_filter check_wav"
+ play_cmdline_objs="$play_cmdline_objs add_cmdline(resample_filter)"
+ filter_ldflags="$filter_ldflags $samplerate_libs -lsamplerate"
+ audiod_ldflags="$audiod_ldflags $samplerate_libs -lsamplerate"
+ play_ldflags="$play_ldflags $samplerate_libs -lsamplerate"
+ filters="$filters resample"
+ AC_SUBST(samplerate_cppflags)
+else
+ AC_MSG_WARN([no resample support in para_audiod/para_filter])
+fi
+CPPFLAGS="$OLD_CPPFLAGS"
+LDFLAGS="$OLD_LDFLAGS"
+LIBS="$OLD_LIBS"