Merge branch 'concurrent-cancellable'
[platform/upstream/glib.git] / configure.ac
index cd24456..2158831 100644 (file)
@@ -20,9 +20,14 @@ m4_define(glib_configure_ac)
 # if backwards compatibility has been broken,
 # set glib_binary_age _and_ glib_interface_age to 0.
 #
+# in easier to understand terms:
+#
+# <mclasen> on the stable branch, interface age == micro
+# <mclasen> on the unstable (ie master), interface age = 0
+
 m4_define([glib_major_version], [2])
-m4_define([glib_minor_version], [27])
-m4_define([glib_micro_version], [2])
+m4_define([glib_minor_version], [29])
+m4_define([glib_micro_version], [17])
 m4_define([glib_interface_age], [0])
 m4_define([glib_binary_age],
           [m4_eval(100 * glib_minor_version + glib_micro_version)])
@@ -49,16 +54,18 @@ AC_INIT(glib, [glib_version],
 
 AC_CONFIG_HEADER([config.h])
 AC_CONFIG_SRCDIR([glib/glib.h])
+AC_CONFIG_MACRO_DIR([m4macros])
 
 # Save this value here, since automake will set cflags later
 cflags_set=${CFLAGS+set}
 
-AM_INIT_AUTOMAKE([1.10 no-define])
+AM_INIT_AUTOMAKE([1.11 no-define no-dist-gzip dist-xz tar-ustar])
+AM_MAINTAINER_MODE([enable])
 
-# Support silent build rules, requires at least automake-1.11. Enable
-# by either passing --enable-silent-rules to configure or passing V=0
+# Support silent build rules. Disable
+# by either passing --disable-silent-rules to configure or passing V=1
 # to make
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
+AM_SILENT_RULES([yes])
 
 GLIB_MAJOR_VERSION=glib_major_version
 GLIB_MINOR_VERSION=glib_minor_version
@@ -97,9 +104,6 @@ AC_SUBST(LT_REVISION)
 AC_SUBST(LT_AGE)
 AC_SUBST(LT_CURRENT_MINUS_AGE)
 
-dnl Initialize maintainer mode
-AM_MAINTAINER_MODE
-
 dnl Checks for programs.
 AC_PROG_CC
 AC_PROG_CPP
@@ -200,6 +204,10 @@ if test "x$glib_have_carbon" = "xyes"; then
   LDFLAGS="$LDFLAGS -framework Carbon"
 fi
 
+gl_GLIBC21
+if test "x$GLIBC21" = "xyes"; then
+  AC_DEFINE([_GNU_SOURCE], 1, [Make all glibc extensions visible])
+fi
 
 dnl declare --enable-* args and collect ac_help strings
 AC_ARG_ENABLE(debug,
@@ -224,10 +232,6 @@ AC_ARG_ENABLE(rebuilds,
               [AC_HELP_STRING([--disable-rebuilds],
                               [disable all source autogeneration rules])],,
               [enable_rebuilds=yes])
-AC_ARG_ENABLE(visibility,
-              [AC_HELP_STRING([--disable-visibility],
-                              [don't use ELF visibility attributes])],,
-              [enable_visibility=yes])
 
 if test "x$enable_threads" != "xyes"; then
   enable_threads=no
@@ -296,10 +300,6 @@ else
   fi
 fi
 
-if test "x$enable_visibility" = "xno"; then
-  GLIB_DEBUG_FLAGS="$GLIB_DEBUG_FLAGS -DDISABLE_VISIBILITY"
-fi
-
 # Ensure MSVC-compatible struct packing convention is used when
 # compiling for Win32 with gcc.
 # What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
@@ -365,7 +365,7 @@ fi
 AC_SUBST(PERL_PATH)
 
 # Need suitable python path for greport
-AM_PATH_PYTHON(2.4,,PYTHON="/usr/bin/env python2.4")
+AM_PATH_PYTHON(2.5,,PYTHON="/usr/bin/env python2.5")
 
 
 dnl ***********************
@@ -414,13 +414,12 @@ else
   fi
 fi
 
-gl_GLIBC21
 AC_ARG_ENABLE(iconv-cache, 
               [AC_HELP_STRING([--enable-iconv-cache=@<:@yes/no/auto@:>@],
                               [cache iconv descriptors [default=auto]])],,
               [enable_iconv_cache=auto])
 
-AC_MSG_CHECKING([Whether to cache iconv descriptors])
+AC_MSG_CHECKING([whether to cache iconv descriptors])
 case $enable_iconv_cache in
   auto)
     if test $ac_cv_gnu_library_2_1 = yes; then
@@ -455,6 +454,10 @@ if test "x$found_zlib" = "xno" ; then
   AC_SUBST(ZLIB_LIBS)
 fi
 
+PKG_CHECK_MODULES(LIBFFI, [libffi >= 3.0.0])
+AC_SUBST(LIBFFI_CFLAGS)
+AC_SUBST(LIBFFI_LIBS)
+
 dnl
 dnl gettext support
 dnl
@@ -576,6 +579,51 @@ AC_FUNC_ALLOCA
 AC_CHECK_FUNCS(mmap posix_memalign memalign valloc fsync pipe2)
 AC_CHECK_FUNCS(atexit on_exit timegm gmtime_r)
 
+dnl don't use AC_CHECK_FUNCS here, otherwise HAVE_QSORT_R will
+dnl be automatically defined, which we don't want to do
+dnl until we have checked this function is actually usable
+AC_CHECK_FUNC([qsort_r])
+
+# BSD has a qsort_r with wrong argument order
+if test x$ac_cv_func_qsort_r = xyes ; then
+  AC_CACHE_CHECK([if qsort_r uses glibc compatible argument order], glib_cv_have_qsort_r, [
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[
+  #define _GNU_SOURCE
+  #include <stdlib.h>
+
+  static int
+  cmp (const void *a, const void *b, void *c)
+  {
+    const int *ia = a;
+    const int *ib = b;
+
+    if (*ia < *ib)
+      return -1;
+    else if (*ia > *ib)
+      return 1;
+    else
+      return 0;
+  }
+
+  int
+  main (int argc, char **argv)
+  {
+    int arr[3] = { 1, 2, 0 };
+    int d = 3;
+
+    qsort_r (arr, 3, sizeof (int), cmp, &d);
+
+    if (arr[0] == 0 && arr[1] == 1 && arr[2] == 2)
+      return 0;
+    else
+      return 1;
+  }]])],[glib_cv_have_qsort_r=yes],[glib_cv_have_qsort_r=no])])
+fi
+
+if test x$glib_cv_have_qsort_r = xyes ; then
+  AC_DEFINE(HAVE_QSORT_R, 1, [Define to 1 if you have the 'qsort_r' function])
+fi
+
 AC_CHECK_SIZEOF(char)
 AC_CHECK_SIZEOF(short)
 AC_CHECK_SIZEOF(long)
