changeset 27393:4876c89bafdd

Rename font-related preprocessor directives. Switch them from a HAVE_ to a CONFIG_ prefix.
author diego
date Thu, 07 Aug 2008 10:36:07 +0000
parents f28981b3f233
children a0c602e0caf3
files cfg-common-opts.h cfg-mplayer.h command.c configure gui/cfg.c gui/interface.c gui/mplayer/gtk/fs.c gui/mplayer/gtk/opts.c libass/ass.c libass/ass_font.c libass/ass_fontconfig.c libass/ass_fontconfig.h libass/ass_mp.c libmenu/menu.c libmenu/vf_menu.c libmpdemux/demux_ogg.c libvo/font_load.h libvo/font_load_ft.c libvo/sub.c libvo/vo_aa.c libvo/vo_dxr3.c libvo/vo_gl.c mencoder.c mp_msg.c mplayer.c osdep/getch2-os2.c osdep/getch2-win.c osdep/getch2.c stream/asf_mmst_streaming.c subreader.c subreader.h
diffstat 31 files changed, 132 insertions(+), 132 deletions(-) [+]
line wrap: on
line diff
--- a/cfg-common-opts.h	Thu Aug 07 09:53:59 2008 +0000
+++ b/cfg-common-opts.h	Thu Aug 07 10:36:07 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 HAVE_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},
@@ -264,7 +264,7 @@
 // ------------------------- subtitles options --------------------
 
 	{"sub", &sub_name, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
-#ifdef HAVE_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 /* HAVE_FRIBIDI */
-#ifdef HAVE_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},
@@ -309,7 +309,7 @@
 	{"spualign", &spu_alignment, CONF_TYPE_INT, CONF_RANGE, -1, 2, NULL},
 	{"spuaa", &spu_aamode, CONF_TYPE_INT, CONF_RANGE, 0, 31, NULL},
 	{"spugauss", &spu_gaussvar, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 3.0, NULL},
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
 	{"subfont-encoding", &subtitle_font_encoding, CONF_TYPE_STRING, 0, 0, 0, NULL},
  	{"subfont-text-scale", &text_font_scale_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL},
  	{"subfont-osd-scale", &osd_font_scale_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL},
@@ -334,12 +334,12 @@
 	{"ass-styles", &ass_styles_file, CONF_TYPE_STRING, 0, 0, 0, NULL},
 	{"ass-hinting", &ass_hinting, CONF_TYPE_INT, CONF_RANGE, 0, 7, NULL},
 #endif
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
 	{"fontconfig", &font_fontconfig, CONF_TYPE_FLAG, 0, -1, 1, NULL},
 	{"nofontconfig", &font_fontconfig, CONF_TYPE_FLAG, 0, 1, -1, NULL},
 #else
 	{"fontconfig", "MPlayer was compiled without fontconfig support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
 	{"nofontconfig", "MPlayer was compiled without fontconfig support.\n", CONF_TYPE_PRINT, CONF_NOCFG, 0, 0, NULL},
-#endif /* HAVE_FONTCONFIG */
+#endif /* CONFIG_FONTCONFIG */
 
 #endif /* MPLAYER_CFG_COMMON_OPTS_H */
--- a/cfg-mplayer.h	Thu Aug 07 09:53:59 2008 +0000
+++ b/cfg-mplayer.h	Thu Aug 07 10:36:07 2008 +0000
@@ -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 HAVE_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 /* HAVE_FRIBIDI */
+#endif /* CONFIG_FRIBIDI */
 #else
 	{"menu", "OSD menu support was not compiled in.\n", CONF_TYPE_PRINT,0, 0, 0, NULL},
 #endif /* CONFIG_MENU */
--- a/command.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/command.c	Thu Aug 07 10:36:07 2008 +0000
@@ -1776,7 +1776,7 @@
 
 }
 
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
 /// Subtitle scale (RW)
 static int mp_property_sub_scale(m_option_t * prop, int action, void *arg,
 			      MPContext * mpctx)
@@ -2076,7 +2076,7 @@
      M_OPT_RANGE, 0, 1, NULL },
     { "sub_forced_only", mp_property_sub_forced_only, CONF_TYPE_FLAG,
      M_OPT_RANGE, 0, 1, NULL },
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
     { "sub_scale", mp_property_sub_scale, CONF_TYPE_FLOAT,
      M_OPT_RANGE, 0, 100, NULL },
 #endif
@@ -2209,7 +2209,7 @@
     { "sub_delay", MP_CMD_SUB_DELAY, 0, 0, OSD_MSG_SUB_DELAY, MSGTR_SubDelayStatus },
     { "sub_visibility", MP_CMD_SUB_VISIBILITY, 1, 0, -1, MSGTR_SubVisibleStatus },
     { "sub_forced_only", MP_CMD_SUB_FORCED_ONLY, 1, 0, -1, MSGTR_SubForcedOnlyStatus },
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
     { "sub_scale", MP_CMD_SUB_SCALE, 0, 0, -1, MSGTR_SubScale},
 #endif
 #ifdef CONFIG_ASS
--- a/configure	Thu Aug 07 09:53:59 2008 +0000
+++ b/configure	Thu Aug 07 10:36:07 2008 +0000
@@ -3173,9 +3173,9 @@
   done
 fi
 if test "$_iconv" = yes ; then
-  _def_iconv='#define HAVE_ICONV 1'
-else
-  _def_iconv='#undef HAVE_ICONV'
+  _def_iconv='#define CONFIG_ICONV 1'
+else
+  _def_iconv='#undef CONFIG_ICONV'
 fi
 echores "$_iconv"
 
@@ -5647,11 +5647,11 @@
     fi
 fi
 if test "$_freetype" = yes ; then
-    _def_freetype='#define HAVE_FREETYPE'
+    _def_freetype='#define CONFIG_FREETYPE'
     _inc_extra="$_inc_extra `$_freetypeconfig --cflags`"
     _ld_extra="$_ld_extra `$_freetypeconfig --libs`"
 else
-    _def_freetype='#undef HAVE_FREETYPE'
+    _def_freetype='#undef CONFIG_FREETYPE'
 fi
 echores "$_freetype"
 
@@ -5687,9 +5687,9 @@
   fi
 fi
 if test "$_fontconfig" = yes ; then
-    _def_fontconfig='#define HAVE_FONTCONFIG'
-else
-    _def_fontconfig='#undef HAVE_FONTCONFIG'
+    _def_fontconfig='#define CONFIG_FONTCONFIG'
+else
+    _def_fontconfig='#undef CONFIG_FONTCONFIG'
 fi
 echores "$_fontconfig"
 
@@ -5747,11 +5747,11 @@
     fi
 fi
 if test "$_fribidi" = yes ; then
-    _def_fribidi='#define HAVE_FRIBIDI'
+    _def_fribidi='#define CONFIG_FRIBIDI'
     _inc_extra="$_inc_extra `$_fribidiconfig --cflags`"
     _ld_extra="$_ld_extra `$_fribidiconfig --libs`"
 else
-    _def_fribidi='#undef HAVE_FRIBIDI'
+    _def_fribidi='#undef CONFIG_FRIBIDI'
 fi
 echores "$_fribidi"
 
@@ -5772,10 +5772,10 @@
     cc_check -lenca $_ld_lm && _enca=yes
 fi
     if test "$_enca" = yes ; then
-	_def_enca='#define HAVE_ENCA 1'
+	_def_enca='#define CONFIG_ENCA 1'
 	_ld_extra="$_ld_extra -lenca"
     else
-	_def_enca='#undef HAVE_ENCA'
+	_def_enca='#undef CONFIG_ENCA'
     fi
 echores "$_enca"
 
--- a/gui/cfg.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/gui/cfg.c	Thu Aug 07 10:36:07 2008 +0000
@@ -165,12 +165,12 @@
 #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 HAVE_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 },
  { "font_name",&font_name,CONF_TYPE_STRING,0,0,0,NULL },
-#ifdef HAVE_FREETYPE 
+#ifdef CONFIG_FREETYPE
  { "font_encoding",&subtitle_font_encoding,CONF_TYPE_STRING,0,0,0,NULL },
  { "font_text_scale",&text_font_scale_factor,CONF_TYPE_FLOAT,CONF_RANGE,0,100,NULL },
  { "font_osd_scale",&osd_font_scale_factor,CONF_TYPE_FLOAT,CONF_RANGE,0,100,NULL },
--- a/gui/interface.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/gui/interface.c	Thu Aug 07 10:36:07 2008 +0000
@@ -51,7 +51,7 @@
 
 extern af_cfg_t af_cfg;
 
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
 #include <iconv.h>
 #endif
 
@@ -400,7 +400,7 @@
 
 void guiLoadFont( void )
 {
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
   load_font_ft(vo_image_width, vo_image_height, &vo_font, font_name, osd_font_scale_factor);
 #else
  if ( vo_font )
@@ -1075,7 +1075,7 @@
          } else { url_item->next=NULL; URLList=url_item; }
         return NULL;
 // --- subtitle
-#ifndef HAVE_FREETYPE
+#ifndef CONFIG_FREETYPE
    case gtkSetFontFactor:
         font_factor=fparam;
 	guiLoadFont();
@@ -1107,7 +1107,7 @@
 	guiLoadFont();
 	return NULL;
 #endif
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
    case gtkSetSubEncoding:
 	gfree( (void **)&sub_cp );
 	sub_cp=gstrdup( (char *)vparam );
--- a/gui/mplayer/gtk/fs.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/gui/mplayer/gtk/fs.c	Thu Aug 07 10:36:07 2008 +0000
@@ -116,7 +116,7 @@
 
 char * fsFontFileNames[][2] =
          {
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
 	   { "True Type fonts (*.ttf)",					   "*.ttf" },
 	   { "Type1 fonts (*.pfb)",					   "*.pfb" },
 	   { "All fonts",						   "*.ttf,*.pfb" },
--- a/gui/mplayer/gtk/opts.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/gui/mplayer/gtk/opts.c	Thu Aug 07 10:36:07 2008 +0000
@@ -122,7 +122,7 @@
 static GtkAdjustment * HSExtraStereoMuladj, * HSAudioDelayadj, * HSPanscanadj, * HSSubDelayadj;
 static GtkAdjustment * HSSubPositionadj, * HSSubFPSadj, * HSPPQualityadj, * HSFPSadj;
 
-#ifndef HAVE_FREETYPE
+#ifndef CONFIG_FREETYPE
 static GtkWidget     * HSFontFactor;
 static GtkAdjustment * HSFontFactoradj;
 #else
@@ -133,11 +133,11 @@
 //static GtkWidget     * AutoScale;
 #endif
 
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
 static GtkWidget     * CBSubEncoding, * ESubEncoding;
 #endif
 
-#if defined(HAVE_FREETYPE) || defined(HAVE_ICONV)
+#if defined(CONFIG_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(HAVE_ICONV)
+#if defined(CONFIG_FREETYPE) || defined(CONFIG_ICONV)
 static void prEntry( GtkContainer * container,gpointer user_data );
 #endif
 
@@ -312,7 +312,7 @@
  if ( guiIntfStruct.Subtitlename ) gtk_entry_set_text( GTK_ENTRY( ESubtitleName ),guiIntfStruct.Subtitlename );
 #endif
 
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
  if ( sub_cp )
   {
    int i;
@@ -326,7 +326,7 @@
 // --- 4. page
  // font ...
  if ( font_name ) gtk_entry_set_text( GTK_ENTRY( prEFontName ),font_name );
-#ifndef HAVE_FREETYPE
+#ifndef CONFIG_FREETYPE
  gtk_adjustment_set_value( HSFontFactoradj,font_factor );
 #else
  gtk_adjustment_set_value( HSFontBluradj,( subtitle_font_radius / 8.0f ) * 100.0f );
@@ -434,7 +434,7 @@
  gtk_signal_connect( GTK_OBJECT( CBSoftwareMixer ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)1 );
  gtk_signal_connect( GTK_OBJECT( CBAudioEqualizer ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)2 );
  gtk_signal_connect( GTK_OBJECT( CBShowVideoWindow ),"toggled",GTK_SIGNAL_FUNC( prToggled ), (void*)3 );
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
  gtk_signal_connect( GTK_OBJECT( RBFontNoAutoScale ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)4 );
  gtk_signal_connect( GTK_OBJECT( RBFontAutoScaleHeight ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)5 );
  gtk_signal_connect( GTK_OBJECT( RBFontAutoScaleWidth ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)6 );
@@ -451,7 +451,7 @@
  gtk_signal_connect( GTK_OBJECT( HSPanscan ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)2 );
  gtk_signal_connect( GTK_OBJECT( HSSubDelay ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)3 );
  gtk_signal_connect( GTK_OBJECT( HSSubPosition ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)4 );
-#ifndef HAVE_FREETYPE
+#ifndef CONFIG_FREETYPE
  gtk_signal_connect( GTK_OBJECT( HSFontFactor ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)5 );
 #else
  gtk_signal_connect( GTK_OBJECT( HSFontBlur ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)6 );
@@ -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 HAVE_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(HAVE_ICONV)
+#if defined(CONFIG_FREETYPE) || defined(CONFIG_ICONV)
 static void prEntry( GtkContainer * container,gpointer user_data )
 {	
  const char * comment;
@@ -500,7 +500,7 @@
 
  switch( (int)user_data )
   {
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
    case 0: // font encoding
         comment=gtk_entry_get_text( GTK_ENTRY( EFontEncoding ) );
         for ( i=0;lEncoding[i].name;i++ )
@@ -508,7 +508,7 @@
 	if ( lEncoding[i].comment ) gtkSet( gtkSetFontEncoding,0,lEncoding[i].name );
 	break;
 #endif
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
    case 1: // sub encoding
         comment=gtk_entry_get_text( GTK_ENTRY( ESubEncoding ) );
         for ( i=0;lEncoding[i].name;i++ )
@@ -580,7 +580,7 @@
 
         // --- 4. page
 	guiSetFilename( font_name,gtk_entry_get_text( GTK_ENTRY( prEFontName ) ) );
-#ifndef HAVE_FREETYPE
+#ifndef CONFIG_FREETYPE
 	gtkSet( gtkSetFontFactor,HSFontFactoradj->value,NULL );
 #else
 	gtkSet( gtkSetFontBlur,HSFontBluradj->value,NULL );
@@ -684,7 +684,7 @@
    case 4: // sub position
         sub_pos=(int)HSSubPositionadj->value;
 	break;
-#ifndef HAVE_FREETYPE
+#ifndef CONFIG_FREETYPE
    case 5: // font factor
         gtkSet( gtkSetFontFactor,HSFontFactoradj->value,NULL );
 	break;
@@ -827,7 +827,7 @@
   GtkWidget * vbox603;
   GtkWidget * hbox6;
   GtkWidget * hbuttonbox5;
-#ifndef HAVE_FREETYPE
+#ifndef CONFIG_FREETYPE
   GtkWidget * hbox7;
 #endif
   GtkWidget * vbox601;
@@ -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 HAVE_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 HAVE_ICONV
+#ifdef CONFIG_ICONV
   CBSubEncoding=gtk_combo_new();
   gtk_widget_set_name( CBSubEncoding,"CBSubEncoding" );
   gtk_widget_show( CBSubEncoding );
@@ -1117,7 +1117,7 @@
     gtk_container_set_border_width( GTK_CONTAINER( hbuttonbox5 ),3 );
   BLoadFont=AddButton( MSGTR_Browse,hbuttonbox5 );
 
-#ifndef HAVE_FREETYPE
+#ifndef CONFIG_FREETYPE
   hbox7=AddHBox( vbox603,1 );
   AddLabel( MSGTR_PREFERENCES_FontFactor,hbox7 );
   HSFontFactoradj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,10,0.05,0,0 ) );
--- a/libass/ass.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/libass/ass.c	Thu Aug 07 10:36:07 2008 +0000
@@ -32,7 +32,7 @@
 #include <unistd.h>
 #include <inttypes.h>
 
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
 #include <iconv.h>
 #endif
 
@@ -810,7 +810,7 @@
 	free(str);
 }
 
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
 /** \brief recode buffer to utf-8
  * constraint: codepage != 0
  * \param data pointer to text buffer
@@ -826,7 +826,7 @@
 
 	{
 		const char* cp_tmp = codepage;
-#ifdef HAVE_ENCA
+#ifdef CONFIG_ENCA
 		char enca_lang[3], enca_fallback[100];
 		if (sscanf(codepage, "enca:%2s:%99s", enca_lang, enca_fallback) == 2
 				|| sscanf(codepage, "ENCA:%2s:%99s", enca_lang, enca_fallback) == 2) {
@@ -991,7 +991,7 @@
 	if (!buf)
 		return 0;
 	
-#ifdef HAVE_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 HAVE_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 HAVE_ICONV
+#ifdef CONFIG_ICONV
 	if (codepage) {
 		char* tmpbuf;
 		tmpbuf = sub_recode(buf, sz, codepage);
--- a/libass/ass_font.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/libass/ass_font.c	Thu Aug 07 10:36:07 2008 +0000
@@ -284,7 +284,7 @@
 			break;
 	}
 
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
 	if (index == 0) {
 		int face_idx;
 		mp_msg(MSGT_ASS, MSGL_INFO, MSGTR_LIBASS_GlyphNotFoundReselectingFont,
--- a/libass/ass_fontconfig.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/libass/ass_fontconfig.c	Thu Aug 07 10:36:07 2008 +0000
@@ -37,13 +37,13 @@
 #include "ass_library.h"
 #include "ass_fontconfig.h"
 
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
 #include <fontconfig/fontconfig.h>
 #include <fontconfig/fcfreetype.h>
 #endif
 
 struct fc_instance_s {
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
 	FcConfig* config;
 #endif
 	char* family_default;
@@ -51,7 +51,7 @@
 	int index_default;
 };
 
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
 
 // 4yo fontconfig does not have these.
 // They are only needed for debug output, anyway.
@@ -474,7 +474,7 @@
 	return priv;
 }
 
-#else // HAVE_FONTCONFIG
+#else /* CONFIG_FONTCONFIG */
 
 char* fontconfig_select(fc_instance_t* priv, const char* family, unsigned bold, unsigned italic, int* index,
 			uint32_t code)
--- a/libass/ass_fontconfig.h	Thu Aug 07 09:53:59 2008 +0000
+++ b/libass/ass_fontconfig.h	Thu Aug 07 10:36:07 2008 +0000
@@ -28,7 +28,7 @@
 #include <ft2build.h>
 #include FT_FREETYPE_H
 
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
 #include <fontconfig/fontconfig.h>
 #endif
 
--- a/libass/ass_mp.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/libass/ass_mp.c	Thu Aug 07 10:36:07 2008 +0000
@@ -32,7 +32,7 @@
 #include "ass_mp.h"
 #include "ass_library.h"
 
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
 #include <fontconfig/fontconfig.h>
 #endif
 
@@ -55,7 +55,7 @@
 char* ass_styles_file = NULL;
 int ass_hinting = ASS_HINTING_NATIVE + 4; // native hinting for unscaled osd
 
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
 extern int font_fontconfig;
 #else
 static int font_fontconfig = -1;
@@ -65,7 +65,7 @@
 extern float text_font_scale_factor;
 extern int subtitle_autoscale;
 
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
 extern char* sub_cp;
 #else
 static char* sub_cp = 0;
--- a/libmenu/menu.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/libmenu/menu.c	Thu Aug 07 10:36:07 2008 +0000
@@ -215,7 +215,7 @@
   char* buffer = NULL;
   int bl = BUF_STEP, br = 0;
   int f, fd;
-#ifndef HAVE_FREETYPE
+#ifndef CONFIG_FREETYPE
   if(vo_font == NULL)
     return 0;
 #endif
@@ -403,7 +403,7 @@
   }
 }
 
