summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2023-01-07 11:15:39 +0100
committerfxlb <devel.fx.lebail@orange.fr>2023-01-30 21:51:02 +0000
commit17ff63e88ea99112a905eefc6f862dac20de09e1 (patch)
tree470c5e43daa6a715a4b966aec57bc9e237e6b72e /autogen.sh
parent7ea5bcd0f05cbcb0621a6ce0e6312a97bbb4d13e (diff)
downloadlibpcap-17ff63e88ea99112a905eefc6f862dac20de09e1.tar.gz
autoconf: Add autogen.sh, remove configure and config.h.in
Put autoconf-generated files in the release tarball. Remove the corresponding task from the TODO file. The minimum required version of autoconf is currently 2.69. If version 2.69 or later is already installed and there is no autoconf default, it may be necessary to set the AUTORECONF environment variable to enable the one to use, like: AUTORECONF=autoreconf-2.69 ./autogen.sh or AUTORECONF=autoreconf-2.71 ./autogen.sh
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 00000000..b3c321b0
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+
+: "${AUTORECONF:=autoreconf}"
+
+AUTORECONFVERSION=`$AUTORECONF --version 2>&1 | grep "^autoreconf" | sed 's/.*) *//'`
+
+maj=`echo "$AUTORECONFVERSION" | cut -d. -f1`
+min=`echo "$AUTORECONFVERSION" | cut -d. -f2`
+# The minimum required version of autoconf is currently 2.69.
+if [ "$maj" = "" ] || [ "$min" = "" ] || \
+ [ "$maj" -lt 2 ] || [ "$maj" -eq 2 -a "$min" -lt 69 ]; then
+ cat >&2 <<-EOF
+ Please install the 'autoconf' package version 2.69 or later.
+ If version 2.69 or later is already installed and there is no
+ autoconf default, it may be necessary to set the AUTORECONF
+ environment variable to enable the one to use, like:
+ AUTORECONF=autoreconf-2.69 ./autogen.sh
+ or
+ AUTORECONF=autoreconf-2.71 ./autogen.sh
+ EOF
+ exit 1
+fi
+
+echo "$AUTORECONF identification: $AUTORECONFVERSION"
+"$AUTORECONF" -f