Fixed eglib compiler warnings about g_string_truncate() and g_iconv()
[mono.git] / autogen.sh
index fc2550142b22042cd4099212b2e3cea7a3e1f5d1..8fc51d24df070776c14a3ba73fd310cba639610a 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/usr/bin/env bash
 # Run this to generate all the initial makefiles, etc.
 # Ripped off from GNOME macros version
 
@@ -108,15 +108,18 @@ fi
 #
 has_ext_mod=false
 for PARAM; do
-    if test $PARAM = "--enable-extension-module" ; then
+    if test "$PARAM" = "--enable-extension-module" ; then
                has_ext_mod=true
        fi
 done
 
 if test x$has_ext_mod = xtrue; then
-       cat mono/mini/Makefile.am.in ../mono-extensions/mono/mini/Makefile.am > mono/mini/Makefile.am
+       pushd ../mono-extensions/scripts
+       sh ./prepare-repo.sh || exit 1
+       popd
 else
        cat mono/mini/Makefile.am.in > mono/mini/Makefile.am
+       cat mono/metadata/Makefile.am.in > mono/metadata/Makefile.am
 fi
 
 
@@ -131,7 +134,7 @@ aclocal -Wnone -I m4 -I . $ACLOCAL_FLAGS || {
   exit 1
 }
 
-if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
+if grep "^AC_CONFIG_HEADERS" configure.in >/dev/null; then
   echo "Running autoheader..."
   autoheader || { echo "**Error**: autoheader failed."; exit 1; }
 fi