svn path=/trunk/mcs/; revision=113893
[mono.git] / configure.in
index 40e6fff76dd4b9dd9b26a4f5a2a529e009231686..70651007c835aa9fc634465bea80382dd8947d1b 100644 (file)
@@ -49,8 +49,6 @@ libmono_cflags=""
 libmono_ldflags=""
 AC_SUBST(libmono_cflags)
 AC_SUBST(libmono_ldflags)
-export_ldflags=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
-AC_SUBST(export_ldflags)
 
 # Variable to have relocatable .pc files (lib, or lib64)
 reloc_libdir=`basename ${libdir}`
@@ -100,60 +98,7 @@ case "$host" in
                libgc_threads=pthreads
                with_sigaltstack=no
                ;;
-# these flags will work for all versions of -STABLE
-#
-       *-*-*freebsd4*)
-               platform_win32=no
-               if test "x$PTHREAD_CFLAGS" = "x"; then
-                       CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_FREEBSD_THREADS"
-                       libmono_cflags="-D_THREAD_SAFE"
-               else
-                       CPPFLAGS="$CPPFLAGS $PTHREAD_CFLAGS -DGC_FREEBSD_THREADS"
-                       libmono_cflags="$PTHREAD_CFLAGS"
-               fi
-               if test "x$PTHREAD_LIBS" = "x"; then
-                       LDFLAGS="$LDFLAGS -pthread"
-                       libmono_ldflags="-pthread"
-               else
-                       LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
-                       libmono_ldflags="$PTHREAD_LIBS"
-               fi
-               CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD -DPLATFORM_BSD4"
-               need_link_unlink=yes
-               AC_DEFINE(PTHREAD_POINTER_ID, 1, [pthread_t is a pointer])
-               libdl=
-               libgc_threads=pthreads
-# TLS isn't implemented at all on 4-STABLE
-               with_tls=pthread
-               ;;
-       *-*-*freebsd5*)
-               platform_win32=no
-               if test "x$PTHREAD_CFLAGS" = "x"; then
-                       CPPFLAGS="$CPPFLAGS -DGC_FREEBSD_THREADS"
-                       libmono_cflags=
-               else
-                       CPPFLAGS="$CPPFLAGS $PTHREAD_CFLAGS -DGC_FREEBSD_THREADS"
-                       libmono_cflags="$PTHREAD_CFLAGS"
-               fi
-               if test "x$PTHREAD_LIBS" = "x"; then
-                       LDFLAGS="$LDFLAGS -pthread"
-                       libmono_ldflags="-pthread"
-               else
-                       LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
-                       libmono_ldflags="$PTHREAD_LIBS"
-               fi
-               CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD -DPLATFORM_BSD5"
-               need_link_unlink=yes
-               AC_DEFINE(PTHREAD_POINTER_ID)
-               libdl=
-               with_sigaltstack=yes
-               libgc_threads=pthreads
-# TLS is only partially implemented on 5-STABLE (compiler support
-# but NOT library support)
-#
-               with_tls=pthread
-               ;;
-       *-*-*freebsd6*)
+       *-*-*freebsd*)
                platform_win32=no
                if test "x$PTHREAD_CFLAGS" = "x"; then
                        CPPFLAGS="$CPPFLAGS -DGC_FREEBSD_THREADS"
@@ -169,9 +114,9 @@ case "$host" in
                        LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
                        libmono_ldflags="$PTHREAD_LIBS"
                fi
-               CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD -DPLATFORM_BSD6"
+               CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD"
                need_link_unlink=yes
-               AC_DEFINE(PTHREAD_POINTER_ID)
+               AC_DEFINE(PTHREAD_POINTER_ID, 1, [pthread is a pointer])
                libdl=
                libgc_threads=pthreads
                with_sigaltstack=yes
@@ -307,6 +252,9 @@ AM_PROG_LIBTOOL
 # Use dolt (http://dolt.freedesktop.org/) instead of libtool for building.
 DOLT
 
+export_ldflags=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
+AC_SUBST(export_ldflags)
+
 # Test whenever ld supports -version-script
 AC_PROG_LD
 AC_PROG_LD_GNU
@@ -352,17 +300,7 @@ AC_CHECK_HEADERS(syslog.h)
 
 # for mono/dis
 AC_CHECK_HEADERS(wchar.h)
