blob: 461efee10e4b9dc5202f4f52a952ac258f812e15 [file] [log] [blame]
openvcdiff311c7142008-08-26 19:29:25 +00001#!/bin/sh
2
3# These are the files that this script might edit:
4# aclocal.m4 configure Makefile.in src/config.h.in \
5# depcomp config.guess config.sub install-sh missing mkinstalldirs \
6# ltmain.sh
7#
8# Here's a command you can run to see what files aclocal will import:
9# aclocal -I ../autoconf --output=- | sed -n 's/^m4_include..\([^]]*\).*/\1/p'
10
11set -ex
12rm -rf autom4te.cache
13
14trap 'rm -f aclocal.m4.tmp' EXIT
15
16# Use version 1.9 of aclocal and automake if available.
17ACLOCAL=aclocal-1.9
18if test -z `which "$ACLOCAL"`; then
19 ACLOCAL=aclocal
20fi
21
22AUTOMAKE=automake-1.9
23if test -z `which "$AUTOMAKE"`; then
24 AUTOMAKE=automake
25fi
26
27# glibtoolize is used for Mac OS X
28LIBTOOLIZE=libtoolize
29if test -z `which "$LIBTOOLIZE"`; then
30 LIBTOOLIZE=glibtoolize
31fi
32
33# aclocal tries to overwrite aclocal.m4 even if the contents haven't
34# changed, which is annoying when the file is not open for edit (in
35# p4). We work around this by writing to a temp file and just
36# updating the timestamp if the file hasn't change.
37"$ACLOCAL" --force -I m4 --output=aclocal.m4.tmp
38if cmp aclocal.m4.tmp aclocal.m4; then
39 touch aclocal.m4 # pretend that we regenerated the file
40 rm -f aclocal.m4.tmp
41else
42 mv aclocal.m4.tmp aclocal.m4 # we did set -e above, so we die if this fails
43fi
44
45grep -q LIBTOOL configure.ac && "$LIBTOOLIZE" -c -f
46autoconf -f -W all,no-obsolete
47autoheader -f -W all
48"$AUTOMAKE" -a -c -f -W all
49
50rm -rf autom4te.cache
51exit 0