build: Build para_client only if crypto lib was found.
authorAndre Noll <maan@systemlinux.org>
Thu, 29 Aug 2013 21:09:45 +0000 (21:09 +0000)
committerAndre Noll <maan@systemlinux.org>
Sun, 1 Dec 2013 10:40:59 +0000 (11:40 +0100)
This creates a separate section for para_client, similar to the one
for para_server that was added in the previous patch.

The new section sets $build_client to either yes or no, depending on
whether a crypto library (openssl nor gcrypt) was found by the tests
performed earlier. This test is always true at the moment since we
abort anyway if neither library was detected. But this is about to
change, so..

configure.ac

index 00ff019f510b43a701932c617ccb271e96b7f8a1..a6fc62afdf65377aea78197ba4758fe86f86ed01 100644 (file)
@@ -92,7 +92,7 @@ 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 audiod play"
 audio_format_handlers="mp3 wma"
 
 recv_cmdline_objs="add_cmdline(recv http_recv dccp_recv udp_recv afh_recv)"
@@ -144,25 +144,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
@@ -1173,6 +1154,30 @@ if test \( "$have_openssl" = "yes" -o "$have_gcrypt" = "yes" \) \
 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
 ############################################################# error2.h
 AC_MSG_NOTICE(creating error2.h)
 
@@ -1182,7 +1187,6 @@ all_errlist_objs="
        $filter_errlist_objs
        $audioc_errlist_objs
        $write_errlist_objs
-       $client_errlist_objs
        $afh_errlist_objs
        $audiod_errlist_objs
        $play_errlist_objs
@@ -1198,6 +1202,9 @@ 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
 
 all_errlist_objs="$(echo $all_errlist_objs | tr ' ' '\n' | sort | uniq)"
 
@@ -1343,4 +1350,5 @@ $mixer_summary
 para_server: $build_server
 para_gui: $build_gui
 para_fade: $build_fade
+para_client: $build_client
 ])