diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..af437a6 --- /dev/null +++ Makefile.am @@ -0,0 +1 @@ +SUBDIRS = src diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..4af69d9 --- /dev/null +++ configure.ac @@ -0,0 +1,57 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ([2.60]) +AC_INIT([xf86-input-mtrack], [1.0_rc2], [BUG-REPORT-ADDRESS]) +AC_CONFIG_SRCDIR([driver/mtrack.c]) +AC_CONFIG_HEADERS([config.h]) + +AM_INIT_AUTOMAKE([foreign]) +AM_MAINTAINER_MODE + +# Checks for programs. +AC_DISABLE_STATIC +AC_PROG_LIBTOOL + +# Initialize X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS +m4_ifndef([XORG_MACROS_VERSION], + [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION([1.8]) +XORG_DEFAULT_OPTIONS + +# Obtain compiler/linker options from server and required extensions +PKG_CHECK_MODULES(XORG, xorg-server xproto inputproto) + +# Define a configure option for an alternate input module directory +AC_ARG_WITH(xorg-module-dir, + AC_HELP_STRING([--with-xorg-module-dir=DIR], + [Default xorg module directory [[default=$libdir/xorg/modules]]]), + [moduledir="$withval"], + [moduledir="$libdir/xorg/modules"]) +inputdir=${moduledir}/input +AC_SUBST(inputdir) + +# Checks for libraries. +AC_CHECK_LIB([m], [sin]) +AC_CHECK_LIB([mtdev], [mtdev_open]) + +# Checks for header files. +AC_CHECK_HEADERS([fcntl.h stdint.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_C_INLINE + +# Checks for library functions. +AC_CHECK_FUNCS([memset]) + +DRIVER_NAME=mtrack +AC_SUBST([DRIVER_NAME]) + +AC_ARG_ENABLE(debug, "Debug gesture") +AC_ARG_ENABLE(debug, + AS_HELP_STRING([--enable-debug], + [Enable debugging (default: disabled)]), + [AC_DEFINE(DEBUG_GESTURE, 1, Enable gesture degbug)]) + +AC_CONFIG_FILES([Makefile src/Makefile]) +AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..7484917 --- /dev/null +++ src/Makefile.am @@ -0,0 +1,16 @@ +AM_CFLAGS = $(XORG_CFLAGS) $(CWARNFLAGS) +AM_CPPFLAGS=-I$(top_srcdir)/include/ + +@DRIVER_NAME@_drv_la_LTLIBRARIES = @DRIVER_NAME@_drv.la +@DRIVER_NAME@_drv_la_LDFLAGS = -module -avoid-version +@DRIVER_NAME@_drv_ladir = @inputdir@ + +@DRIVER_NAME@_drv_la_SOURCES = \ + $(top_srcdir)/src/capabilities.c \ + $(top_srcdir)/src/gestures.c \ + $(top_srcdir)/src/hwstate.c \ + $(top_srcdir)/src/mconfig.c \ + $(top_srcdir)/src/mtouch.c \ + $(top_srcdir)/src/mtstate.c \ + $(top_srcdir)/src/trig.c \ + $(top_srcdir)/driver/mtrack.c