[Mplayer-cvslog] CVS: main Makefile,1.66,1.67 configure,1.152,1.153 mplayer.c,1.239,1.240

Arpi of Ize arpi at mplayer.dev.hu
Sat Aug 25 23:05:26 CEST 2001


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv13607

Modified Files:
	Makefile configure mplayer.c 
Log Message:
GUI support (--enable-gui)

Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/Makefile,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- Makefile	24 Aug 2001 16:17:45 -0000	1.66
+++ Makefile	25 Aug 2001 21:05:23 -0000	1.67
@@ -80,7 +80,7 @@
 	@for a in $(PARTS); do $(MAKE) -C $$a all ; done
 
 $(PRG):	$(MPLAYER_DEP)
-	$(CC) $(CFLAGS) -o $(PRG) mplayer.o $(OBJS) $(XMM_LIBS) $(LIRC_LIBS) $(A_LIBS) -lm $(TERMCAP_LIB) $(LIB_LOADER) $(AV_LIB) -Llibmpeg2 -lmpeg2 -Llibao2 -lao2 $(VO_LIBS) $(CSS_LIB) -Lencore -lencore $(DECORE_LIBS) $(ARCH_LIBS)
+	$(CC) $(CFLAGS) -o $(PRG) mplayer.o $(OBJS) $(XMM_LIBS) $(LIRC_LIBS) $(A_LIBS) -lm $(TERMCAP_LIB) $(LIB_LOADER) $(AV_LIB) -Llibmpeg2 -lmpeg2 -Llibao2 -lao2 $(VO_LIBS) $(CSS_LIB) -Lencore -lencore $(DECORE_LIBS) $(GUI_LIBS) $(ARCH_LIBS)
 
 $(PRG_FIBMAP): fibmap_mplayer.o
 	$(CC) -o $(PRG_FIBMAP) fibmap_mplayer.o

Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.152
retrieving revision 1.153
diff -u -r1.152 -r1.153
--- configure	24 Aug 2001 16:28:26 -0000	1.152
+++ configure	25 Aug 2001 21:05:23 -0000	1.153
@@ -877,6 +877,34 @@
 _dga2=no
 $_cc $_x11incdir $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm $_socklib > /dev/null 2>&1 && _dga2=yes
 
+# --- checkin X11 XShape extension
+
+# echo -en 'Checking XShape extension ... '
+
+cat > $TMPC << EOF
+#include <X11/Xlib.h>
+#include <X11/Xproto.h>
+#include <X11/Xutil.h>
+#include <X11/extensions/shape.h>
+#include <stdlib.h>
+int main( void )
+{ 
+ char    * name = ":0.0";
+ Display * wsDisplay;
+ int       exitvar = 0;
+ int       eventbase,errorbase;
+ 
+ if ( getenv( "DISPLAY" ) ) name=getenv( "DISPLAY" );
+ wsDisplay=XOpenDisplay( name );
+ if ( !XShapeQueryExtension( wsDisplay,&eventbase,&errorbase ) ) exitvar=1;
+ XCloseDisplay( wsDisplay );
+ return exitvar; 
+}
+EOF
+
+_xshape=no
+$_cc $_x11incdir $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext $_socklib > /dev/null 2>&1 && _xshape=yes
+
 fi
 
 cat > $TMPC << EOF
@@ -1476,6 +1504,53 @@
 echo "Extra headers : $_extraincdir"
 # write conf files.
 
