Don't build disabled stuff
Disable by autofoo instead of by #ifdef.
This commit is contained in:
parent
06a6894e90
commit
4df26af47a
|
@ -110,6 +110,7 @@ xplayer)
|
|||
*)
|
||||
enable_sound=no;;
|
||||
esac
|
||||
AM_CONDITIONAL(ENABLE_SOUND, test "x$enable_sound" != "xno")
|
||||
|
||||
AC_ARG_WITH(sndldr,
|
||||
AS_HELP_STRING([--with-sndldr],
|
||||
|
@ -184,6 +185,7 @@ xplayer)
|
|||
AC_DEFINE(ENABLE_SOUND, 1, [Sound support])
|
||||
;;
|
||||
esac
|
||||
AM_CONDITIONAL(USE_SOUND_LOADER, test "x$with_sndldr" != "xnone")
|
||||
|
||||
# Save CPPFLAGS/LDFLAGS and add X_... to each
|
||||
SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
|
|
|
@ -89,7 +89,6 @@ e16_SOURCES = \
|
|||
slide.c slide.h \
|
||||
slideout.c \
|
||||
snaps.c snaps.h \
|
||||
sound.c sound.h \
|
||||
sounds.h \
|
||||
stacking.c \
|
||||
startup.c \
|
||||
|
@ -108,7 +107,8 @@ e16_SOURCES = \
|
|||
xprop.c xprop.h \
|
||||
x.c xwin.h \
|
||||
xtypes.h \
|
||||
$(MODULE_SRCS) \
|
||||
$(SRCS_SOUND) \
|
||||
$(SRCS_FONTS) \
|
||||
$(SRCS_GNOME) \
|
||||
$(SRCS_ZOOM) \
|
||||
$(SRCS_GLX) \
|
||||
|
@ -130,7 +130,8 @@ e16_CPPFLAGS = \
|
|||
$(AM_CPPFLAGS) \
|
||||
-I$(top_srcdir) \
|
||||
-I$(top_builddir) \
|
||||
$(MODULE_CFLAGS) \
|
||||
$(SOUND_CFLAGS) \
|
||||
$(FONTS_CFLAGS) \
|
||||
$(IMLIB2_CFLAGS) \
|
||||
$(DBUS_CFLAGS) \
|
||||
$(XI_CFLAGS) \
|
||||
|
@ -142,7 +143,8 @@ LDADD = \
|
|||
$(LTLIBINTL) \
|
||||
$(LTLIBICONV) \
|
||||
$(IMLIB2_LIBS) \
|
||||
$(MODULE_LIBS) \
|
||||
$(SOUND_LIBS) \
|
||||
$(FONTS_LIBS) \
|
||||
$(GLX_LIBS) \
|
||||
$(XCOMPOSITE_LIBS) \
|
||||
$(XDAMAGE_LIBS) \
|
||||
|
@ -159,6 +161,7 @@ LDADD = \
|
|||
$(X_EXTRA_LIBS) \
|
||||
$(E_X_LIBS) \
|
||||
$(DBUS_LIBS) \
|
||||
$(MODULE_LIBS) \
|
||||
$(CLOCK_LIBS) \
|
||||
-lX11 -lm
|
||||
|
||||
|
@ -167,6 +170,10 @@ SNDLDR_LIBS = $(AUDIOFILE_LIBS) $(SNDFILE_LIBS)
|
|||
|
||||
if BUILD_MODULES
|
||||
|
||||
if ENABLE_SOUND
|
||||
SRCS_SOUND = sound.c sound.h
|
||||
endif
|
||||
|
||||
e16_LDFLAGS = -export-dynamic
|
||||
MODULE_LIBS = $(DLOPEN_LIBS)
|
||||
|
||||
|
@ -236,12 +243,44 @@ endif
|
|||
|
||||
else
|
||||
|
||||
MODULE_SRCS = sound_esound.c sound_pulse.c sound_sndio.c sound_alsa.c sound_player.c sound_load.c \
|
||||
ttfont.c text_xft.c text_pango.c
|
||||
MODULE_LIBS = $(ESD_LIBS) $(PULSE_LIBS) $(SNDIO_LIBS) $(ALSA_LIBS) $(SNDLDR_LIBS) \
|
||||
$(PANGO_LIBS) $(XFT_LIBS)
|
||||
MODULE_CFLAGS = $(ESD_CFLAGS) $(PULSE_CFLAGS) $(SNDIO_CFLAGS) $(SNDLDR_CFLAGS) \
|
||||
$(PANGO_CFLAGS) $(XFT_CFLAGS)
|
||||
if ENABLE_SOUND
|
||||
if USE_SOUND_LOADER
|
||||
SRCS_SOUND_LOADER = sound_load.c
|
||||
endif
|
||||
if USE_SOUND_ESOUND
|
||||
SRCS_SOUND_ESOUND = sound_esound.c
|
||||
endif
|
||||
if USE_SOUND_PULSE
|
||||
SRCS_SOUND_PULSE = sound_pulse.c
|
||||
endif
|
||||
if USE_SOUND_SNDIO
|
||||
SRCS_SOUND_SNDIO = sound_sndio.c
|
||||
endif
|
||||
if USE_SOUND_ALSA
|
||||
SRCS_SOUND_ALSA = sound_alsa.c
|
||||
endif
|
||||
if USE_SOUND_PLAYER
|
||||
SRCS_SOUND_PLAYER = sound_player.c
|
||||
endif
|
||||
SRCS_SOUND = sound.c sound.h $(SRCS_SOUND_LOADER) \
|
||||
$(SRCS_SOUND_ESOUND) $(SRCS_SOUND_PULSE) $(SRCS_SOUND_SNDIO) \
|
||||
$(SRCS_SOUND_ALSA) $(SRCS_SOUND_PLAYER)
|
||||
endif
|
||||
|
||||
SRCS_FONT_IFT = ttfont.c
|
||||
if USE_LIBXFT
|
||||
SRCS_FONT_XFT = text_xft.c
|
||||
endif
|
||||
if USE_LIBPANGO
|
||||
SRCS_FONT_PANGO = text_pango.c
|
||||
endif
|
||||
SRCS_FONTS = $(SRCS_FONT_IFT) $(SRCS_FONT_XFT) $(SRCS_FONT_PANGO)
|
||||
|
||||
SOUND_LIBS = $(ESD_LIBS) $(PULSE_LIBS) $(SNDIO_LIBS) $(ALSA_LIBS) $(SNDLDR_LIBS)
|
||||
FONTS_LIBS = $(PANGO_LIBS) $(XFT_LIBS)
|
||||
|
||||
SOUND_CFLAGS = $(ESD_CFLAGS) $(PULSE_CFLAGS) $(SNDIO_CFLAGS) $(SNDLDR_CFLAGS)
|
||||
FONTS_CFLAGS = $(PANGO_CFLAGS) $(XFT_CFLAGS)
|
||||
|
||||
endif
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include "E.h"
|
||||
#if ENABLE_SOUND
|
||||
#include "dialog.h"
|
||||
#include "emodule.h"
|
||||
#include "file.h"
|
||||
|
@ -581,5 +580,3 @@ const EModule ModSound = {
|
|||
MOD_ITEMS(SoundIpcArray),
|
||||
MOD_ITEMS(SoundCfgItems)
|
||||
};
|
||||
|
||||
#endif /* ENABLE_SOUND */
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
*/
|
||||
#include "config.h"
|
||||
|
||||
#if defined(ENABLE_SOUND) && defined(USE_SOUND_ALSA)
|
||||
#include <alsa/asoundlib.h>
|
||||
|
||||
#include "sound.h"
|
||||
|
@ -138,5 +137,3 @@ const SoundOps SoundOps_alsa = {
|
|||
_sound_alsa_Init, _sound_alsa_Exit, _sound_alsa_Load,
|
||||
_sound_alsa_Destroy, _sound_alsa_Play,
|
||||
};
|
||||
|
||||
#endif /* HAVE_SOUND && USE_SOUND_ALSA */
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
*/
|
||||
#include "config.h"
|
||||
|
||||
#if defined(ENABLE_SOUND) && defined(USE_SOUND_ESOUND)
|
||||
#include <esd.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
@ -147,5 +146,3 @@ const SoundOps SoundOps_esd = {
|
|||
_sound_esound_Init, _sound_esound_Exit,
|
||||
_sound_esound_Load, _sound_esound_Destroy, _sound_esound_Play,
|
||||
};
|
||||
|
||||
#endif /* ENABLE_SOUND && USE_SOUND_ESOUND */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
||||
* Copyright (C) 2004-2020 Kim Woelders
|
||||
* Copyright (C) 2004-2021 Kim Woelders
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
|
@ -22,8 +22,6 @@
|
|||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
#include "E.h"
|
||||
|
||||
#if ENABLE_SOUND
|
||||
#include "sound.h"
|
||||
|
||||
#if USE_SOUND_LOADER_AUDIOFILE
|
||||
|
@ -121,5 +119,3 @@ SoundSampleGetData(const char *file, SoundSampleData * ssd)
|
|||
}
|
||||
|
||||
#endif /* USE_SOUND_LOADER_SNDFILE */
|
||||
|
||||
#endif /* ENABLE_SOUND */
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
*/
|
||||
#include "config.h"
|
||||
|
||||
#if defined(ENABLE_SOUND) && defined(USE_SOUND_PLAYER)
|
||||
#include "file.h"
|
||||
#include "sound.h"
|
||||
#include "util.h"
|
||||
|
@ -68,5 +67,3 @@ const SoundOps SoundOps_player = {
|
|||
_sound_player_Init, _sound_player_Exit,
|
||||
_sound_player_Load, _sound_player_Destroy, _sound_player_Play,
|
||||
};
|
||||
|
||||
#endif /* ENABLE_SOUND && USE_SOUND_PLAYER */
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
*/
|
||||
#include "config.h"
|
||||
|
||||
#if defined(ENABLE_SOUND) && defined(USE_SOUND_PULSE)
|
||||
#include <fcntl.h>
|
||||
#include <pulse/pulseaudio.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -354,5 +353,3 @@ const SoundOps SoundOps_pulse = {
|
|||
_sound_pulse_Init, _sound_pulse_Exit,
|
||||
_sound_pulse_Load, _sound_pulse_Destroy, _sound_pulse_Play,
|
||||
};
|
||||
|
||||
#endif /* ENABLE_SOUND && USE_SOUND_PULSE */
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
*/
|
||||
#include "config.h"
|
||||
|
||||
#if defined(ENABLE_SOUND) && defined(USE_SOUND_SNDIO)
|
||||
#include <sndio.h>
|
||||
|
||||
#include "sound.h"
|
||||
|
@ -124,5 +123,3 @@ const SoundOps SoundOps_sndio = {
|
|||
_sound_sndio_Init, _sound_sndio_Exit, _sound_sndio_Load,
|
||||
_sound_sndio_Destroy, _sound_sndio_Play,
|
||||
};
|
||||
|
||||
#endif /* ENABLE_SOUND && USE_SOUND_SNDIO */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2007-2016 Kim Woelders
|
||||
* Copyright (C) 2007-2021 Kim Woelders
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to
|
||||
|
@ -22,9 +22,9 @@
|
|||
*/
|
||||
#include "config.h"
|
||||
|
||||
#ifdef USE_PANGO
|
||||
#include <X11/Xft/Xft.h>
|
||||
#include <pango/pangoxft.h>
|
||||
|
||||
#include "tclass.h"
|
||||
#include "xwin.h"
|
||||
|
||||
|
@ -134,5 +134,3 @@ const FontOps FontOps_pango = {
|
|||
_pango_xft_TextSize, TextstateTextFit, _pango_xft_TextDraw,
|
||||
_xft_FdcInit, _xft_FdcFini, _xft_FdcSetDrawable, _xft_FdcSetColor
|
||||
};
|
||||
|
||||
#endif /* USE_PANGO */
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
*/
|
||||
#include "config.h"
|
||||
|
||||
#ifdef USE_XFT
|
||||
#include <X11/extensions/Xrender.h>
|
||||
#include <X11/Xft/Xft.h>
|
||||
|
||||
#include "tclass.h"
|
||||
#include "xtypes.h"
|
||||
|
||||
|
@ -166,5 +166,3 @@ const FontOps FontOps_xft = {
|
|||
_xft_Load, _xft_Unload, _xft_TextSize, TextstateTextFit, _xft_TextDraw,
|
||||
_xft_FdcInit, _xft_FdcFini, _xft_FdcSetDrawable, _xft_FdcSetColor
|
||||
};
|
||||
|
||||
#endif /* FONT_TYPE_XFT */
|
||||
|
|
Loading…
Reference in New Issue