[PATCH:xwd 2/2] Optionally enable existing code to call XkbStdBell from libxkbfile
Alan Coopersmith
alan.coopersmith at oracle.com
Mon Mar 19 13:19:19 PDT 2012
Copied from similar check in oclock/configure.ac
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
configure.ac | 12 +++++++++++-
xwd.c | 4 ++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 888d35d..28ee5d1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,8 +38,18 @@ m4_ifndef([XORG_MACROS_VERSION],
XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
+# Optional dependencies
+AC_ARG_WITH(xkb,
+ AS_HELP_STRING([--without-xkb],
+ [Disable use of XKB to sound bells (Default is with-xkb)]),
+ use_xkb="$withval", use_xkb="yes")
+if test x$use_xkb != xno ; then
+ XKBMODULE="xkbfile"
+ AC_DEFINE([XKB],1,[Define to use XkbStdBell])
+fi
+
# Checks for pkg-config packages
-PKG_CHECK_MODULES(XWD, [x11 xproto >= 7.0.17])
+PKG_CHECK_MODULES(XWD, [x11 xproto >= 7.0.17 ${XKBMODULE}])
AC_CONFIG_FILES([
Makefile
diff --git a/xwd.c b/xwd.c
index 49adc46..5b40121 100644
--- a/xwd.c
+++ b/xwd.c
@@ -63,6 +63,10 @@ in this Software without prior written authorization from The Open Group.
*% color can be supported.
%*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <errno.h>
#include <X11/Xos.h>
--
1.7.9.2
More information about the xorg-devel
mailing list