@@ -682,10 +730,10 @@ dnl AC_C_INLINE is useless to us since it bails out too early, we need to
 dnl truely know which ones of `inline', `__inline' and `__inline__' are
 dnl actually supported.
 AC_CACHE_CHECK([for __inline],glib_cv_has__inline,[
-        AC_COMPILE_IFELSE([
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
        __inline int foo () { return 0; }
        int main () { return foo (); }
-               ],
+       ]])],
        glib_cv_has__inline=yes
         ,
        glib_cv_has__inline=no
@@ -695,10 +743,10 @@ case x$glib_cv_has__inline in
 xyes) AC_DEFINE(G_HAVE___INLINE,1,[Have __inline keyword])
 esac
 AC_CACHE_CHECK([for __inline__],glib_cv_has__inline__,[
-        AC_COMPILE_IFELSE([
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
        __inline__ int foo () { return 0; }
        int main () { return foo (); }
-               ],
+       ]])],
        glib_cv_has__inline__=yes
         ,
        glib_cv_has__inline__=no
@@ -708,11 +756,11 @@ case x$glib_cv_has__inline__ in
 xyes) AC_DEFINE(G_HAVE___INLINE__,1,[Have __inline__ keyword])
 esac
 AC_CACHE_CHECK([for inline], glib_cv_hasinline,[
-        AC_COMPILE_IFELSE([
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
        #undef inline
        inline int foo () { return 0; }
        int main () { return foo (); }
-               ],
+       ]])],
        glib_cv_hasinline=yes
         ,
        glib_cv_hasinline=no
