2 # Run this to generate all the initial makefiles, etc.
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.
19 test -z "$srcdir" && srcdir
=.
26 ($AUTOCONF --version) < /dev
/null
> /dev
/null
2>&1 ||
{
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/"
34 (grep "^IT_PROG_INTLTOOL" $srcdir/$CONFIGURE >/dev
/null
) && {
35 ($INTLTOOLIZE --version) < /dev
/null
> /dev
/null
2>&1 ||
{
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)"
44 # Check if gtk-doc is explicitly disabled.
45 for option
in $AUTOGEN_CONFIGURE_ARGS $@
48 -disable-gtk-doc |
--disable-gtk-doc)
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
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."
71 ($AUTOMAKE --version) < /dev
/null
> /dev
/null
2>&1 ||
{
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)"
79 ($LIBTOOLIZE --version) < /dev
/null
> /dev
/null
2>&1 ||
{
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)"
87 if grep "^AM_[A-Z0-9_]\{1,\}_GETTEXT" "$CONFIGURE" >/dev
/null
; then
88 if grep "sed.*POTFILES" "$CONFIGURE" >/dev
/null
; then
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"
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
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)"
110 if test "$DIE" -eq 1; then
114 test -f $CONFIGURE ||
{
115 echo "You must run this script in the top-level this project directory"
119 rm -rf autom4te.cache
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."
141 do_cmd
$GTKDOCIZE --copy --flavour no-tmpl
--docdir build
147 do_cmd
$AUTOMAKE --add-missing -Wall
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
157 echo Skipping configure process.