# 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)])
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
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)
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])
#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
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],
build/win32/Makefile
build/win32/dirent/Makefile
build/win32/vs9/Makefile
+build/win32/vs10/Makefile
glib/Makefile
glib/glib.stp
glib/libcharset/Makefile