]>
Commit | Line | Data |
---|---|---|
3e549e52 | 1 | #!/bin/sh |
3e549e52 | 2 | |
0ac0576e | 3 | set -e |
3e549e52 | 4 | |
0ac0576e VB |
5 | [ ! -d .gitmodules ] || { |
6 | echo "autogen.sh: updating git submodules" | |
7 | git submodule init | |
8 | git submodule update | |
3e549e52 VB |
9 | } |
10 | ||
bb1666fe VB |
11 | LIBTOOLIZE=${LIBTOOLIZE:-libtoolize} |
12 | AUTORECONF=${AUTORECONF:-autoreconf} | |
13 | ACLOCAL=${ACLOCAL:-aclocal} | |
14 | AUTOCONF=${AUTOCONF:-autoconf} | |
15 | AUTOHEADER=${AUTOHEADER:-autoheader} | |
16 | AUTOMAKE=${AUTOMAKE:-automake} | |
17 | ||
0ac0576e | 18 | echo "autogen.sh: start libtoolize to get ltmain.sh" |
bb1666fe | 19 | ${LIBTOOLIZE} --copy --force |
0ac0576e | 20 | echo "autogen.sh: reconfigure with autoreconf" |
bb1666fe | 21 | ${AUTORECONF} -vif -I m4 || { |
0ac0576e | 22 | echo "autogen.sh: autoreconf has failed ($?), let's do it manually" |
d902e688 VB |
23 | for dir in . *; do |
24 | [ -d "$dir" ] || continue | |
25 | [ -f "$dir"/configure.ac ] || [ -f "$dir"/configure.in ] || continue | |
0ac0576e | 26 | echo "autogen.sh: configure `basename \`readlink -f $dir\``" |
bb1666fe VB |
27 | (cd "$dir" && ${ACLOCAL} -I m4) |
28 | (cd "$dir" && ${LIBTOOLIZE} --automake --copy --force) | |
29 | (cd "$dir" && ${ACLOCAL} -I m4) | |
30 | (cd "$dir" && ${AUTOCONF} --force) | |
31 | (cd "$dir" && ${AUTOHEADER}) | |
32 | (cd "$dir" && ${AUTOMAKE} --add-missing --copy --force-missing) | |
3e549e52 | 33 | done |
3e549e52 VB |
34 | } |
35 | ||
0ac0576e | 36 | echo "autogen.sh: for the next step, run ./configure" |
3e549e52 | 37 | |
0ac0576e | 38 | exit 0 |