chiark / gitweb /
move src/extras subdirectories to src/
[elogind.git] / autogen.sh
1 #!/bin/sh -e
2
3 if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
4         cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
5         chmod +x .git/hooks/pre-commit && \
6         echo "Activated pre-commit hook."
7 fi
8
9 gtkdocize
10 autoreconf --install --symlink
11
12 libdir() {
13         echo $(cd $1/$(gcc -print-multi-os-directory); pwd)
14 }
15
16 args="$args \
17 --prefix=/usr \
18 --sysconfdir=/etc \
19 --libdir=$(libdir /usr/lib) \
20 --with-selinux \
21 --enable-gtk-doc"
22
23 if [ -L /bin ]; then
24 args="$args \
25 --libexecdir=/usr/lib \
26 --with-systemdsystemunitdir=/usr/lib/systemd/system \
27 "
28 else
29 args="$args \
30 --with-rootprefix= \
31 ---with-rootlibdir=$(libdir /lib) \
32 --bindir=/sbin \
33 --libexecdir=/lib \
34 --with-systemdsystemunitdir=/lib/systemd/system \
35 "
36 fi
37
38 echo
39 echo "----------------------------------------------------------------"
40 echo "Initialized build system. For a common configuration please run:"
41 echo "----------------------------------------------------------------"
42 echo
43 echo "./configure CFLAGS='-g -O1' $args"
44 echo