On Mon, Mar 22, 2010 at 07:40:59PM -0400, Gaetan Nadon wrote:
> Signed-off-by: Gaetan Nadon <[email protected]>
> ---
> configure.ac | 79 ++++++++++++++++++++++++++++++++-------------------------
> 1 files changed, 44 insertions(+), 35 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index a3c8c04..e342c90 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -20,41 +20,59 @@
> #
> # Process this file with autoconf to produce a configure script
>
> -AC_PREREQ(2.57)
> +# Initialize Autoconf
> +AC_PREREQ([2.60])
> AC_INIT([xf86-input-wacom],
> - 0.10.5,
> + [0.10.5],
> [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
> - xf86-input-wacom)
> -
> + [xf86-input-wacom])
> AC_CONFIG_MACRO_DIR([m4])
> AC_CONFIG_SRCDIR([Makefile.am])
> -AC_CONFIG_AUX_DIR(.)
> AC_CONFIG_HEADERS([config.h])
>
> +# Initialize Automake
> AM_INIT_AUTOMAKE([foreign dist-bzip2])
> AM_MAINTAINER_MODE
>
> +# Initialize libtool
> +AC_PROG_LIBTOOL
> +AC_DISABLE_STATIC
> +
> +# Initialize Autoheader template
> +AH_TOP([
> +#ifndef WACOM_TOOLS
> +#include "xorg-server.h"
> +#endif])
> +
> +# Checks for programs.
> +AC_PROG_CC
> +AC_PROG_INSTALL
> +
> # 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
>
> -# Checks for programs.
> -AC_DISABLE_STATIC
> -AC_PROG_LIBTOOL
> -AC_PROG_CC
> +# Checks for pkg-config packages.
> +PKG_CHECK_MODULES(XORG, xorg-server xproto)
> +PKG_CHECK_MODULES(X11, x11 xi)
>
> -AH_TOP([
> -#ifndef WACOM_TOOLS
> -#include "xorg-server.h"
> -#endif])
> +# Define a configure option for code debugging
> +AC_ARG_ENABLE(debug,
> + AS_HELP_STRING([--enable-debug],
> + [Enable debugging (default: disabled)]),
> + [DEBUGGING=$enableval], [DEBUGGING=no])
>
> -AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug],
> - [Enable debugging (default: disabled)]),
> - [DEBUGGING=$enableval], [DEBUGGING=no])
> +# Define the C preprocessor macro DEBUG in config.h
> +if test "x$DEBUGGING" = xyes; then
> + AC_DEFINE(DEBUG, 1, [Enable debugging code])
> +fi
>
> +# Define an Automake conditional DEBUG
> +AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes])
given that this was removed in a later patch would it make sense to remove
it before this patch to make the diff smaller?
The same goes for the xorg-server.h commit. Please reshuffle the commits
that anything that is removed goes first.
> +# Define a configure option for an alternate input module directory
> AC_ARG_WITH(xorg-module-dir,
> AS_HELP_STRING([--with-xorg-module-dir=DIR],
> [Default xorg module directory
> [[default=$libdir/xorg/modules]]]),
> @@ -63,19 +81,11 @@ AC_ARG_WITH(xorg-module-dir,
> inputdir=${moduledir}/input
> AC_SUBST(inputdir)
>
> -if test "x$DEBUGGING" = xyes; then
> - AC_DEFINE(DEBUG, 1, [Enable debugging code])
> -fi
> -AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes])
> -
> # Checks for extensions
> XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
>
> -# Checks for pkg-config packages.
> -PKG_CHECK_MODULES(XORG, xorg-server xproto)
> -PKG_CHECK_MODULES(X11, x11 xi)
> -
> # X Server SDK location is required to install wacom header files
> +# This location is also relayed in the xorg-wacom.pc file
> sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
>
> # Workaround overriding sdkdir to be able to create a tarball when user has
> no
> @@ -83,16 +93,15 @@ sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server`
> AC_ARG_WITH([sdkdir], [], [sdkdir="$withval"])
> AC_SUBST([sdkdir])
>
> -# Checks for header files.
> -AC_HEADER_STDC
> -
> DRIVER_NAME=wacom
> AC_SUBST([DRIVER_NAME])
>
> -AC_OUTPUT([Makefile
> - fdi/Makefile
> - src/Makefile
> - man/Makefile
> - include/Makefile
> - tools/Makefile
> - xorg-wacom.pc])
> +AC_CONFIG_FILES([Makefile
> + fdi/Makefile
> + src/Makefile
> + man/Makefile
> + include/Makefile
> + tools/Makefile
> + xorg-wacom.pc])
> +AC_OUTPUT
> +
why is this preferable over a direct AC_OUTPUT?
Other than these few comments the series looks good. Can you send me a pull
request for the reworked lot? it would make it easier to apply.
Cheers,
Peter
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel