merge 100015:100420
[mono.git] / configure.in
index 90d4bd1e235375de654d0fb4e615f720b77bebda..7af857a0b9e074ceb92b82d9ce4b11731854fc25 100644 (file)
@@ -6,7 +6,7 @@ AC_CANONICAL_SYSTEM
 m4_ifdef([_A][M_PROG_TAR],[_A][M_SET_OPTION([tar-ustar])])
 
 AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(mono,1.2.6)
+AM_INIT_AUTOMAKE(mono,1.9)
 AM_MAINTAINER_MODE
 
 API_VER=1.0
@@ -70,7 +70,8 @@ case "$host" in
                        export CC
                fi
                HOST_CC="gcc"
-               CPPFLAGS="$CPPFLAGS -DWIN32_THREADS -DFD_SETSIZE=1024 -DUNICODE -D_UNICODE"
+               # Windows 2000 is required that includes Internet Explorer 5.01
+               CPPFLAGS="$CPPFLAGS -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DWIN32_THREADS -DFD_SETSIZE=1024"
                libmono_cflags="-mno-cygwin"
                libmono_ldflags="-mno-cygwin"
                libdl=
@@ -232,6 +233,9 @@ case "$host" in
                no_version_script=yes
                libdl=
                libgc_threads=pthreads
+               if test "x$cross_compiling" = "xyes"; then
+                       has_broken_apple_cpp=yes
+               fi
                ;;
        *)
                AC_MSG_WARN([*** Please add $host to configure.in checks!])
@@ -246,6 +250,7 @@ if test x$need_link_unlink = xyes; then
 fi
 
 AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
+AM_CONDITIONAL(PLATFORM_LINUX, test x$target_os = xlinux-gnu)
 
 AC_CHECK_TOOL(CC, gcc, gcc)
 AC_PROG_CC
@@ -451,14 +456,17 @@ AC_ARG_WITH([glib],
        [  --with-glib=embedded|system       Choose glib API: system or embedded (default to system)],
        [], [with_glib=system])
 
+eglib_dir=
+
 case $with_glib in
 embedded) 
-  GLIB_CFLAGS='-I$(top_srcdir)/eglib/src'
+  GLIB_CFLAGS='-I$(top_srcdir)/eglib/src -I$(top_builddir)/eglib/src'
   GLIB_LIBS='-L$(top_builddir)/eglib/src -leglib -lm'
   BUILD_GLIB_CFLAGS="$GLIB_CFLAGS"
   BUILD_GLIB_LIBS="$GLIB_LIBS"
   GMODULE_CFLAGS="$GLIB_CFLAGS"
   GMODULE_LIBS="$GLIB_LIBS"
+  eglib_dir=eglib
   AC_CONFIG_SUBDIRS(eglib)
   ;;
 system)
@@ -486,6 +494,7 @@ AC_SUBST(GMODULE_CFLAGS)
 AC_SUBST(GMODULE_LIBS)
 AC_SUBST(BUILD_GLIB_CFLAGS)
 AC_SUBST(BUILD_GLIB_LIBS)
+AC_SUBST(eglib_dir)
 
 if test x$cross_compiling$platform_win32 = xnoyes; then
    AC_MSG_CHECKING(for cygwin glib2-dev package)
@@ -656,13 +665,6 @@ case "x$gc" in
                ;;
 
        xincluded)
-               AC_CONFIG_SUBDIRS(libgc)
-
-               # Pass CPPFLAGS to libgc configure
-               # Maybe we should use a separate variable for this to avoid passing useless and
-               # potentially problematic defines to libgc (like -D_FILE_OFFSET_BITS=64)
-               export CPPFLAGS
-
                found_boehm=yes
                gc_headers=yes
                use_included_gc=yes
@@ -710,9 +712,6 @@ if test "x$large_heap" = "xyes"; then
    CPPFLAGS="$CPPFLAGS -DLARGE_CONFIG"
 fi
 
-# tell libgc/configure about what we want
-ac_configure_args="$ac_configure_args --disable-embed-check --with-libgc-threads=$libgc_threads $libgc_configure_args"
-
 AM_CONDITIONAL(INCLUDED_LIBGC, test x$use_included_gc = xyes)
 AC_SUBST(LIBGC_CFLAGS)
 AC_SUBST(LIBGC_LIBS)
@@ -725,6 +724,9 @@ dnl
 
 if test x$platform_win32 = xno; then
 
