chiark / gitweb /
d1477aa7a1fa5352bcb23b6b1fa36c9b59f96f1e
[elogind.git] / autogen.sh
1 #!/bin/sh -e
2
3 gtkdocize
4 autoreconf --install --symlink
5
6 CFLAGS="-g -Wall \
7 -Wmissing-declarations -Wmissing-prototypes \
8 -Wnested-externs -Wpointer-arith \
9 -Wpointer-arith -Wsign-compare -Wchar-subscripts \
10 -Wstrict-prototypes -Wshadow \
11 -Wformat=2 -Wtype-limits"
12 args="--prefix=/usr --exec-prefix= --sysconfdir=/etc --with-selinux --enable-gtk-doc"
13 libdir=$(basename $(cd /lib/$(gcc -print-multi-os-directory); pwd))
14
15 case "$1" in
16         *install|"")
17                 args="$args --with-libdir-name=$libdir"
18                 export CFLAGS="$CFLAGS -O2"
19                 echo "   configure:  $args"
20                 echo
21                 ./configure $args
22                 ;;
23         *devel)
24                 args="$args --enable-debug --with-libdir-name=$libdir"
25                 export CFLAGS="$CFLAGS -O0"
26                 echo "   configure:  $args"
27                 echo
28                 ./configure $args
29                 ;;
30         *clean)
31                 ./configure
32                 make maintainer-clean
33                 git clean -f -X
34                 exit 0
35                 ;;
36         *)
37                 echo "Usage: $0 [--install|--devel|--clean]"
38                 exit 1
39                 ;;
40 esac