summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2010-04-11 10:59:21 -0400
committerGaetan Nadon <memsize@videotron.ca>2010-06-16 15:15:25 -0400
commit0d88d9fb6f1200126212dd45cbddc08f3b75ebfb (patch)
tree6c351b67e50832f451955b3a8ced082ce42b09d6
parent2996458c2fc88671ba8626de984b2f082042dc62 (diff)
config: replace hard-coded -DLINUX_INPUT with proper AC_CHECK_HEADERS
Not all platforms have Linux kernel input subsystem. Automake AC_CHECK_HEADERS is designed for that purpose. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r--configure.ac2
-rw-r--r--src/Makefile.am2
-rw-r--r--src/xf86Aiptek.c6
-rw-r--r--src/xf86Aiptek.h5
4 files changed, 7 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 6395548..e03b13c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,7 +64,7 @@ PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto $REQUIRED_MODULES)
# Checks for libraries.
# Checks for header files.
-AC_HEADER_STDC
+AC_CHECK_HEADERS([linux/input.h])
DRIVER_NAME=aiptek
AC_SUBST([DRIVER_NAME])
diff --git a/src/Makefile.am b/src/Makefile.am
index abae1f4..0b8f60a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -25,7 +25,7 @@
# _ladir passes a dummy rpath to libtool so the thing will actually link
# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
-AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS) -DLINUX_INPUT
+AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS)
@DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la
@DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version
diff --git a/src/xf86Aiptek.c b/src/xf86Aiptek.c
index bd78121..c282bf3 100644
--- a/src/xf86Aiptek.c
+++ b/src/xf86Aiptek.c
@@ -117,10 +117,6 @@
*
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#include "xf86Aiptek.h"
#include <errno.h>
#include <string.h>
@@ -2264,7 +2260,7 @@ xf86AiptekInit(InputDriverPtr drv,
xf86Msg(X_CONFIG, "%s is in %s mode\n", local->name,
(device->flags & ABSOLUTE_FLAG) ? "absolute" : "relative");
-#ifdef LINUX_INPUT
+#ifdef HAVE_LINUX_INPUT_H
/* The define-name is accurate; the XFree86 keyword is not. We are
* reading from a Linux kernel "Input" device. The Input device
* layer generally supports mice, joysticks, and keyboards. As
diff --git a/src/xf86Aiptek.h b/src/xf86Aiptek.h
index 810185b..8a8b5cc 100644
--- a/src/xf86Aiptek.h
+++ b/src/xf86Aiptek.h
@@ -40,8 +40,11 @@
#ifndef _AIPTEK_H_
#define _AIPTEK_H_
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
-#ifdef LINUX_INPUT
+#ifdef HAVE_LINUX_INPUT_H
# include <asm/types.h>
# include <linux/input.h>
# ifndef EV_MSC