aboutsummaryrefslogtreecommitdiffstats
path: root/autogen.sh
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2009-06-16 21:29:13 +0200
committerKay Sievers <kay.sievers@vrfy.org>2009-06-16 21:29:13 +0200
commitbb0059f36e14cca41bdc242b13f39d57e8b7884d (patch)
tree455942f61866995fe203ad6503e8471aa4e16421 /autogen.sh
parent514b8d62123e3d63f2b935aa1d58e5c411f3f603 (diff)
downloadudev-bb0059f36e14cca41bdc242b13f39d57e8b7884d.tar.gz
autogen.sh: make "CFLAGS=-O0 ./autogen.sh" working
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/autogen.sh b/autogen.sh
index 63c19977..5c5903e0 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -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 $@