2 # Run this to generate all the initial makefiles, etc.
3 # Ripped off from GNOME macros version
8 test -z "$srcdir" && srcdir=.
10 if [ -n "$MONO_PATH" ]; then
11 ACLOCAL_FLAGS="-I $MONO_PATH/share/aclocal $ACLOCAL_FLAGS"
12 PATH="$MONO_PATH/bin:$PATH"
16 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
18 echo "**Error**: You must have \`autoconf' installed to compile Mono."
19 echo "Download the appropriate package for your distribution,"
20 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
24 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
25 (libtool --version) < /dev/null > /dev/null 2>&1 || {
27 echo "**Error**: You must have \`libtool' installed to compile Mono."
28 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
29 echo "(or a newer version if it is available)"
34 grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
35 grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
36 (gettext --version) < /dev/null > /dev/null 2>&1 || {
38 echo "**Error**: You must have \`gettext' installed to compile Mono."
39 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
40 echo "(or a newer version if it is available)"
45 (automake --version) < /dev/null > /dev/null 2>&1 || {
47 echo "**Error**: You must have \`automake' installed to compile Mono."
48 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
49 echo "(or a newer version if it is available)"
55 # if no automake, don't bother testing for aclocal
56 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
58 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
59 echo "installed doesn't appear recent enough."
60 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
61 echo "(or a newer version if it is available)"
65 if test "$DIE" -eq 1; then
70 echo "**Warning**: I am going to run \`configure' with no arguments."
71 echo "If you wish to pass any to it, please specify them on the"
72 echo \`$0\'" command line."
78 am_opt=--include-deps;;
82 if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
83 if test -z "$NO_LIBTOOLIZE" ; then
84 echo "Running libtoolize..."
85 libtoolize --force --copy
89 echo "Running aclocal $ACLOCAL_FLAGS ..."
90 aclocal $ACLOCAL_FLAGS || {
92 echo "**Error**: aclocal failed. This may mean that you have not"
93 echo "installed all of the packages you need, or you may need to"
94 echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
95 echo "for the prefix where you installed the packages whose"
96 echo "macros were not found"
100 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
101 echo "Running autoheader..."
102 autoheader || { echo "**Error**: autoheader failed."; exit 1; }
105 echo "Running automake --gnu $am_opt ..."
106 automake --add-missing --gnu $am_opt ||
107 { echo "**Error**: automake failed."; exit 1; }
108 echo "Running autoconf ..."
109 autoconf || { echo "**Error**: autoconf failed."; exit 1; }
112 conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
114 if test x$NOCONFIGURE = x; then
115 echo Running $srcdir/configure $conf_flags "$@" ...
116 $srcdir/configure $conf_flags "$@" \
117 && echo Now type \`make\' to compile $PKG_NAME || exit 1
119 echo Skipping configure process.