Use QF_NEED for plugins.

At the moment, the selection of the default sound driver etc is broken.
This commit is contained in:
Bill Currie 2012-02-12 11:37:25 +09:00
parent e513e29905
commit 02d24189ef
13 changed files with 267 additions and 323 deletions

View file

@ -341,28 +341,6 @@ if test -n "$CL_TARGETS"; then
SND_TARGETS="libQFsound.la"
AUDIO_TARGETS="testsound\$(EXEEXT)"
JOY_TARGETS="libQFjs.la"
if test "$SOUND_TYPES"; then
SND_REND_TARGETS="$SND_REND_TARGETS snd_render_default.la"
if test "`echo $SOUND_TYPES | grep JACK`"; then
SND_REND_TARGETS="$SND_REND_TARGETS snd_render_jack.la"
fi
fi
# priority sorted list for default sound driver in order of increasing
# priority. default is no driver.
# NOTE both lists must match: SNDTYPE_LIST is the name as normally printed
# SNDDRIVER_LIST is the name as used by the plugin
SNDTYPE_LIST="SDL MME SGI SUN Win32 DirectX OSS ALSA"
SNDDRIVER_LIST="sdl mme sgi sun win dx oss alsa"
set $SNDDRIVER_LIST
for t in $SNDTYPE_LIST; do
if test "`echo $SOUND_TYPES | grep $t`"; then
SND_PLUGIN_TARGETS="$SND_PLUGIN_TARGETS snd_output_$1.la"
SND_OUTPUT_DEFAULT="$1"
fi
shift
done
else
unset CDTYPE
CD_PLUGIN_TARGETS=""
@ -376,16 +354,6 @@ else
fi
AC_DEFINE_UNQUOTED(SND_OUTPUT_DEFAULT, "$SND_OUTPUT_DEFAULT", [Define this to the default sound output driver.])
SERVER_PLUGIN_TARGETS=""
if test x$console_need_server = xyes; then
SERVER_PLUGIN_TARGETS="console_server.la"
fi
SERVER_PLUGIN_STATIC=""
CLIENT_PLUGIN_TARGETS=""
if test x$console_need_client = xyes; then
CLIENT_PLUGIN_TARGETS="console_client.la"
fi
CLIENT_PLUGIN_STATIC=""
CD_PLUGIN_STATIC=""
SND_PLUGIN_STATIC=""
SND_REND_STATIC=""
@ -415,80 +383,30 @@ if test "x$static_plugins" = xauto; then
fi
fi
if test "x$static_plugins" = xyes; then
QF_PROCESS_NEED_STATIC_PLUGINS(console, [server], [\$(top_builddir)/libs/console], [server])
QF_PROCESS_NEED_STATIC_PLUGINS(console, [client], [\$(top_builddir)/libs/console], [client])
QF_PROCESS_NEED_STATIC_PLUGINS(snd_output, [sdl mme sgi sun win dx oss alsa], [targets])
QF_PROCESS_NEED_STATIC_PLUGINS(snd_render, [jack default], [renderer])
QF_PROCESS_NEED_STATIC_PLUGINS(cd, [xmms sdl sgi win linux file])
AC_DEFINE(STATIC_PLUGINS, 1, [Define this if you are building static plugins])
SERVER_PLUGIN_STATIC="$SERVER_PLUGIN_TARGETS"
SERVER_PLUGIN_TARGETS=""
CLIENT_PLUGIN_STATIC="$CLIENT_PLUGIN_TARGETS"
CLIENT_PLUGIN_TARGETS=""
CD_PLUGIN_STATIC="$CD_PLUGIN_TARGETS"
CD_PLUGIN_TARGETS=""
SND_PLUGIN_STATIC="$SND_PLUGIN_TARGETS"
SND_PLUGIN_TARGETS=""
SND_REND_STATIC="$SND_REND_TARGETS"
SND_REND_TARGETS=""
if test -n "$SOUND_TYPES"; then
SOUND_TYPES="$SOUND_TYPES (static)"
fi
if test -n "$CDTYPE"; then
CDTYPE="$CDTYPE (static)"
fi
else
QF_PROCESS_NEED_PLUGINS(console, [client server])
QF_PROCESS_NEED_PLUGINS(snd_output, [sdl mme sgi sun win dx oss alsa])
QF_PROCESS_NEED_PLUGINS(snd_render, [jack default])
QF_PROCESS_NEED_PLUGINS(cd, [xmms sdl sgi win linux file])
fi
dnl Do not use -module here, it belongs in makefile.am due to automake
dnl needing it there to work correctly
SERVER_PLUGIN_STATIC_LIBS=""
CLIENT_PLUGIN_STATIC_LIBS=""
CD_PLUGIN_STATIC_LIBS=""
SND_PLUGIN_STATIC_LIBS=""
SND_REND_STATIC_LIBS=""
SERVER_PLUGIN_LIST="{0, 0}"
CLIENT_PLUGIN_LIST="{0, 0}"
CD_PLUGIN_LIST="{0, 0}"
SND_OUTPUT_LIST="{0, 0}"
SND_RENDER_LIST="{0, 0}"
SERVER_PLUGIN_PROTOS=""
CLIENT_PLUGIN_PROTOS=""
CD_PLUGIN_PROTOS=""
SND_OUTPUT_PROTOS=""
SND_RENDER_PROTOS=""
for l in $SERVER_PLUGIN_STATIC; do
SERVER_PLUGIN_STATIC_LIBS="$SERVER_PLUGIN_STATIC_LIBS "'$(top_builddir)'"/libs/console/$l"
n="`echo $l | sed -e 's/\(.*\)\.la/\1/'`"
SERVER_PLUGIN_LIST='{"'"$n"'"'", ${n}_PluginInfo},$SERVER_PLUGIN_LIST"
SERVER_PLUGIN_PROTOS="$SERVER_PLUGIN_PROTOS extern plugin_t *${n}_PluginInfo (void);"
done
for l in $CLIENT_PLUGIN_STATIC; do
CLIENT_PLUGIN_STATIC_LIBS="$CLIENT_PLUGIN_STATIC_LIBS "'$(top_builddir)'"/libs/console/$l"
n="`echo $l | sed -e 's/\(.*\)\.la/\1/'`"
CLIENT_PLUGIN_LIST='{"'"$n"'"'", ${n}_PluginInfo},$CLIENT_PLUGIN_LIST"
CLIENT_PLUGIN_PROTOS="$CLIENT_PLUGIN_PROTOS extern plugin_t *${n}_PluginInfo (void);"
done
for l in $CD_PLUGIN_STATIC; do
CD_PLUGIN_STATIC_LIBS="$CD_PLUGIN_STATIC_LIBS $l"
n="`echo $l | sed -e 's/\(.*\)\.la/\1/'`"
CD_PLUGIN_LIST='{"'"$n"'"'", ${n}_PluginInfo},$CD_PLUGIN_LIST"
CD_PLUGIN_PROTOS="$CD_PLUGIN_PROTOS extern plugin_t *${n}_PluginInfo (void);"
done
for l in $SND_PLUGIN_STATIC; do
SND_PLUGIN_STATIC_LIBS="$SND_PLUGIN_STATIC_LIBS targets/$l"
n="`echo $l | sed -e 's/\(.*\)\.la/\1/'`"
SND_OUTPUT_LIST='{"'"$n"'"'", ${n}_PluginInfo},$SND_OUTPUT_LIST"
SND_OUTPUT_PROTOS="$SND_OUTPUT_PROTOS extern plugin_t *${n}_PluginInfo (void);"
done
for l in $SND_REND_STATIC; do
SND_REND_STATIC_LIBS="$SND_REND_STATIC_LIBS renderer/$l"
n="`echo $l | sed -e 's/\(.*\)\.la/\1/'`"
SND_RENDER_LIST='{"'"$n"'"'", ${n}_PluginInfo},$SND_RENDER_LIST"
SND_RENDER_PROTOS="$SND_RENDER_PROTOS extern plugin_t *${n}_PluginInfo (void);"
done
AC_DEFINE_UNQUOTED(SERVER_PLUGIN_LIST, $SERVER_PLUGIN_LIST, [list of server plugins])
AC_DEFINE_UNQUOTED(SERVER_PLUGIN_PROTOS, $SERVER_PLUGIN_PROTOS, [list of server prototypes])
AC_DEFINE_UNQUOTED(CLIENT_PLUGIN_LIST, $CLIENT_PLUGIN_LIST, [list of client plugins])
AC_DEFINE_UNQUOTED(CLIENT_PLUGIN_PROTOS, $CLIENT_PLUGIN_PROTOS, [list of client prototypes])
AC_DEFINE_UNQUOTED(CD_PLUGIN_LIST, $CD_PLUGIN_LIST, [list of cd plugins])
AC_DEFINE_UNQUOTED(CD_PLUGIN_PROTOS, $CD_PLUGIN_PROTOS, [list of cd prototypes])
AC_DEFINE_UNQUOTED(SND_OUTPUT_LIST, $SND_OUTPUT_LIST, [list of sound output plugins])
AC_DEFINE_UNQUOTED(SND_OUTPUT_PROTOS, $SND_OUTPUT_PROTOS, [list of sound output prototypes])
AC_DEFINE_UNQUOTED(SND_RENDER_LIST, $SND_RENDER_LIST, [list of sound render plugins])
AC_DEFINE_UNQUOTED(SND_RENDER_PROTOS, $SND_RENDER_PROTOS, [list of sound render prototypes])
AC_SUBST(HW_TARGETS)
AC_SUBST(NQ_TARGETS)
@ -496,23 +414,8 @@ AC_SUBST(NQ_DESKTOP_DATA)
AC_SUBST(QTV_TARGETS)
AC_SUBST(QW_TARGETS)
AC_SUBST(QW_DESKTOP_DATA)
AC_SUBST(SERVER_PLUGIN_STATIC)
AC_SUBST(SERVER_PLUGIN_STATIC_LIBS)
AC_SUBST(SERVER_PLUGIN_TARGETS)
AC_SUBST(CLIENT_PLUGIN_STATIC)
AC_SUBST(CLIENT_PLUGIN_STATIC_LIBS)
AC_SUBST(CLIENT_PLUGIN_TARGETS)
AC_SUBST(CD_PLUGIN_STATIC)
AC_SUBST(CD_PLUGIN_STATIC_LIBS)
AC_SUBST(CD_PLUGIN_TARGETS)
AC_SUBST(CD_TARGETS)
AC_SUBST(JOY_TARGETS)
AC_SUBST(SND_PLUGIN_STATIC)
AC_SUBST(SND_PLUGIN_STATIC_LIBS)
AC_SUBST(SND_PLUGIN_TARGETS)
AC_SUBST(SND_REND_STATIC)
AC_SUBST(SND_REND_STATIC_LIBS)
AC_SUBST(SND_REND_TARGETS)
AC_SUBST(SND_TARGETS)
AC_SUBST(AUDIO_TARGETS)
AC_SUBST(VID_MODEL_TARGETS)

