xref: /freebsd/contrib/tcpdump/autogen.sh (revision d71e2c037c942dbe2a9fd2630d5cf155dd1bf7db)
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