AC_USE_SYSTEM_EXTENSIONS
AC_C_BIGENDIAN()
-AC_PATH_PROG([GENGETOPT], [gengetopt])
-test -z "$GENGETOPT" && AC_MSG_ERROR(
- [gengetopt is required to build this package])
-
AC_PATH_PROG([M4], [m4])
test -z "$M4" && AC_MSG_ERROR(
[The m4 macro processor is required to build this package])
-AC_PATH_PROG([HELP2MAN], [help2man])
-test -z "$HELP2MAN" && AC_MSG_ERROR(
- [help2man is required to build this package])
-
AC_PATH_PROG([INSTALL], [install])
test -z "$INSTALL" && AC_MSG_ERROR(
[The install program is required to build this package])
if test ${have_ucred} = yes; then
AC_DEFINE(HAVE_UCRED, 1, define to 1 you have struct ucred)
fi
-########################################################################### gengetopt
-echo 'option "z" z "" flag off' | $GENGETOPT --file-name conftest-ggo &&
-AC_CHECK_DECL(
- [gengetopt_args_info_description],
- [ggo_descriptions_declared=yes],
- [ggo_descriptions_declared=no],
- [#include "conftest-ggo.h"]
-)
-AC_SUBST(ggo_descriptions_declared)
########################################################################### curses
STASH_FLAGS
LIB_ARG_WITH([curses], [])
if test -n "$CRYPTOLIB" && test $HAVE_OSL = yes; then
build_server="yes"
executables="$executables server"
- server_cmdline_objs="server"
server_errlist_objs="
server
afh_common
wma_common
sideband
version
- ggo
"
if test "$CRYPTOLIB" = openssl; then
server_errlist_objs="$server_errlist_objs crypt"
if test $HAVE_FAAD = yes && test $HAVE_MP4V2 = yes; then
server_errlist_objs="$server_errlist_objs aac_afh aac_common"
fi
- server_objs="add_cmdline($server_cmdline_objs) $server_errlist_objs"
+ server_objs="$server_errlist_objs"
AC_SUBST(server_objs, add_dot_o($server_objs))
else
build_server="no"
build_audiod="yes"
executables="$executables audiod"
audiod_audio_formats="wma"
- audiod_cmdline_objs="$audiod_cmdline_objs
- audiod
- "
audiod_errlist_objs="$audiod_errlist_objs
audiod
signal
audiod_command
fecdec_filter
client_common
- ggo
udp_recv
color
fec
if test $HAVE_SAMPLERATE = yes; then
audiod_errlist_objs="$audiod_errlist_objs resample_filter check_wav"
fi
- audiod_objs="add_cmdline($audiod_cmdline_objs) $audiod_errlist_objs"
+ audiod_objs="$audiod_errlist_objs"
AC_SUBST(audiod_objs, add_dot_o($audiod_objs))
enum="$(for i in $audiod_audio_formats; do printf "AUDIO_FORMAT_${i}, " | tr '[a-z]' '[A-Z]'; done)"
else
build_audiod="no"
fi
-########################################################################### fade
+########################################################################### mixer
if test $HAVE_OSS = yes -o $HAVE_ALSA = yes; then
- build_fade="yes"
- executables="$executables fade"
- fade_errlist_objs="fade exec string fd version"
+ build_mixer="yes"
+ executables="$executables mixer"
+ mixer_errlist_objs="mixer exec string fd version"
if test $HAVE_OSS = yes; then
- fade_errlist_objs="$fade_errlist_objs oss_mix"
- mixers="${mixers}oss "
- default_mixer="OSS_MIX"
+ mixer_errlist_objs="$mixer_errlist_objs oss_mix"
fi
if test $HAVE_ALSA = yes; then
- fade_errlist_objs="$fade_errlist_objs alsa_mix"
- mixers="${mixers}alsa "
- default_mixer="ALSA_MIX"
+ mixer_errlist_objs="$mixer_errlist_objs alsa_mix"
fi
- fade_objs="$fade_errlist_objs"
- AC_SUBST(fade_objs, add_dot_o($fade_objs))
- enum="$(
- for i in $mixers; do
- printf "${i}_MIX, " | tr '[a-z]' '[A-Z]'
- done
- )"
- AC_DEFINE_UNQUOTED(MIXER_ENUM, $enum NUM_SUPPORTED_MIXERS,
- enum of supported mixers)
- AC_DEFINE_UNQUOTED(DEFAULT_MIXER, $default_mixer,
- use this mixer if none was specified)
- names="$(for i in $mixers; do printf \"$i\",' ' ; done)"
- AC_DEFINE_UNQUOTED(MIXER_NAMES, $names, supported mixer names)
- inits="$(
- for i in $mixers; do
- printf 'extern void '$i'_mix_init(struct mixer *); '
- done
- )"
- AC_DEFINE_UNQUOTED(DECLARE_MIXER_INITS, $inits,
- init functions of the supported mixers)
- array="$(for i in $mixers; do printf '{.init = '$i'_mix_init},'; done)"
- AC_DEFINE_UNQUOTED(MIXER_ARRAY, $array, array of supported mixers)
+ mixer_objs="$mixer_errlist_objs"
+ AC_SUBST(mixer_objs, add_dot_o($mixer_objs))
else
- build_fade="no"
+ build_mixer="no"
AC_MSG_WARN([no mixer support])
fi
########################################################################### gui
if test $HAVE_CURSES = yes; then
build_gui="yes"
executables="$executables gui"
- gui_cmdline_objs="gui"
gui_errlist_objs="
exec
signal
time
sched
version
- ggo
"
- gui_objs="add_cmdline($gui_cmdline_objs) $gui_errlist_objs"
+ gui_objs="$gui_errlist_objs"
AC_SUBST(gui_objs, add_dot_o($gui_objs))
else
build_gui="no"
AC_SUBST(recv_objs, add_dot_o($recv_objs))
########################################################################### afh
audio_format_handlers="mp3 wma"
-afh_cmdline_objs="afh"
afh_errlist_objs="
afh
string
wma_afh
wma_common
version
- ggo
"
NEED_OGG_OBJECTS && afh_errlist_objs="$afh_errlist_objs ogg_afh_common"
NEED_VORBIS_OBJECTS && {
audio_format_handlers="$audio_format_handlers aac"
fi
-afh_objs="add_cmdline($afh_cmdline_objs) $afh_errlist_objs"
+afh_objs="$afh_errlist_objs"
AC_SUBST(afh_objs, add_dot_o($afh_objs))
########################################################################## play
para_server: $build_server
para_gui: $build_gui
-para_fade: $build_fade
+para_mixer: $build_mixer
para_client: $build_client
para_audiod: $build_audiod
])