X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=autogen.sh;h=5c5903e0eb2c3e50f0163215f3829edd1119fc41;hp=63c1997736e2715924c4b01b814ebe9615b2c65a;hb=bb0059f36e14cca41bdc242b13f39d57e8b7884d;hpb=514b8d62123e3d63f2b935aa1d58e5c411f3f603 diff --git a/autogen.sh b/autogen.sh index 63c199773..5c5903e0e 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 $@