View file

@ -12,15 +12,11 @@ if test "x$mingw" != xyes -a "x$enable_xmms" == xyes; then
HAVE_XMMS=no)
AC_SUBST(HAVE_XMMS)
fi
AC_SUBST(CD_CFLAGS)
CDTYPE=""
CD_CFLAGS=""
CD_PLUGIN_TARGETS=""
if test "x$HAVE_VORBIS" = xyes; then
CDTYPE=" File"
CD_PLUGIN_TARGETS="cd_file.la"
QF_NEED(cd,[file])
fi
AC_MSG_CHECKING(for CD audio support)
@ -34,20 +30,20 @@ QF_maGiC_VALUE
#endif
],
CDTYPE="$CDTYPE Linux"
CD_PLUGIN_TARGETS="$CD_PLUGIN_TARGETS cd_linux.la"
QF_NEED(cd,[linux])
)
dnl XMMS audio
if test "x$HAVE_XMMS" = "xyes"; then
CDTYPE="$CDTYPE XMMS"
CD_PLUGIN_TARGETS="$CD_PLUGIN_TARGETS cd_xmms.la"
QF_NEED(cd,[xmms])
AC_DEFINE(HAVE_XMMS, [1], [Define if you have XMMS])
fi
dnl SDL CD audio
if test "x$HAVE_SDL_CD" = "xyes"; then
CDTYPE="$CDTYPE SDL"
CD_PLUGIN_TARGETS="$CD_PLUGIN_TARGETS cd_sdl.la"
QF_NEED(cd,[sdl])
fi
dnl SGI
@ -59,7 +55,7 @@ QF_maGiC_VALUE
#endif
],
CDTYPE="$CDTYPE SGI"
CD_PLUGIN_TARGETS="$CD_PLUGIN_TARGETS cd_sgi.la"
QF_NEED(cd,[sgi])
SGI_CD_LIBS="-lcdaudio -lmediad -lds"
)
AC_SUBST(SGI_CD_LIBS)
@ -73,7 +69,7 @@ QF_maGiC_VALUE
#endif
],
CDTYPE="$CDTYPE WIN32"
CD_PLUGIN_TARGETS="$CD_PLUGIN_TARGETS cd_win.la"
QF_NEED(cd,[win])
)
if test "x$CDTYPE" != "x"; then
AC_MSG_RESULT([$CDTYPE])

