xref: /freebsd/sys/contrib/libsodium/autogen.sh (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1#! /bin/sh
2
3if glibtoolize --version > /dev/null 2>&1; then
4  LIBTOOLIZE='glibtoolize'
5else
6  LIBTOOLIZE='libtoolize'
7fi
8
9command -v command >/dev/null 2>&1 || {
10  echo "command is required, but wasn't found on this system"
11  exit 1
12}
13
14command -v $LIBTOOLIZE >/dev/null 2>&1 || {
15  echo "libtool is required, but wasn't found on this system"
16  exit 1
17}
18
19command -v autoconf >/dev/null 2>&1 || {
20  echo "autoconf is required, but wasn't found on this system"
21  exit 1
22}
23
24command -v automake >/dev/null 2>&1 || {
25  echo "automake is required, but wasn't found on this system"
26  exit 1
27}
28
29if autoreconf --version > /dev/null 2>&1 ; then
30  exec autoreconf -ivf
31fi
32
33$LIBTOOLIZE && \
34aclocal && \
35automake --add-missing --force-missing --include-deps && \
36autoconf
37