]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - configure.ac
build: Generate man pages directly from ggo files.
[paraslash.git] / configure.ac
index 46fb18cae9cbfbd0f58a6f68f3d1a28050a9df6d..693dd13bec773bc34aaf0007e224eb832866cc11 100644 (file)
@@ -37,7 +37,6 @@ AC_PROG_CC
 AC_PROG_CPP
 AC_PROG_INSTALL
 AC_SUBST(install_sh, [$INSTALL])
-AC_REPLACE_FNMATCH
 
 AC_HEADER_DIRENT
 AC_HEADER_STDC
@@ -71,11 +70,9 @@ AC_TYPE_UINT64_T
 # Checks for library functions.
 AC_FUNC_FORK
 AC_PROG_GCC_TRADITIONAL
-AC_FUNC_MALLOC
 AC_FUNC_MEMCMP
 AC_FUNC_MKTIME
 AC_FUNC_MMAP
-AC_FUNC_REALLOC
 AC_FUNC_SELECT_ARGTYPES
 AC_FUNC_STAT
 AC_FUNC_STRFTIME
@@ -92,7 +89,8 @@ AC_CHECK_FUNCS([atexit dup2 memchr memmove memset \
 AC_DEFUN([add_cmdline],[$(for i in $@; do printf "${i}.cmdline "; done)])
 
 
-executables="recv filter audioc write client afh audiod play"
+executables="recv filter audioc write afh play"
+audio_format_handlers="mp3 wma"
 
 recv_cmdline_objs="add_cmdline(recv http_recv dccp_recv udp_recv afh_recv)"
 
@@ -122,15 +120,6 @@ audioc_errlist_objs="
 "
 audioc_ldflags=""
 
-audiod_cmdline_objs="add_cmdline(audiod compress_filter http_recv dccp_recv file_write client amp_filter udp_recv prebuffer_filter)"
-audiod_errlist_objs="audiod signal string daemon stat net crypt_common sideband
-       time grab_client filter_common wav_filter compress_filter amp_filter http_recv dccp_recv
-       recv_common fd sched write_common file_write audiod_command fecdec_filter
-       client_common ggo udp_recv color fec prebuffer_filter version
-       bitstream imdct wma_common wmadec_filter buffer_tree"
-audiod_ldflags="-lm"
-audiod_audio_formats="wma"
-
 afh_cmdline_objs="add_cmdline(afh)"
 afh_errlist_objs="afh string fd mp3_afh afh_common time wma_afh wma_common
        version ggo"
@@ -143,25 +132,6 @@ write_ldflags=""
 writers=" file"
 default_writer="FILE_WRITE"
 
-client_cmdline_objs="add_cmdline(client)"
-client_errlist_objs="
-       client
-       net
-       string
-       fd
-       sched
-       stdin
-       stdout
-       time
-       sideband
-       client_common
-       buffer_tree
-       crypt_common
-       version
-       ggo
-"
-client_ldflags=""
-
 gui_cmdline_objs="add_cmdline(gui)"
 gui_errlist_objs="
        exec
@@ -222,59 +192,14 @@ 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
-       build_server="no"
        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
-       build_server="yes"
-       executables="$executables server"
-       server_cmdline_objs="add_cmdline(server)"
-       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=""
-       audio_format_handlers="mp3 wma"
-       AC_SUBST(osl_cppflags)
-       server_ldflags="$server_ldflags $osl_libs -losl"
 fi
+AC_SUBST(osl_cppflags)
 CPPFLAGS="$OLD_CPPFLAGS"
 LDFLAGS="$OLD_LDFLAGS"
 LIBS="$OLD_LIBS"
@@ -388,10 +313,6 @@ if test "$check_gcrypt" = "yes"; then
 else
        have_gcrypt="no"
 fi
-###########################################################################
-if test "$have_openssl" = "no" -a "$have_gcrypt" = "no"; then
-       AC_MSG_ERROR([neither openssl nor gcrypt usable])
-fi
 ########################################################################### libsocket
 AC_CHECK_LIB([c], [socket],
        [socket_lib=],
@@ -1167,6 +1088,128 @@ 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
+############################################################# client
+if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
+       build_client="yes"
+       executables="$executables client"
+       client_cmdline_objs="add_cmdline(client)"
+       client_errlist_objs="$client_errlist_objs
+               client
+               net
+               string
+               fd
+               sched
+               stdin
+               stdout
+               time
+               sideband
+               client_common
+               buffer_tree
+               crypt_common
+               version
+               ggo
+       "
+else
+       build_client="no"
+fi
+############################################################# audiod
+if test "$have_openssl" = "yes" -o "$have_gcrypt" = "yes"; then
+       build_audiod="yes"
+       executables="$executables audiod"
+       audiod_cmdline_objs="$audiod_cmdline_objs
+               add_cmdline(audiod compress_filter http_recv dccp_recv file_write client amp_filter udp_recv prebuffer_filter)"
+       audiod_errlist_objs="$audiod_errlist_objs
+               audiod
+               signal
+               string
+               daemon
+               stat
+               net
+               crypt_common
+               sideband
+               time
+               grab_client
+               filter_common
+               wav_filter
+               compress_filter
+               amp_filter
+               http_recv
+               dccp_recv
+               recv_common
+               fd
+               sched
+               write_common
+               file_write
+               audiod_command
+               fecdec_filter
+               client_common
+               ggo
+               udp_recv
+               color
+               fec
+               prebuffer_filter
+               version
+               bitstream
+               imdct
+               wma_common
+               wmadec_filter
+               buffer_tree
+       "
+       audiod_ldflags="$audiod_ldflags -lm"
+       audiod_audio_formats="$audiod_audio_formats wma"
+else
+       build_audiod="no"
+fi
 ############################################################# error2.h
 AC_MSG_NOTICE(creating error2.h)
 
@@ -1176,9 +1219,7 @@ all_errlist_objs="
        $filter_errlist_objs
        $audioc_errlist_objs
        $write_errlist_objs
-       $client_errlist_objs
        $afh_errlist_objs
-       $audiod_errlist_objs
        $play_errlist_objs
 "
 
@@ -1192,6 +1233,12 @@ fi
 if test "$build_fade" = "yes"; then
        all_errlist_objs="$all_errlist_objs $fade_errlist_objs"
 fi
+if test "$build_client" = "yes"; then
+       all_errlist_objs="$all_errlist_objs $client_errlist_objs"
+fi
+if test "$build_audiod" = "yes"; then
+       all_errlist_objs="$all_errlist_objs $audiod_errlist_objs"
+fi
 
 all_errlist_objs="$(echo $all_errlist_objs | tr ' ' '\n' | sort | uniq)"
 
@@ -1337,4 +1384,6 @@ $mixer_summary
 para_server: $build_server
 para_gui: $build_gui
 para_fade: $build_fade
+para_client: $build_client
+para_audiod: $build_audiod
 ])