View file

@ -2,88 +2,6 @@ dnl ==================================================================
dnl Checks for sound
dnl ==================================================================
AC_CHECK_LIB(mme, waveOutOpen, HAVE_LIBMME=yes)
AC_ARG_ENABLE(alsa,
[ --disable-alsa disable checks for ALSA support])
AC_ARG_ENABLE(oss,
[ --disable-oss disable checks for OSS support])
AC_ARG_ENABLE(sun,
[ --disable-sun disable checks for Sun audio support])
AC_ARG_ENABLE(sound,
[ --disable-sound disable sound outright])
unset SOUND_TYPES
HAVE_ALSA=no
if test "x$enable_alsa" != "xno"; then
if test "x$ac_cv_header_sys_asoundlib_h" = "xyes" -o \
"x$ac_cv_header_alsa_asoundlib_h" = "xyes"; then
AC_EGREP_CPP([QF_maGiC_VALUE],
[
#include <alsa/asoundlib.h>
#if defined(SND_LIB_MAJOR) && defined(SND_LIB_MINOR) && \
defined(SND_LIB_SUBMINOR)
#if SND_LIB_MAJOR > 0 || (SND_LIB_MAJOR == 0 && SND_LIB_MINOR >= 9 && \
SND_LIB_SUBMINOR >= 8)
QF_maGiC_VALUE
#endif
#endif
],
SOUND_TYPES="$SOUND_TYPES ALSA"
ALSA_LIBS="-lasound"
HAVE_ALSA=yes,
AC_EGREP_CPP([QF_maGiC_VALUE],
[
#include <sys/asoundlib.h>
#if defined(SND_LIB_MAJOR) && defined(SND_LIB_MINOR) && \
defined(SND_LIB_SUBMINOR)
#if SND_LIB_MAJOR > 0 || (SND_LIB_MAJOR == 0 && SND_LIB_MINOR >= 9 && \
SND_LIB_SUBMINOR >= 8)
QF_maGiC_VALUE
#endif
#endif
],
SOUND_TYPES="$SOUND_TYPES ALSA"
ALSA_LIBS="-lasound"
HAVE_ALSA=yes
)
)
fi
fi
AC_SUBST(ALSA_LIBS)
AC_SUBST(HAVE_ALSA)
AC_ARG_ENABLE(jack,
[ --disable-jack disable jack support],
)
HAVE_JACK=no
JACK_LIBS=""
if test "x$enable_jack" != "xno"; then
if test "x$PKG_CONFIG" != "x"; then
PKG_CHECK_MODULES([JACK], [jack], HAVE_JACK=yes, HAVE_JACK=no)
if test "x$HAVE_JACK" = "xyes"; then
AC_DEFINE(HAVE_JACK, 1, [Define if you have libjack])
SOUND_TYPES="$SOUND_TYPES JACK"
fi
else
AC_CHECK_LIB(jack, jack_client_open, HAVE_JACK=yes, HAVE_JACK=no,
[$LIBS])
if test "x$HAVE_JACK" = "xyes"; then
AC_CHECK_HEADER(jack/jack.h, HAVE_JACK=yes, HAVE_JACK=no)
if test "x$HAVE_JACK" = "xyes"; then
JACK_LIBS="-ljack"
AC_DEFINE(HAVE_JACK, 1, [Define if you have libjack])
SOUND_TYPES="$SOUND_TYPES JACK"
fi
fi
fi
fi
AC_SUBST(JACK_LIBS)
dnl AC_ARG_ENABLE(samplerate,
dnl [ --disable-samplerate disable libsamplerate support],
dnl )
@ -118,113 +36,220 @@ if test "x$HAVE_SAMPLERATE" = "xno"; then
enable_sound=no
fi
SOUND_TYPES="$SOUND_TYPES DISK"
if test "x$enable_sound" != "xno"; then
AC_CHECK_LIB(mme, waveOutOpen, HAVE_LIBMME=yes)
dnl MME
if test "x$ac_cv_header_mme_mmsystem_h" = "xyes" -a \
"x$HAVE_LIBMME" = "xyes"; then
AC_EGREP_CPP([QF_maGiC_VALUE],
[
AC_ARG_ENABLE(alsa,
[ --disable-alsa disable checks for ALSA support])
AC_ARG_ENABLE(oss,
[ --disable-oss disable checks for OSS support])
AC_ARG_ENABLE(sun,
[ --disable-sun disable checks for Sun audio support])
AC_ARG_ENABLE(sound,
[ --disable-sound disable sound outright])
unset SOUND_TYPES
HAVE_ALSA=no
if test "x$enable_alsa" != "xno"; then
if test "x$ac_cv_header_sys_asoundlib_h" = "xyes" -o \
"x$ac_cv_header_alsa_asoundlib_h" = "xyes"; then
AC_EGREP_CPP([QF_maGiC_VALUE],
[
#include <alsa/asoundlib.h>
#if defined(SND_LIB_MAJOR) && defined(SND_LIB_MINOR) && \
defined(SND_LIB_SUBMINOR)
#if SND_LIB_MAJOR > 0 || (SND_LIB_MAJOR == 0 && SND_LIB_MINOR >= 9 && \
SND_LIB_SUBMINOR >= 8)
QF_maGiC_VALUE
#endif
#endif
],
SOUND_TYPES="$SOUND_TYPES ALSA"
QF_NEED(snd_output, [alsa])
QF_NEED(snd_render, [default])
ALSA_LIBS="-lasound"
HAVE_ALSA=yes,
AC_EGREP_CPP([QF_maGiC_VALUE],
[
#include <sys/asoundlib.h>
#if defined(SND_LIB_MAJOR) && defined(SND_LIB_MINOR) && \
defined(SND_LIB_SUBMINOR)
#if SND_LIB_MAJOR > 0 || (SND_LIB_MAJOR == 0 && SND_LIB_MINOR >= 9 && \
SND_LIB_SUBMINOR >= 8)
QF_maGiC_VALUE
#endif
#endif
],
SOUND_TYPES="$SOUND_TYPES ALSA"
QF_NEED(snd_output, [alsa])
QF_NEED(snd_render, [default])
ALSA_LIBS="-lasound"
HAVE_ALSA=yes
)
)
fi
fi
AC_SUBST(ALSA_LIBS)
AC_SUBST(HAVE_ALSA)
AC_ARG_ENABLE(jack,
[ --disable-jack disable jack support],
)
HAVE_JACK=no
JACK_LIBS=""
if test "x$enable_jack" != "xno"; then
if test "x$PKG_CONFIG" != "x"; then
PKG_CHECK_MODULES([JACK], [jack], HAVE_JACK=yes, HAVE_JACK=no)
if test "x$HAVE_JACK" = "xyes"; then
AC_DEFINE(HAVE_JACK, 1, [Define if you have libjack])
SOUND_TYPES="$SOUND_TYPES JACK"
QF_NEED(snd_render, [jack])
fi
else
AC_CHECK_LIB(jack, jack_client_open, HAVE_JACK=yes, HAVE_JACK=no,
[$LIBS])
if test "x$HAVE_JACK" = "xyes"; then
AC_CHECK_HEADER(jack/jack.h, HAVE_JACK=yes, HAVE_JACK=no)
if test "x$HAVE_JACK" = "xyes"; then
JACK_LIBS="-ljack"
AC_DEFINE(HAVE_JACK, 1, [Define if you have libjack])
SOUND_TYPES="$SOUND_TYPES JACK"
QF_NEED(snd_render, [jack])
fi
fi
fi
fi
AC_SUBST(JACK_LIBS)
SOUND_TYPES="$SOUND_TYPES DISK"
QF_NEED(snd_output, [disk])
QF_NEED(snd_render, [default])
dnl MME
if test "x$ac_cv_header_mme_mmsystem_h" = "xyes" -a \
"x$HAVE_LIBMME" = "xyes"; then
AC_EGREP_CPP([QF_maGiC_VALUE],
[
#include <mme/mmsystem.h>
#ifdef WAVE_OPEN_SHAREABLE
QF_maGiC_VALUE
#endif
],
SOUND_TYPES="$SOUND_TYPES MME"
MME_LIBS="-lmme"
)
fi
AC_SUBST(MME_LIBS)
],
SOUND_TYPES="$SOUND_TYPES MME"
QF_NEED(snd_output, [mme])
QF_NEED(snd_render, [default])
MME_LIBS="-lmme"
)
fi
AC_SUBST(MME_LIBS)
dnl OSS
HAVE_OSS=no
if test "x$enable_oss" != "xno" -a "x$ac_cv_header_sys_shm_h" = "xyes"; then
if test "x$ac_cv_header_sys_soundcard_h" = "xyes" -o \
"x$ac_cv_header_machine_soundcard_h" = "xyes" -o \
"x$ac_cv_header_linux_soundcard_h" = "xyes"; then
AC_EGREP_CPP([QF_maGiC_VALUE],
[
#include <sys/soundcard.h>
#ifdef SNDCTL_DSP_SETTRIGGER
QF_maGiC_VALUE
#endif
],
SOUND_TYPES="$SOUND_TYPES OSS"
HAVE_OSS=yes
OSS_LIBS=
,
dnl OSS
HAVE_OSS=no
if test "x$enable_oss" != "xno" -a "x$ac_cv_header_sys_shm_h" = "xyes"; then
if test "x$ac_cv_header_sys_soundcard_h" = "xyes" -o \
"x$ac_cv_header_machine_soundcard_h" = "xyes" -o \
"x$ac_cv_header_linux_soundcard_h" = "xyes"; then
AC_EGREP_CPP([QF_maGiC_VALUE],
[
#include <linux/soundcard.h>
#include <sys/soundcard.h>
#ifdef SNDCTL_DSP_SETTRIGGER
QF_maGiC_VALUE
#endif
],
SOUND_TYPES="$SOUND_TYPES OSS"
QF_NEED(snd_output, [oss])
QF_NEED(snd_render, [default])
HAVE_OSS=yes
OSS_LIBS=
,
AC_EGREP_CPP([QF_maGiC_VALUE],
[
#include <machine/soundcard.h>
#include <linux/soundcard.h>
#ifdef SNDCTL_DSP_SETTRIGGER
QF_maGiC_VALUE
#endif
],
SOUND_TYPES="$SOUND_TYPES OSS"
QF_NEED(snd_output, [oss])
QF_NEED(snd_render, [default])
HAVE_OSS=yes
OSS_LIBS=
,
AC_EGREP_CPP([QF_maGiC_VALUE],
[
#include <machine/soundcard.h>
#ifdef SNDCTL_DSP_SETTRIGGER
QF_maGiC_VALUE
#endif
],
SOUND_TYPES="$SOUND_TYPES OSS"
QF_NEED(snd_output, [oss])
QF_NEED(snd_render, [default])
HAVE_OSS=yes
OSS_LIBS=
)
)
)
)
fi
fi
AC_SUBST(HAVE_OSS)
AC_SUBST(OSS_LIBS)
fi
fi
AC_SUBST(HAVE_OSS)
AC_SUBST(OSS_LIBS)
dnl SDL digital audio
if test "x$HAVE_SDL_AUDIO" = "xyes"; then
SOUND_TYPES="$SOUND_TYPES SDL"
fi
dnl SDL digital audio
if test "x$HAVE_SDL_AUDIO" = "xyes"; then
SOUND_TYPES="$SOUND_TYPES SDL"
QF_NEED(snd_output, [sdl])
QF_NEED(snd_render, [default])
fi
dnl SGI
if test "x$ac_cv_header_dmedia_audio_h" = "xyes"; then
AC_EGREP_CPP([QF_maGiC_VALUE],
[
dnl SGI
if test "x$ac_cv_header_dmedia_audio_h" = "xyes"; then
AC_EGREP_CPP([QF_maGiC_VALUE],
[
#include <dmedia/audio.h>
#ifdef AL_SAMPLE_16
# ifdef AL_RATE
QF_maGiC_VALUE
# endif
#endif
],
SOUND_TYPES="$SOUND_TYPES SGI"
SGISND_LIBS="-laudio")
fi
AC_SUBST(SGISND_LIBS)
],
SOUND_TYPES="$SOUND_TYPES SGI"
QF_NEED(snd_output, [sgi])
QF_NEED(snd_render, [default])
SGISND_LIBS="-laudio")
fi
AC_SUBST(SGISND_LIBS)
dnl Sun
if test "x$enable_sun" != "xno"; then
if test "x$ac_cv_header_sys_audioio_h" = "xyes"; then
dnl Sun
if test "x$enable_sun" != "xno"; then
if test "x$ac_cv_header_sys_audioio_h" = "xyes"; then
AC_EGREP_CPP([QF_maGiC_VALUE],
[
#include <sys/audioio.h>
#ifdef AUDIO_SETINFO
QF_maGiC_VALUE
#endif
],
SOUND_TYPES="$SOUND_TYPES SUN"
QF_NEED(snd_output, [sun])
QF_NEED(snd_render, [default])
)
fi
fi
dnl Win32
if test "x$ac_cv_header_windows_h" = "xyes"; then
SOUND_TYPES="$SOUND_TYPES Win32"
QF_NEED(snd_output, [win])
QF_NEED(snd_render, [default])
WINSND_LIBS="-lwinmm"
if test "x$ac_cv_header_dsound_h" = "xyes"; then
AC_EGREP_CPP([QF_maGiC_VALUE],
[
#include <sys/audioio.h>
#ifdef AUDIO_SETINFO
QF_maGiC_VALUE
#endif
],
SOUND_TYPES="$SOUND_TYPES SUN"
)
fi
fi
dnl Win32
if test "x$ac_cv_header_windows_h" = "xyes"; then
SOUND_TYPES="$SOUND_TYPES Win32"
WINSND_LIBS="-lwinmm"
if test "x$ac_cv_header_dsound_h" = "xyes"; then
AC_EGREP_CPP([QF_maGiC_VALUE],
[
#include <windows.h>
#include <dsound.h>
#ifdef GMEM_MOVEABLE
@ -232,13 +257,13 @@ if test "x$ac_cv_header_windows_h" = "xyes"; then
QF_maGiC_VALUE
# endif
#endif
],
SOUND_TYPES="$SOUND_TYPES DirectX"
)
],
SOUND_TYPES="$SOUND_TYPES DirectX"
QF_NEED(snd_output, [dx])
QF_NEED(snd_render, [default])
)
fi
fi
fi
AC_SUBST(WINSND_LIBS)
AC_SUBST(WINSND_LIBS)
if test "x$enable_sound" = "xno"; then
unset SOUND_TYPES
fi

