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)
+AM_CONDITIONAL([HAS_EXTENSION_MODULE], [test x$has_extension_module != xno])
+
+if test x$has_extension_module != xno ; then
+ AC_DEFINE([ENABLE_EXTENSION_MODULE], 1, [Extension module enabled])
+ AC_MSG_NOTICE([Enabling mono extension module.])
+fi
+
+
AC_MSG_CHECKING(for visibility __attribute__)
AC_COMPILE_IFELSE([
AC_LANG_SOURCE([[
echo "MOONLIGHT = 1" >> $srcdir/$mcsdir/build/config.make
fi
+ if test x$has_extension_module != xno; then
+ echo "EXTENSION_MODULE = 1" >> $srcdir/$mcsdir/build/config.make
+ fi
+
default_profile=net_2_0
if test -z "$INSTALL_4_0_TRUE"; then :
default_profile=net_4_0
outfile=$1
incfile=$2
excfile=$3
+extfile=$4
process_includes_1() {
sed -e '/^[ \t]*$/d' -e '/^[ \t]*#/d' $1 > $2
process_includes $incfile $outfile.inc
+if test x$extfile != x -a -f $extfile; then
+ cat $extfile >> $outfile.inc
+fi
+
sort -u $outfile.inc > $outfile.inc_s
rm -f $outfile.inc
sourcefile = $(depsdir)/$(PROFILE)_$(LIBRARY).sources
library_CLEAN_FILES += $(sourcefile)
+ifdef EXTENSION_MODULE
+EXTENSION_include=$(topdir)/../../mono-extensions/mcs/$(thisdir)/$(PROFILE)_$(LIBRARY).sources
+endif
+
# Note, gensources.sh can create a $(sourcefile).makefrag if it sees any '#include's
# We don't include it in the dependencies since it isn't always created
$(sourcefile): $(PROFILE_sources) $(PROFILE_excludes) $(topdir)/build/gensources.sh
@echo Creating the per profile list $@ ...
- $(SHELL) $(topdir)/build/gensources.sh $@ $(PROFILE_sources) $(PROFILE_excludes)
+ $(SHELL) $(topdir)/build/gensources.sh $@ '$(PROFILE_sources)' '$(PROFILE_excludes)' '$(EXTENSION_include)'
endif
PLATFORM_excludes := $(wildcard $(LIBRARY).$(PLATFORM)-excludes)