aboutsummaryrefslogtreecommitdiff
path: root/autogen.sh
blob: cba209c8a1edcac85b537e6e6f4359a68edb3adc (plain)
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
#!/bin/sh -e

cd $(dirname $0)
autoreconf -i -f -v

# Autoreconf overwrites INSTALL, but we have our own version of it.
cp INSTALL.real INSTALL

# Libtool 2.2 still reorders LDFLAGS badly, and they won't fix it before libtool 2.3 or 2.4
# but we can leave without this
if cat ltmain.sh.as-needed.patch | patch -t -p0 --dry-run
then
	cat ltmain.sh.as-needed.patch | patch -t -p0
fi

run_configure=true
for arg in $*; do
    case $arg in
        --no-configure)
            run_configure=false
            ;;
        *)
            ;;
    esac
done

if test $run_configure = true; then
    ./configure "$@"
fi