View file

@ -40,7 +40,7 @@ EXTRA_PROGRAMS= hw-master
common_ldflags= -export-dynamic
hw_master_libs= \
$(top_builddir)/libs/net/libnet_chan.la \
$(SERVER_PLUGIN_STATIC_LIBS) \
@server_static_plugin_libs@ \
$(top_builddir)/libs/console/libQFconsole.la \
$(top_builddir)/libs/util/libQFutil.la

View file

@ -11,8 +11,8 @@ lib_ldflags=-version-info $(QUAKE_LIBRARY_VERSION_INFO) \
-rpath $(libdir) -no-undefined
EXEEXT=
plugin_LTLIBRARIES= @CD_PLUGIN_TARGETS@
noinst_LTLIBRARIES= @CD_PLUGIN_STATIC@
plugin_LTLIBRARIES= @cd_plugins@
noinst_LTLIBRARIES= @cd_static_plugins@
lib_LTLIBRARIES= @CD_TARGETS@ @SND_TARGETS@
EXTRA_LTLIBRARIES= libQFsound.la libQFcd.la \
cd_file.la cd_linux.la cd_sdl.la cd_sgi.la cd_win.la \
@ -57,14 +57,14 @@ cd_xmms_la_CFLAGS= $(XMMS_CFLAGS)
cd_xmms_la_SOURCES= cd_xmms.c
sound_libs= \
@SND_PLUGIN_STATIC_LIBS@ \
@SND_REND_STATIC_LIBS@ \
@snd_output_static_plugin_libs@ \
@snd_render_static_plugin_libs@ \
$(top_builddir)/libs/models/libQFmodels.la \
$(top_builddir)/libs/gamecode/libQFgamecode.la \
$(top_builddir)/libs/util/libQFutil.la
cd_libs= \
@CD_PLUGIN_STATIC_LIBS@ \
@cd_static_plugin_libs@ \
$(top_builddir)/libs/util/libQFutil.la
libQFsound_la_LDFLAGS= $(lib_ldflags)

