diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-06-23 22:14:02 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-06-23 22:14:02 +0000 |
commit | 5a5580a8e77dda9b7746012405f8e813a0e6c87b (patch) | |
tree | e42abf38789183406222263f309c03c26e56c425 /configure.in | |
parent | 92e87e40a7525cd84579865bf7404a84bde93115 (diff) | |
download | gtk+-5a5580a8e77dda9b7746012405f8e813a0e6c87b.tar.gz |
Fix tests for XShm.h.
Sat Jun 23 18:02:46 2001 Owen Taylor <otaylor@redhat.com>
* configure.in: Fix tests for XShm.h.
* gdk/x11/gdkimage-x11.c: Cleanup error handling in
gdk_image_new() by use of goto, properly use g_object_unref().
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/configure.in b/configure.in index f1300ea197..3b8eba5d76 100644 --- a/configure.in +++ b/configure.in @@ -775,18 +775,27 @@ if test "x$gdktarget" = "xx11"; then AC_CHECK_HEADER(sys/shm.h, AC_DEFINE(HAVE_SHM_H), no_sys_shm=yes) # Check for the X shared memory extension header file + have_xshm=no AC_MSG_CHECKING(X11/extensions/XShm.h) if test "x$no_xext_lib" = "xyes"; then - AC_MSG_RESULT(no) - no_xshm=yes + : else - if test -f "$x_includes/X11/extensions/XShm.h"; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_XSHM_H) - else - AC_MSG_RESULT(no) - no_xshm=yes - fi + gtk_save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $x_cflags" + AC_TRY_COMPILE([ +#include <stdlib.h> +#include <sys/types.h> +#include <sys/ipc.h> +#include <sys/shm.h> +#include <X11/Xlib.h> +#include <X11/Xutil.h> +#include <X11/extensions/XShm.h> +], [XShmSegmentInfo *x_shm_info;], have_xshm=yes) + CFLAGS="$gtk_save_CFLAGS" + fi + AC_MSG_RESULT($have_xshm) + if test $have_xshm = yes ; then + AC_DEFINE(HAVE_XSHM_H) fi fi |