openvcdiff | 311c714 | 2008-08-26 19:29:25 +0000 | [diff] [blame^] | 1 | #!/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 | |
| 11 | set -ex |
| 12 | rm -rf autom4te.cache |
| 13 | |
| 14 | trap 'rm -f aclocal.m4.tmp' EXIT |
| 15 | |
| 16 | # Use version 1.9 of aclocal and automake if available. |
| 17 | ACLOCAL=aclocal-1.9 |
| 18 | if test -z `which "$ACLOCAL"`; then |
| 19 | ACLOCAL=aclocal |
| 20 | fi |
| 21 | |
| 22 | AUTOMAKE=automake-1.9 |
| 23 | if test -z `which "$AUTOMAKE"`; then |
| 24 | AUTOMAKE=automake |
| 25 | fi |
| 26 | |
| 27 | # glibtoolize is used for Mac OS X |
| 28 | LIBTOOLIZE=libtoolize |
| 29 | if test -z `which "$LIBTOOLIZE"`; then |
| 30 | LIBTOOLIZE=glibtoolize |
| 31 | fi |
| 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 |
| 38 | if cmp aclocal.m4.tmp aclocal.m4; then |
| 39 | touch aclocal.m4 # pretend that we regenerated the file |
| 40 | rm -f aclocal.m4.tmp |
| 41 | else |
| 42 | mv aclocal.m4.tmp aclocal.m4 # we did set -e above, so we die if this fails |
| 43 | fi |
| 44 | |
| 45 | grep -q LIBTOOL configure.ac && "$LIBTOOLIZE" -c -f |
| 46 | autoconf -f -W all,no-obsolete |
| 47 | autoheader -f -W all |
| 48 | "$AUTOMAKE" -a -c -f -W all |
| 49 | |
| 50 | rm -rf autom4te.cache |
| 51 | exit 0 |