sawfish r4388 - in trunk: . man



Author: chrisb
Date: Tue Feb  3 00:13:05 2009
New Revision: 4388
URL: http://svn.gnome.org/viewvc/sawfish?rev=4388&view=rev

Log:
add XF86 checks back


Modified:
   trunk/ChangeLog
   trunk/README.IMPORTANT
   trunk/config.h.in
   trunk/configure.in
   trunk/man/news.texi

Modified: trunk/README.IMPORTANT
==============================================================================
--- trunk/README.IMPORTANT	(original)
+++ trunk/README.IMPORTANT	Tue Feb  3 00:13:05 2009
@@ -2,21 +2,26 @@
 
 **********
 
-- sawmill-defaults is now sawfish-defaults
+sawmill-defaults is now sawfish-defaults
 
-This means if you got
+This means if you got:
 
-(require 'sawmill-defaults) in your sawfishrc, replace it by
-(require 'sawfish-defaults)
+>> (require 'sawmill-defaults) 
+
+in your sawfishrc, replace it by:
+
+>> (require 'sawfish-defaults)
 
 **********
 
-- ~/.sawmillrc is no longer a valid configuration file, if
-you still use it, rename it to either ~/.sawfishrc or ~/sawfish/rc
+~/.sawmillrc is no longer a valid configuration file, if you 
+still use it, rename it to either ~/.sawfishrc or ~/sawfish/rc
 
 **********
 
-- XFree86 is no longer detected by configure.in 
-(XXX Will add work-around for XFree86 Users later on XXX)
+by default only X11R7 (X.Org 7.0 or newer) is detected, if you
+use X11R6 (X.Org 6.8x/6.9x or XFree86), add the following flag:
+
+>> --without-xorg-x11r7
 
 **********

Modified: trunk/config.h.in
==============================================================================
--- trunk/config.h.in	(original)
+++ trunk/config.h.in	Tue Feb  3 00:13:05 2009
@@ -114,12 +114,18 @@
 /* Define to 1 if you have the <X11/extensions/Xdbe.h> header file. */
 #undef HAVE_X11_EXTENSIONS_XDBE_H
 
-/* Have xinerama */
+/* Define to 1 if you have the <X11/extensions/Xinerama.h> header file. */
 #undef HAVE_X11_EXTENSIONS_XINERAMA_H
 
-/* Have xrandr */
+/* Define to 1 if you have the <X11/extensions/Xrandr.h> header file. */
 #undef HAVE_X11_EXTENSIONS_XRANDR_H
 
+/* Define to 1 if you have the <X11/ICE/ICE.h> header file. */
+#undef HAVE_X11_ICE_ICE_H
+
+/* Define to 1 if you have the <X11/SM/SMlib.h> header file. */
+#undef HAVE_X11_SM_SMLIB_H
+
 /* Have xft */
 #undef HAVE_X11_XFT_XFT_H
 

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Tue Feb  3 00:13:05 2009
@@ -36,7 +36,7 @@
 AC_SUBST(SUBDIRS)
 
 dnl Remove trailing slash in $prefix if necessary
-dnl /usr// is the same than /usr/ ... so why would we need this? 
+dnl /usr// is the same than /usr/ ... so why would we need this?
 case "${prefix}" in
   */)
     prefix=`echo ${prefix} | sed -e 's/^\(.*\)\/$/\1/'`
@@ -57,10 +57,18 @@
 AC_HEADER_TIME
 AC_CHECK_HEADERS(fcntl.h sys/time.h sys/utsname.h)
 
+AC_PATH_PROG(PKG_CONFIG, [pkg-config], [no])
+
 dnl Check for X headers, etc
 _cppflags="${CPPFLAGS}"
 CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}"
 
+AC_ARG_WITH(xorg-x11r7,
+	    [  --with-xorg-x11r7	  Use X.Org X11R7
+	     --without-xorg-x11r7	  Use X.Org/XFree86 X11R6 instead], [], [with_xorg_x11r7=yes])
+
+if test "$with_xorg_x11r7" != "no"; then
+
 AC_CHECK_HEADERS(X11/extensions/Xdbe.h, [], [], [#include <X11/Xlib.h> ])
 
 dnl Checks for X extensions/libraries
@@ -72,18 +80,92 @@
 PKG_CHECK_MODULES(libXineRama, xinerama >= 1.0
 		  ,XINERAMA_LIBS="-lXinerama"
 		  AC_DEFINE(HAVE_X11_EXTENSIONS_XINERAMA_H, 1, [Have xinerama])
-		  ,AC_MSG_ERROR([can't locate libXineRama]))
+		  ,AC_MSG_ERROR([can not locate libXineRama]))
 
 PKG_CHECK_MODULES(libXRandR, xrandr >= 1.0
 		  ,XRANDR_LIBS="-lXrandr"
 		  AC_DEFINE(HAVE_X11_EXTENSIONS_XRANDR_H, 1, [Have xrandr])
-		  ,AC_MSG_ERROR([can't locate libXRandR]))
+		  ,AC_MSG_ERROR([can not locate libXRandR]))
 
 PKG_CHECK_MODULES(libXft, xft >= 1.0
 		  ,XFT_LIBS="-lXft"
 		  XFT_CFLAGS="`pkg-config --cflags xft`"
 		  AC_DEFINE(HAVE_X11_XFT_XFT_H, 1, [Have xft])
-		  ,AC_MSG_ERROR([can't locate libXft]))
+		  ,AC_MSG_ERROR([can not locate libXft]))
+
+dnl is X available?
+X_LIBS=""
+
+PKG_CHECK_MODULES(libX11, x11 >= 1.0
+		  ,AC_DEFINE(HAVE_X11, 1, [Have X11])
+		  X_LIBS="`pkg-config --libs x11`"
+		  X_CFLAGS="`pkg-config --cflags x11`"
+		  AC_DEFINE(X_DISPLAY_MISSING, 0, [Have x11])
+		  ,AC_MSG_ERROR([can not locate libX11]))
+
+X_LIBS+=" -lXext -lXrender"
+
+X_EXTRA_LIBS=""
+
+PKG_CHECK_MODULES(libICE, ice >= 1.0
+		  ,X_EXTRA_LIBS+="-lICE "
+		  ,AC_MSG_ERROR([can't locate libICE]))
+
+PKG_CHECK_MODULES(libSM, sm >= 1.0
+		  ,X_EXTRA_LIBS+="-lSM "
+		  ,AC_MSG_ERROR([can't locate libSM]))
+
+X_SERVER="X.Org X11R7"
+
+CPPFLAGS="${_cppflags}"
+
+else
+
+AC_CHECK_HEADERS(X11/ICE/ICE.h X11/SM/SMlib.h X11/extensions/Xdbe.h, [], [], [#include <X11/Xlib.h> ])
+
+dnl Checks for X extensions/libraries
+XINERAMA_LIBS=""
+XRANDR_LIBS=""
+XFT_LIBS=""
+XFT_CFLAGS=""
+
+AC_CHECK_LIB(Xinerama, XineramaQueryScreens,
+	     [XINERAMA_LIBS="-lXinerama"
+	      AC_CHECK_HEADERS(X11/extensions/Xinerama.h)],
+	     [],[$X_LIBS -lX11 -lXext])
+
+AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration,
+	     [XRANDR_LIBS="-lXrandr"
+	      AC_CHECK_HEADERS(X11/extensions/Xrandr.h, [], [],
+	         [#include <X11/Xlib.h> ])],
+	     [],[$X_LIBS -lX11 -lXext])
+
+dnl Try using pkg-config first, since it looks like Xft2 may fail our
+dnl hand-crafted tests
+PKG_CHECK_MODULES(XFT, xft >= 1.0,
+ [_cppflags=$CPPFLAGS
+  CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
+  AC_CHECK_HEADERS(X11/Xft/Xft.h)
+  CPPFLAGS=$_cppflags],
+ [AC_CHECK_LIB(Xft, XftDrawCreate,
+	       [XFT_LIBS="-lXft -lXrender"
+	       AC_CHECK_HEADERS(X11/Xft/Xft.h)],
+	       [], [$X_LIBS -lX11 -lXext])])
+
+dnl is X available?
+if test "${no_x}" != "yes"; then
+  AC_DEFINE(HAVE_X11)
+  X_LIBS+=" -lXext -lXrender -lSM -lICE"
+  X_EXTRA_LIBS=""
+else
+  AC_MSG_ERROR([You need X11 for sawfish])
+fi
+
+X_SERVER="X.Org/XFree86 X11R6"
+
+CPPFLAGS="${_cppflags}"
+
+fi
 
 dnl Checks for pango
 PANGO_MIN_VER="1.8.0"
@@ -92,10 +174,10 @@
 
 PKG_CHECK_MODULES(PANGO, pango >= ${PANGO_MIN_VER}
 		  ,AC_DEFINE(HAVE_PANGO, 1, [Have pango])
-		  ,AC_MSG_ERROR([can't locate pango]))
+		  ,AC_MSG_ERROR([can not locate pango]))
 
 PKG_CHECK_MODULES(PANGOX, pangox >= ${PANGO_MIN_VER}
-		  ,AC_DEFINE(HAVE_PANGO_X, 1, [Have pangox]) PANGO_MODULES+="pangox " 
+		  ,AC_DEFINE(HAVE_PANGO_X, 1, [Have pangox]) PANGO_MODULES+="pangox "
 		  ,AC_MSG_WARN([pango x support not available]))
 
 PKG_CHECK_MODULES(PANGOXFT, pangoxft >= ${PANGO_MIN_VER}
@@ -114,36 +196,14 @@
 		  REP_LIBS="`pkg-config --libs librep`"
 		  REP_MSGFMT="`which msgfmt`"
 		  REP_VERSION="`pkg-config --variable=version librep`"
-		  ,AC_MSG_ERROR([can't locate librep])) 
+		  ,AC_MSG_ERROR([can not locate librep]))
 
 dnl Check for rep-gtk
 REP_GTK_MIN_VER="0.18.4"
 
 PKG_CHECK_MODULES(REP_GTK, rep-gtk >= 0.18.4
 		  ,
-		  ,AC_MSG_ERROR([can't locate rep-gtk]))
-
-dnl is X available?
-X_LIBS=""
-
-PKG_CHECK_MODULES(libX11, x11 >= 1.0
-		  ,AC_DEFINE(HAVE_X11, 1, [Have X11])
-		  X_LIBS="`pkg-config --libs x11`"
-		  X_CFLAGS="`pkg-config --cflags x11`"
-		  AC_DEFINE(X_DISPLAY_MISSING, 0, [Have x11])
-		  ,AC_MSG_ERROR([can't locate libX11]))
-
-X_LIBS+=" -lXext -lXrender"
-
-X_EXTRA_LIBS=""
-
-PKG_CHECK_MODULES(libICE, ice >= 1.0
-		  ,X_EXTRA_LIBS+="-lICE "
-		  ,AC_MSG_ERROR([can't locate libICE]))
-
-PKG_CHECK_MODULES(libSM, sm >= 1.0
-		  ,X_EXTRA_LIBS+="-lSM "
-		  ,AC_MSG_ERROR([can't locate libSM]))
+		  ,AC_MSG_ERROR([can not locate rep-gtk]))
 
 dnl Check for GTK+2
 GTK_MIN_VER="2.6.0"
@@ -152,7 +212,7 @@
 		  ,GTK_LIBS="`pkg-config --libs gtk+-2.0`"
 		  GTK_CFLAGS="`pkg-config --cflags gtk+-2.0`"
 		  AC_DEFINE(HAVE_GTK, 1, [Have GTK])
-		  ,AC_MSG_ERROR([can't locate gtk+2]))
+		  ,AC_MSG_ERROR([can not locate gtk+2]))
 
 dnl Check for image handling libraries
 AC_ARG_WITH(gdk-pixbuf,
@@ -169,7 +229,7 @@
 			  IMAGE_CFLAGS='${GDK_PIXBUF_CFLAGS}'
 			  IMAGE_LOADER=gdk
 			  with_gdk_pixbuf=yes
-			  ,AC_MSG_ERROR([can't locate gdk-pixbuf-xlib])
+			  ,AC_MSG_ERROR([can not locate gdk-pixbuf-xlib])
 			  with_gdk_pixbuf=no)
 fi
 
@@ -182,7 +242,7 @@
 			  IMAGE_CFLAGS='${IMLIB1_CFLAGS}'
 			  IMLIB_VERSION="`pkg-config --modversion imlib`"
 			  IMAGE_LOADER=imlib1
-			  ,AC_MSG_ERROR([can't locate imlib1 library]))
+			  ,AC_MSG_ERROR([can not locate imlib1 library]))
 fi
 
 dnl Check for libaudiofile
@@ -197,7 +257,7 @@
 		      ,AUDIOFILE_LIBS="`pkg-config --libs audiofile`"
 		      AUDIOFILE_CFLAGS="`pkg-config --cflags audiofile`"
 		      AC_DEFINE(HAVE_LIBAUDIOFILE, 1, [Have libaudiofile])
-		      ,AC_MSG_ERROR([can't locate libaudiofile]))
+		      ,AC_MSG_ERROR([can not locate libaudiofile]))
 fi
 
 dnl Check for esound
@@ -212,7 +272,7 @@
 		      ,ESD_LIBS="`pkg-config --libs esound`"
 		      ESD_CFLAGS="`pkg-config --cflags esound`"
 		      AC_DEFINE(HAVE_ESD, 1, [Have ESD])
-		      ,AC_MSG_ERROR([can't locate esound]))
+		      ,AC_MSG_ERROR([can not locate esound]))
 fi
 
 dnl Check for Doug Lea's malloc in libc
@@ -386,7 +446,7 @@
 
   compiler:	$CC
   cflags:	$CFLAGS $DEVELOPMENT_CFLAGS
-  
+
   == == == == == == == == == == == == ==
 
   rep:		$REP_VERSION
@@ -401,9 +461,13 @@
 
 echo "
   == == == == == == == == == == == == ==
-  
+
+  xserver:	$X_SERVER
+
+  == == == == == == == == == == == == ==
+
   image loader:	$IMAGE_LOADER
-  
+
   == == == == == == == == == == == == ==
   "
 

Modified: trunk/man/news.texi
==============================================================================
--- trunk/man/news.texi	(original)
+++ trunk/man/news.texi	Tue Feb  3 00:13:05 2009
@@ -50,6 +50,8 @@
 
 @item Other changes:
 @itemize @minus
+ item To build with XFree86/X.Org < 7.0 add --without-xorg-x11r7 flag [Christopher Bratusek]
+
 @item Added ebuild [Harald van Dijk]
 
 @item rep.m4 has been dropped use librep.pc/rep-gtk.pc instead [Christopher Bratusek]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]