m4_define([glib_major_version], [2])
m4_define([glib_minor_version], [37])
-m4_define([glib_micro_version], [0])
+m4_define([glib_micro_version], [8])
m4_define([glib_interface_age], [0])
m4_define([glib_binary_age],
[m4_eval(100 * glib_minor_version + glib_micro_version)])
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
+AC_USE_SYSTEM_EXTENSIONS
AM_CONDITIONAL(HAVE_GCC, [test "$GCC" = "yes"])
LDFLAGS="$LDFLAGS -Wl,-framework,Foundation"
fi
-gl_GLIBC21
-AS_IF([test "x$GLIBC21" = "xyes"], [
- AC_DEFINE([_GNU_SOURCE], 1, [Make all glibc extensions visible])
-])
-
dnl declare --enable-* args and collect ac_help strings
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
[AS_HELP_STRING([--disable-rebuilds],
[disable all source autogeneration rules])],,
[enable_rebuilds=yes])
-AC_ARG_ENABLE(modular_tests,
- AS_HELP_STRING([--disable-modular-tests],
- [Disable build of test programs (default: no)]),,
- [enable_modular_tests=yes])
-AM_CONDITIONAL(BUILD_MODULAR_TESTS, test x$enable_modular_tests = xyes)
+
+GLIB_TESTS
AC_MSG_CHECKING([whether to enable garbage collector friendliness])
AS_IF([test "x$enable_gc_friendly" = "xyes"], [
fi
])
-AC_ARG_ENABLE(iconv-cache,
- [AS_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])
-case $enable_iconv_cache in
- auto)
- if test $ac_cv_gnu_library_2_1 = yes; then
- enable_iconv_cache=no
- else
- enable_iconv_cache=yes
- fi
- ;;
- yes|no)
- ;;
- *) AC_MSG_ERROR([Value given to --enable-iconv-cache must be one of yes, no or auto])
- ;;
-esac
-
-if test $enable_iconv_cache = yes; then
- AC_DEFINE(NEED_ICONV_CACHE,1,[Do we cache iconv descriptors])
-fi
-
-AC_MSG_RESULT($enable_iconv_cache)
-
-
dnl
dnl zlib support
dnl
AC_C_CONST
-dnl ok, here we try to check whether the systems prototypes for
-dnl malloc and friends actually match the prototypes provided
-dnl by gmem.h (keep in sync). i currently only know how to check
-dnl this reliably with gcc (-Werror), improvements for other
-dnl compilers are apprechiated.
-SANE_MALLOC_PROTOS=no
-AC_MSG_CHECKING([if malloc() and friends prototypes are gmem.h compatible])
-glib_save_CFLAGS=$CFLAGS
-AS_IF([test "x$GCC" = "xyes"], [
- CFLAGS="$CFLAGS -Werror"
- AC_TRY_COMPILE([#include <stdlib.h>], [
- void* (*my_calloc_p) (size_t, size_t) = calloc;
- void* (*my_malloc_p) (size_t) = malloc;
- void (*my_free_p) (void*) = free;
- void* (*my_realloc_p) (void*, size_t) = realloc;
- my_calloc_p = 0;
- my_malloc_p = 0;
- my_free_p = 0;
- my_realloc_p = 0;
- ],
- AC_DEFINE(SANE_MALLOC_PROTOS, 1,
- [Define if you have correct malloc prototypes])
- SANE_MALLOC_PROTOS=yes)
-])
-AC_MSG_RESULT($SANE_MALLOC_PROTOS)
-CFLAGS=$glib_save_CFLAGS
-
dnl
dnl check in which direction the stack grows
dnl
# 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 utimes getgrgid getpwuid getresuid)
-AC_CHECK_FUNCS(getmntent_r setmntent endmntent hasmntopt getfsstat getvfsstat)
+AC_CHECK_FUNCS(getmntent_r setmntent endmntent hasmntopt getfsstat getvfsstat fallocate)
# Check for high-resolution sleep functions
AC_CHECK_FUNCS(splice)
AC_CHECK_FUNCS(prlimit)
AC_MSG_ERROR([Could not determine values for MSG_* constants])
fi
-AC_CHECK_FUNCS(getprotobyname_r endservent if_nametoindex)
+AC_CHECK_FUNCS(getprotobyname_r endservent if_nametoindex if_indextoname)
AS_IF([test $glib_native_win32 = yes], [
# <wspiapi.h> in the Windows SDK and in mingw-w64 has wrappers for
fi
])
-dnl *** check for sane realloc() ***
-AC_CACHE_CHECK([whether realloc (NULL,) will work],glib_cv_sane_realloc,[
- AC_TRY_RUN([#include <stdlib.h>
- int main() {
- return realloc (0, sizeof (int)) == 0;
- }],
- [glib_cv_sane_realloc=yes],
- [glib_cv_sane_realloc=no],
- [glib_cv_sane_realloc=yes])
-])
-AS_IF([test x$glib_cv_sane_realloc = xyes], [
- AC_DEFINE(REALLOC_0_WORKS,1,[whether realloc (NULL,) works])
-])
-
dnl Check for nl_langinfo and CODESET
AC_LANG_SAVE
AC_LANG_C
AC_DEFINE(HAVE_PTHREAD_CONDATTR_SETCLOCK,1,
[Have function pthread_condattr_setclock])],
[AC_MSG_RESULT(no)])
+ AC_MSG_CHECKING(for pthread_cond_timedwait_monotonic)
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <pthread.h>],
+ [pthread_cond_timedwait_monotonic(NULL, NULL, NULL)])],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC,1,
+ [Have function pthread_cond_timedwait_monotonic])],
+ [AC_MSG_RESULT(no)])
+ AC_MSG_CHECKING(for pthread_cond_timedwait_monotonic_np)
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <pthread.h>],
+ [pthread_cond_timedwait_monotonic_np(NULL, NULL, NULL)])],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC_NP,1,
+ [Have function pthread_cond_timedwait_monotonic_np])],
+ [AC_MSG_RESULT(no)])
CPPFLAGS="$glib_save_CPPFLAGS"
])
glib_cv_g_atomic_lock_free=yes
;;
*)
- AC_TRY_COMPILE([],
+ AC_TRY_LINK([],
[volatile int atomic = 2;\
__sync_bool_compare_and_swap (&atomic, 2, 3);],
[glib_cv_g_atomic_lock_free=yes],
if test "$glib_cv_g_atomic_lock_free" = "no"; then
SAVE_CFLAGS="${CFLAGS}"
CFLAGS="-march=i486"
- AC_TRY_COMPILE([],
+ AC_TRY_LINK([],
[volatile int atomic = 2;\
__sync_bool_compare_and_swap (&atomic, 2, 3);],
[AC_MSG_ERROR([GLib must be build with -march=i486 or later.])],
# Some compilers support atomic operations but do not define
# __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4, like clang
if test x"$glib_cv_g_atomic_lock_free" = xyes; then
- AC_TRY_COMPILE([],
+ AC_TRY_LINK([],
[__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4;],
[],
[AC_DEFINE(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4, 1, [ compiler supports atomic operations])])
AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
-AS_IF([ test $cross_compiling = yes && test x$enable_modular_tests = xyes], [
+AS_IF([ test $cross_compiling = yes ], [
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal, no)
if test x$GLIB_GENMARSHAL = xno; then
AC_MSG_ERROR(Could not find a glib-genmarshal in your PATH)
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 1.9"
+ ltp_version_list="1.6 1.7 1.8 1.9 1.10"
AC_CHECK_PROG(LTP, lcov, lcov)
AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)
# Check for libdbus1 - Optional - is only used in the GDBus test cases
#
# 1.2.14 required for dbus_message_set_serial
-AS_IF([ test x$enable_modular_tests = xyes], [
- PKG_CHECK_MODULES(DBUS1,
- dbus-1 >= 1.2.14,
- [AC_DEFINE(HAVE_DBUS1, 1, [Define if dbus-1 is available]) have_dbus1=yes],
- have_dbus1=no)
- AC_SUBST(DBUS1_CFLAGS)
- AC_SUBST(DBUS1_LIBS)
-])
+PKG_CHECK_MODULES(DBUS1,
+ dbus-1 >= 1.2.14,
+ [AC_DEFINE(HAVE_DBUS1, 1, [Define if dbus-1 is available]) have_dbus1=yes],
+ have_dbus1=no)
+AC_SUBST(DBUS1_CFLAGS)
+AC_SUBST(DBUS1_LIBS)
AM_CONDITIONAL(HAVE_DBUS1, [test "x$have_dbus1" = "xyes"])
AC_CHECK_PROGS([DBUS_DAEMON], [dbus-daemon])