1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 17:12:36 +00:00

Move conditional compilation into the build system.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18927 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2006-07-06 13:09:45 +00:00
parent 20770e8a7d
commit 7844cbc3ce
24 changed files with 89 additions and 114 deletions

23
configure vendored
View File

@ -4973,30 +4973,35 @@ _def_alsa_asoundlib_h='#undef HAVE_ALSA_ASOUNDLIB_H'
if test "$_alsaver" ; then
_alsa=yes
if test "$_alsaver" = '0.5.x' ; then
_alsa5=yes
_aosrc="$_aosrc ao_alsa5.c"
_aomodules="alsa5 $_aomodules"
_def_alsa5='#define HAVE_ALSA5 1'
_def_sys_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1'
_res_comment="using alsa 0.5.x and sys/asoundlib.h"
elif test "$_alsaver" = '0.9.x-sys' ; then
_alsa9=yes
_aosrc="$_aosrc ao_alsa.c"
_aomodules="alsa $_aomodules"
_def_alsa9='#define HAVE_ALSA9 1'
_def_sys_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1'
_res_comment="using alsa 0.9.x and sys/asoundlib.h"
elif test "$_alsaver" = '0.9.x-alsa' ; then
_alsa9=yes
_aosrc="$_aosrc ao_alsa.c"
_aomodules="alsa $_aomodules"
_def_alsa9='#define HAVE_ALSA9 1'
_def_alsa_asoundlib_h='#define HAVE_ALSA_ASOUNDLIB_H 1'
_res_comment="using alsa 0.9.x and alsa/asoundlib.h"
elif test "$_alsaver" = '1.0.x-sys' ; then
_alsa1x=yes
_aosrc="$_aosrc ao_alsa.c"
_aomodules="alsa $_aomodules"
_def_alsa1x="#define HAVE_ALSA1X 1"
_def_alsa_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1'
_res_comment="using alsa 1.0.x and sys/asoundlib.h"
elif test "$_alsaver" = '1.0.x-alsa' ; then
_alsa1x=yes
_aosrc="$_aosrc ao_alsa.c"
_aomodules="alsa $_aomodules"
_def_alsa1x="#define HAVE_ALSA1X 1"
@ -5241,6 +5246,7 @@ EOF
done
fi
if test "$_cdparanoia" = yes ; then
_cdda='yes'
_def_cdparanoia='#define HAVE_CDDA'
_inputmodules="cdda $_inputmodules"
_ld_cdparanoia="$_ld_cdparanoia -lcdda_interface -lcdda_paranoia"
@ -5278,6 +5284,7 @@ EOF
fi
fi
if test "$_libcdio" = yes && test "$_cdparanoia" = no ; then
_cdda='yes'
_def_libcdio='#define HAVE_LIBCDIO'
_def_cdparanoia='#define HAVE_CDDA'
_def_havelibcdio='yes'
@ -7358,8 +7365,11 @@ PRG_MENCODER = $_prg_mencoder
$_live_libs_def
MPLAYER_NETWORK = $_network
FTP = $_ftp
STREAMING_LIVE555 = $_live
VSTREAM = $_vstream
MPLAYER_NETWORK_LIB = $_ld_live $_ld_vstream $_ld_network
STREAM_CACHE = yes
DVBIN = $_dvbin
VIDIX = $_vidix_internal
EXTERNAL_VIDIX = $_vidix_external
@ -7426,6 +7436,11 @@ CACA_INC = $_inc_caca
CACA_LIB = $_ld_caca
# audio output
OSS = $_ossaudio
ALSA = $_alsa
ALSA5 = $_alsa5
ALSA9 = $_alsa9
ALSA1X = $_alsa1x
ALSA_LIB = $_ld_alsa
NAS_LIB = $_ld_nas
ARTS_LIB = $_ld_arts
@ -7444,10 +7459,16 @@ SGIAUDIO_LIB = $_ld_sgiaudio
TERMCAP_LIB = $_ld_termcap
LIRC_LIB = $_ld_lirc
LIRCC_LIB = $_ld_lircc
TV = $_tv
TV_V4L = $_tv_v4l
TV_V4L2 = $_tv_v4l2
TV_BSDBT848 = $_tv_bsdbt848
VCD = $_vcd
HAVE_DVD = $_have_dvd
DVDREAD = $_dvdread
DVDREAD_LIB = $_ld_dvdread
DVDKIT2 = $_mpdvdkit
DVDNAV = $_dvdnav
DVDNAV_LIB = $_ld_dvdnav
SDL_INC = $_inc_sdl
WIN32DLL = $_win32
@ -7488,6 +7509,7 @@ MENCODER = $_mencoder
ENCORE_LIB = $_ld_encore $_ld_mp3lame
DIRECTFB_INC = $_inc_directfb
DIRECTFB_LIB = $_ld_directfb
CDDA = $_cdda
CDPARANOIA_INC = $_inc_cdparanoia
CDPARANOIA_LIB = $_ld_cdparanoia
FREETYPE = $_freetype
@ -7509,6 +7531,7 @@ LIBTHEORA = $_theora
THEORA_LIB = $_ld_theora
FAAD_LIB = $_ld_faad
INTERNAL_FAAD = $_faad_internal
LIBSMBCLIENT = $_smbsupport
SMBSUPPORT_LIB = $_ld_smb
XMMS_PLUGINS = $_xmms
XMMS_LIB = $_xmms_lib

