chiark / gitweb /
time-util: Rename and fix call of deserialize_timestamp_value()
[elogind.git] / autogen.sh
1 #!/bin/sh
2
3 #  This file is part of elogind
4 #
5 #  elogind is free software; you can redistribute it and/or modify it
6 #  under the terms of the GNU Lesser General Public License as published by
7 #  the Free Software Foundation; either version 2.1 of the License, or
8 #  (at your option) any later version.
9 #
10 #  elogind is distributed in the hope that it will be useful, but
11 #  WITHOUT ANY WARRANTY; without even the implied warranty of
12 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 #  Lesser General Public License for more details.
14 #
15 #  You should have received a copy of the GNU Lesser General Public License
16 #  along with elogind; If not, see <http://www.gnu.org/licenses/>.
17
18 set -e
19
20 oldpwd=$(pwd)
21 topdir=$(dirname $0)
22 cd $topdir
23
24 intltoolize --force --automake
25 autoreconf --force --install --symlink
26
27 libdir() {
28         echo $(cd "$1/$(gcc -print-multi-os-directory)"; pwd)
29 }
30
31 args="\
32 --sysconfdir=/etc \
33 --localstatedir=/var \
34 --libdir=$(libdir /usr/lib) \
35 "
36
37 if [ -f "$topdir/.config.args" ]; then
38         args="$args $(cat $topdir/.config.args)"
39 fi
40
41 if [ ! -L /bin ]; then
42 args="$args \
43 --with-rootprefix=/ \
44 --with-rootlibdir=$(libdir /lib) \
45 "
46 fi
47
48 cd $oldpwd
49
50 echo
51 echo "----------------------------------------------------------------"
52 echo "Initialized build system. For a common configuration please run:"
53 echo "----------------------------------------------------------------"
54 echo
55 echo "$topdir/configure CFLAGS='-g -O0 -ftrapv' --enable-kdbus $args"
56 echo