xref: /freebsd/contrib/tcpdump/autogen.sh (revision 1ddff51060ad759e35dcc4716b0bdcdb40255862)
1#!/bin/sh -e
2
3: "${AUTORECONF:=autoreconf}"
4
5AUTORECONFVERSION=`$AUTORECONF --version 2>&1 | grep "^autoreconf" | sed 's/.*) *//'`
6
7maj=`echo "$AUTORECONFVERSION" | cut -d. -f1`
8min=`echo "$AUTORECONFVERSION" | cut -d. -f2`
9# The minimum required version of autoconf is currently 2.69.
10if [ "$maj" = "" ] || [ "$min" = "" ] || \
11   [ "$maj" -lt 2 ] || { [ "$maj" -eq 2 ] && [ "$min" -lt 69 ]; }; then
12	cat >&2 <<-EOF
13	Please install the 'autoconf' package version 2.69 or later.
14	If version 2.69 or later is already installed and there is no
15	autoconf default, it may be necessary to set the AUTORECONF
16	environment variable to enable the one to use, like:
17	AUTORECONF=autoreconf-2.69 ./autogen.sh
18	or
19	AUTORECONF=autoreconf-2.71 ./autogen.sh
20	EOF
21	exit 1
22fi
23
24echo "$AUTORECONF identification: $AUTORECONFVERSION"
25"$AUTORECONF" -f
26