aboutsummaryrefslogtreecommitdiff
path: root/autogen.sh
blob: 6ba92d8d78a98b6b9818ef4b955039a214676b64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh -e

autoreconf --install --symlink

MYCFLAGS="-g -O2 -Werror"

libdir() {
	echo $(cd $1/$(gcc -print-multi-os-directory); pwd)
}

args="--prefix=/usr \
--sysconfdir=/etc \
--libdir=$(libdir /usr/lib) \
--enable-debug"

if [ -z "$NOCONFIGURE" ]; then
	exec ./configure $args CFLAGS="${MYCFLAGS} ${CFLAGS}" "$@"
fi