summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2013-11-10 17:55:40 +0100
committerJonas Ådahl <jadahl@gmail.com>2013-11-12 22:37:20 +0100
commitbd4db1c2a21fddd9b1135a41c5adaff3db0f8b3a (patch)
tree8fb9fb6e4d4be3a305555c6c05660058cfe4e110 /configure.ac
parentfdf50bc34bb150bc1cf04f37ad6d8bc1e708c7bb (diff)
Port evdev code to be used as a shared library
This commit introduces build script configuration for building a shared library 'libinput.so' containing the evdev input device functionality from weston. evdev.c, evdev.h and evdev-touchpad.c are ported to not use the data structures and API in weston and libwayland-server in order to minimize dependencies. The API of filter.c and filter.h are renamed to not include the 'weston_' prefix. Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac53
1 files changed, 53 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..8e0f1c9
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,53 @@
+AC_PREREQ([2.64])
+
+m4_define([libinput_major_version], [0])
+m4_define([libinput_minor_version], [0])
+m4_define([libinput_micro_version], [90])
+m4_define([libinput_version],
+ [libinput_major_version.libinput_minor_version.libinput_micro_version])
+
+AC_INIT([libinput],
+ [libinput_version],
+ [http://nobugtracker],
+ [libinput],
+ [http://nohomepage])
+
+AC_SUBST([LIBINPUT_VERSION_MAJOR], [libinput_major_version])
+AC_SUBST([LIBINPUT_VERSION_MINOR], [libinput_minor_version])
+AC_SUBST([LIBINPUT_VERSION_MICRO], [libinput_micro_version])
+AC_SUBST([LIBINPUT_VERSION], [libinput_version])
+
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_MACRO_DIR([m4])
+
+AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
+
+AM_SILENT_RULES([yes])
+
+# Check for programs
+AC_PROG_CC
+
+# Initialize libtool
+LT_PREREQ([2.2])
+LT_INIT
+
+AC_CHECK_DECL(TFD_CLOEXEC,[],
+ [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile libinput")],
+ [[#include <sys/timerfd.h>]])
+AC_CHECK_DECL(CLOCK_MONOTONIC,[],
+ [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile libinput")],
+ [[#include <time.h>]])
+
+PKG_PROG_PKG_CONFIG()
+PKG_CHECK_MODULES(MTDEV, [mtdev >= 1.1.0])
+
+if test "x$GCC" = "xyes"; then
+ GCC_CFLAGS="-Wall -Wextra -Wno-unused-parameter -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden"
+fi
+AC_SUBST(GCC_CFLAGS)
+
+AC_CONFIG_FILES([Makefile
+ src/Makefile
+ src/libinput.pc
+ src/libinput-version.h])
+AC_OUTPUT