2 # Run this to generate all the initial makefiles, etc.
5 test -z "$srcdir" && srcdir=.
9 (test -f $srcdir/configure.ac) || {
10 echo -n "**Error**: Directory $srcdir does not look like the"
11 echo " top-level package directory"
20 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
22 echo "**Error**: You must have autoconf installed."
23 echo "Download the appropriate package for your distribution,"
24 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
28 (grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null) && {
29 (libtoolize --version) < /dev/null > /dev/null 2>&1 || {
31 echo "**Error**: You must have libtool installed."
32 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
37 (gtkdocize --flavour no-tmpl) < /dev/null > /dev/null 2>&1 || {
39 echo "You must have gtk-doc installed to compile $PROJECT."
40 echo "Install the appropriate package for your distribution,"
41 echo "or get the source tarball at http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
45 (automake --version) < /dev/null > /dev/null 2>&1 || {
47 echo "**Error**: You must have automake installed."
48 echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
54 # if no automake, don't bother testing for aclocal
55 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
57 echo "**Error**: Missing aclocal. The version of automake"
58 echo "installed doesn't appear recent enough."
59 echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
64 # if no automake, don't bother testing for autoreconf
65 test -n "$NO_AUTOMAKE" || (autoreconf --version) < /dev/null > /dev/null 2>&1 || {
67 echo "**Error**: You must have autoreconf installed."
68 echo "You can get autoreconf from ..."
73 if test "$DIE" -eq 1; then
78 echo "**Warning**: I am going to run configure with no arguments."
79 echo "If you wish to pass any to it, please specify them on the"
80 echo $0 " command line."
86 am_opt=--include-deps;;
89 aclocalinclude="$ACLOCAL_FLAGS"
91 echo "Running autoreconf on test/mocklibc ..."
92 (cd "test/mocklibc"; autoreconf --install)
94 if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
95 if test -z "$NO_LIBTOOLIZE" ; then
96 echo "Running libtoolize..."
97 libtoolize --force --copy
100 echo "Running aclocal $aclocalinclude ..."
101 aclocal $aclocalinclude
102 if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
103 echo "Running autoheader..."
106 echo "Running automake --gnu -Wno-portability $am_opt ..."
107 automake --add-missing --gnu -Wno-portability $am_opt
108 echo "Running autoconf ..."
111 intltoolize --copy --force --automake || exit 1
115 conf_flags="--enable-maintainer-mode --enable-gtk-doc"
117 if test x$NOCONFIGURE = x; then
118 echo "Running $srcdir/configure $conf_flags $@ ..."
119 $srcdir/configure $conf_flags "$@" \
120 && echo "Now type make to compile." || exit 1
122 echo "Skipping configure process."