-case "$host" in
-       *-*-*freebsd6*)
-               AC_CHECK_HEADERS(ieeefp.h)
-       ;;
-       *-*-*freebsd*)
-               /* Only freebsd6 has a working ieeefp.h */
-       ;;
-       *)
-               AC_CHECK_HEADERS(ieeefp.h)
-       ;;
-esac
+AC_CHECK_HEADERS(ieeefp.h)
 AC_MSG_CHECKING(for isinf)
 AC_TRY_LINK([#include <math.h>], [
        int f = isinf (1);
@@ -447,6 +385,10 @@ if test -d $srcdir/$olivedir; then
 olive_topdir='$(top_srcdir)/'$olivedir
 fi
 
+# gettext: prepare the translation directories. 
+# we do not configure the full gettext, as we consume it dynamically from C#
+AM_PO_SUBDIRS
+
 AC_ARG_WITH([libgdiplus], 
        [  --with-libgdiplus=installed|sibling|<path>   Override the libgdiplus used for System.Drawing tests (defaults to NO)], 
        [], [with_libgdiplus=installed])
@@ -598,7 +540,7 @@ DISABLED_FEATURES=none
 
 AC_ARG_ENABLE(minimal, [  --enable-minimal=LIST      drop support for LIST subsystems.
   LIST is a comma-separated list from: aot, profiler, decimal, pinvoke, debug,
-  reflection_emit, large_code, logging, com, ssa, generics.],
+  reflection_emit, large_code, logging, com, ssa, generics, jit.],
 [
        for feature in `echo "$enable_minimal" | sed -e "s/,/ /g"`; do
                eval "mono_feature_disable_$feature='yes'"
@@ -617,6 +559,7 @@ fi
 if test "x$mono_feature_disable_profiler" = "xyes"; then
        AC_DEFINE(DISABLE_PROFILER, 1, [Disable default profiler support])
 fi
+AM_CONDITIONAL(DISABLE_PROFILER, test x$mono_feature_disable_profiler = xyes)
 
 if test "x$mono_feature_disable_decimal" = "xyes"; then
        AC_DEFINE(DISABLE_DECIMAL, 1, [Disable System.Decimal support])
@@ -654,6 +597,12 @@ if test "x$mono_feature_disable_generics" = "xyes"; then
        AC_DEFINE(DISABLE_GENERICS, 1, [Disable generics support])
 fi
 
+if test "x$mono_feature_disable_jit" = "xyes"; then
+       AC_DEFINE(DISABLE_JIT, 1, [Disable the JIT, only full-aot mode will be supported by the runtime.])
+fi
+
+AM_CONDITIONAL(DISABLE_JIT, test x$mono_feature_disable_jit = xyes)
+
 AC_MSG_CHECKING(for visibility __attribute__)
 AC_TRY_COMPILE([], [
    void __attribute__ ((visibility ("hidden"))) doit (void) {}
@@ -1127,13 +1076,7 @@ if test x$platform_win32 = xno; then
 # and libpthread does not exist
 #
        case "${host}" in
-               *-*-*freebsd4*)
-                       AC_CHECK_LIB(pthread, main, LIBS="$LIBS -pthread")
-               ;;
-               *-*-*freebsd5*)
-                       AC_CHECK_LIB(pthread, main, LIBS="$LIBS -pthread")
-               ;;
-               *-*-*freebsd6*)
+               *-*-*freebsd*)
                        AC_CHECK_LIB(pthread, main, LIBS="$LIBS -pthread")
                ;;
                *)
@@ -2207,6 +2150,8 @@ else
 fi
 AC_SUBST(mono_cfg_dir)
 
+AC_CONFIG_FILES([po/mcs/Makefile.in])
+
 AC_CONFIG_FILES([runtime/mono-wrapper],[chmod +x runtime/mono-wrapper])
 AC_CONFIG_FILES([runtime/monodis-wrapper],[chmod +x runtime/monodis-wrapper])
 
@@ -2339,6 +2284,7 @@ data/mono.pc
 data/mono-cairo.pc
 data/dotnet.pc
 data/dotnet35.pc
+data/wcf.pc
 data/cecil.pc
 data/smcs.pc
 samples/Makefile
@@ -2348,6 +2294,7 @@ tools/Makefile
 tools/locale-builder/Makefile
 runtime/Makefile
 msvc/Makefile
+po/Makefile
 ])
 
 if test x$platform_win32 = xyes; then