aboutsummaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap36
1 files changed, 33 insertions, 3 deletions
diff --git a/bootstrap b/bootstrap
index 60e0203..7e15079 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,4 +1,34 @@
1#!/bin/sh 1#!/bin/sh
2# This file is in the public domain. 2unset bs_srcdir
3rm -rf libltdl 3if test X"`dirname / 2>/dev/null`" = X"/"; then
4autoreconf -if 4 bs_scrdir=`dirname $0`
5else
6 bs_scrdir="${0%/*}"
7fi
8
9test -n "$bs_scrdir" && cd "$bs_scrdir" || echo "Warning: cannot get sources directory" 1>&2
10
11# This is more portable than `which' but comes with
12# the caveat of not(?) properly working on busybox's ash:
13existence()
14{
15 command -v "$1" >/dev/null 2>&1
16}
17
18
19if existence uncrustify; then
20 echo "Installing uncrustify hook and configuration"
21 # Install uncrustify format symlink (if possible)
22 ln -s contrib/uncrustify.cfg uncrustify.cfg 2> /dev/null
23 # Install pre-commit hook (if possible)
24 ln -s ../../contrib/uncrustify_precommit .git/hooks/pre-commit 2> /dev/null
25else
26 echo "Uncrustify not detected, hook not installed. Please install uncrustify if you plan on doing development"
27fi
28
29if existence libtool || existence libtoolize || existence glibtoolize || existence slibtool; then
30 autoreconf -I m4 -i ${1+"$@"}
31else
32 echo "*** No libtoolize (libtool) or libtool found, please install it ***" >&2;
33 exit 1
34fi