X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=configure.ac;h=f47a56df0c96f71d68e19b3655aa017925536a83;hp=5322e7d1be6a12b5230d15599fc6b323e00e3a0d;hb=28ea59db9b3cd2bd9d6be0f304d951aa550ea4d6;hpb=90560de0d7e4d825772270f9ac7cbefbb38aad97 diff --git a/configure.ac b/configure.ac index 5322e7d1..f47a56df 100644 --- a/configure.ac +++ b/configure.ac @@ -94,7 +94,7 @@ server_command_list afs_command_list audiod_command_list bitstream imdct wma_afh wma_common wmadec_filter buffer_tree " -executables="server recv filter audioc write client afh audiod" +executables="recv filter audioc write client afh audiod" recv_cmdline_objs="add_cmdline(recv http_recv dccp_recv udp_recv)" @@ -257,14 +257,18 @@ fi AC_CHECK_HEADER(osl.h, [], have_osl=no) AC_CHECK_LIB([osl], [osl_open_table], [], have_osl=no) if test "$have_osl" = "no"; then - AC_MSG_ERROR([libosl not found, download it at + AC_MSG_WARN([libosl not found, can not build para_server. +Download libosl at http://systemlinux.org/~maan/osl or execute git clone git://git.tuebingen.mpg.de/osl ]) +else + extras="$extras server" + executables="$executables server" + AC_SUBST(osl_cppflags) + server_ldflags="$server_ldflags -L$with_osl_libs" fi -AC_SUBST(osl_cppflags) -server_ldflags="$server_ldflags -L$with_osl_libs" CPPFLAGS="$OLD_CPPFLAGS" LDFLAGS="$OLD_LDFLAGS" LIBS="$OLD_LIBS" @@ -691,53 +695,14 @@ AC_DEFUN([add_dot_o],[$(for i in $@; do printf "$i.o "; done)]) AC_DEFUN([add_para],[$(for i in $@; do printf "para_$i "; 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="" - for i in $executables; do -# eval echo checking if $1 is linked into $i - for j in $(eval echo \$${i}_errlist_objs); do - if test $j = $1; then - exe="$exe $i" - break; - fi - done - done - #echo "$1 gets linked into $exe" - safe_errlists="" - for i in $all_errlist_objs; do - for j in $exe; do - found=0 - for k in $(eval echo \$${j}_errlist_objs); do - if test $k = $i; then - found=1 - break; - fi - done - if test $found -eq 0; then - break; - fi - done - if test $found -eq 1; then - safe_errlists="$safe_errlists $i" - fi - done - #echo "safe errlists for $1: $safe_errlists" - ss_defs="" - for i in $safe_errlists; do - echo "SS_ENUM($(echo $i | tr 'a-z' 'A-Z'));" - done -] -) - - AC_MSG_NOTICE(creating error2.h) +for i in $executables; do + echo "$i: " + eval echo \$${i}_errlist_objs +done | ./error2.pl > error2.h for obj in $all_errlist_objs; do SS="$SS SS_$(echo $obj | tr 'a-z' 'A-Z')," - echo "#ifdef MAIN_INPUT_FILE_IS_$obj" - define_safe_error_enums($obj) - echo "#endif" -done > error2.h +done AC_DEFINE_UNQUOTED(DEFINE_ERRLIST_OBJECT_ENUM, [enum {$SS NUM_SS}], [list of all objects that use paraslash's error facility] @@ -753,28 +718,19 @@ lyrics_id duration directory lyrics_name image_name path hash channels last_played num_chunks chunk_time amplification artist title year album comment" -# $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] -) +result= +for i in $status_items; do + result="$result SI_$(echo $i | tr 'a-z' 'A-Z'), " +done +AC_DEFINE_UNQUOTED(STATUS_ITEM_ENUM, [$result], + [enum of all status items]) + +result= +for i in $status_items; do + result="$result \"$i\", " +done +AC_DEFINE_UNQUOTED(STATUS_ITEM_ARRAY, [$result], + [char * array of all status items]) AC_DEFINE_UNQUOTED(SERVER_AUDIO_FORMATS, "$server_audio_formats", [formats supported by para_server and para_afh])