]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
autogen: allow to override commands used
authorVincent Bernat <bernat@luffy.cx>
Thu, 10 Jan 2013 22:44:51 +0000 (23:44 +0100)
committerVincent Bernat <bernat@luffy.cx>
Thu, 10 Jan 2013 22:44:51 +0000 (23:44 +0100)
For example:

    LIBTOOLIZE=glibtoolize ./autogen.sh

autogen.sh

index e0f633e43b01fc165c8d404666c564323be18201..2a2326fe52aec340869b9c92a394fecbcc883843 100755 (executable)
@@ -8,21 +8,28 @@ set -e
     git submodule update
 }
 
+LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}
+AUTORECONF=${AUTORECONF:-autoreconf}
+ACLOCAL=${ACLOCAL:-aclocal}
+AUTOCONF=${AUTOCONF:-autoconf}
+AUTOHEADER=${AUTOHEADER:-autoheader}
+AUTOMAKE=${AUTOMAKE:-automake}
+
 echo "autogen.sh: start libtoolize to get ltmain.sh"
-libtoolize --copy --force
+${LIBTOOLIZE} --copy --force
 echo "autogen.sh: reconfigure with autoreconf"
-autoreconf -vif -I m4 || {
+${AUTORECONF} -vif -I m4 || {
     echo "autogen.sh: autoreconf has failed ($?), let's do it manually"
     for dir in . *; do
         [ -d "$dir" ] || continue
         [ -f "$dir"/configure.ac ] || [ -f "$dir"/configure.in ] || continue
        echo "autogen.sh: configure `basename \`readlink -f $dir\``"
-       (cd "$dir" && aclocal -I m4)
-       (cd "$dir" && libtoolize --automake --copy --force)
-       (cd "$dir" && aclocal -I m4)
-       (cd "$dir" && autoconf --force)
-       (cd "$dir" && autoheader)
-       (cd "$dir" && automake --add-missing --copy --force-missing)
+       (cd "$dir" && ${ACLOCAL} -I m4)
+       (cd "$dir" && ${LIBTOOLIZE} --automake --copy --force)
+       (cd "$dir" && ${ACLOCAL} -I m4)
+       (cd "$dir" && ${AUTOCONF} --force)
+       (cd "$dir" && ${AUTOHEADER})
+       (cd "$dir" && ${AUTOMAKE} --add-missing --copy --force-missing)
     done
 }