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 # from -> /mono/lib:/another/mono/lib
12 # to -> /mono /another/mono
13 for i
in `echo ${MONO_PATH} | tr ":" " "`; do
15 if [ -n "{i}" -a -d "${i}/share/aclocal" ]; then
16 ACLOCAL_FLAGS
="-I ${i}/share/aclocal $ACLOCAL_FLAGS"
18 if [ -n "{i}" -a -d "${i}/bin" ]; then
25 ACLOCAL_FLAGS
="-I m4 $ACLOCAL_FLAGS"
27 (autoconf
--version) < /dev
/null
> /dev
/null
2>&1 ||
{
29 echo "**Error**: You must have \`autoconf' installed to compile Mono."
30 echo "Download the appropriate package for your distribution,"
31 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
35 if [ -z "$LIBTOOL" ]; then
36 LIBTOOL
=`which glibtool 2>/dev/null`
37 if [ ! -x "$LIBTOOL" ]; then
38 LIBTOOL
=`which libtool`
42 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac
>/dev
/null
) && {
43 ($LIBTOOL --version) < /dev
/null
> /dev
/null
2>&1 ||
{
45 echo "**Error**: You must have \`libtool' installed to compile Mono."
46 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
47 echo "(or a newer version if it is available)"
52 grep "^AM_GNU_GETTEXT" $srcdir/configure.ac
>/dev
/null
&& {
53 grep "sed.*POTFILES" $srcdir/configure.ac
>/dev
/null || \
54 (gettext --version) < /dev
/null
> /dev
/null
2>&1 ||
{
56 echo "**Error**: You must have \`gettext' installed to compile Mono."
57 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
58 echo "(or a newer version if it is available)"
63 (automake
--version) < /dev
/null
> /dev
/null
2>&1 ||
{
65 echo "**Error**: You must have \`automake' installed to compile Mono."
66 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
67 echo "(or a newer version if it is available)"
73 # if no automake, don't bother testing for aclocal
74 test -n "$NO_AUTOMAKE" ||
(aclocal
--version) < /dev
/null
> /dev
/null
2>&1 ||
{
76 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
77 echo "installed doesn't appear recent enough."
78 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
79 echo "(or a newer version if it is available)"
83 if test "$DIE" -eq 1; then
88 echo "**Warning**: I am going to run \`configure' with no arguments."
89 echo "If you wish to pass any to it, please specify them on the"
90 echo \
`$0\'" command line."
96 am_opt=--include-deps;;
100 if grep "^AC_PROG_LIBTOOL" configure.ac >/dev/null; then
101 if test -z "$NO_LIBTOOLIZE" ; then
102 echo "Running libtoolize..."
103 ${LIBTOOL}ize --force --copy
107 echo "Running aclocal $ACLOCAL_FLAGS ..."
108 aclocal $ACLOCAL_FLAGS || {
110 echo "**Error**: aclocal failed. This may mean that you have not"
111 echo "installed all of the packages you need, or you may need to"
112 echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
113 echo "for the prefix where you installed the packages whose"
114 echo "macros were not found"
118 if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
119 echo "Running autoheader..."
120 autoheader || { echo "**Error**: autoheader failed."; exit 1; }
123 echo "Running automake --gnu $am_opt ..."
124 automake --add-missing --gnu $am_opt ||
125 { echo "**Error**: automake failed."; exit 1; }
126 echo "Running autoconf ..."
127 autoconf || { echo "**Error**: autoconf failed."; exit 1; }
129 if test -d $srcdir/libgc; then
130 echo Running libgc/autogen.sh ...
131 (cd $srcdir/libgc ; NOCONFIGURE=1 ./autogen.sh "$@")
132 echo Done running libgc/autogen.sh ...
135 if test -d $srcdir/pixman; then
136 echo Running pixman/autogen.sh ...
137 (cd $srcdir/pixman ; ./autogen.sh "$@")
138 echo Done running pixman/autogen.sh ...
141 if test -d $srcdir/cairo; then
142 echo Running cairo/autogen.sh ...
143 (cd $srcdir/cairo ; ./autogen.sh "$@")
144 echo Done running cairo/autogen.sh ...
147 conf_flags="--enable-maintainer-mode --enable-compile-warnings --with-sanity-checks" #--enable-iso-c
149 if test x$NOCONFIGURE = x; then
150 echo Running $srcdir/configure $conf_flags "$@" ...
151 $srcdir/configure $conf_flags "$@" \
152 && echo Now type \`make\' to compile
$PKG_NAME ||
exit 1
154 echo Skipping configure process.