+if test "$have_curses" != "yes"; then
+ have_readline="no"
+ AC_MSG_WARN([interactive cli support depends on curses,])
+ AC_MSG_WARN([but no curses lib was detected, $msg])
+fi
+
+if test "$have_readline" = "yes"; then
+ readline_libs="$readline_libs -lreadline"
+ AC_SEARCH_LIBS([rl_free_keymap], [readline], [], [have_readline="no"])
+ if test "$have_readline" = "no"; then # try with -lcurses
+ # clear cache
+ AC_MSG_NOTICE([trying again with -lcurses])
+ unset ac_cv_search_rl_free_keymap 2> /dev/null
+ AC_SEARCH_LIBS([rl_free_keymap], [readline], [
+ have_readline=yes
+ readline_libs="$readline_libs -lcurses"
+ ], [], [-lcurses])
+ fi
+ if test "$have_readline" = "no"; then # try with -ltermcap
+ # clear cache
+ AC_MSG_NOTICE([trying again with -ltermcap])
+ unset ac_cv_search_rl_free_keymap 2> /dev/null
+ AC_SEARCH_LIBS([rl_free_keymap], [readline], [
+ have_readline=yes
+ readline_libs="$readline_libs -ltermcap"
+ ], [], [-ltermcap])
+ fi
+fi
+
+if test "$have_readline" = "yes"; then
+ 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
+ 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"
+######################################################################### server
+if test \( "$have_openssl" = "yes" -o "$have_gcrypt" = "yes" \) \
+ -a "$have_osl" = "yes" ; then
+
+ build_server="yes"
+ executables="$executables server"
+ server_cmdline_objs="add_cmdline(server)"
+ server_errlist_objs="$server_errlist_objs
+ server
+ afh_common
+ mp3_afh
+ vss
+ command
+ net
+ string
+ signal
+ time
+ daemon
+ http_send
+ close_on_fork
+ mm
+ crypt_common
+ ipc
+ dccp_send
+ fd
+ user_list
+ chunk_queue
+ afs
+ aft
+ mood
+ score
+ attribute
+ blob
+ playlist
+ sched
+ acl
+ send_common
+ udp_send
+ color
+ fec
+ wma_afh
+ wma_common
+ sideband
+ version
+ ggo
+ "
+ server_ldflags="$server_ldflags $osl_libs -losl"
+else
+ build_server="no"
+fi
+############################################################# error2.h