[Gnucash-changes] r13554 - gnucash/trunk - Check for <X11/Xlib.h> and ignore code section if header unavailable.

Christian Stimming cstim at cvs.gnucash.org
Thu Mar 9 08:00:38 EST 2006


Author: cstim
Date: 2006-03-09 08:00:37 -0500 (Thu, 09 Mar 2006)
New Revision: 13554
Trac: http://svn.gnucash.org/trac/changeset/13554

Modified:
   gnucash/trunk/configure.in
   gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c
Log:
Check for <X11/Xlib.h> and ignore code section if header unavailable.



Modified: gnucash/trunk/configure.in
===================================================================
--- gnucash/trunk/configure.in	2006-03-09 12:59:16 UTC (rev 13553)
+++ gnucash/trunk/configure.in	2006-03-09 13:00:37 UTC (rev 13554)
@@ -115,6 +115,7 @@
 fi
 
 # These are unavailable on windows/mingw32
+AC_CHECK_HEADERS(X11/Xlib.h glob.h)
 AC_CHECK_FUNCS(getppid getuid gethostname gmtime_r)
 
 ### --------------------------------------------------------------------------

Modified: gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c	2006-03-09 12:59:16 UTC (rev 13553)
+++ gnucash/trunk/src/gnome-utils/gnc-gnome-utils.c	2006-03-09 13:00:37 UTC (rev 13554)
@@ -26,7 +26,9 @@
 #include <gnome.h>
 #include <libguile.h>
 #include <gconf/gconf.h>
-#include <X11/Xlib.h>
+#ifdef HAVE_X11_XLIB_H
+# include <X11/Xlib.h>
+#endif
 
 #include "gnc-html-graph-gog.h"
 
@@ -325,6 +327,7 @@
   return TRUE;
 }
 
+#ifdef HAVE_X11_XLIB_H
 static int
 gnc_x_error (Display *display, XErrorEvent *error)
 {
@@ -345,6 +348,7 @@
 
   return 0;
 }
+#endif
 
 int
 gnc_ui_start_event_loop (void)
@@ -356,7 +360,9 @@
   id = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, 10000, /* 10 secs */
                            gnc_ui_check_events, NULL, NULL);
 
+#ifdef HAVE_X11_XLIB_H
   XSetErrorHandler (gnc_x_error);
+#endif
 
   /* Enter gnome event loop */
   gtk_main ();



More information about the gnucash-changes mailing list