From 5ba3665f42413456b08fc8824016581a247ccc09 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Javier=20Jard=C3=B3n?= <jjardon@gnome.org>
Date: Wed, 9 Feb 2011 00:36:37 +0000
Subject: [PATCH] Update autotools configuration

Use new libtool syntax and silent-rules to silent
the build output a bit (linux-like)
---
 Makefile.am   |    1 +
 autogen.sh    |   14 ++++----------
 configure.ac  |   18 ++++++++++++------
 m4/.gitignore |    5 +++++
 4 files changed, 22 insertions(+), 16 deletions(-)
 create mode 100644 m4/.gitignore

diff --git a/Makefile.am b/Makefile.am
index f4239de..83948ab 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,6 +18,7 @@
 #  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 #  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
+ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 
 SUBDIRS = uxa src man
 MAINTAINERCLEANFILES = ChangeLog INSTALL
diff --git a/autogen.sh b/autogen.sh
index 904cd67..30d679f 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,12 +1,6 @@
 #! /bin/sh
 
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-
-ORIGDIR=`pwd`
-cd $srcdir
-
-autoreconf -v --install || exit 1
-cd $ORIGDIR || exit $?
-
-$srcdir/configure --enable-maintainer-mode "$@"
+test -n "$srcdir" || srcdir=`dirname "$0"`
+test -n "$srcdir" || srcdir=.
+autoreconf --force --install --verbose "$srcdir"
+test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
diff --git a/configure.ac b/configure.ac
index 13a801a..5a1baac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,18 +21,24 @@
 # Process this file with autoconf to produce a configure script
 
 # Initialize Autoconf
-AC_PREREQ([2.60])
+AC_PREREQ([2.63])
 AC_INIT([xf86-video-intel],
         [2.14.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         [xf86-video-intel])
 AC_CONFIG_SRCDIR([Makefile.am])
 AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_AUX_DIR(.)
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIR([m4])
 
 # Initialize Automake
-AM_INIT_AUTOMAKE([foreign dist-bzip2])
-AM_MAINTAINER_MODE
+AM_INIT_AUTOMAKE([1.10 foreign dist-bzip2])
+AM_MAINTAINER_MODE([enable])
+
+# Support silent build rules, requires at least automake-1.11. Disable
+# by either passing --disable-silent-rules to configure or passing V=1
+# to make
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
 # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
 m4_ifndef([XORG_MACROS_VERSION],
@@ -50,8 +56,8 @@ m4_ifndef([XORG_DRIVER_CHECK_EXT],
   depending on your distribution, try package 'xserver-xorg-dev' or 'xorg-x11-server-devel'])])
 
 # Initialize libtool
-AC_DISABLE_STATIC
-AC_PROG_LIBTOOL
+LT_PREREQ([2.2])
+LT_INIT([disable-static])
 
 PKG_CHECK_MODULES(GEN4ASM, [intel-gen4asm >= 1.1], [gen4asm=yes], [gen4asm=no])
 AM_CONDITIONAL(HAVE_GEN4ASM, test x$gen4asm = xyes)
diff --git a/m4/.gitignore b/m4/.gitignore
new file mode 100644
index 0000000..464ba5c
--- /dev/null
+++ b/m4/.gitignore
@@ -0,0 +1,5 @@
+libtool.m4
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
-- 
1.7.4

