2 # Run this to generate all the initial makefiles, etc.
3 # Ripped off from GNOME macros version
8 test -z "$srcdir" && srcdir
=.
10 (autoconf
--version) < /dev
/null
> /dev
/null
2>&1 ||
{
12 echo "**Error**: You must have \`autoconf' installed to compile Mono."
13 echo "Download the appropriate package for your distribution,"
14 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
18 if [ -z "$LIBTOOLIZE" ]; then
19 LIBTOOLIZE
=`which glibtoolize 2>/dev/null`
20 if [ ! -x "$LIBTOOLIZE" ]; then
21 LIBTOOLIZE
=`which libtoolize`
25 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac
>/dev
/null
) && {
26 ($LIBTOOLIZE --version) < /dev
/null
> /dev
/null
2>&1 ||
{
28 echo "**Error**: You must have \`libtoolize' installed to compile Mono."
29 echo "Get ftp://ftp.gnu.org/gnu/libtool/libtool-1.2.tar.gz"
30 echo "(or a newer version if it is available)"
35 grep "^AM_GNU_GETTEXT" $srcdir/configure.ac
>/dev
/null
&& {
36 grep "sed.*POTFILES" $srcdir/configure.ac
>/dev
/null || \
37 (gettext --version) < /dev
/null
> /dev
/null
2>&1 ||
{
39 echo "**Error**: You must have \`gettext' installed to compile Mono."
40 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
41 echo "(or a newer version if it is available)"
46 (automake
--version) < /dev
/null
> /dev
/null
2>&1 ||
{
48 echo "**Error**: You must have \`automake' installed to compile Mono."
49 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
50 echo "(or a newer version if it is available)"
56 # if no automake, don't bother testing for aclocal
57 test -n "$NO_AUTOMAKE" ||
(aclocal
--version) < /dev
/null
> /dev
/null
2>&1 ||
{
59 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
60 echo "installed doesn't appear recent enough."
61 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
62 echo "(or a newer version if it is available)"
66 if test "$DIE" -eq 1; then
70 if test x
$NOCONFIGURE = x
&& test -z "$*"; then
71 echo "**Warning**: I am going to run \`configure' with no arguments."
72 echo "If you wish to pass any to it, please specify them on the"
73 echo \
`$0\'" command line."
77 am_opt="--add-missing --copy --gnu -Wno-obsolete"
81 am_opt="$am_opt --include-deps";;
84 if grep "^AC_PROG_LIBTOOL" configure.ac >/dev/null; then
85 if test -z "$NO_LIBTOOLIZE" ; then
86 echo "Running libtoolize..."
87 $LIBTOOLIZE --force --copy
91 ACLOCAL_FLAGS="$ACLOCAL_FLAGS -Wnone"
92 echo "Running aclocal $ACLOCAL_FLAGS ..."
93 aclocal $ACLOCAL_FLAGS || {
95 echo "**Error**: aclocal failed. This may mean that you have not"
96 echo "installed all of the packages you need, or you may need to"
97 echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
98 echo "for the prefix where you installed the packages whose"
99 echo "macros were not found"
103 if grep "^AC_CONFIG_HEADERS" configure.ac >/dev/null; then
104 echo "Running autoheader..."
105 autoheader || { echo "**Error**: autoheader failed."; exit 1; }
108 echo "Running automake $am_opt ..."
110 { echo "**Error**: automake failed."; exit 1; }
111 echo "Running autoconf ..."
112 autoconf || { echo "**Error**: autoconf failed."; exit 1; }
115 conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
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
$PKG_NAME ||
exit 1
122 echo Skipping configure process.