summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2010-05-13 14:29:32 -0400
committerGaetan Nadon <memsize@videotron.ca>2010-05-16 16:27:42 -0400
commit9711c050e6d2a7c7c89ddc26775d819b5bc41ad3 (patch)
treecccfb494531fea05089a568dd40a7d5b4811618d
parent86ddfe77024dbd94e99695a23ba77c2100b7e3e8 (diff)
config: fix warnings, m4 quoting and layout
Fix some m4 quoting Fix some autoconf warnings Regroup statements per section Add comments Reviewed-by: RĂ©mi Cardona <remi@gentoo.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r--configure.ac49
1 files changed, 27 insertions, 22 deletions
diff --git a/configure.ac b/configure.ac
index c5b855e..8b6b577 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,45 +20,48 @@
#
# Process this file with autoconf to produce a configure script
-AC_PREREQ(2.60)
+# Initialize Autoconf
+AC_PREREQ([2.60])
AC_INIT([xf86-input-mouse],
- 1.5.0,
+ [1.5.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
- xf86-input-mouse)
+ [xf86-input-mouse])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR(.)
+# Initialize Automake
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AM_MAINTAINER_MODE
+
+# Initialize libtool
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
+
# Initialize X.Org macros
m4_ifndef([XORG_MACROS_VERSION],
[m4_fatal([must install xorg-macros 1.4 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.4)
XORG_DEFAULT_OPTIONS
-
-AM_INIT_AUTOMAKE([foreign dist-bzip2])
-
-AM_MAINTAINER_MODE
-
-DRIVER_NAME=mouse
-AC_SUBST([DRIVER_NAME])
+XORG_WITH_LINT
+XORG_CHECK_LINUXDOC
# Checks for programs.
-AC_DISABLE_STATIC
-AC_PROG_LIBTOOL
+AC_PROG_INSTALL
+AC_PROG_SED
+# Obtain compiler/linker options from server and required extensions
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.5.99.901] 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],
+ AS_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 pkg-config packages
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.5.99.901] xproto inputproto)
-
-# Checks for libraries.
-
# Work out which OS mouse driver we need to build
case $host_os in
linux*)
@@ -76,8 +79,10 @@ case $host_os in
esac
AC_SUBST([OS_MOUSE_NAME])
-dnl Allow checking code with lint, sparse, etc.
-XORG_WITH_LINT
-XORG_CHECK_LINUXDOC
+DRIVER_NAME=mouse
+AC_SUBST([DRIVER_NAME])
-AC_OUTPUT([Makefile src/Makefile man/Makefile])
+AC_CONFIG_FILES([Makefile
+ src/Makefile
+ man/Makefile])
+AC_OUTPUT