summaryrefslogtreecommitdiff
path: root/autogen.sh
blob: d1477aa7a1fa5352bcb23b6b1fa36c9b59f96f1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh -e

gtkdocize
autoreconf --install --symlink

CFLAGS="-g -Wall \
-Wmissing-declarations -Wmissing-prototypes \
-Wnested-externs -Wpointer-arith \
-Wpointer-arith -Wsign-compare -Wchar-subscripts \
-Wstrict-prototypes -Wshadow \
-Wformat=2 -Wtype-limits"
args="--prefix=/usr --exec-prefix= --sysconfdir=/etc --with-selinux --enable-gtk-doc"
libdir=$(basename $(cd /lib/$(gcc -print-multi-os-directory); pwd))

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
		;;
	*)
		echo "Usage: $0 [--install|--devel|--clean]"
		exit 1
		;;
esac