diff options
author | Petr Mladek <pmladek@suse.cz> | 2012-05-03 14:48:23 +0200 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2012-10-13 12:24:29 +0200 |
commit | a300017101d66971d83065d4e95f6b1a47fe99fb (patch) | |
tree | d98908bf4d04995842d1223abaa206ca276acf99 /configure.in | |
parent | f6f3443d96146fa68468a8c2bf630f05bc656f61 (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
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 83 |
1 files changed, 81 insertions, 2 deletions
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 =================================================================== |