[metacity] Fix build on Solaris. Closes #580665.



commit baeb3d954477ca4e0dbf617d46d970ec6a7d9985
Author: Brian Cameron <brian cameron oracle com>
Date:   Sun Jan 16 10:18:50 2011 -0500

    Fix build on Solaris.  Closes #580665.
    
    This patch fixes two issues on Solaris:
    
    1) It is necessary on Solaris to run PKG_CHECK on gthread-2.0 and add
       glib/gthread to METACITY_LIBS in order for metacity to compile.  This is
       because Solaris doesn't allow implicit linking.
    
    2) src/compositor/compositor-xrender.c- needs _XOPEN_SOURCE_600 or else you
       get this error:
    
       #error: "Compiler or options invalid for pre-UNIX 03 X/Open
       applications        and pre-2001 POSIX applications"

 configure.in                        |    4 ++--
 src/compositor/compositor-xrender.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/configure.in b/configure.in
index 4138ede..1d2922b 100644
--- a/configure.in
+++ b/configure.in
@@ -198,7 +198,7 @@ AM_GLIB_GNU_GETTEXT
 
 ## here we get the flags we'll actually use
 # GOptionEntry requires         glib-2.6.0
-PKG_CHECK_MODULES(ALL, glib-2.0 >= 2.6.0)
+PKG_CHECK_MODULES(ALL, glib-2.0 >= 2.6.0 gthread-2.0 >= 2.6.0)
 # gtk_window_set_icon_name requires gtk2+-2.60
 PKG_CHECK_MODULES(METACITY_MESSAGE, gtk+-$GTK_API_VERSION >= $GTK_MIN_VERSION)
 PKG_CHECK_MODULES(METACITY_WINDOW_DEMO, gtk+-$GTK_API_VERSION >= $GTK_MIN_VERSION)
@@ -460,7 +460,7 @@ if test "x$found_xsync" = "xyes"; then
    AC_DEFINE(HAVE_XSYNC, , [Have the Xsync extension library])
 fi
 
-METACITY_LIBS="$METACITY_LIBS $XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lm"
+METACITY_LIBS="$ALL_LIBS $METACITY_LIBS $XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lm"
 METACITY_MESSAGE_LIBS="$METACITY_MESSAGE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
 METACITY_WINDOW_DEMO_LIBS="$METACITY_WINDOW_DEMO_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
 METACITY_PROPS_LIBS="$METACITY_PROPS_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
diff --git a/src/compositor/compositor-xrender.c b/src/compositor/compositor-xrender.c
index 8c06d1f..b79394a 100644
--- a/src/compositor/compositor-xrender.c
+++ b/src/compositor/compositor-xrender.c
@@ -22,7 +22,7 @@
  */
 
 #define _GNU_SOURCE
-#define _XOPEN_SOURCE 500 /* for usleep() */
+#define _XOPEN_SOURCE 600 /* for usleep() */
 
 #include <config.h>
 



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