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