]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - configure.ac
resample filter: Implementation.
[paraslash.git] / configure.ac
index 32ad846d77e03891d9d57648ba0faa8ef08fc55c..aacecee823aecc296f7988f5f2d04741b6194b99 100644 (file)
@@ -100,7 +100,7 @@ all_errlist_objs="mp3_afh afh_common net string signal time daemon
        dccp_recv recv_common write_common file_write audiod_command
        client_common recv stdout filter stdin audioc write client
        exec send_common ggo udp_recv color fec fecdec_filter
-       prebuffer_filter bitstream imdct
+       prebuffer_filter bitstream imdct check_wav
        wma_afh wma_common wmadec_filter buffer_tree crypt_common
        gui gui_theme sideband"
 
@@ -138,7 +138,7 @@ afh_ldflags=""
 
 write_cmdline_objs="add_cmdline(write file_write)"
 write_errlist_objs="write write_common file_write time fd string sched stdin
-       buffer_tree ggo"
+       buffer_tree ggo check_wav"
 write_ldflags=""
 writers=" file"
 default_writer="FILE_WRITE"
@@ -1039,6 +1039,44 @@ fi
 CPPFLAGS="$OLD_CPPFLAGS"
 LDFLAGS="$OLD_LDFLAGS"
 LIBS="$OLD_LIBS"
+############################################################# libsamplerate
+OLD_CPPFLAGS="$CPPFLAGS"
+OLD_LD_FLAGS="$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)"
+       filter_ldflags="$filter_ldflags $samplerate_libs -lsamplerate"
+       audiod_ldflags="$audiod_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"
 ############################################################# error2.h
 AC_MSG_NOTICE(creating error2.h)
 for i in $executables; do