autogen.sh: make "CFLAGS=-O0 ./autogen.sh" working

This commit is contained in:
Kay Sievers
2009-06-16 21:29:13 +02:00
parent 514b8d6212
commit bb0059f36e
2 changed files with 10 additions and 3 deletions
-1
View File
@@ -1,4 +1,3 @@
o CFLAGS debug
o cleanup old extras which link libudev source directly
o fix configure options and libdir-name, exec-prefix, udev-prefix, libdir, ...
+10 -2
View File
@@ -3,17 +3,25 @@
gtkdocize
autoreconf --install --symlink
CFLAGS="-g -Wall \
MYCFLAGS="-g -Wall \
-Wmissing-declarations -Wmissing-prototypes \
-Wnested-externs -Wpointer-arith \
-Wpointer-arith -Wsign-compare -Wchar-subscripts \
-Wstrict-prototypes -Wshadow \
-Wformat=2 -Wtype-limits"
case "$CFLAGS" in
*-O[0-9]*)
;;
*)
MYCFLAGS="$MYCFLAGS -O2"
;;
esac
libdirname=$(basename $(cd /lib/$(gcc -print-multi-os-directory); pwd))
args="--prefix=/usr --exec-prefix= --sysconfdir=/etc \
--libdir=/usr/$libdirname --with-libdir-name=$libdirname \
--with-selinux --enable-gtk-doc"
export CFLAGS="$CFLAGS -O2"
export CFLAGS="$CFLAGS $MYCFLAGS"
./configure $args $@