X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=autogen.sh;h=d35e9459eca651dcff725a118793edc7c850d374;hp=f088a8f5d10bd195b711a7873a50454d642dd419;hb=9fa68615bb0315501625c6cde3f3077257c740e7;hpb=d4e7bda70c9ae96df91660e62b160e7ae959e43c diff --git a/autogen.sh b/autogen.sh index f088a8f5d..d35e9459e 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,38 +1,35 @@ #!/bin/sh -e -autoreconf -i +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" -args="--prefix=/usr --exec-prefix= --sysconfdir=/etc --with-selinux" -libdir=$(basename $(cd /lib/$(gcc -print-multi-os-directory); pwd)) +-Wstrict-prototypes -Wshadow \ +-Wformat=2 -Wtype-limits" -case "$1" in - *install|"") - args="$args --with-libdir-name=$libdir" - export CFLAGS="$CFLAGS -O2" - echo " configure: $args" - echo - ./configure $args - ;; - *devel) - args="$args --enable-debug --with-libdir-name=$libdir" - export CFLAGS="$CFLAGS -O0" - echo " configure: $args" - echo - ./configure $args - ;; - *clean) - ./configure - make maintainer-clean - git clean -f -X - exit 0 +case "$CFLAGS" in + *-O[0-9]*) ;; *) - echo "Usage: $0 [--install|--devel|--clean]" - exit 1 + MYCFLAGS="$MYCFLAGS -O2" ;; esac + +libdir() { + echo $(cd $1/$(gcc -print-multi-os-directory); pwd) +} + +args="--prefix=/usr \ +--sysconfdir=/etc \ +--sbindir=/sbin \ +--libdir=$(libdir /usr/lib) \ +--with-rootlibdir=$(libdir /lib) \ +--libexecdir=/lib/udev \ +--with-selinux \ +--enable-gtk-doc" + +export CFLAGS="$CFLAGS $MYCFLAGS" +./configure $args $@