]>
Commit | Line | Data |
---|---|---|
1 | #!/usr/bin/env bash | |
2 | set -e | |
3 | shopt -s expand_aliases extglob | |
4 | unalias -a | |
5 | libdirs=() | |
6 | case `uname` in | |
7 | (Linux) | |
8 | libdirs=('/usr/share/gettext') | |
9 | ;; | |
10 | (FreeBSD) | |
11 | alias sed=gsed | |
12 | ;; | |
13 | (Darwin) | |
14 | alias sed=gsed libtoolize=glibtoolize | |
15 | ;; | |
16 | esac | |
17 | aclocal | |
18 | sed -e 's/AC_PROG_AWK/dnl &/' -i aclocal.m4 | |
19 | cat `aclocal --print-ac-dir`/ax_check_gnu_make.m4 !(aclocal).m4 >> aclocal.m4 | |
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' \ | |
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" \ | |
28 | -e '/rerunning g\?libtoolize, to keep the correct libtool macros in-tree\./d' \ | |
29 | -e "/Consider adding \`-I m4' to ACLOCAL_AMFLAGS in Makefile\.am\./d" | |
30 | } | |
31 | automake -acf 2>&1 | filter | |
32 | for libdir in ${libdirs[*]}; do | |
33 | automake -acf --libdir $libdir 2>&1 | filter | |
34 | done | |
35 | libtoolize -ci | filter | |
36 | autoconf |