Add example for 'change-state' signal
[platform/upstream/glib.git] / configure.ac
index 79d2b0c..91c053f 100644 (file)
@@ -27,7 +27,7 @@ m4_define(glib_configure_ac)
 
 m4_define([glib_major_version], [2])
 m4_define([glib_minor_version], [29])
-m4_define([glib_micro_version], [5])
+m4_define([glib_micro_version], [9])
 m4_define([glib_interface_age], [0])
 m4_define([glib_binary_age],
           [m4_eval(100 * glib_minor_version + glib_micro_version)])
@@ -59,12 +59,13 @@ 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. Disable
+# 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([yes])])
+AM_SILENT_RULES([yes])
 
 GLIB_MAJOR_VERSION=glib_major_version
 GLIB_MINOR_VERSION=glib_minor_version
@@ -103,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
@@ -580,45 +578,50 @@ AC_FUNC_VPRINTF
 AC_FUNC_ALLOCA
 AC_CHECK_FUNCS(mmap posix_memalign memalign valloc fsync pipe2)
 AC_CHECK_FUNCS(atexit on_exit timegm gmtime_r)
-# BSD has a qsort_r with wrong argument order
-AC_CACHE_CHECK([for qsort_r], 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;
+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])
 
-  if (*ia < *ib)
-    return -1;
-  else if (*ia > *ib)
-    return 1;
-  else
-    return 0;
-}
+# 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;
+  int
+  main (int argc, char **argv)
+  {
+    int arr[3] = { 1, 2, 0 };
+    int d = 3;
 
-  qsort_r (arr, 3, sizeof (int), cmp, &d);
+    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])])
+    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 $glib_cv_have_qsort_r = yes ; then
-  AC_MSG_RESULT([yes])
-    AC_DEFINE(HAVE_QSORT_R, 1, [Define to 1 if you have the 'qsort_r' function])
-else
-  AC_MSG_RESULT([no])
+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)
@@ -2577,8 +2580,8 @@ AM_CONDITIONAL(HAVE_GCC_BUILTINS_FOR_ATOMIC_OPERATIONS,
 dnl ************************
 dnl ** Check for futex(2) **
 dnl ************************
-AC_MSG_CHECKING([for futex(2) system call])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+AC_CACHE_CHECK(for futex(2) system call,
+    glib_cv_futex,AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
 #include <linux/futex.h>
 #include <sys/syscall.h>
 #include <unistd.h>
@@ -2590,14 +2593,26 @@ main (void)
   syscall (__NR_futex, NULL, FUTEX_WAKE, FUTEX_WAIT);
   return 0;
 }
-])],
-[
-  AC_MSG_RESULT(yes)
+])],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])
-],
-[
-  AC_MSG_RESULT(no)
-])
+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)
+{
+  eventfd (0, EFD_CLOEXEC);
+  return 0;
+}
+])],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
 
 dnl ****************************************
 dnl *** GLib POLL* compatibility defines ***