+       dnl hires monotonic clock support
+       AC_SEARCH_LIBS(clock_gettime, rt)
+
        dnl dynamic loader support
        AC_CHECK_FUNC(dlopen, DL_LIB="",
                AC_CHECK_LIB(dl, dlopen, DL_LIB="-ldl", dl_support=no)
@@ -1293,11 +1295,13 @@ if test x$platform_win32 = xno; then
        dnl *** Checks for math functions ***
        dnl *********************************
         LIBS="$LIBS -lm";
-        AC_CHECK_FUNCS(finite, , AC_MSG_CHECKING(for finite in math.h)
-                AC_TRY_LINK([#include <math.h>], 
-                [ finite(0.0); ], 
-                AC_DEFINE(HAVE_FINITE) AC_MSG_RESULT(yes),
-                AC_MSG_RESULT(no)))
+       if test "x$has_broken_apple_cpp" != "xyes"; then
+               AC_CHECK_FUNCS(finite, , AC_MSG_CHECKING(for finite in math.h)
+                       AC_TRY_LINK([#include <math.h>], 
+                       [ finite(0.0); ], 
+                       AC_DEFINE(HAVE_FINITE) AC_MSG_RESULT(yes),
+                       AC_MSG_RESULT(no)))
+       fi
         AC_CHECK_FUNCS(isfinite, , AC_MSG_CHECKING(for isfinite in math.h)
                 AC_TRY_LINK([#include <math.h>], 
                 [ isfinite(0.0); ], 
@@ -1772,6 +1776,14 @@ case "$host" in
                JIT_SUPPORTED=yes
                jit_wanted=true
                ;;
+       arm*-darwin*)
+               TARGET=ARM;
+               arch_target=arm;
+               ACCESS_UNALIGNED="no"
+               JIT_SUPPORTED=yes
+               CPPFLAGS="$CPPFLAGS -DARM_FPU_NONE=1"
+               jit_wanted=true
+               ;;
        arm*-linux*)
                TARGET=ARM;
                arch_target=arm;
@@ -1942,7 +1954,7 @@ if test "x$with_tls" = "x__thread"; then
        ])
 fi
 
-if test ${TARGET} = ARM; then
+if test ${TARGET} = ARM && test x$cross_compiling = xno && test x$enable_mcs_build != xno; then
        dnl ******************************************
        dnl *** Check to see what FPU is available ***
        dnl ******************************************
@@ -1966,6 +1978,17 @@ if test ${ACCESS_UNALIGNED} = no; then
        CPPFLAGS="$CPPFLAGS -DNO_UNALIGNED_ACCESS"
 fi
 
+case "x$gc" in
+       xincluded)
+               # Pass CPPFLAGS to libgc configure
+               # We should use a separate variable for this to avoid passing useless and
+               # potentially problematic defines to libgc (like -D_FILE_OFFSET_BITS=64)
+               # This should be executed late so we pick up the final version of CPPFLAGS
+               ac_configure_args="$ac_configure_args --disable-embed-check --with-libgc-threads=$libgc_threads $libgc_configure_args \"CPPFLAGS=$CPPFLAGS\""
+               AC_CONFIG_SUBDIRS(libgc)
+               ;;
+esac
+
 PREVIEW=yes
 AC_ARG_WITH(preview,  [ --with-preview=yes,no     If you want to install the 2.0 FX preview],[
        if test x$with_preview = xno; then
@@ -2050,7 +2073,6 @@ AC_SUBST(mono_cfg_dir)
 
 AC_CONFIG_FILES([runtime/mono-wrapper],[chmod +x runtime/mono-wrapper])
 AC_CONFIG_FILES([runtime/monodis-wrapper],[chmod +x runtime/monodis-wrapper])
-AC_CONFIG_FILES([runtime/semdel-wrapper],[chmod +x runtime/semdel-wrapper])
 
 AC_CONFIG_COMMANDS([runtime/etc/mono/1.0/machine.config],
 [   depth=../../../..
@@ -2108,6 +2130,20 @@ AC_CONFIG_COMMANDS([runtime/etc/mono/browscap.ini],
     cd $depth
 ],[LN_S='$LN_S'])
 
+AC_CONFIG_COMMANDS([runtime/etc/mono/2.0/Browsers/Compat.browser],
+[   depth=../../../../..
+    case $srcdir in
+    [[\\/$]]* | ?:[[\\/]]* ) reldir=$srcdir ;;
+    .) reldir=$depth ;;
+    *) reldir=$depth/$srcdir ;;
+    esac
+    $ac_aux_dir/install-sh -d runtime/etc/mono/2.0/Browsers/
+    cd runtime/etc/mono/2.0/Browsers
+    rm -f Compat.browser
+    $LN_S $reldir/data/net_2_0/Browsers/Compat.browser Compat.browser
+    cd $depth
+],[LN_S='$LN_S'])
+
 AC_OUTPUT([
 Makefile
 mono-uninstalled.pc
@@ -2156,6 +2192,7 @@ docs/Makefile
 data/Makefile
 data/net_1_1/Makefile
 data/net_2_0/Makefile
+data/net_2_0/Browsers/Makefile
 data/mint.pc
 data/mono.pc
 data/mono-cairo.pc
@@ -2203,7 +2240,6 @@ fi
     echo 'IL_FLAGS = /debug' >> $srcdir/$mcsdir/build/config.make
     echo "RUNTIME = $mono_build_root/runtime/mono-wrapper" >> $srcdir/$mcsdir/build/config.make
     echo "ILDISASM = $mono_build_root/runtime/monodis-wrapper" >> $srcdir/$mcsdir/build/config.make
-
     case $INSTALL in
     [[\\/$]]* | ?:[[\\/]]* ) mcs_INSTALL=$INSTALL ;;
     *) mcs_INSTALL=$mono_build_root/$INSTALL ;;