| 1 | #!/bin/sh |
|---|
| 2 | # Run this to bootstrap the files |
|---|
| 3 | |
|---|
| 4 | PACKAGE=mapnik |
|---|
| 5 | |
|---|
| 6 | srcdir=`dirname $0` |
|---|
| 7 | test -z "$srcdir" && srcdir=. |
|---|
| 8 | |
|---|
| 9 | DIE=0 |
|---|
| 10 | |
|---|
| 11 | # check if configure.ac is there |
|---|
| 12 | (test -f $srcdir/configure.ac) || { |
|---|
| 13 | echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" |
|---|
| 14 | echo " top-level package directory" |
|---|
| 15 | exit 1 |
|---|
| 16 | } |
|---|
| 17 | |
|---|
| 18 | # check for autoconf |
|---|
| 19 | (autoconf --version) < /dev/null > /dev/null 2>&1 || { |
|---|
| 20 | echo |
|---|
| 21 | echo "**Error**: You must have \`autoconf' installed." |
|---|
| 22 | echo "Download the appropriate package for your distribution," |
|---|
| 23 | echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" |
|---|
| 24 | DIE=1 |
|---|
| 25 | } |
|---|
| 26 | |
|---|
| 27 | # check for libtool |
|---|
| 28 | (libtool --version) < /dev/null > /dev/null 2>&1 || { |
|---|
| 29 | echo |
|---|
| 30 | echo "**Error**: You must have \`libtool' installed." |
|---|
| 31 | echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" |
|---|
| 32 | DIE=1 |
|---|
| 33 | } |
|---|
| 34 | |
|---|
| 35 | # check for automake |
|---|
| 36 | (automake --version) < /dev/null > /dev/null 2>&1 || { |
|---|
| 37 | echo |
|---|
| 38 | echo "**Error**: You must have \`automake' installed." |
|---|
| 39 | echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" |
|---|
| 40 | DIE=1 |
|---|
| 41 | NO_AUTOMAKE=yes |
|---|
| 42 | } |
|---|
| 43 | |
|---|
| 44 | |
|---|
| 45 | # if no automake, don't bother testing for aclocal |
|---|
| 46 | test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { |
|---|
| 47 | echo |
|---|
| 48 | echo "**Error**: Missing \`aclocal'. The version of \`automake'" |
|---|
| 49 | echo "installed doesn't appear recent enough." |
|---|
| 50 | echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/" |
|---|
| 51 | DIE=1 |
|---|
| 52 | } |
|---|
| 53 | |
|---|
| 54 | if test "$DIE" -eq 1; then |
|---|
| 55 | exit 1 |
|---|
| 56 | fi |
|---|
| 57 | |
|---|
| 58 | echo "Running libtoolize..." |
|---|
| 59 | libtoolize --force --copy |
|---|
| 60 | |
|---|
| 61 | aclocalinclude="$ACLOCAL_FLAGS -I config" |
|---|
| 62 | echo "Running aclocal $aclocalinclude ..." |
|---|
| 63 | aclocal $aclocalinclude |
|---|
| 64 | |
|---|
| 65 | echo "Running autoheader..." |
|---|
| 66 | autoheader |
|---|
| 67 | |
|---|
| 68 | echo "Running automake..." |
|---|
| 69 | automake --add-missing --foreign $am_opt |
|---|
| 70 | |
|---|
| 71 | echo "Running autoconf ..." |
|---|
| 72 | autoconf |
|---|
| 73 | |
|---|
| 74 | echo "You could now exec ./configure --help to see available options" |
|---|