+if [ $_gui = yes ]; then
+# --------------- GUI begin -------------------
+
+echo -en "\nChecking for gtk version ... "
+_gtk=`gtk-config --version 2>&1`
+[ -z "$_gtk" ] && { echo 'gtk not found.'; exit 1; }
+echo "$_gtk"
+
+echo -n "Checking for gtk includes ... "
+_gtkinc=`gtk-config --cflags 2>&1`
+[ -z "$_gtkinc" ] && { echo 'gtk not found.'; exit 1; }
+echo "done"
+
+echo -n "Checking for gtk libs ... "
+_gtklib=`gtk-config --libs 2>&1`
+[ -z "$_gtklib" ] && { echo 'gtk not found.'; exit 1; }
+echo "done"
+
+echo -en "\nChecking for glib version ... "
+_glib=`glib-config --version 2>&1`
+[ -z "$_glib" ] && { echo 'glib not found.'; exit 1; }
+echo "$_glib"
+
+echo -n "Checking for glib includes ... "
+_glibinc=`glib-config --cflags 2>&1`
+[ -z "$_glibinc" ] && { echo 'glib not found.'; exit 1; }
+echo "done"
+
+echo -n "Checking for glib libs ... "
+_gliblib=`glib-config --libs 2>&1`
+[ -z "$_gliblib" ] && { echo 'glib not found.'; exit 1; }
+echo "done"
+
+cat > Gui/config.mak << EOF
+
+# -------- Generated by ./configure -----------
+
+GTKINC=$_gtkinc
+GTKLIBS=$_gtklib
+GLIBINC=$_glibinc
+GLIBLIBS=$_gliblib
+
+EOF
+
+# --------------- GUI end -------------------
+fi
+
 _streamingdef='#undef STREAMING'
 if [ $_streaming = yes ]; then
    _streamingsrcs='asf_streaming.c network.c url.c http.c'
@@ -1884,6 +1959,12 @@
  _dga2='#undef HAVE_DGA2'
 fi
 
+if [ "$_xshape" = "yes" ]; then
+ _xshape_def='#define HAVE_XSHAPE'
+else
+ _xshape_def='#undef HAVE_XSHAPE'
+fi
+
 if [ $_fbdev = yes ]; then
  _fbdev='#define HAVE_FBDEV'
  _vosrc=$_vosrc' vo_fbdev.c'
@@ -1892,9 +1973,12 @@
 fi
 
 if [ $_gui = yes ]; then
- _gui='#define HAVE_GUI'
+# _gui_def='#define HAVE_GUI'
+ _gui_def='#define HAVE_NEW_GUI'
+ _gui_lib='-LGui -lgui $(GTKLIB) $(GLIBLIB)'
 else
- _gui='#undef HAVE_GUI'
+ _gui_def='#undef HAVE_GUI'
+ _gui_lib=''
 fi
 
 if [ $_divx4linux = yes ]; then
@@ -1961,6 +2045,13 @@
 TARGET_SSE=$_cfg_sse
 
 BINUTILS=$_binutils
+
+# --- GUI stuff ---
+GTKLIB=$_gtklib
+GLIBLIB=$_gliblib
+GUI_LIBS = $_gui_lib
+DEBUG=-DDEBUG
+
 EOF
    
 cat > $CCONF << EOF
@@ -2067,7 +2158,7 @@
 $_fastmemcpy
 
 /* gui support, please do not edit this option */
-$_gui
+$_gui_def
 #define PREFIX "$_prefix"
 
 /* Audio lib drivers */
@@ -2154,6 +2245,9 @@
 $_svga
 $_have_xdpms
 $_aa
+
+/* used by GUI: */
+$_xshape_def
 
 #if defined(HAVE_GL)||defined(HAVE_X11)||defined(HAVE_XV)
 #define X11_FULLSCREEN

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.239
retrieving revision 1.240
diff -u -r1.239 -r1.240
--- mplayer.c	25 Aug 2001 19:11:24 -0000	1.239
+++ mplayer.c	25 Aug 2001 21:05:23 -0000	1.240
@@ -462,6 +462,14 @@
 
   mp_msg(MSGT_CPLAYER,MSGL_INFO,"%s",banner_text);
 
+#ifdef HAVE_NEW_GUI
+//  this one segfaults if running 'mplayer' (without path containing '/')
+//  if ( !strcmp( strrchr( argv[0],'/' ),"/gmplayer" ) ) appInit( argc,argv,envp );
+  if ( strstr( argv[0],"gmplayer" ) ) appInit( argc,argv,envp );
+
+#endif
+
+
 #ifdef HAVE_GUI
   if ( nogui ) {
 #endif
@@ -559,6 +567,7 @@
 #ifdef USE_TERMCAP
   load_termcap(NULL); // load key-codes
 #endif
+
 
   //========= Catch terminate signals: ================
   // terminate requests:




More information about the MPlayer-cvslog mailing list