@@ -724,7 +772,7 @@ esac
 
 # if we can use inline functions in headers
 AC_MSG_CHECKING(if inline functions in headers work)
-AC_LINK_IFELSE([
+AC_LINK_IFELSE([AC_LANG_SOURCE([[
 #if defined (G_HAVE_INLINE) && defined (__GNUC__) && defined (__STRICT_ANSI__)
 #  undef inline
 #  define inline __inline__
@@ -747,7 +795,7 @@ glib_test_func1 (void) {
 int
 main (void) {
   int i = 1;
-}],[g_can_inline=yes],[g_can_inline=no])
+}]])],[g_can_inline=yes],[g_can_inline=no])
 AC_MSG_RESULT($g_can_inline)
 
 dnl *** check for working do while(0) macros ***
@@ -799,7 +847,7 @@ AC_MSG_RESULT($g_have_gnuc_varargs)
 
 # check for GNUC visibility support
 AC_MSG_CHECKING(for GNUC visibility attribute)
-GLIB_CHECK_COMPILE_WARNINGS([
+GLIB_CHECK_COMPILE_WARNINGS([AC_LANG_SOURCE([[
 void
 __attribute__ ((visibility ("hidden")))
      f_hidden (void)
@@ -828,7 +876,7 @@ int main (int argc, char **argv)
        f_default();
        return 0;
 }
-],g_have_gnuc_visibility=yes,g_have_gnuc_visibility=no)
+]])],g_have_gnuc_visibility=yes,g_have_gnuc_visibility=no)
 AC_MSG_RESULT($g_have_gnuc_visibility)
 AM_CONDITIONAL(HAVE_GNUC_VISIBILITY, [test x$g_have_gnuc_visibility = xyes])
 
@@ -864,7 +912,8 @@ AC_CHECK_HEADERS([sys/time.h sys/times.h sys/wait.h unistd.h values.h])
 AC_CHECK_HEADERS([sys/select.h sys/types.h stdint.h inttypes.h sched.h malloc.h])
 AC_CHECK_HEADERS([sys/vfs.h sys/mount.h sys/vmount.h sys/statfs.h sys/statvfs.h])
 AC_CHECK_HEADERS([mntent.h sys/mnttab.h sys/vfstab.h sys/mntctl.h sys/sysctl.h fstab.h])
-AC_CHECK_HEADERS([sys/uio.h])
+AC_CHECK_HEADERS([sys/uio.h sys/mkdev.h])
+AC_CHECK_HEADERS([linux/magic.h])
 
 # check for structure fields
 AC_CHECK_MEMBERS([struct stat.st_mtimensec, struct stat.st_mtim.tv_nsec, struct stat.st_atimensec, struct stat.st_atim.tv_nsec, struct stat.st_ctimensec, struct stat.st_ctim.tv_nsec])
