GApplications: Tighten up application-id validity checks
[platform/upstream/glib.git] / configure.ac
index 7e86232..adc2da8 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], [90])
+m4_define([glib_minor_version], [29])
+m4_define([glib_micro_version], [2])
 m4_define([glib_interface_age], [0])
 m4_define([glib_binary_age],
           [m4_eval(100 * glib_minor_version + glib_micro_version)])
@@ -49,16 +54,17 @@ 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])
 
-# 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, requires at least automake-1.11. Disable
+# by either passing --disable-silent-rules to configure or passing V=1
 # to make
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
 GLIB_MAJOR_VERSION=glib_major_version
 GLIB_MINOR_VERSION=glib_minor_version
@@ -567,6 +573,46 @@ 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_MSG_CHECKING([for qsort_r])
+AC_RUN_IFELSE([[
+#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;
+}]],[have_qsort_r=yes],[have_qsort_r=no])
+
+if test $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])
+fi
 
 AC_CHECK_SIZEOF(char)
 AC_CHECK_SIZEOF(short)
@@ -856,7 +902,7 @@ 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])
 
 # 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])
@@ -874,7 +920,7 @@ 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
@@ -2610,7 +2656,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],
@@ -3706,6 +3752,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