]> git.ipfire.org Git - thirdparty/systemd.git/blame - autogen.sh
relicense to LGPLv2.1 (with exceptions)
[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
LP
18if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
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."
22fi
23
3e214785 24gtkdocize
6bd9fe5a
KS
25intltoolize --force --automake
26autoreconf --force --install --symlink
27
ae446765
KS
28libdir() {
29 echo $(cd $1/$(gcc -print-multi-os-directory); pwd)
30}
31
6bd9fe5a 32args="\
6bd9fe5a
KS
33--sysconfdir=/etc \
34--localstatedir=/var \
35--libdir=$(libdir /usr/lib) \
3e214785
KS
36--libexecdir=/usr/lib \
37--enable-gtk-doc"
6bd9fe5a 38
772f4698
KS
39if [ ! -L /bin ]; then
40args="$args \
41--with-rootprefix= \
42--with-rootlibdir=$(libdir /lib) \
43"
44fi
45
6bd9fe5a
KS
46if [ "x$1" != "xc" ]; then
47 echo
48 echo "----------------------------------------------------------------"
49 echo "Initialized build system. For a common configuration please run:"
50 echo "----------------------------------------------------------------"
51 echo
52 echo "./configure CFLAGS='-g -O0' $args"
53 echo
47be870b 54else
6bd9fe5a
KS
55 echo ./configure CFLAGS='-g -O0' $args
56 ./configure CFLAGS='-g -O0' $args
57 make clean
47be870b 58fi