summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Fontaine <arnau@debian.org>2010-08-06 16:30:20 -0500
committerArnaud Fontaine <arnau@debian.org>2010-08-09 15:47:27 -0500
commit29cac52f6c8b99b6052e588cff37b3deb66cae52 (patch)
tree440ea02029708cdd80a6cc7afd604afc6f542546
parentd990481d5e709e2fd486432ac055fdce3bc37a9c (diff)
Split up atom, aux event into their own repository
-rw-r--r--Makefile.am3
-rw-r--r--atom/Makefile.am4
-rw-r--r--configure.ac89
-rw-r--r--event/event.c8
4 files changed, 21 insertions, 83 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..1f54088
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,3 @@
+MAINTAINERCLEANFILES = Makefile.in
+
+SUBDIRS = atom aux event
diff --git a/atom/Makefile.am b/atom/Makefile.am
index 8be6e60..d018828 100644
--- a/atom/Makefile.am
+++ b/atom/Makefile.am
@@ -23,7 +23,7 @@ atoms.c: atoms.gperf
$(GPERF) --output-file $@ $<
atoms.gperf: atoms.gperf.m4 atomlist.m4
- $(M4) -I$(srcdir) $< >$@
+ $(GNU_M4) -I$(srcdir) $< >$@
xcb_atom.h: xcb_atom.h.m4 atomlist.m4
- $(M4) -I$(srcdir) $< >$@
+ $(GNU_M4) -I$(srcdir) $< >$@
diff --git a/configure.ac b/configure.ac
index d843da6..dd5132f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,101 +1,30 @@
dnl AC_TYPE_SSIZE_T is defined from 2.59c
AC_PREREQ(2.59c)
-AC_INIT([xcb-util],0.3.7,[xcb@lists.freedesktop.org])
+AC_INIT([xcb-util-core],0.3.7,[xcb@lists.freedesktop.org])
AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
-AC_CHECK_PROGS(M4, [m4 gm4], [no])
-if test $M4 != "no" ; then
- AC_MSG_CHECKING([if $M4 supports -I])
- if $M4 -I. /dev/null > /dev/null 2>&1 ; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- # Try finding the gnu version
- AC_CHECK_PROGS(GM4, gm4, [no])
- if test $GM4 = "no" ; then
- AC_PATH_PROGS(GNUM4, m4, [no], [/usr/gnu/bin])
- M4="$GNUM4"
- else
- M4="$GM4"
- fi
- fi
-fi
-if test $M4 = "no"; then
- AC_MSG_ERROR([Can't find usable m4, please install it and try again])
-fi
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.11.0 or later before running autoconf/autogen])])
+
+XORG_MACROS_VERSION(1.11.0)
+XORG_CHECK_GNU_M4
+XORG_XCB_UTIL_COMMON(1.4, 1.6)
+
AC_CHECK_PROGS(GPERF, gperf, [no])
if test $GPERF = "no"; then
- AC_MSG_ERROR([Can't find gperf, please install it and try again])
+ AC_MSG_ERROR([Can't find gperf, please install it and try again])
fi
-AC_PROG_CC
-AC_PROG_LIBTOOL
-if test "x$GCC" = xyes ; then
- CWARNFLAGS="-Wall"
-else
- AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
- if test "x$SUNCC" = "xyes"; then
- CWARNFLAGS="-v"
- fi
-fi
-AC_SUBST(CWARNFLAGS)
AC_CHECK_FUNCS_ONCE(vasprintf)
-
-dnl Checking whether ssize_t is defined (xcb-util-common.h)
AC_TYPE_SSIZE_T
-xcbincludedir='${includedir}/xcb'
-AC_SUBST(xcbincludedir)
-
-pkgconfigdir='${libdir}/pkgconfig'
-AC_SUBST(pkgconfigdir)
-
-PKG_CHECK_MODULES(XCB, xcb >= 1.4)
-
-######
-# Check version of xcb-proto that xcb was compiled against
-######
-xcbproto_required=1.6
-
-# Moved from AX_COMPARE_VERSION to maintain proper output
-AC_PROG_AWK
-
-AC_MSG_CHECKING([whether libxcb was compiled against xcb-proto >= $xcbproto_required])
-xcbproto_version=`$PKG_CONFIG --variable=xcbproto_version xcb`
-AX_COMPARE_VERSION([$xcbproto_version],[ge],[$xcbproto_required], xcbproto_ok="yes", xcbproto_ok="no")
-AC_MSG_RESULT([$xcbproto_ok])
-
-if test $xcbproto_ok = no; then
- AC_MSG_ERROR([libxcb was compiled against xcb-proto $xcbproto_version; it needs to be compiled against version $xcbproto_required or higher])
-fi
-
-
-PKG_CHECK_MODULES(XCB_SHM, xcb-shm)
-PKG_CHECK_MODULES(XCB_RENDER, xcb-render)
PKG_CHECK_MODULES(XPROTO, xproto >= 7.0.8)
-XCB_AUX_CFLAGS='-I$(top_srcdir)/aux'
-XCB_AUX_LIBS='$(top_builddir)/aux/libxcb-aux.la'
-XCB_ATOM_CFLAGS='-I$(top_srcdir)/atom -I$(top_builddir)/atom'
-XCB_ATOM_LIBS='$(top_builddir)/atom/libxcb-atom.la'
-XCB_ICCCM_CFLAGS='-I$(top_srcdir)/icccm'
-XCB_ICCCM_LIBS='$(top_builddir)/icccm/libxcb-icccm.la'
-AC_SUBST(XCB_AUX_CFLAGS)
-AC_SUBST(XCB_AUX_LIBS)
-AC_SUBST(XCB_ATOM_CFLAGS)
-AC_SUBST(XCB_ATOM_LIBS)
-AC_SUBST(XCB_ICCCM_CFLAGS)
-AC_SUBST(XCB_ICCCM_LIBS)
-
AC_OUTPUT([Makefile
aux/Makefile aux/xcb-aux.pc
- image/Makefile image/xcb-image.pc
atom/Makefile atom/xcb-atom.pc
event/Makefile event/xcb-event.pc
- keysyms/Makefile keysyms/xcb-keysyms.pc
- icccm/Makefile icccm/xcb-icccm.pc
- renderutil/Makefile renderutil/xcb-renderutil.pc
xcb_util_intro
])
diff --git a/event/event.c b/event/event.c
index f770612..de8899a 100644
--- a/event/event.c
+++ b/event/event.c
@@ -31,7 +31,13 @@
#include <string.h>
#include "xcb_event.h"
-#include "../xcb-util-common.h"
+
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#define ssizeof(foo) (ssize_t)sizeof(foo)
+#define countof(foo) (ssizeof(foo) / ssizeof(foo[0]))
static const char *labelError[] =
{