View File

@ -11,52 +11,85 @@ SRCS = mp3_hdr.c \
aviprint.c \
# Core
SRCS += cache2.c \
extension.c \
SRCS += extension.c \
mf.c \
open.c \
url.c \
video.c \
ifeq ($(STREAM_CACHE),yes)
SRCS += cache2.c
endif
# Miscellaneous
SRCS += cdda.c \
cddb.c \
cdinfo.c \
SRCS += cdinfo.c \
cue_read.c \
dvdnav_stream.c \
parse_es.c \
parse_mp4.c \
yuv4mpeg.c \
yuv4mpeg_ratio.c \
ifeq ($(CDDA),yes)
SRCS += cdda.c
ifeq ($(MPLAYER_NETWORK),yes)
SRCS += cddb.c
endif
endif
# Stream readers/writers
SRCS += stream.c \
stream_file.c \
stream_ftp.c \
stream_livedotcom.c \
stream_netstream.c \
stream_null.c \
stream_smb.c \
stream_vcd.c \
stream_vstream.c \
ifeq ($(HAVE_DVD),yes)
SRCS += stream_dvd.c
endif
ifeq ($(DVDNAV),yes)
SRCS += dvdnav_stream.c
endif
ifeq ($(VCD),yes)
SRCS += stream_vcd.c
endif
ifeq ($(FTP),yes)
SRCS += stream_ftp.c
endif
ifeq ($(LIBSMBCLIENT),yes)
SRCS += stream_smb.c
endif
ifeq ($(MPLAYER_NETWORK),yes)
SRCS += stream_netstream.c
ifeq ($(STREAMING_LIVE555),yes)
SRCS += stream_livedotcom.c
endif
endif
ifeq ($(VSTREAM),yes)
SRCS += stream_vstream.c
endif
# TV in
SRCS += tv.c \
frequencies.c \
tvi_bsdbt848.c \
tvi_dummy.c \
tvi_v4l2.c \
tvi_v4l.c \
# Audio in
SRCS += audio_in.c \
ai_alsa1x.c \
ai_alsa.c \
ai_oss.c \
ifeq ($(TV),yes)
SRCS += tv.c frequencies.c tvi_dummy.c
ifeq ($(TV_BSDBT848),yes)
SRCS += tvi_bsdbt848.c
endif
ifeq ($(TV_V4L2),yes)
SRCS += tvi_v4l2.c audio_in.c
endif
ifeq ($(TV_V4L),yes)
SRCS += tvi_v4l.c audio_in.c
endif
ifeq ($(TV_V4L)$(TV_V4L2),yes)
ifeq ($(ALSA1X),yes)
SRCS += ai_alsa1x.c
endif
ifeq ($(ALSA9),yes)
SRCS += ai_alsa.c
endif
ifeq ($(OSS),yes)
SRCS += ai_oss.c
endif
endif
endif
# Demuxers
SRCS += demuxer.c \
@ -67,7 +100,6 @@ SRCS += demuxer.c \
demux_demuxers.c \
demux_film.c \
demux_fli.c \
demux_gif.c \
demux_lmlm4.c \
demux_mf.c \
demux_mov.c \
@ -75,10 +107,8 @@ SRCS += demuxer.c \
demux_mpg.c \
demux_nsv.c \
demux_nuv.c \
demux_ogg.c \
demux_pva.c \
demux_rawaudio.c \
demux_rawdv.c \
demux_rawvideo.c \
demux_realaud.c \
demux_real.c \
@ -92,6 +122,15 @@ SRCS += demuxer.c \
demux_y4m.c \
demux_mkv.c ebml.c \
ifeq ($(LIBVORBIS),yes)
SRCS += demux_ogg.c
endif
ifeq ($(LIBDV),yes)
SRCS += demux_rawdv.c
endif
ifeq ($(GIF),yes)
SRCS += demux_gif.c
endif
ifeq ($(XMMS_PLUGINS),yes)
SRCS += demux_xmms.c
endif

