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."
79 am_opt=--include-deps;;
83 if grep "^AC_PROG_LIBTOOL" configure.ac >/dev/null; then
84 if test -z "$NO_LIBTOOLIZE" ; then
85 echo "Running libtoolize..."
86 $LIBTOOLIZE --force --copy
90 ACLOCAL_FLAGS="$ACLOCAL_FLAGS -Wnone"
91 echo "Running aclocal $ACLOCAL_FLAGS ..."
92 aclocal $ACLOCAL_FLAGS || {
94 echo "**Error**: aclocal failed. This may mean that you have not"
95 echo "installed all of the packages you need, or you may need to"
96 echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
97 echo "for the prefix where you installed the packages whose"
98 echo "macros were not found"
102 if grep "^AC_CONFIG_HEADERS" configure.ac >/dev/null; then
103 echo "Running autoheader..."
104 autoheader || { echo "**Error**: autoheader failed."; exit 1; }
107 echo "Running automake --gnu $am_opt ..."
108 automake --add-missing --gnu -Wno-obsolete $am_opt ||
109 { echo "**Error**: automake failed."; exit 1; }
110 echo "Running autoconf ..."
111 autoconf || { echo "**Error**: autoconf failed."; exit 1; }
114 conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
116 if test x$NOCONFIGURE = x; then
117 echo Running $srcdir/configure $conf_flags "$@" ...
118 $srcdir/configure $conf_flags "$@" \
119 && echo Now type \`make\' to compile
$PKG_NAME ||
exit 1
121 echo Skipping configure process.