[mono/mono] 1ba34557: [build]Enable passing arguments to the extension module.

"Rodrigo Kumpera ([email protected])" <[email protected]> Mon, 4 Nov 2013 16:14:00 +0000
Newsgroups gmane.comp.gnome.mono.patches
Message-ID <0000014223e4667f-9ab7520c-d0a4-4d73-a67a-2ce5d4d3e717-000000@email.amazonses.com>
   Branch: refs/heads/master
     Home: https://github.com/mono/mono
  Compare: https://github.com/mono/mono/compare/9eda1b444b0f...1ba345570fd7

   Commit: 1ba345570fd761c9afb18b1130991f394846ba69
   Author: Rodrigo Kumpera <[email protected]> (kumpera)
     Date: 2013-11-04 16:04:53 GMT
      URL: https://github.com/mono/mono/commit/1ba345570fd761c9afb18b1130991f394846ba69

[build]Enable passing arguments to the extension module.

The build argument --enable-extension-module now takes a comma separated list
of arguments that are passed down. Passing no arguments triggers the old behavior.

Changed paths:
  M autogen.sh
  M configure.in

Modified: autogen.sh
===================================================================
@@ -107,15 +107,19 @@ fi
 # Plug in the extension module
 #
 has_ext_mod=false
+ext_mod_args=''
 for PARAM; do
-    if test "$PARAM" = "--enable-extension-module" ; then
-		has_ext_mod=true
-	fi
+    if [[ $PARAM =~ "--enable-extension-module" ]] ; then
+        has_ext_mod=true
+        if [[ $PARAM =~ "=" ]] ; then
+            ext_mod_args=`echo $PARAM | cut -d= -f2`
+        fi
+    fi
 done
 
 if test x$has_ext_mod = xtrue; then
 	pushd ../mono-extensions/scripts
-	sh ./prepare-repo.sh || exit 1
+	sh ./prepare-repo.sh $ext_mod_args || exit 1
 	popd
 else
 	cat mono/mini/Makefile.am.in > mono/mini/Makefile.am

Modified: configure.in
===================================================================
@@ -931,7 +931,19 @@ fi
 AC_ARG_ENABLE(executables, [  --disable-executables disable the build of the runtime executables], enable_executables=$enableval, enable_executables=yes)
 AM_CONDITIONAL(DISABLE_EXECUTABLES, test x$enable_executables = xno)
 
-AC_ARG_ENABLE(extension-module, [  --enable-extension-module enables usage of the extension module], has_extension_module=$enableval, has_extension_module=no)
+has_extension_module=no
+AC_ARG_ENABLE(extension-module, [  --enable-extension-module=LIST enable the core-extensions from LIST],
+[
+	for extension in `echo "$enable_extension_module" | sed -e "s/,/ /g"`; do
+		if test x$extension = xdefault ; then
+			has_extension_module=yes;
+		fi
+	done
+	if test x$enable_extension_module = xyes; then
+		has_extension_module=yes;
+	fi
+], [])
+
 AM_CONDITIONAL([HAS_EXTENSION_MODULE], [test x$has_extension_module != xno])
 
 if test x$has_extension_module != xno ; then


_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches