| 1 |
#!/bin/sh |
|---|
| 2 |
# Run this to generate all the initial makefiles, etc. |
|---|
| 3 |
|
|---|
| 4 |
srcdir=`dirname $0` |
|---|
| 5 |
test -z "$srcdir" && srcdir=. |
|---|
| 6 |
|
|---|
| 7 |
ORIGDIR=`pwd` |
|---|
| 8 |
cd $srcdir |
|---|
| 9 |
PROJECT=cherokee |
|---|
| 10 |
|
|---|
| 11 |
#include our own macros |
|---|
| 12 |
if test x"$ACLOCAL_FLAGS" != "x"; then |
|---|
| 13 |
ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4" |
|---|
| 14 |
else |
|---|
| 15 |
ACLOCAL_FLAGS="-I m4" |
|---|
| 16 |
fi |
|---|
| 17 |
|
|---|
| 18 |
DIE=0 |
|---|
| 19 |
|
|---|
| 20 |
test -z "$AUTOMAKE" && AUTOMAKE=automake |
|---|
| 21 |
test -z "$ACLOCAL" && ACLOCAL=aclocal |
|---|
| 22 |
test -z "$AUTOCONF" && AUTOCONF=autoconf |
|---|
| 23 |
test -z "$AUTOHEADER" && AUTOHEADER=autoheader |
|---|
| 24 |
if [ -x /usr/bin/glibtool ]; then |
|---|
| 25 |
test -z "$LIBTOOL" && LIBTOOL=glibtool |
|---|
| 26 |
test -z "$LIBTOOLIZE" && LIBTOOLIZE=glibtoolize |
|---|
| 27 |
else |
|---|
| 28 |
test -z "$LIBTOOL" && LIBTOOL=libtool |
|---|
| 29 |
test -z "$LIBTOOLIZE" && LIBTOOLIZE=libtoolize |
|---|
| 30 |
fi |
|---|
| 31 |
|
|---|
| 32 |
($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || { |
|---|
| 33 |
echo |
|---|
| 34 |
echo "You must have autoconf installed to compile $PROJECT." |
|---|
| 35 |
echo "Download the appropriate package for your distribution," |
|---|
| 36 |
echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" |
|---|
| 37 |
DIE=1 |
|---|
| 38 |
} |
|---|
| 39 |
|
|---|
| 40 |
($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || { |
|---|
| 41 |
echo |
|---|
| 42 |
echo "You must have libtool installed to compile $PROJECT." |
|---|
| 43 |
echo "Get ftp://ftp.gnu.org/gnu/libtool/libtool-1.4.tar.gz" |
|---|
| 44 |
echo "(or a newer version if it is available)" |
|---|
| 45 |
DIE=1 |
|---|
| 46 |
} |
|---|
| 47 |
|
|---|
| 48 |
($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || { |
|---|
| 49 |
echo |
|---|
| 50 |
echo "You must have automake installed to compile $PROJECT." |
|---|
| 51 |
echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz" |
|---|
| 52 |
echo "(or a newer version if it is available)" |
|---|
| 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 |
case $CC in |
|---|
| 66 |
*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;; |
|---|
| 67 |
esac |
|---|
| 68 |
|
|---|
| 69 |
if test -z "$ACLOCAL_FLAGS"; then |
|---|
| 70 |
|
|---|
| 71 |
acdir=`$ACLOCAL --print-ac-dir` |
|---|
| 72 |
m4list="etr_socket_nsl.m4 network.m4 sendfile_samba.m4" |
|---|
| 73 |
|
|---|
| 74 |
for file in $m4list |
|---|
| 75 |
do |
|---|
| 76 |
if [ ! -f "$acdir/$file" ]; then |
|---|
| 77 |
echo "WARNING: aclocal's directory is $acdir, but..." |
|---|
| 78 |
echo " no file $acdir/$file" |
|---|
| 79 |
echo " You may see fatal macro warnings below." |
|---|
| 80 |
echo " If these files are installed in /some/dir, set the ACLOCAL_FLAGS " |
|---|
| 81 |
echo " environment variable to \"-I /some/dir\", or install" |
|---|
| 82 |
echo " $acdir/$file." |
|---|
| 83 |
echo "" |
|---|
| 84 |
fi |
|---|
| 85 |
done |
|---|
| 86 |
fi |
|---|
| 87 |
|
|---|
| 88 |
echo "Running $ACLOCAL $ACLOCAL_FLAGS..." |
|---|
| 89 |
$ACLOCAL $ACLOCAL_FLAGS |
|---|
| 90 |
|
|---|
| 91 |
# optionally feature autoheader |
|---|
| 92 |
($AUTOHEADER --version) < /dev/null > /dev/null 2>&1 && $AUTOHEADER |
|---|
| 93 |
|
|---|
| 94 |
# run libtoolize ... |
|---|
| 95 |
echo "Running libtoolize..." |
|---|
| 96 |
$LIBTOOLIZE --force |
|---|
| 97 |
|
|---|
| 98 |
echo "Running automake..." |
|---|
| 99 |
$AUTOMAKE -a $am_opt |
|---|
| 100 |
$AUTOHEADER |
|---|
| 101 |
echo "Running autoconf..." |
|---|
| 102 |
$AUTOCONF |
|---|
| 103 |
cd $ORIGDIR |
|---|
| 104 |
|
|---|
| 105 |
$srcdir/configure --enable-maintainer-mode "$@" |
|---|
| 106 |
|
|---|
| 107 |
echo |
|---|
| 108 |
echo "Now type 'make' to compile $PROJECT." |
|---|