scintilla: Get type names for highlighting using async functions
[anjuta-extras.git] / autogen.sh
blobb9ac147c8a10726b88ad02342396d8584bef047a
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
4 CONFIGURE=configure.ac
6 : ${AUTOCONF=autoconf}
7 : ${AUTOHEADER=autoheader}
8 : ${AUTOMAKE=automake-1.9}
9 : ${ACLOCAL=aclocal-1.9}
10 : ${INTLTOOLIZE=intltoolize}
11 : ${LIBTOOLIZE=libtoolize}
12 : ${GTKDOCIZE=gtkdocize}
15 # Nothing should need changing below.
18 srcdir=`dirname $0`
19 test -z "$srcdir" && srcdir=.
21 ORIGDIR=`pwd`
22 cd $srcdir
24 DIE=0
26 ($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
27 echo
28 echo "You must have autoconf installed to compile this project."
29 echo "Download the appropriate package for your distribution,"
30 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
31 DIE=1
34 (grep "^IT_PROG_INTLTOOL" $srcdir/$CONFIGURE >/dev/null) && {
35 ($INTLTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
36 echo
37 echo "You must have intltoolize installed to compile this project."
38 echo "Get ftp://ftp.gnome.org/pub/GNOME/stable/sources/intltool/intltool-0.35.tar.gz"
39 echo "(or a newer version if it is available)"
40 DIE=1
44 # Check if gtk-doc is explicitly disabled.
45 for option in $AUTOGEN_CONFIGURE_ARGS $@
47 case $option in
48 -disable-gtk-doc | --disable-gtk-doc)
49 enable_gtk_doc=no
51 esac
52 done
54 if test x$enable_gtk_doc != xno; then
55 echo "Checking for gtkdocize ... "
56 if grep "^GTK_DOC_CHECK" $CONFIGURE > /dev/null; then
57 if !($GTKDOCIZE --version) < /dev/null > /dev/null 2>&1; then
58 echo
59 echo " You must have gtk-doc installed to compile this project."
60 echo " Install the appropriate package for your distribution,"
61 echo " or get the source tarball at"
62 echo " http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
63 echo " You can also use the option --disable-gtk-doc to skip"
64 echo " this test but then you will not be able to generate a"
65 echo " configure script that can build the API documentation."
66 DIE=1
71 ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
72 echo
73 echo "You must have automake installed to compile this project."
74 echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.9.tar.gz"
75 echo "(or a newer version if it is available)"
76 DIE=1
79 ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || {
80 echo
81 echo "You must have libtool installed to compile this project."
82 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.5.22.tar.gz"
83 echo "(or a newer version if it is available)"
84 DIE=1
87 if grep "^AM_[A-Z0-9_]\{1,\}_GETTEXT" "$CONFIGURE" >/dev/null; then
88 if grep "sed.*POTFILES" "$CONFIGURE" >/dev/null; then
89 GETTEXTIZE=""
90 else
91 if grep "^AM_GLIB_GNU_GETTEXT" "$CONFIGURE" >/dev/null; then
92 GETTEXTIZE="glib-gettextize"
93 GETTEXTIZE_URL="ftp://ftp.gtk.org/pub/gtk/v2.0/glib-2.0.0.tar.gz"
94 else
95 GETTEXTIZE="gettextize"
96 GETTEXTIZE_URL="ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
99 $GETTEXTIZE --version < /dev/null > /dev/null 2>&1
100 if test $? -ne 0; then
101 echo
102 echo "You must have $GETTEXTIZE installed to compile this project."
103 echo "Get $GETTEXTIZE_URL"
104 echo "(or a newer version if it is available)"
105 DIE=1
110 if test "$DIE" -eq 1; then
111 exit 1
114 test -f $CONFIGURE || {
115 echo "You must run this script in the top-level this project directory"
116 exit 1
119 rm -rf autom4te.cache
121 do_cmd() {
122 echo "Running '$@'"
123 $@ || exit $?
126 do_cmd $ACLOCAL $ACLOCAL_FLAGS
128 if grep "^IT_PROG_INTLTOOL" $CONFIGURE >/dev/null; then
129 do_cmd $INTLTOOLIZE --copy --force --automake
132 do_cmd $LIBTOOLIZE --copy --force --automake
134 if grep "^GTK_DOC_CHECK" $CONFIGURE > /dev/null; then
135 if test x$enable_gtk_doc = xno; then
136 echo "WARNING: You have disabled gtk-doc."
137 echo " As a result, you will not be able to generate the API"
138 echo " documentation and 'make dist' will not work."
139 echo
140 else
141 do_cmd $GTKDOCIZE --copy --flavour no-tmpl --docdir build
145 do_cmd $AUTOHEADER
147 do_cmd $AUTOMAKE --add-missing -Wall
149 do_cmd $AUTOCONF
151 cd $ORIGDIR || exit $?
153 if test x$NOCONFIGURE = x; then
154 echo "Running '$srcdir/configure $@'"
155 $srcdir/configure "$@" && echo "Now type 'make' to compile." || exit 1
156 else
157 echo Skipping configure process.