CREDITS update.
[paraslash.git] / configure.ac
index 0ecc297fa8423116d7b80e925f11e9cba496c4af..73f6fdbff7b745cd598a3e912260587b0523a0bd 100644 (file)
@@ -15,6 +15,12 @@ AC_MSG_CHECKING(os type)
 OSTYPE="`$UNAMEPATH -s`"
 AC_MSG_RESULT("$OSTYPE")
 
+if test "$OSTYPE" = "SunOS"; then
+       # needed on SunOS for socket magic
+       arch_cppflags="-D_XOPEN_SOURCE=500 -D__EXTENSIONS__"
+       AC_SUBST(arch_cppflags)
+fi
+
 AC_C_BIGENDIAN()
 
 AC_PROG_CC
@@ -72,17 +78,16 @@ 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 dccp
+daemon stat crypt http_send close_on_fork ipc
 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"
 all_executables="server audiod recv filter audioc write client fsck"
 
-
 recv_cmdline_objs="recv.cmdline http_recv.cmdline dccp_recv.cmdline"
 recv_errlist_objs="http_recv recv_common recv time string net dccp_recv
-       dccp fd sched stdout"
+       fd sched stdout"
 recv_ldflags=""
 
 receivers=" http dccp"
@@ -101,7 +106,7 @@ 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_errlist_objs="audiod signal string daemon stat net
-       time grab_client filter_chain wav compress http_recv dccp dccp_recv
+       time grab_client filter_chain wav compress http_recv dccp_recv
        recv_common fd sched write_common file_write audiod_command crypt
        client_common"
 audiod_ldflags=""
@@ -110,7 +115,7 @@ audiod_audio_formats=""
 server_cmdline_objs="server.cmdline server_command_list afs_command_list"
 server_errlist_objs="server afh_common mp3_afh vss command net string signal
        time daemon stat crypt http_send close_on_fork
-       ipc dccp dccp_send fd user_list chunk_queue afs osl aft mood score attribute
+       ipc dccp_send fd user_list chunk_queue afs osl aft mood score attribute
        blob playlist sha1 rbtree sched"
 server_ldflags=""
 server_audio_formats=" mp3"
@@ -493,6 +498,8 @@ AC_CONFIG_FILES([Makefile])
 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=""
@@ -532,6 +539,7 @@ AC_DEFUN([define_safe_error_enums],
 ]
 )
 
+
 AC_MSG_NOTICE(creating error2.h)
 for obj in $all_errlist_objs; do
        SS="$SS SS_$(echo $obj | tr 'a-z' 'A-Z'),"
@@ -544,6 +552,38 @@ AC_DEFINE_UNQUOTED(DEFINE_ERRLIST_OBJECT_ENUM,
        [list of all objects that use paraslash's error facility]
 )
 
+################################################################## status items
+
+status_items="basename status num_played mtime bitrate frequency file_size
+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"
+
+# $1: prefix, $2: items
+AC_DEFUN([make_enum_items], [$(
+       for i in $2; do
+               printf "$1_$(echo $i | tr 'a-z' 'A-Z'), "
+       done
+)])
+
+# $1: prefix, $2: items
+AC_DEFUN([make_enum_array], [$(
+       for i in $2; do
+               printf "\"$i\", "
+       done
+)])
+
+AC_DEFINE_UNQUOTED(STATUS_ITEM_ENUM,
+       make_enum_items(SI,  $status_items),
+       [enum of all status items]
+)
+AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY,
+       make_enum_array(SI,  $status_items),
+       [char * array of all status items]
+)
+
 
 recv_objs="$recv_cmdline_objs $recv_errlist_objs"
 filter_objs="$filter_cmdline_objs $filter_errlist_objs"