]> git.tue.mpg.de Git - paraslash.git/commitdiff
build: Create a separate section for para_server.
authorAndre Noll <maan@systemlinux.org>
Thu, 29 Aug 2013 20:56:33 +0000 (20:56 +0000)
committerAndre Noll <maan@systemlinux.org>
Sun, 1 Dec 2013 10:40:58 +0000 (11:40 +0100)
The new section is added after osl and crypto detection has been
performed. We only build para_server if both libosl and a crypto
library was found.

This check is not necessary at the moment since we abort earlier if
neither openssl nor gcrypt was detected, but it will eventually allow
to make crypto support optional.

configure.ac

index 46fb18cae9cbfbd0f58a6f68f3d1a28050a9df6d..00ff019f510b43a701932c617ccb271e96b7f8a1 100644 (file)
@@ -93,6 +93,7 @@ AC_DEFUN([add_cmdline],[$(for i in $@; do printf "${i}.cmdline "; done)])
 
 
 executables="recv filter audioc write client afh audiod play"
+audio_format_handlers="mp3 wma"
 
 recv_cmdline_objs="add_cmdline(recv http_recv dccp_recv udp_recv afh_recv)"
 
@@ -222,59 +223,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"
@@ -1167,6 +1123,56 @@ 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
 AC_MSG_NOTICE(creating error2.h)