View file

@ -7,11 +7,10 @@ plugin_ldflags= @plugin_ldflags@ -avoid-version -module -rpath $(plugindir)
plugin_libadd= @plugin_libadd@
EXEEXT=
plugin_LTLIBRARIES= @SND_REND_TARGETS@
plugin_LTLIBRARIES= @snd_render_plugins@
noinst_LTLIBRARIES= @snd_render_static_plugins@
EXTRA_LTLIBRARIES= snd_render_default.la snd_render_jack.la
noinst_LTLIBRARIES= @SND_REND_STATIC@
flac_src=flac.c
midi_src=midi.c
vorbis_src=vorbis.c

View file

@ -46,14 +46,14 @@ static plugin_t *snd_render_module = NULL;
static plugin_t *snd_output_module = NULL;
static snd_render_funcs_t *snd_render_funcs = NULL;
SND_OUTPUT_PROTOS
SND_OUTPUT_PLUGIN_PROTOS
static plugin_list_t snd_output_list[] = {
SND_OUTPUT_LIST
SND_OUTPUT_PLUGIN_LIST
};
SND_RENDER_PROTOS
SND_RENDER_PLUGIN_PROTOS
static plugin_list_t snd_render_list[] = {
SND_RENDER_LIST
SND_RENDER_PLUGIN_LIST
};