View File

@ -4,8 +4,6 @@
#include "config.h"
#if defined(USE_TV) && (defined(HAVE_TV_V4L) || defined(HAVE_TV_V4L2)) && defined(HAVE_ALSA9)
#include <alsa/asoundlib.h>
#include "audio_in.h"
#include "mp_msg.h"
@ -166,5 +164,3 @@ int ai_alsa_xrun(audio_in_t *ai)
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_AlsaReadWriteError);
return -1;
}
#endif /* HAVE_ALSA9 */

View File

@ -4,8 +4,6 @@
#include "config.h"
#if defined(USE_TV) && (defined(HAVE_TV_V4L) || defined(HAVE_TV_V4L2)) && defined(HAVE_ALSA1X)
#include <alsa/asoundlib.h>
#include "audio_in.h"
#include "mp_msg.h"
@ -185,5 +183,3 @@ int ai_alsa_xrun(audio_in_t *ai)
mp_msg(MSGT_TV, MSGL_ERR, MSGTR_MPDEMUX_AIALSA_AlsaReadWriteError);
return -1;
}
#endif /* HAVE_ALSA1X */

View File

@ -3,8 +3,6 @@
#include "config.h"
#if defined(USE_TV) && (defined(HAVE_TV_V4L) || defined(HAVE_TV_V4L2)) && defined(USE_OSS_AUDIO)
#include <string.h> /* strerror */
#include <fcntl.h>
#include <errno.h>
@ -139,5 +137,3 @@ int ai_oss_init(audio_in_t *ai)
return 0;
}
#endif /* USE_OSS_AUDIO */

View File

@ -4,8 +4,6 @@
#include "config.h"
#if defined(USE_TV) && (defined(HAVE_TV_V4L) || defined(HAVE_TV_V4L2))
#include "audio_in.h"
#include "mp_msg.h"
#include "help_mp.h"
@ -219,5 +217,3 @@ int audio_in_read_chunk(audio_in_t *ai, unsigned char *buffer)
return -1;
}
}
#endif

View File

@ -1,7 +1,5 @@
#include "config.h"
#ifdef USE_STREAM_CACHE
// Initial draft of my new cache system...
// Note it runs in 2 processes (using fork()), but doesn't requires locking!!
// TODO: seeking, data consistency checking
@ -367,5 +365,3 @@ int cache_stream_seek_long(stream_t *stream,off_t pos){
mp_msg(MSGT_CACHE,MSGL_V,"cache_stream_seek: WARNING! Can't seek to 0x%"PRIX64" !\n",(int64_t)(pos+newpos));
return 0;
}
#endif

View File

@ -1,7 +1,5 @@
#include "config.h"
#ifdef HAVE_CDDA
#include "stream.h"
#include "m_option.h"
#include "m_struct.h"
@ -391,5 +389,3 @@ stream_info_t stream_info_cdda = {
&stream_opts,
1 // Urls are an option string
};
#endif

View File

@ -14,8 +14,6 @@
#include "config.h"
#if defined(HAVE_CDDA) && defined(MPLAYER_NETWORK)
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
@ -878,5 +876,3 @@ cddb_parse_xmcd(char *xmcd_file) {
return cd_info;
}
#endif

View File

@ -9,8 +9,6 @@
#include "config.h"
#ifdef HAVE_GIF
#include "mp_msg.h"
#include "help_mp.h"
@ -236,5 +234,3 @@ demuxer_desc_t demuxer_desc_gif = {
NULL,
NULL
};
#endif /* HAVE_GIF */

View File

@ -17,8 +17,6 @@ unsigned int store_ughvlc(unsigned char *s, unsigned int v)
return n;
}
#ifdef HAVE_OGGVORBIS
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@ -1685,5 +1683,3 @@ demuxer_desc_t demuxer_desc_ogg = {
demux_ogg_seek,
demux_ogg_control
};
#endif

