Add the new amp filter.
[paraslash.git] / configure.ac
index c435e371c3ec511637a24494bf39b2b0a79dbafa..63cbdc973f7e17d809351c534cf0b9a562766092 100644 (file)
@@ -79,12 +79,12 @@ AC_CHECK_FUNCS([atexit dup2 memchr memmove memset \
        [AC_MSG_ERROR([function not found, cannot live without it])])
 
 all_errlist_objs="server mp3_afh afh_common vss command net string signal time
-daemon stat crypt http_send close_on_fork ipc acl afh
+daemon stat crypt http_send close_on_fork ipc acl afh fade amp_filter
 dccp_send fd user_list chunk_queue afs osl aft mood score attribute blob ringbuffer
 playlist sha1 rbtree sched audiod grab_client filter_chain wav compress
 http_recv dccp_recv recv_common write_common file_write audiod_command
 client_common recv stdout filter stdin audioc write client fsck exec send_common"
-all_executables="server recv filter audioc write client fsck afh"
+all_executables="server recv filter audioc write client fsck afh amp_filter"
 
 recv_cmdline_objs="recv.cmdline http_recv.cmdline dccp_recv.cmdline"
 recv_errlist_objs="http_recv recv_common recv time string net dccp_recv
@@ -94,10 +94,10 @@ recv_ldflags=""
 receivers=" http dccp"
 senders=" http dccp"
 
-filter_cmdline_objs="filter.cmdline compress_filter.cmdline"
-filter_errlist_objs="filter_chain wav compress filter string stdin stdout sched fd"
+filter_cmdline_objs="filter.cmdline compress_filter.cmdline amp_filter.cmdline"
+filter_errlist_objs="filter_chain wav compress filter string stdin stdout sched fd amp_filter"
 filter_ldflags=""
-filters=" compress wav"
+filters=" compress wav amp"
 
 audioc_cmdline_objs="audioc.cmdline"
 audioc_errlist_objs="audioc string net fd"
@@ -105,9 +105,9 @@ audioc_ldflags=""
 
 audiod_cmdline_objs="audiod.cmdline grab_client.cmdline compress_filter.cmdline
        http_recv.cmdline dccp_recv.cmdline file_write.cmdline client.cmdline
-       audiod_command_list"
+       audiod_command_list amp_filter.cmdline"
 audiod_errlist_objs="audiod signal string daemon stat net
-       time grab_client filter_chain wav compress http_recv dccp_recv
+       time grab_client filter_chain wav compress amp_filter http_recv dccp_recv
        recv_common fd sched write_common file_write audiod_command crypt
        client_common"
 audiod_ldflags=""
@@ -139,10 +139,15 @@ fsck_cmdline_objs="fsck.cmdline"
 fsck_errlist_objs="osl rbtree fsck string sha1 fd"
 
 gui_cmdline_objs="gui.cmdline"
-gui_errlist_objs="exec close_on_fork signal string stat ringbuffer fd"
+gui_errlist_objs="exec signal string stat ringbuffer fd"
 gui_other_objs="gui gui_theme"
 gui_objs="$gui_cmdline_objs $gui_errlist_objs $gui_other_objs"
 
+fade_cmdline_objs="fade.cmdline"
+fade_errlist_objs="fade exec string fd"
+
+
+
 ########################################################################### ssl
 dnl @synopsis CHECK_SSL
 dnl
@@ -319,7 +324,7 @@ if test "$have_ogg" = "yes"; then
        server_ldflags="$server_ldflags $oggvorbis_libs -logg -lvorbis -lvorbisfile"
        filter_ldflags="$filter_ldflags $oggvorbis_libs -lvorbis -lvorbisfile"
        audiod_ldflags="$audiod_ldflags $oggvorbis_libs -lvorbis -lvorbisfile"
-       afh_ldflags="$afh_ldflags $oggvorbis_libs -lvorbis -lvorbisfile"
+       afh_ldflags="$afh_ldflags $oggvorbis_libs -logg -lvorbis -lvorbisfile"
 
        filter_cmdline_objs="$filter_cmdline_objs oggdec_filter.cmdline"
        audiod_cmdline_objs="$audiod_cmdline_objs oggdec_filter.cmdline"
@@ -429,6 +434,21 @@ fi
 CPPFLAGS="$OLD_CPPFLAGS"
 LDFLAGS="$OLD_LDFLAGS"
 LIBS="$OLD_LIBS"
+###################################################################### libid3tag
+AC_MSG_CHECKING(for libid3tag)
+AC_TRY_LINK([
+       #include <id3tag.h>
+],[
+       struct id3_tag t = {.flags = 0};
+],[have_libid3tag=yes],[have_libid3tag=no])
+AC_MSG_RESULT($have_libid3tag)
+if test ${have_libid3tag} = yes; then
+       AC_DEFINE(HAVE_LIBID3TAG, 1, define to 1 you have libid3tag)
+       server_ldflags="$server_ldflags -lid3tag"
+       afh_ldflags="$afh_ldflags -lid3tag"
+else
+       AC_MSG_WARN([no support for id3v2 tags])
+fi
 ########################################################################### alsa
 have_alsa="yes"
 OLD_CPPFLAGS="$CPPFLAGS"
@@ -437,17 +457,19 @@ OLD_LIBS="$LIBS"
 if test "$OSTYPE" != "Linux"; then
        have_alsa="no"
 fi
-msg="=> can not build para_fade, and no alsa support for para_audiod/para_write"
+msg="=> will not build para_fade"
 if test "$have_alsa" = "yes"; then
-       AC_CHECK_HEADER(linux/soundcard.h,
-               [extras="$extras para_fade"],
+       AC_CHECK_HEADER(linux/soundcard.h, [
+               extras="$extras para_fade"
+               all_executables="$all_executables fade"
+               ],
                [
                        have_alsa="no"
                        AC_MSG_WARN([no linux/soundcard.h $msg])
                ]
        )
 fi
-
+msg="=> no alsa support for para_audiod/para_write"
 if test "$have_alsa" = "yes"; then
        AC_CHECK_HEADERS([alsa/asoundlib.h], [], [
                have_alsa="no"
@@ -535,7 +557,6 @@ AC_DEFUN([add_dot_o],[$(for i in $@; do printf "$i.o "; done)])
 AC_DEFUN([objlist_to_errlist],[$(for i in $@; do printf "DEFINE_ERRLIST($(echo $i| tr 'a-z' 'A-Z'));"; done) [const char **para_errlist[[]]] = {$(for i in $@; do printf "PARA_ERRLIST($(echo $i | tr 'a-z' 'A-Z')), "; done) }])
 
 ############################################################# error2.h
-
 AC_DEFUN([define_safe_error_enums],
 [
        exe=""
@@ -595,7 +616,7 @@ status_flags format score audio_file_info taginfo1 taginfo2 afs_mode
 attributes_txt decoder_flags audiod_status play_time attributes_bitmap
 offset seconds_total stream_start current_time audiod_uptime image_id
 lyrics_id duration directory lyrics_name image_name path hash channels
-last_played num_chunks chunk_time"
+last_played num_chunks chunk_time amplification"
 
 # $1: prefix, $2: items
 AC_DEFUN([make_enum_items], [$(
@@ -630,6 +651,7 @@ client_objs="$client_cmdline_objs $client_errlist_objs"
 fsck_objs="$fsck_cmdline_objs $fsck_errlist_objs"
 audioc_objs="$audioc_cmdline_objs $audioc_errlist_objs"
 afh_objs="$afh_cmdline_objs $afh_errlist_objs"
+fade_objs="$fade_cmdline_objs $fade_errlist_objs"
 
 AC_SUBST(recv_objs, add_dot_o($recv_objs))
 AC_SUBST(recv_ldflags, $recv_ldflags)
@@ -680,6 +702,10 @@ AC_SUBST(gui_objs, add_dot_o($gui_objs))
 AC_DEFINE_UNQUOTED(INIT_GUI_ERRLISTS,
        objlist_to_errlist($gui_errlist_objs), errors used by para_gui)
 
+AC_SUBST(fade_objs, add_dot_o($fade_objs))
+AC_DEFINE_UNQUOTED(INIT_FADE_ERRLISTS,
+       objlist_to_errlist($fade_errlist_objs), errors used by para_fade)
+
 enum="$(for i in $writers; do printf "${i}_WRITE, " | tr '[a-z]' '[A-Z]'; done)"
 AC_DEFINE_UNQUOTED(WRITER_ENUM, $enum NUM_SUPPORTED_WRITERS,
        enum of supported writers)
@@ -703,8 +729,9 @@ AC_MSG_NOTICE([
 paraslash configuration:
 ~~~~~~~~~~~~~~~~~~~~~~~~
 unix socket credentials: $have_ucred
-audio formats supported by para_server: $server_audio_formats
-senders supported by para_server/para_send: $senders
+audio formats supported by para_server/para_afh: $server_audio_formats
+id3 version2 support: $have_libid3tag
+senders supported by para_server: $senders
 receivers supported by para_audiod/para_recv: $receivers
 filters supported by para_audiod/para_filter: $filters
 writers supported by para_audiod/para_write: $writers