summaryrefslogtreecommitdiff
path: root/buildconf.sh
blob: 7bfc42c5a95651c287132eac5062c48e39b4aa9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /bin/sh

#--------------------------------------------------------------------------
# autoconf 2.58 or newer
#
ac_version="`${AUTOCONF:-autoconf} --version 2> /dev/null | head -1 | sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`"
if test -z "$ac_version"; then
  echo "ERROR: autoconf not found."
  echo "       You need autoconf version 2.58 or newer installed."
  exit 1
fi
IFS=.; set $ac_version; IFS=' '
if test "$1" = "2" -a "$2" -lt "58" || test "$1" -lt "2"; then
  echo "ERROR: autoconf version $ac_version found."
  echo "       You need autoconf version 2.58 or newer installed."
  exit 1
fi

echo "Creating configure ..."
${AUTOCONF:-autoreconf} -fvi

# toss this; it gets created by autoconf on some systems
rm -rf autom4te*.cache

# exit with the right value, so any calling script can continue
exit 0