From 476a7acb98b23a92d265f1732f19fea0d948c892 Mon Sep 17 00:00:00 2001
From: Andreas Mohr <and@gmx.li>
Date: Mon, 25 Apr 2016 18:46:03 +0000
Subject: [PATCH] Simplify autogen.sh by using autoreconf
Simplify autogen.sh by using autoreconf.
Signed-off-by: Andreas Mohr <and@gmx.li>
---
autogen.sh | 53 +++--------------------------------------------------
1 file changed, 3 insertions(+), 50 deletions(-)
diff --git a/autogen.sh b/autogen.sh
index 071533c..7d78764 100755
a
|
b
|
|
4 | 4 | # Don't ignore errors. |
5 | 5 | set -e |
6 | 6 | |
7 | | # Make it possible to specify path in the environment |
8 | | : ${AUTOCONF=autoconf} |
9 | | : ${AUTOHEADER=autoheader} |
10 | | : ${AUTOMAKE=automake} |
11 | | : ${ACLOCAL=aclocal} |
12 | | : ${AUTOPOINT=autopoint} |
13 | | : ${LIBTOOLIZE=libtoolize} |
14 | | : ${XGETTEXT=xgettext} |
15 | | |
16 | | srcdir=`dirname $0` |
17 | | test -z "$srcdir" && srcdir=. |
18 | | |
19 | | |
20 | | ( |
21 | | # Some shells don't propagate "set -e" to subshells. |
22 | | set -e |
23 | | |
24 | | $AUTOPOINT --version >/dev/null 2>&1 |
25 | | if test $? -ne 0; then |
26 | | AUTOPOINT=maint/utils/autopoint |
27 | | fi |
| 7 | srcdir="$(cd "$(dirname "$0")" && pwd)" |
28 | 8 | |
29 | 9 | cd "$srcdir" |
30 | 10 | |
31 | | # The autoconf cache (version after 2.52) is not reliable yet. |
32 | | rm -rf autom4te.cache src/vfs/smbfs/helpers/autom4te.cache |
33 | | |
34 | | if test ! -d config; then |
35 | | mkdir config |
36 | | fi |
37 | | |
38 | | # Recreate intl directory. |
39 | | rm -rf intl |
40 | | $AUTOPOINT --force || exit 1 |
| 11 | ${AUTORECONF:-autoreconf} --verbose --install --force -I m4 $AUTORECONFOPT |
41 | 12 | |
42 | 13 | # Generate po/POTFILES.in |
43 | | $XGETTEXT --keyword=_ --keyword=N_ --keyword=Q_ --output=- \ |
| 14 | ${XGETTEXT:-xgettext} --keyword=_ --keyword=N_ --keyword=Q_ --output=- \ |
44 | 15 | `find . -name '*.[ch]'` | sed -ne '/^#:/{s/#://;s/:[0-9]*/\ |
45 | 16 | /g;s/ //g;p;}' | \ |
46 | 17 | grep -v '^$' | sort | uniq >po/POTFILES.in |
47 | 18 | |
48 | | $LIBTOOLIZE |
49 | | |
50 | | ACLOCAL_INCLUDES="-I m4" |
51 | | |
52 | | # Some old version of GNU build tools fail to set error codes. |
53 | | # Check that they generate some of the files they should. |
54 | | |
55 | | $ACLOCAL $ACLOCAL_INCLUDES $ACLOCAL_FLAGS |
56 | 19 | test -f aclocal.m4 || \ |
57 | 20 | { echo "aclocal failed to generate aclocal.m4" >&2; exit 1; } |
58 | 21 | |
59 | | $AUTOHEADER || exit 1 |
60 | 22 | test -f config.h.in || \ |
61 | 23 | { echo "autoheader failed to generate config.h.in" >&2; exit 1; } |
62 | 24 | |
63 | | $AUTOCONF || exit 1 |
64 | 25 | test -f configure || \ |
65 | 26 | { echo "autoconf failed to generate configure" >&2; exit 1; } |
66 | 27 | |
67 | | # Workaround for Automake 1.5 to ensure that depcomp is distributed. |
68 | | if test "`$AUTOMAKE --version|awk '{print $NF;exit}'`" = '1.5' ; then |
69 | | $AUTOMAKE -a src/Makefile |
70 | | fi |
71 | | $AUTOMAKE -a |
72 | 28 | test -f Makefile.in || \ |
73 | 29 | { echo "automake failed to generate Makefile.in" >&2; exit 1; } |
74 | 30 | |
75 | 31 | cd src/vfs/smbfs/helpers |
76 | 32 | date -u >include/stamp-h.in |
77 | 33 | |
78 | | $AUTOHEADER |
79 | 34 | test -f include/config.h.in || \ |
80 | 35 | { echo "autoheader failed to generate src/vfs/smbfs/helpers/include/config.h.in" >&2; exit 1; } |
81 | 36 | |
82 | | $AUTOCONF |
83 | 37 | test -f configure || \ |
84 | 38 | { echo "autoconf failed to generate src/vfs/smbfs/helpers/configure" >&2; exit 1; } |
85 | | ) || exit 1 |
86 | 39 | |
87 | 40 | $srcdir/maint/utils/version.sh "$srcdir" |
88 | 41 | |