View file

@ -8,8 +8,8 @@ plugin_libadd= @plugin_libadd@
EXEEXT=
snd_deps=$(top_builddir)/libs/util/libQFutil.la
plugin_LTLIBRARIES= @SND_PLUGIN_TARGETS@
noinst_LTLIBRARIES= @SND_PLUGIN_STATIC@
plugin_LTLIBRARIES= @snd_output_plugins@
noinst_LTLIBRARIES= @snd_output_static_plugins@
EXTRA_LTLIBRARIES= \
snd_output_sdl.la snd_output_alsa.la snd_output_oss.la snd_output_sgi.la \
snd_output_sun.la snd_output_win.la snd_output_dx.la snd_output_disk.la

View file

@ -9,8 +9,8 @@ lib_ldflags=-version-info $(QUAKE_LIBRARY_VERSION_INFO) \
EXEEXT=
lib_LTLIBRARIES= libQFconsole.la
plugin_LTLIBRARIES= @SERVER_PLUGIN_TARGETS@ @CLIENT_PLUGIN_TARGETS@
noinst_LTLIBRARIES= @SERVER_PLUGIN_STATIC@ @CLIENT_PLUGIN_STATIC@
plugin_LTLIBRARIES= @console_plugins@
noinst_LTLIBRARIES= @client_static_plugins@ @server_static_plugins@
EXTRA_LTLIBRARIES= console_server.la console_client.la
common_sources= \

View file

@ -87,33 +87,54 @@ AC_SUBST($1_DEPS)
AC_SUBST($1_LIBS)
])
AC_DEFUN([QF_NEED], [
for qfn_lib in $2; do
eval "$1_need_$qfn_lib=yes"
done
AC_DEFUN([QF_NEED], [m4_map_args_w([$2], [$1_need_], [=yes], [;])])
AC_DEFUN([QF_PROCESS_NEED_subroutine],
[m4_foreach_w([qfn_need], [$5],
[if test x"${$2[_need_]qfn_need}" = xyes; then
$4="${$4} $1[]qfn_need[]$3"
fi
])])
AC_DEFUN([QF_PROCESS_NEED_LIBS],
[m4_define([qfn_ext], m4_default($3,[la]))
QF_PROCESS_NEED_subroutine([lib$1_],[$1],[.]qfn_ext,[$1_libs],[$2])
AC_SUBST([$1_libs])])
AC_DEFUN([QF_PROCESS_NEED_DIRS],
[QF_PROCESS_NEED_subroutine([],[$1],[],[$1_dirs],[$2])
AC_SUBST([$1_dirs])])
AC_DEFUN([QF_PROCESS_NEED_PLUGINS],
[QF_PROCESS_NEED_subroutine([$1_],[$1],[.la],[$1_plugins],[$2])
AC_SUBST([$1_plugins])
AC_DEFINE_UNQUOTED(m4_toupper([$1_plugin_protos]), , [list of $1 plugin prototypes])
AC_DEFINE_UNQUOTED(m4_toupper([$1_plugin_list]), , [list of $1 plugins])
])
AC_DEFUN([QF_PROCESS_NEED_subroutine], [
qfn_pref="$1"
qfn_suf="$3"
for qfn_need in $5; do
if eval test x'"${$2_need_'${qfn_need}'}"' = xyes; then
qfn_tmp="${$2_$4} ${qfn_pref}${qfn_need}${qfn_suf}"
eval '$2_$4="$qfn_tmp"'
fi
done
AC_SUBST([$2_$4])
])
AC_DEFUN([QF_STATIC_PLUGIN_LIBS],
[QF_PROCESS_NEED_subroutine(m4_join([/],[$4],[$2_]),[$2],[.la],[$1_static_plugin_libs],[$3])
AC_SUBST([$1_static_plugin_libs])])
AC_DEFUN([QF_PROCESS_NEED_LIBS], [
qfn_ext="$3"
qfn_ext=${qfn_ext:-la}
QF_PROCESS_NEED_subroutine([lib$1_],[$1],[.${qfn_ext}],[libs],[$2])
])
AC_DEFUN([QF_STATIC_PLUGIN_PROTOS],
[QF_PROCESS_NEED_subroutine([extern plugin_t *$2_],[$2],[_PluginInfo (void);],[$1_plugin_protos],[$3])
AC_DEFINE_UNQUOTED(m4_toupper([$1_plugin_protos]), ${$1_plugin_protos}, [list of $1 plugin prototypes])])
AC_DEFUN([QF_PROCESS_NEED_DIRS], [
QF_PROCESS_NEED_subroutine([],[$1],[],[dirs],[$2])
AC_DEFUN([QF_STATIC_PLUGIN_LIST],
[$1_plugin_list="{0, 0}"
m4_foreach_w([qfn_need], [$3],
[if test x"${$2[_need_]qfn_need}" = xyes; then
$1_plugin_list="{\"qfn_need\", $2_[]qfn_need[]_PluginInfo},${$1_plugin_list}"
fi
])
AC_DEFINE_UNQUOTED(m4_toupper([$1_plugin_list]), ${$1_plugin_list}, [list of $1 plugins])])
AC_DEFUN([QF_PROCESS_NEED_STATIC_PLUGINS],
[QF_PROCESS_NEED_subroutine([$1_],[$1],[.la],m4_default($4,$1)[_static_plugins],[$2])
AC_SUBST(m4_default($4,$1)[_static_plugins])
QF_STATIC_PLUGIN_LIBS(m4_default($4,$1),[$1],[$2],[$3])
QF_STATIC_PLUGIN_PROTOS(m4_default($4,$1),[$1],[$2])
QF_STATIC_PLUGIN_LIST(m4_default($4,$1),[$1],[$2])])
AC_DEFUN([QF_WITH_TARGETS], [
AC_ARG_WITH($1,

View file

@ -49,8 +49,8 @@ libnq_sdl_a_CFLAGS= $(SDL_CFLAGS)
common_ldflags= -export-dynamic @PTHREAD_LDFLAGS@
cl_plugin_LIBS= \
$(SERVER_PLUGIN_STATIC_LIBS) \
$(CLIENT_PLUGIN_STATIC_LIBS)
@server_static_plugin_libs@ \
@client_static_plugin_libs@
client_LIBFILES= \
$(top_builddir)/libs/video/targets/libQFjs.la \
@ -58,7 +58,7 @@ client_LIBFILES= \
$(top_builddir)/libs/audio/libQFsound.la
server_LIBFILES= \
$(SERVER_PLUGIN_STATIC_LIBS) \
@server_static_plugin_libs@ \
$(top_builddir)/libs/models/libQFmodels.la
common_LIBFILES= \

View file

@ -38,7 +38,7 @@ EXTRA_PROGRAMS= qtv
common_ldflags= -export-dynamic
qtv_LIBS= \
$(SERVER_PLUGIN_STATIC_LIBS) \
@server_static_plugin_libs@ \
$(top_builddir)/libs/qw/libqw.a \
$(top_builddir)/libs/net/libnet_chan.la \
$(top_builddir)/libs/console/libQFconsole.la \

View file

@ -69,7 +69,7 @@ libqw_server_a_SOURCES= \
sv_qtv.c sv_recorder.c sv_sbar.c sv_send.c sv_user.c world.c
qw_server_LIBS= \
$(SERVER_PLUGIN_STATIC_LIBS) \
@server_static_plugin_libs@ \
$(top_builddir)/libs/qw/libqw.a \
$(top_builddir)/libs/net/libnet_chan.la \
$(top_builddir)/libs/ruamoko/libQFruamoko.la \
@ -93,7 +93,7 @@ qw_master_DEPENDENCIES= $(qw_master_deps)
qw_master_LDFLAGS= $(common_ldflags)
cl_plugin_LIBS= \
$(CLIENT_PLUGIN_STATIC_LIBS) \
@client_static_plugin_libs@ \
$(top_builddir)/libs/ruamoko/libQFruamoko.la
qw_client_LIBS= \