autogen.sh: Honor NOCONFIGURE=1
[platform/upstream/folks.git] / autogen.sh
1 #!/bin/sh
2 set -e
3
4 if test -n "$AUTOMAKE"; then
5     : # don't override an explicit user request
6 elif automake-1.11 --version >/dev/null 2>/dev/null && \
7      aclocal-1.11 --version >/dev/null 2>/dev/null; then
8     # If we have automake-1.11, use it. This is the oldest version (=> least
9     # likely to introduce undeclared dependencies) that will give us
10     # --enable-silent-rules support.
11     AUTOMAKE=automake-1.11
12     export AUTOMAKE
13     ACLOCAL=aclocal-1.11
14     export ACLOCAL
15 fi
16
17 autoreconf -i -f
18 intltoolize --force --copy --automake
19
20 if test -z "$NOCONFIGURE"; then
21     run_configure=true
22     for arg in $*; do
23         case $arg in
24             --no-configure)
25                 run_configure=false
26                 ;;
27             *)
28                 ;;
29         esac
30     done
31 else
32     run_configure=false
33 fi
34
35 if test $run_configure = true; then
36     ./configure "$@"
37 fi