@@ -882,11 +931,10 @@ AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_blocks, struct statfs.f
 #endif])
 # struct statvfs.f_basetype is available on Solaris but not for Linux. 
 AC_CHECK_MEMBERS([struct statvfs.f_basetype],,, [#include <sys/statvfs.h>])
-AC_CHECK_MEMBERS([struct tm.tm_gmtoff])
+AC_CHECK_MEMBERS([struct tm.tm_gmtoff, struct tm.__tm_gmtoff],,,[#include <time.h>])
 
 # Checks for libcharset
 AM_LANGINFO_CODESET
-gl_GLIBC21
 AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
 AC_CHECK_FUNCS(setlocale)
 
@@ -922,7 +970,7 @@ dnl on AIX with xlc)
 dnl
 if test $ac_cv_sizeof_size_t = $ac_cv_sizeof_int &&
    test $ac_cv_sizeof_size_t = $ac_cv_sizeof_long ; then
-  GLIB_CHECK_COMPILE_WARNINGS([
+  GLIB_CHECK_COMPILE_WARNINGS([AC_LANG_SOURCE([[
 #if defined(_AIX) && !defined(__GNUC__)
 #pragma options langlvl=stdc89
 #endif
@@ -933,8 +981,8 @@ int main ()
   unsigned int *size_int = &s;
   return (int)*size_int;
 }
-    ],glib_size_type=int,
-      [GLIB_CHECK_COMPILE_WARNINGS([
+    ]])],glib_size_type=int,
+      [GLIB_CHECK_COMPILE_WARNINGS([AC_LANG_SOURCE([[
 #if defined(_AIX) && !defined(__GNUC__)
 #pragma options langlvl=stdc89
 #endif
@@ -945,19 +993,46 @@ int main ()
    unsigned long *size_long = &s;
    return (int)*size_long;
 }
-        ],glib_size_type=long)])
+        ]])],glib_size_type=long)])
 fi
 
 AC_MSG_RESULT(unsigned $glib_size_type)
 
 # Check for some functions
 AC_CHECK_FUNCS(lstat strerror strsignal memmove vsnprintf stpcpy strcasecmp strncasecmp poll getcwd vasprintf setenv unsetenv getc_unlocked readlink symlink fdwalk memmem)
-AC_CHECK_FUNCS(chown lchmod lchown fchmod fchown link statvfs statfs utimes getgrgid getpwuid)
+AC_CHECK_FUNCS(chown lchmod lchown fchmod fchown link utimes getgrgid getpwuid)
 AC_CHECK_FUNCS(getmntent_r setmntent endmntent hasmntopt getmntinfo)
 # Check for high-resolution sleep functions
-AC_CHECK_FUNCS(nanosleep nsleep)
 AC_CHECK_FUNCS(splice)
 
+# To avoid finding a compatibility unusable statfs, which typically
+# successfully compiles, but warns to use the newer statvfs interface:
+AS_IF([test $ac_cv_header_sys_statvfs_h = yes], [AC_CHECK_FUNCS([statvfs])])
+AS_IF([test $ac_cv_header_sys_statfs_h  = yes], [AC_CHECK_FUNCS([statfs])])
+
+AC_MSG_CHECKING([whether to use statfs or statvfs])
+# Some systems have both statfs and statvfs, pick the most "native" for these
+AS_IF([test x$ac_cv_func_statfs = xyes && test x$ac_cv_func_statvfs = xyes],
+   [
+   # on solaris and irix, statfs doesn't even have the f_bavail field
+   AS_IF([test x$ac_cv_member_struct_statfs_f_bavail = xno],
+      [ac_cv_func_statfs=no],
+   # else, at least on linux, statfs is the actual syscall
+      [ac_cv_func_statvfs=no])
+   ])
+
+AS_IF([test x$ac_cv_func_statfs = xyes],
+      [
+         AC_DEFINE([USE_STATFS], [1], [Define to use statfs()])
+         AC_MSG_RESULT([statfs])
+      ],
+      [test x$ac_cv_func_statvfs = xyes],
+      [
+         AC_DEFINE([USE_STATVFS], [1], [Define to use statvfs()])
+         AC_MSG_RESULT([statvfs])
+      ],
+      [  AC_MSG_RESULT([neither])])
+
 AC_CHECK_HEADERS(crt_externs.h)
 AC_CHECK_FUNCS(_NSGetEnviron)
 
@@ -1304,7 +1379,7 @@ dnl **********************
 dnl we currently check for all three va_copy possibilities, so we get
 dnl all results in config.log for bug reports.
 AC_CACHE_CHECK([for an implementation of va_copy()],glib_cv_va_copy,[
-       AC_LINK_IFELSE([#include <stdarg.h>
+       AC_LINK_IFELSE([AC_LANG_SOURCE([[#include <stdarg.h>
 #include <stdlib.h>
        void f (int i, ...) {
        va_list args1, args2;
@@ -1317,12 +1392,12 @@ AC_CACHE_CHECK([for an implementation of va_copy()],glib_cv_va_copy,[
        int main() {
          f (0, 42);
          return 0;
-       }],
+       }]])],
        [glib_cv_va_copy=yes],
        [glib_cv_va_copy=no])
 ])
 AC_CACHE_CHECK([for an implementation of __va_copy()],glib_cv___va_copy,[
-       AC_LINK_IFELSE([#include <stdarg.h>
+       AC_LINK_IFELSE([AC_LANG_SOURCE([[#include <stdarg.h>
 #include <stdlib.h>
        void f (int i, ...) {
        va_list args1, args2;
@@ -1335,7 +1410,7 @@ AC_CACHE_CHECK([for an implementation of __va_copy()],glib_cv___va_copy,[
        int main() {
          f (0, 42);
          return 0;
-       }],
+       }]])],
        [glib_cv___va_copy=yes],
        [glib_cv___va_copy=no])
 ])
@@ -1626,12 +1701,12 @@ dnl *********************************
 dnl ** Check for Solaris FEN (GIO) **
 dnl *********************************
 fen_support=no
-AC_COMPILE_IFELSE([ 
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
 #include <port.h> 
 #ifndef PORT_SOURCE_FILE 
 #error "Please upgrade to Nevada 72 or above to suppoert FEN" 
 #endif 
-int main() { return 0; } ],
+int main() { return 0; } ]])],
 [
        fen_support=yes
 ],)
@@ -1938,7 +2013,7 @@ if test x"$have_threads" != xno; then
           AC_TRY_RUN(glib_thread_test(0),
                      glib_flag_works=yes,
                      glib_flag_works=no,
-                     [AC_LINK_IFELSE(glib_thread_test(0),
+                     [AC_LINK_IFELSE([AC_LANG_SOURCE(glib_thread_test(0))],
                                      glib_flag_works=yes,
                                      glib_flag_works=no)])
           CFLAGS="$glib_save_CFLAGS"
@@ -2062,7 +2137,7 @@ case $have_threads in
                        AC_TRY_RUN(glib_thread_test($defattr),
                                    glib_result=yes,
                                    glib_result=no,
-                                   [AC_LINK_IFELSE(glib_thread_test($defattr),
+                                   [AC_LINK_IFELSE([AC_LANG_SOURCE(glib_thread_test($defattr))],
                                                    glib_result=yes,
                                                    glib_result=no)])
                         AC_MSG_RESULT($glib_result)
@@ -2095,7 +2170,7 @@ case $have_threads in
            AC_TRY_RUN(glib_sched_priority_test,
                        glib_result=yes,
                        glib_result=no,
-                       [AC_LINK_IFELSE(glib_sched_priority_test,
+                       [AC_LINK_IFELSE([AC_LANG_SOURCE(glib_sched_priority_test)],
                                        glib_result=yes,
                                        glib_result=no)])
            AC_MSG_RESULT($glib_result)
@@ -2384,8 +2459,10 @@ AC_CHECK_FUNCS(clock_gettime, [], [
     AC_DEFINE(HAVE_CLOCK_GETTIME, 1)
     G_THREAD_LIBS="$G_THREAD_LIBS -lrt"
     G_THREAD_LIBS_FOR_GTHREAD="$G_THREAD_LIBS_FOR_GTHREAD -lrt"
+    GLIB_RT_LIBS="-lrt"
   ])
 ])
+AC_SUBST(GLIB_RT_LIBS)
 
 AC_CACHE_CHECK(for monotonic clocks,
     glib_cv_monotonic_clock,AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
@@ -2403,28 +2480,11 @@ if test "$glib_cv_monotonic_clock" = "yes"; then
 fi
 
 
-dnl ********************************
-dnl *** g_atomic_* tests for gcc ***
-dnl ********************************
+dnl ************************
+dnl *** g_atomic_* tests ***
+dnl ************************
 
 AC_MSG_CHECKING([whether to use assembler code for atomic operations])
-
-glib_cv_gcc_has_builtin_atomic_operations=no
-if test x"$GCC" = xyes; then
-  AC_MSG_CHECKING([whether GCC supports build-in atomic intrinsics])
-  AC_TRY_LINK([],
-             [int i;
-              __sync_synchronize ();
-              __sync_bool_compare_and_swap (&i, 0, 1);
-              __sync_fetch_and_add (&i, 1);
-             ],
-             [glib_cv_gcc_has_builtin_atomic_operations=yes],
-             [glib_cv_gcc_has_builtin_atomic_operations=no])
-
-  AC_MSG_RESULT($glib_cv_gcc_has_builtin_atomic_operations)
-  if test $glib_cv_gcc_has_builtin_atomic_operations = yes; then
-    glib_memory_barrier_needed=yes
-  else
     case $host_cpu in
       i386)
         AC_MSG_RESULT([none])
@@ -2443,13 +2503,13 @@ if test x"$GCC" = xyes; then
                         operations much faster. The resulting code will not run
                         on very old sparcs though."
 
-        AC_LINK_IFELSE([[
+        AC_LINK_IFELSE([AC_LANG_SOURCE([[
           main ()
           {
             int tmp1, tmp2, tmp3;
             __asm__ __volatile__("casx [%2], %0, %1"
                                  : "=&r" (tmp1), "=&r" (tmp2) : "r" (&tmp3));
-          }]],
+          }]])],
           AC_MSG_RESULT([sparcv9])
           AC_DEFINE_UNQUOTED(G_ATOMIC_SPARCV9, 1,
                             [sparcv9 atomic implementation]),
@@ -2521,42 +2581,72 @@ if test x"$GCC" = xyes; then
         glib_memory_barrier_needed=yes
         ;;
     esac
-  fi
-else
-  if test $glib_native_win32 = yes; then
-    # For Windows but not using gcc. No barriers needed then either.
-    glib_memory_barrier_needed=no
-  fi
-fi
 
+glib_cv_gcc_has_builtin_atomic_operations=no
+if test x"$GCC" = xyes; then
+  AC_MSG_CHECKING([whether GCC supports built-in atomic intrinsics])
+  AC_TRY_LINK([],
+             [int i;
+              __sync_synchronize ();
+              __sync_bool_compare_and_swap (&i, 0, 1);
+              __sync_fetch_and_add (&i, 1);
+             ],
+             [glib_cv_gcc_has_builtin_atomic_operations=yes],
+             [glib_cv_gcc_has_builtin_atomic_operations=no])
+
+  AC_MSG_RESULT($glib_cv_gcc_has_builtin_atomic_operations)
+fi
 AM_CONDITIONAL(HAVE_GCC_BUILTINS_FOR_ATOMIC_OPERATIONS,
               [test $glib_cv_gcc_has_builtin_atomic_operations = yes])
 
+AC_MSG_CHECKING([for Win32 atomic intrinsics])
+glib_cv_has_win32_atomic_operations=no
+AC_TRY_LINK([],
+       [int i; _InterlockedExchangeAdd (&i, 0);],
+       [glib_cv_has_win32_atomic_operations=yes],
+       [glib_cv_has_win32_atomic_operations=no])
+AC_MSG_RESULT($glib_cv_has_win32_atomic_operations)
+if test "x$glib_cv_has_win32_atomic_operations" = xyes; then
+       AC_DEFINE(HAVE_WIN32_BUILTINS_FOR_ATOMIC_OPERATIONS,1,[Have Win32 atomic intrinsics])
+fi
+
 dnl ************************
 dnl ** Check for futex(2) **
 dnl ************************
-AC_MSG_CHECKING([for futex(2) system call])
-AC_COMPILE_IFELSE([ 
+AC_CACHE_CHECK(for futex(2) system call,
+    glib_cv_futex,AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
 #include <linux/futex.h>
-#include <syscall.h>
+#include <sys/syscall.h>
 #include <unistd.h>
+],[
+int
+main (void)
+{
+  /* it is not like this actually runs or anything... */
+  syscall (__NR_futex, NULL, FUTEX_WAKE, FUTEX_WAIT);
+  return 0;
+}
+])],glib_cv_futex=yes,glib_cv_futex=no))
+if test x"$glib_cv_futex" = xyes; then
+  AC_DEFINE(HAVE_FUTEX, 1, [we have the futex(2) system call])
+fi
 
+AC_CACHE_CHECK(for eventfd(2) system call,
+    glib_cv_eventfd,AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+#include <sys/eventfd.h>
+#include <unistd.h>
+],[
 int
 main (void)
 {
-  /* it's not like this actually runs or anything... */
-  syscall (SYS_futex, NULL, FUTEX_WAKE, FUTEX_WAIT);
+  eventfd (0, EFD_CLOEXEC);
   return 0;
 }
-],
-[
-  AC_MSG_RESULT(yes)
-  AC_DEFINE(HAVE_FUTEX, [test "$have_futex" = "yes"],
-            [we have the futex(2) system call])
-],
-[
-  AC_MSG_RESULT(no)
-])
+])],glib_cv_eventfd=yes,glib_cv_eventfd=no))
+if test x"$glib_cv_eventfd" = x"yes"; then
+  AC_DEFINE(HAVE_EVENTFD, 1, [we have the eventfd(2) system call])
+fi
+AM_CONDITIONAL(HAVE_EVENTFD, [test "$glib_cv_eventfd" = "yes"])
 
 dnl ****************************************
 dnl *** GLib POLL* compatibility defines ***