-#ifdef HAVE_FRIBIDI
+#ifdef CONFIG_FRIBIDI
 #include <fribidi/fribidi.h>
 #include "libavutil/common.h"
 char *menu_fribidi_charset = NULL;
@@ -459,7 +459,7 @@
     return;
   }
 
-#ifdef HAVE_FRIBIDI
+#ifdef CONFIG_FRIBIDI
   txt = menu_fribidi(txt);
 #endif
   render_txt(txt);
@@ -493,7 +493,7 @@
     return;
   }
 
-#ifdef HAVE_FRIBIDI
+#ifdef CONFIG_FRIBIDI
   txt = menu_fribidi(txt);
 #endif
   render_txt(txt);
--- a/libmenu/vf_menu.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/libmenu/vf_menu.c	Thu Aug 07 10:36:07 2008 +0000
@@ -202,7 +202,7 @@
 
 static int config(struct vf_instance_s* vf, int width, int height, int d_width, int d_height,
 		  unsigned int flags, unsigned int outfmt) { 
-#ifdef HAVE_FREETYPE    
+#ifdef CONFIG_FREETYPE
   // here is the right place to get screen dimensions
   if (force_load_font) {
     force_load_font = 0;
--- a/libmpdemux/demux_ogg.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/libmpdemux/demux_ogg.c	Thu Aug 07 10:36:07 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 HAVE_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 HAVE_ICONV
+#ifdef CONFIG_ICONV
   subcp_open(NULL);
 #endif
 
@@ -1486,7 +1486,7 @@
   if(!ogg_d)
     return;
 
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
   subcp_close();
 #endif
 
--- a/libvo/font_load.h	Thu Aug 07 09:53:59 2008 +0000
+++ b/libvo/font_load.h	Thu Aug 07 10:36:07 2008 +0000
@@ -1,7 +1,7 @@
 #ifndef MPLAYER_FONT_LOAD_H
 #define MPLAYER_FONT_LOAD_H
 
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
 #include <ft2build.h>
 #include FT_FREETYPE_H
 #endif
@@ -10,14 +10,14 @@
     unsigned char *bmp;
     unsigned char *pal;
     int w,h,c;
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
     int charwidth,charheight,pen,baseline,padding;
     int current_count, current_alloc;
 #endif
 } raw_file;
 
 typedef struct font_desc {
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
     int dynamic;
 #endif
     char *name;
@@ -34,7 +34,7 @@
     short width[65536];
     int freetype;
 
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
     int face_cnt;
     
     FT_Face faces[16];
@@ -64,7 +64,7 @@
 extern font_desc_t* vo_font;
 extern font_desc_t* sub_font;
 
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
 
 extern char *subtitle_font_encoding;
 extern float text_font_scale_factor;
--- a/libvo/font_load_ft.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/libvo/font_load_ft.c	Thu Aug 07 10:36:07 2008 +0000
@@ -16,7 +16,7 @@
 #include <math.h>
 #include <string.h>
 
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
 #include <iconv.h>
 #endif
 
@@ -24,7 +24,7 @@
 #include FT_FREETYPE_H
 #include FT_GLYPH_H
 
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
 #include <fontconfig/fontconfig.h>
 #endif
 
@@ -716,7 +716,7 @@
     return 0;
 }
 
-#ifdef HAVE_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 HAVE_ICONV
+#ifdef CONFIG_ICONV
     if (unicode) {
 	charset_size = prepare_charset_unicode(face, my_charset, my_charcodes);
     } else {
@@ -1124,7 +1124,7 @@
 
 void load_font_ft(int width, int height, font_desc_t** fontp, const char *font_name, float font_scale_factor)
 {
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
     FcPattern *fc_pattern;
     FcPattern *fc_pattern2;
     FcChar8 *s;
@@ -1139,7 +1139,7 @@
 
     if (vo_font) free_font_desc(vo_font);
 
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
     if (font_fontconfig > 0)
     {
 	if (!font_name)
--- a/libvo/sub.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/libvo/sub.c	Thu Aug 07 10:36:07 2008 +0000
@@ -1065,11 +1065,11 @@
 int vo_update_osd(int dxs,int dys){
     mp_osd_obj_t* obj=vo_osd_list;
     int chg=0;
-#ifdef HAVE_FREETYPE    
+#ifdef CONFIG_FREETYPE
     static int defer_counter = 0, prev_dxs = 0, prev_dys = 0;
 #endif
 
-#ifdef HAVE_FREETYPE    
+#ifdef CONFIG_FREETYPE
     // here is the right place to get screen dimensions
     if (((dxs != vo_image_width)
 	   && (subtitle_autoscale == 2 || subtitle_autoscale == 3))
@@ -1198,7 +1198,7 @@
 #if CONFIG_TV_TELETEXT
     new_osd_obj(OSDTYPE_TELETEXT);
 #endif
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
     force_load_font = 1;
 #endif
 }
--- a/libvo/vo_aa.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/libvo/vo_aa.c	Thu Aug 07 10:36:07 2008 +0000
@@ -247,7 +247,7 @@
       vo_font->pic_b[0]=malloc(sizeof(raw_file));
       memset(vo_font->pic_b[0],0,sizeof(raw_file));
 
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
       vo_font->dynamic = 0;
 #endif
 
--- a/libvo/vo_dxr3.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/libvo/vo_dxr3.c	Thu Aug 07 10:36:07 2008 +0000
@@ -429,7 +429,7 @@
 	ioctl(fd_control, EM8300_IOCTL_SET_ASPECTRATIO, &ioval);
 
 #ifdef SPU_SUPPORT
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
 	if (ioval == EM8300_ASPECTRATIO_16_9) {
 		s_width *= d_height*1.78/s_height*(d_width*1.0/d_height)/2.35;
 	} else {
--- a/libvo/vo_gl.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/libvo/vo_gl.c	Thu Aug 07 10:36:07 2008 +0000
@@ -149,7 +149,7 @@
   glLoadIdentity();
 
   if (!scaled_osd) {
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
   // adjust font size to display size
   force_load_font = 1;
 #endif
--- a/mencoder.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/mencoder.c	Thu Aug 07 10:36:07 2008 +0000
@@ -530,10 +530,10 @@
 #endif	
 
 // check font
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
   init_freetype();
 #endif
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
   if(font_fontconfig <= 0)
   {
 #endif
@@ -548,7 +548,7 @@
          vo_font=read_font_desc(MPLAYER_DATADIR "/font/font.desc",font_factor,verbose>1);
   }
 #endif
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
   }
 #endif
 
--- a/mp_msg.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/mp_msg.c	Thu Aug 07 10:36:07 2008 +0000
@@ -5,7 +5,7 @@
 
 #include "config.h"
 
-#ifdef HAVE_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 HAVE_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(HAVE_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 HAVE_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(HAVE_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/mplayer.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/mplayer.c	Thu Aug 07 10:36:07 2008 +0000
@@ -698,7 +698,7 @@
   vo_uninit();	// Close the X11 connection (if any is open).
 #endif
 
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
   current_module="uninit_font";
   if (sub_font && sub_font != vo_font) free_font_desc(sub_font);
   sub_font = NULL;
@@ -1027,7 +1027,7 @@
     subd = sub_read_file(filename, fps);
 #ifdef CONFIG_ASS
     if (ass_enabled)
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
         asst = ass_read_file(ass_library, filename, sub_cp);
 #else
         asst = ass_read_file(ass_library, filename, 0);
@@ -2782,10 +2782,10 @@
 //------ load global data first ------
 
 // check font
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
   init_freetype();
 #endif
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
   if(font_fontconfig <= 0)
   {
 #endif
@@ -2806,7 +2806,7 @@
   else
     sub_font = vo_font;
 #endif
-#ifdef HAVE_FONTCONFIG
+#ifdef CONFIG_FONTCONFIG
   }
 #endif
 
@@ -3543,7 +3543,7 @@
    if(vo_flags & 0x08 && vo_spudec)
       spudec_set_hw_spu(vo_spudec,mpctx->video_out);
 
-#ifdef HAVE_FREETYPE
+#ifdef CONFIG_FREETYPE
    force_load_font = 1;
 #endif
 
--- a/osdep/getch2-os2.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/osdep/getch2-os2.c	Thu Aug 07 10:36:07 2008 +0000
@@ -32,7 +32,7 @@
 #include "input/input.h"
 #include "mp_fifo.h"
 
-#if defined(HAVE_LANGINFO) && defined(HAVE_ICONV)
+#if defined(HAVE_LANGINFO) && defined(CONFIG_ICONV)
 #include <locale.h>
 #include <langinfo.h>
 #endif
@@ -182,7 +182,7 @@
     getch2_status = 0;
 }
 
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
 char *get_term_charset( void )
 {
     char *charset = NULL;
--- a/osdep/getch2-win.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/osdep/getch2-win.c	Thu Aug 07 10:36:07 2008 +0000
@@ -142,7 +142,7 @@
     getch2_status=0;
 }
 
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
 static const struct {
     unsigned cp;
     char* alias;
--- a/osdep/getch2.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/osdep/getch2.c	Thu Aug 07 10:36:07 2008 +0000
@@ -28,7 +28,7 @@
 #endif
 #endif
 
-#if defined(HAVE_LANGINFO) && defined(HAVE_ICONV)
+#if defined(HAVE_LANGINFO) && defined(CONFIG_ICONV)
 #include <locale.h>
 #include <langinfo.h>
 #endif
@@ -270,7 +270,7 @@
     getch2_status=0;
 }
 
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
 char* get_term_charset(void)
 {
     char* charset = NULL;
--- a/stream/asf_mmst_streaming.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/stream/asf_mmst_streaming.c	Thu Aug 07 10:36:07 2008 +0000
@@ -46,10 +46,10 @@
 #endif
 
 #ifndef CONFIG_SETLOCALE
-#undef HAVE_ICONV
+#undef CONFIG_ICONV
 #endif
 
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
 #include <iconv.h>
 #ifdef HAVE_LANGINFO
 #include <langinfo.h>
@@ -143,13 +143,13 @@
   }
 }
 
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
 static iconv_t url_conv;
 #endif
 
 static void string_utf16(char *dest, char *src, int len) {
     int i;
-#ifdef HAVE_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 HAVE_ICONV
+#ifdef CONFIG_ICONV
     }
 #endif
 }
@@ -575,7 +575,7 @@
   * */
 
   /* prepare for the url encoding conversion */
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
 #ifdef HAVE_LANGINFO
   url_conv = iconv_open("UTF-16LE",nl_langinfo(CODESET));
 #else
@@ -690,7 +690,7 @@
   packet_length1 = packet_length;
   mp_msg(MSGT_NETWORK,MSGL_INFO,"mmst packet_length = %d\n", packet_length);
 
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
   if (url_conv != (iconv_t)(-1))
     iconv_close(url_conv);
 #endif
--- a/subreader.c	Thu Aug 07 09:53:59 2008 +0000
+++ b/subreader.c	Thu Aug 07 10:36:07 2008 +0000
@@ -20,17 +20,17 @@
 #include "subreader.h"
 #include "stream/stream.h"
 
-#ifdef HAVE_ENCA
+#ifdef CONFIG_ENCA
 #include <enca.h>
 #endif
 
 #define ERR ((void *) -1)
 
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
 #include <iconv.h>
 char *sub_cp=NULL;
 #endif
-#ifdef HAVE_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
@@ -1071,7 +1071,7 @@
 extern float sub_delay;
 extern float sub_fps;
 
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
 static iconv_t icdsc = (iconv_t)(-1);
 
 void	subcp_open (stream_t *st)
@@ -1080,7 +1080,7 @@
 
 	if (sub_cp){
 		const char *cp_tmp = sub_cp;
-#ifdef HAVE_ENCA
+#ifdef CONFIG_ENCA
 		char enca_lang[3], enca_fallback[100];
 		if (sscanf(sub_cp, "enca:%2s:%99s", enca_lang, enca_fallback) == 2
 		     || sscanf(sub_cp, "ENCA:%2s:%99s", enca_lang, enca_fallback) == 2) {
@@ -1146,7 +1146,7 @@
 }
 #endif
 
-#ifdef HAVE_FRIBIDI
+#ifdef CONFIG_FRIBIDI
 #ifndef max
 #define max(a,b)  (((a)>(b))?(a):(b))
 #endif
@@ -1270,7 +1270,7 @@
     const char *name;
 };
 
-#ifdef HAVE_ENCA
+#ifdef CONFIG_ENCA
 const char* guess_buffer_cp(unsigned char* buffer, int buflen, const char *preferred_language, const char *fallback)
 {
     const char **languages;
@@ -1369,7 +1369,7 @@
     stream_reset(fd);
     stream_seek(fd,0);
 
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
     sub_utf8_prev=sub_utf8;
     {
 	    int l,k;
@@ -1389,7 +1389,7 @@
     sub_num=0;n_max=32;
     first=malloc(n_max*sizeof(subtitle));
     if(!first){
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
 	  subcp_close();
           sub_utf8=sub_utf8_prev;
 #endif
@@ -1413,15 +1413,15 @@
 	memset(sub, '\0', sizeof(subtitle));
         sub=srp->read(fd,sub);
         if(!sub) break;   // EOF
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
 	if ((sub!=ERR) && (sub_utf8 & 2)) sub=subcp_recode(sub);
 #endif
-#ifdef HAVE_FRIBIDI
+#ifdef CONFIG_FRIBIDI
 	if (sub!=ERR) sub=sub_fribidi(sub,sub_utf8);
 #endif
 	if ( sub == ERR )
 	 {
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
           subcp_close();
 #endif
     	  if ( first ) free(first);
@@ -1474,7 +1474,7 @@
     
     free_stream(fd);
 
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
     subcp_close();
 #endif
 
@@ -1876,8 +1876,8 @@
 
 		// does it end with a subtitle extension?
 		found = 0;
-#ifdef HAVE_ICONV
-#ifdef HAVE_ENCA
+#ifdef CONFIG_ICONV
+#ifdef CONFIG_ENCA
 		for (i = ((sub_cp && strncasecmp(sub_cp, "enca", 4) != 0) ? 3 : 0); sub_exts[i]; i++) {
 #else
 		for (i = (sub_cp ? 3 : 0); sub_exts[i]; i++) {
@@ -1931,7 +1931,7 @@
 
 		    if (prio) {
 			prio += prio;
-#ifdef HAVE_ICONV
+#ifdef CONFIG_ICONV
 			if (i<3){ // prefer UTF-8 coded
 			    prio++;
 			}
--- a/subreader.h	Thu Aug 07 09:53:59 2008 +0000
+++ b/subreader.h	Thu Aug 07 10:36:07 2008 +0000
@@ -71,7 +71,7 @@
 struct stream_st;
 void subcp_open (struct stream_st *st); /* for demux_ogg.c */
 void subcp_close (void); /* for demux_ogg.c */
-#ifdef HAVE_ENCA
+#ifdef CONFIG_ENCA
 const char* guess_buffer_cp(unsigned char* buffer, int buflen, const char *preferred_language, const char *fallback);
 const char* guess_cp(struct stream_st *st, const char *preferred_language, const char *fallback);
 #endif