summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.cz>2012-05-03 14:48:23 +0200
committerAndras Timar <atimar@suse.com>2012-10-13 12:24:29 +0200
commita300017101d66971d83065d4e95f6b1a47fe99fb (patch)
treed98908bf4d04995842d1223abaa206ca276acf99
parentf6f3443d96146fa68468a8c2bf630f05bc656f61 (diff)
[mono] mono-build.diff: add mono support
integreated with mono-climaker-config.diff and allow building with mono-2 Conflicts: configure.in set_soenv.in Change-Id: If119de1df872fd3fd9ba460e961724b6182b3899
-rw-r--r--config_host.mk.in11
-rw-r--r--configure.in83
2 files changed, 91 insertions, 3 deletions
diff --git a/config_host.mk.in b/config_host.mk.in
index 96635db978f0..38ae226742b6 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -5,6 +5,7 @@
export SRC_ROOT=@SRC_ROOT@
export ABOUT_BACKGROUND_SVG=@ABOUT_BACKGROUND_SVG@
+export AL=@AL@
export ALIGNOF_DOUBLE=@ALIGNOF_DOUBLE@
export ALIGNOF_INT=@ALIGNOF_INT@
export ALIGNOF_LONG=@ALIGNOF_LONG@
@@ -64,6 +65,8 @@ export CPUNAME=@CPUNAME@
export CPUNAME_FOR_BUILD=@CPUNAME_FOR_BUILD@
export CPU_FOR_BUILD=@CPU_FOR_BUILD@
export CROSS_COMPILING=@CROSS_COMPILING@
+export CSC=@CSC@
+export CSC_PATH=@CSC_PATH@
export CT2N_EXTENSION_PACK=@CT2N_EXTENSION_PACK@
export CURL_CFLAGS=@CURL_CFLAGS@
export CURL_LIBS=@CURL_LIBS@
@@ -127,6 +130,8 @@ export ENABLE_LOMENUBAR=@ENABLE_LOMENUBAR@
export ENABLE_LTO=@ENABLE_LTO@
export ENABLE_MEDIAWIKI=@ENABLE_MEDIAWIKI@
export ENABLE_MINIMIZER=@ENABLE_MINIMIZER@
+export ENABLE_MONO=@ENABLE_MONO@
+export ENABLE_MONO_CLIMAKER=@ENABLE_MONO_CLIMAKER@
export ENABLE_MYSQLC=@ENABLE_MYSQLC@
export ENABLE_NSPLUGIN=@ENABLE_NSPLUGIN@
export ENABLE_ONLINE_UPDATE=@ENABLE_ONLINE_UPDATE@
@@ -351,10 +356,14 @@ export MINGW_TASN1_DLL=@MINGW_TASN1_DLL@
export MINGW_ZLIB_DLL=@MINGW_ZLIB_DLL@
export MINIZIP_CFLAGS=@MINIZIP_CFLAGS@
export MINIZIP_LIBS=@MINIZIP_LIBS@
-export MKDEPENDSOLVER=TRUE
+export MKDEPENDSOLVTE=TRUE
+export MKBUNDLE=@MKBUNDLE@
export ML_EXE=@ML_EXE@
export MOC4=@MOC4@
export MOC=@MOC@
+export MONO_CFLAGS=@MONO_CFLAGS@
+export MONO_GAC_ROOT=@MONO_GAC_ROOT@
+export MONO_LIBS=@MONO_LIBS@
export MOZILLABUILD=@MOZILLABUILD@
export MOZILLA_HEADERS_CFLAGS=@MOZILLA_HEADERS_CFLAGS@
export MOZILLA_VERSION=@MOZILLA_VERSION@
diff --git a/configure.in b/configure.in
index 11e20a033254..4abaa21f86a7 100644
--- a/configure.in
+++ b/configure.in
@@ -976,6 +976,11 @@ AC_ARG_ENABLE(postgresql-sdbc,
[Disable the build of the PostgreSQL-SDBC driver.])
)
+AC_ARG_ENABLE(mono,
+ AS_HELP_STRING([--enable-mono],
+ [Enables the compilation of the Mono bindings]),
+,)
+
dnl ===================================================================
dnl Optional Packages (--with/without-)
dnl ===================================================================
@@ -4106,7 +4111,7 @@ dnl that to mean Visual Studio .NET 2003 ? And does this also
dnl in fact apply equally to what we actually support, i.e.
dnl Visual Studio 2008 and 2010?)
dnl ===================================================================
-if test "$build_os" = "cygwin"; then
+if test "$build_os" = "cygwin" ; then
dnl Check midl.exe
AC_PATH_PROG(MIDL_PATH, midl.exe)
if test -n "$MIDL_PATH";then
@@ -4162,6 +4167,7 @@ if test "$build_os" = "cygwin"; then
# Convert to posix path with 8.3 filename restrictions ( No spaces )
CSC_PATH=`cygpath -d "$CSC_PATH"`
CSC_PATH=`cygpath -u "$CSC_PATH"`
+ AL=al.exe
dnl Check mscoree.lib / .NET Framework dir
AC_MSG_CHECKING(.NET Framework)
@@ -4171,7 +4177,7 @@ if test "$build_os" = "cygwin"; then
if test -f "$with_dotnet_framework_home/lib/mscoree.lib"; then
DOTNET_FRAMEWORK_HOME="$with_dotnet_framework_home"
fi
- if test -z "$DOTNET_FRAMEWORK_HOME"; then
+ if test -z "$DOTNET_FRAMEWORK_HOME" ; then
frametest=`./oowintool --dotnetsdk-dir`
if test -f "$frametest/lib/mscoree.lib"; then
DOTNET_FRAMEWORK_HOME="$frametest"
@@ -4198,6 +4204,79 @@ if test "$build_os" = "cygwin"; then
fi
+if test "$_os" = "Linux"; then
+ AC_MSG_CHECKING([whether to enable Mono bindings])
+ CSC_PATH=
+ CSC=
+ ENABLE_MONO=NO
+ if test "$enable_mono" != "no" ; then
+ AC_MSG_RESULT([yes])
+ if test "z$with_csc_path" != "z"; then
+ if test -x "$with_csc_path/mcs"; then
+ CSC_PATH="$with_csc_path"
+ fi
+ if test -x "$with_csc_path/bin/mcs"; then
+ CSC_PATH="$with_csc_path/bin"
+ fi
+ fi
+ if test "z$CSC_PATH" = "z"; then
+ AC_PATH_PROG(MCS, mcs)
+ test -z "$MCS" || CSC_PATH=`dirname $MCS`
+ fi
+ AL="$CSC_PATH/al"
+ if test -x "$MCS" -a -x "$AL"; then
+ MCS_VERSION=`$MCS --version | cut -d" " -f5`
+ if test "`echo $MCS_VERSION | cut -d"." -f1`" -gt "1" || \
+ test "`echo $MCS_VERSION | cut -d"." -f1`" = "1" -a \
+ "`echo $MCS_VERSION | cut -d"." -f2`" -ge "2" || \
+ test "`echo $MCS_VERSION | cut -d"." -f1`" = "1" -a \
+ "`echo $MCS_VERSION | cut -d"." -f2`" = "1" -a \
+ "`echo $MCS_VERSION | cut -d"." -f3`" -ge "8"; then
+ ENABLE_MONO=YES
+ CSC=$MCS
+ AC_PATH_PROG(GMCS, gmcs, no)
+ AC_PATH_PROG(MKBUNDLE2, mkbundle2, no)
+ AC_PATH_PROG(MKBUNDLE, mkbundle, no)
+ if test "x$MKBUNDLE2" != "xno"; then
+ MKBUNDLE=$MKBUNDLE2
+ fi
+ GMCS_VERSION=`$GMCS --version | cut -d" " -f5`
+ if test "`echo $GMCS_VERSION | cut -d"." -f1`" -gt "1" || \
+ test "`echo $GMCS_VERSION | cut -d"." -f1`" = "1" -a \
+ "`echo $GMCS_VERSION | cut -d"." -f2`" -ge "3" || \
+ test "`echo $GMCS_VERSION | cut -d"." -f1`" = "1" -a \
+ "`echo $GMCS_VERSION | cut -d"." -f2`" = "2" -a \
+ "`echo $GMCS_VERSION | cut -d"." -f3`" -ge "3"; then
+ # mkbundle2 does not work on ppc, http://bugzilla.ximian.com/show_bug.cgi?id=81525
+ if test "`uname -m`" != "ppc" -a "`uname -m`" != "ppc64" ; then
+ ENABLE_MONO_CLIMAKER=YES
+ AC_MSG_NOTICE([mono is up-to-date enough - building mono climaker])
+ fi
+ fi
+ else
+ if test -n "$enable_mono" ; then
+ AC_MSG_ERROR([no, mcs >= 1.1.8 is needed.])
+ fi
+ fi
+ else
+ if test -n "$enable_mono"; then
+ AC_MSG_ERROR([mcs or al not found. Make sure they're in the path or use --with-csc-path])
+ fi
+ fi
+ PKG_CHECK_MODULES([MONO], [mono-2 glib-2.0],,[PKG_CHECK_MODULES([MONO], [mono >= 1.1.8 glib-2.0])])
+ else
+ AC_MSG_RESULT([no])
+ fi
+fi
+AC_SUBST(CSC_PATH)
+AC_SUBST(CSC)
+AC_SUBST(AL)
+AC_SUBST(ENABLE_MONO)
+AC_SUBST(MONO_CFLAGS)
+AC_SUBST(MONO_LIBS)
+AC_SUBST(ENABLE_MONO_CLIMAKER)
+AC_SUBST(MKBUNDLE)
+
dnl ===================================================================
dnl Check if stdc headers are available excluding MSVC.
dnl ===================================================================