@@ -2617,7 +2707,7 @@ AC_MSG_RESULT($broken_poll)
 dnl *********************
 dnl *** GRegex checks ***
 dnl *********************
-PCRE_REQUIRED_VERSION=7.2
+PCRE_REQUIRED_VERSION=8.11
 
 # Check if we should compile GRegex
 AC_ARG_ENABLE(regex, AC_HELP_STRING([--disable-regex],
@@ -2785,11 +2875,12 @@ if test "x$enable_dtrace" != xno; then
       if test "x$enable_dtrace" = xyes; then
         AC_MSG_ERROR([dtrace not found])
       fi
+    else
+      AC_CHECK_HEADER([sys/sdt.h],have_dtrace=yes,
+                      [if test "x$enable_dtrace" = xyes; then
+                        AC_MSG_ERROR([dtrace support needs sys/sdt.h header])
+                       fi])
     fi
-    AC_CHECK_HEADER([sys/sdt.h],have_dtrace=yes,
-                    [if test "x$enable_dtrace" = xyes; then
-                      AC_MSG_ERROR([dtrace support needs sys/sdt.h header])
-                     fi])
   fi
 else
   AC_MSG_RESULT([no])
@@ -2848,7 +2939,7 @@ if test "x$use_gcov" = "xyes"; then
     AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
   fi
 
-  ltp_version_list="1.6 1.7 1.8"
+  ltp_version_list="1.6 1.7 1.8 1.9"
   AC_CHECK_PROG(LTP, lcov, lcov)
   AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)
 
@@ -3209,7 +3300,10 @@ _______EOF
          echo >>$outfile
          echo "#define G_ATOMIC_OP_MEMORY_BARRIER_NEEDED 1" >>$outfile
        fi
-
+       if test x"$g_gcc_atomic_ops" != xno; then
+          echo >>$outfile
+          echo "#define G_ATOMIC_OP_USE_GCC_BUILTINS 1" >>$outfile
+        fi
        echo >>$outfile
        g_bit_sizes="16 32 64"
        for bits in $g_bit_sizes; do
@@ -3586,6 +3680,7 @@ g_system_thread_sizeof="$glib_cv_sizeof_system_thread"
 g_mutex_contents="$glib_cv_byte_contents_gmutex"
 
 g_memory_barrier_needed="$glib_memory_barrier_needed"
+g_gcc_atomic_ops="$glib_cv_gcc_has_builtin_atomic_operations"
 
 g_module_suffix="$glib_gmodule_suffix"
 
@@ -3712,6 +3807,7 @@ build/Makefile
 build/win32/Makefile
 build/win32/dirent/Makefile
 build/win32/vs9/Makefile
+build/win32/vs10/Makefile
 glib/Makefile
 glib/glib.stp
 glib/libcharset/Makefile
@@ -3728,6 +3824,8 @@ gobject/tests/Makefile
 gthread/Makefile
 gthread/tests/Makefile
 gio/Makefile
+gio/gdbus-codegen/Makefile
+gio/gdbus-codegen/config.py
 gio/xdgmime/Makefile
 gio/inotify/Makefile
 gio/libasyncns/Makefile
@@ -3735,6 +3833,7 @@ gio/fen/Makefile
 gio/fam/Makefile
 gio/win32/Makefile
 gio/tests/Makefile
+gio/tests/gdbus-object-manager-example/Makefile
 po/Makefile.in
 docs/Makefile
 docs/reference/Makefile
@@ -3743,6 +3842,7 @@ docs/reference/glib/version.xml
 docs/reference/gobject/Makefile
 docs/reference/gobject/version.xml
 docs/reference/gio/Makefile
+docs/reference/gio/gdbus-object-manager-example/Makefile
 docs/reference/gio/version.xml
 tests/Makefile
 tests/gobject/Makefile