summaryrefslogtreecommitdiffstats
path: root/src/util/reconf
blob: 9251467ea7b15a744e127a52d5b677a7c7cd866e (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh

force=
autoreconfprog=./util/autoconf/autoreconf
verbose=false

autoreconf="/bin/sh $autoreconfprog"

usage="Usage: $0 [--force] [--verbose] [--help]"
for option
do
  case "$option" in
  --force | -f)
    echo "Remaking all configuration files"
    force=--force ;;
  -help | --help | --hel | --he | --h)
    echo "$usage"; exit 0 ;;
  -v | --verbose)
    verbose=true ;;
  *) echo "$usage"; exit 1 ;;
  esac
done


if test ! -f $autoreconfprog ; then
	if autoreconf --version | grep -q "version 2.[123456789]" && \
	   autoconf --version  | grep -q "version 2.[123456789]" && \
	   autoheader --version | grep -q "version 2.[123456789]" ; then
		autoreconf=autoreconf
		echo "Using" `autoconf --version` "found in your path..."
	else
		echo "Couldn't find autoconf 2.1 or higher in your path."
		echo " "
		echo "Please cd to util/autoconf, and type the commands"
		echo "'configure' and then 'make'; then cd back to the top"
		echo "of the source tree and re-run ./util/reconf"
		exit 1
	fi
fi

if $verbose ; then 
	echo $autoreconf -m util/autoconf -l . --verbose $force 
fi
$autoreconf -m util/autoconf -l . --verbose $force