autogen.sh 1.05 KB
Newer Older
1
#!/bin/bash
2

3 4 5 6 7 8
AUTORECONF=`which autoreconf`
if test -z $AUTORECONF; then
        echo "*** No autoreconf found, please install it ***"
        exit 1
fi

9 10 11 12
if !"${PKG_CONFIG:-pkg-config}" --version >/dev/null 2>&1; then
    echo "*** No pkg-config found, please install it ***"
    # warn without exiting, since pkg-config is only needed
    # by configure, not autogen.sh
13 14
fi

15
LIBTOOLIZE=`which libtoolize || which glibtoolize`
16
if test -z $LIBTOOLIZE; then
17 18
    LIBTOOLIZE=`which glibtoolize`
    if test -z $LIBTOOLIZE; then
19 20
        echo "*** No libtool found, please install it ***"
        exit 1
21
    fi
22 23
fi

24
# Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=565663
25 26
mkdir -p m4

27
HOOKS_DIR=".git/hooks"
28
# install pre-commit hook for doing clean commits
29
if [ -d "$HOOKS_DIR" ];
30
then
31 32
    pushd ${HOOKS_DIR}
    if test ! \( -x pre-commit -a -L pre-commit \);
33
    then
34 35 36
        echo "Creating symbolic link for pre-commit hook..."
        rm -f pre-commit
        ln -s pre-commit.sample pre-commit
37
    fi
38
    popd
39
fi
40

41
autoreconf --force --install --verbose -Wall -I m4