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 (autoconf
--version) < /dev
/null
> /dev
/null
2>&1 ||
{
27 echo "**Error**: You must have \`autoconf' installed to compile Mono."
28 echo "Download the appropriate package for your distribution,"
29 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
33 if [ -z "$LIBTOOL" ]; then
34 LIBTOOL
=`which glibtool 2>/dev/null`
35 if [ ! -x "$LIBTOOL" ]; then
36 LIBTOOL
=`which libtool`
40 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac
>/dev
/null
) && {
41 ($LIBTOOL --version) < /dev
/null
> /dev
/null
2>&1 ||
{
43 echo "**Error**: You must have \`libtool' installed to compile Mono."
44 echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
45 echo "(or a newer version if it is available)"
50 grep "^AM_GNU_GETTEXT" $srcdir/configure.ac
>/dev
/null
&& {
51 grep "sed.*POTFILES" $srcdir/configure.ac
>/dev
/null || \
52 (gettext --version) < /dev
/null
> /dev
/null
2>&1 ||
{
54 echo "**Error**: You must have \`gettext' installed to compile Mono."
55 echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
56 echo "(or a newer version if it is available)"
61 (automake
--version) < /dev
/null
> /dev
/null
2>&1 ||
{
63 echo "**Error**: You must have \`automake' installed to compile Mono."
64 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
65 echo "(or a newer version if it is available)"
71 # if no automake, don't bother testing for aclocal
72 test -n "$NO_AUTOMAKE" ||
(aclocal
--version) < /dev
/null
> /dev
/null
2>&1 ||
{
74 echo "**Error**: Missing \`aclocal'. The version of \`automake'"
75 echo "installed doesn't appear recent enough."
76 echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
77 echo "(or a newer version if it is available)"
81 if test "$DIE" -eq 1; then
85 if test x
$NOCONFIGURE = x
&& test -z "$*"; then
86 echo "**Warning**: I am going to run \`configure' with no arguments."
87 echo "If you wish to pass any to it, please specify them on the"
88 echo \
`$0\'" command line."
94 am_opt=--include-deps;;
98 if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
99 if test -z "$NO_LIBTOOLIZE" ; then
100 echo "Running libtoolize..."
101 ${LIBTOOL}ize --force --copy
107 # Plug in the extension module
112 if [[ $PARAM =~ "--enable-extension-module" ]] ; then
114 if [[ $PARAM =~ "=" ]] ; then
115 ext_mod_args=`echo $PARAM | cut
-d= -f2`
120 if test x$has_ext_mod = xtrue; then
121 pushd ../mono-extensions/scripts
122 sh ./prepare-repo.sh $ext_mod_args || exit 1
125 cat mono/mini/Makefile.am.in > mono/mini/Makefile.am
126 cat mono/metadata/Makefile.am.in > mono/metadata/Makefile.am
130 echo "Running aclocal -I m4 -I . $ACLOCAL_FLAGS ..."
131 aclocal -Wnone -I m4 -I . $ACLOCAL_FLAGS || {
133 echo "**Error**: aclocal failed. This may mean that you have not"
134 echo "installed all of the packages you need, or you may need to"
135 echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
136 echo "for the prefix where you installed the packages whose"
137 echo "macros were not found"
141 if grep "^AC_CONFIG_HEADERS" configure.ac >/dev/null; then
142 echo "Running autoheader..."
143 autoheader || { echo "**Error**: autoheader failed."; exit 1; }
146 echo "Running automake --gnu $am_opt ..."
147 automake --add-missing --gnu -Wno-portability -Wno-obsolete $am_opt ||
148 { echo "**Error**: automake failed."; exit 1; }
149 echo "Running autoconf ..."
150 autoconf || { echo "**Error**: autoconf failed."; exit 1; }
152 if test -d $srcdir/libgc; then
153 echo Running libgc/autogen.sh ...
154 (cd $srcdir/libgc ; NOCONFIGURE=1 ./autogen.sh "$@")
155 echo Done running libgc/autogen.sh ...
158 if test -d $srcdir/eglib; then
159 echo Running eglib/autogen.sh ...
160 (cd $srcdir/eglib ; NOCONFIGURE=1 ./autogen.sh "$@")
161 echo Done running eglib/autogen.sh ...
165 conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
167 if test x$NOCONFIGURE = x; then
168 echo Running $srcdir/configure $conf_flags "$@" ...
169 $srcdir/configure $conf_flags "$@" \
170 && echo Now type \`make\' to compile
$PKG_NAME ||
exit 1
172 echo Skipping configure process.