-
-
Notifications
You must be signed in to change notification settings - Fork 233
/
autogen.sh
executable file
·47 lines (42 loc) · 1.32 KB
/
autogen.sh
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
#!/bin/sh
# autogen.sh
#
# Usage: sh autogen.sh [-f]
# Run this in the top directory to regenerate all the files.
# Option "-f" means forcefully create symlinks for missing files
# (by default: copies are made only if necessary).
#
# Tested with:
# - autoconf (GNU Autoconf) 2.65, 2.69
# - automake (GNU automake) 1.14 - 1.16.1
# - ltmain.sh (GNU libtool) 2.2.6b - 2.4.6
set -x
rm -rf autom4te.cache config.status
if test -d .git -a -f build-aux/git-version-gen; then
git fetch --tags
if [ -f .tarball-version ]; then
rm .tarball-version
fi
v=$(build-aux/git-version-gen .tarball-version)
echo $v >.tarball-version
echo $v >.version
fi
amver=$(automake --version | head -n1 | perl -lne'/ \d\.(\d+)/ && print $1')
if [ $amver -gt 0 -a $amver -lt 14 ]; then
if [ $amver -lt 13 ]; then
perl -p -i.bak -e 's/1.14 gnu no-define serial-tests dist-xz info-in-builddir/1.11 gnu no-define/' configure.ac
else
perl -p -i.bak -e 's/1.14 gnu no-define serial-tests dist-xz info-in-builddir/1.13 gnu no-define serial-tests dist-xz/' configure.ac
fi
fi
set -e
autoreconf --install --symlink "$@" -I m4
if
command -v git &
>/dev/null
then
git submodule update --init --recursive
else
curl https://raw.githubusercontent.com/zserge/jsmn/master/jsmn.h -o jsmn/jsmn.h
fi
# autogen.sh ends here