Avoid a possible NULL dereference (found by Coverity), also avoid some
[platform/upstream/glib.git] / configure.in
index 0e4a098..ce083b9 100644 (file)
@@ -26,8 +26,8 @@ m4_include(m4macros/glib-gettext.m4)dnl
 # set glib_binary_age _and_ glib_interface_age to 0.
 #
 m4_define([glib_major_version], [2])
-m4_define([glib_minor_version], [9])
-m4_define([glib_micro_version], [2])
+m4_define([glib_minor_version], [11])
+m4_define([glib_micro_version], [0])
 m4_define([glib_interface_age], [0])
 m4_define([glib_binary_age],
           [m4_eval(100 * glib_minor_version + glib_micro_version)])
@@ -217,8 +217,7 @@ AC_DEFINE_UNQUOTED(G_COMPILED_WITH_DEBUGGING, ["${enable_debug}"],
 
 AC_MSG_CHECKING([whether to enable garbage collector friendliness])
 if test "x$enable_gc_friendly" = "xyes"; then
-  AC_DEFINE(ENABLE_GC_FRIENDLY, 1, [Whether to enable GC friendliness])
-  AC_SUBST(ENABLE_GC_FRIENDLY)
+  AC_DEFINE(ENABLE_GC_FRIENDLY_DEFAULT, 1, [Whether to enable GC friendliness by default])
   AC_MSG_RESULT([yes])
 else
   AC_MSG_RESULT([no])
@@ -428,7 +427,7 @@ dnl
 dnl gettext support
 dnl
 
-ALL_LINGUAS="am ar az be bg bn bs ca cs cy da de el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu id is it ja ko ku lt lv mk ml mn ms nb ne nl nn no or pa pl pt pt_BR ro ru rw sk sl sq sr sr@Latn sr@ije sv ta te th tl tr tt uk vi wa xh yi zh_CN zh_HK zh_TW"
+ALL_LINGUAS="am ar az be bg bn bs ca cs cy da de el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu id is it ja ka ko ku lt lv mk ml mn ms nb ne nl nn or pa pl pt pt_BR ro ru rw sk sl sq sr sr@Latn sr@ije sv ta te th tl tr tt uk vi wa xh yi zh_CN zh_HK zh_TW"
 GLIB_GNU_GETTEXT
 
 if test "$gt_cv_have_gettext" != "yes" ; then
@@ -529,6 +528,8 @@ AC_CHECK_FUNCS(valloc)
 
 AC_CHECK_FUNCS(atexit on_exit)
 
+AC_CHECK_FUNCS(timegm)
+
 AC_CHECK_SIZEOF(char)
 AC_CHECK_SIZEOF(short)
 AC_CHECK_SIZEOF(long)
@@ -1021,6 +1022,49 @@ AC_MSG_RESULT($have_codeset)
 
 
 dnl ****************************************
+dnl *** posix_memalign                   ***
+dnl ****************************************
+AC_MSG_CHECKING(for a compliant posix_memalign() implementation)
+AC_CACHE_VAL(glib_cv_compliant_posix_memalign,[
+    glib_cv_compliant_posix_memalign=0
+    if test "$ac_cv_func_posix_memalign" = "yes" ; then
+       AC_TRY_RUN([
+                #define _XOPEN_SOURCE 600
+                #include <stdlib.h> /* posix_memalign() should be defined here */
+                /* some systems break if #include <malloc.h> used */
+               static void test_memalign (size_t boundary, size_t size) {
+                   void *mem = 0;
+                   if (posix_memalign (&mem, boundary, size) != 0 || !mem)
+                       exit (1);
+                    else
+                      free (mem);
+               }
+               int main() {
+                   test_memalign (  128,   128 - 2 * sizeof (void*));
+                   test_memalign (  256,   256 - 2 * sizeof (void*));
+                   test_memalign (  512,   512 - 2 * sizeof (void*));
+                   test_memalign ( 1024,  1024 - 2 * sizeof (void*));
+                   test_memalign ( 2048,  2048 - 2 * sizeof (void*));
+                   test_memalign ( 4096,  4096 - 2 * sizeof (void*));
+                   test_memalign ( 8192,  8192 - 2 * sizeof (void*));
+                   test_memalign (16384, 16384 - 2 * sizeof (void*));
+                   test_memalign (32768, 32768 - 2 * sizeof (void*));
+                   exit (0); /* success */
+               }
+               ],
+           [glib_cv_compliant_posix_memalign=1], [], [:])
+      :
+    fi
+    ])
+if test "$glib_cv_compliant_posix_memalign" = "1"; then
+    AC_MSG_RESULT(yes)
+    AC_DEFINE(POSIX_MEMALIGN_WITH_COMPLIANT_ALLOCS, 1, [define if posix_memalign() can allocate any size])
+else
+    AC_MSG_RESULT(no)
+fi
+
+
+dnl ****************************************
 dnl *** strlcpy/strlcat                  ***
 dnl ****************************************
 # Check for strlcpy
@@ -1265,7 +1309,14 @@ fi
 AC_MSG_CHECKING(for the suffix of shared libraries)
 case "$host_os" in
   hpux9* | hpux10* | hpux11*)  # taken from ltconfig
-    glib_gmodule_suffix='sl'
+    case "$host_cpu" in
+      hppa*)
+       glib_gmodule_suffix='sl'
+       ;;
+      ia64*)
+       glib_gmodule_suffix='so'
+       ;;
+    esac
     ;;
   cygwin* | mingw*)
     glib_gmodule_suffix='dll'
@@ -1519,8 +1570,8 @@ if test x"$have_threads" != xno; then
     # One of them does for most gcc versions and some other platforms/compilers
     # too and could be considered as the canonical way to go. 
     case $host in
-      *-*-cygwin*)
-         # skip cygwin -pthread or -pthreads test
+      *-*-cygwin*|*-*-darwin*)
+         # skip cygwin and darwin -pthread or -pthreads test
          ;;
       *)
         for flag in pthread pthreads mt; do
@@ -2741,6 +2792,7 @@ Makefile
 build/Makefile
 build/win32/Makefile
 build/win32/dirent/Makefile
+build/win32/vs8/Makefile
 glib/Makefile
 glib/libcharset/Makefile
 glib/gnulib/Makefile