diff configure @ 1694:0def229bd8bc

GUI support (--enable-gui)
author arpi
date Sat, 25 Aug 2001 21:05:23 +0000
parents 445ea1ce4180
children 3df3982c2c36
line wrap: on
line diff
--- a/configure	Sat Aug 25 21:04:29 2001 +0000
+++ b/configure	Sat Aug 25 21:05:23 2001 +0000
@@ -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 */
@@ -2155,6 +2246,9 @@
 $_have_xdpms
 $_aa
 
+/* used by GUI: */
+$_xshape_def
+
 #if defined(HAVE_GL)||defined(HAVE_X11)||defined(HAVE_XV)
 #define X11_FULLSCREEN
 #endif