]> git.ipfire.org Git - thirdparty/lldpd.git/blame - autogen.sh
autogen: allow to override commands used
[thirdparty/lldpd.git] / autogen.sh
CommitLineData
3e549e52 1#!/bin/sh
3e549e52 2
0ac0576e 3set -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
11LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}
12AUTORECONF=${AUTORECONF:-autoreconf}
13ACLOCAL=${ACLOCAL:-aclocal}
14AUTOCONF=${AUTOCONF:-autoconf}
15AUTOHEADER=${AUTOHEADER:-autoheader}
16AUTOMAKE=${AUTOMAKE:-automake}
17
0ac0576e 18echo "autogen.sh: start libtoolize to get ltmain.sh"
bb1666fe 19${LIBTOOLIZE} --copy --force
0ac0576e 20echo "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 36echo "autogen.sh: for the next step, run ./configure"
3e549e52 37
0ac0576e 38exit 0