BISON := @BISON@
M4 := @M4@
LOPSUBGEN := @LOPSUBGEN@
+CRYPTOLIB := @CRYPTOLIB@
+
+NEED_OGG_OBJECTS := @NEED_OGG_OBJECTS@
+NEED_VORBIS_OBJECTS := @NEED_VORBIS_OBJECTS@
+NEED_SPEEX_OBJECTS := @NEED_SPEEX_OBJECTS@
+NEED_OPUS_OBJECTS := @NEED_OPUS_OBJECTS@
+NEED_FLAC_OBJECTS := @NEED_FLAC_OBJECTS@
+
+HAVE_OSL := @HAVE_OSL@
+HAVE_FAAD := @HAVE_FAAD@
+HAVE_FLAC := @HAVE_FLAC@
executables := @executables@
audiod_objs := @audiod_objs@
audioc_objs := @audioc_objs@
mixer_objs := @mixer_objs@
-server_objs := @server_objs@
-upgrade_db_objs := @upgrade_db_objs@
write_objs := @write_objs@
afh_objs := @afh_objs@
play_objs := @play_objs@
yy_src_dir := yy
yy_build_dir := $(build_dir)/yy
+ifneq ($(CRYPTOLIB),)
+ ifeq ($(HAVE_OSL),yes)
+ server_objs := $(addsuffix .o, \
+ server afh_common mp3_afh vss command net string \
+ signal time daemon http_send close_on_fork \
+ crypt_common base64 ipc dccp_send fd user_list \
+ chunk_queue afs aft mood mp score attribute blob \
+ playlist sched acl send_common udp_send color fec \
+ wma_afh wma_common sideband version lsu \
+ )
+ ifeq ($(CRYPTOLIB),openssl)
+ server_objs += openssl.o
+ else
+ server_objs += gcrypt.o
+ endif
+ ifeq ($(NEED_OGG_OBJECTS),yes)
+ server_objs += ogg_afh_common.o
+ endif
+ ifeq ($(NEED_VORBIS_OBJECTS),yes)
+ server_objs += ogg_afh.o
+ endif
+ ifeq ($(NEED_SPEEX_OBJECTS),yes)
+ server_objs += spx_afh.o spx_common.o
+ endif
+ ifeq ($(NEED_OPUS_OBJECTS),yes)
+ server_objs += opus_afh.o opus_common.o
+ endif
+ ifeq ($(NEED_FLAC_OBJECTS),yes)
+ server_objs += flac_afh.o
+ endif
+ ifeq ($(HAVE_FAAD),yes)
+ server_objs += aac_afh.o mp4.o
+ endif
+ upgrade_db_objs := $(addsuffix .o, crypt_common exec fd string \
+ upgrade_db version base64)
+ endif
+endif
+
# sort removes duplicate words, which is all we need here
all_objs := $(sort $(recv_objs) $(filter_objs) $(client_objs) $(gui_objs) \
$(audiod_objs) $(audioc_objs) $(mixer_objs) $(server_objs) \
if test "$HAVE_[]m4_toupper([$1])" = 'yes'; then
AC_DEFINE(HAVE_[]m4_toupper([$1]), 1,
define to 1 to turn on $1 support)
+ AC_SUBST(HAVE_[]m4_toupper([$1]))
else
$1_cppflags=
$1_ldflags=
;;
esac
AC_SUBST(crypto_ldflags)
+AC_SUBST(CRYPTOLIB)
########################################################################## iconv
STASH_FLAGS
LIBS=
-o "$HAVE_OPUS" = 'yes' \
-o "$HAVE_FLAC" = 'yes' \
\)], [NEED_OGG_OBJECTS=yes], [NEED_OGG_OBJECTS=no])
+AC_SUBST([NEED_OGG_OBJECTS])
AS_IF([test "$HAVE_OGG" = 'yes' -a "$HAVE_VORBIS" = 'yes'],
[NEED_VORBIS_OBJECTS=yes], [NEED_VORBIS_OBJECTS=no])
+AC_SUBST([NEED_VORBIS_OBJECTS])
AS_IF([test "$HAVE_OGG" = 'yes' -a "$HAVE_SPEEX" = 'yes'],
[NEED_SPEEX_OBJECTS=yes], [NEED_SPEEX_OBJECTS=no])
+AC_SUBST([NEED_SPEEX_OBJECTS])
AS_IF([test "$HAVE_OGG" = 'yes' -a "$HAVE_OPUS" = 'yes'],
[NEED_OPUS_OBJECTS=yes], [NEED_OPUS_OBJECTS=no])
+AC_SUBST([NEED_OPUS_OBJECTS])
AS_IF([test "$HAVE_OGG" = 'yes' -a "$HAVE_FLAC" = 'yes'],
[NEED_FLAC_OBJECTS=yes], [NEED_FLAC_OBJECTS=no])
+AC_SUBST([NEED_FLAC_OBJECTS])
########################################################################### faad
STASH_FLAGS
LIB_ARG_WITH([faad], [-lfaad])
[Detect and report undefined behaviour.])],
[ENABLE_UBSAN=yes], [ENABLE_UBSAN=no])
AC_SUBST(ENABLE_UBSAN)
-######################################################################### server
+######################################################### server and upgrade_db
if test -n "$CRYPTOLIB" && test $HAVE_OSL = yes; then
build_server="yes"
executables="$executables server upgrade_db"
- server_objs="
- server
- afh_common
- mp3_afh
- vss
- command
- net
- string
- signal
- time
- daemon
- http_send
- close_on_fork
- crypt_common
- base64
- ipc
- dccp_send
- fd
- user_list
- chunk_queue
- afs
- aft
- mood
- mp
- score
- attribute
- blob
- playlist
- sched
- acl
- send_common
- udp_send
- color
- fec
- wma_afh
- wma_common
- sideband
- version
- lsu
- "
- if test "$CRYPTOLIB" = openssl; then
- server_objs="$server_objs openssl"
- else
- server_objs="$server_objs gcrypt"
- fi
- AS_IF([test $NEED_OGG_OBJECTS = yes],
- [server_objs="$server_objs ogg_afh_common"])
- AS_IF([test $NEED_VORBIS_OBJECTS = yes],
- [server_objs="$server_objs ogg_afh"])
- AS_IF([test $NEED_SPEEX_OBJECTS = yes],
- [server_objs="$server_objs spx_afh spx_common"])
- AS_IF([test $NEED_OPUS_OBJECTS = yes],
- [server_objs="$server_objs opus_afh opus_common"])
- AS_IF([test $NEED_FLAC_OBJECTS = yes],
- [server_objs="$server_objs flac_afh"])
- if test $HAVE_FAAD = yes; then
- server_objs="$server_objs aac_afh mp4"
- fi
- AC_SUBST(server_objs, add_dot_o($server_objs))
else
build_server="no"
fi
-############################################################# upgrade_db
-upgrade_db_objs='
- crypt_common
- exec
- fd
- string
- upgrade_db
- version
- base64
-'
-AC_SUBST(upgrade_db_objs, add_dot_o($upgrade_db_objs))
############################################################# client
if test -n "$CRYPTOLIB"; then
build_client="yes"