]>
git.ipfire.org Git - people/ms/systemd.git/blob - bootstrap.sh
3 # This file is part of systemd.
5 # Copyright 2010 Lennart Poettering
7 # systemd is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
12 # systemd is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with systemd; If not, see <http://www.gnu.org/licenses/>.
27 V
=$
(echo "$2" |
sed -e 's,\.,,g')
29 if [ -e "`which $1$V 2> /dev/null`" ] ; then
32 if [ -e "`which $1-$2 2> /dev/null`" ] ; then
45 if [ -f .git
/hooks
/pre-commit.sample
-a ! -f .git
/hooks
/pre-commit
] ; then
46 cp -p .git
/hooks
/pre-commit.sample .git
/hooks
/pre-commit
&& \
47 chmod +x .git
/hooks
/pre-commit
&& \
48 echo "Activated pre-commit hook."
51 # We check for this here, because if pkg-config is not found in the
52 # system, it's likely that the pkg.m4 macro file is also not present,
53 # which will make PKG_PROG_PKG_CONFIG be undefined and the generated
54 # configure file faulty.
55 if ! pkg-config
--version &>/dev
/null
; then
56 echo "pkg-config is required to bootstrap this program" &>/dev
/null
60 if type -p colorgcc
> /dev
/null
; then
64 if [ "x$1" = "xam" ] ; then
65 run_versioned automake
"$VERSION" -a -c --foreign
71 run_versioned aclocal
"$AM_VERSION" -I m4
72 run_versioned autoconf
"$AC_VERSION" -Wall
73 run_versioned autoheader
"$AC_VERSION"
74 run_versioned automake
"$AM_VERSION" --copy --foreign --add-missing
76 if [ "x$1" != "xac" ]; then
77 CFLAGS
="$CFLAGS -g -O0" .
/configure
--sysconfdir=/etc
--localstatedir=/var
"$@"