| 1 | #!/bin/sh |
|---|
| 2 | # Run this to set up the build system: configure, makefiles, etc. |
|---|
| 3 | # (based on the version in enlightenment's cvs) |
|---|
| 4 | # |
|---|
| 5 | |
|---|
| 6 | package="frei0r" |
|---|
| 7 | |
|---|
| 8 | olddir=`pwd` |
|---|
| 9 | srcdir=`dirname $0` |
|---|
| 10 | |
|---|
| 11 | AUTOHEADER=autoheader |
|---|
| 12 | if [ "`uname -s`" = "Darwin" ]; then |
|---|
| 13 | LIBTOOL=glibtool |
|---|
| 14 | LIBTOOLIZE=glibtoolize |
|---|
| 15 | ACLOCAL=aclocal |
|---|
| 16 | AUTOMAKE=automake |
|---|
| 17 | else |
|---|
| 18 | LIBTOOL=libtool |
|---|
| 19 | LIBTOOLIZE=libtoolize |
|---|
| 20 | ACLOCAL=aclocal |
|---|
| 21 | AUTOMAKE=automake |
|---|
| 22 | fi |
|---|
| 23 | AUTOCONF=autoconf |
|---|
| 24 | |
|---|
| 25 | test -z "$srcdir" && srcdir=. |
|---|
| 26 | |
|---|
| 27 | cd "$srcdir" |
|---|
| 28 | DIE=0 |
|---|
| 29 | |
|---|
| 30 | ($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || { |
|---|
| 31 | echo |
|---|
| 32 | echo "You must have autoconf installed to compile $package." |
|---|
| 33 | echo "Download the appropriate package for your distribution," |
|---|
| 34 | echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" |
|---|
| 35 | DIE=1 |
|---|
| 36 | } |
|---|
| 37 | |
|---|
| 38 | ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || { |
|---|
| 39 | echo |
|---|
| 40 | echo "You must have automake installed to compile $package." |
|---|
| 41 | echo "Download the appropriate package for your system," |
|---|
| 42 | echo "or get the source from one of the GNU ftp sites" |
|---|
| 43 | echo "listed in http://www.gnu.org/order/ftp.html" |
|---|
| 44 | DIE=1 |
|---|
| 45 | } |
|---|
| 46 | |
|---|
| 47 | ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || { |
|---|
| 48 | echo |
|---|
| 49 | echo "You must have libtool installed to compile $package." |
|---|
| 50 | echo "Download the appropriate package for your system," |
|---|
| 51 | echo "or get the source from one of the GNU ftp sites" |
|---|
| 52 | echo "listed in http://www.gnu.org/order/ftp.html" |
|---|
| 53 | DIE=1 |
|---|
| 54 | } |
|---|
| 55 | |
|---|
| 56 | if test "$DIE" -eq 1; then |
|---|
| 57 | exit 1 |
|---|
| 58 | fi |
|---|
| 59 | |
|---|
| 60 | # if test -z "$*"; then |
|---|
| 61 | # echo "I am going to run ./configure with no arguments - if you wish " |
|---|
| 62 | # echo "to pass any to it, please specify them on the $0 command line." |
|---|
| 63 | # fi |
|---|
| 64 | |
|---|
| 65 | echo "Generating configuration files for $package, please wait...." |
|---|
| 66 | |
|---|
| 67 | echo " $ACLOCAL" |
|---|
| 68 | $ACLOCAL || exit -1 |
|---|
| 69 | echo " $AUTOHEADER" |
|---|
| 70 | $AUTOHEADER || exit -1 |
|---|
| 71 | echo " $LIBTOOLIZE --automake -c" |
|---|
| 72 | $LIBTOOLIZE --automake -c || exit -1 |
|---|
| 73 | echo " $AUTOMAKE --add-missing -c" |
|---|
| 74 | $AUTOMAKE --add-missing -c || exit -1 |
|---|
| 75 | echo " $AUTOCONF" |
|---|
| 76 | $AUTOCONF || exit -1 |
|---|
| 77 | |
|---|
| 78 | echo "Now you can run $srcdir/configure" |
|---|
| 79 | |
|---|
| 80 | cd $olddir |
|---|