File: autogen.sh

package info (click to toggle)
atftp 0.7.dfsg-6
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,144 kB
  • ctags: 538
  • sloc: ansic: 6,384; sh: 3,892; makefile: 81
file content (38 lines) | stat: -rwxr-xr-x 888 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh

AUTOCONF_REQUIRED_VERSION=2.5
AUTOMAKE_REQUIRED_VERSION=1.7

# this function taken from gimp plugin template
check_version ()
{
    if expr $1 \>= $2 > /dev/null; then
        echo "yes (version $1)"
    else
        echo "no  (version $1)"
        exit 1
    fi
}

echo -n "checking for autoconf >= $AUTOCONF_REQUIRED_VERSION ... "
if autoconf --version >/dev/null; then
    VER=$(autoconf --version | grep -iw autoconf | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/")
    check_version $VER $AUTOCONF_REQUIRED_VERSION
else
    echo "not found"
    exit 1
fi

echo -n "checking for automake >= $AUTOMAKE_REQUIRED_VERSION ... "
if automake --version >/dev/null; then
    VER=$(automake --version | grep -iw automake | sed "s/.* \([0-9.]*\)[-a-z0-9]*$/\1/")
    check_version $VER $AUTOMAKE_REQUIRED_VERSION
else
    echo "not found"
    exit 1
fi

aclocal
autoheader
automake
autoconf