View File

@ -12,8 +12,6 @@
#include "config.h"
#ifdef HAVE_LIBDV095
#include "mp_msg.h"
#include "help_mp.h"
@ -262,5 +260,3 @@ demuxer_desc_t demuxer_desc_rawdv = {
demux_seek_rawdv,
demux_rawdv_control
};
#endif

View File

@ -1,6 +1,5 @@
#include "config.h"
#ifdef USE_DVDNAV
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
@ -395,5 +394,3 @@ stream_info_t stream_info_dvdnav = {
&stream_opts,
1 // Urls are an option string
};
#endif /* USE_DVDNAV */

View File

@ -1,8 +1,6 @@
#include "config.h"
#ifdef HAVE_FTP
#include <stdlib.h>
#include <stdio.h>
@ -469,5 +467,3 @@ stream_info_t stream_info_ftp = {
&stream_opts,
1 // Urls are an option string
};
#endif

View File

@ -1,7 +1,6 @@
#include "config.h"
#ifdef MPLAYER_NETWORK
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@ -12,8 +11,6 @@
#include "demuxer.h"
#include "help_mp.h"
#ifdef STREAMING_LIVE555
extern int network_bandwidth;
static int _rtsp_streaming_seek(int fd, off_t pos, streaming_ctrl_t* streaming_ctrl) {
@ -120,6 +117,3 @@ stream_info_t stream_info_sdp = {
NULL,
0 // Urls are an option string
};
#endif
#endif

View File

@ -36,8 +36,6 @@
#include "config.h"
#ifdef MPLAYER_NETWORK
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@ -308,5 +306,3 @@ stream_info_t stream_info_netstream = {
&stream_opts,
1 // Url is an option string
};
#endif

View File

@ -1,8 +1,6 @@
#include "config.h"
#ifdef LIBSMBCLIENT
#include <libsmbclient.h>
#include <unistd.h>
@ -148,5 +146,3 @@ stream_info_t stream_info_smb = {
&stream_opts,
0 //Url is an option string
};
#endif

View File

@ -1,7 +1,6 @@
#include "config.h"
#ifdef HAVE_VCD
#include "mp_msg.h"
#include "stream.h"
#include "help_mp.h"
@ -151,5 +150,3 @@ stream_info_t stream_info_vcd = {
&stream_opts,
1 // Urls are an option string
};
#endif

View File

@ -35,8 +35,6 @@
#include "config.h"
#ifdef HAVE_VSTREAM
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@ -180,5 +178,3 @@ stream_info_t stream_info_vstream = {
&stream_opts,
1 // Url is an option string
};
#endif

View File

@ -21,7 +21,6 @@
int tv_param_on = 0;
#ifdef USE_TV
#include "mp_msg.h"
#include "help_mp.h"
@ -918,5 +917,3 @@ demuxer_desc_t demuxer_desc_tv = {
NULL,
NULL
};
#endif /* USE_TV */

View File

@ -12,8 +12,6 @@
#include "config.h"
#if defined(USE_TV) && defined(HAVE_TV_BSDBT848)
#define RINGSIZE 8
#define FRAGSIZE 4096 /* (2^12 see SETFRAGSIZE below) */
@ -846,5 +844,3 @@ switch(innumber)
return 0;
}
#endif /* USE_TV */

View File

@ -4,8 +4,6 @@
#include "config.h"
#ifdef USE_TV
#include <stdio.h>
#include "libvo/img_format.h"
#include "tv.h"
@ -120,5 +118,3 @@ static int get_audio_framesize(priv_t *priv)
{
return(1);
}
#endif /* USE_TV */

View File

@ -17,8 +17,6 @@
#include "config.h"
#if defined(USE_TV) && defined(HAVE_TV_V4L)
#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
@ -1759,5 +1757,3 @@ static int get_audio_framesize(priv_t *priv)
{
return(priv->audio_in.blocksize);
}
#endif /* USE_TV */

View File

@ -25,8 +25,6 @@ known issues:
#include "config.h"
#if defined(USE_TV) && defined(HAVE_TV_V4L2)
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
@ -1747,5 +1745,3 @@ static int get_audio_framesize(priv_t *priv)
{
return(priv->audio_in.blocksize);
}
#endif /* USE_TV && HAVE_TV_V4L2 */