Fix for build breakage on cygwin-head-mono
[mono.git] / configure.in
index 81659ea9362f2df447b2882fbdeff63279bbaebe..66bcacc9596c0299f156a8aaa2d11f8ac446d4c9 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.1.3)
+AM_INIT_AUTOMAKE(mono,1.1.5)
 AM_MAINTAINER_MODE
 
 AC_PROG_LN_S
@@ -240,7 +240,7 @@ fi
 
 AM_CONDITIONAL(NO_VERSION_SCRIPT, test x$no_version_script = xyes)
 
-AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h semaphore.h sys/un.h)
+AC_CHECK_HEADERS(sys/filio.h sys/sockio.h netdb.h utime.h semaphore.h sys/un.h linux/rtc.h)
 
 AC_CHECK_HEADER(zlib.h, [have_zlib=yes], [have_zlib=no])
 
@@ -272,6 +272,18 @@ if test x"$GCC" = xyes; then
         WARN='-Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes  -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings'
                # The runtime code does not respect ANSI C strict aliasing rules
                CFLAGS="$CFLAGS -fno-strict-aliasing"
+
+               ORIG_CFLAGS=$CFLAGS
+               CFLAGS="$CFLAGS -Wdeclaration-after-statement"
+               AC_MSG_CHECKING(for -Wdeclaration-after-statement option to gcc)
+               AC_TRY_COMPILE([], [
+                                                  void main () { }
+               ], [
+                  AC_MSG_RESULT(yes)
+               ], [
+                  AC_MSG_RESULT(no)
+                  CFLAGS=$ORIG_CFLAGS
+               ])
 else
        # The Sun Forte compiler complains about inline functions that access static variables
        # so disable all inlining.
@@ -502,6 +514,19 @@ dnl
 
 if test x$platform_win32 = xno; then
 
+       dnl ******************************************************************
+       dnl *** Checks for the IKVM JNI interface library                  ***
+       dnl ******************************************************************
+       AC_ARG_WITH(ikvm-native, [  --with-ikvm-native=yes,no  build the IKVM JNI interface library],[with_ikvm_native=$withval],[with_ikvm_native=yes])
+
+       ikvm_native_dir=
+       if test x$with_ikvm_native = xyes; then
+               ikvm_native_dir=ikvm-native
+               jdk_headers_found="IKVM Native"
+       fi
+
+       AC_SUBST(ikvm_native_dir)
+
        AC_CHECK_FUNCS(getgrgid_r)
        AC_CHECK_FUNCS(getgrnam_r)
        AC_CHECK_FUNCS(getpwnam_r)
@@ -509,6 +534,7 @@ if test x$platform_win32 = xno; then
        AC_CHECK_FUNCS(getresuid)
        AC_CHECK_FUNCS(setresuid)
        AC_CHECK_FUNCS(kqueue)
+       AC_CHECK_FUNCS(backtrace_symbols)
 
        dnl ******************************************************************
        dnl *** Check for large file support                               ***
@@ -1028,6 +1054,7 @@ if test x$platform_win32 = xno; then
        dnl **********************************
        dnl *** Checks for MonoPosixHelper ***
        dnl **********************************
+       AC_CHECK_HEADERS(checklist.h)
        AC_CHECK_HEADERS(fstab.h)
        AC_CHECK_HEADERS(sys/sendfile.h)
        AC_CHECK_HEADERS(sys/statvfs.h)
@@ -1041,6 +1068,7 @@ if test x$platform_win32 = xno; then
        AC_CHECK_FUNCS(posix_fadvise)
        AC_CHECK_FUNCS(posix_fallocate)
        AC_CHECK_FUNCS(posix_madvise)
+       AC_CHECK_FUNCS(vsnprintf)
        AC_CHECK_FUNCS(sendfile)
        AC_CHECK_FUNCS(sethostid)
        AC_CHECK_FUNCS(statfs)
