[MPlayer-dev-eng] [PATCH] remove many -I in compiles...
Oded Shimon
ods15 at ods15.dyndns.org
Fri Sep 2 10:36:01 CEST 2005
This patch does 2 things. Change this:
cc -c -I../libvo -I../../libvo -I/usr/X11R6/include -fno-PIC -g -O4
-march=athlon-4 -mcpu=athlon-4 -pipe -ffast-math -fomit-frame-pointer
-D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DXTHREADS
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include
-I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I. -I/usr/include/
-DXTHREADS -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
-I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0
-I/usr/include/freetype2 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include
-I/usr/include/SDL -D_REENTRANT -I/usr/X11R6/include -I./libavutil
-I./libavcodec -o m_option.o m_option.c
into this:
cc -c -I../libvo -I../../libvo -I/usr/X11R6/include -fno-PIC -g -O4
-march=athlon-4 -mcpu=athlon-4 -pipe -ffast-math -fomit-frame-pointer
-D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I.
-I/usr/include/ -I/usr/include/freetype2 -I/usr/include
-I/usr/include/SDL -D_REENTRANT -I/usr/X11R6/include -I./libavutil
-I./libavcodec -o m_option.o m_option.c
And also, removes GTK dependencies from mp_msg by using helper functions in
Gui/ files..
Please test on odd distrobutions, it should work just fine, gonna commit
soon...
- ods15
-------------- next part --------------
--- ../dev.main/mp_msg.c 2005-01-20 15:22:52.000000000 +0200
+++ mp_msg.c 2005-08-28 20:57:09.000000000 +0300
@@ -16,8 +16,7 @@
#endif
#if ENABLE_GUI_CODE
-#include "Gui/mplayer/widgets.h"
-extern void gtkMessageBox( int type,char * str );
+#include "Gui/interface.h"
extern int use_gui;
#endif
#include "mp_msg.h"
@@ -72,25 +71,7 @@
#if ENABLE_GUI_CODE
if(use_gui)
- {
- switch(x & 255)
- {
- case MSGL_FATAL:
- gtkMessageBox(GTK_MB_FATAL|GTK_MB_SIMPLE, tmp);
- break;
- case MSGL_ERR:
- gtkMessageBox(GTK_MB_ERROR|GTK_MB_SIMPLE, tmp);
- break;
-#if 0
-// WARNING! Do NOT enable this! There are too many non-critical messages with
-// MSGL_WARN, for example: broken SPU packets, codec's bit error messages,
-// etc etc, they should not raise up a new window every time.
- case MSGL_WARN:
- gtkMessageBox(GTK_MB_WARNING|GTK_MB_SIMPLE, tmp);
- break;
-#endif
- }
- }
+ guiMessageBox(x&255, tmp);
#endif
#ifdef MSG_USE_COLORS
--- ../dev.main/Gui/interface.h 2004-12-27 21:34:42.000000000 +0200
+++ Gui/interface.h 2005-08-28 20:55:44.000000000 +0300
@@ -150,6 +150,7 @@
extern void guiEventHandling( void );
extern void guiLoadFont( void );
extern void guiLoadSubtitle( char * name );
+extern void guiMessageBox(int level, char * str);
typedef struct _plItem
{
--- ../dev.main/Gui/interface.c 2005-06-01 12:01:41.000000000 +0300
+++ Gui/interface.c 2005-08-28 20:55:16.000000000 +0300
@@ -1292,3 +1292,24 @@
return result;
}
+
+// wrapper function for mp_msg to display a message box for errors and warnings.
+
+void guiMessageBox(int level, char * str) {
+ switch(level) {
+ case MSGL_FATAL:
+ gtkMessageBox(GTK_MB_FATAL|GTK_MB_SIMPLE, str);
+ break;
+ case MSGL_ERR:
+ gtkMessageBox(GTK_MB_ERROR|GTK_MB_SIMPLE, str);
+ break;
+#if 0
+// WARNING! Do NOT enable this! There are too many non-critical messages with
+// MSGL_WARN, for example: broken SPU packets, codec's bit error messages,
+// etc etc, they should not raise up a new window every time.
+ case MSGL_WARN:
+ gtkMessageBox(GTK_MB_WARNING|GTK_MB_SIMPLE, str);
+ break;
+#endif
+ }
+}
--- ../dev.main/configure 2005-08-27 22:23:42.000000000 +0300
+++ configure 2005-08-28 03:49:41.000000000 +0300
@@ -6952,7 +6952,7 @@
RANLIB = $_ranlib
INSTALL = $_install
# OPTFLAGS = -O4 $_profile $_debug $_march $_mcpu $_pipe -fomit-frame-pointer -ffast-math
-EXTRA_INC = $_inc_extra $_inc_gtk
+EXTRA_INC = $_inc_extra
OPTFLAGS = -I../libvo -I../../libvo $_inc_x11 $CFLAGS \$(EXTRA_INC)
STRIPBINARIES = $_stripbinaries
CHARSET = $_charset
@@ -7129,6 +7129,7 @@
TARGET_VIS = $_vis
# --- GUI stuff ---
+GTKINC = $_inc_gtk
GTKLIB = $_ld_static $_ld_gtk
GLIBLIB = $_ld_static $_ld_glib
GTK_LIBS = $_ld_static $_ld_gui
More information about the MPlayer-dev-eng
mailing list