File: bootstrap

package info (click to toggle)
codeblocks 16.01+dfsg-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 85,420 kB
  • ctags: 90,657
  • sloc: cpp: 665,947; ansic: 48,306; sh: 32,198; xml: 29,690; makefile: 6,054; asm: 3,827; python: 3,251; f90: 1,202; pascal: 839; yacc: 291; perl: 261; sed: 16
file content (70 lines) | stat: -rwxr-xr-x 2,174 bytes parent folder | download | duplicates (3)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/sh

# Check for proper versions of autotools
# We require:
#  - autoconf 2.50+
#  - automake 1.7+, 1.9+ for make dist
#  - libtool 1.4+

# Touch revision.m4
if [ -f ./update_revision.sh ]; then
	./update_revision.sh;
elif [ ! -f ./revision.m4 ]; then
	echo "m4_define([SVN_REV], 0)" > ./revision.m4;
	echo "m4_define([SVN_REVISION], trunk-r0)" >> ./revision.m4;
	echo "m4_define([SVN_DATE], )" >> ./revision.m4;
fi

# create m4 directory or we break older systems like RedHat/CentOS 5
mkdir -p m4

# Deal with some gentoo-specific issues
WANT_AUTOMAKE='1.11 1.9 1.8 1.7' #latest of these is chosen or default if none hits
export WANT_AUTOMAKE
WANT_AUTOCONF='2.5'
export WANT_AUTOCONF

# Default program names
test -z "$AUTOCONF" && AUTOCONF=autoconf
test -z "$AUTOHEADER" && AUTOHEADER=autoheader

test -z "$AUTOMAKE" && AUTOMAKE=automake
test -z "$ACLOCAL" && ACLOCAL=aclocal

test -z "$LIBTOOL" && for LIBTOOL in glibtool libtool; do
  ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 && break
done
test -z "$LIBTOOLIZE" && for LIBTOOLIZE in glibtoolize libtoolize; do
  ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 && break
done

## Using prereq in autoconf rather than here, mostly for the debian systems at
## this point
if test -n "`$AUTOCONF --version 2>&1|head -n 1|egrep '1\.[0-9]+|2\.[0-4]+'`"; then
	echo "Autoconf 2.50 or above is required. Aborting build...";
	exit 1;
fi

if test -n "`$AUTOMAKE --version 2>&1|head -n 1|egrep '\<1\.[0-6](\.[0-9]+)?\>'`"; then
	echo "Automake 1.7 or above is required. Aborting build...";
	exit 1;
fi

if test -n "`$AUTOMAKE --version 2>&1|head -n 1|egrep '\<1\.7(\.[0-9]+)?|\<1\.8(\.[0-9]+)?'`"; then
	echo "make dist only supported with automake 1.9 or above" >&2;
fi

if test -n "`$LIBTOOL --version 2>&1|head -n 1|cut -f 4 -d ' '|egrep '1\.[0-3](\.[0-9]+)?$'`"; then
	echo "Libtool 1.4 or above is required. Aborting build...";
	exit 1;
fi

# clean up files which cause confusion when switch versions of auto*
rm -rf autom4te.cache

# Fire up autotools
$LIBTOOLIZE --force --copy && \
	$ACLOCAL $ACLOCAL_FLAGS && \
	$AUTOHEADER && \
	$AUTOMAKE --include-deps --add-missing --foreign --copy && \
	$AUTOCONF