-
Notifications
You must be signed in to change notification settings - Fork 4
/
autogen.sh
executable file
·42 lines (32 loc) · 967 Bytes
/
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
#!/bin/sh
# autogen.sh - autotools generation script
# Copyright (c) 2020, Christopher Jeffrey (MIT License).
# https://github.com/bcoin-org/libtorsion
# A poor man's `autoreconf -if -Wall`.
set -e
if ! test -f configure.ac; then
echo 'configure.ac not found.' >& 2
exit 1
fi
ACLOCAL=${ACLOCAL:-aclocal}
AUTOCONF=${AUTOCONF:-autoconf}
AUTOMAKE=${AUTOMAKE:-automake}
if glibtoolize --version > /dev/null 2>& 1; then
LIBTOOLIZE=${LIBTOOLIZE:-glibtoolize}
else
LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}
fi
export WARNINGS=all
"$ACLOCAL" --force -I m4
if ! test -d build-aux; then
mkdir build-aux
fi
"$LIBTOOLIZE" --copy --force
"$ACLOCAL" --force -I m4
"$AUTOCONF" --force
"$AUTOMAKE" --add-missing --copy --force-missing
# Hack to get dietlibc working with autotools.
sed -e 's/| uclibc\*)$/| uclibc* | dietlibc*)/' \
< build-aux/config.sub > build-aux/config.sub.tmp
mv -f build-aux/config.sub.tmp build-aux/config.sub
chmod 0755 build-aux/config.sub