]>
Commit | Line | Data |
---|---|---|
c7aa54aa | 1 | #!/usr/bin/env bash |
6b66678a | 2 | set -e |
a8732b13 | 3 | shopt -s expand_aliases extglob |
35fa52c0 | 4 | unalias -a |
51ac63c5 | 5 | libdirs=() |
35fa52c0 DWT |
6 | case `uname` in |
7 | (Linux) | |
8 | libdirs=('/usr/share/gettext') | |
9 | ;; | |
10 | (FreeBSD) | |
11 | alias sed=gsed | |
51ac63c5 DWT |
12 | ;; |
13 | (Darwin) | |
14 | alias sed=gsed libtoolize=glibtoolize | |
35fa52c0 DWT |
15 | ;; |
16 | esac | |
c7aa54aa | 17 | aclocal |
35fa52c0 | 18 | sed -e 's/AC_PROG_AWK/dnl &/' -i aclocal.m4 |
a8732b13 | 19 | cat `aclocal --print-ac-dir`/check_gnu_make.m4 !(aclocal).m4 >> aclocal.m4 |
35fa52c0 DWT |
20 | function filter() |
21 | { | |
22 | sed -e '/no proper invocation of AM_INIT_AUTOMAKE was found\./d' \ | |
23 | -e '/You should verify that configure\.ac invokes AM_INIT_AUTOMAKE,/d' \ | |
24 | -e '/that aclocal\.m4 is present in the top-level directory,/d' \ | |
9c60689e DWT |
25 | -e '/and that aclocal\.m4 was recently regenerated (using aclocal)\./d' \ |
26 | -e "/no \`Makefile\.am' found for any configure output/d" \ | |
27 | -e "/Consider adding \`AC_CONFIG_MACRO_DIR(\[m4\])' to configure\.ac and/d" \ | |
51ac63c5 | 28 | -e '/rerunning g\?libtoolize, to keep the correct libtool macros in-tree\./d' \ |
9c60689e | 29 | -e "/Consider adding \`-I m4' to ACLOCAL_AMFLAGS in Makefile\.am\./d" |
35fa52c0 DWT |
30 | } |
31 | automake -acf 2>&1 | filter | |
32 | for libdir in ${libdirs[*]}; do | |
33 | automake -acf --libdir $libdir 2>&1 | filter | |
34 | done | |
9c60689e DWT |
35 | libtoolize -ci | filter |
36 | autoconf |