root/cherokee/trunk/autogen.sh

Revision 3910, 3.2 kB (checked in by alo, 3 months ago)

Regenerate the po/admin/POTFILES.in whenever autogen.sh is executed.

  • 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 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 # Build the Changelog file
33 ./changelog-update.sh
34
35 # Update the POTFILES.in
36 echo "Generating a fresh po/admin/POTFILES.in file.."
37 po/admin/generate_POTFILESin.py > po/admin/POTFILES.in
38
39
40 ($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
41     echo
42     echo "You must have autoconf installed to compile $PROJECT."
43     echo "Download the appropriate package for your distribution,"
44     echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
45     DIE=1
46 }
47
48 ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
49     echo
50     echo "You must have libtool installed to compile $PROJECT."
51     echo "Download the appropriate package for your distribution, or"
52     echo "get http://ftp.gnu.org/gnu/libtool/libtool-2.2.6a.tar.gz"
53     echo "(or a newer version if it is available)"
54     DIE=1
55 }
56
57 ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
58     echo
59     echo "You must have automake installed to compile $PROJECT."
60     echo "Download the appropriate package for your distribution, or"
61     echo "get http://ftp.gnu.org/gnu/automake/automake-1.10.2.tar.gz"
62     echo "(or a newer version if it is available)"
63     DIE=1
64 }
65
66 if test "$DIE" -eq 1; then
67     exit 1
68 fi
69
70 if test -z "$*"; then
71     echo "WARNING: I'm going to run ./configure with no arguments - if you wish "
72     echo "to pass any to it, please specify them on the $0 command line."
73     echo
74 fi
75
76 case $CC in
77 *xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
78 esac
79
80 if test -z "$ACLOCAL_FLAGS"; then
81
82         acdir=`$ACLOCAL --print-ac-dir`
83      m4list="etr_socket_nsl.m4 network.m4 sendfile_samba.m4"
84
85         for file in $m4list
86         do
87                 if [ ! -f "$acdir/$file" ]; then
88                         echo "WARNING: aclocal's directory is $acdir, but..."
89                         echo "         no file $acdir/$file"
90                         echo "         You may see fatal macro warnings below."
91                         echo "         If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
92                         echo "         environment variable to \"-I /some/dir\", or install"
93                         echo "         $acdir/$file."
94                         echo ""
95                 fi
96         done
97 fi
98
99 # Libtool
100 if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
101   echo "Running: libtoolize --force --copy..."
102   $LIBTOOLIZE --force --copy
103 fi
104
105 # Aclocal
106 echo "Running: $ACLOCAL $ACLOCAL_FLAGS..."
107 rm -f aclocal.m4
108 $ACLOCAL $ACLOCAL_FLAGS
109
110 # Autoheader
111 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
112   echo "Running: autoheader..."
113   $AUTOHEADER
114 fi
115
116 # Automake
117 echo "Running: automake -a $am_opt..."
118 $AUTOMAKE -a $am_opt
119
120 # Autoconf
121 echo "Running: autoconf..."
122 $AUTOCONF
123
124 # ./configure
125 if test x$NO_CONFIGURE != x; then
126   exit;
127 fi
128
129 cd $ORIGDIR
130 $srcdir/configure "$@"
131
132 echo
133 echo "Now type 'make' to compile $PROJECT."
Note: See TracBrowser for help on using the browser.