summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2010-05-30 21:19:29 -0400
committerGaetan Nadon <memsize@videotron.ca>2010-05-31 12:42:57 -0400
commit8843aaf4806344a8bda0f2e981a77f61c18f8037 (patch)
treebdc568c46d9e54fa862c5ea99e6eb26eb27e13d6 /tools
parent76dd6ffee7257f9ff0aec5a9655de67f6e7973c9 (diff)
config: rework the synclient and syndaemon dependencies
The driver does not require inputproto package The hunting for record.h is done only if libXtst is installed AC_CHECK_HEADERS is used rather than checking for package versions HAVE_PROPERTIES is no longer required Normal config output: checking for XI... yes checking for XTST... yes checking for X11/extensions/record.h... yes Permutations of --enable-tools and dependencies: build_tools libXi installed Result ----------- --------------- --------- yes yes build tools auto yes build tools no yes skip build yes no abort configuration auto no warn and skip build no no warn and skip build Permutations of libXtst, record.h and recordproto libXtst record.h recordproto syndaemon installed installed installed using XRecord? yes yes yes yes yes no yes no no no yes no no yes yes no no no no no Other scenarios are possible where you have 2 different versions of record.h installed in different $prefix locations. The order of *_CFLAGS will determine which one gets picked first. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.am10
-rw-r--r--tools/syndaemon.c12
2 files changed, 11 insertions, 11 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am
index b1e851d..7f91a92 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -23,15 +23,15 @@ bin_PROGRAMS = \
synclient \
syndaemon
-AM_CFLAGS = -I$(top_srcdir)/include $(XTST_1_1_CFLAGS) $(RECORDPROTO_1_13_CFLAGS) -I$(sdkdir)
+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(sdkdir)
+AM_CFLAGS = $(XI_CFLAGS)
+AM_LDFLAGS = -lm $(XI_LIBS)
synclient_SOURCES = synclient.c
-synclient_LDFLAGS = -lm $(XI_LIBS)
-synclient_CFLAGS = $(AM_CFLAGS) $(XI_CFLAGS)
syndaemon_SOURCES = syndaemon.c
-syndaemon_LDFLAGS = $(XTST_1_1_LIBS) $(RECORDPROTO_1_13_LIBS) $(XI_LIBS)
-syndaemon_CFLAGS = $(AM_CFLAGS) $(XI_CFLAGS)
+syndaemon_CFLAGS = $(AM_CFLAGS) $(XTST_CFLAGS) $(RECORD_PROTO_CFLAGS)
+syndaemon_LDFLAGS = $(AM_LDFLAGS) $(XTST_LIBS)
else
all:
@echo "Not building syndaemon and synclient."
diff --git a/tools/syndaemon.c b/tools/syndaemon.c
index 4fdcf76..d06fe5f 100644
--- a/tools/syndaemon.c
+++ b/tools/syndaemon.c
@@ -31,10 +31,10 @@
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/extensions/XInput.h>
-#ifdef HAVE_XRECORD
+#ifdef HAVE_X11_EXTENSIONS_RECORD_H
#include <X11/Xproto.h>
#include <X11/extensions/record.h>
-#endif /* HAVE_XRECORD */
+#endif /* HAVE_X11_EXTENSIONS_RECORD_H */
#include <stdio.h>
#include <stdlib.h>
@@ -263,7 +263,7 @@ setup_keyboard_mask(Display *display, int ignore_modifier_keys)
}
/* ---- the following code is for using the xrecord extension ----- */
-#ifdef HAVE_XRECORD
+#ifdef HAVE_X11_EXTENSIONS_RECORD_H
#define MAX_MODIFIERS 16
@@ -440,7 +440,7 @@ void record_main_loop(Display* display, double idle_time) {
XFreeModifiermap(cbres.modifiers);
}
-#endif /* HAVE_XRECORD */
+#endif /* HAVE_X11_EXTENSIONS_RECORD_H */
static XDevice *
dp_get_device(Display *dpy)
@@ -590,7 +590,7 @@ main(int argc, char *argv[])
pad_disabled = False;
store_current_touchpad_state();
-#ifdef HAVE_XRECORD
+#ifdef HAVE_X11_EXTENSIONS_RECORD_H
if (use_xrecord)
{
if(check_xrecord(display))
@@ -601,7 +601,7 @@ main(int argc, char *argv[])
exit(2);
}
} else
-#endif /* HAVE_XRECORD */
+#endif /* HAVE_X11_EXTENSIONS_RECORD_H */
{
setup_keyboard_mask(display, ignore_modifier_keys);