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;;
81 for coin in `find $srcdir -name configure.in -print`
84 if test -f $dr/NO-AUTO-GEN; then
85 echo skipping $dr -- flagged as no auto-gen
88 macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
90 macrosdir=`find . -name macros -print`
91 if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
92 if grep "sed.*POTFILES" configure.in >/dev/null; then
93 : do nothing -- we still have an old unmodified configure.in
95 echo "Creating $dr/aclocal.m4 ..."
96 test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
97 echo "Running gettextize... Ignore non-fatal messages."
98 echo "no" | gettextize --force --copy
99 echo "Making $dr/aclocal.m4 writable ..."
100 test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
103 if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
104 if test -z "$NO_LIBTOOLIZE" ; then
105 echo "Running libtoolize..."
106 libtoolize --force --copy
109 echo "Running aclocal $aclocalinclude ..."
110 aclocal $aclocalinclude || {
112 echo "**Error**: aclocal failed. This may mean that you have not"
113 echo "installed all of the packages you need, or you may need to"
114 echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
115 echo "for the prefix where you installed the packages whose"
116 echo "macros were not found"
120 if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
121 echo "Running autoheader..."
122 autoheader || { echo "**Error**: autoheader failed."; exit 1; }
124 echo "Running automake --gnu $am_opt ..."
125 automake --add-missing --gnu $am_opt ||
126 { echo "**Error**: automake failed."; exit 1; }
127 echo "Running autoconf ..."
128 autoconf || { echo "**Error**: autoconf failed."; exit 1; }
133 conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
135 if test x$NOCONFIGURE = x; then
136 echo Running $srcdir/configure $conf_flags "$@" ...
137 $srcdir/configure $conf_flags "$@" \
138 && echo Now type \`make\' to compile $PKG_NAME || exit 1
140 echo Skipping configure process.