@@ -1055,6 +1083,17 @@ if test x$platform_win32 = xno; then
                [struct dirent.d_off, struct dirent.d_reclen, struct dirent.d_type],,, 
                [#include <sys/types.h>
                 #include <dirent.h>])
+
+       dnl *********************************
+       dnl *** Check for Console 2.0 I/O ***
+       dnl *********************************
+       AC_CHECK_HEADERS([curses.h])
+       AC_CHECK_HEADERS([term.h], [], [],
+       [#if HAVE_CURSES_H
+        #include <curses.h>
+        #endif
+       ])
+       AC_CHECK_HEADERS([termios.h])
 else
        jdk_headers_found=no
        AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32", AC_ERROR(bad mingw install?))
@@ -1211,7 +1250,7 @@ fi
 #
 ICU_CFLAGS=""
 ICU_LIBS=""
-enable_icu="no;  default"
+enable_glob="normal;  default"
 
 probe_icu=false
 AC_ARG_WITH(icu, [  --with-icu=yes/no],
@@ -1227,10 +1266,9 @@ AC_ARG_WITH(icu, [  --with-icu=yes/no],
 if $probe_icu; then
        AC_PATH_PROG(ICU_CONFIG, icu-config, no)
        if test "x$ICU_CONFIG" = "xno" -o ! -x "$ICU_CONFIG"; then
-               AC_MSG_WARN([Only invariant locale available; install ICU for I18N support])
-               enable_icu="no, if you want full i18n support download it from: http://oss.software.ibm.com/icu/index.html"
+               enable_glob="ICU not found, using non-ICU globalization code."
        else
-               enable_icu="yes. Version: `$ICU_CONFIG --version`"
+               enable_glob="ICU, unsupported. Version: `$ICU_CONFIG --version`"
                AC_DEFINE(HAVE_ICU)
                ICU_CFLAGS=`$ICU_CONFIG --cppflags`
                ICU_LIBS=`$ICU_CONFIG --ldflags`
@@ -1293,6 +1331,9 @@ case "$host" in
                interp_wanted=true
                arch_target=alpha;
               ;;
+       *-*-mingw*|*-*-cygwin*)
+               INTL="intl"
+               ;;
 #      ia64-*-linux* | ia64-*-hpux*)
 #              TARGET=IA64;
 #              arch_target=ia64;
@@ -1442,6 +1483,14 @@ if test "x$with_tls" = "x__thread"; then
    # Pass the information to libgc
        CPPFLAGS="$CPPFLAGS -DUSE_COMPILER_TLS"
        export CPPFLAGS
+       AC_MSG_CHECKING(if the tls_model attribute is supported)
+       AC_TRY_COMPILE([static __thread int foo __attribute__((tls_model("initial-exec")));], [
+               ], [
+                       AC_MSG_RESULT(yes)
+                       AC_DEFINE(HAVE_TLS_MODEL_ATTR, 1, [tld_model available])
+               ], [
+                       AC_MSG_RESULT(no)
+       ])
 fi
 
 if test ${TARGET} = ARM; then
@@ -1589,6 +1638,7 @@ mono/io-layer/Makefile
 mono/handles/Makefile
 mono/mini/Makefile
 mono/profiler/Makefile
+ikvm-native/Makefile
 scripts/Makefile
 man/Makefile
 web/Makefile
@@ -1613,14 +1663,16 @@ runtime/Makefile
   NONE | '${prefix}') exec_prefix=$prefix ;;
   esac
 
-  echo "prefix=$exec_prefix" > $srcdir/$mcsdir/build/config.make
+  echo "prefix=$prefix" > $srcdir/$mcsdir/build/config.make
+  echo "exec_prefix=$exec_prefix" >> $srcdir/$mcsdir/build/config.make
+  echo "libdir=$libdir" >> $srcdir/$mcsdir/build/config.make
   echo 'MCS_FLAGS = $(PLATFORM_DEBUG_FLAGS)' >> $srcdir/$mcsdir/build/config.make
 )
 
 echo "
         mcs source:  $mcs_topdir
        GC:          $gc
-       ICU:         $enable_icu
+       Globalization:     $enable_glob
        TLS:         $with_tls
        SIGALTSTACK: $with_sigaltstack
        Engine:      $jit_status