changeset 27341:e7c989f7a7c9

Start unifying names of internal preprocessor directives. Replace all USE_ prefixes by CONFIG_ prefixes to indicate options which are configurable.
author diego
date Wed, 30 Jul 2008 12:01:30 +0000
parents 33274ce3cce0
children 3a174cb28d36
files cfg-common-opts.h cfg-common.h cfg-mencoder.h cfg-mplayer.h command.c configure get_path.c gui/cfg.c gui/cfg.h gui/interface.c gui/interface.h gui/mplayer/gtk/menu.c gui/mplayer/gtk/opts.c gui/mplayer/gui_common.c gui/mplayer/mw.c gui/mplayer/play.c gui/win32/dialogs.c gui/win32/gui.c gui/win32/interface.c gui/win32/widgetrender.c help/help_mp-bg.h help/help_mp-cs.h help/help_mp-de.h help/help_mp-dk.h help/help_mp-el.h help/help_mp-en.h help/help_mp-es.h help/help_mp-fr.h help/help_mp-hu.h help/help_mp-it.h help/help_mp-ja.h help/help_mp-ko.h help/help_mp-mk.h help/help_mp-nb.h help/help_mp-nl.h help/help_mp-pl.h help/help_mp-pt_BR.h help/help_mp-ro.h help/help_mp-ru.h help/help_mp-sk.h help/help_mp-sv.h help/help_mp-tr.h help/help_mp-uk.h help/help_mp-zh_CN.h help/help_mp-zh_TW.h input/input.c libaf/af.c libao2/audio_out.c libass/ass.c libass/ass_mp.c libmenu/menu.c libmpcodecs/ad.c libmpcodecs/ad_faad.c libmpcodecs/ad_mp3lib.c libmpcodecs/ad_realaud.c libmpcodecs/ae.c libmpcodecs/ae_lavc.c libmpcodecs/dec_audio.c libmpcodecs/dec_video.c libmpcodecs/vd.c libmpcodecs/vd_ffmpeg.c libmpcodecs/vd_realvid.c libmpcodecs/ve.c libmpcodecs/ve_lavc.c libmpcodecs/vf.c libmpcodecs/vf_pp.c libmpcodecs/vf_vo.c libmpdemux/demux_mkv.c libmpdemux/demux_mov.c libmpdemux/demux_ogg.c libmpdemux/demux_rtp.cpp libmpdemux/demux_rtp_codec.cpp libmpdemux/demux_rtp_internal.h libmpdemux/demuxer.c libmpdemux/demuxer.h libmpdemux/extension.c libmpdemux/muxer.c libmpdemux/muxer_mpeg.c libmpdemux/stheader.h libvo/aclib.c libvo/fastmemcpy.h libvo/font_load_ft.c libvo/sub.c libvo/sub.h loader/win32.c mencoder.c mp3lib/decod386.c mp3lib/mp3.h mp3lib/sr1.c mp3lib/test.c mp3lib/test2.c mp_core.h mp_msg.c mpcommon.c mplayer.c osdep/getch2-os2.c osdep/getch2-win.c osdep/getch2.c stream/asf_mmst_streaming.c stream/audio_in.c stream/audio_in.h stream/librtsp/rtsp_rtp.c stream/network.c stream/stream.c stream/stream.h stream/stream_dvd.h stream/stream_dvd_common.c stream/stream_dvd_common.h stream/stream_radio.c stream/tcp.c stream/tvi_bsdbt848.c stream/udp.c subreader.c vobsub.c
diffstat 114 files changed, 588 insertions(+), 589 deletions(-) [+]
line wrap: on
line diff
--- a/cfg-common-opts.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/cfg-common-opts.h	Wed Jul 30 12:01:30 2008 +0000
@@ -11,7 +11,7 @@
 	{"msglevel", msgl_config, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
 	{"msgcolor", &mp_msg_color, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
 	{"msgmodule", &mp_msg_module, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 	{"msgcharset", &mp_msg_charset, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
 #endif
 	{"include", cfg_include, CONF_TYPE_FUNC_PARAM, CONF_NOSAVE, 0, 0, NULL},
@@ -22,18 +22,18 @@
 
 // ------------------------- stream options --------------------
 
-#ifdef USE_STREAM_CACHE
+#ifdef CONFIG_STREAM_CACHE
 	{"cache", &stream_cache_size, CONF_TYPE_INT, CONF_RANGE, 32, 1048576, NULL},
 	{"nocache", &stream_cache_size, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 	{"cache-min", &stream_cache_min_percent, CONF_TYPE_FLOAT, CONF_RANGE, 0, 99, NULL},
 	{"cache-seek-min", &stream_cache_seek_min_percent, CONF_TYPE_FLOAT, CONF_RANGE, 0, 99, NULL},
 #else
 	{"cache", "MPlayer was compiled without cache2 support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-#endif /* USE_STREAM_CACHE */
+#endif /* CONFIG_STREAM_CACHE */
 	{"vcd", "-vcd N has been removed, use vcd://N instead.\n", CONF_TYPE_PRINT, CONF_NOCFG ,0,0, NULL},
 	{"cuefile", "-cuefile has been removed, use cue://filename:N where N is the track number.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
 	{"cdrom-device", &cdrom_device, CONF_TYPE_STRING, 0, 0, 0, NULL},
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 	{"dvd-device", &dvd_device,  CONF_TYPE_STRING, 0, 0, 0, NULL}, 
 	{"dvd-speed", &dvd_speed, CONF_TYPE_INT, 0, 0, 0, NULL},
 	{"dvd", "-dvd N has been removed, use dvd://N instead.\n" , CONF_TYPE_PRINT, 0, 0, 0, NULL},
@@ -43,7 +43,7 @@
 	{"dvd-device", "MPlayer was compiled without libdvdread support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
 	{"dvd-speed", "MPlayer was compiled without libdvdread support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
 	{"dvd", "MPlayer was compiled without libdvdread support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-#endif /* USE_DVDREAD */
+#endif /* CONFIG_DVDREAD */
 	{"alang", &audio_lang, CONF_TYPE_STRING, 0, 0, 0, NULL},
 	{"slang", &dvdsub_lang, CONF_TYPE_STRING, 0, 0, 0, NULL},
 
@@ -146,16 +146,16 @@
 	{ "noextbased", &extension_parsing, CONF_TYPE_FLAG, 0, 1, 0, NULL },
 
         {"mf", mfopts_conf, CONF_TYPE_SUBCONFIG, 0,0,0, NULL},
-#ifdef USE_RADIO
+#ifdef CONFIG_RADIO
 	{"radio", radioopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 #else
 	{"radio", "MPlayer was compiled without Radio interface support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
-#endif /* USE_RADIO */
-#ifdef USE_TV
+#endif /* CONFIG_RADIO */
+#ifdef CONFIG_TV
 	{"tv", tvopts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 #else
 	{"tv", "MPlayer was compiled without TV interface support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
-#endif /* USE_TV */
+#endif /* CONFIG_TV */
 #ifdef HAVE_PVR
 	{"pvr", pvropts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 #else
@@ -189,14 +189,14 @@
 	{"ignore-start", &ignore_start, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 	{"noignore-start", &ignore_start, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 
-#ifdef USE_LIBA52
+#ifdef CONFIG_LIBA52
         {"a52drc", &a52_drc_level, CONF_TYPE_FLOAT, CONF_RANGE, 0, 1, NULL},
 #endif
 
 // ------------------------- codec/vfilter options --------------------
 
 	// MP3-only: select stereo/left/right
-#ifdef USE_FAKE_MONO
+#ifdef CONFIG_FAKE_MONO
 	{"stereo", &fakemono, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
 #endif
 
@@ -220,10 +220,10 @@
 	{"vc", &video_codec_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
 
 	// postprocessing:
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
 	{"pp", &divx_quality, CONF_TYPE_INT, 0, 0, 0, NULL},
 #endif
-#ifdef USE_LIBPOSTPROC
+#ifdef CONFIG_LIBPOSTPROC
         {"pphelp", &pp_help, CONF_TYPE_PRINT_INDIRECT, CONF_NOCFG, 0, 0, NULL},
 #endif
 
@@ -251,10 +251,10 @@
 	{"noslices", &vd_use_slices, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 	{"field-dominance", &field_dominance, CONF_TYPE_INT, CONF_RANGE, -1, 1, NULL},
 
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
 	{"lavdopts", lavc_decode_opts_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 #endif
-#ifdef USE_LIBAVFORMAT
+#ifdef CONFIG_LIBAVFORMAT
         {"lavfdopts",  lavfdopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
 #endif
 #if defined(HAVE_XVID3) || defined(HAVE_XVID4)
@@ -264,7 +264,7 @@
 // ------------------------- subtitles options --------------------
 
 	{"sub", &sub_name, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
-#ifdef USE_FRIBIDI
+#ifdef CONFIG_FRIBIDI
 	{"fribidi-charset", &fribidi_charset, CONF_TYPE_STRING, 0, 0, 0, NULL},
 	{"flip-hebrew", &flip_hebrew, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 	{"noflip-hebrew", &flip_hebrew, CONF_TYPE_FLAG, 0, 1, 0, NULL},
@@ -276,8 +276,8 @@
 	{"noflip-hebrew", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 	{"flip-hebrew-commas", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 	{"noflip-hebrew-commas", "MPlayer was compiled without FriBiDi support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-#endif /* USE_FRIBIDI */
-#ifdef USE_ICONV
+#endif /* CONFIG_FRIBIDI */
+#ifdef CONFIG_ICONV
 	{"subcp", &sub_cp, CONF_TYPE_STRING, 0, 0, 0, NULL},
 #endif	
 	{"subdelay", &sub_delay, CONF_TYPE_FLOAT, 0, 0.0, 10.0, NULL},
@@ -317,7 +317,7 @@
  	{"subfont-outline", &subtitle_font_thickness, CONF_TYPE_FLOAT, CONF_RANGE, 0, 8, NULL},
  	{"subfont-autoscale", &subtitle_autoscale, CONF_TYPE_INT, CONF_RANGE, 0, 3, NULL},
 #endif
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
 	{"ass", &ass_enabled, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 	{"noass", &ass_enabled, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 	{"ass-font-scale", &ass_font_scale, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL},
--- a/cfg-common.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/cfg-common.h	Wed Jul 30 12:01:30 2008 +0000
@@ -60,7 +60,7 @@
 
 
 
-#ifdef USE_RADIO
+#ifdef CONFIG_RADIO
 const m_option_t radioopts_conf[]={
     {"device", &stream_radio_defaults.device, CONF_TYPE_STRING, 0, 0 ,0, NULL},
     {"driver", &stream_radio_defaults.driver, CONF_TYPE_STRING, 0, 0 ,0, NULL},
@@ -75,9 +75,9 @@
     {"achannels", &stream_radio_defaults.achannels, CONF_TYPE_INT, CONF_MIN, 0 ,0, NULL},
     {NULL, NULL, 0, 0, 0, 0, NULL}
 };
-#endif /* USE_RADIO */
+#endif /* CONFIG_RADIO */
 
-#ifdef USE_TV
+#ifdef CONFIG_TV
 const m_option_t tvopts_conf[]={
 	{"on", "-tv on has been removed, use tv:// instead.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
 	{"immediatemode", &stream_tv_defaults.immediate, CONF_TYPE_INT, CONF_RANGE, 0, 1, NULL},
@@ -143,7 +143,7 @@
 #endif
 	{NULL, NULL, 0, 0, 0, 0, NULL}
 };
-#endif /* USE_TV */
+#endif /* CONFIG_TV */
 
 #ifdef HAVE_PVR
 extern int pvr_param_aspect_ratio;
--- a/cfg-mencoder.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/cfg-mencoder.h	Wed Jul 30 12:01:30 2008 +0000
@@ -42,13 +42,13 @@
 	"   copy     - frame copy, without re-encoding. Doesn't work with filters.\n"
 	"   frameno  - special audio-only file for 3-pass encoding, see DOCS.\n"
 	"   raw      - uncompressed video. Use fourcc option to set format explicitly.\n"
-#ifdef USE_LIBLZO
+#ifdef CONFIG_LIBLZO
 	"   nuv      - nuppel video\n"
 #endif
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
 	"   lavc     - libavcodec codecs - best quality!\n"
 #endif
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
 	"   vfw      - VfW DLLs, read DOCS/HTML/en/encoding-guide.html.\n"
 	"   qtvideo  - QuickTime DLLs, currently only SVQ1/3 are supported.\n"
 #endif
@@ -73,11 +73,11 @@
 #else
 	{"mp3lame", "MPlayer was compiled without libmp3lame support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif /* HAVE_MP3LAME */
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
 	{"lavc", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_LAVC, NULL},
 #else
 	{"lavc", "MPlayer was compiled without libavcodec. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-#endif /* USE_LIBAVCODEC */
+#endif /* CONFIG_LIBAVCODEC */
 #ifdef HAVE_TOOLAME
 	{"toolame", &out_audio_codec, CONF_TYPE_FLAG, 0, 0, ACODEC_TOOLAME, NULL},
 #else
@@ -99,7 +99,7 @@
 #ifdef HAVE_MP3LAME
 	"   mp3lame  - cbr/abr/vbr MP3 using libmp3lame\n"
 #endif
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
 	"   lavc     - FFmpeg audio encoder (MP2, AC3, ...)\n"
 #endif
 #ifdef HAVE_TOOLAME
@@ -138,7 +138,7 @@
 const m_option_t of_conf[]={
 	{"avi", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_AVI, NULL},
 	{"mpeg", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_MPEG, NULL},
-#ifdef USE_LIBAVFORMAT
+#ifdef CONFIG_LIBAVFORMAT
 	{"lavf", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_LAVF, NULL},
 #endif
 	{"rawvideo", &out_file_format, CONF_TYPE_FLAG, 0, 0, MUXER_TYPE_RAWVIDEO, NULL},
@@ -146,7 +146,7 @@
 	{"help", "\nAvailable output formats:\n"
 	"   avi      - Microsoft Audio/Video Interleaved\n"
 	"   mpeg     - MPEG-1/2 system stream format\n"
-#ifdef USE_LIBAVFORMAT
+#ifdef CONFIG_LIBAVFORMAT
 	"   lavf     - FFmpeg libavformat muxers\n"
 #endif
 	"   rawvideo - (video only, one stream only) raw stream, no muxing\n"
@@ -220,11 +220,11 @@
 #ifdef HAVE_MP3LAME
 	{"lameopts", lameopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
 #endif
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
 	{"lavcopts", lavcopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
 #else
 	{"lavcopts", "MPlayer was compiled without libavcodec. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-#endif /* USE_LIBAVCODEC */
+#endif /* CONFIG_LIBAVCODEC */
 #ifdef HAVE_TOOLAME
 	{"toolameopts", toolameopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
 #else
@@ -240,7 +240,7 @@
 #else
 	{"faacopts", "MPlayer was compiled without libfaac. See README or DOCS.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 #endif /* HAVE_FAAC */
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
 	{"xvfwopts", vfwopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
 #endif
 #if defined(HAVE_XVID3) || defined(HAVE_XVID4)
@@ -250,11 +250,11 @@
 	{"x264encopts", &x264enc_set_param, CONF_TYPE_FUNC_PARAM, CONF_GLOBAL, 0, 0, NULL},
 #endif
 
-#ifdef USE_LIBLZO
+#ifdef CONFIG_LIBLZO
 	{"nuvopts",  nuvopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
 #endif
 	{"mpegopts",  mpegopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
-#ifdef USE_LIBAVFORMAT
+#ifdef CONFIG_LIBAVFORMAT
 	{"lavfopts",  lavfopts_conf, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL},
 #endif	
 
--- a/cfg-mplayer.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/cfg-mplayer.h	Wed Jul 30 12:01:30 2008 +0000
@@ -63,7 +63,7 @@
 	{NULL, NULL, 0, 0, 0, 0, NULL}
 };
 
-#ifdef USE_TV
+#ifdef CONFIG_TV
 const m_option_t tvscan_conf[]={
 	{"autostart", &stream_tv_defaults.scan, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 	{"threshold", &stream_tv_defaults.scan_threshold, CONF_TYPE_INT, CONF_RANGE, 1, 100, NULL},
@@ -259,13 +259,13 @@
 	{"menu-startup", &menu_startup, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
 	{"menu-keepdir", &menu_keepdir, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
 	{"menu-chroot", &menu_chroot, CONF_TYPE_STRING, 0, 0, 0, NULL},
-#ifdef USE_FRIBIDI
+#ifdef CONFIG_FRIBIDI
 	{"menu-fribidi-charset", &menu_fribidi_charset, CONF_TYPE_STRING, 0, 0, 0, NULL},
 	{"menu-flip-hebrew", &menu_flip_hebrew, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 	{"menu-noflip-hebrew", &menu_flip_hebrew, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 	{"menu-flip-hebrew-commas", &menu_fribidi_flip_commas, CONF_TYPE_FLAG, 0, 1, 0, NULL},
 	{"menu-noflip-hebrew-commas", &menu_fribidi_flip_commas, CONF_TYPE_FLAG, 0, 0, 1, NULL},
-#endif /* USE_FRIBIDI */
+#endif /* CONFIG_FRIBIDI */
 #else
 	{"menu", "OSD menu support was not compiled in.\n", CONF_TYPE_PRINT,0, 0, 0, NULL},
 #endif /* HAVE_MENU */
@@ -273,7 +273,7 @@
 	// these should be moved to -common, and supported in MEncoder
 	{"vobsub", &vobsub_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
 	{"vobsubid", &vobsub_id, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL},
-#ifdef USE_UNRAR_EXEC
+#ifdef CONFIG_UNRAR_EXEC
 	{"unrarexec", &unrar_executable, CONF_TYPE_STRING, 0, 0, 0, NULL},
 #endif
 
@@ -348,11 +348,11 @@
 	{"mouse-movements", &enable_mouse_movements, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL},
 	{"nomouse-movements", &enable_mouse_movements, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL},
 	{"doubleclick-time", &doubleclick_time, CONF_TYPE_INT, CONF_RANGE, 0, 1000, NULL},
-#ifdef USE_TV
+#ifdef CONFIG_TV
 	{"tvscan", tvscan_conf, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 #else
 	{"tvscan", "MPlayer was compiled without TV interface support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
-#endif /* USE_TV */
+#endif /* CONFIG_TV */
 
 #include "cfg-common-opts.h"
 
--- a/command.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/command.c	Wed Jul 30 12:01:30 2008 +0000
@@ -28,10 +28,10 @@
 #include "vobsub.h"
 #include "spudec.h"
 #include "get_path.h"
-#ifdef USE_TV
+#ifdef CONFIG_TV
 #include "stream/tv.h"
 #endif
-#ifdef USE_RADIO
+#ifdef CONFIG_RADIO
 #include "stream/stream_radio.h"
 #endif
 #ifdef HAVE_PVR
@@ -40,13 +40,13 @@
 #ifdef HAS_DVBIN_SUPPORT
 #include "stream/dvbin.h"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 #include "stream/stream_dvd.h"
 #endif
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 #include "stream/stream_dvdnav.h"
 #endif
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
 #include "libass/ass.h"
 #include "libass/ass_mp.h"
 #endif
@@ -813,7 +813,7 @@
             sh_audio_t* sh = mpctx->sh_audio;
             if (sh && sh->lang)
                 av_strlcpy(lang, sh->lang, 40);
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 	    else if (mpctx->stream->type == STREAMTYPE_DVD) {
 		int code = dvd_lang_from_aid(mpctx->stream, audio_id);
 		if (code) {
@@ -824,7 +824,7 @@
 	    }
 #endif
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 	    else if (mpctx->stream->type == STREAMTYPE_DVDNAV)
 		mp_dvdnav_lang_from_aid(mpctx->stream, audio_id, lang);
 #endif
@@ -1162,7 +1162,7 @@
 	return M_PROPERTY_NOT_IMPLEMENTED;
     }
 
-#ifdef USE_TV
+#ifdef CONFIG_TV
     if (mpctx->demuxer->type == DEMUXER_TYPE_TV) {
 	int l = strlen(prop->name);
 	char tv_prop[3 + l + 1];
@@ -1322,7 +1322,7 @@
 	sub_name = 0;
 	if (subdata)
 	    sub_name = subdata->filename;
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
 	if (ass_track && ass_track->name)
 	    sub_name = ass_track->name;
 #endif
@@ -1338,7 +1338,7 @@
 		     strlen(tmp) < 20 ? tmp : tmp + strlen(tmp) - 19);
 	    return M_PROPERTY_OK;
 	}
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 	if (mpctx->stream->type == STREAMTYPE_DVDNAV) {
 	    if (vo_spudec && dvdsub_id >= 0) {
 		unsigned char lang[3];
@@ -1367,7 +1367,7 @@
 		     vobsub_id, language ? language : MSGTR_Unknown);
 	    return M_PROPERTY_OK;
 	}
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 	if (vo_spudec && mpctx->stream->type == STREAMTYPE_DVD
 	    && dvdsub_id >= 0) {
 	    char lang[3];
@@ -1430,7 +1430,7 @@
 	    reset_spu = 1;
 	d_sub->id = -2;
     }
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
     ass_track = 0;
 #endif
 
@@ -1439,7 +1439,7 @@
     } else if (source == SUB_SOURCE_SUBS) {
 	mpctx->set_of_sub_pos =
 	    mpctx->global_sub_pos - mpctx->global_sub_indices[SUB_SOURCE_SUBS];
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
 	if (ass_enabled && mpctx->set_of_ass_tracks[mpctx->set_of_sub_pos])
 	    ass_track = mpctx->set_of_ass_tracks[mpctx->set_of_sub_pos];
 	else
@@ -1469,7 +1469,7 @@
 		sh_sub_t *sh = d_sub->sh;
 		if (sh->type == 'v')
 		    init_vo_spudec();
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
 		else if (ass_enabled)
 		    ass_track = sh->ass_track;
 #endif
@@ -1479,7 +1479,7 @@
 	    }
 	}
     }
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
     if (vo_spudec
 	&& (mpctx->stream->type == STREAMTYPE_DVD
 	    || mpctx->stream->type == STREAMTYPE_DVDNAV)
@@ -1729,7 +1729,7 @@
     }
 }
 
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
 /// Use margins for libass subtitles (RW)
 static int mp_property_ass_use_margins(m_option_t * prop, int action,
 				      void *arg, MPContext * mpctx)
@@ -1783,7 +1783,7 @@
             if (!arg)
                 return M_PROPERTY_ERROR;
             M_PROPERTY_CLAMP(prop, *(float *) arg);
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
             if (ass_enabled) {
                 ass_font_scale = *(float *) arg;
                 ass_force_reload = 1;
@@ -1794,7 +1794,7 @@
             return M_PROPERTY_OK;
         case M_PROPERTY_STEP_UP:
         case M_PROPERTY_STEP_DOWN:
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
             if (ass_enabled) {
                 ass_font_scale += (arg ? *(float *) arg : 0.1)*
                   (action == M_PROPERTY_STEP_UP ? 1.0 : -1.0);
@@ -1808,7 +1808,7 @@
             force_load_font = 1;
             return M_PROPERTY_OK;
         default:
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
             if (ass_enabled)
                 return m_property_float_ro(prop, action, arg, ass_font_scale);
             else
@@ -1824,7 +1824,7 @@
 /// \ingroup Properties
 ///@{
 
-#ifdef USE_TV
+#ifdef CONFIG_TV
 
 /// TV color settings (RW)
 static int mp_property_tv_color(m_option_t * prop, int action, void *arg,
@@ -2076,12 +2076,12 @@
     { "sub_scale", mp_property_sub_scale, CONF_TYPE_FLOAT,
      M_OPT_RANGE, 0, 100, NULL },
 #endif
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
     { "ass_use_margins", mp_property_ass_use_margins, CONF_TYPE_FLAG,
      M_OPT_RANGE, 0, 1, NULL },
 #endif
 
-#ifdef USE_TV
+#ifdef CONFIG_TV
     { "tv_brightness", mp_property_tv_color, CONF_TYPE_INT,
      M_OPT_RANGE, -100, 100, (void *) TV_COLOR_BRIGHTNESS },
     { "tv_contrast", mp_property_tv_color, CONF_TYPE_INT,
@@ -2208,10 +2208,10 @@
 #ifdef HAVE_FREETYPE
     { "sub_scale", MP_CMD_SUB_SCALE, 0, 0, -1, MSGTR_SubScale},
 #endif
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
     { "ass_use_margins", MP_CMD_ASS_USE_MARGINS, 1, 0, -1, NULL },
 #endif
-#ifdef USE_TV
+#ifdef CONFIG_TV
     { "tv_brightness", MP_CMD_TV_SET_BRIGHTNESS, 0, OSD_BRIGHTNESS, -1, MSGTR_Brightness },
     { "tv_hue", MP_CMD_TV_SET_HUE, 0, OSD_HUE, -1, MSGTR_Hue },
     { "tv_saturation", MP_CMD_TV_SET_SATURATION, 0, OSD_SATURATION, -1, MSGTR_Saturation },
@@ -2281,7 +2281,7 @@
     return 1;
 }
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 static const struct {
   const char *name;
   const mp_command_type cmd;
@@ -2546,7 +2546,7 @@
 	    if (sh_video) {
 		int movement = cmd->args[0].v.i;
 		step_sub(subdata, sh_video->pts, movement);
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
 		if (ass_track)
 		    sub_delay +=
 			ass_step_sub(ass_track,
@@ -2655,7 +2655,7 @@
 	    brk_cmd = 1;
 	    break;
 
-#ifdef USE_RADIO
+#ifdef CONFIG_RADIO
 	case MP_CMD_RADIO_STEP_CHANNEL:
 	    if (mpctx->demuxer->stream->type == STREAMTYPE_RADIO) {
 		int v = cmd->args[0].v.i;
@@ -2695,7 +2695,7 @@
 	    break;
 #endif
 
-#ifdef USE_TV
+#ifdef CONFIG_TV
 	case MP_CMD_TV_START_SCAN:
 	    if (mpctx->file_format == DEMUXER_TYPE_TV)
 		tv_start_scan((tvi_handle_t *) (mpctx->demuxer->priv),1);
@@ -2856,7 +2856,7 @@
 	    break;
 	}
 #endif /* HAVE_TV_TELETEXT */
-#endif				/* USE_TV */
+#endif /* CONFIG_TV */
 
 	case MP_CMD_SUB_LOAD:
 	    if (sh_video) {
@@ -3111,7 +3111,7 @@
 		pointer_x = cmd->args[0].v.i;
 		pointer_y = cmd->args[1].v.i;
 		rescale_input_coordinates(pointer_x, pointer_y, &dx, &dy);
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 		if (mpctx->stream->type == STREAMTYPE_DVDNAV
 		    && dx > 0.0 && dy > 0.0) {
 		    int button = -1;
@@ -3131,7 +3131,7 @@
 	    }
 	    break;
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 	case MP_CMD_DVDNAV:{
 		int button = -1;
 		int i;
--- a/configure	Wed Jul 30 11:48:01 2008 +0000
+++ b/configure	Wed Jul 30 12:01:30 2008 +0000
@@ -693,7 +693,7 @@
 _rpath=no
 _asmalign_pot=auto
 _stream_cache=yes
-_def_stream_cache="#define USE_STREAM_CACHE 1"
+_def_stream_cache="#define CONFIG_STREAM_CACHE 1"
 _need_shmem=yes
 for ac_option do
   case "$ac_option" in
@@ -1398,7 +1398,7 @@
   _select=no
   _sighandler=no
   _stream_cache=no
-  _def_stream_cache="#undef USE_STREAM_CACHE"
+  _def_stream_cache="#undef CONFIG_STREAM_CACHE"
 fi
 
 if qnx ; then
@@ -2598,9 +2598,9 @@
   cc_check && _langinfo=yes
 fi
 if test "$_langinfo" = yes ; then
-  _def_langinfo='#define USE_LANGINFO 1'
-else
-  _def_langinfo='#undef USE_LANGINFO'
+  _def_langinfo='#define CONFIG_LANGINFO 1'
+else
+  _def_langinfo='#undef CONFIG_LANGINFO'
 fi
 echores "$_langinfo"
 
@@ -2859,9 +2859,9 @@
   echores "$_use_aton"
 fi
 
-_def_use_aton='#undef USE_ATON'
+_def_use_aton='#undef CONFIG_ATON'
 if test "$_use_aton" = yes; then
-  _def_use_aton='#define USE_ATON 1'
+  _def_use_aton='#define CONFIG_ATON 1'
 fi
 
 
@@ -3166,9 +3166,9 @@
   done
 fi
 if test "$_iconv" = yes ; then
-  _def_iconv='#define USE_ICONV 1'
-else
-  _def_iconv='#undef USE_ICONV'
+  _def_iconv='#define CONFIG_ICONV 1'
+else
+  _def_iconv='#undef CONFIG_ICONV'
 fi
 echores "$_iconv"
 
@@ -3327,10 +3327,10 @@
   done
 fi
 if test "$_termcap" = yes ; then
-  _def_termcap='#define USE_TERMCAP 1'
+  _def_termcap='#define CONFIG_TERMCAP 1'
   _res_comment="using $_ld_tmp"
 else
-  _def_termcap='#undef USE_TERMCAP'
+  _def_termcap='#undef CONFIG_TERMCAP'
 fi
 echores "$_termcap"
 
@@ -5041,7 +5041,7 @@
   cc_check && _ossaudio=yes
 fi
 if test "$_ossaudio" = yes ; then
-  _def_ossaudio='#define USE_OSS_AUDIO 1'
+  _def_ossaudio='#define CONFIG_OSS_AUDIO 1'
   _aosrc="$_aosrc ao_oss.c"
   _aomodules="oss $_aomodules"
   if test "$_linux_devfs" = yes; then
@@ -5070,7 +5070,7 @@
     _def_ossaudio_devmixer='#define PATH_DEV_MIXER "/dev/mixer"'
   fi
 else
-  _def_ossaudio='#undef USE_OSS_AUDIO'
+  _def_ossaudio='#undef CONFIG_OSS_AUDIO'
   _def_ossaudio_devdsp='#define PATH_DEV_DSP ""'
   _def_ossaudio_devmixer='#define PATH_DEV_MIXER ""'
   _noaomodules="oss $_noaomodules"
@@ -5093,7 +5093,7 @@
 fi
 
 if test "$_arts" = yes ; then
-  _def_arts='#define USE_ARTS 1'
+  _def_arts='#define CONFIG_ARTS 1'
   _aosrc="$_aosrc ao_arts.c"
   _aomodules="arts $_aomodules"
   _libs_mplayer="$_libs_mplayer `artsc-config --libs`"
@@ -5120,7 +5120,7 @@
 echores "$_esd"
 
 if test "$_esd" = yes ; then
-  _def_esd='#define USE_ESD 1'
+  _def_esd='#define CONFIG_ESD 1'
   _aosrc="$_aosrc ao_esd.c"
   _aomodules="esd $_aomodules"
   _libs_mplayer="$_libs_mplayer `esd-config --libs`"
@@ -5134,7 +5134,7 @@
   cc_check `esd-config --libs` `esd-config --cflags` && _esd_latency=yes && _def_esd_latency='#define HAVE_ESD_LATENCY'
   echores "$_esd_latency"
 else
-  _def_esd='#undef USE_ESD'
+  _def_esd='#undef CONFIG_ESD'
   _def_esd_latency='#undef HAVE_ESD_LATENCY'
   _noaomodules="esd $_noaomodules"
 fi
@@ -5155,13 +5155,13 @@
 echores "$_pulse"
 
 if test "$_pulse" = yes ; then
-  _def_pulse='#define USE_PULSE 1'
+  _def_pulse='#define CONFIG_PULSE 1'
   _aosrc="$_aosrc ao_pulse.c"
   _aomodules="pulse $_aomodules"
   _libs_mplayer="$_libs_mplayer `$_pkg_config --libs libpulse`"
   _inc_extra="$_inc_extra `$_pkg_config --cflags libpulse`"
 else
-  _def_pulse='#undef USE_PULSE'
+  _def_pulse='#undef CONFIG_PULSE'
   _noaomodules="pulse $_noaomodules"
 fi
 
@@ -5185,7 +5185,7 @@
 fi
 
 if test "$_jack" = yes ; then
-  _def_jack='#define USE_JACK 1'
+  _def_jack='#define CONFIG_JACK 1'
   _aosrc="$_aosrc ao_jack.c"
   _aomodules="jack $_aomodules"
 else
@@ -5215,7 +5215,7 @@
   test "$_openal" = yes && _libs_mplayer="$_libs_mplayer $I"
 fi
 if test "$_openal" = yes ; then
-  _def_openal='#define USE_OPENAL 1'
+  _def_openal='#define CONFIG_OPENAL 1'
   _aosrc="$_aosrc ao_openal.c"
   _aomodules="openal $_aomodules"
 else
@@ -5342,11 +5342,11 @@
   cc_check && _sunaudio=yes
 fi
 if test "$_sunaudio" = yes ; then
-  _def_sunaudio='#define USE_SUN_AUDIO 1'
+  _def_sunaudio='#define CONFIG_SUN_AUDIO 1'
   _aosrc="$_aosrc ao_sun.c"
   _aomodules="sun $_aomodules"
 else
-  _def_sunaudio='#undef USE_SUN_AUDIO'
+  _def_sunaudio='#undef CONFIG_SUN_AUDIO'
   _noaomodules="sun $_noaomodules"
 fi
 echores "$_sunaudio"
@@ -5379,12 +5379,12 @@
   cc_check && _sgiaudio=yes
 fi
 if test "$_sgiaudio" = "yes" ; then
-  _def_sgiaudio='#define USE_SGI_AUDIO 1'
+  _def_sgiaudio='#define CONFIG_SGI_AUDIO 1'
   _libs_mplayer="$_libs_mplayer -laudio"
   _aosrc="$_aosrc ao_sgi.c"
   _aomodules="sgi $_aomodules"
 else
-  _def_sgiaudio='#undef USE_SGI_AUDIO'
+  _def_sgiaudio='#undef CONFIG_SGI_AUDIO'
   _noaomodules="sgi $_noaomodules"
 fi
 echores "$_sgiaudio"
@@ -5441,20 +5441,20 @@
 fi
 
 if test "$_dvdread_internal" = yes; then
-  _def_dvdread_internal="#define USE_DVDREAD_INTERNAL 1"
-  _def_dvdread='#define USE_DVDREAD 1'
+  _def_dvdread_internal="#define CONFIG_DVDREAD_INTERNAL 1"
+  _def_dvdread='#define CONFIG_DVDREAD 1'
   _inputmodules="dvdread(internal) $_inputmodules"
   _largefiles=yes
   _res_comment="internal"
 elif test "$_dvdread" = yes; then
-  _def_dvdread='#define USE_DVDREAD 1'
+  _def_dvdread='#define CONFIG_DVDREAD 1'
   _largefiles=yes
   _ld_extra="$_ld_extra -ldvdread"
   _inputmodules="dvdread(external) $_inputmodules"
   _res_comment="external"
 else
-  _def_dvdread_internal="#undef USE_DVDREAD_INTERNAL"
-  _def_dvdread='#undef USE_DVDREAD'
+  _def_dvdread_internal="#undef CONFIG_DVDREAD_INTERNAL"
+  _def_dvdread='#undef CONFIG_DVDREAD'
   _noinputmodules="dvdread $_noinputmodules"
 fi
 echores "$_dvdread"
@@ -5692,9 +5692,9 @@
     fi
 fi
 if test "$_ass" = yes ; then
-    _def_ass='#define USE_ASS'
-else
-    _def_ass='#undef USE_ASS'
+    _def_ass='#define CONFIG_ASS'
+else
+    _def_ass='#undef CONFIG_ASS'
 fi
 echores "$_ass"
 
@@ -5722,11 +5722,11 @@
     fi
 fi
 if test "$_fribidi" = yes ; then
-    _def_fribidi='#define USE_FRIBIDI'
+    _def_fribidi='#define CONFIG_FRIBIDI'
     _inc_extra="$_inc_extra `$_fribidiconfig --cflags`"
     _ld_extra="$_ld_extra `$_fribidiconfig --libs`"
 else
-    _def_fribidi='#undef USE_FRIBIDI'
+    _def_fribidi='#undef CONFIG_FRIBIDI'
 fi
 echores "$_fribidi"
 
@@ -5763,10 +5763,10 @@
 _zlib=no
 cc_check -lz && _zlib=yes
 if test "$_zlib" = yes ; then
-  _def_zlib='#define HAVE_ZLIB 1'
+  _def_zlib='#define CONFIG_ZLIB 1'
   _ld_extra="$_ld_extra -lz"
 else
-  _def_zlib='#undef HAVE_ZLIB'
+  _def_zlib='#undef CONFIG_ZLIB'
   _libavdecoders=`echo $_libavdecoders | sed -e s/FLASHSV_DECODER// -e s/PNG_DECODER// -e s/ZMBV_DECODER// -e s/DXA_DECODER// `
   _libavencoders=`echo $_libavencoders | sed -e s/FLASHSV_ENCODER// -e s/PNG_ENCODER// -e s/ZMBV_ENCODER// `
 fi
@@ -5807,11 +5807,11 @@
   cc_check -llzo2 && _liblzo=yes
 fi
 if test "$_liblzo" = yes ; then
-  _def_liblzo='#define USE_LIBLZO 1'
+  _def_liblzo='#define CONFIG_LIBLZO 1'
   _ld_extra="$_ld_extra -llzo2"
   _codecmodules="liblzo $_codecmodules"
 else
-  _def_liblzo='#undef USE_LIBLZO'
+  _def_liblzo='#undef CONFIG_LIBLZO'
   _nocodecmodules="liblzo $_nocodecmodules"
 fi
 echores "$_liblzo"
@@ -5827,11 +5827,11 @@
   cc_check -lmad && _mad=yes
 fi
 if test "$_mad" = yes ; then
-  _def_mad='#define USE_LIBMAD 1'
+  _def_mad='#define CONFIG_LIBMAD 1'
   _ld_extra="$_ld_extra -lmad"
   _codecmodules="libmad $_codecmodules"
 else
-  _def_mad='#undef USE_LIBMAD'
+  _def_mad='#undef CONFIG_LIBMAD'
   _nocodecmodules="libmad $_nocodecmodules"
 fi
 echores "$_mad"
@@ -6009,20 +6009,20 @@
 
 echocheck "internal mp3lib support"
 if test "$_mp3lib" = yes ; then
-  _def_mp3lib='#define USE_MP3LIB 1'
+  _def_mp3lib='#define CONFIG_MP3LIB 1'
   _codecmodules="mp3lib $_codecmodules"
 else
-  _def_mp3lib='#undef USE_MP3LIB'
+  _def_mp3lib='#undef CONFIG_MP3LIB'
   _nocodecmodules="mp3lib $_nocodecmodules"
 fi
 echores "$_mp3lib"
 
 echocheck "internal liba52 support"
 if test "$_liba52" = yes ; then
-  _def_liba52='#define USE_LIBA52 1'
+  _def_liba52='#define CONFIG_LIBA52 1'
   _codecmodules="liba52 $_codecmodules"
 else
-  _def_liba52='#undef USE_LIBA52'
+  _def_liba52='#undef CONFIG_LIBA52'
   _nocodecmodules="liba52 $_nocodecmodules"
 fi
 echores "$_liba52"
@@ -6040,10 +6040,10 @@
   fi
 fi
 if test "$_libmpeg2" = yes ; then
-  _def_libmpeg2='#define USE_LIBMPEG2 1'
+  _def_libmpeg2='#define CONFIG_LIBMPEG2 1'
   _codecmodules="libmpeg2 $_codecmodules"
 else
-  _def_libmpeg2='#undef USE_LIBMPEG2'
+  _def_libmpeg2='#undef CONFIG_LIBMPEG2'
   _nocodecmodules="libmpeg2 $_nocodecmodules"
 fi
 echores "$_libmpeg2"
@@ -6062,10 +6062,10 @@
   done
 fi
 if test "$_libdca" = yes ; then
-  _def_libdca='#define USE_LIBDCA 1'
+  _def_libdca='#define CONFIG_LIBDCA 1'
   _codecmodules="libdca $_codecmodules"
 else
-  _def_libdca='#undef USE_LIBDCA'
+  _def_libdca='#undef CONFIG_LIBDCA'
   _nocodecmodules="libdca $_nocodecmodules"
 fi
 echores "$_libdca"
@@ -6157,7 +6157,7 @@
 fi
 
 if test "$_faad_internal" = yes ; then
-  _def_faad_internal="#define USE_FAAD_INTERNAL 1"
+  _def_faad_internal="#define CONFIG_FAAD_INTERNAL 1"
   _faad=yes
   _res_comment="internal floating-point"
   if test "$_faad_fixed" = yes ; then
@@ -6170,7 +6170,7 @@
   _faad=yes
   _ld_extra="$_ld_extra -lfaad"
 else
-  _def_faad_internal="#undef USE_FAAD_INTERNAL"
+  _def_faad_internal="#undef CONFIG_FAAD_INTERNAL"
   _faad=no
 fi
 
@@ -6230,7 +6230,7 @@
   fi
 fi
 if test "$_win32dll" = yes ; then
-  _def_win32dll='#define USE_WIN32DLL 1'
+  _def_win32dll='#define CONFIG_WIN32DLL 1'
   test -z "$_win32codecsdir" && _win32codecsdir=$_codecsdir
   _res_comment="using $_win32codecsdir"
   if ! win32 ; then
@@ -6242,7 +6242,7 @@
   fi
   _codecmodules="win32 $_codecmodules"
 else
-  _def_win32dll='#undef USE_WIN32DLL'
+  _def_win32dll='#undef CONFIG_WIN32DLL'
   _def_win32_loader='#undef WIN32_LOADER'
   _nocodecmodules="win32 $_nocodecmodules"
 fi
@@ -6259,12 +6259,12 @@
 fi
 if test "$_xanim" = yes ; then
   test -z "$_xanimcodecsdir" && _xanimcodecsdir=$_codecsdir
-  _def_xanim='#define USE_XANIM 1'
+  _def_xanim='#define CONFIG_XANIM 1'
   _def_xanim_path="#define XACODEC_PATH \"$_xanimcodecsdir\""
   _codecmodules="xanim $_codecmodules"
   _res_comment="using $_xanimcodecsdir"
 else
-  _def_xanim='#undef USE_XANIM'
+  _def_xanim='#undef CONFIG_XANIM'
   _def_xanim_path='#undef XACODEC_PATH'
   _nocodecmodules="xanim $_nocodecmodules"
 fi
@@ -6282,12 +6282,12 @@
 fi
 if test "$_real" = yes ; then
   test -z "$_realcodecsdir" && _realcodecsdir="$_codecsdir"
-  _def_real='#define USE_REALCODECS 1'
+  _def_real='#define CONFIG_REALCODECS 1'
   _def_real_path="#define REALCODEC_PATH \"$_realcodecsdir\""
   _codecmodules="real $_codecmodules"
   _res_comment="using $_realcodecsdir"
 else
-  _def_real='#undef USE_REALCODECS'
+  _def_real='#undef CONFIG_REALCODECS'
   _def_real_path="#undef REALCODEC_PATH"
   _nocodecmodules="real $_nocodecmodules"
 fi
@@ -6296,17 +6296,17 @@
 
 echocheck "QuickTime codecs"
 _qtx_emulation=no
-_def_qtx_win32='#undef USE_QTX_CODECS_WIN32'
+_def_qtx_win32='#undef CONFIG_QTX_CODECS_WIN32'
 if test "$_qtx" = auto ; then
   test "$_win32dll" = yes || darwin && _qtx=yes
 fi
 if test "$_qtx" = yes ; then
-    _def_qtx='#define USE_QTX_CODECS 1'
-    win32 && _qtx_codecs_win32=yes && _def_qtx_win32='#define USE_QTX_CODECS_WIN32 1'
+    _def_qtx='#define CONFIG_QTX_CODECS 1'
+    win32 && _qtx_codecs_win32=yes && _def_qtx_win32='#define CONFIG_QTX_CODECS_WIN32 1'
     _codecmodules="qtx $_codecmodules"
     darwin || win32 || _qtx_emulation=yes
 else
-    _def_qtx='#undef USE_QTX_CODECS'
+    _def_qtx='#undef CONFIG_QTX_CODECS'
     _nocodecmodules="qtx $_nocodecmodules"
 fi
 echores "$_qtx"
@@ -6409,13 +6409,13 @@
   fi
 fi
 _libavutil=no
-_def_libavutil='#undef USE_LIBAVUTIL'
-_def_libavutil_a='#undef USE_LIBAVUTIL_A'
-_def_libavutil_so='#undef USE_LIBAVUTIL_SO'
+_def_libavutil='#undef CONFIG_LIBAVUTIL'
+_def_libavutil_a='#undef CONFIG_LIBAVUTIL_A'
+_def_libavutil_so='#undef CONFIG_LIBAVUTIL_SO'
 test "$_libavutil_a" = yes || test "$_libavutil_so" = yes && _libavutil=yes
-test "$_libavutil"    = yes && _def_libavutil='#define USE_LIBAVUTIL 1'
-test "$_libavutil_a"  = yes && _def_libavutil_a='#define USE_LIBAVUTIL_A 1'
-test "$_libavutil_so" = yes && _def_libavutil_so='#define USE_LIBAVUTIL_SO 1'
+test "$_libavutil"    = yes && _def_libavutil='#define CONFIG_LIBAVUTIL 1'
+test "$_libavutil_a"  = yes && _def_libavutil_a='#define CONFIG_LIBAVUTIL_A 1'
+test "$_libavutil_so" = yes && _def_libavutil_so='#define CONFIG_LIBAVUTIL_SO 1'
 # neither static nor shared libavutil is available, but it is mandatory ...
 if test "$_libavutil" = no ; then
   die "You need static or shared libavutil, MPlayer will not compile without!"
@@ -6448,13 +6448,13 @@
   fi
 fi
 _libavcodec=no
-_def_libavcodec='#undef USE_LIBAVCODEC'
-_def_libavcodec_a='#undef USE_LIBAVCODEC_A'
-_def_libavcodec_so='#undef USE_LIBAVCODEC_SO'
+_def_libavcodec='#undef CONFIG_LIBAVCODEC'
+_def_libavcodec_a='#undef CONFIG_LIBAVCODEC_A'
+_def_libavcodec_so='#undef CONFIG_LIBAVCODEC_SO'
 test "$_libavcodec_a" = yes || test "$_libavcodec_so" = yes && _libavcodec=yes
-test "$_libavcodec"    = yes && _def_libavcodec='#define USE_LIBAVCODEC 1'
-test "$_libavcodec_a"  = yes && _def_libavcodec_a='#define USE_LIBAVCODEC_A 1'
-test "$_libavcodec_so" = yes && _def_libavcodec_so='#define USE_LIBAVCODEC_SO 1'
+test "$_libavcodec"    = yes && _def_libavcodec='#define CONFIG_LIBAVCODEC 1'
+test "$_libavcodec_a"  = yes && _def_libavcodec_a='#define CONFIG_LIBAVCODEC_A 1'
+test "$_libavcodec_so" = yes && _def_libavcodec_so='#define CONFIG_LIBAVCODEC_SO 1'
 test "$_libavcodec_mpegaudio_hp" = yes \
   && _def_libavcodec_mpegaudio_hp='#define CONFIG_MPEGAUDIO_HP 1'
 if test "$_libavcodec_a" = yes ; then
@@ -6492,14 +6492,14 @@
   fi
 fi
 _libavformat=no
-_def_libavformat='#undef USE_LIBAVFORMAT'
-_def_libavformat_a='#undef USE_LIBAVFORMAT_A'
-_def_libavformat_so='#undef USE_LIBAVFORMAT_SO'
+_def_libavformat='#undef CONFIG_LIBAVFORMAT'
+_def_libavformat_a='#undef CONFIG_LIBAVFORMAT_A'
+_def_libavformat_so='#undef CONFIG_LIBAVFORMAT_SO'
 test "$_libavformat_a" = yes || test "$_libavformat_so" = yes && _libavformat=yes
-test "$_libavformat"    = yes && _def_libavformat='#define USE_LIBAVFORMAT 1'
-test "$_libavformat_a"  = yes && _def_libavformat_a='#define USE_LIBAVFORMAT_A 1'
+test "$_libavformat"    = yes && _def_libavformat='#define CONFIG_LIBAVFORMAT 1'
+test "$_libavformat_a"  = yes && _def_libavformat_a='#define CONFIG_LIBAVFORMAT_A 1'
 test "$_libavformat_so" = yes \
-  && _def_libavformat_so='#define USE_LIBAVFORMAT_SO 1'
+  && _def_libavformat_so='#define CONFIG_LIBAVFORMAT_SO 1'
 echores "$_libavformat"
 
 echocheck "FFmpeg libpostproc"
@@ -6512,7 +6512,7 @@
 elif test "$_libpostproc_so" = auto ; then
   _libpostproc_so=no
   cat > $TMPC << EOF
-  #define USE_LIBPOSTPROC 1
+  #define CONFIG_LIBPOSTPROC 1
   #include <inttypes.h>
   #include <libpostproc/postprocess.h>
   int main(void) { pp_get_mode_by_name_and_quality("de", 0); return 0; }
@@ -6524,14 +6524,14 @@
   fi
 fi
 _libpostproc=no
-_def_libpostproc='#undef USE_LIBPOSTPROC'
-_def_libpostproc_a='#undef USE_LIBPOSTPROC_A'
-_def_libpostproc_so='#undef USE_LIBPOSTPROC_SO'
+_def_libpostproc='#undef CONFIG_LIBPOSTPROC'
+_def_libpostproc_a='#undef CONFIG_LIBPOSTPROC_A'
+_def_libpostproc_so='#undef CONFIG_LIBPOSTPROC_SO'
 test "$_libpostproc_a" = yes || test "$_libpostproc_so" = yes && _libpostproc=yes
-test "$_libpostproc"    = yes && _def_libpostproc='#define USE_LIBPOSTPROC 1'
-test "$_libpostproc_a"  = yes && _def_libpostproc_a='#define USE_LIBPOSTPROC_A 1'
+test "$_libpostproc"    = yes && _def_libpostproc='#define CONFIG_LIBPOSTPROC 1'
+test "$_libpostproc_a"  = yes && _def_libpostproc_a='#define CONFIG_LIBPOSTPROC_A 1'
 test "$_libpostproc_so" = yes \
-  && _def_libpostproc_so='#define USE_LIBPOSTPROC_SO 1'
+  && _def_libpostproc_so='#define CONFIG_LIBPOSTPROC_SO 1'
 echores "$_libpostproc"
 
 
@@ -6866,9 +6866,9 @@
 echocheck "fastmemcpy"
 # fastmemcpy check is done earlier with tests of CPU & binutils features
 if test "$_fastmemcpy" = yes ; then
-  _def_fastmemcpy='#define USE_FASTMEMCPY 1'
-else
-  _def_fastmemcpy='#undef USE_FASTMEMCPY'
+  _def_fastmemcpy='#define CONFIG_FASTMEMCPY 1'
+else
+  _def_fastmemcpy='#undef CONFIG_FASTMEMCPY'
 fi
 echores "$_fastmemcpy"
 
@@ -6879,19 +6879,19 @@
     mingw32 && _unrar_exec="no"
 fi
 if test "$_unrar_exec" = yes ; then
-    _def_unrar_exec='#define USE_UNRAR_EXEC 1'
-else
-    _def_unrar_exec='#undef USE_UNRAR_EXEC'
+    _def_unrar_exec='#define CONFIG_UNRAR_EXEC 1'
+else
+    _def_unrar_exec='#undef CONFIG_UNRAR_EXEC'
 fi
 echores "$_unrar_exec"
 
 echocheck "TV interface"
 if test "$_tv" = yes ; then
-  _def_tv='#define USE_TV 1'
+  _def_tv='#define CONFIG_TV 1'
   _inputmodules="tv $_inputmodules"
 else
   _noinputmodules="tv $_noinputmodules"
-  _def_tv='#undef USE_TV'
+  _def_tv='#undef CONFIG_TV'
 fi
 echores "$_tv"
 
@@ -7079,21 +7079,21 @@
 
 echocheck "Radio interface"
 if test "$_radio" = yes ; then
-  _def_radio='#define USE_RADIO 1'
+  _def_radio='#define CONFIG_RADIO 1'
   _inputmodules="radio $_inputmodules"
   if test "$_alsa9" != yes -a "$_alsa1x" != yes -a "$_ossaudio" != yes ; then
     _radio_capture=no
   fi
   if test "$_radio_capture" = yes ; then
     _audio_input=yes
-    _def_radio_capture="#define USE_RADIO_CAPTURE 1"
+    _def_radio_capture="#define CONFIG_RADIO_CAPTURE 1"
   else
-    _def_radio_capture="#undef USE_RADIO_CAPTURE"
+    _def_radio_capture="#undef CONFIG_RADIO_CAPTURE"
   fi
 else
   _noinputmodules="radio $_noinputmodules"
-  _def_radio='#undef USE_RADIO'
-  _def_radio_capture="#undef USE_RADIO_CAPTURE"
+  _def_radio='#undef CONFIG_RADIO'
+  _def_radio_capture="#undef CONFIG_RADIO_CAPTURE"
   _radio_capture=no
 fi
 echores "$_radio"
@@ -7269,9 +7269,9 @@
 
 echocheck "Subtitles sorting"
 if test "$_sortsub" = yes ; then
-    _def_sortsub='#define USE_SORTSUB 1'
-else
-    _def_sortsub='#undef USE_SORTSUB'
+    _def_sortsub='#define CONFIG_SORTSUB 1'
+else
+    _def_sortsub='#undef CONFIG_SORTSUB'
 fi
 echores "$_sortsub"
 
@@ -7630,12 +7630,12 @@
 fi
 if test "$_dvdnav" = yes ; then
   _largefiles=yes
-  _def_dvdnav='#define USE_DVDNAV 1'
+  _def_dvdnav='#define CONFIG_DVDNAV 1'
   _inc_extra="$_inc_extra `$_dvdnavconfig --cflags`"
   _ld_extra="$_ld_extra `$_dvdnavconfig --minilibs`"
   _inputmodules="dvdnav $_inputmodules"
 else
-  _def_dvdnav='#undef USE_DVDNAV'
+  _def_dvdnav='#undef CONFIG_DVDNAV'
   _noinputmodules="dvdnav $_noinputmodules"
 fi
 echores "$_dvdnav"
@@ -8105,7 +8105,7 @@
    -stereo has three possible values (0 for stereo, 1 for left-only, 2 for
    right-only), with 0 being the default.
    */
-#define USE_FAKE_MONO 1
+#define CONFIG_FAKE_MONO 1
 
 /* Undefine this if your sound card driver has no working select().
    If you have kernel Oops, player hangups, or just no audio, you should
--- a/get_path.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/get_path.c	Wed Jul 30 12:01:30 2008 +0000
@@ -140,7 +140,7 @@
 	return buff;
 }
 
-#if defined(WIN32) && defined(USE_WIN32DLL)
+#if defined(WIN32) && defined(CONFIG_WIN32DLL)
 void set_path_env()
 {
 	/*make our codec dirs available for LoadLibraryA()*/
@@ -150,10 +150,10 @@
 #ifdef __CYGWIN__
 	cygwin_conv_to_full_win32_path(WIN32_PATH,win32path);
 	strcpy(tmppath,win32path);
-#ifdef USE_REALCODECS
+#ifdef CONFIG_REALCODECS
 	cygwin_conv_to_full_win32_path(REALCODEC_PATH,realpath);
 	sprintf(tmppath,"%s;%s",win32path,realpath);
-#endif /*USE_REALCODECS*/
+#endif /*CONFIG_REALCODECS*/
 #else /*__CYGWIN__*/
 	/* Expand to absolute path unless it's already absolute */
 	if (!strstr(WIN32_PATH,":") && WIN32_PATH[0] != '\\'){
@@ -162,7 +162,7 @@
 	}
 	else strcpy(win32path,WIN32_PATH);
 	strcpy(tmppath,win32path);
-#ifdef USE_REALCODECS
+#ifdef CONFIG_REALCODECS
 	/* Expand to absolute path unless it's already absolute */
 	if (!strstr(REALCODEC_PATH,":") && REALCODEC_PATH[0] != '\\'){
 		GetModuleFileNameA(NULL, realpath, MAX_PATH);
@@ -170,10 +170,10 @@
 	}
 	else strcpy(realpath,REALCODEC_PATH);
 	sprintf(tmppath,"%s;%s",win32path,realpath);
-#endif /*USE_REALCODECS*/
+#endif /*CONFIG_REALCODECS*/
 #endif /*__CYGWIN__*/
 	mp_msg(MSGT_WIN32, MSGL_V,"Setting PATH to %s\n",tmppath);
 	if (!SetEnvironmentVariableA("PATH", tmppath))
 		mp_msg(MSGT_WIN32, MSGL_WARN, "Cannot set PATH!");
 }
-#endif /*WIN32 && USE_WIN32DLL*/
+#endif /*WIN32 && CONFIG_WIN32DLL*/
--- a/gui/cfg.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/gui/cfg.c	Wed Jul 30 12:01:30 2008 +0000
@@ -45,7 +45,7 @@
 int    gtkEnableAudioEqualizer = 0;
 
 int    gtkVfPP = 0;
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
  int    gtkVfLAVC = 0;
 #endif
 
@@ -53,7 +53,7 @@
 int    gtkAOSurround = 0;
 int    gtkAOExtraStereo = 0;
 float  gtkAOExtraStereoMul = 1.0;
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
 char * gtkAOOSSMixer;
 char * gtkAOOSSMixerChannel;
 char * gtkAOOSSDevice;
@@ -66,7 +66,7 @@
 #ifdef HAVE_SDL
 char * gtkAOSDLDriver;
 #endif
-#ifdef USE_ESD
+#ifdef CONFIG_ESD
 char * gtkAOESDDevice;
 #endif
 
@@ -93,7 +93,7 @@
 int    gui_sub_pos_x = -1;
 int    gui_sub_pos_y = -1;
 
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
 gtkASS_t gtkASS;
 #endif
 // ---
@@ -124,7 +124,7 @@
 
  { "vf_pp",&gtkVfPP,CONF_TYPE_FLAG,0,0,1,NULL },
  { "vf_autoq",&auto_quality,CONF_TYPE_INT,CONF_RANGE,0,100,NULL },
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
  { "vf_lavc",&gtkVfLAVC,CONF_TYPE_FLAG,0,0,1,NULL },
 #endif
 
@@ -134,7 +134,7 @@
  { "ao_surround",&gtkAOSurround,CONF_TYPE_FLAG,0,0,1,NULL },
  { "ao_extra_stereo",&gtkAOExtraStereo,CONF_TYPE_FLAG,0,0,1,NULL },
  { "ao_extra_stereo_coefficient",&gtkAOExtraStereoMul,CONF_TYPE_FLOAT,CONF_RANGE,-10,10,NULL },
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
  { "ao_oss_mixer",&gtkAOOSSMixer,CONF_TYPE_STRING,0,0,0,NULL },
  { "ao_oss_mixer_channel",&gtkAOOSSMixerChannel,CONF_TYPE_STRING,0,0,0,NULL },
  { "ao_oss_device",&gtkAOOSSDevice,CONF_TYPE_STRING,0,0,0,NULL },
@@ -147,7 +147,7 @@
 #ifdef HAVE_SDL
  { "ao_sdl_subdriver",&gtkAOSDLDriver,CONF_TYPE_STRING,0,0,0,NULL },
 #endif
-#ifdef USE_ESD
+#ifdef CONFIG_ESD
  { "ao_esd_device",&gtkAOESDDevice,CONF_TYPE_STRING,0,0,0,NULL },
 #endif
 
@@ -157,7 +157,7 @@
  { "osd_level",&osd_level,CONF_TYPE_INT,CONF_RANGE,0,3,NULL },
  { "sub_auto_load",&sub_auto,CONF_TYPE_FLAG,0,0,1,NULL },
  { "sub_unicode",&sub_unicode,CONF_TYPE_FLAG,0,0,1,NULL },
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
  { "ass_enabled",&ass_enabled,CONF_TYPE_FLAG,0,0,1,NULL },
  { "ass_use_margins",&ass_use_margins,CONF_TYPE_FLAG,0,0,1,NULL },
  { "ass_top_margin",&ass_top_margin,CONF_TYPE_INT,CONF_RANGE,0,512,NULL },
@@ -165,7 +165,7 @@
 #endif
  { "sub_pos",&sub_pos,CONF_TYPE_INT,CONF_RANGE,0,200,NULL },
  { "sub_overlap",&suboverlap_enabled,CONF_TYPE_FLAG,0,0,0,NULL },
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
  { "sub_cp",&sub_cp,CONF_TYPE_STRING,0,0,0,NULL },
 #endif
  { "font_factor",&font_factor,CONF_TYPE_FLOAT,CONF_RANGE,0.0,10.0,NULL },
--- a/gui/cfg.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/gui/cfg.h	Wed Jul 30 12:01:30 2008 +0000
@@ -63,7 +63,7 @@
 extern int    gui_sub_pos_x;
 extern int    gui_sub_pos_y;
 
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
 typedef struct {
     int enabled;
     int use_margins;
--- a/gui/interface.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/gui/interface.c	Wed Jul 30 12:01:30 2008 +0000
@@ -51,7 +51,7 @@
 
 extern af_cfg_t af_cfg;
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 #include <iconv.h>
 #endif
 
@@ -60,7 +60,7 @@
 #include "libmpdemux/stheader.h"
 #include "libmpcodecs/dec_video.h"
 
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 #include "stream/stream_dvd.h"
 #endif
 
@@ -192,7 +192,7 @@
  else if ( stream_cache_size == 0 ) gtkCacheOn = 0;
  if ( autosync && autosync != gtkAutoSync ) { gtkAutoSyncOn=1; gtkAutoSync=autosync; }
    
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
  gtkASS.enabled = ass_enabled;
  gtkASS.use_margins = ass_use_margins;
  gtkASS.top_margin = ass_top_margin;
@@ -370,7 +370,7 @@
    gui_sub_pos_x=appMPlayer.subWindow.X; gui_sub_pos_y=appMPlayer.subWindow.Y;
   }
  
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
  ass_enabled = gtkASS.enabled;
  ass_use_margins = gtkASS.use_margins;
  ass_top_margin = gtkASS.top_margin;
@@ -528,7 +528,7 @@
   mixer_t *mixer = NULL;
 
  stream_t * stream = (stream_t *) arg;
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
  dvd_priv_t * dvdp = (dvd_priv_t *) arg;
 #endif 
 
@@ -592,7 +592,7 @@
             wsMoveWindow( &appMPlayer.mainWindow,0,0, vo_dheight);
          }
 	break;
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
    case guiSetDVD:
         guiIntfStruct.DVD.titles=dvdp->vmg_file->tt_srpt->nr_of_srpts;
         guiIntfStruct.DVD.chapters=dvdp->vmg_file->tt_srpt->title[dvd_title].nr_of_ptts;
@@ -611,7 +611,7 @@
 	guiIntfStruct.StreamType=stream->type;
 	switch( stream->type )
 	 {
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 	  case STREAMTYPE_DVD: 
 	       guiGetEvent( guiSetDVD,(char *)stream->priv );
 	       break;
@@ -708,7 +708,7 @@
 // -- subtitle
 #ifdef HAVE_DXR3
 	if ( video_driver_list && !gstrcmp( video_driver_list[0],"dxr3" ) && guiIntfStruct.FileFormat != DEMUXER_TYPE_MPEG_PS
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
 	 && !gtkVfLAVC
 #endif
 	 )
@@ -752,7 +752,7 @@
 	       }
 	       break;
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
  	  case STREAMTYPE_DVD:
 	       {
 	        char tmp[512];
@@ -796,14 +796,14 @@
 	}
 
 #ifdef HAVE_DXR3
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
 	remove_vf( "lavc" );
 #endif
 	if ( video_driver_list && !gstrcmp( video_driver_list[0],"dxr3" ) )
 	 {
 	  if ( ( guiIntfStruct.StreamType != STREAMTYPE_DVD)&&( guiIntfStruct.StreamType != STREAMTYPE_VCD ) )
 	   {
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
 	    if ( gtkVfLAVC ) add_vf( "lavc" );
 #endif
 	   }
@@ -827,7 +827,7 @@
 	  greplace(&af_cfg.list, "extrastereo", name);
 	  free(name);
 	 }
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
 	if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"oss",3 ) )
 	 {
 	  char *tmp;
@@ -870,7 +870,7 @@
 	  free(tmp);
 	 }
 #endif
-#ifdef USE_ESD
+#ifdef CONFIG_ESD
 	if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"esd",3 ) )
 	 {
 	  char *tmp;
@@ -903,7 +903,7 @@
         guiIntfStruct.FilenameChanged=0;
         guiIntfStruct.NewPlay=0;
 
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
         ass_enabled = gtkASS.enabled;
         ass_use_margins = gtkASS.use_margins;
         ass_top_margin = gtkASS.top_margin;
@@ -1107,7 +1107,7 @@
 	guiLoadFont();
 	return NULL;
 #endif
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
    case gtkSetSubEncoding:
 	gfree( (void **)&sub_cp );
 	sub_cp=gstrdup( (char *)vparam );
@@ -1122,7 +1122,7 @@
 	  gfree( (void **)&guiIntfStruct.AudioFile );
 	  gtkSet( gtkDelPl,0,NULL );
 	 }
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 	if ( (unsigned int)vparam & guiDVD ) memset( &guiIntfStruct.DVD,0,sizeof( guiDVDStruct ) );
 #endif
 #ifdef HAVE_VCD
--- a/gui/interface.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/gui/interface.h	Wed Jul 30 12:01:30 2008 +0000
@@ -24,7 +24,7 @@
 #include "libvo/font_load.h"
 #include "cfg.h"
 
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
  #include "stream/stream.h"
 #endif
 
@@ -51,7 +51,7 @@
  char codecdll[128];
 } guiVideoStruct;
 
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 typedef struct
 {
  int titles;
@@ -83,7 +83,7 @@
    int    DiskChanged;
    int    NewPlay;
 
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
    guiDVDStruct         DVD;
    int			Title;
    int			Angle;
--- a/gui/mplayer/gtk/menu.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/gui/mplayer/gtk/menu.c	Wed Jul 30 12:01:30 2008 +0000
@@ -63,7 +63,7 @@
 #include "../pixmaps/empty.xpm"
 #include "../pixmaps/loadeaf.xpm"
 #include "../pixmaps/title.xpm"
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 #include "../pixmaps/dvd.xpm"
 #include "../pixmaps/playdvd.xpm"
 #include "../pixmaps/chapter.xpm"
@@ -377,7 +377,7 @@
          };
 #undef lng
 
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 static char * ChannelTypes[] =
 	{ "Dolby Digital","","Mpeg1","Mpeg2","PCM","","Digital Theatre System" };
 static char * ChannelNumbers[] =
@@ -424,7 +424,7 @@
 #ifdef HAVE_VCD
     AddMenuItem( window1, (const char*)playvcd_xpm, SubMenu,MSGTR_MENU_PlayVCD, evPlayVCD );
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
     AddMenuItem( window1, (const char*)playdvd_xpm, SubMenu,MSGTR_MENU_PlayDVD, evPlayDVD );
 #endif
     AddMenuItem( window1, (const char*)url_xpm, SubMenu,MSGTR_MENU_PlayURL, evSetURL );
@@ -467,7 +467,7 @@
        gtk_widget_set_sensitive( MenuItem,FALSE );
       }
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
    DVDSubMenu=AddSubMenu( window1, (const char*)dvd_xpm, Menu,MSGTR_MENU_DVD );
     AddMenuItem( window1, (const char*)playdvd_xpm, DVDSubMenu,MSGTR_MENU_PlayDisc"    ", evPlayDVD );
 //    AddMenuItem( DVDSubMenu,MSGTR_MENU_ShowDVDMenu, evNone );
--- a/gui/mplayer/gtk/opts.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/gui/mplayer/gtk/opts.c	Wed Jul 30 12:01:30 2008 +0000
@@ -133,11 +133,11 @@
 //static GtkWidget     * AutoScale;
 #endif
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 static GtkWidget     * CBSubEncoding, * ESubEncoding;
 #endif
 
-#if defined( HAVE_FREETYPE ) || defined( USE_ICONV )
+#if defined(HAVE_FREETYPE) || defined(CONFIG_ICONV)
 static struct 
 {
  char * name;
@@ -188,7 +188,7 @@
 static gboolean prHScaler( GtkWidget * widget,GdkEventMotion  * event,gpointer user_data );
 static void prToggled( GtkToggleButton * togglebutton,gpointer user_data );
 static void prCListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data );
-#if defined( HAVE_FREETYPE ) || defined( USE_ICONV )
+#if defined(HAVE_FREETYPE) || defined(CONFIG_ICONV)
 static void prEntry( GtkContainer * container,gpointer user_data );
 #endif
 
@@ -284,7 +284,7 @@
  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDumpMPSub ),gtkSubDumpMPSub );
  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDumpSrt ),gtkSubDumpSrt );
  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSubUnicode ),sub_unicode );
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBUseASS ),gtkASS.enabled );
  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBASSUseMargins ),gtkASS.use_margins );
  gtk_spin_button_set_value( (GtkSpinButton *)SBASSTopMargin,(gdouble)gtkASS.top_margin );
@@ -312,7 +312,7 @@
  if ( guiIntfStruct.Subtitlename ) gtk_entry_set_text( GTK_ENTRY( ESubtitleName ),guiIntfStruct.Subtitlename );
 #endif
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
  if ( sub_cp )
   {
    int i;
@@ -421,7 +421,7 @@
   else gtk_entry_set_text( GTK_ENTRY( prECDRomDevice ),DEFAULT_CDROM_DEVICE );
 
 // -- disables
-#ifndef USE_ASS
+#ifndef CONFIG_ASS
  gtk_widget_set_sensitive( CBUseASS,FALSE );
  gtk_widget_set_sensitive( CBASSUseMargins,FALSE );
  gtk_widget_set_sensitive( SBASSTopMargin,FALSE );
@@ -442,7 +442,7 @@
 #endif
  gtk_signal_connect( GTK_OBJECT( CBCache ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)8);
  gtk_signal_connect( GTK_OBJECT( CBAutoSync ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)9);
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
  gtk_signal_connect( GTK_OBJECT( CBUseASS ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)10);
 #endif
 
@@ -460,7 +460,7 @@
  gtk_signal_connect( GTK_OBJECT( HSFontOSDScale ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)9 );
  gtk_signal_connect( GTK_OBJECT( EFontEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),(void *)0 );
 #endif
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
  gtk_signal_connect( GTK_OBJECT( ESubEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),(void *)1 );
 #endif
  gtk_signal_connect( GTK_OBJECT( HSPPQuality ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)10 );
@@ -492,7 +492,7 @@
 #endif
 }
 
-#if defined( HAVE_FREETYPE ) || defined( USE_ICONV )
+#if defined(HAVE_FREETYPE) || defined(CONFIG_ICONV)
 static void prEntry( GtkContainer * container,gpointer user_data )
 {	
  const char * comment;
@@ -508,7 +508,7 @@
 	if ( lEncoding[i].comment ) gtkSet( gtkSetFontEncoding,0,lEncoding[i].name );
 	break;
 #endif
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
    case 1: // sub encoding
         comment=gtk_entry_get_text( GTK_ENTRY( ESubEncoding ) );
         for ( i=0;lEncoding[i].name;i++ )
@@ -563,7 +563,7 @@
 	gtkSubDumpMPSub=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDumpMPSub ) );
 	gtkSubDumpSrt=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDumpSrt ) );
 	sub_unicode=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubUnicode ) );
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
 	gtkASS.enabled=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBUseASS ) );
 	gtkASS.use_margins=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBASSUseMargins ) );
 	gtkASS.top_margin=gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( SBASSTopMargin ) );
@@ -751,7 +751,7 @@
 	if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBAutoSync ) ) ) gtk_widget_set_sensitive( SBAutoSync,TRUE );
 	 else gtk_widget_set_sensitive( SBAutoSync,FALSE );
 	break;
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
    case 10:
 	if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBUseASS ) ) )
 	 {
@@ -1030,7 +1030,7 @@
   label=AddLabel( MSGTR_PREFERENCES_SUB_FPS,NULL );
     gtk_table_attach( GTK_TABLE( table1 ),label,0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
   label=AddLabel( MSGTR_PREFERENCES_FontEncoding,NULL );
     gtk_table_attach( GTK_TABLE( table1 ),label,0,1,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
 #endif
@@ -1051,7 +1051,7 @@
     gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( HSSubFPS ),TRUE );
     gtk_table_attach( GTK_TABLE( table1 ),HSSubFPS,1,2,2,3,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
   CBSubEncoding=gtk_combo_new();
   gtk_widget_set_name( CBSubEncoding,"CBSubEncoding" );
   gtk_widget_show( CBSubEncoding );
@@ -1373,7 +1373,7 @@
   return Preferences;
 }
 
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
 GList *appendOSSDevices(GList *l) {
   // careful! the current implementation allows only string constants!
   l = g_list_append(l, (gpointer)"/dev/dsp");
@@ -1462,7 +1462,7 @@
 }
 #endif
 
-#ifdef USE_ESD
+#ifdef CONFIG_ESD
 GList *appendESDDevices(GList *l) {
   l = g_list_append(l, (gpointer)"Enter Remote IP");
   l = g_list_append(l, (gpointer)"Use Software Mixer");
@@ -1503,7 +1503,7 @@
   if (AudioConfig) gtkActive(AudioConfig);
   else AudioConfig = create_AudioConfig();
 
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
   if (strncmp(ao_driver[0], "oss", 3) == 0) {
     setGtkEntryText(CEAudioDevice, gtkAOOSSDevice);
     setGtkEntryText(CEAudioMixer, gtkAOOSSMixer);
@@ -1522,7 +1522,7 @@
     setGtkEntryText(CEAudioDevice, gtkAOSDLDriver);
   }
 #endif
-#ifdef USE_ESD
+#ifdef CONFIG_ESD
   if (strncmp(ao_driver[0], "esd", 3) == 0) {
     setGtkEntryText(CEAudioDevice, gtkAOESDDevice);
   }
@@ -1542,7 +1542,7 @@
 static void audioButton(GtkButton *button, gpointer user_data) {
   switch( (int)user_data ) {
     case 1:
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
       if (strncmp(ao_driver[0], "oss", 3) == 0) {
         gfree(&gtkAOOSSDevice);
         gtkAOOSSDevice = gstrdup(getGtkEntryText(CEAudioDevice));
@@ -1568,7 +1568,7 @@
         gtkAOSDLDriver = gstrdup(getGtkEntryText(CEAudioDevice));
       }
 #endif
-#ifdef USE_ESD
+#ifdef CONFIG_ESD
       if (strncmp(ao_driver[0], "esd", 3) == 0) {
         gfree(&gtkAOESDDevice);
         gtkAOESDDevice = gstrdup(getGtkEntryText(CEAudioDevice));
@@ -1612,7 +1612,7 @@
   CBAudioDevice = AddComboBox(NULL);
   gtk_table_attach(GTK_TABLE(table), CBAudioDevice, 1, 2, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0);
   items = g_list_append(items,(gpointer)MSGTR_PREFERENCES_DriverDefault);
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
   if (strncmp(ao_driver[0], "oss", 3) == 0)
     items = appendOSSDevices(items);
 #endif
@@ -1624,7 +1624,7 @@
   if (strncmp(ao_driver[0], "sdl", 3) == 0)
     items = appendSDLDevices(items);
 #endif
-#ifdef USE_ESD
+#ifdef CONFIG_ESD
   if (strncmp(ao_driver[0], "esd", 3) == 0)
     items = appendESDDevices(items);
 #endif
@@ -1642,7 +1642,7 @@
   CBAudioMixer = AddComboBox(NULL);
   gtk_table_attach(GTK_TABLE(table), CBAudioMixer, 1, 2, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0);
   items = g_list_append(items, (gpointer)MSGTR_PREFERENCES_DriverDefault);
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
   if (strncmp(ao_driver[0], "oss", 3) == 0)
     items = appendOSSMixers(items);
 #endif
@@ -1664,7 +1664,7 @@
   CBAudioMixerChannel = AddComboBox(NULL);
   gtk_table_attach(GTK_TABLE(table), CBAudioMixerChannel, 1, 2, 2, 3, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0);
   items = g_list_append(items, (gpointer)MSGTR_PREFERENCES_DriverDefault);
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
   if (strncmp(ao_driver[0], "oss", 3) == 0)
     items = appendOSSMixerChannels(items);
 #endif
@@ -1707,7 +1707,7 @@
 static GtkWidget * CBDevice;
 static GtkWidget * CEDXR3Device;
 static GtkWidget * RBVNone;
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
  static GtkWidget * RBVLavc;
 #endif
 static GtkWidget * dxr3BOk;
@@ -1723,7 +1723,7 @@
  gtk_entry_set_text( GTK_ENTRY( CEDXR3Device ),gtkDXR3Device );
 
  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBVNone ),TRUE );
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
  if ( gtkVfLAVC ) gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBVLavc ),TRUE );
 #endif
 
@@ -1745,7 +1745,7 @@
  {
   case 0: // Ok
        gfree( (void **)&gtkDXR3Device ); gtkDXR3Device=strdup( gtk_entry_get_text( GTK_ENTRY( CEDXR3Device ) ) );
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
        gtkVfLAVC=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBVLavc ) );
 #endif
   case 1: // Cancel
@@ -1800,7 +1800,7 @@
  gtk_widget_show( CEDXR3Device );
  gtk_entry_set_text( GTK_ENTRY( CEDXR3Device ),"/dev/em8300" );
 
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
  AddHSeparator( vbox2 );
  vbox3=AddVBox( vbox2,0 );
  AddLabel( MSGTR_PREFERENCES_DXR3_VENC,vbox3 );
--- a/gui/mplayer/gui_common.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/gui/mplayer/gui_common.c	Wed Jul 30 12:01:30 2008 +0000
@@ -71,7 +71,7 @@
             if ( tmp[strlen( tmp ) - 5] == '.' ) tmp[strlen( tmp ) - 5]=0;
            } else av_strlcpy( tmp,MSGTR_NoFileLoaded,tmplen );
           break;
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
    case STREAMTYPE_DVD:
           if ( guiIntfStruct.DVD.current_chapter ) snprintf(tmp,tmplen,MSGTR_Chapter,guiIntfStruct.DVD.current_chapter );
             else av_strlcat( tmp,MSGTR_NoChapter,tmplen );
@@ -178,7 +178,7 @@
              case STREAMTYPE_VCD:    av_strlcat( trbuf,"v",sizeof( trbuf ) ); break;
 #endif
              case STREAMTYPE_STREAM: av_strlcat( trbuf,"u",sizeof( trbuf ) ); break;
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
              case STREAMTYPE_DVD:    av_strlcat( trbuf,"d",sizeof( trbuf ) ); break;
 #endif
              default:                av_strlcat( trbuf," ",sizeof( trbuf ) ); break;
--- a/gui/mplayer/mw.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/gui/mplayer/mw.c	Wed Jul 30 12:01:30 2008 +0000
@@ -136,7 +136,7 @@
 	guiIntfStruct.StreamType=STREAMTYPE_VCD;
 	goto play;
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
    case evPlayDVD:
         guiIntfStruct.DVD.current_title=1;
         guiIntfStruct.DVD.current_chapter=1;
@@ -181,7 +181,7 @@
 		}
 	       break;
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
           case STREAMTYPE_DVD:
 	       gtkSet( gtkClearStruct,0,(void *)(guiALL - guiDVD - guiFilenames) );
 	       if ( !dvd_device ) dvd_device=gstrdup( DEFAULT_DVD_DEVICE );
@@ -199,7 +199,7 @@
 	guiIntfStruct.NewPlay=1;
         mplPlay();
         break;
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
    case evSetDVDSubtitle:
         dvdsub_id=iparam;
         goto play_dvd_2;
@@ -356,7 +356,7 @@
 	  default: movie_aspect=-1;
 	 }
 	wsClearWindow( appMPlayer.subWindow );
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 	if ( guiIntfStruct.StreamType == STREAMTYPE_DVD || guiIntfStruct.StreamType == STREAMTYPE_VCD ) goto play_dvd_2;
 	 else 
 #endif
--- a/gui/mplayer/play.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/gui/mplayer/play.c	Wed Jul 30 12:01:30 2008 +0000
@@ -104,7 +104,7 @@
      guiIntfStruct.AudioType=0;
      guiIntfStruct.NoWindow=False;
 
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
      guiIntfStruct.DVD.current_title=1;
      guiIntfStruct.DVD.current_chapter=1;
      guiIntfStruct.DVD.current_angle=1;
@@ -292,7 +292,7 @@
  if ( guiIntfStruct.Playing == 2 ) return;
  switch ( guiIntfStruct.StreamType )
   {
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
    case STREAMTYPE_DVD:
 	break;
 #endif
@@ -322,7 +322,7 @@
  if ( guiIntfStruct.Playing == 2 ) return;
  switch ( guiIntfStruct.StreamType )
   {
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
    case STREAMTYPE_DVD:
 	if ( --guiIntfStruct.DVD.current_chapter == 0 )
 	 {
@@ -358,7 +358,7 @@
  if ( guiIntfStruct.Playing == 2 ) return;
  switch ( guiIntfStruct.StreamType )
   {
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
    case STREAMTYPE_DVD:
 	if ( guiIntfStruct.DVD.current_chapter++ == guiIntfStruct.DVD.chapters )
 	 {
--- a/gui/win32/dialogs.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/gui/win32/dialogs.c	Wed Jul 30 12:01:30 2008 +0000
@@ -778,7 +778,7 @@
    UpdateWindow(hWnd);
 }
 
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 static LRESULT CALLBACK TitleChapterWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
 {
     static HWND title;
--- a/gui/win32/gui.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/gui/win32/gui.c	Wed Jul 30 12:01:30 2008 +0000
@@ -407,7 +407,7 @@
                 case ID_NTRACK:
                     handlemsg(hWnd, evNext);
                     break;
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
                 case ID_CHAPTERSEL:
                     display_chapterselwindow(gui);
                     break;
@@ -1005,7 +1005,7 @@
                             sprintf(searchpath, "%sVIDEO_TS", device + pos);
                             if(GetFileAttributes(searchpath) != INVALID_FILE_ATTRIBUTES)
                             {
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
                                 if (dvd_device) free(dvd_device);
                                 dvd_device = strdup(device + pos);
                                 dvd_title = dvd_chapter = dvd_angle = 1;
@@ -1211,7 +1211,7 @@
     AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT) gui->aspectmenu, "Aspect Ratio");
     AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT) gui->subtitlemenu, "Subtitle Options");
     AppendMenu(gui->submenu, MF_STRING | MF_POPUP, (UINT) gui->dvdmenu, "DVD Options");
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
     AppendMenu(gui->dvdmenu, MF_STRING | MF_GRAYED, ID_CHAPTERSEL, "Select Title/Chapter...");
 #endif
     AppendMenu(gui->subtitlemenu, MF_STRING, IDSUB_TOGGLE, "Subtitle Visibility On/Off");
--- a/gui/win32/interface.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/gui/win32/interface.c	Wed Jul 30 12:01:30 2008 +0000
@@ -32,7 +32,7 @@
 #include "stream/stream.h"
 #include "libmpdemux/demuxer.h"
 #include "libmpdemux/stheader.h"
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 #include "stream/stream_dvd.h"
 #endif
 #include "input/input.h"
@@ -151,7 +151,7 @@
         case evPause:
             mplPause();
             break;
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
         case evPlayDVD:
         {
             static char dvdname[MAX_PATH];
@@ -273,7 +273,7 @@
         {
             switch(guiIntfStruct.StreamType)
             {
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
                 case STREAMTYPE_DVD:
                 {
                     guiIntfStruct.Title = guiIntfStruct.DVD.current_title;
@@ -337,7 +337,7 @@
     if(guiIntfStruct.Playing == 2) return;
     switch(guiIntfStruct.StreamType)
     {
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
         case STREAMTYPE_DVD:
             if(guiIntfStruct.DVD.current_chapter == (guiIntfStruct.DVD.chapters - 1))
                 return;
@@ -359,7 +359,7 @@
     if(guiIntfStruct.Playing == 2) return;
     switch(guiIntfStruct.StreamType)
     {
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
         case STREAMTYPE_DVD:
             if(guiIntfStruct.DVD.current_chapter == 1)
                 return;
@@ -405,7 +405,7 @@
     guiIntfStruct.Position = 0;
     guiIntfStruct.AudioType = 0;
 
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
     guiIntfStruct.DVD.current_title = 1;
     guiIntfStruct.DVD.current_chapter = 1;
     guiIntfStruct.DVD.current_angle = 1;
@@ -521,7 +521,7 @@
 int guiGetEvent(int type, char *arg)
 {
     stream_t *stream = (stream_t *) arg;
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
     dvd_priv_t *dvdp = (dvd_priv_t *) arg;
 #endif
     if(!mygui || !mygui->skin) return 0;
@@ -549,7 +549,7 @@
             {
                 case STREAMTYPE_PLAYLIST:
                     break;
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
                 case STREAMTYPE_DVD:
                 {
                     char tmp[512];
@@ -614,7 +614,7 @@
             guiIntfStruct.StreamType = stream->type;
             switch(stream->type)
             {
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
                 case STREAMTYPE_DVD:
                     guiGetEvent(guiSetDVD, (char *) stream->priv);
                     break;
@@ -622,7 +622,7 @@
             }
             break;
         }
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
         case guiSetDVD:
         {
             guiIntfStruct.DVD.titles = dvdp->vmg_file->tt_srpt->nr_of_srpts;
--- a/gui/win32/widgetrender.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/gui/win32/widgetrender.c	Wed Jul 30 12:01:30 2008 +0000
@@ -162,7 +162,7 @@
 
     if(guiIntfStruct.StreamType == 0)
         stringreplace(text, "$T", "f");
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
     else if(guiIntfStruct.StreamType == STREAMTYPE_DVD || guiIntfStruct.StreamType == STREAMTYPE_DVDNAV)
         stringreplace(text, "$T", "d");
 #endif
--- a/help/help_mp-bg.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-bg.h	Wed Jul 30 12:01:30 2008 +0000
@@ -15,7 +15,7 @@
 #ifdef HAVE_VCD
 " vcd://<пътечка>   пуÑка (S)VCD (Super Video CD) пътечка (без монтиране!)\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<номер>     пуÑка DVD заглавие от уÑтройÑтво, вмеÑто от файл\n"
 " -alang/-slang     избор на език за DVD аудиo/Ñубтитри (чрез 2-буквен код)\n"
 #endif
--- a/help/help_mp-cs.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-cs.h	Wed Jul 30 12:01:30 2008 +0000
@@ -15,7 +15,7 @@
 " vcd://<Ä_stopy>  pÅ™ehraje (S)VCD (Super Video CD) stopu (z nepÅ™ipojeného\n"
 "                  zařízení)\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<Ä_tit>    pÅ™ehraje DVD titul ze zařízení (mechaniky), místo ze souboru\n"
 " -alang/-slang    zvolí jazyk zvuku/titulků na DVD (dvouznakový kód země)\n"
 #endif
--- a/help/help_mp-de.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-de.h	Wed Jul 30 12:01:30 2008 +0000
@@ -22,7 +22,7 @@
 " vcd://<tracknr>  Spiele einen (S)VCD-Titel (Super Video CD) ab\n"
 "                  ( direkter Gerätezugriff, kein mount! )\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<titelnr>  Spiele DVD-Titel direkt vom Gerät anstelle einer Datei\n"
 #endif
 " -alang/-slang    Wähle DVD Audio/Untertitel Sprache (2-Zeichen-Ländercode)\n"
--- a/help/help_mp-dk.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-dk.h	Wed Jul 30 12:01:30 2008 +0000
@@ -16,7 +16,7 @@
 #ifdef HAVE_VCD
 " vcd://<spor>  afspil et VCD (Video CD) spor fra et drev i stedet for en fil\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<titelnr> afspil DVD titel fra et drev i stedet for en fil\n"
 " -alang/-slang   vælg sprog til lyd og undertekster (vha. landekode på 2 tegn)\n"
 #endif
--- a/help/help_mp-el.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-el.h	Wed Jul 30 12:01:30 2008 +0000
@@ -14,7 +14,7 @@
 #ifdef HAVE_VCD
 " vcd://<αÏιθμός track>  αναπαÏαγωγή track VCD (video cd)  από συσκευή αντί για αÏχείο\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<titleno>  αναπαÏαγωγή του τίτλου/track DVD από τη συσκευή αντί για αÏχείο\n"
 " -alang/-slang   επιλογή της γλώσσας του ήχου/υποτίτλων του DVD (2 χαÏακτήÏες του ÎºÏ‰Î´Î¹ÎºÎ¿Ï Ï„Î·Ï‚ χώÏας)\n"
 #endif
--- a/help/help_mp-en.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-en.h	Wed Jul 30 12:01:30 2008 +0000
@@ -22,7 +22,7 @@
 #ifdef HAVE_VCD
 " vcd://<trackno>  play (S)VCD (Super Video CD) track (raw device, no mount)\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<titleno>  play DVD title from device instead of plain file\n"
 #endif
 " -alang/-slang    select DVD audio/subtitle language (by 2-char country code)\n"
--- a/help/help_mp-es.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-es.h	Wed Jul 30 12:01:30 2008 +0000
@@ -25,7 +25,7 @@
 #ifdef HAVE_VCD
 " vcd://<numpista>      Reproducir pista de (S)VCD (Super Video CD) (acceso directo al dispositivo, no montado)\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<número>        Reproducir título o pista de DVD desde un dispositivo en vez de un archivo regular.\n"
 " -alang <lengua>      Seleccionar lengua para el audio del DVD (con código de país de dos caracteres. p. ej. 'es').\n"
 " -alang <lengua>      Seleccionar lengua para los subtítulos del DVD.\n"
--- a/help/help_mp-fr.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-fr.h	Wed Jul 30 12:01:30 2008 +0000
@@ -17,7 +17,7 @@
 #ifdef HAVE_VCD
 " vcd://<n°piste>  lit piste (S)VCD (Super Video CD) (périf. brut, non-monté)\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<n°titre>  lit titre DVD du périf. plutôt que d'un fichier\n"
 " -alang/-slang    langue audio/sous-titres du DVD (code pays 2 lettres)\n"
 #endif
--- a/help/help_mp-hu.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-hu.h	Wed Jul 30 12:01:30 2008 +0000
@@ -18,7 +18,7 @@
 #ifdef HAVE_VCD
 " vcd://<sávszám>  (S)VCD (Super Video CD) sáv lejátszás (nyers, nincs mount)\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<titleno>  a megadott DVD sáv lejátszása, fájl helyett\n"
 #endif
 " -alang/-slang    DVD audio/felirat nyelv kiválasztása (2 betűs országkóddal)\n"
--- a/help/help_mp-it.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-it.h	Wed Jul 30 12:01:30 2008 +0000
@@ -16,7 +16,7 @@
 #ifdef HAVE_VCD
 " vcd://<trackno>  legge (S)VCD (Super Video CD) (dispositivo raw, non montato)\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<titleno>  legge titolo/traccia DVD dal dispositivo anziché da file\n"
 " -alang/-slang    sceglie lingua audio/sottotitoli DVD (cod naz. 2 caratteri)\n"
 #endif
--- a/help/help_mp-ja.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-ja.h	Wed Jul 30 12:01:30 2008 +0000
@@ -15,7 +15,7 @@
 #ifdef HAVE_VCD
 " vcd://<trackno>   play VCD (Video CD) track from device instead of plain file\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<titleno>   play DVD title from device instead of plain file\n"
 " -alang/-slang    DVD㮠音声/サブタイトル 言語設定 (2文字ã®ã‚«ãƒ³ãƒˆãƒªãƒ¼ã‚³ãƒ¼ãƒ‰ã§æŒ‡å®š)\n"
 #endif
--- a/help/help_mp-ko.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-ko.h	Wed Jul 30 12:01:30 2008 +0000
@@ -13,7 +13,7 @@
 #ifdef HAVE_VCD
 " vcd://<trackno>  (S)VCD (Super Video CD) 트랙 ìž¬ìƒ (장치로부터, 마운트 ì—†ì´)\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<titleno>  ì¼ë°˜ 파ì¼ì´ ì•„ë‹Œ 장치로부터 DVD 타ì´í‹€ 재ìƒ\n"
 " -alang/-slang    DVD 오디오/ìžë§‰ 언어 ì„ íƒ (ë‘ ê¸€ìžì˜ êµ­ê°€ 코드)\n"
 #endif
--- a/help/help_mp-mk.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-mk.h	Wed Jul 30 12:01:30 2008 +0000
@@ -14,7 +14,7 @@
 #ifdef HAVE_VCD
 " vcd://<trackno>   пушта VCD (Video CD) од уред намеÑто од датотека\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<titleno>   пушта DVD наÑлови од уред намеÑто од датотека\n"
 " -alang/-slang    избира јазик на DVD аудио/превод (од 2-char код на државата)\n"
 #endif
--- a/help/help_mp-nb.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-nb.h	Wed Jul 30 12:01:30 2008 +0000
@@ -11,7 +11,7 @@
 " -vo <drv[:dev]> velg video-ut driver og enhet (se '-vo help' for liste)\n"
 " -ao <drv[:dev]> velg lyd-ut driver og enhet (se '-ao help' for liste)\n"
 " vcd://<sporno>   spill VCD (video cd) spor fra enhet i stedet for fil\n"
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<tittelno> spill DVD tittel/spor fra enhet i stedet for fil\n"
 #endif
 " -ss <timepos>   søk til gitt (sekunder eller hh:mm:ss) posisjon\n"
--- a/help/help_mp-nl.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-nl.h	Wed Jul 30 12:01:30 2008 +0000
@@ -12,7 +12,7 @@
 #ifdef HAVE_VCD
 " vcd://<trackno>   speel VCD (Video CD) track van cdrom in plaats van standaard bestand\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<titelnr>   speel DVD titel/track van device in plaats van gewoon bestand\n"
 " -alang/-slang    selecteer DVD audio/ondertitelingstaal (door middel van 2-karakter landcode)\n"
 #endif
--- a/help/help_mp-pl.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-pl.h	Wed Jul 30 12:01:30 2008 +0000
@@ -15,7 +15,7 @@
 #ifdef HAVE_VCD
 " vcd://<numer_ścieżki>  odtwórz ścieżkę (S)VCD (Super Video CD) (bezpośrednio, bez montowania)\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<tytuł>    odtwórz tytuł DVD z urządzenia zamiast pliku\n"
 " -alang/-slang    wybierz język napisów/ścieżki dźwiękowej (dwuliterowy kod kraju)\n"
 #endif
--- a/help/help_mp-pt_BR.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-pt_BR.h	Wed Jul 30 12:01:30 2008 +0000
@@ -18,7 +18,7 @@
 " vcd://<numtrilha> reproduz trilha de VCD (Video CD) do dispositivo em vez de um\n"
 "                 arquivo\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<numtítilo> reproduz título de DVD do dispositivo em vez de um arquivo\n"
 " -alang/-slang   seleciona o idioma/legenda do DVD (pelo código país de duas\n"
 "                 letras)\n"
--- a/help/help_mp-ro.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-ro.h	Wed Jul 30 12:01:30 2008 +0000
@@ -22,7 +22,7 @@
 " vcd://<nrpistã>  ruleazã pista VCD (Video CD) de pe device în loc de fiºier\n"
 #endif
 
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<nrtitlu>  ruleazã titlul/pista de pe dispozitivul DVD în loc de fiºier\n"
 " -aLMB/-sLMB      alege limba pentru audio/subtitrãri DVD\n"
 "                  (cu codul de 2 caractere, ex. RO)\n"
--- a/help/help_mp-ru.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-ru.h	Wed Jul 30 12:01:30 2008 +0000
@@ -16,7 +16,7 @@
 #ifdef HAVE_VCD
 " vcd://<номер трека> играть дорожку (S)VCD (Super Video CD) (указывайте уÑтройÑтво,\n                 не монтируйте его)\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<номер ролика> играть DVD ролик Ñ ÑƒÑтройÑтва вмеÑто файла\n"
 " -alang/-slang   выбрать Ñзык аудио/Ñубтитров DVD (двубуквенный код Ñтраны)\n"
 #endif
--- a/help/help_mp-sk.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-sk.h	Wed Jul 30 12:01:30 2008 +0000
@@ -16,7 +16,7 @@
 #ifdef HAVE_VCD
 " vcd://<trackno>  prehrať VCD (video cd) stopu zo zariadenia namiesto zo súboru\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<titleno>  prehrať DVD titul/stopu zo zariadenia (mechaniky) namiesto súboru\n"
 " -alang/-slang   vybrať jazyk DVD zvuku/titulkov(pomocou 2-miest. kódu krajiny)\n"
 #endif
--- a/help/help_mp-sv.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-sv.h	Wed Jul 30 12:01:30 2008 +0000
@@ -13,7 +13,7 @@
 #ifdef HAVE_VCD
 " vcd://<spårnr>      spela (S)VCD (Super Video CD) spår (rå enhet, ingen montering)\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<titlenr>     spela DVD titel från enhet istället för ifrån en enkel fil\n"
 " -alang/-slang       välj DVD audio/textningsspråk (m.h.a. ett 2-teckens landskod)\n"
 #endif
--- a/help/help_mp-tr.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-tr.h	Wed Jul 30 12:01:30 2008 +0000
@@ -16,7 +16,7 @@
 #ifdef HAVE_VCD
 " vcd://<parçano>    (S)VCD (Süper Video CD) parça numarasını oynatır (sade aygıtı kullan, sisteme takma)\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<başlıkno>   Dosya yerine aygıttan DVD başlığını oynatır.\n"
 " -alang/-slang      DVD ses/altyazı dili seçer (2 karakterli ülke kodu ile)\n"
 #endif
--- a/help/help_mp-uk.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-uk.h	Wed Jul 30 12:01:30 2008 +0000
@@ -13,7 +13,7 @@
 #ifdef HAVE_VCD
 " vcd://<номер треку> грати VCD (video cd) трек з приÑтрою заміÑÑ‚ÑŒ файлу\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<номер титрів> грати DVD титри/трек з приÑтрою заміÑÑ‚ÑŒ файлу\n"
 " -alang/-slang   вибрати мову DVD аудіо/Ñубтитрів (двоÑимвольний код країни)\n"
 #endif
--- a/help/help_mp-zh_CN.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-zh_CN.h	Wed Jul 30 12:01:30 2008 +0000
@@ -26,7 +26,7 @@
 #ifdef HAVE_VCD
 " vcd://<曲目å·>   播放 (S)VCD(超级VCD)曲目(无格å¼è®¾å¤‡ï¼Œæ— éœ€è£…载)\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<标题å·>   从设备而ä¸æ˜¯ä»Žæ™®é€šæ–‡ä»¶ä¸Šæ’­æ”¾ DVD 标题\n"
 #endif
 " -alang/-slang    选择 DVD 音频/字幕的语言(使用两字符的国家代å·ï¼‰\n"
--- a/help/help_mp-zh_TW.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/help/help_mp-zh_TW.h	Wed Jul 30 12:01:30 2008 +0000
@@ -18,7 +18,7 @@
 #ifdef HAVE_VCD
 " vcd://<trackno>  播放 (S)VCD 軌迹號 (原始設備, 無需安挂)\n"
 #endif
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 " dvd://<titleno>  從設備而ä¸æ˜¯æ™®é€šæ–‡ä»¶ä¸Šæ’­æ”¾ DVD 標題號\n"
 " -alang/-slang    é¸æ“‡ DVD 音軌/字幕的語言(使用兩字符的國家代號)\n"
 #endif
--- a/input/input.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/input/input.c	Wed Jul 30 12:01:30 2008 +0000
@@ -51,7 +51,7 @@
 /// is the default value wich is used for optional arguments
 
 static const mp_cmd_t mp_cmds[] = {
-#ifdef USE_RADIO
+#ifdef CONFIG_RADIO
   { MP_CMD_RADIO_STEP_CHANNEL, "radio_step_channel", 1,  { { MP_CMD_ARG_INT ,{0}}, {-1,{0}} }},
   { MP_CMD_RADIO_SET_CHANNEL, "radio_set_channel", 1, { { MP_CMD_ARG_STRING, {0}}, {-1,{0}}  }},
   { MP_CMD_RADIO_SET_FREQ, "radio_set_freq", 1, { {MP_CMD_ARG_FLOAT,{0}}, {-1,{0}} } },
@@ -99,7 +99,7 @@
   { MP_CMD_SUB_FILE, "sub_file", 0, { { MP_CMD_ARG_INT,{-2} }, {-1,{0}} } },
   { MP_CMD_SUB_LOG, "sub_log", 0, { {-1,{0}} } },
   { MP_CMD_SUB_SCALE, "sub_scale",1, { {MP_CMD_ARG_FLOAT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
   { MP_CMD_ASS_USE_MARGINS, "ass_use_margins", 0, { {MP_CMD_ARG_INT,{-1}}, {-1,{0}} } },
 #endif
   { MP_CMD_GET_PERCENT_POS, "get_percent_pos", 0, { {-1,{0}} } },
@@ -122,7 +122,7 @@
   { MP_CMD_SWITCH_AUDIO, "switch_audio", 0, { { MP_CMD_ARG_INT,{-1} }, {-1,{0}} } },
   { MP_CMD_SWITCH_ANGLE, "switch_angle", 0, { { MP_CMD_ARG_INT,{-1} }, {-1,{0}} } },
   { MP_CMD_SWITCH_TITLE, "switch_title", 0, { { MP_CMD_ARG_INT,{-1} }, {-1,{0}} } },
-#ifdef USE_TV
+#ifdef CONFIG_TV
   { MP_CMD_TV_START_SCAN, "tv_start_scan", 0,  { {-1,{0}} }},
   { MP_CMD_TV_STEP_CHANNEL, "tv_step_channel", 1,  { { MP_CMD_ARG_INT ,{0}}, {-1,{0}} }},
   { MP_CMD_TV_STEP_NORM, "tv_step_norm",0, { {-1,{0}} }  },
@@ -170,7 +170,7 @@
   { MP_CMD_GUI_SKINBROWSER, "gui_skinbrowser", 0, { {-1,{0}} } },
 #endif
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
   { MP_CMD_DVDNAV, "dvdnav", 1, { {MP_CMD_ARG_STRING, {0}}, {-1,{0}} } },
 #endif
 
@@ -346,7 +346,7 @@
   { {  MOUSE_BTN5, 0 }, "volume 1" },
   { {  MOUSE_BTN6, 0 }, "volume -1" },
   
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
   { { KEY_KP8, 0 }, "dvdnav up" },   // up
   { { KEY_KP2, 0 }, "dvdnav down" },   // down
   { { KEY_KP4, 0 }, "dvdnav left" },   // left
@@ -415,7 +415,7 @@
   { { '_', 0 }, "step_property switch_video" },
   { { KEY_TAB, 0 }, "step_property switch_program" },
   { { 'i', 0 }, "edl_mark" },
-#ifdef USE_TV
+#ifdef CONFIG_TV
   { { 'h', 0 }, "tv_step_channel 1" },
   { { 'k', 0 }, "tv_step_channel -1" },
   { { 'n', 0 }, "tv_step_norm" },
--- a/libaf/af.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libaf/af.c	Wed Jul 30 12:01:30 2008 +0000
@@ -52,10 +52,10 @@
 #endif
    &af_info_volnorm,
    &af_info_extrastereo,
-#ifdef USE_LIBAVCODEC_A
+#ifdef CONFIG_LIBAVCODEC_A
    &af_info_lavcac3enc,
 #endif
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
    &af_info_lavcresample,
 #endif
    &af_info_sweep,
@@ -399,7 +399,7 @@
                &(s->output.rate));
       if (!af) {
         char *resampler = "resample";
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
         if ((AF_INIT_TYPE_MASK & s->cfg.force) == AF_INIT_SLOW)
           resampler = "lavcresample";
 #endif
@@ -423,7 +423,7 @@
       if ((AF_INIT_TYPE_MASK & s->cfg.force) == AF_INIT_FAST) {
         char args[32];
 	sprintf(args, "%d", s->output.rate);
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
 	if (strcmp(resampler, "lavcresample") == 0)
 	  strcat(args, ":1");
 	else
--- a/libao2/audio_out.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libao2/audio_out.c	Wed Jul 30 12:01:30 2008 +0000
@@ -48,7 +48,7 @@
 #ifdef HAVE_COREAUDIO
         &audio_out_macosx,
 #endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
         &audio_out_oss,
 #endif
 #if defined (HAVE_ALSA1X) || defined (HAVE_ALSA9)
@@ -57,23 +57,23 @@
 #ifdef HAVE_ALSA5
         &audio_out_alsa5,
 #endif
-#ifdef USE_SGI_AUDIO
+#ifdef CONFIG_SGI_AUDIO
         &audio_out_sgi,
 #endif
-#ifdef USE_SUN_AUDIO
+#ifdef CONFIG_SUN_AUDIO
         &audio_out_sun,
 #endif
 // wrappers:
-#ifdef USE_ARTS
+#ifdef CONFIG_ARTS
         &audio_out_arts,
 #endif
-#ifdef USE_ESD
+#ifdef CONFIG_ESD
         &audio_out_esd,
 #endif
-#ifdef USE_PULSE
+#ifdef CONFIG_PULSE
         &audio_out_pulse,
 #endif
-#ifdef USE_JACK
+#ifdef CONFIG_JACK
         &audio_out_jack,
 #endif
 #ifdef HAVE_NAS
@@ -82,7 +82,7 @@
 #ifdef HAVE_SDL
         &audio_out_sdl,
 #endif
-#ifdef USE_OPENAL
+#ifdef CONFIG_OPENAL
         &audio_out_openal,
 #endif
         &audio_out_mpegpes,
--- a/libass/ass.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libass/ass.c	Wed Jul 30 12:01:30 2008 +0000
@@ -32,7 +32,7 @@
 #include <unistd.h>
 #include <inttypes.h>
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 #include <iconv.h>
 #endif
 
@@ -810,7 +810,7 @@
 	free(str);
 }
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 /** \brief recode buffer to utf-8
  * constraint: codepage != 0
  * \param data pointer to text buffer
@@ -991,7 +991,7 @@
 	if (!buf)
 		return 0;
 	
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 	if (codepage)
 		buf = sub_recode(buf, bufsize, codepage);
 	if (!buf)
@@ -1017,7 +1017,7 @@
 	buf = read_file(fname, &bufsize);
 	if (!buf)
 		return 0;
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 	if (codepage) {
 		 char* tmpbuf = sub_recode(buf, bufsize, codepage);
 		 free(buf);
@@ -1071,7 +1071,7 @@
 	buf = read_file(fname, &sz);
 	if (!buf)
 		return 1;
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 	if (codepage) {
 		char* tmpbuf;
 		tmpbuf = sub_recode(buf, sz, codepage);
--- a/libass/ass_mp.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libass/ass_mp.c	Wed Jul 30 12:01:30 2008 +0000
@@ -65,7 +65,7 @@
 extern float text_font_scale_factor;
 extern int subtitle_autoscale;
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 extern char* sub_cp;
 #else
 static char* sub_cp = 0;
--- a/libmenu/menu.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmenu/menu.c	Wed Jul 30 12:01:30 2008 +0000
@@ -403,7 +403,7 @@
   }
 }
 
-#ifdef USE_FRIBIDI
+#ifdef CONFIG_FRIBIDI
 #include <fribidi/fribidi.h>
 #include "libavutil/common.h"
 char *menu_fribidi_charset = NULL;
@@ -459,7 +459,7 @@
     return;
   }
 
-#ifdef USE_FRIBIDI
+#ifdef CONFIG_FRIBIDI
   txt = menu_fribidi(txt);
 #endif
   render_txt(txt);
@@ -493,7 +493,7 @@
     return;
   }
 
-#ifdef USE_FRIBIDI
+#ifdef CONFIG_FRIBIDI
   txt = menu_fribidi(txt);
 #endif
   render_txt(txt);
--- a/libmpcodecs/ad.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpcodecs/ad.c	Wed Jul 30 12:01:30 2008 +0000
@@ -46,15 +46,15 @@
 ad_functions_t* mpcodecs_ad_drivers[] =
 {
 //  &mpcodecs_ad_null,
-#ifdef USE_MP3LIB
+#ifdef CONFIG_MP3LIB
   &mpcodecs_ad_mp3lib,
 #endif
-#ifdef USE_LIBA52
+#ifdef CONFIG_LIBA52
   &mpcodecs_ad_liba52,
   &mpcodecs_ad_hwac3,
 #endif
   &mpcodecs_ad_hwmpa,
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
   &mpcodecs_ad_ffmpeg,
 #endif
   &mpcodecs_ad_pcm,
@@ -64,13 +64,13 @@
   &mpcodecs_ad_msadpcm,
   &mpcodecs_ad_dk3adpcm,
   &mpcodecs_ad_msgsm,
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
   &mpcodecs_ad_dshow,
   &mpcodecs_ad_dmo,
   &mpcodecs_ad_acm,
   &mpcodecs_ad_twin,
 #endif
-#ifdef USE_QTX_CODECS
+#ifdef CONFIG_QTX_CODECS
   &mpcodecs_ad_qtaudio,
 #endif
 #ifdef HAVE_FAAD
@@ -82,10 +82,10 @@
 #ifdef HAVE_SPEEX
   &mpcodecs_ad_speex,
 #endif
-#ifdef USE_LIBMAD
+#ifdef CONFIG_LIBMAD
   &mpcodecs_ad_libmad,
 #endif
-#ifdef USE_REALCODECS
+#ifdef CONFIG_REALCODECS
   &mpcodecs_ad_realaud,
 #endif
 #ifdef HAVE_LIBDV095
@@ -94,7 +94,7 @@
 #ifdef HAVE_MUSEPACK
   &mpcodecs_ad_libmusepack,
 #endif
-#ifdef USE_LIBDCA
+#ifdef CONFIG_LIBDCA
   &mpcodecs_ad_libdca,
 #endif
   NULL
--- a/libmpcodecs/ad_faad.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpcodecs/ad_faad.c	Wed Jul 30 12:01:30 2008 +0000
@@ -23,7 +23,7 @@
 
 LIBAD_EXTERN(faad)
 
-#ifndef USE_FAAD_INTERNAL
+#ifndef CONFIG_FAAD_INTERNAL
 #include <faad.h>
 #else
 #include "libfaad2/faad.h"
--- a/libmpcodecs/ad_mp3lib.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpcodecs/ad_mp3lib.c	Wed Jul 30 12:01:30 2008 +0000
@@ -39,7 +39,7 @@
   // MPEG Audio:
   dec_audio_sh=sh; // save sh_audio for the callback:
 //  MP3_Init(fakemono,mplayer_accel,&mplayer_audio_read); // TODO!!!
-#ifdef USE_FAKE_MONO
+#ifdef CONFIG_FAKE_MONO
   MP3_Init(fakemono);
 #else
   MP3_Init();
--- a/libmpcodecs/ad_realaud.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpcodecs/ad_realaud.c	Wed Jul 30 12:01:30 2008 +0000
@@ -47,7 +47,7 @@
 static unsigned long (*raSetFlavor)(void*,unsigned long);
 static void  (*raSetDLLAccessPath)(char*);
 static void  (*raSetPwd)(char*,char*);
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
 static unsigned long WINAPI (*wraCloseCodec)(void*);
 static unsigned long WINAPI (*wraDecode)(void*, char*,unsigned long,char*,unsigned int*,long);
 static unsigned long WINAPI (*wraFreeDecoder)(void*);
@@ -147,7 +147,7 @@
 }
 #endif    
 
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
 
 #ifdef WIN32_LOADER
 #include "loader/ldt_keeper.h"
@@ -214,7 +214,7 @@
 #ifdef HAVE_LIBDL       
     if (strstr(sh->codec->dll,".dll") || !load_syms_linux(path))
 #endif
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
 	if (!load_syms_windows(sh->codec->dll))
 #endif
     {
@@ -224,7 +224,7 @@
 	return 0;
     }
 
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
   if((raSetDLLAccessPath && dll_type == 0) || (wraSetDLLAccessPath && dll_type == 1)){
 #else
   if(raSetDLLAccessPath){
@@ -237,7 +237,7 @@
         path[strlen(path)]='/';
       }
       path[strlen(path)+1]=0;
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
     if (dll_type == 1)
     {
       int i;
@@ -250,7 +250,7 @@
       raSetDLLAccessPath(path);
   }
 
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
     if (dll_type == 1){
       if(wraOpenCodec2)
 	result=wraOpenCodec2(&sh->context,REALCODEC_PATH "\\");
@@ -284,7 +284,7 @@
 	sh->wf->cbSize, // codec data length
 	(char*)(sh->wf+1) // extras
     };
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
     wra_init_t winit_data={
 	sh->wf->nSamplesPerSec,
 	sh->wf->wBitsPerSample,
@@ -296,7 +296,7 @@
 	(char*)(sh->wf+1) // extras
     };
 #endif
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
     if (dll_type == 1)
 	result=wraInitDecoder(sh->context,&winit_data);
     else
@@ -310,13 +310,13 @@
 //    printf("initdecoder ok (result: %x)\n", result);
   }
 
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
     if((raSetPwd && dll_type == 0) || (wraSetPwd && dll_type == 1)){
 #else
     if(raSetPwd){
 #endif
 	// used by 'SIPR'
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
 	if (dll_type == 1)
 	    wraSetPwd(sh->context,"Ardubancel Quazanga");
 	else
@@ -337,7 +337,7 @@
         flavor = 2;
     mp_msg(MSGT_DECAUDIO,MSGL_V,"Got sipr flavor %d from bitrate %d\n",flavor, sh->wf->nAvgBytesPerSec);
 
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
     if (dll_type == 1)
 	result=wraSetFlavor(sh->context,flavor);
     else
@@ -371,7 +371,7 @@
 static void uninit(sh_audio_t *sh){
   // uninit the decoder etc...
   // again: you don't have to free() a_in_buffer here! it's done by the core.
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
     if (dll_type == 1)
     {
 	if (wraFreeDecoder) wraFreeDecoder(sh->context);
@@ -383,7 +383,7 @@
     if (raCloseCodec) raCloseCodec(sh->context);
 
 
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
     if (dll_type == 1)
     {
 	if (rv_handle) FreeLibrary(rv_handle);
@@ -407,7 +407,7 @@
       sh->a_in_buffer_len=sh->wf->nBlockAlign;
   }
   
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
     if (dll_type == 1)
       result=wraDecode(sh->context, sh->a_in_buffer+sh->a_in_buffer_size-sh->a_in_buffer_len, sh->wf->nBlockAlign,
        buf, &len, -1);
--- a/libmpcodecs/ae.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpcodecs/ae.c	Wed Jul 30 12:01:30 2008 +0000
@@ -22,7 +22,7 @@
 #include "ae_lame.h"
 #endif
 
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
 #include "ae_lavc.h"
 #endif
 
@@ -55,7 +55,7 @@
 			ris = mpae_init_toolame(encoder);
 			break;
 #endif
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
 		case ACODEC_LAVC:
 			ris = mpae_init_lavc(encoder);
 			break;
--- a/libmpcodecs/ae_lavc.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpcodecs/ae_lavc.c	Wed Jul 30 12:01:30 2008 +0000
@@ -25,7 +25,7 @@
 extern int  lavc_param_audio_global_header;
 extern int  avcodec_initialized;
 static int compressed_frame_size = 0;
-#ifdef USE_LIBAVFORMAT
+#ifdef CONFIG_LIBAVFORMAT
 #include "libavformat/avformat.h"
 extern const struct AVCodecTag *mp_wav_taglists[];
 #endif
@@ -133,7 +133,7 @@
         return sz;
 }
 
-#ifndef USE_LIBAVFORMAT
+#ifndef CONFIG_LIBAVFORMAT
 static uint32_t lavc_find_atag(char *codec)
 {
 	if(codec == NULL)
@@ -184,7 +184,7 @@
 	}
 	if(lavc_param_atag == 0)
 	{
-#ifdef USE_LIBAVFORMAT
+#ifdef CONFIG_LIBAVFORMAT
 		lavc_param_atag = av_codec_get_tag(mp_wav_taglists, lavc_acodec->id);
 #else
 		lavc_param_atag = lavc_find_atag(lavc_param_acodec);
--- a/libmpcodecs/dec_audio.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpcodecs/dec_audio.c	Wed Jul 30 12:01:30 2008 +0000
@@ -27,7 +27,7 @@
 #include <dlfcn.h>
 #endif
 
-#ifdef USE_FAKE_MONO
+#ifdef CONFIG_FAKE_MONO
 int fakemono = 0;
 #endif
 
--- a/libmpcodecs/dec_video.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpcodecs/dec_video.c	Wed Jul 30 12:01:30 2008 +0000
@@ -416,7 +416,7 @@
     int ret = vf->put_image(vf, mpi, pts);
     if (ret > 0) {
 	vf->control(vf, VFCTRL_DRAW_OSD, NULL);
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
 	vf->control(vf, VFCTRL_DRAW_EOSD, NULL);
 #endif
     }
--- a/libmpcodecs/vd.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpcodecs/vd.c	Wed Jul 30 12:01:30 2008 +0000
@@ -55,13 +55,13 @@
 
 vd_functions_t* mpcodecs_vd_drivers[] = {
         &mpcodecs_vd_null,
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
         &mpcodecs_vd_ffmpeg,
 #endif
 #ifdef HAVE_OGGTHEORA
 	&mpcodecs_vd_theora,
 #endif
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
         &mpcodecs_vd_dshow,
         &mpcodecs_vd_dmo,
         &mpcodecs_vd_vfw,
@@ -71,7 +71,7 @@
         &mpcodecs_vd_raw,
         &mpcodecs_vd_hmblck,
         &mpcodecs_vd_nuv,
-#ifdef USE_XANIM
+#ifdef CONFIG_XANIM
         &mpcodecs_vd_xanim,
 #endif
 #ifdef HAVE_PNG
@@ -82,14 +82,14 @@
 #endif
 	&mpcodecs_vd_mtga,
 	&mpcodecs_vd_sgi,
-#ifdef USE_LIBMPEG2
+#ifdef CONFIG_LIBMPEG2
         &mpcodecs_vd_libmpeg2,
 #endif
         &mpcodecs_vd_mpegpes,
 #ifdef HAVE_ZR
         &mpcodecs_vd_zrmjpeg,
 #endif
-#ifdef USE_REALCODECS
+#ifdef CONFIG_REALCODECS
 	&mpcodecs_vd_realvid,
 #endif
 #ifdef HAVE_XVID4
@@ -98,7 +98,7 @@
 #ifdef HAVE_LIBDV095
 	&mpcodecs_vd_libdv,
 #endif
-#ifdef USE_QTX_CODECS
+#ifdef CONFIG_QTX_CODECS
 	&mpcodecs_vd_qtvideo,
 #endif
     /* Please do not add any new decoders here. If you want to implement a new
--- a/libmpcodecs/vd_ffmpeg.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Wed Jul 30 12:01:30 2008 +0000
@@ -50,7 +50,7 @@
     AVRational last_sample_aspect_ratio;
 } vd_ffmpeg_ctx;
 
-//#ifdef USE_LIBPOSTPROC
+//#ifdef CONFIG_LIBPOSTPROC
 //unsigned int lavc_pp=0;
 //#endif
 
--- a/libmpcodecs/vd_realvid.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpcodecs/vd_realvid.c	Wed Jul 30 12:01:30 2008 +0000
@@ -50,7 +50,7 @@
 static unsigned long (*rvyuv_free)(void*);
 static unsigned long (*rvyuv_init)(void*, void*); // initdata,context
 static unsigned long (*rvyuv_transform)(char*, char*,transform_in_t*,unsigned int*,void*);
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
 static unsigned long WINAPI (*wrvyuv_custom_message)(cmsg_data_t* ,void*);
 static unsigned long WINAPI (*wrvyuv_free)(void*);
 static unsigned long WINAPI (*wrvyuv_init)(void*, void*); // initdata,context
@@ -61,7 +61,7 @@
 static int initialized=0;
 static uint8_t *buffer = NULL;
 static int bufsz = 0;
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
 static int dll_type = 0; /* 0 = unix dlopen, 1 = win32 dll */
 #endif
 
@@ -143,7 +143,7 @@
 }
 #endif
 
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
 
 #ifdef WIN32_LOADER
 #include "loader/ldt_keeper.h"
@@ -283,7 +283,7 @@
 #ifdef HAVE_LIBDL       
 	if(strstr(sh->codec->dll,".dll") || !load_syms_linux(path))
 #endif
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
 	    if (!load_syms_windows(sh->codec->dll))
 #endif
 	{
@@ -297,7 +297,7 @@
 //	if((sh->format!=0x30335652) && !mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_I420)) return 0;
 	// init codec:
 	sh->context=NULL;
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
 	if (dll_type == 1)
 	    result=(*wrvyuv_init)(&init_data, &sh->context);
 	else
@@ -324,7 +324,7 @@
 	    if (extrahdr_size-8 > cmsg_cnt)
 	        mp_msg(MSGT_DECVIDEO,MSGL_WARN,"realvideo: %u bytes of unknown extradata remaining.\n",extrahdr_size-8-cmsg_cnt);
 
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
 	    if (dll_type == 1)
 		(*wrvyuv_custom_message)(&cmsg_data,sh->context);
 	    else
@@ -337,7 +337,7 @@
 
 // uninit driver
 static void uninit(sh_video_t *sh){
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
 	if (dll_type == 1)
 	{
 	    if (wrvyuv_free) wrvyuv_free(sh->context);
@@ -345,7 +345,7 @@
 #endif
 	if(rvyuv_free) rvyuv_free(sh->context);
 
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
 	if (dll_type == 1)
 	{
 	    if (rv_handle) FreeLibrary(rv_handle);
@@ -397,7 +397,7 @@
 	    if (!buffer) return 0;
 	}
 	
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
 	if (dll_type == 1)
 	    result=(*wrvyuv_transform)(dp_data, buffer, &transform_in,
 		transform_out, sh->context);
--- a/libmpcodecs/ve.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpcodecs/ve.c	Wed Jul 30 12:01:30 2008 +0000
@@ -23,12 +23,12 @@
  * libraries and encoders requiring binary support. */
 
 static vf_info_t* encoder_list[]={
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
     &ve_info_lavc,
 #endif
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
     &ve_info_vfw,
-#ifdef USE_QTX_CODECS_WIN32
+#ifdef CONFIG_QTX_CODECS_WIN32
     &ve_info_qtvideo,
 #endif
 #endif
@@ -39,7 +39,7 @@
 #ifdef HAVE_XVID4
     &ve_info_xvid,
 #endif
-#ifdef USE_LIBLZO
+#ifdef CONFIG_LIBLZO
     &ve_info_nuv,
 #endif
 #ifdef HAVE_X264
--- a/libmpcodecs/ve_lavc.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpcodecs/ve_lavc.c	Wed Jul 30 12:01:30 2008 +0000
@@ -162,7 +162,7 @@
 
 #include "m_option.h"
 
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
 m_option_t lavcopts_conf[]={
 	{"acodec", &lavc_param_acodec, CONF_TYPE_STRING, 0, 0, 0, NULL},
 	{"abitrate", &lavc_param_abitrate, CONF_TYPE_INT, CONF_RANGE, 1, 1000000, NULL},
--- a/libmpcodecs/vf.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpcodecs/vf.c	Wed Jul 30 12:01:30 2008 +0000
@@ -108,7 +108,7 @@
 #endif
     &vf_info_crop,
     &vf_info_expand,
-#ifdef USE_LIBPOSTPROC
+#ifdef CONFIG_LIBPOSTPROC
     &vf_info_pp,
 #endif
     &vf_info_scale,
@@ -123,7 +123,7 @@
     &vf_info_mirror,
     &vf_info_palette,
     &vf_info_pp7,
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
     &vf_info_lavc,
     &vf_info_lavcdeint,
     &vf_info_screenshot,
@@ -170,7 +170,7 @@
     &vf_info_delogo,
     &vf_info_remove_logo,
     &vf_info_hue,
-#ifdef USE_LIBAVCODEC_A
+#ifdef CONFIG_LIBAVCODEC_A
     &vf_info_spp,
     &vf_info_uspp,
     &vf_info_fspp,
@@ -185,7 +185,7 @@
     &vf_info_divtc,
     &vf_info_harddup,
     &vf_info_softskip,
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
     &vf_info_ass,
 #endif
     &vf_info_yadif,
--- a/libmpcodecs/vf_pp.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpcodecs/vf_pp.c	Wed Jul 30 12:01:30 2008 +0000
@@ -17,7 +17,7 @@
 #include "vf.h"
 #include "libpostproc/postprocess.h"
 
-#ifdef USE_LIBPOSTPROC_A
+#ifdef CONFIG_LIBPOSTPROC_A
 #define EMU_OLD
 #include "libpostproc/postprocess_internal.h"
 #endif
--- a/libmpcodecs/vf_vo.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpcodecs/vf_vo.c	Wed Jul 30 12:01:30 2008 +0000
@@ -10,7 +10,7 @@
 
 #include "libvo/video_out.h"
 
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
 #include "libass/ass.h"
 #include "libass/ass_mp.h"
 extern ass_track_t* ass_track;
@@ -24,7 +24,7 @@
 struct vf_priv_s {
     double pts;
     const vo_functions_t *vo;
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
     ass_renderer_t* ass_priv;
     int prev_visibility;
 #endif
@@ -65,7 +65,7 @@
     if(config_video_out(video_out,width,height,d_width,d_height,flags,"MPlayer",outfmt))
 	return 0;
 
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
     if (vf->priv->ass_priv)
 	ass_configure(vf->priv->ass_priv, width, height, !!(vf->default_caps & VFCAP_EOSD_UNSCALED));
 #endif
@@ -111,7 +111,7 @@
 	if(!vo_config_count) return CONTROL_FALSE; // vo not configured?
 	return (video_out->control(VOCTRL_GET_EQUALIZER, eq->item, &eq->value) == VO_TRUE) ? CONTROL_TRUE : CONTROL_FALSE;
     }
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
     case VFCTRL_INIT_EOSD:
     {
         vf->priv->ass_priv = ass_renderer_init((ass_library_t*)data);
@@ -203,7 +203,7 @@
 static void uninit(struct vf_instance_s* vf)
 {
     if (vf->priv) {
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
         if (vf->priv->ass_priv)
             ass_renderer_done(vf->priv->ass_priv);
 #endif
--- a/libmpdemux/demux_mkv.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpdemux/demux_mkv.c	Wed Jul 30 12:01:30 2008 +0000
@@ -31,11 +31,11 @@
 
 #include "libavutil/common.h"
 
-#ifdef USE_QTX_CODECS
+#ifdef CONFIG_QTX_CODECS
 #include "loader/qtx/qtxsdk/components.h"
 #endif
 
-#ifdef HAVE_ZLIB
+#ifdef CONFIG_ZLIB
 #include <zlib.h>
 #endif
 
@@ -473,7 +473,7 @@
       if (!(track->encodings[i].scope & type))
         continue;
 
-#ifdef HAVE_ZLIB
+#ifdef CONFIG_ZLIB
       if (track->encodings[i].comp_algo == 0)
         {
           /* zlib encoded track */
@@ -721,7 +721,7 @@
                                   MSGTR_MPDEMUX_MKV_UnknownCompression,
                                   track->tnum, e.comp_algo);
                         }
-#ifndef HAVE_ZLIB
+#ifndef CONFIG_ZLIB
                       else if (e.comp_algo == 0)
                         {
                           mp_msg (MSGT_DEMUX, MSGL_WARN,
@@ -1757,7 +1757,7 @@
           stream_read(demuxer->stream, dst+8, cnt);
           track->realmedia = 1;
 
-#ifdef USE_QTX_CODECS
+#ifdef CONFIG_QTX_CODECS
         }
       else if (track->private_size >= sizeof (ImageDescription)
                && !strcmp(track->codec_id, MKV_V_QUICKTIME))
@@ -1783,7 +1783,7 @@
           bih->biPlanes = 1;
           bih->biCompression = idesc->cType;
           ImageDesc = idesc;
-#endif /* USE_QTX_CODECS */
+#endif /* CONFIG_QTX_CODECS */
 
         }
       else
--- a/libmpdemux/demux_mov.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpdemux/demux_mov.c	Wed Jul 30 12:01:30 2008 +0000
@@ -48,7 +48,7 @@
 #include "qtpalette.h"
 #include "parse_mp4.h" // .MP4 specific stuff
 
-#ifdef HAVE_ZLIB
+#ifdef CONFIG_ZLIB
 #include <zlib.h>
 #endif
 
@@ -1395,7 +1395,7 @@
 	    trak=NULL;
 	    break;
 	}
-#ifndef HAVE_ZLIB
+#ifndef CONFIG_ZLIB
 	case MOV_FOURCC('c','m','o','v'): {
 	    mp_msg(MSGT_DEMUX,MSGL_ERR,MSGTR_MOVcomprhdr);
 	    return;
@@ -2026,7 +2026,7 @@
 			char2int(trak->stdata,12)==MOV_FOURCC('z','l','i','b') 
 		    ){
 			int newlen=stream_read_dword(demuxer->stream);
-#ifdef HAVE_ZLIB
+#ifdef CONFIG_ZLIB
 			// unzip:
 			z_stream zstrm;
 			int zret;
--- a/libmpdemux/demux_ogg.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpdemux/demux_ogg.c	Wed Jul 30 12:01:30 2008 +0000
@@ -196,7 +196,7 @@
 
   mp_msg(MSGT_DEMUX,MSGL_DBG2,"Ogg sub lines: %d  first: '%s'\n",
       ogg_sub.lines, ogg_sub.text[0]);
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
   subcp_recode(&ogg_sub);
 #endif
   vo_sub = &ogg_sub;
@@ -745,7 +745,7 @@
   sh_audio_t* sh_a;
   sh_video_t* sh_v;
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
   subcp_open(NULL);
 #endif
 
@@ -1486,7 +1486,7 @@
   if(!ogg_d)
     return;
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
   subcp_close();
 #endif
 
--- a/libmpdemux/demux_rtp.cpp	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpdemux/demux_rtp.cpp	Wed Jul 30 12:01:30 2008 +0000
@@ -500,7 +500,7 @@
   if (dp == NULL) return NULL;
     }
 
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
   extern AVCodecParserContext * h264parserctx;
   int consumed, poutbuf_size = 1;
   const uint8_t *poutbuf = NULL;
@@ -531,7 +531,7 @@
   if (headersize == 1) // amr
     dp->buffer[0] =
         ((AMRAudioSource*)bufferQueue->readSource())->lastFrameHeader();
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
     } else {
       bufferQueue->dp = dp = bufferQueue->nextpacket;
       bufferQueue->nextpacket = NULL;
--- a/libmpdemux/demux_rtp_codec.cpp	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpdemux/demux_rtp_codec.cpp	Wed Jul 30 12:01:30 2008 +0000
@@ -9,7 +9,7 @@
 #include "libavutil/base64.h"
 }
 
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
 AVCodecParserContext * h264parserctx;
 #endif
 
@@ -116,7 +116,7 @@
       = parseH264ConfigStr(subsession->fmtp_spropparametersets(), configLen);
     sh_video->bih = bih = insertVideoExtradata(bih, configData, configLen);
     delete[] configData;
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
     avcodec_register_all();
     h264parserctx = av_parser_init(CODEC_ID_H264);
 #endif
--- a/libmpdemux/demux_rtp_internal.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpdemux/demux_rtp_internal.h	Wed Jul 30 12:01:30 2008 +0000
@@ -10,7 +10,7 @@
 #ifndef DEMUXER_H
 #include "demuxer.h"
 #endif
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
 #include "libavcodec/avcodec.h"
 #endif
 }
--- a/libmpdemux/demuxer.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpdemux/demuxer.c	Wed Jul 30 12:01:30 2008 +0000
@@ -22,12 +22,12 @@
 
 #include "libaf/af_format.h"
 
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
 #include "libass/ass.h"
 #include "libass/ass_mp.h"
 #endif
 
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
 #include "libavcodec/avcodec.h"
 #if MP_INPUT_BUFFER_PADDING_SIZE < FF_INPUT_BUFFER_PADDING_SIZE
 #error MP_INPUT_BUFFER_PADDING_SIZE is too small!
@@ -88,11 +88,11 @@
 const demuxer_desc_t *const demuxer_list[] = {
     &demuxer_desc_rawaudio,
     &demuxer_desc_rawvideo,
-#ifdef USE_TV
+#ifdef CONFIG_TV
     &demuxer_desc_tv,
 #endif
     &demuxer_desc_mf,
-#ifdef USE_LIBAVFORMAT
+#ifdef CONFIG_LIBAVFORMAT
     &demuxer_desc_lavf_preferred,
 #endif
     &demuxer_desc_avi,
@@ -116,7 +116,7 @@
 #ifdef HAVE_OGGVORBIS
     &demuxer_desc_ogg,
 #endif
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
     &demuxer_desc_avs,
 #endif
     &demuxer_desc_pva,
@@ -136,7 +136,7 @@
 #ifdef LIBNEMESI
     &demuxer_desc_rtp_nemesi,
 #endif
-#ifdef USE_LIBAVFORMAT
+#ifdef CONFIG_LIBAVFORMAT
     &demuxer_desc_lavf,
 #endif
 #ifdef MUSEPACK
@@ -264,7 +264,7 @@
 {
     mp_msg(MSGT_DEMUXER, MSGL_DBG2, "DEMUXER: freeing sh_sub at %p\n", sh);
     free(sh->extradata);
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
     if (sh->ass_track)
         ass_free_track(sh->ass_track);
 #endif
@@ -906,7 +906,7 @@
                sh_video->fps, sh_video->i_bps * 0.008f,
                sh_video->i_bps / 1024.0f);
     }
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
     if (ass_enabled && ass_library) {
         for (i = 0; i < MAX_S_STREAMS; ++i) {
             sh_sub_t *sh = demuxer->s_streams[i];
@@ -1066,7 +1066,7 @@
     if (!demuxer->seekable) {
         if (demuxer->file_format == DEMUXER_TYPE_AVI)
             mp_msg(MSGT_SEEK, MSGL_WARN, MSGTR_CantSeekRawAVI);
-#ifdef USE_TV
+#ifdef CONFIG_TV
         else if (demuxer->file_format == DEMUXER_TYPE_TV)
             mp_msg(MSGT_SEEK, MSGL_WARN, MSGTR_TVInputNotSeekable);
 #endif
--- a/libmpdemux/demuxer.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpdemux/demuxer.h	Wed Jul 30 12:01:30 2008 +0000
@@ -7,7 +7,7 @@
 #include <string.h>
 
 #include "stream/stream.h"
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
 #include "libass/ass_types.h"
 #endif
 
--- a/libmpdemux/extension.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpdemux/extension.c	Wed Jul 30 12:01:30 2008 +0000
@@ -52,7 +52,7 @@
         { "nsv", DEMUXER_TYPE_NSV },
         { "nsa", DEMUXER_TYPE_NSV },
         { "mpc", DEMUXER_TYPE_MPC },
-#ifdef USE_WIN32DLL
+#ifdef CONFIG_WIN32DLL
         { "avs", DEMUXER_TYPE_AVS },
 #endif
 	{ "302", DEMUXER_TYPE_LAVF },
--- a/libmpdemux/muxer.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpdemux/muxer.c	Wed Jul 30 12:01:30 2008 +0000
@@ -34,7 +34,7 @@
         if(! muxer_init_muxer_rawaudio(muxer))
 	  goto fail;
         break;
-#ifdef USE_LIBAVFORMAT
+#ifdef CONFIG_LIBAVFORMAT
       case MUXER_TYPE_LAVF:
         if(! muxer_init_muxer_lavf(muxer))
 	  goto fail;
--- a/libmpdemux/muxer_mpeg.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpdemux/muxer_mpeg.c	Wed Jul 30 12:01:30 2008 +0000
@@ -2101,7 +2101,7 @@
 				if(s->b_buffer[i] == 0x0B && s->b_buffer[i+1] == 0x77)
 				{
 					srate = 0;
-				#ifdef USE_LIBA52
+				#ifdef CONFIG_LIBA52
 					len = a52_syncinfo(&(s->b_buffer[i]), &dummy, &srate, &dummy);
 				#else
 					len = mp_a52_framesize(&(s->b_buffer[i]), &srate);
--- a/libmpdemux/stheader.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/libmpdemux/stheader.h	Wed Jul 30 12:01:30 2008 +0000
@@ -105,7 +105,7 @@
   int forced_subs_only;
   unsigned char* extradata; // extra header data passed from demuxer
   int extradata_len;
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
   ass_track_t* ass_track;  // for SSA/ASS streams (type == 'a')
 #endif
   char* lang; // track language
--- a/libvo/aclib.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libvo/aclib.c	Wed Jul 30 12:01:30 2008 +0000
@@ -1,5 +1,5 @@
 #include "config.h"
-#ifdef USE_FASTMEMCPY
+#ifdef CONFIG_FASTMEMCPY
 
 /*
   aclib - advanced C library ;)
@@ -180,5 +180,4 @@
 	return to;
 }
 
-#endif /* use fastmemcpy */
-
+#endif /* CONFIG_FASTMEMCPY */
--- a/libvo/fastmemcpy.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/libvo/fastmemcpy.h	Wed Jul 30 12:01:30 2008 +0000
@@ -23,7 +23,7 @@
 #include <inttypes.h>
 #include <string.h>
 
-#ifdef USE_FASTMEMCPY
+#ifdef CONFIG_FASTMEMCPY
 #if defined(HAVE_MMX) || defined(HAVE_MMX2) || defined(HAVE_3DNOW) \
 /*    || defined(HAVE_SSE) || defined(HAVE_SSE2) */
 #include <stddef.h>
@@ -36,7 +36,7 @@
 #define fast_memcpy(a,b,c) memcpy(a,b,c)
 #endif
 
-#else /* USE_FASTMEMCPY */
+#else /* CONFIG_FASTMEMCPY */
 #define mem2agpcpy(a,b,c) memcpy(a,b,c)
 #define fast_memcpy(a,b,c) memcpy(a,b,c)
 #endif
--- a/libvo/font_load_ft.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libvo/font_load_ft.c	Wed Jul 30 12:01:30 2008 +0000
@@ -16,7 +16,7 @@
 #include <math.h>
 #include <string.h>
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 #include <iconv.h>
 #endif
 
@@ -716,7 +716,7 @@
     return 0;
 }
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 /* decode from 'encoding' to unicode */
 static FT_ULong decode_char(iconv_t *cd, char c) {
     FT_ULong o;
@@ -1009,7 +1009,7 @@
     }
     desc->face_cnt++;
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
     if (unicode) {
 	charset_size = prepare_charset_unicode(face, my_charset, my_charcodes);
     } else {
--- a/libvo/sub.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/libvo/sub.c	Wed Jul 30 12:01:30 2008 +0000
@@ -8,7 +8,7 @@
 #include <malloc.h>
 #endif
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 #include "stream/stream.h"
 #include "stream/stream_dvdnav.h"
 #define OSD_NAV_BOX_ALPHA 0x7f
@@ -89,7 +89,7 @@
 int sub_bg_color=0; /* subtitles background color */
 int sub_bg_alpha=0;
 int sub_justify=0;
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 static nav_highlight_t nav_hl;
 #endif
 
@@ -216,7 +216,7 @@
         }
 }
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 void osd_set_nav_box (uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey) {
   nav_hl.sx = sx;
   nav_hl.sy = sy;
@@ -1115,7 +1115,7 @@
         int vis=obj->flags&OSDFLAG_VISIBLE;
 	obj->flags&=~OSDFLAG_BBOX;
 	switch(obj->type){
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
         case OSDTYPE_DVDNAV:
            vo_update_nav(obj,dxs,dys);
            break;
@@ -1192,7 +1192,7 @@
     new_osd_obj(OSDTYPE_SUBTITLE);
     new_osd_obj(OSDTYPE_PROGBAR);
     new_osd_obj(OSDTYPE_SPU);
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
     new_osd_obj(OSDTYPE_DVDNAV);
 #endif
 #if HAVE_TV_TELETEXT
@@ -1233,7 +1233,7 @@
 	case OSDTYPE_SPU:
 	    vo_draw_spudec_sub(obj, draw_alpha); // FIXME
 	    break;
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
         case OSDTYPE_DVDNAV:
 #endif
 #ifdef HAVE_TV_TELETEXT
--- a/libvo/sub.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/libvo/sub.h	Wed Jul 30 12:01:30 2008 +0000
@@ -129,7 +129,7 @@
 
 unsigned utf8_get_char(const char **str);
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 #include <inttypes.h>
 void osd_set_nav_box (uint16_t sx, uint16_t sy, uint16_t ex, uint16_t ey);
 #endif
--- a/loader/win32.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/loader/win32.c	Wed Jul 30 12:01:30 2008 +0000
@@ -19,7 +19,7 @@
 #include "config.h"
 #include "mangle.h"
 
-#ifdef USE_QTX_CODECS
+#ifdef CONFIG_QTX_CODECS
 #define QTX
 #endif
 #define REALPLAYER
--- a/mencoder.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/mencoder.c	Wed Jul 30 12:01:30 2008 +0000
@@ -77,15 +77,15 @@
 
 #include "osdep/timer.h"
 
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 #include "stream/stream_dvd.h"
 #endif
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 #include "stream/stream_dvdnav.h"
 #endif
 
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
 #include "libavcodec/avcodec.h"
 #endif
 
@@ -99,7 +99,7 @@
 
 // cache2:
 int stream_cache_size=-1;
-#ifdef USE_STREAM_CACHE
+#ifdef CONFIG_STREAM_CACHE
 extern int cache_fill_status;
 
 float stream_cache_min_percent=20.0;
@@ -224,7 +224,7 @@
 {
 }
 
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
 #include "libass/ass.h"
 #include "libass/ass_mp.h"
 #endif
@@ -291,7 +291,7 @@
 
 #include "cfg-mencoder.h"
 
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 #include "spudec.h"
 #endif
 #include "vobsub.h"
@@ -456,9 +456,9 @@
 #endif
 #endif
 
-#if defined(WIN32) && defined(USE_WIN32DLL)
+#if defined(WIN32) && defined(CONFIG_WIN32DLL)
   set_path_env();
-#endif /*WIN32 && USE_WIN32DLL*/
+#endif /*WIN32 && CONFIG_WIN32DLL*/
   
   InitTimer();
 
@@ -575,14 +575,14 @@
 
   mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_OpenedStream, file_format, (int)(stream->start_pos), (int)(stream->end_pos));
 
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 if(stream->type==STREAMTYPE_DVD){
   if(audio_lang && audio_id==-1) audio_id=dvd_aid_from_lang(stream,audio_lang);
   if(dvdsub_lang && dvdsub_id==-2) dvdsub_id=dvd_sid_from_lang(stream,dvdsub_lang);
 }
 #endif
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 if(stream->type==STREAMTYPE_DVDNAV){
   if(audio_lang && audio_id==-1) audio_id=mp_dvdnav_aid_from_lang(stream,audio_lang);
   if(dvdsub_lang && dvdsub_id==-2) dvdsub_id=mp_dvdnav_sid_from_lang(stream,dvdsub_lang);
@@ -714,7 +714,7 @@
     if (spudec_ifo && vobsub_parse_ifo(NULL,spudec_ifo, palette, &width, &height, 1, dvdsub_id, tmp) >= 0)
 	vobsub_writer = vobsub_out_open(vobsub_out, palette, sh_video->disp_w, sh_video->disp_h,
 					vobsub_out_id?vobsub_out_id:(char *)tmp, vobsub_out_index);
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
     if (vobsub_writer == NULL) {
 	char tmp[3];
 	if (vobsub_out_id == NULL && stream->type == STREAMTYPE_DVD) {
@@ -740,7 +740,7 @@
   if (vobsub_parse_ifo(NULL,spudec_ifo, palette, &width, &height, 1, -1, NULL) >= 0)
     vo_spudec=spudec_new_scaled(palette, sh_video->disp_w, sh_video->disp_h);
 }
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 if (vo_spudec==NULL) {
 vo_spudec=spudec_new_scaled(stream->type==STREAMTYPE_DVD?((dvd_priv_t *)(stream->priv))->cur_pgc->palette:NULL,
 			    sh_video->disp_w, sh_video->disp_h);
@@ -779,7 +779,7 @@
 mux_v->source=sh_video;
 
 mux_v->h.dwSampleSize=0; // VBR
-#ifdef USE_LIBAVCODEC
+#ifdef CONFIG_LIBAVCODEC
 {
     double fps = force_ofps?force_ofps:sh_video->fps*playback_speed;
     AVRational q= av_d2q(fps, fps*1001+2);
@@ -1499,7 +1499,7 @@
     }
         fflush(stdout);
 
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 // DVD sub:
  if(vobsub_writer){
      unsigned char* packet=NULL;
--- a/mp3lib/decod386.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/mp3lib/decod386.c	Wed Jul 30 12:01:30 2008 +0000
@@ -220,7 +220,7 @@
 
 }
 
-#ifdef USE_FAKE_MONO
+#ifdef CONFIG_FAKE_MONO
 static int synth_1to1_l(real *bandPtr,int channel,unsigned char *out,int *pnt)
 {
   int i,ret;
--- a/mp3lib/mp3.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/mp3lib/mp3.h	Wed Jul 30 12:01:30 2008 +0000
@@ -1,7 +1,7 @@
 /* MP3 Player Library 2.0      (C) 1999 A'rpi/Astral&ESP-team  */
 
 /* decoder level: */
-#ifdef USE_FAKE_MONO
+#ifdef CONFIG_FAKE_MONO
 extern void MP3_Init(int fakemono);
 #else
 extern void MP3_Init();
--- a/mp3lib/sr1.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/mp3lib/sr1.c	Wed Jul 30 12:01:30 2008 +0000
@@ -400,7 +400,7 @@
 #include "cpudetect.h"
 
 // Init decoder tables.  Call first, once!
-#ifdef USE_FAKE_MONO
+#ifdef CONFIG_FAKE_MONO
 void MP3_Init(int fakemono){
 #else
 void MP3_Init(){
@@ -475,7 +475,7 @@
 	mp_msg(MSGT_DECAUDIO,MSGL_V,"mp3lib: using generic C decore!\n");
     }
 
-#ifdef USE_FAKE_MONO
+#ifdef CONFIG_FAKE_MONO
     if (fakemono == 1)
         fr.synth=synth_1to1_l;
     else if (fakemono == 2)
--- a/mp3lib/test.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/mp3lib/test.c	Wed Jul 30 12:01:30 2008 +0000
@@ -45,7 +45,7 @@
   GetCpuCaps(&gCpuCaps);
 
   // MPEG Audio:
-#ifdef USE_FAKE_MONO
+#ifdef CONFIG_FAKE_MONO
   MP3_Init(0);
 #else
   MP3_Init();
--- a/mp3lib/test2.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/mp3lib/test2.c	Wed Jul 30 12:01:30 2008 +0000
@@ -33,7 +33,7 @@
   GetCpuCaps(&gCpuCaps);
 
   // MPEG Audio:
-#ifdef USE_FAKE_MONO
+#ifdef CONFIG_FAKE_MONO
   MP3_Init(0);
 #else
   MP3_Init();
--- a/mp_core.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/mp_core.h	Wed Jul 30 12:01:30 2008 +0000
@@ -83,7 +83,7 @@
     int set_of_sub_pos;
     int set_of_sub_size;
     int global_sub_indices[SUB_SOURCES];
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
     // set_of_ass_tracks[i] contains subtitles from set_of_subtitles[i]
     // parsed by libass or NULL if format unsupported
     ass_track_t* set_of_ass_tracks[MAX_SUBTITLE_FILES];
@@ -99,7 +99,7 @@
 
     int was_paused;
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
     struct mp_image_s *nav_smpi; ///< last decoded dvdnav video image
     unsigned char *nav_buffer;   ///< last read dvdnav video frame
     unsigned char *nav_start;    ///< pointer to last read video buffer
--- a/mp_msg.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/mp_msg.c	Wed Jul 30 12:01:30 2008 +0000
@@ -5,7 +5,7 @@
 
 #include "config.h"
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 #include <iconv.h>
 #include <errno.h>
 extern char* get_term_charset(void);
@@ -29,7 +29,7 @@
 int verbose = 0;
 int mp_msg_color = 0;
 int mp_msg_module = 0;
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 char *mp_msg_charset = NULL;
 static char *old_charset = NULL;
 static iconv_t msgiconv;
@@ -37,7 +37,7 @@
 
 const char* filename_recode(const char* filename)
 {
-#if !defined(USE_ICONV) || !defined(MSG_CHARSET)
+#if !defined(CONFIG_ICONV) || !defined(MSG_CHARSET)
     return filename;
 #else
     static iconv_t inv_msgiconv = (iconv_t)(-1);
@@ -73,7 +73,7 @@
         verbose = atoi(env);
     for(i=0;i<MSGT_MAX;i++) mp_msg_levels[i] = -2;
     mp_msg_levels[MSGT_IDENTIFY] = -1; // no -identify output by default
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
     mp_msg_charset = getenv("MPLAYER_CHARSET");
     if (!mp_msg_charset)
       mp_msg_charset = get_term_charset();
@@ -184,7 +184,7 @@
         guiMessageBox(lev, tmp);
 #endif
 
-#if defined(USE_ICONV) && defined(MSG_CHARSET)
+#if defined(CONFIG_ICONV) && defined(MSG_CHARSET)
     if (mp_msg_charset && strcasecmp(mp_msg_charset, "noconv")) {
       char tmp2[MSGSIZE_MAX];
       size_t inlen = strlen(tmp), outlen = MSGSIZE_MAX;
--- a/mpcommon.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/mpcommon.c	Wed Jul 30 12:01:30 2008 +0000
@@ -15,7 +15,7 @@
 
 double sub_last_pts = -303;
 
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
 #include "libass/ass.h"
 #include "libass/ass_mp.h"
 ass_track_t* ass_track = 0; // current track to render
@@ -116,7 +116,7 @@
                 len = FFMIN(len - 2, AV_RB16(packet));
                 packet += 2;
             }
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
             if (ass_enabled) {
                 sh_sub_t* sh = d_dvdsub->sh;
                 ass_track = sh ? sh->ass_track : NULL;
--- a/mplayer.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/mplayer.c	Wed Jul 30 12:01:30 2008 +0000
@@ -105,10 +105,10 @@
 #endif /* __linux__ */
 #endif /* HAVE_RTC */
 
-#ifdef USE_TV
+#ifdef CONFIG_TV
 #include "stream/tv.h"
 #endif
-#ifdef USE_RADIO
+#ifdef CONFIG_RADIO
 #include "stream/stream_radio.h"
 #endif
 
@@ -163,11 +163,11 @@
 #include "libmpdemux/demuxer.h"
 #include "libmpdemux/stheader.h"
 
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 #include "stream/stream_dvd.h"
 #endif
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 #include "stream/stream_dvdnav.h"
 #endif
 
@@ -278,7 +278,7 @@
 
 // cache2:
        int stream_cache_size=-1;
-#ifdef USE_STREAM_CACHE
+#ifdef CONFIG_STREAM_CACHE
 extern int cache_fill_status;
 
 float stream_cache_min_percent=20.0;
@@ -325,7 +325,7 @@
 int   subcc_enabled=0;
 int suboverlap_enabled = 1;
 
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
 #include "libass/ass.h"
 #include "libass/ass_mp.h"
 #endif
@@ -568,7 +568,7 @@
 /// step size of mixer changes
 int volstep = 3;
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 static void mp_dvdnav_context_free(MPContext *ctx){
     if (ctx->nav_smpi) free_mp_image(ctx->nav_smpi);
     ctx->nav_smpi = NULL;
@@ -628,7 +628,7 @@
     current_module="uninit_vo";
     mpctx->video_out->uninit();
     mpctx->video_out=NULL;
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
     mp_dvdnav_context_free(mpctx);
 #endif
   }
@@ -708,7 +708,7 @@
 #endif
   free_osd_list();
 
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
   ass_library_done(ass_library);
 #endif
 
@@ -1016,7 +1016,7 @@
 void add_subtitles(char *filename, float fps, int noerr)
 {
     sub_data *subd;
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
     ass_track_t *asst = 0;
 #endif
 
@@ -1025,9 +1025,9 @@
     }
 
     subd = sub_read_file(filename, fps);
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
     if (ass_enabled)
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
         asst = ass_read_file(ass_library, filename, sub_cp);
 #else
         asst = ass_read_file(ass_library, filename, 0);
@@ -1042,7 +1042,7 @@
         mp_msg(MSGT_CPLAYER, noerr ? MSGL_WARN : MSGL_ERR, MSGTR_CantLoadSub,
 		filename_recode(filename));
     
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
     if (!asst && !subd) return;
     mpctx->set_of_ass_tracks[mpctx->set_of_sub_size] = asst;
 #else
@@ -1091,7 +1091,7 @@
       vo_spudec=spudec_new_scaled(palette, width, height);
   }
 
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
   if (vo_spudec==NULL && mpctx->stream->type==STREAMTYPE_DVD) {
     current_module="spudec_init_dvdread";
     vo_spudec=spudec_new_scaled(((dvd_priv_t *)(mpctx->stream->priv))->cur_pgc->palette,
@@ -1099,7 +1099,7 @@
   }
 #endif
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
   if (vo_spudec==NULL && mpctx->stream->type==STREAMTYPE_DVDNAV) {
     unsigned int *palette = mp_dvdnav_get_spu_clut(mpctx->stream);
     current_module="spudec_init_dvdnav";
@@ -1262,7 +1262,7 @@
   if (sh_video) 
     saddf(line, &pos, width, "%d %d ", drop_frame_cnt, output_quality);
 
-#ifdef USE_STREAM_CACHE
+#ifdef CONFIG_STREAM_CACHE
   // cache stats
   if (stream_cache_size > 0)
     saddf(line, &pos, width, "%d%% ", cache_fill_status);
@@ -1812,7 +1812,7 @@
     return time_frame;
 }
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 #ifndef FF_B_TYPE
 #define FF_B_TYPE 3
 #endif
@@ -1939,7 +1939,7 @@
     if (decoded_frame && mpctx->nav_smpi != decoded_frame)
         mpctx->nav_smpi = mp_dvdnav_copy_mpi(mpctx->nav_smpi,decoded_frame);
 }
-#endif /* USE_DVDNAV */
+#endif /* CONFIG_DVDNAV */
 
 static void adjust_sync_and_print_status(int between_frames, float timing_error)
 {
@@ -2175,7 +2175,7 @@
     sh_video->vfilter=(void*)vf_menu;
 #endif
 
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
   if(ass_enabled) {
     int i;
     int insert = 1;
@@ -2200,7 +2200,7 @@
 
   sh_video->vfilter=(void*)append_filters(sh_video->vfilter);
 
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
   if (ass_enabled)
     ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_INIT_EOSD, ass_library);
 #endif
@@ -2261,7 +2261,7 @@
 	frame_time = sh_video->next_frame_time;
 	in_size = video_read_frame(sh_video, &sh_video->next_frame_time,
 				   &start, force_fps);
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 	/// wait, still frame or EOF
 	if (mpctx->stream->type == STREAMTYPE_DVDNAV && in_size < 0) {
 	    if (mp_dvdnav_is_eof(mpctx->stream)) return -1;
@@ -2284,14 +2284,14 @@
 	update_teletext(sh_video, mpctx->demuxer, 0);
 	update_osd_msg();
 	current_module = "decode_video";
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 	decoded_frame = mp_dvdnav_restore_smpi(&in_size,&start,decoded_frame);
 	/// still frame has been reached, no need to decode
 	if (in_size > 0 && !decoded_frame)
 #endif
 	decoded_frame = decode_video(sh_video, start, in_size, drop_frame,
 				     sh_video->pts);
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 	/// save back last still frame for future display
 	mp_dvdnav_save_smpi(in_size,start,decoded_frame);
 #endif
@@ -2570,11 +2570,11 @@
   m_config_preparse_command_line(mconfig,argc,argv);
 
   print_version();
-#if defined(WIN32) && defined(USE_WIN32DLL)
+#if defined(WIN32) && defined(CONFIG_WIN32DLL)
   set_path_env();
-#endif /*WIN32 && USE_WIN32DLL*/
-
-#ifdef USE_TV
+#endif /*WIN32 && CONFIG_WIN32DLL*/
+
+#ifdef CONFIG_TV
   stream_tv_defaults.immediate = 1;
 #endif
 
@@ -2812,7 +2812,7 @@
 
   vo_init_osd();
 
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
   ass_library = ass_init();
 #endif
 
@@ -2850,7 +2850,7 @@
       mp_msg(MSGT_CPLAYER, MSGL_V, "Using %s timing\n",
 	     softsleep?"software":timer_name);
 
-#ifdef USE_TERMCAP
+#ifdef CONFIG_TERMCAP
   if ( !use_gui ) load_termcap(NULL); // load key-codes
 #endif
 
@@ -3195,7 +3195,7 @@
   exit_player_with_rc(MSGTR_Exit_eof, 0);
 }
 
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 if(mpctx->stream->type==STREAMTYPE_DVD){
   current_module="dvd lang->id";
   if(audio_id==-1) audio_id=dvd_aid_from_lang(mpctx->stream,audio_lang);
@@ -3208,7 +3208,7 @@
 }
 #endif
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 if(mpctx->stream->type==STREAMTYPE_DVDNAV){
   current_module="dvdnav lang->id";
   if(audio_id==-1) audio_id=mp_dvdnav_aid_from_lang(mpctx->stream,audio_lang);
@@ -3317,7 +3317,7 @@
 if (mpctx->global_sub_size <= mpctx->global_sub_indices[SUB_SOURCE_DEMUX] + dvdsub_id)
   mpctx->global_sub_size = mpctx->global_sub_indices[SUB_SOURCE_DEMUX] + dvdsub_id + 1;
 
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
 if (ass_enabled && ass_library) {
   for (i = 0; i < mpctx->demuxer->num_attachments; ++i) {
     demux_attachment_t* att = mpctx->demuxer->attachments + i;
@@ -3663,7 +3663,7 @@
     end_at.type = END_AT_NONE;
 }
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 mp_dvdnav_context_free(mpctx);
 if (mpctx->stream->type == STREAMTYPE_DVDNAV) {
     mp_dvdnav_read_wait(mpctx->stream, 0, 1);
@@ -3810,7 +3810,7 @@
 
 } // end if(mpctx->sh_video)
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
  if (mpctx->stream->type == STREAMTYPE_DVDNAV) {
    nav_highlight_t hl;
    mp_dvdnav_get_highlight (mpctx->stream, &hl);
@@ -3904,7 +3904,7 @@
 	if(guiIntfStruct.Playing==0) break; // STOP
 	if(guiIntfStruct.Playing==2) mpctx->osd_function=OSD_PAUSE;
         if ( guiIntfStruct.DiskChanged || guiIntfStruct.NewPlay ) goto goto_next_file;
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
         if ( mpctx->stream->type == STREAMTYPE_DVD )
 	 {
 	  dvd_priv_t * dvdp = mpctx->stream->priv;
@@ -3966,7 +3966,7 @@
     current_module="sub_free";
     for(i = 0; i < mpctx->set_of_sub_size; ++i) {
         sub_free(mpctx->set_of_subtitles[i]);
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
         if(mpctx->set_of_ass_tracks[i])
             ass_free_track( mpctx->set_of_ass_tracks[i] );
 #endif
@@ -3975,7 +3975,7 @@
 }
 vo_sub_last = vo_sub=NULL;
 subdata=NULL;
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
 ass_track = NULL;
 if(ass_library)
     ass_clear_fonts(ass_library);
@@ -4022,7 +4022,7 @@
 
 #ifdef HAVE_NEW_GUI
 if(use_gui && !mpctx->playtree_iter) {
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
     if(!guiIntfStruct.DiskChanged)
 #endif
         mplEnd();
--- a/osdep/getch2-os2.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/osdep/getch2-os2.c	Wed Jul 30 12:01:30 2008 +0000
@@ -32,7 +32,7 @@
 #include "input/input.h"
 #include "mp_fifo.h"
 
-#if defined( USE_LANGINFO ) && defined( USE_ICONV )
+#if defined(CONFIG_LANGINFO) && defined(CONFIG_ICONV)
 #include <locale.h>
 #include <langinfo.h>
 #endif
@@ -182,12 +182,12 @@
     getch2_status = 0;
 }
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 char *get_term_charset( void )
 {
     char *charset = NULL;
 
-#ifdef USE_LANGINFO
+#ifdef CONFIG_LANGINFO
     setlocale( LC_CTYPE, "");
     charset = nl_langinfo( CODESET );
     setlocale( LC_CTYPE, "C");
--- a/osdep/getch2-win.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/osdep/getch2-win.c	Wed Jul 30 12:01:30 2008 +0000
@@ -142,7 +142,7 @@
     getch2_status=0;
 }
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 static const struct {
     unsigned cp;
     char* alias;
--- a/osdep/getch2.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/osdep/getch2.c	Wed Jul 30 12:01:30 2008 +0000
@@ -2,9 +2,9 @@
 
 #include "config.h"
 
-//#define USE_TERMCAP
+//#define CONFIG_TERMCAP
 #if !defined(__OS2__) && !defined(__MORPHOS__)
-#define USE_IOCTL
+#define CONFIG_IOCTL
 #endif
 
 #define MAX_KEYS 64
@@ -15,7 +15,7 @@
 #include <string.h>
 #include <sys/time.h>
 #include <sys/types.h>
-#ifdef USE_IOCTL
+#ifdef CONFIG_IOCTL
 #include <sys/ioctl.h>
 #endif
 
@@ -28,7 +28,7 @@
 #endif
 #endif
 
-#if defined(USE_LANGINFO) && defined(USE_ICONV)
+#if defined(CONFIG_LANGINFO) && defined(CONFIG_ICONV)
 #include <locale.h>
 #include <langinfo.h>
 #endif
@@ -56,7 +56,7 @@
 static keycode_st getch2_keys[MAX_KEYS];
 static int getch2_key_db=0;
 
-#ifdef USE_TERMCAP
+#ifdef CONFIG_TERMCAP
 
 #if 0
 #include <termcap.h>
@@ -125,7 +125,7 @@
 #endif
 
 void get_screen_size(void){
-#ifdef USE_IOCTL
+#ifdef CONFIG_IOCTL
   struct winsize ws;
   if (ioctl(0, TIOCGWINSZ, &ws) < 0 || !ws.ws_row || !ws.ws_col) return;
 /*  printf("Using IOCTL\n"); */
@@ -270,11 +270,11 @@
     getch2_status=0;
 }
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 char* get_term_charset(void)
 {
     char* charset = NULL;
-#ifdef USE_LANGINFO
+#ifdef CONFIG_LANGINFO
     setlocale(LC_CTYPE, "");
     charset = nl_langinfo(CODESET);
     setlocale(LC_CTYPE, "C");
--- a/stream/asf_mmst_streaming.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/stream/asf_mmst_streaming.c	Wed Jul 30 12:01:30 2008 +0000
@@ -45,13 +45,13 @@
 #include <winsock2.h>
 #endif
 
-#ifndef USE_SETLOCALE
-#undef USE_ICONV
+#ifndef CONFIG_SETLOCALE
+#undef CONFIG_ICONV
 #endif
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 #include <iconv.h>
-#ifdef USE_LANGINFO
+#ifdef CONFIG_LANGINFO
 #include <langinfo.h>
 #endif
 #endif
@@ -143,13 +143,13 @@
   }
 }
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 static iconv_t url_conv;
 #endif
 
 static void string_utf16(char *dest, char *src, int len) {
     int i;
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
     size_t len1, len2;
     char *ip, *op;
 
@@ -172,7 +172,7 @@
 	/* trailing zeroes */
 	dest[i*2] = 0;
 	dest[i*2+1] = 0;
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
     }
 #endif
 }
@@ -575,8 +575,8 @@
   * */
 
   /* prepare for the url encoding conversion */
-#ifdef USE_ICONV
-#ifdef USE_LANGINFO
+#ifdef CONFIG_ICONV
+#ifdef CONFIG_LANGINFO
   url_conv = iconv_open("UTF-16LE",nl_langinfo(CODESET));
 #else
   url_conv = iconv_open("UTF-16LE", NULL);
@@ -690,7 +690,7 @@
   packet_length1 = packet_length;
   mp_msg(MSGT_NETWORK,MSGL_INFO,"mmst packet_length = %d\n", packet_length);
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
   if (url_conv != (iconv_t)(-1))
     iconv_close(url_conv);
 #endif
--- a/stream/audio_in.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/stream/audio_in.c	Wed Jul 30 12:01:30 2008 +0000
@@ -30,7 +30,7 @@
 	ai->alsa.device = strdup("default");
 	return 0;
 #endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
     case AUDIO_IN_OSS:
 	ai->oss.audio_fd = -1;
 	ai->oss.device = strdup("/dev/dsp");
@@ -51,7 +51,7 @@
 	ai->setup = 1;
 	return 0;
 #endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
     case AUDIO_IN_OSS:
 	if (ai_oss_init(ai) < 0) return -1;
 	ai->setup = 1;
@@ -72,7 +72,7 @@
 	if (ai_alsa_setup(ai) < 0) return -1;
 	return ai->samplerate;
 #endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
     case AUDIO_IN_OSS:
 	ai->req_samplerate = rate;
 	if (!ai->setup) return 0;
@@ -94,7 +94,7 @@
 	if (ai_alsa_setup(ai) < 0) return -1;
 	return ai->channels;
 #endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
     case AUDIO_IN_OSS:
 	ai->req_channels = channels;
 	if (!ai->setup) return 0;
@@ -123,7 +123,7 @@
 	}
 	return 0;
 #endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
     case AUDIO_IN_OSS:
 	if (ai->oss.device) free(ai->oss.device);
 	ai->oss.device = strdup(device);
@@ -148,7 +148,7 @@
 	    ai->setup = 0;
 	    return 0;
 #endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
 	case AUDIO_IN_OSS:
 	    close(ai->oss.audio_fd);
 	    ai->setup = 0;
@@ -166,7 +166,7 @@
     case AUDIO_IN_ALSA:
 	return snd_pcm_start(ai->alsa.handle);
 #endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
     case AUDIO_IN_OSS:
 	return 0;
 #endif
@@ -200,7 +200,7 @@
 	}
 	return ret;
 #endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
     case AUDIO_IN_OSS:
 	ret = read(ai->oss.audio_fd, buffer, ai->blocksize);
 	if (ret != ai->blocksize) {
--- a/stream/audio_in.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/stream/audio_in.h	Wed Jul 30 12:01:30 2008 +0000
@@ -19,7 +19,7 @@
 } ai_alsa_t;
 #endif
 
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
 typedef struct {
     char *device;
 
@@ -46,7 +46,7 @@
 #if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X)
     ai_alsa_t alsa;
 #endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
     ai_oss_t oss;
 #endif
 } audio_in_t;
@@ -66,7 +66,7 @@
 int ai_alsa_xrun(audio_in_t *ai);
 #endif
 
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
 int ai_oss_set_samplerate(audio_in_t *ai);
 int ai_oss_set_channels(audio_in_t *ai);
 int ai_oss_init(audio_in_t *ai);
--- a/stream/librtsp/rtsp_rtp.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/stream/librtsp/rtsp_rtp.c	Wed Jul 30 12:01:30 2008 +0000
@@ -297,7 +297,7 @@
     sin.sin_addr.s_addr = htonl (INADDR_ANY);
   else
 #ifndef HAVE_WINSOCK2
-#ifdef USE_ATON
+#ifdef CONFIG_ATON
     inet_aton (hostname, &sin.sin_addr);
 #else
     inet_pton (AF_INET, hostname, &sin.sin_addr);
@@ -386,7 +386,7 @@
   sin.sin_family = AF_INET;
 
 #ifndef HAVE_WINSOCK2
-#ifdef USE_ATON
+#ifdef CONFIG_ATON
     inet_aton (addr, &sin.sin_addr);
 #else
     inet_pton (AF_INET, addr, &sin.sin_addr);
--- a/stream/network.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/stream/network.c	Wed Jul 30 12:01:30 2008 +0000
@@ -87,7 +87,7 @@
 	// NullSoft Streaming Video
 	{ "video/nsv", DEMUXER_TYPE_NSV},
 	{ "misc/ultravox", DEMUXER_TYPE_NSV},
-#ifdef USE_LIBAVFORMAT
+#ifdef CONFIG_LIBAVFORMAT
 	// Flash Video
 	{ "video/x-flv", DEMUXER_TYPE_LAVF},
 #endif
--- a/stream/stream.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/stream/stream.c	Wed Jul 30 12:01:30 2008 +0000
@@ -88,10 +88,10 @@
 #ifdef HAS_DVBIN_SUPPORT
   &stream_info_dvb,
 #endif
-#ifdef USE_TV
+#ifdef CONFIG_TV
   &stream_info_tv,
 #endif
-#ifdef USE_RADIO
+#ifdef CONFIG_RADIO
   &stream_info_radio,
 #endif
 #ifdef HAVE_PVR
@@ -107,11 +107,11 @@
   &stream_info_smb,
 #endif
   &stream_info_cue,
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
   &stream_info_ifo,
   &stream_info_dvd,
 #endif
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
   &stream_info_dvdnav,
 #endif
 
@@ -381,7 +381,7 @@
 
 int stream_control(stream_t *s, int cmd, void *arg){
   if(!s->control) return STREAM_UNSUPPORTED;
-#ifdef USE_STREAM_CACHE
+#ifdef CONFIG_STREAM_CACHE
   if (s->cache_pid)
     return cache_do_control(s, cmd, arg);
 #endif
@@ -431,7 +431,7 @@
 
 void free_stream(stream_t *s){
 //  printf("\n*** free_stream() called ***\n");
-#ifdef USE_STREAM_CACHE
+#ifdef CONFIG_STREAM_CACHE
   if(s->cache_pid) {
     cache_uninit(s);
   }
--- a/stream/stream.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/stream/stream.h	Wed Jul 30 12:01:30 2008 +0000
@@ -118,7 +118,7 @@
   unsigned char buffer[STREAM_BUFFER_SIZE>VCD_SECTOR_SIZE?STREAM_BUFFER_SIZE:VCD_SECTOR_SIZE];
 } stream_t;
 
-#ifdef USE_STREAM_CACHE
+#ifdef CONFIG_STREAM_CACHE
 int stream_enable_cache(stream_t *stream,int size,int min,int prefill);
 int cache_stream_fill_buffer(stream_t *s);
 int cache_stream_seek_long(stream_t *s,off_t pos);
--- a/stream/stream_dvd.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/stream/stream_dvd.h	Wed Jul 30 12:01:30 2008 +0000
@@ -3,7 +3,7 @@
 
 #include "config.h"
 #include <stdint.h>
-#ifdef USE_DVDREAD_INTERNAL
+#ifdef CONFIG_DVDREAD_INTERNAL
 #include "dvdread/dvd_reader.h"
 #include "dvdread/ifo_types.h"
 #include "dvdread/ifo_read.h"
--- a/stream/stream_dvd_common.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/stream/stream_dvd_common.c	Wed Jul 30 12:01:30 2008 +0000
@@ -1,6 +1,6 @@
 #include "config.h"
 #include <inttypes.h>
-#ifdef USE_DVDREAD_INTERNAL
+#ifdef CONFIG_DVDREAD_INTERNAL
 #include <dvdread/ifo_types.h>
 #else
 #include <libdvdread/ifo_types.h>
--- a/stream/stream_dvd_common.h	Wed Jul 30 11:48:01 2008 +0000
+++ b/stream/stream_dvd_common.h	Wed Jul 30 12:01:30 2008 +0000
@@ -3,7 +3,7 @@
 
 #include "config.h"
 #include <inttypes.h>
-#ifdef USE_DVDREAD_INTERNAL
+#ifdef CONFIG_DVDREAD_INTERNAL
 #include <dvdread/ifo_types.h>
 #else
 #include <libdvdread/ifo_types.h>
--- a/stream/stream_radio.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/stream/stream_radio.c	Wed Jul 30 12:01:30 2008 +0000
@@ -66,7 +66,7 @@
 #include "stream_radio.h"
 #include "libavutil/avstring.h"
 
-#ifdef USE_RADIO_CAPTURE
+#ifdef CONFIG_RADIO_CAPTURE
 #include "audio_in.h"
 
 #ifdef HAVE_SYS_SOUNDCARD_H
@@ -117,7 +117,7 @@
     float rangehigh;                       ///< highest tunable frequency in MHz
     const struct radio_driver_s*     driver;
     int                 old_snd_volume;
-#ifdef USE_RADIO_CAPTURE
+#ifdef CONFIG_RADIO_CAPTURE
     volatile int        do_capture;        ///< is capture enabled
     audio_in_t          audio_in;
     unsigned char*      audio_ringbuffer;
@@ -156,7 +156,7 @@
 };
 
 static void close_s(struct stream_st * stream);
-#ifdef USE_RADIO_CAPTURE
+#ifdef CONFIG_RADIO_CAPTURE
 static int clear_buffer(radio_priv_t* priv);
 #endif
 
@@ -665,7 +665,7 @@
     if(priv->driver->set_frequency(priv,frequency)!=STREAM_OK)
         return STREAM_ERROR;
 	
-#ifdef USE_RADIO_CAPTURE
+#ifdef CONFIG_RADIO_CAPTURE
     if(clear_buffer(priv)!=STREAM_OK){
         mp_msg(MSGT_RADIO,MSGL_ERR,MSGTR_RADIO_ClearBufferFailed,strerror(errno));
         return  STREAM_ERROR;
@@ -684,7 +684,7 @@
 }
 
 
-#ifndef USE_RADIO_CAPTURE
+#ifndef CONFIG_RADIO_CAPTURE
 /*****************************************************************
  * \brief stub, if capture disabled at compile-time
  * \return STREAM_OK
@@ -737,7 +737,7 @@
         }
         return ret;
 #endif
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
     case AUDIO_IN_OSS:
     {
         int bt=0;
@@ -858,7 +858,7 @@
         mp_msg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_AudioInSetupFailed, strerror(errno));
         return STREAM_ERROR;
     }
-#ifdef USE_OSS_AUDIO
+#ifdef CONFIG_OSS_AUDIO
     if(is_oss)
         ioctl(priv->audio_in.oss.audio_fd, SNDCTL_DSP_NONBLOCK, 0);
 #endif
@@ -890,7 +890,7 @@
 
     return STREAM_OK;
 }
-#endif //USE_RADIO_CAPTURE
+#endif /* CONFIG_RADIO_CAPTURE */
 
 /*-------------------------------------------------------------------------
  for call from mplayer.c
@@ -1062,7 +1062,7 @@
 static int fill_buffer_s(struct stream_st *s, char* buffer, int max_len){
     int len=max_len;
 
-#ifdef USE_RADIO_CAPTURE
+#ifdef CONFIG_RADIO_CAPTURE
     radio_priv_t* priv=(radio_priv_t*)s->priv;
 
     if (priv->do_capture){
@@ -1115,7 +1115,7 @@
 
     priv->radio_param=opts;
 
-#ifdef USE_RADIO_CAPTURE
+#ifdef CONFIG_RADIO_CAPTURE
     if (priv->radio_param->capture && strncmp("capture",priv->radio_param->capture,7)==0)
         priv->do_capture=1;
     else
@@ -1199,7 +1199,7 @@
         return STREAM_ERROR;
     }
 
-#if defined(USE_RADIO_CAPTURE) && defined(USE_STREAM_CACHE)
+#if defined(CONFIG_RADIO_CAPTURE) && defined(CONFIG_STREAM_CACHE)
     if(priv->do_capture){
         //5 second cache
         if(!stream_enable_cache(stream,5*priv->audio_in.samplerate*priv->audio_in.channels*
@@ -1225,7 +1225,7 @@
     radio_channels_t * tmp;
     if (!priv) return;
 
-#ifdef USE_RADIO_CAPTURE
+#ifdef CONFIG_RADIO_CAPTURE
     if(priv->audio_ringbuffer){
         free(priv->audio_ringbuffer);
         priv->audio_ringbuffer=NULL;
--- a/stream/tcp.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/stream/tcp.c	Wed Jul 30 12:01:30 2008 +0000
@@ -116,7 +116,7 @@
 	memset(&server_address, 0, sizeof(server_address));
 	
 #ifndef HAVE_WINSOCK2
-#ifdef USE_ATON
+#ifdef CONFIG_ATON
 	if (inet_aton(host, our_s_addr)!=1)
 #else
 	if (inet_pton(af, host, our_s_addr)!=1)
@@ -164,7 +164,7 @@
 			return TCP_ERROR_FATAL;
 	}
 
-#if defined(USE_ATON) || defined(HAVE_WINSOCK2)
+#if defined(CONFIG_ATON) || defined(HAVE_WINSOCK2)
 	strncpy( buf, inet_ntoa( *((struct in_addr*)our_s_addr) ), 255);
 #else
 	inet_ntop(af, our_s_addr, buf, 255);
--- a/stream/tvi_bsdbt848.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/stream/tvi_bsdbt848.c	Wed Jul 30 12:01:30 2008 +0000
@@ -39,7 +39,7 @@
 #include <errno.h>
 
 #include <sys/param.h>
-#ifdef USE_SUN_AUDIO
+#ifdef CONFIG_SUN_AUDIO
 #include <sys/audioio.h>
 #endif
 
@@ -206,7 +206,7 @@
 
     /* set audio device name */
     if (!tv_param->adevice)
-#ifdef USE_SUN_AUDIO
+#ifdef CONFIG_SUN_AUDIO
         priv->dspdev = strdup("/dev/sound");
 #else
         priv->dspdev = strdup("/dev/dsp");
@@ -845,13 +845,13 @@
 static int get_audio_framesize(priv_t *priv)
 {
 int bytesavail;
-#ifdef USE_SUN_AUDIO
+#ifdef CONFIG_SUN_AUDIO
 struct audio_info auinf;
 #endif
 
 if(priv->dspready == FALSE) return 0;
 
-#ifdef USE_SUN_AUDIO
+#ifdef CONFIG_SUN_AUDIO
 if(ioctl(priv->dspfd, AUDIO_GETINFO, &auinf) < 0) 
     {
     mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_Bt848IoctlFailed, "AUDIO_GETINFO", strerror(errno));
--- a/stream/udp.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/stream/udp.c	Wed Jul 30 12:01:30 2008 +0000
@@ -92,11 +92,11 @@
   else
   {
 #ifndef HAVE_WINSOCK2
-#ifdef USE_ATON
+#ifdef CONFIG_ATON
     inet_aton (url->hostname, &server_address.sin_addr);
 #else
     inet_pton (AF_INET, url->hostname, &server_address.sin_addr);
-#endif /* USE_ATON */
+#endif /* CONFIG_ATON */
 #else
     server_address.sin_addr.s_addr = htonl(INADDR_ANY);
 #endif /* HAVE_WINSOCK2 */
--- a/subreader.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/subreader.c	Wed Jul 30 12:01:30 2008 +0000
@@ -26,11 +26,11 @@
 
 #define ERR ((void *) -1)
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 #include <iconv.h>
 char *sub_cp=NULL;
 #endif
-#ifdef USE_FRIBIDI
+#ifdef CONFIG_FRIBIDI
 #include <fribidi/fribidi.h>
 char *fribidi_charset = NULL;   ///character set that will be passed to FriBiDi
 int flip_hebrew = 1;            ///flip subtitles using fribidi
@@ -52,14 +52,14 @@
 
 /* Use the SUB_* constant defined in the header file */
 int sub_format=SUB_INVALID;
-#ifdef USE_SORTSUB
+#ifdef CONFIG_SORTSUB
 /* 
    Some subtitling formats, namely AQT and Subrip09, define the end of a
    subtitle as the beginning of the following. Since currently we read one
    subtitle at time, for these format we keep two global *subtitle,
    previous_aqt_sub and previous_subrip09_sub, pointing to previous subtitle,
    so we can change its end when we read current subtitle starting time.
-   When USE_SORTSUB is defined, we use a single global unsigned long, 
+   When CONFIG_SORTSUB is defined, we use a single global unsigned long,
    previous_sub_end, for both (and even future) formats, to store the end of
    the previous sub: it is initialized to 0 in sub_read_file and eventually
    modified by sub_read_aqt_line or sub_read_subrip09_line.
@@ -702,7 +702,7 @@
 	return NULL; // we should have returned before if it's OK
 }
 
-#ifndef USE_SORTSUB
+#ifndef CONFIG_SORTSUB
 //we don't need this if we use previous_sub_end
 subtitle *previous_aqt_sub = NULL;
 #endif
@@ -720,7 +720,7 @@
 		break;
     }
     
-#ifdef USE_SORTSUB
+#ifdef CONFIG_SORTSUB
     previous_sub_end = (current->start) ? current->start - 1 : 0; 
 #else
     if (previous_aqt_sub != NULL) 
@@ -748,7 +748,7 @@
     current->lines=i+1;
 
     if (!strlen(current->text[0]) && !strlen(current->text[1])) {
-#ifdef USE_SORTSUB
+#ifdef CONFIG_SORTSUB
 	previous_sub_end = 0;
 #else
 	// void subtitle -> end of previous marked and exit
@@ -760,7 +760,7 @@
     return current;
 }
 
-#ifndef USE_SORTSUB
+#ifndef CONFIG_SORTSUB
 subtitle *previous_subrip09_sub = NULL;
 #endif
 
@@ -780,7 +780,7 @@
 
     current->start = a1*360000+a2*6000+a3*100;
     
-#ifdef USE_SORTSUB
+#ifdef CONFIG_SORTSUB
     previous_sub_end = (current->start) ? current->start - 1 : 0; 
 #else
     if (previous_subrip09_sub != NULL) 
@@ -804,7 +804,7 @@
     current->lines=i+1;
 
     if (!strlen(current->text[0]) && (i==0)) {
-#ifdef USE_SORTSUB
+#ifdef CONFIG_SORTSUB
 	previous_sub_end = 0;
 #else
 	// void subtitle -> end of previous marked and exit
@@ -1071,7 +1071,7 @@
 extern float sub_delay;
 extern float sub_fps;
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 static iconv_t icdsc = (iconv_t)(-1);
 
 void	subcp_open (stream_t *st)
@@ -1146,7 +1146,7 @@
 }
 #endif
 
-#ifdef USE_FRIBIDI
+#ifdef CONFIG_FRIBIDI
 #ifndef max
 #define max(a,b)  (((a)>(b))?(a):(b))
 #endif
@@ -1369,7 +1369,7 @@
     stream_reset(fd);
     stream_seek(fd,0);
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
     sub_utf8_prev=sub_utf8;
     {
 	    int l,k;
@@ -1389,14 +1389,14 @@
     sub_num=0;n_max=32;
     first=malloc(n_max*sizeof(subtitle));
     if(!first){
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 	  subcp_close();
           sub_utf8=sub_utf8_prev;
 #endif
 	    return NULL;
     }
     
-#ifdef USE_SORTSUB
+#ifdef CONFIG_SORTSUB
     sub = malloc(sizeof(subtitle));
     //This is to deal with those formats (AQT & Subrip) which define the end of a subtitle
     //as the beginning of the following
@@ -1407,21 +1407,21 @@
             n_max+=16;
             first=realloc(first,n_max*sizeof(subtitle));
         }
-#ifndef USE_SORTSUB
+#ifndef CONFIG_SORTSUB
 	sub = &first[sub_num];
 #endif	
 	memset(sub, '\0', sizeof(subtitle));
         sub=srp->read(fd,sub);
         if(!sub) break;   // EOF
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 	if ((sub!=ERR) && (sub_utf8 & 2)) sub=subcp_recode(sub);
 #endif
-#ifdef USE_FRIBIDI
+#ifdef CONFIG_FRIBIDI
 	if (sub!=ERR) sub=sub_fribidi(sub,sub_utf8);
 #endif
 	if ( sub == ERR )
 	 {
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
           subcp_close();
 #endif
     	  if ( first ) free(first);
@@ -1429,7 +1429,7 @@
 	 }
         // Apply any post processing that needs recoding first
         if ((sub!=ERR) && !sub_no_text_pp && srp->post) srp->post(sub);
-#ifdef USE_SORTSUB
+#ifdef CONFIG_SORTSUB
 	if(!sub_num || (first[sub_num - 1].start <= sub->start)){
 	    first[sub_num].start = sub->start;
   	    first[sub_num].end   = sub->end;
@@ -1474,7 +1474,7 @@
     
     free_stream(fd);
 
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
     subcp_close();
 #endif
 
@@ -1876,7 +1876,7 @@
 
 		// does it end with a subtitle extension?
 		found = 0;
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 #ifdef HAVE_ENCA
 		for (i = ((sub_cp && strncasecmp(sub_cp, "enca", 4) != 0) ? 3 : 0); sub_exts[i]; i++) {
 #else
@@ -1931,7 +1931,7 @@
 
 		    if (prio) {
 			prio += prio;
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
 			if (i<3){ // prefer UTF-8 coded
 			    prio++;
 			}
--- a/vobsub.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/vobsub.c	Wed Jul 30 12:01:30 2008 +0000
@@ -20,7 +20,7 @@
 #include "vobsub.h"
 #include "spudec.h"
 #include "mp_msg.h"
-#ifdef USE_UNRAR_EXEC
+#ifdef CONFIG_UNRAR_EXEC
 #include "unrar_exec.h"
 #endif
 #include "libavutil/common.h"
@@ -34,7 +34,7 @@
  * RAR stream handling
  * The RAR file must have the same basename as the file to open
  **********************************************************************/
-#ifdef USE_UNRAR_EXEC
+#ifdef CONFIG_UNRAR_EXEC
 typedef struct {
     FILE *file;
     unsigned char *data;