| 1 | #!/bin/sh |
| 2 | |
| 3 | ACLOCAL="aclocal -I m4" |
| 4 | AUTOHEADER="autoheader" |
| 5 | AUTOMAKE="automake --add-missing --copy --foreign" |
| 6 | AUTOCONF="autoconf" |
| 7 | |
| 8 | # Delete old cache directories. |
| 9 | # automake will stop if their contents was created by an earlier version. |
| 10 | rm -rf autom4te.cache |
| 11 | |
| 12 | # Generate the Makefiles and configure files |
| 13 | echo "Building macros..." |
| 14 | if ( $ACLOCAL --version ) < /dev/null > /dev/null 2>&1; then |
| 15 | $ACLOCAL |
| 16 | else |
| 17 | echo "aclocal not found -- aborting" |
| 18 | exit 1 |
| 19 | fi |
| 20 | |
| 21 | echo "Building config header template..." |
| 22 | if ( $AUTOHEADER --version ) < /dev/null > /dev/null 2>&1; then |
| 23 | $AUTOHEADER |
| 24 | echo timestamp > stamp-h.in |
| 25 | else |
| 26 | echo "autoheader not found -- aborting" |
| 27 | exit 1 |
| 28 | fi |
| 29 | |
| 30 | # We do not really need automake, but want to install programs like install-sh. |
| 31 | echo "Installing some useful programs..." |
| 32 | if ( $AUTOMAKE --version ) < /dev/null > /dev/null 2>&1; then |
| 33 | $AUTOMAKE 2>/dev/null |
| 34 | else |
| 35 | echo "automake not found -- aborting" |
| 36 | exit 1 |
| 37 | fi |
| 38 | |
| 39 | echo "Building configure..." |
| 40 | if ( $AUTOCONF --version ) < /dev/null > /dev/null 2>&1; then |
| 41 | $AUTOCONF |
| 42 | else |
| 43 | echo "autoconf not found -- aborting" |
| 44 | exit 1 |
| 45 | fi |
| 46 | |
| 47 | echo |
| 48 | echo 'run "./configure ; make"' |
| 49 | echo |