From 83918aebe5547370b6d377aa2d17f378c44054b7 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Sat, 30 Mar 2013 03:33:09 +0100
Subject: [PATCH] build: do not call boilerplate ourself

Rationale see section 3.5 "Using `autoreconf' to Update `configure'
Scripts" of the autoconf manual.

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
---
 Makefile.am       | 3 +++
 autogen.sh        | 7 ++-----
 config/.gitignore | 2 ++
 configure.ac      | 1 +
 4 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index cea9db97b1..23dc2572ab 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,6 @@
+
+ACLOCAL_AMFLAGS = -I config
+
 include $(top_srcdir)/config/rpm.am
 include $(top_srcdir)/config/deb.am
 include $(top_srcdir)/config/tgz.am
diff --git a/autogen.sh b/autogen.sh
index 343265c830..427394af47 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,7 +1,4 @@
 #!/bin/sh
 
-aclocal -I config
-libtoolize --automake --copy
-autoheader
-automake --add-missing --include-deps --copy
-autoconf
+autoreconf -fiv
+rm -Rf autom4te.cache
diff --git a/config/.gitignore b/config/.gitignore
index dcd88d7c6a..12e6ecab10 100644
--- a/config/.gitignore
+++ b/config/.gitignore
@@ -4,3 +4,5 @@
 /install-sh
 /ltmain.sh
 /missing
+/libtool.m4
+/lt*.m4
diff --git a/configure.ac b/configure.ac
index f9cd542979..76184b4310 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,6 +28,7 @@ AC_INIT
 AC_LANG(C)
 SPL_AC_META
 AC_CONFIG_AUX_DIR([config])
+AC_CONFIG_MACRO_DIR([config])
 AC_CANONICAL_SYSTEM
 AM_MAINTAINER_MODE
 AM_SILENT_RULES