From: Kay Sievers Date: Tue, 16 Jun 2009 19:29:13 +0000 (+0200) Subject: autogen.sh: make "CFLAGS=-O0 ./autogen.sh" working X-Git-Tag: 174~955 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb0059f36e14cca41bdc242b13f39d57e8b7884d;p=systemd autogen.sh: make "CFLAGS=-O0 ./autogen.sh" working --- diff --git a/TODO b/TODO index d1ae2d7a..e3631837 100644 --- a/TODO +++ b/TODO @@ -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, ... 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 $@