]> git.ipfire.org Git - thirdparty/systemd.git/blame - autogen.sh
build-sys: split-off D-Bus requires from selinux convenience lib
[thirdparty/systemd.git] / autogen.sh
CommitLineData
47be870b
LP
1#!/bin/bash
2
3# This file is part of systemd.
4#
47be870b 5# systemd is free software; you can redistribute it and/or modify it
5430f7f2
LP
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
47be870b
LP
8# (at your option) any later version.
9#
10# systemd 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
5430f7f2 13# Lesser General Public License for more details.
47be870b 14#
5430f7f2 15# You should have received a copy of the GNU Lesser General Public License
47be870b
LP
16# along with systemd; If not, see <http://www.gnu.org/licenses/>.
17
47be870b 18if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
843605d3
LP
19 cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
20 chmod +x .git/hooks/pre-commit && \
21 echo "Activated pre-commit hook."
47be870b
LP
22fi
23
80a5cbac 24GTKDOCIZE=$(which gtkdocize 2>/dev/null)
92ec4495 25if test -z $GTKDOCIZE; then
843605d3 26 echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation."
473dca4a 27 echo 'EXTRA_DIST =' > docs/gtk-doc.make
80a5cbac 28else
843605d3
LP
29 gtkdocize --docdir docs/
30 gtkdocargs=--enable-gtk-doc
92ec4495
JJ
31fi
32
6bd9fe5a
KS
33intltoolize --force --automake
34autoreconf --force --install --symlink
35
ae446765 36libdir() {
843605d3 37 echo $(cd $1/$(gcc -print-multi-os-directory); pwd)
ae446765
KS
38}
39
6bd9fe5a 40args="\
6bd9fe5a
KS
41--sysconfdir=/etc \
42--localstatedir=/var \
43--libdir=$(libdir /usr/lib) \
3e214785 44--libexecdir=/usr/lib \
80a5cbac 45$gtkdocargs"
6bd9fe5a 46
772f4698
KS
47if [ ! -L /bin ]; then
48args="$args \
49--with-rootprefix= \
50--with-rootlibdir=$(libdir /lib) \
51"
52fi
53
66be6554 54if [ "x$1" == "xc" ]; then
843605d3
LP
55 ./configure CFLAGS='-g -O0 -Wp,-U_FORTIFY_SOURCE' $args
56 make clean
57else
58 echo
59 echo "----------------------------------------------------------------"
60 echo "Initialized build system. For a common configuration please run:"
61 echo "----------------------------------------------------------------"
62 echo
63 echo "./configure CFLAGS='-g -O0 -Wp,-U_FORTIFY_SOURCE' $args"
64 echo
47be870b 65fi