libxfce4mcs changes and cleanups

Benedikt Meurer Benedikt.Meurer at unix-ag.uni-siegen.de
Thu Feb 27 16:56:23 CET 2003


On Thu, 27, Feb 2003, Benedikt Meurer wrote:

> I did some cleanups and changes to libxfce4mcs. To apply the changes:
> 
> 	1) apply the .diff
> 	2) untar the .tar.gz in libxfce4mcs
> 	3) remove acconfig.h (this is obsolete)
> 	4) Try if it works for Linux too ;)

Same for libxfcegui4. Instructions for apply remain same as above.

regards,
Benedikt

-- 
Those who do not understand Unix are condemned to reinvent it, poorly.
    -- Henry Spencer
-------------- next part --------------
Index: ChangeLog
===================================================================
RCS file: /cvsroot/xfce/xfce-devel/libxfcegui4/ChangeLog,v
retrieving revision 1.5
diff -u -r1.5 ChangeLog
--- ChangeLog	11 Feb 2003 19:49:14 -0000	1.5
+++ ChangeLog	27 Feb 2003 15:52:14 -0000
@@ -1,3 +1,9 @@
+2003-02-27  bmeurer
+
+	* m4: Added automake macros
+	* configure.in, Makefile.am, libxfcegui4/Makefile.am: Cleanups, ensure
+	correct library handling/linking
+
 2003-02-11  xfce
 
 	* libxfcegui4/dialogs.c: Just free var as soon as possible
Index: Makefile.am
===================================================================
RCS file: /cvsroot/xfce/xfce-devel/libxfcegui4/Makefile.am,v
retrieving revision 1.6
diff -u -r1.6 Makefile.am
--- Makefile.am	25 Feb 2003 20:03:32 -0000	1.6
+++ Makefile.am	27 Feb 2003 15:52:14 -0000
@@ -8,3 +8,5 @@
 rpm: dist
 	rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz
 	@rm -f $(PACKAGE)-$(VERSION).tar.gz
+
+ACLOCAL_AMFLAGS = -I m4
Index: autogen.sh
===================================================================
RCS file: /cvsroot/xfce/xfce-devel/libxfcegui4/autogen.sh,v
retrieving revision 1.8
diff -u -r1.8 autogen.sh
--- autogen.sh	25 Feb 2003 21:23:26 -0000	1.8
+++ autogen.sh	27 Feb 2003 15:52:14 -0000
@@ -6,6 +6,8 @@
 
 DIE=0
 
