forked from cburstedde/p4est
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap
executable file
·46 lines (39 loc) · 1.55 KB
/
bootstrap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#! /bin/sh
# Call this without arguments if p4est is the toplevel package.
# Call this with one argument if p4est is itself a subdirectory:
# ./bootstrap <sc/config directory>
# override by option argument
SC_CONFIG="sc/config"
if test -n "$1" ; then
SC_CONFIG="$1"
fi
if test ! -d "$SC_CONFIG" -o ! -f "$SC_CONFIG/sc_include.m4" ; then
echo "Error: Cannot find $SC_CONFIG/sc_include.m4"
echo " If you just called ./bootstrap from a fresh clone of p4est"
echo " you may need to checkout the submodule sc:"
echo " \$ git submodule init && git submodule update"
echo " Alternatively, you may call ./bootstrap <sc/config directory>"
echo " referring to any external source tree of the sc repository."
echo " When both p4est and sc are parallel subdirectories, their"
echo " toplevel bootstrap may call their respective bootstraps."
exit 1
fi
# convert into an absolute path
SC_CONFIG=`cd "$SC_CONFIG" && pwd`
if test -x "sc/bootstrap" ; then
echo "Running bootstrap in subdirectory sc"
(cd sc && ./bootstrap)
fi
echo "--- This is the bootstrap script for p4est ---"
echo "It is NOT required to run bootstrap to build from a tar.gz archive"
echo "Current directory is $PWD"
rm -rf autom4te.cache
LIBTOOLIZE=`which glibtoolize`
if test ! -x "$LIBTOOLIZE" ; then LIBTOOLIZE=`which libtoolize` ; fi
if test ! -x "$LIBTOOLIZE" ; then echo "bootstrap requires libtoolize" ; \
exit 1 ; fi
aclocal -Wall -I config -I "$SC_CONFIG"
autoconf -Wall --force
autoheader -Wall --force
"$LIBTOOLIZE" --install --copy
automake -Wall --add-missing --copy