diff options
author | Matthieu Herrb <matthieu@openbsd.org> | 2009-11-22 19:39:03 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@openbsd.org> | 2009-11-22 19:39:03 +0000 |
commit | fc0e846e466a19780993b4d2a0ff14aaec986411 (patch) | |
tree | 45038cad795e481bb506725fd24909324ad991a7 | |
parent | b857a3af63203448c6bdb666efdffad6c7974487 (diff) |
Update to idioms used in modern X.Org input drivers.
-rw-r--r-- | configure.ac | 32 | ||||
-rw-r--r-- | src/Makefile.am | 1 |
2 files changed, 15 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac index ca769b6..4938e1e 100644 --- a/configure.ac +++ b/configure.ac @@ -28,13 +28,20 @@ AC_INIT([xf86-input-ws], AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_AUX_DIR(.) -AM_INIT_AUTOMAKE([dist-bzip2]) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE DRIVER_NAME=ws AC_SUBST([DRIVER_NAME]) +# Require xorg-macros: XORG_DEFAULT_OPTIONS +m4_ifndef([XORG_MACROS_VERSION], + [m4_fatal([must install xorg-macros 1.3 or later before running autoco +nf/autogen])]) +XORG_MACROS_VERSION(1.3) +XORG_DEFAULT_OPTIONS + AM_CONFIG_HEADER([config.h]) # Checks for programs. @@ -44,7 +51,6 @@ AC_PROG_CC AH_TOP([#include "xorg-server.h"]) -#AC_DEFINE(XFree86LOADER,1,[Stub define for loadable drivers]) # AC_ARG_ENABLE(XINPUT, AS_HELP_STRING([--enable-xinput], [Build XInput support (default: yes)]), @@ -53,14 +59,6 @@ AM_CONDITIONAL(XINPUT, test "x$XINPUT" = "xyes") if test "x$XINPUT" = "xyes" ; then AC_DEFINE(XINPUT,1,[Enable XInput support]) fi -# -#AC_ARG_ENABLE(XKB, AS_HELP_STRING([--enable-xkb], -# [Build XKB support (default: yes)]), -# [XKB=$enableval],[XKB=yes]) -#AM_CONDITIONAL(XKB, test "x$XKB" = "xyes") -#if test "x$XKB" = "xyes" ; then -# AC_DEFINE(XKB,1,[Enable XKB support]) -#fi AC_ARG_WITH(xorg-module-dir, AC_HELP_STRING([--with-xorg-module-dir=DIR], @@ -75,18 +73,16 @@ AC_SUBST(inputdir) XORG_DRIVER_CHECK_EXT(XINPUT, inputproto) # Checks for pkg-config packages -PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto $REQUIRED_MODULES) -sdkdir=$(pkg-config --variable=sdkdir xorg-server) - -CFLAGS="$CFLAGS $XORG_CFLAGS "' -I$(top_srcdir)/src' -AC_SUBST([CFLAGS]) +PKG_CHECK_MODULES(XORG, xorg-server xproto $REQUIRED_MODULES) +XORG_CFLAGS="$CWARNFLAGS $XORG_CFLAGS" +AC_ARG_WITH([sdkdir], [], + [sdkdir="$withval"], + [sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`]) +AC_SUBST([sdkdir]) # Checks for libraries. # Checks for header files. AC_HEADER_STDC -XORG_MANPAGE_SECTIONS -XORG_RELEASE_VERSION - AC_OUTPUT([Makefile src/Makefile man/Makefile]) diff --git a/src/Makefile.am b/src/Makefile.am index 8da7a06..50ece5d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -13,6 +13,7 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # +AM_CFLAGS = $(XORG_CFLAGS) @DRIVER_NAME@_drv_la_LTLIBRARIES= @DRIVER_NAME@_drv.la @DRIVER_NAME@_drv_la_LDFLAGS= -module -avoid-version |