root/cherokee/branches/0.5/autogen.sh

Revision 285, 2.5 kB (checked in by alo, 3 years ago)

--

  • Property svn:executable set to
Line 
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 ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I m4"
13
14 DIE=0
15
16 test -z "$AUTOMAKE" && AUTOMAKE=automake
17 test -z "$ACLOCAL" && ACLOCAL=aclocal
18 test -z "$AUTOCONF" && AUTOCONF=autoconf
19 test -z "$AUTOHEADER" && AUTOHEADER=autoheader
20 test -z "$LIBTOOL" && LIBTOOL=libtool
21 test -z "$LIBTOOLIZE" && LIBTOOLIZE=libtoolize
22
23 ($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
24         echo
25         echo "You must have autoconf installed to compile $PROJECT."
26         echo "Download the appropriate package for your distribution,"
27         echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
28         DIE=1
29 }
30
31 ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
32         echo
33         echo "You must have libtool installed to compile $PROJECT."
34         echo "Get ftp://ftp.gnu.org/gnu/libtool/libtool-1.4.tar.gz"
35         echo "(or a newer version if it is available)"
36         DIE=1
37 }
38
39 ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
40         echo
41         echo "You must have automake installed to compile $PROJECT."
42         echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz"
43         echo "(or a newer version if it is available)"
44         DIE=1
45 }
46
47 if test "$DIE" -eq 1; then
48         exit 1
49 fi
50
51 if test -z "$*"; then
52         echo "I am going to run ./configure with no arguments - if you wish "
53         echo "to pass any to it, please specify them on the $0 command line."
54 fi
55
56 case $CC in
57 *xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
58 esac
59
60 if test -z "$ACLOCAL_FLAGS"; then
61
62         acdir=`$ACLOCAL --print-ac-dir`
63      m4list="etr_socket_nsl.m4 network.m4 sendfile_samba.m4"
64
65         for file in $m4list
66         do
67                 if [ ! -f "$acdir/$file" ]; then
68                         echo "WARNING: aclocal's directory is $acdir, but..."
69                         echo "         no file $acdir/$file"
70                         echo "         You may see fatal macro warnings below."
71                         echo "         If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
72                         echo "         environment variable to \"-I /some/dir\", or install"
73                         echo "         $acdir/$file."
74                         echo ""
75                 fi
76         done
77 fi
78
79 echo "Running $ACLOCAL $ACLOCAL_FLAGS..."
80 $ACLOCAL $ACLOCAL_FLAGS
81
82 # optionally feature autoheader
83 ($AUTOHEADER --version)  < /dev/null > /dev/null 2>&1 && $AUTOHEADER
84
85 # run libtoolize ...
86 echo "Running libtoolize..."
87 $LIBTOOLIZE --force
88
89 echo "Running automake..."
90 $AUTOMAKE -a $am_opt
91 $AUTOHEADER
92 echo "Running autoconf..."
93 $AUTOCONF
94 cd $ORIGDIR
95
96 $srcdir/configure --enable-maintainer-mode --enable-more-warnings --enable-debug "$@"
97
98 echo
99 echo "Now type 'make' to compile $PROJECT."
Note: See TracBrowser for help on using the browser.