]> Pileus Git - ~andy/gtk/blob - autogen.sh
Move gtk-config to gtk-config-2.0 move gtk_.m4 to gtk-2.0.m4
[~andy/gtk] / autogen.sh
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=Gtk+
10 TEST_TYPE=-d
11 FILE=gdk
12
13 DIE=0
14
15 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
16         echo
17         echo "You must have autoconf installed to compile $PROJECT."
18         echo "Download the appropriate package for your distribution,"
19         echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
20         DIE=1
21 }
22
23 (automake --version) < /dev/null > /dev/null 2>&1 || {
24         echo
25         echo "You must have automake installed to compile $PROJECT."
26         echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz"
27         echo "(or a newer version if it is available)"
28         DIE=1
29 }
30
31 if test "$DIE" -eq 1; then
32         exit 1
33 fi
34
35 test $TEST_TYPE $FILE || {
36         echo "You must run this script in the top-level $PROJECT directory"
37         exit 1
38 }
39
40 if test -z "$*"; then
41         echo "I am going to run ./configure with no arguments - if you wish "
42         echo "to pass any to it, please specify them on the $0 command line."
43 fi
44
45 case $CC in
46 *xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
47 esac
48
49 if test -z "$ACLOCAL_FLAGS"; then
50
51         acdir=`aclocal --print-ac-dir`
52         m4list="glib.m4 gettext.m4"
53
54         for file in $m4list
55         do
56                 if [ ! -f "$acdir/$file" ]; then
57                         echo "WARNING: aclocal's directory is $acdir, but..."
58                         echo "         no file $acdir/$file"
59                         echo "         You may see fatal macro warnings below."
60                         echo "         If these files are installed in /some/dir, set the ACLOCAL_FLAGS "
61                         echo "         environment variable to \"-I /some/dir\", or install"
62                         echo "         $acdir/$file."
63                         echo ""
64                 fi
65         done
66 fi
67
68 echo "Running gettextize...  Ignore non-fatal messages."
69 # Hmm, we specify --force here, since otherwise things dont'
70 # get added reliably, but we don't want to overwrite intl
71 # while making dist.
72 echo "no" | gettextize --copy --force
73
74 #
75 # Really bad hack
76 echo "Munging po/Makefile.in.in"
77 sed s%@PACKAGE@%@GETTEXT_PACKAGE@% < po/Makefile.in.in > po/Makefile.in.in.new
78 mv po/Makefile.in.in.new po/Makefile.in.in
79
80 aclocal $ACLOCAL_FLAGS
81
82 # optionally feature autoheader
83 (autoheader --version)  < /dev/null > /dev/null 2>&1 && autoheader
84
85 automake -a $am_opt
86 autoconf
87 cd $ORIGDIR
88
89 $srcdir/configure --enable-maintainer-mode "$@"
90
91 echo 
92 echo "Now type 'make' to compile $PROJECT."