mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Check for <X11/Xlib.h> and ignore code section if header unavailable.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13554 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
a29250686d
commit
80c1f04c80
@ -115,6 +115,7 @@ if test "x$ac_cv_header_ltdl_h" = xno; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# These are unavailable on windows/mingw32
|
# These are unavailable on windows/mingw32
|
||||||
|
AC_CHECK_HEADERS(X11/Xlib.h glob.h)
|
||||||
AC_CHECK_FUNCS(getppid getuid gethostname gmtime_r)
|
AC_CHECK_FUNCS(getppid getuid gethostname gmtime_r)
|
||||||
|
|
||||||
### --------------------------------------------------------------------------
|
### --------------------------------------------------------------------------
|
||||||
|
@ -26,7 +26,9 @@
|
|||||||
#include <gnome.h>
|
#include <gnome.h>
|
||||||
#include <libguile.h>
|
#include <libguile.h>
|
||||||
#include <gconf/gconf.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"
|
#include "gnc-html-graph-gog.h"
|
||||||
|
|
||||||
@ -325,6 +327,7 @@ gnc_ui_check_events (gpointer not_used)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_X11_XLIB_H
|
||||||
static int
|
static int
|
||||||
gnc_x_error (Display *display, XErrorEvent *error)
|
gnc_x_error (Display *display, XErrorEvent *error)
|
||||||
{
|
{
|
||||||
@ -345,6 +348,7 @@ gnc_x_error (Display *display, XErrorEvent *error)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
gnc_ui_start_event_loop (void)
|
gnc_ui_start_event_loop (void)
|
||||||
@ -356,7 +360,9 @@ gnc_ui_start_event_loop (void)
|
|||||||
id = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, 10000, /* 10 secs */
|
id = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, 10000, /* 10 secs */
|
||||||
gnc_ui_check_events, NULL, NULL);
|
gnc_ui_check_events, NULL, NULL);
|
||||||
|
|
||||||
|
#ifdef HAVE_X11_XLIB_H
|
||||||
XSetErrorHandler (gnc_x_error);
|
XSetErrorHandler (gnc_x_error);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Enter gnome event loop */
|
/* Enter gnome event loop */
|
||||||
gtk_main ();
|
gtk_main ();
|
||||||
|
Loading…
Reference in New Issue
Block a user