3 # This file is part of systemd.
5 # systemd 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.
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
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public License
16 # along with systemd; If not, see <http://www.gnu.org/licenses/>.
20 if [ -f .git/hooks/pre-commit.sample ] && [ ! -f .git/hooks/pre-commit ]; then
21 # This part is allowed to fail
22 cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \
23 chmod +x .git/hooks/pre-commit && \
24 echo "Activated pre-commit hook." || :
27 if which gtkdocize >/dev/null 2>/dev/null; then
28 gtkdocize --docdir docs/ --flavour no-tmpl
29 gtkdocargs=--enable-gtk-doc
31 echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation."
32 rm -f docs/gtk-doc.make
33 echo 'EXTRA_DIST =' > docs/gtk-doc.make
36 intltoolize --force --automake
37 autoreconf --force --install --symlink
40 echo $(cd "$1/$(gcc -print-multi-os-directory)"; pwd)
45 --localstatedir=/var \
46 --libdir=$(libdir /usr/lib) \
49 if [ ! -L /bin ]; then
52 --with-rootlibdir=$(libdir /lib) \
56 if [ "x$1" = "xc" ]; then
57 ./configure CFLAGS='-g -O0' --enable-kdbus $args
59 elif [ "x$1" = "xg" ]; then
60 ./configure CFLAGS='-g -Og' --enable-kdbus $args
64 echo "----------------------------------------------------------------"
65 echo "Initialized build system. For a common configuration please run:"
66 echo "----------------------------------------------------------------"
68 echo "./configure CFLAGS='-g -O0' --enable-kdbus $args"