+ACLOCAL_FLAGS="-I m4 $ACLOCAL_FLAGS"
+
 (test -f $srcdir/configure.in) || {
     echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
     echo " top-level package directory"
Index: configure.in
===================================================================
RCS file: /cvsroot/xfce/xfce-devel/libxfcegui4/configure.in,v
retrieving revision 1.24
diff -u -r1.24 configure.in
--- configure.in	25 Feb 2003 20:17:05 -0000	1.24
+++ configure.in	27 Feb 2003 15:52:14 -0000
@@ -32,64 +32,16 @@
 AC_SUBST(LIBXFCEGUI4_REVISION)
 AC_SUBST(LIBXFCEGUI4_AGE)
 
-dnl
-dnl Check for -lSM
-dnl
-
-AC_PATH_XTRA
 AC_CHECK_HEADERS(stdlib.h string.h unistd.h)
 
-AC_CHECK_LIB(X11, main,, AC_MSG_ERROR([libX11 is missing from your system: Make sure you have both the  X Window System libraries and development headers correctly installed]), $X_CFLAGS $X_PRE_LIBS $X_EXTRA_LIBS $X_LIBS)
-
-# ensure correct rpath handling for X11 library directory
-if test "x$x_libraries" != "x"; then
-	X_LIBS="-Wl,-R$x_libraries $X_LIBS"
-fi
-
-SM_LIBS=""
-sm_save_cppflags="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS $X_CFLAGS"
-
-HAVE_SM=true
-AC_CHECK_LIB(SM, SmcSaveYourselfDone,
-	[SM_LIBS="$X_LIBS -lSM -lICE"],HAVE_SM=false,
-	$X_LIBS -lICE)
-AC_CHECK_HEADERS(X11/SM/SMlib.h,,HAVE_SM=false)
-if test "$HAVE_SM" = true; then
-	AC_DEFINE(HAVE_LIBSM, 1, "have_libsm")
-fi
-
-AC_SUBST(SM_LIBS)
-CPPFLAGS="$sm_save_cppflags"
-
-AC_ARG_ENABLE(debug, [  --enable-debug  	use this option if you want to debug xfwm4], [ AC_DEFINE(DEBUG, 1, [Define to 1 for debug.]) ],)
-
-AC_ARG_ENABLE(xinerama, [  --enable-xinerama	enable xinerama extension [default]
-  --disable-xinerama      Don't use xinerama extension even if available], [],
- [enable_xinerama=yes])
-
-XINERAMA_LIBS=""
-if test "x$enable_xinerama" = "xyes"; then
-        AC_CHECK_LIB(Xinerama, XineramaQueryScreens,
-	        [XINERAMA_LIBS="-lXinerama"
-	         AC_CHECK_HEADER(X11/extensions/Xinerama.h,AC_DEFINE(HAVE_X11_EXTENSIONS_XINERAMA_H, 1, [Define to 1 if XFree86 Xinerama available.]),,[#include <X11/Xlib.h>])],
-	         [],[$X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS])
-fi
-AC_SUBST(XINERAMA_LIBS)
-
-GLIB_REQUIRED_VERSION=2.0.0
-GTK_REQUIRED_VERSION=2.0.0
-PANGO_REQUIRED_VERSION=1.0.0
-
-AC_DEFINE_UNQUOTED(GLIB_REQUIRED_VERSION, $GLIB_REQUIRED_VERSION, [Define glib required version.])
-AC_DEFINE_UNQUOTED(GTK_REQUIRED_VERSION, $GTK_REQUIRED_VERSION, [Define gtk required version.])
-AC_DEFINE_UNQUOTED(PANGO_REQUIRED_VERSION, $PANGO_REQUIRED_VERSION, [Define pango required version.])
+AM_LIBX11_REQUIRE
+AM_LIBSM
+AM_LIBXINERAMA
 
-AC_SUBST(GLIB_REQUIRED_VERSION)
-AC_SUBST(GTK_REQUIRED_VERSION)
-AC_SUBST(PANGO_REQUIRED_VERSION)
+AM_DEBUG_SUPPORT
 
-PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION gmodule-2.0 >= $GLIB_REQUIRED_VERSION gtk+-2.0 >= $GTK_REQUIRED_VERSION gdk-2.0 >= $GTK_REQUIRED_VERSION pango >= $PANGO_REQUIRED_VERSION)
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.0.0)
+PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.0.0)
 
 GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`  
 AC_SUBST(GLIB_GENMARSHAL)
Index: libxfcegui4/xinerama.c
===================================================================
RCS file: /cvsroot/xfce/xfce-devel/libxfcegui4/libxfcegui4/xinerama.c,v
retrieving revision 1.1
diff -u -r1.1 xinerama.c
--- libxfcegui4/xinerama.c	22 Nov 2002 14:50:56 -0000	1.1
+++ libxfcegui4/xinerama.c	27 Feb 2003 15:52:14 -0000
@@ -26,7 +26,7 @@
 
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
-#ifdef HAVE_X11_EXTENSIONS_XINERAMA_H
+#ifdef HAVE_LIBXINERAMA
 #  include <X11/extensions/Xinerama.h>
 #endif
 
@@ -66,13 +66,13 @@
 static int emulate_heads = 2;
 #endif
 
-#if defined(HAVE_X11_EXTENSIONS_XINERAMA_H) || defined(EMULATE_XINERAMA)
+#if defined(HAVE_LIBXINERAMA) || defined(EMULATE_XINERAMA)
 static XineramaScreenInfo *xinerama_infos;
 static int xinerama_heads;
 static gboolean enable_xinerama;
 #endif
 
-#if defined(HAVE_X11_EXTENSIONS_XINERAMA_H)
+#if defined(HAVE_LIBXINERAMA)
 int xinerama_major, xinerama_minor;
 #endif
 
@@ -84,7 +84,7 @@
     enable_xinerama = TRUE;
     return enable_xinerama;
 #else
-#ifdef HAVE_X11_EXTENSIONS_XINERAMA_H
+#ifdef HAVE_LIBXINERAMA
     if(!XineramaQueryExtension(dpy, &xinerama_major, &xinerama_minor))
     {
         g_message("Xinerama extension disabled");
@@ -107,7 +107,7 @@
 void xineramaFree(void)
 {
 #ifndef EMULATE_XINERAMA
-#ifdef HAVE_X11_EXTENSIONS_XINERAMA_H
+#ifdef HAVE_LIBXINERAMA
     XFree(xinerama_infos);
 #endif
 #endif
@@ -115,7 +115,7 @@
 
 int xineramaGetHeads(void)
 {
-#if defined(HAVE_X11_EXTENSIONS_XINERAMA_H) || defined(EMULATE_XINERAMA)
+#if defined(HAVE_LIBXINERAMA) || defined(EMULATE_XINERAMA)
     return xinerama_heads;
 #else
     return 0;
@@ -124,7 +124,7 @@
 
 /* Xinerama handling routines */
 
-#if defined(HAVE_X11_EXTENSIONS_XINERAMA_H) || defined(EMULATE_XINERAMA)
+#if defined(HAVE_LIBXINERAMA) || defined(EMULATE_XINERAMA)
 static int findhead(int x, int y)
 {
     extern XineramaScreenInfo *xinerama_infos;
@@ -198,7 +198,7 @@
 
 int MyDisplayHeight(Display * dpy, int screen, int x, int y)
 {
-#if defined(HAVE_X11_EXTENSIONS_XINERAMA_H) || defined(EMULATE_XINERAMA)
+#if defined(HAVE_LIBXINERAMA) || defined(EMULATE_XINERAMA)
     int head;
 
     if((xinerama_heads == 0) || (xinerama_infos == NULL) || (!enable_xinerama))
@@ -214,7 +214,7 @@
 
 int MyDisplayWidth(Display * dpy, int screen, int x, int y)
 {
-#if defined(HAVE_X11_EXTENSIONS_XINERAMA_H) || defined(EMULATE_XINERAMA)
+#if defined(HAVE_LIBXINERAMA) || defined(EMULATE_XINERAMA)
     int head;
 
     if((xinerama_heads == 0) || (xinerama_infos == NULL) || (!enable_xinerama))
@@ -230,7 +230,7 @@
 
 int MyDisplayX(int x, int y)
 {
-#if defined(HAVE_X11_EXTENSIONS_XINERAMA_H) || defined(EMULATE_XINERAMA)
+#if defined(HAVE_LIBXINERAMA) || defined(EMULATE_XINERAMA)
     int head;
 
     if((xinerama_heads == 0) || (xinerama_infos == NULL) || (!enable_xinerama))
@@ -247,7 +247,7 @@
 
 int MyDisplayY(int x, int y)
 {
-#if defined(HAVE_X11_EXTENSIONS_XINERAMA_H) || defined(EMULATE_XINERAMA)
+#if defined(HAVE_LIBXINERAMA) || defined(EMULATE_XINERAMA)
     int head;
 
     if((xinerama_heads == 0) || (xinerama_infos == NULL) || (!enable_xinerama))
@@ -263,7 +263,7 @@
 
 int MyDisplayMaxX(Display * dpy, int screen, int x, int y)
 {
-#if defined(HAVE_X11_EXTENSIONS_XINERAMA_H) || defined(EMULATE_XINERAMA)
+#if defined(HAVE_LIBXINERAMA) || defined(EMULATE_XINERAMA)
     int head;
 
     if((xinerama_heads == 0) || (xinerama_infos == NULL) || (!enable_xinerama))
@@ -279,7 +279,7 @@
 
 int MyDisplayMaxY(Display * dpy, int screen, int x, int y)
 {
-#if defined(HAVE_X11_EXTENSIONS_XINERAMA_H) || defined(EMULATE_XINERAMA)
+#if defined(HAVE_LIBXINERAMA) || defined(EMULATE_XINERAMA)
     int head;
 
     if((xinerama_heads == 0) || (xinerama_infos == NULL) || (!enable_xinerama))
@@ -295,7 +295,7 @@
 
 gboolean isRightMostHead(Display * dpy, int screen, int x, int y)
 {
-#if defined(HAVE_X11_EXTENSIONS_XINERAMA_H) || defined(EMULATE_XINERAMA)
+#if defined(HAVE_LIBXINERAMA) || defined(EMULATE_XINERAMA)
     return (MyDisplayMaxX(dpy, screen, x, y) == XDisplayWidth(dpy, screen));
 #else
     return (TRUE);
@@ -304,7 +304,7 @@
 
 gboolean isLeftMostHead(Display * dpy, int screen, int x, int y)
 {
-#if defined(HAVE_X11_EXTENSIONS_XINERAMA_H) || defined(EMULATE_XINERAMA)
+#if defined(HAVE_LIBXINERAMA) || defined(EMULATE_XINERAMA)
     return (MyDisplayX(x, y) == 0);
 #else
     return (TRUE);
@@ -313,7 +313,7 @@
 
 gboolean isTopMostHead(Display * dpy, int screen, int x, int y)
 {
-#if defined(HAVE_X11_EXTENSIONS_XINERAMA_H) || defined(EMULATE_XINERAMA)
+#if defined(HAVE_LIBXINERAMA) || defined(EMULATE_XINERAMA)
     return (MyDisplayY(x, y) == 0);
 #else
     return (TRUE);
@@ -322,7 +322,7 @@
 
 gboolean isBottomMostHead(Display * dpy, int screen, int x, int y)
 {
-#if defined(HAVE_X11_EXTENSIONS_XINERAMA_H) || defined(EMULATE_XINERAMA)
+#if defined(HAVE_LIBXINERAMA) || defined(EMULATE_XINERAMA)
     return (MyDisplayMaxY(dpy, screen, x, y) == XDisplayHeight(dpy, screen));
 #else
     return (TRUE);
Index: libxfcegui4/xinerama.h
===================================================================
RCS file: /cvsroot/xfce/xfce-devel/libxfcegui4/libxfcegui4/xinerama.h,v
retrieving revision 1.1
diff -u -r1.1 xinerama.h
--- libxfcegui4/xinerama.h	22 Nov 2002 14:50:56 -0000	1.1
+++ libxfcegui4/xinerama.h	27 Feb 2003 15:52:14 -0000
@@ -33,7 +33,7 @@
 #undef EMULATE_XINERAMA
 
 #ifdef EMULATE_XINERAMA
-#ifndef HAVE_X11_EXTENSIONS_XINERAMA_H
+#ifndef HAVE_LIBXINERAMA
 /* Define XineramaScreenInfo for systems missing Xinerama support */
 typedef struct
 {
Index: libxfcegui4/libxfcegui4-1.0.pc.in
===================================================================
RCS file: /cvsroot/xfce/xfce-devel/libxfcegui4/libxfcegui4/libxfcegui4-1.0.pc.in,v
retrieving revision 1.6
diff -u -r1.6 libxfcegui4-1.0.pc.in
--- libxfcegui4/libxfcegui4-1.0.pc.in	23 Feb 2003 19:39:35 -0000	1.6
+++ libxfcegui4/libxfcegui4-1.0.pc.in	27 Feb 2003 15:52:14 -0000
@@ -7,5 +7,5 @@
 Description: libxfcegui4
 Requires: glib-2.0 gdk-2.0 gtk+-2.0 
 Version: @VERSION@
-Libs: -Wl,-R${libdir} -L${libdir} -lxfcegui4 @LIBS@ @X_LIBS@ @SM_LIBS@ @BASE_DEPENDENCIES_LIBS@ @XINERAMA_LIBS@
-Cflags: @X_CFLAGS@ @BASE_DEPENDENCIES_CFLAGS@ -I${includedir}/xfce4
+Libs: -Wl,-R${libdir} -L${libdir} -lxfcegui4 @LIBX11_LDFLAGS@ @LIBSM_LDFLAGS@ @LIBXINERAMA_LDFLAGS@ @LIBXINERAMA_LIBS@
+Cflags: @LIBX11_CFLAGS@ @LIBSM_CFLAGS@ @LIBXINERAMA_CFLAGS@ -I${includedir}/xfce4
Index: libxfcegui4/Makefile.am
===================================================================
RCS file: /cvsroot/xfce/xfce-devel/libxfcegui4/libxfcegui4/Makefile.am,v
retrieving revision 1.19
diff -u -r1.19 Makefile.am
--- libxfcegui4/Makefile.am	12 Jan 2003 14:48:13 -0000	1.19
+++ libxfcegui4/Makefile.am	27 Feb 2003 15:52:15 -0000
@@ -91,6 +91,35 @@
 	$(netk_built_headers) \
 	$(netk_built_cfiles)
 
+libxfcegui4_la_LDFLAGS = 		\
+	-export-dynamic 		\
+	-version-info $(LIBXFCEGUI4_CURRENT:)$(LIBXFCEGUI4_REVISION):$(LIBXFCEGUI4_AGE) \
+	-export-symbols-regex "^[^_].*"	\
+	@LIBSM_LDFLAGS@			\
+	@LIBX11_LDFLAGS@		\
+	@LIBXINERAMA_LDFLAGS@
+
+libxfcegui4_la_LIBADD =			\
+	@GLIB_LIBS@			\
+	@GTK_LIBS@			\
+	@LIBS@				\
+	@LIBSM_LIBS@			\
+	@LIBX11_LIBS@			\
+	@LIBXINERAMA_LIBS@
+
+libxfcegui4_la_CFLAGS =			\
+	-I$(srcdir)			\
+	@CFLAGS@			\
+	@GLIB_CFLAGS@			\
+	@GTK_CFLAGS@			\
+	@LIBSM_CFLAGS@			\
+	@LIBX11_CFLAGS@			\
+	@LIBXINERAMA_CFLAGS@		\
+	-DG_DISABLE_DEPRECATED		\
+	-DGTK_DISABLE_DEPRECATED	\
+	-DGDK_DISABLE_DEPRECATED	\
+	-DGDK_PIXBUF_DISABLE_DEPRECATED
+
 regenerate-built-sources:
 	echo "Building netk-enum-types.h" \
 	&& glib-mkenums --fhead "#ifndef __NETK_ENUM_TYPES_H__\n#define __NETK_ENUM_TYPES_H__\n" --fprod "/* enumerations from \"@filename@\" */\n" --vhead "GType @enum_name at _get_type (void);\n#define NETK_TYPE_ at ENUMSHORT@ (@enum_name at _get_type())\n" --ftail "#endif /* __NETK_ENUM_TYPES_H__ */" $(netk_headers) > netk-enum-types.h \
@@ -110,16 +139,6 @@
 netk-inlinepixbufs.h: $(IMAGES)
 	$(GDK_PIXBUF_CSOURCE) --raw --build-list $(VARIABLES) >$(srcdir)/netk-inlinepixbufs.h
 
-
-libxfcegui4_la_LDFLAGS = \
-	-version-info $(LIBXFCEGUI4_CURRENT:)$(LIBXFCEGUI4_REVISION):$(LIBXFCEGUI4_AGE) \
-	-export-symbols-regex "^[^_].*"
-
-libxfcegui4_la_LIBADD = @LIBS@ @X_LIBS@ @BASE_DEPENDENCIES_LIBS@ @XINERAMA_LIBS@
-
-libxfcegui4_la_CFLAGS = -I$(srcdir) @CFLAGS@ @X_CFLAGS@ @BASE_DEPENDENCIES_CFLAGS@ \
--DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED \
--DGDK_PIXBUF_DISABLE_DEPRECATED
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libxfcegui4-1.0.pc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libxfcegui4-m4.tar.gz
Type: application/x-tar-gz
Size: 1268 bytes
Desc: not available
URL: <http://mail.xfce.org/pipermail/xfce4-dev/attachments/20030227/5ac59d61/attachment.bin>


More information about the Xfce4-dev mailing list