summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2013-07-16 13:28:28 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2013-11-03 21:59:54 +0100
commit37388ebb0ef9085c841d7f94e665a5a77cfe0e92 (patch)
treeb47d18bee4e7f661d9e6d794dac0ec1cebcd3a37
parent891a2a1f474add323145e6b2cd2d29181830e4a4 (diff)
downloadmpv-37388ebb0ef9085c841d7f94e665a5a77cfe0e92.tar.bz2
mpv-37388ebb0ef9085c841d7f94e665a5a77cfe0e92.tar.xz
configure: uniform the defines to #define HAVE_xxx (0|1)
The configure followed 5 different convetions of defines because the next guy always wanted to introduce a new better way to uniform it[1]. For an hypothetic feature 'hurr' you could have had: * #define HAVE_HURR 1 / #undef HAVE_DURR * #define HAVE_HURR / #undef HAVE_DURR * #define CONFIG_HURR 1 / #undef CONFIG_DURR * #define HAVE_HURR 1 / #define HAVE_DURR 0 * #define CONFIG_HURR 1 / #define CONFIG_DURR 0 All is now uniform and uses: * #define HAVE_HURR 1 * #define HAVE_DURR 0 We like definining to 0 as opposed to `undef` bcause it can help spot typos and is very helpful when doing big reorganizations in the code. [1]: http://xkcd.com/927/ related
-rw-r--r--audio/decode/dec_audio.c2
-rw-r--r--audio/filter/af.c8
-rw-r--r--audio/filter/af_lavrresample.c8
-rw-r--r--audio/out/ao.c26
-rw-r--r--audio/out/ao_oss.c10
-rwxr-xr-xconfigure370
-rw-r--r--demux/demux.c6
-rw-r--r--demux/demux_mkv.c6
-rw-r--r--demux/mf.c2
-rw-r--r--mpvcore/av_log.c18
-rw-r--r--mpvcore/charset_conv.c16
-rw-r--r--mpvcore/input/input.c20
-rw-r--r--mpvcore/options.c76
-rw-r--r--mpvcore/path.c2
-rw-r--r--mpvcore/player/command.c58
-rw-r--r--mpvcore/player/configfiles.c4
-rw-r--r--mpvcore/player/loadfile.c24
-rw-r--r--mpvcore/player/main.c30
-rw-r--r--mpvcore/player/mp_lua.c6
-rw-r--r--mpvcore/player/osd.c2
-rw-r--r--mpvcore/player/playloop.c4
-rw-r--r--mpvcore/player/sub.c2
-rw-r--r--mpvcore/player/video.c2
-rw-r--r--osdep/getch2.c27
-rw-r--r--osdep/io.c4
-rw-r--r--osdep/timer-linux.c2
-rw-r--r--stream/ai_oss.c4
-rw-r--r--stream/audio_in.c50
-rw-r--r--stream/audio_in.h18
-rw-r--r--stream/stream.c20
-rw-r--r--stream/stream_radio.c40
-rw-r--r--stream/tv.c4
-rw-r--r--stream/tvi_v4l2.c8
-rw-r--r--sub/ass_mp.h4
-rw-r--r--sub/dec_sub.c2
-rw-r--r--video/decode/vd_lavc.c11
-rw-r--r--video/filter/vf.c8
-rw-r--r--video/fmt-conversion.c2
-rw-r--r--video/image_writer.c6
-rw-r--r--video/out/gl_common.c12
-rw-r--r--video/out/gl_common.h2
-rw-r--r--video/out/gl_header_fixes.h4
-rw-r--r--video/out/gl_lcms.c4
-rw-r--r--video/out/gl_video.c2
-rw-r--r--video/out/vo.c26
-rw-r--r--video/out/vo_corevideo.c8
-rw-r--r--video/out/vo_vaapi.c2
-rw-r--r--video/out/vo_vdpau.c2
-rw-r--r--video/out/vo_wayland.c2
-rw-r--r--video/out/vo_x11.c14
-rw-r--r--video/out/vo_xv.c12
-rw-r--r--video/out/x11_common.c26
52 files changed, 528 insertions, 500 deletions
diff --git a/audio/decode/dec_audio.c b/audio/decode/dec_audio.c
index c368350f71..b9ca71692f 100644
--- a/audio/decode/dec_audio.c
+++ b/audio/decode/dec_audio.c
@@ -46,7 +46,7 @@ extern const struct ad_functions ad_lavc;
extern const struct ad_functions ad_spdif;
static const struct ad_functions * const ad_drivers[] = {
-#ifdef CONFIG_MPG123
+#if HAVE_MPG123
&ad_mpg123,
#endif
&ad_lavc,
diff --git a/audio/filter/af.c b/audio/filter/af.c
index c981a41288..f425cb40e3 100644
--- a/audio/filter/af.c
+++ b/audio/filter/af.c
@@ -65,7 +65,7 @@ static struct af_info* filter_list[] = {
&af_info_pan,
&af_info_surround,
&af_info_sub,
-#ifdef HAVE_SYS_MMAN_H
+#if HAVE_SYS_MMAN_H
&af_info_export,
#endif
&af_info_drc,
@@ -74,17 +74,17 @@ static struct af_info* filter_list[] = {
&af_info_lavrresample,
&af_info_sweep,
&af_info_hrtf,
-#ifdef CONFIG_LADSPA
+#if HAVE_LADSPA
&af_info_ladspa,
#endif
&af_info_center,
&af_info_sinesuppress,
&af_info_karaoke,
&af_info_scaletempo,
-#ifdef CONFIG_LIBBS2B
+#if HAVE_LIBBS2B
&af_info_bs2b,
#endif
-#ifdef CONFIG_AF_LAVFI
+#if HAVE_AF_LAVFI
&af_info_lavfi,
#endif
// Must come last, because they're fallback format conversion filter
diff --git a/audio/filter/af_lavrresample.c b/audio/filter/af_lavrresample.c
index 0c2d20b8aa..f1017d62c6 100644
--- a/audio/filter/af_lavrresample.c
+++ b/audio/filter/af_lavrresample.c
@@ -33,10 +33,10 @@
#include "talloc.h"
#include "config.h"
-#if defined(CONFIG_LIBAVRESAMPLE)
+#if HAVE_LIBAVRESAMPLE
#include <libavresample/avresample.h>
#define USE_SET_CHANNEL_MAPPING HAVE_AVRESAMPLE_SET_CHANNEL_MAPPING
-#elif defined(CONFIG_LIBSWRESAMPLE)
+#elif HAVE_LIBSWRESAMPLE
#include <libswresample/swresample.h>
#define AVAudioResampleContext SwrContext
#define avresample_alloc_context swr_alloc
@@ -49,7 +49,7 @@
#define avresample_set_channel_mapping swr_set_channel_mapping
#define USE_SET_CHANNEL_MAPPING 1
#else
-#error "config.h broken"
+#error "config.h broken or no resampler found"
#endif
#include "mpvcore/mp_msg.h"
@@ -86,7 +86,7 @@ struct af_resample {
uint8_t *reorder_buffer;
};
-#ifdef CONFIG_LIBAVRESAMPLE
+#if HAVE_LIBAVRESAMPLE
static int get_delay(struct af_resample *s)
{
return avresample_get_delay(s->avrctx);
diff --git a/audio/out/ao.c b/audio/out/ao.c
index c21e58ccf6..3f0865af22 100644
--- a/audio/out/ao.c
+++ b/audio/out/ao.c
@@ -50,47 +50,47 @@ extern const struct ao_driver audio_out_sdl;
static const struct ao_driver * const audio_out_drivers[] = {
// native:
-#ifdef CONFIG_COREAUDIO
+#if HAVE_COREAUDIO
&audio_out_coreaudio,
#endif
-#ifdef CONFIG_PULSE
+#if HAVE_PULSE
&audio_out_pulse,
#endif
-#ifdef CONFIG_SNDIO
+#if HAVE_SNDIO
&audio_out_sndio,
#endif
-#ifdef CONFIG_ALSA
+#if HAVE_ALSA
&audio_out_alsa,
#endif
-#ifdef CONFIG_WASAPI
+#if HAVE_WASAPI
&audio_out_wasapi,
#endif
-#ifdef CONFIG_OSS_AUDIO
+#if HAVE_OSS_AUDIO
&audio_out_oss,
#endif
-#ifdef CONFIG_DSOUND
+#if HAVE_DSOUND
&audio_out_dsound,
#endif
-#ifdef CONFIG_PORTAUDIO
+#if HAVE_PORTAUDIO
&audio_out_portaudio,
#endif
// wrappers:
-#ifdef CONFIG_JACK
+#if HAVE_JACK
&audio_out_jack,
#endif
-#ifdef CONFIG_OPENAL
+#if HAVE_OPENAL
&audio_out_openal,
#endif
-#ifdef CONFIG_SDL
+#if HAVE_SDL || HAVE_SDL2
&audio_out_sdl,
#endif
&audio_out_null,
// should not be auto-selected:
&audio_out_pcm,
-#ifdef CONFIG_ENCODING
+#if HAVE_ENCODING
&audio_out_lavc,
#endif
-#ifdef CONFIG_RSOUND
+#if HAVE_RSOUND
&audio_out_rsound,
#endif
NULL
diff --git a/audio/out/ao_oss.c b/audio/out/ao_oss.c
index ed1b9468ef..c22d15211f 100644
--- a/audio/out/ao_oss.c
+++ b/audio/out/ao_oss.c
@@ -38,10 +38,10 @@
#include "mpvcore/options.h"
#include "mpvcore/mp_msg.h"
-#ifdef HAVE_SYS_SOUNDCARD_H
+#if HAVE_SYS_SOUNDCARD_H
#include <sys/soundcard.h>
#else
-#ifdef HAVE_SOUNDCARD_H
+#if HAVE_SOUNDCARD_H
#include <soundcard.h>
#endif
#endif
@@ -349,7 +349,7 @@ ac3_retry:
// Measuring buffer size:
void *data;
p->buffersize = 0;
-#ifdef HAVE_AUDIO_SELECT
+#if HAVE_AUDIO_SELECT
data = malloc(p->outburst);
memset(data, 0, p->outburst);
while (p->buffersize < 0x40000) {
@@ -367,7 +367,7 @@ ac3_retry:
free(data);
if (p->buffersize == 0) {
MP_ERR(ao, "*** Your audio driver DOES NOT support select() ***\n");
- MP_ERR(ao, "Recompile mpv with #undef HAVE_AUDIO_SELECT in config.h!\n");
+ MP_ERR(ao, "Recompile mpv with #define HAVE_AUDIO_SELECT 0 in config.h!\n");
return -1;
}
#endif
@@ -456,7 +456,7 @@ static int get_space(struct ao *ao)
#endif
// check buffer
-#ifdef HAVE_AUDIO_SELECT
+#if HAVE_AUDIO_SELECT
{
fd_set rfds;
struct timeval tv;
diff --git a/configure b/configure
index a15e08bca5..2b31424daa 100755
--- a/configure
+++ b/configure
@@ -494,7 +494,7 @@ libavdevice=auto
_stream_cache=yes
_priority=no
def_dos_paths="#define HAVE_DOS_PATHS 0"
-def_priority="#undef CONFIG_PRIORITY"
+def_priority="#define HAVE_PRIORITY 0"
_build_man=auto
_build_pdf=auto
_build_date=yes
@@ -904,7 +904,7 @@ if win32 ; then
_timer=timer-win2.c
_priority=yes
def_dos_paths="#define HAVE_DOS_PATHS 1"
- def_priority="#define CONFIG_PRIORITY 1"
+ def_priority="#define HAVE_PRIORITY 1"
fi
if mingw32 ; then
@@ -1255,7 +1255,7 @@ statement_check time.h 'nanosleep(0, 0)' && _nanosleep=yes
if test "$_nanosleep" = yes ; then
def_nanosleep='#define HAVE_NANOSLEEP 1'
else
- def_nanosleep='#undef HAVE_NANOSLEEP'
+ def_nanosleep='#define HAVE_NANOSLEEP 0'
fi
echores "$_nanosleep"
@@ -1266,7 +1266,7 @@ statement_check sys/mman.h 'mmap(0, 0, 0, 0, 0, 0)' && _mman=yes
if test "$_mman" = yes ; then
def_mman_h='#define HAVE_SYS_MMAN_H 1'
else
- def_mman_h='#undef HAVE_SYS_MMAN_H'
+ def_mman_h='#define HAVE_SYS_MMAN_H 0'
fi
echores "$_mman"
@@ -1279,7 +1279,7 @@ done
if test "$_dl" = yes ; then
def_dl='#define HAVE_LIBDL 1'
else
- def_dl='#undef HAVE_LIBDL'
+ def_dl='#define HAVE_LIBDL 0'
fi
echores "$_dl"
@@ -1319,7 +1319,7 @@ if test "$_pthreads" = yes ; then
extra_cflags="$extra_cflags $THREAD_CFLAGS"
else
res_comment="v4l2 disabled"
- def_pthreads='#undef HAVE_PTHREADS'
+ def_pthreads='#define HAVE_PTHREADS 0'
_tv_v4l2=no
fi
echores "$_pthreads"
@@ -1343,9 +1343,9 @@ fi
echocheck "stream cache"
_stream_cache="$_pthreads"
if test "$_stream_cache" = yes ; then
- def_stream_cache='#define CONFIG_STREAM_CACHE'
+ def_stream_cache='#define HAVE_STREAM_CACHE 1'
else
- def_stream_cache='#undef CONFIG_STREAM_CACHE'
+ def_stream_cache='#define HAVE_STREAM_CACHE 0'
fi
echores "$_stream_cache"
@@ -1402,17 +1402,17 @@ EOF
fi
fi
if test "$_iconv" = yes ; then
- def_iconv='#define CONFIG_ICONV 1'
+ def_iconv='#define HAVE_ICONV 1'
else
- def_iconv='#undef CONFIG_ICONV'
+ def_iconv='#define HAVE_ICONV 0'
fi
echores "$_iconv"
echocheck "soundcard.h"
_soundcard_h=no
-def_soundcard_h='#undef HAVE_SOUNDCARD_H'
-def_sys_soundcard_h='#undef HAVE_SYS_SOUNDCARD_H'
+def_soundcard_h='#define HAVE_SOUNDCARD_H 0'
+def_sys_soundcard_h='#define HAVE_SYS_SOUNDCARD_H 0'
for _soundcard_header in "sys/soundcard.h" "soundcard.h"; do
header_check $_soundcard_header && _soundcard_h=yes &&
res_comment="$_soundcard_header" && break
@@ -1430,7 +1430,7 @@ echores "$_soundcard_h"
echocheck "sys/videoio.h"
sys_videoio_h=no
-def_sys_videoio_h='#undef HAVE_SYS_VIDEOIO_H'
+def_sys_videoio_h='#define HAVE_SYS_VIDEOIO_H 0'
header_check sys/videoio.h && sys_videoio_h=yes &&
def_sys_videoio_h='#define HAVE_SYS_VIDEOIO_H 1'
echores "$sys_videoio_h"
@@ -1452,7 +1452,7 @@ if test "$_terminfo" = yes ; then
_termcap=yes # terminfo provides termcap
fi
else
- def_terminfo='#undef HAVE_TERMINFO'
+ def_terminfo='#define HAVE_TERMINFO 0'
fi
echores "$_terminfo"
@@ -1469,15 +1469,15 @@ if test "$_termcap" = yes ; then
def_termcap='#define HAVE_TERMCAP 1'
test $_ld_tmp && res_comment="using $_ld_tmp"
else
- def_termcap='#undef HAVE_TERMCAP'
+ def_termcap='#define HAVE_TERMCAP 0'
fi
echores "$_termcap"
echocheck "termios"
-def_termios='#undef HAVE_TERMIOS'
-def_termios_h='#undef HAVE_TERMIOS_H'
-def_termios_sys_h='#undef HAVE_SYS_TERMIOS_H'
+def_termios='#define HAVE_TERMIOS 0'
+def_termios_h='#define HAVE_TERMIOS_H 0'
+def_termios_sys_h='#define HAVE_SYS_TERMIOS_H 0'
if test "$_termios" = auto ; then
_termios=no
for _termios_header in "termios.h" "sys/termios.h"; do
@@ -1505,7 +1505,7 @@ fi
if test "$_shm" = yes ; then
def_shm='#define HAVE_SHM 1'
else
- def_shm='#undef HAVE_SHM'
+ def_shm='#define HAVE_SHM 0'
fi
echores "$_shm"
@@ -1521,7 +1521,7 @@ cat > $TMPC << EOF
int main(void) {int nfds = 1; fd_set readfds; struct timeval timeout; select(nfds, &readfds, NULL, NULL, &timeout); return 0; }
EOF
_posix_select=no
-def_posix_select='#undef HAVE_POSIX_SELECT'
+def_posix_select='#define HAVE_POSIX_SELECT 0'
cc_check && _posix_select=yes &&
def_posix_select='#define HAVE_POSIX_SELECT 1'
echores "$_posix_select"
@@ -1529,7 +1529,7 @@ echores "$_posix_select"
echocheck "audio select()"
if test "$_select" = no ; then
- def_select='#undef HAVE_AUDIO_SELECT'
+ def_select='#define HAVE_AUDIO_SELECT 0'
elif test "$_select" = yes ; then
def_select='#define HAVE_AUDIO_SELECT 1'
fi
@@ -1543,7 +1543,7 @@ need_glob=no
if test "$_glob" = yes ; then
def_glob='#define HAVE_GLOB 1'
else
- def_glob='#undef HAVE_GLOB'
+ def_glob='#define HAVE_GLOB 0'
# HACK! need_glob currently enables compilation of a
# win32-specific glob()-replacement.
# Other OS neither need it nor can they use it (mf:// is disabled for them).
@@ -1565,7 +1565,7 @@ statement_check sys/sysinfo.h 'struct sysinfo s_info; s_info.mem_unit=0; sysinfo
if test "$_sys_sysinfo" = yes ; then
def_sys_sysinfo_h='#define HAVE_SYS_SYSINFO_H 1'
else
- def_sys_sysinfo_h='#undef HAVE_SYS_SYSINFO_H'
+ def_sys_sysinfo_h='#define HAVE_SYS_SYSINFO_H 0'
fi
echores "$_sys_sysinfo"
@@ -1590,9 +1590,9 @@ if test "$_libguess" = auto ; then
fi
fi
if test "$_libguess" = yes; then
- def_libguess="#define CONFIG_LIBGUESS 1"
+ def_libguess="#define HAVE_LIBGUESS 1"
else
- def_libguess="#undef CONFIG_LIBGUESS"
+ def_libguess="#define HAVE_LIBGUESS 0"
fi
echores "$_libguess"
@@ -1605,10 +1605,10 @@ if test "$_smb" = auto ; then
fi
fi
if test "$_smb" = yes; then
- def_smb="#define CONFIG_LIBSMBCLIENT 1"
+ def_smb="#define HAVE_LIBSMBCLIENT 1"
inputmodules="smb $inputmodules"
else
- def_smb="#undef CONFIG_LIBSMBCLIENT"
+ def_smb="#define HAVE_LIBSMBCLIENT 0"
noinputmodules="smb $noinputmodules"
fi
echores "$_smb"
@@ -1622,9 +1622,9 @@ if test "$_libquvi4" = auto ; then
fi
fi
if test "$_libquvi4" = yes; then
- def_libquvi4="#define CONFIG_LIBQUVI 1"
+ def_libquvi4="#define HAVE_LIBQUVI4 1"
else
- def_libquvi4="#undef CONFIG_LIBQUVI"
+ def_libquvi4="#define HAVE_LIBQUVI4 0"
fi
echores "$_libquvi4"
@@ -1640,9 +1640,9 @@ if test "$_libquvi9" = auto ; then
fi
fi
if test "$_libquvi9" = yes; then
- def_libquvi9="#define CONFIG_LIBQUVI9 1"
+ def_libquvi9="#define HAVE_LIBQUVI9 1"
else
- def_libquvi9="#undef CONFIG_LIBQUVI9"
+ def_libquvi9="#define HAVE_LIBQUVI9 0"
fi
echores "$_libquvi9"
@@ -1668,9 +1668,9 @@ fi
if test "$_cocoa" = yes ; then
libs_mplayer="$libs_mplayer -framework IOKit -framework Cocoa -framework OpenGL"
extra_ldflags="$extra_ldflags -fobjc-arc" # needed for OS X 10.7
- def_cocoa='#define CONFIG_COCOA 1'
+ def_cocoa='#define HAVE_COCOA 1'
else
- def_cocoa='#undef CONFIG_COCOA'
+ def_cocoa='#define HAVE_COCOA 0'
fi
echores "$_cocoa"
@@ -1686,10 +1686,10 @@ fi
if test "$_corevideo" = yes ; then
vomodules="corevideo $vomodules"
libs_mplayer="$libs_mplayer -framework QuartzCore"
- def_corevideo='#define CONFIG_COREVIDEO 1'
+ def_corevideo='#define HAVE_COREVIDEO 1'
else
novomodules="corevideo $novomodules"
- def_corevideo='#undef CONFIG_COREVIDEO'
+ def_corevideo='#define HAVE_COREVIDEO 0'
fi
echores "$_corevideo"
@@ -1697,6 +1697,9 @@ depends_on_application_services(){
test "$_corevideo" = yes
}
+else
+ def_cocoa='#define HAVE_COCOA 0'
+ def_corevideo='#define HAVE_COREVIDEO 0'
fi #if darwin
_wlver="1.2.0"
@@ -1708,11 +1711,11 @@ if test "$_wayland" = yes || test "$_wayland" = auto; then
fi
if test "$_wayland" = yes; then
res_comment=""
- def_wayland='#define CONFIG_WAYLAND'
+ def_wayland='#define HAVE_WAYLAND'
vomodules="wayland $vomodules"
else
res_comment="version >= $_wlver"
- def_wayland='#undef CONFIG_WAYLAND'
+ def_wayland='#define HAVE_WAYLAND 0'
novomodules="wayland $novomodules"
fi
echores "$_wayland"
@@ -1770,11 +1773,11 @@ if test "$_x11" = auto && test "$_x11_headers" = yes ; then
done
fi
if test "$_x11" = yes ; then
- def_x11='#define CONFIG_X11 1'
+ def_x11='#define HAVE_X11 1'
vomodules="x11 $vomodules"
else
_x11=no
- def_x11='#undef CONFIG_X11'
+ def_x11='#define HAVE_X11 0'
novomodules="x11 $novomodules"
res_comment="check if the dev(el) packages are installed"
fi
@@ -1786,10 +1789,10 @@ if test "$_xss" = auto ; then
statement_check "X11/extensions/scrnsaver.h" 'XScreenSaverSuspend(NULL, True)' -lXss && _xss=yes
fi
if test "$_xss" = yes ; then
- def_xss='#define CONFIG_XSS 1'
+ def_xss='#define HAVE_XSS 1'
libs_mplayer="$libs_mplayer -lXss"
else
- def_xss='#undef CONFIG_XSS'
+ def_xss='#define HAVE_XSS 0'
fi
echores "$_xss"
@@ -1809,16 +1812,16 @@ EOF
statement_check_broken X11/Xlib.h X11/extensions/dpms.h 'DPMSQueryExtension(0, 0, 0)' -lXext && _xdpms4=yes
fi
if test "$_xdpms4" = yes ; then
- def_xdpms='#define CONFIG_XDPMS 1'
+ def_xdpms='#define HAVE_XDPMS 1'
res_comment="using Xdpms 4"
echores "yes"
elif test "$_xdpms3" = yes ; then
- def_xdpms='#define CONFIG_XDPMS 1'
+ def_xdpms='#define HAVE_XDPMS 1'
libs_mplayer="$libs_mplayer -lXdpms"
res_comment="using Xdpms 3"
echores "yes"
else
- def_xdpms='#undef CONFIG_XDPMS'
+ def_xdpms='#define HAVE_XDPMS 0'
echores "no"
fi
@@ -1830,11 +1833,11 @@ if test "$_xv" = auto && test "$_x11" = yes ; then
fi
if test "$_xv" = yes ; then
- def_xv='#define CONFIG_XV 1'
+ def_xv='#define HAVE_XV 1'
libs_mplayer="$libs_mplayer -lXv"
vomodules="xv $vomodules"
else
- def_xv='#undef CONFIG_XV'
+ def_xv='#define HAVE_XV 0'
novomodules="xv $novomodules"
fi
echores "$_xv"
@@ -1848,10 +1851,10 @@ if test "$_vdpau" = auto && test "$_x11" = yes ; then
fi
fi
if test "$_vdpau" = yes ; then
- def_vdpau='#define CONFIG_VDPAU 1'
+ def_vdpau='#define HAVE_VDPAU 1'
vomodules="vdpau $vomodules"
else
- def_vdpau='#define CONFIG_VDPAU 0'
+ def_vdpau='#define HAVE_VDPAU 0'
novomodules="vdpau $novomodules"
fi
echores "$_vdpau"
@@ -1859,7 +1862,7 @@ echores "$_vdpau"
echocheck "VAAPI"
_vaapi_vpp=no
-def_vaapi_vpp='#define CONFIG_VAAPI_VPP 0'
+def_vaapi_vpp='#define HAVE_VAAPI_VPP 0'
if test "$_vaapi" = auto && test "$_x11" = yes ; then
_vaapi=no
if test "$_dl" = yes ; then
@@ -1867,10 +1870,12 @@ if test "$_vaapi" = auto && test "$_x11" = yes ; then
fi
fi
if test "$_vaapi" = yes ; then
- def_vaapi='#define CONFIG_VAAPI 1'
+ def_vaapi='#define HAVE_VAAPI 1'
+ def_vaapi_hwaccel='#define HAVE_VAAPI_HWACCEL 1'
vomodules="vaapi $vomodules"
else
- def_vaapi='#define CONFIG_VAAPI 0'
+ def_vaapi='#define HAVE_VAAPI 0'
+ def_vaapi_hwaccel='#define HAVE_VAAPI_HWACCEL 0'
novomodules="vaapi $novomodules"
fi
echores "$_vaapi"
@@ -1879,7 +1884,7 @@ if test "$_vaapi" = yes ; then
echocheck "VAAPI VPP"
if pkg-config 'libva >= 0.34.0' ; then
_vaapi_vpp=yes
- def_vaapi_vpp='#define CONFIG_VAAPI_VPP 1'
+ def_vaapi_vpp='#define HAVE_VAAPI_VPP 1'
fi
echores "$_vaapi_vpp"
fi
@@ -1892,10 +1897,10 @@ if test "$_xinerama" = auto && test "$_x11" = yes ; then
fi
if test "$_xinerama" = yes ; then
- def_xinerama='#define CONFIG_XINERAMA 1'
+ def_xinerama='#define HAVE_XINERAMA 1'
libs_mplayer="$libs_mplayer -lXinerama"
else
- def_xinerama='#undef CONFIG_XINERAMA'
+ def_xinerama='#define HAVE_XINERAMA 0'
fi
echores "$_xinerama"
@@ -1911,10 +1916,10 @@ if test "$_vm" = auto && test "$_x11" = yes ; then
statement_check_broken X11/Xlib.h X11/extensions/xf86vmode.h 'XF86VidModeQueryExtension(0, 0, 0)' -lXxf86vm && _vm=yes
fi
if test "$_vm" = yes ; then
- def_vm='#define CONFIG_XF86VM 1'
+ def_vm='#define HAVE_XF86VM 1'
libs_mplayer="$libs_mplayer -lXxf86vm"
else
- def_vm='#undef CONFIG_XF86VM'
+ def_vm='#define HAVE_XF86VM 0'
fi
echores "$_vm"
@@ -1928,9 +1933,9 @@ if test "$_xf86keysym" = auto && test "$_x11" = yes ; then
return_check X11/XF86keysym.h XF86XK_AudioPause && _xf86keysym=yes
fi
if test "$_xf86keysym" = yes ; then
- def_xf86keysym='#define CONFIG_XF86XK 1'
+ def_xf86keysym='#define HAVE_XF86XK 1'
else
- def_xf86keysym='#undef CONFIG_XF86XK'
+ def_xf86keysym='#define HAVE_XF86XK 0'
fi
echores "$_xf86keysym"
@@ -1941,10 +1946,10 @@ if test "$_caca" = auto ; then
pkg_config_add 'caca >= 0.99.beta18' && _caca=yes
fi
if test "$_caca" = yes ; then
- def_caca='#define CONFIG_CACA 1'
+ def_caca='#define HAVE_CACA 1'
vomodules="caca $vomodules"
else
- def_caca='#undef CONFIG_CACA'
+ def_caca='#define HAVE_CACA 0'
novomodules="caca $novomodules"
fi
echores "$_caca"
@@ -1974,13 +1979,13 @@ echores "$_dvb"
if test "$_dvb" = yes ; then
_dvbin=yes
inputmodules="dvb $inputmodules"
- def_dvb='#define CONFIG_DVB 1'
- def_dvbin='#define CONFIG_DVBIN 1'
+ def_dvb='#define HAVE_DVB 1'
+ def_dvbin='#define HAVE_DVBIN 1'
else
_dvbin=no
noinputmodules="dvb $noinputmodules"
- def_dvb='#undef CONFIG_DVB'
- def_dvbin='#undef CONFIG_DVBIN '
+ def_dvb='#define HAVE_DVB 0'
+ def_dvbin='#define HAVE_DVBIN 0 '
fi
@@ -1991,10 +1996,10 @@ if test "$_mng" = auto ; then
fi
echores "$_mng"
if test "$_mng" = yes ; then
- def_mng='#define CONFIG_MNG 1'
+ def_mng='#define HAVE_MNG 1'
libs_mplayer="$libs_mplayer -lmng -lz"
else
- def_mng='#undef CONFIG_MNG'
+ def_mng='#define HAVE_MNG 0'
fi
echocheck "JPEG support"
@@ -2005,10 +2010,10 @@ fi
echores "$_jpeg"
if test "$_jpeg" = yes ; then
- def_jpeg='#define CONFIG_JPEG 1'
+ def_jpeg='#define HAVE_JPEG 1'
libs_mplayer="$libs_mplayer -ljpeg"
else
- def_jpeg='#undef CONFIG_JPEG'
+ def_jpeg='#define HAVE_JPEG 0'
fi
@@ -2095,37 +2100,40 @@ EOF
else
_gl=no
fi
+
+def_gl_cocoa='#define HAVE_GL_COCOA 0'
+def_gl_win32='#define HAVE_GL_WIN32 0'
+def_gl_x11='#define HAVE_GL_X11 0'
+def_gl_wayland='#define HAVE_GL_WAYLAND 0'
+
if test "$_gl" = yes ; then
- def_gl='#define CONFIG_GL 1'
+ def_gl='#define HAVE_GL 1'
res_comment="backends:"
if test "$_gl_cocoa" = yes ; then
- def_gl_cocoa='#define CONFIG_GL_COCOA 1'
+ def_gl_cocoa='#define HAVE_GL_COCOA 1'
res_comment="$res_comment cocoa"
fi
if test "$_gl_win32" = yes ; then
- def_gl_win32='#define CONFIG_GL_WIN32 1'
+ def_gl_win32='#define HAVE_GL_WIN32 1'
res_comment="$res_comment win32"
fi
if test "$_gl_x11" = yes ; then
- def_gl_x11='#define CONFIG_GL_X11 1'
+ def_gl_x11='#define HAVE_GL_X11 1'
res_comment="$res_comment x11"
fi
if test "$_gl_wayland" = yes ; then
- def_gl_wayland='#define CONFIG_GL_WAYLAND'
+ def_gl_wayland='#define HAVE_GL_WAYLAND'
res_comment="$res_comment wayland"
fi
vomodules="opengl $vomodules"
else
- def_gl='#undef CONFIG_GL'
- def_gl_cocoa='#undef CONFIG_GL_COCOA'
- def_gl_win32='#undef CONFIG_GL_WIN32'
- def_gl_x11='#undef CONFIG_GL_X11'
- def_gl_wayland='#undef CONFIG_GL_WAYLAND'
+ def_gl='#define HAVE_GL 0'
novomodules="opengl $novomodules"
fi
echores "$_gl"
+
if win32; then