summaryrefslogtreecommitdiff
path: root/autogen.sh
blob: 9271455215244c024499896ef0e9dcaa38eae637 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

set -e

if [ "$1" = "clean" ]; then
  rm -f aclocal.m4 configure missing install-sh depcomp ltmain.sh \
        config.* `find . -name Makefile.in` compile libtool
  rm -rf autom4te.cache
  exit
fi

libtoolize --automake
aclocal ${ACLOCAL_FLAGS}
automake --add-missing --foreign
autoconf

CFLAGS=${CFLAGS=-ggdb -Werror}
LDFLAGS=${LDFLAGS=-Wl,-O1}
export CFLAGS LDFLAGS

./configure "$@"