chiark / gitweb /
autogen.sh: make "CFLAGS=-O0 ./autogen.sh" working
[elogind.git] / autogen.sh
1 #!/bin/sh -e
2
3 gtkdocize
4 autoreconf --install --symlink
5
6 MYCFLAGS="-g -Wall \
7 -Wmissing-declarations -Wmissing-prototypes \
8 -Wnested-externs -Wpointer-arith \
9 -Wpointer-arith -Wsign-compare -Wchar-subscripts \
10 -Wstrict-prototypes -Wshadow \
11 -Wformat=2 -Wtype-limits"
12
13 case "$CFLAGS" in
14         *-O[0-9]*)
15                 ;;
16         *)
17                 MYCFLAGS="$MYCFLAGS -O2"
18                 ;;
19 esac
20
21 libdirname=$(basename $(cd /lib/$(gcc -print-multi-os-directory); pwd))
22 args="--prefix=/usr --exec-prefix= --sysconfdir=/etc \
23 --libdir=/usr/$libdirname --with-libdir-name=$libdirname \
24 --with-selinux --enable-gtk-doc"
25
26 export CFLAGS="$CFLAGS $MYCFLAGS"
27 ./configure $args $@