# <mclasen> on the unstable (ie master), interface age = 0
m4_define([glib_major_version], [2])
-m4_define([glib_minor_version], [39])
-m4_define([glib_micro_version], [2])
+m4_define([glib_minor_version], [43])
+m4_define([glib_micro_version], [1])
m4_define([glib_interface_age], [0])
m4_define([glib_binary_age],
[m4_eval(100 * glib_minor_version + glib_micro_version)])
AC_CONFIG_MACRO_DIR([m4macros])
# Save this value here, since automake will set cflags later
-cflags_set=${CFLAGS+set}
+cflags_set=${CFLAGS:+set}
AM_INIT_AUTOMAKE([1.11 -Wno-portability no-define no-dist-gzip dist-xz tar-ustar])
AM_MAINTAINER_MODE([enable])
AS_IF([test "x$glib_have_carbon" = "xyes"], [
AC_DEFINE(HAVE_CARBON, 1, [define to 1 if Carbon is available])
- LDFLAGS="$LDFLAGS -Wl,-framework,Carbon"
-])
+ CARBON_LIBS="-Wl,-framework,Carbon"
+ LDFLAGS="$LDFLAGS $CARBON_LIBS"
+], [CARBON_LIBS=""])
+
+AC_SUBST([CARBON_LIBS])
-if test "x$glib_have_cocoa" = "xyes"; then
+AS_IF([test "x$glib_have_cocoa" = "xyes"], [
AC_DEFINE(HAVE_COCOA, 1, [define to 1 if Cocoa is available])
- LDFLAGS="$LDFLAGS -Wl,-framework,Foundation"
-fi
+ COCOA_LIBS="-Wl,-framework,Foundation"
+ LDFLAGS="$LDFLAGS $COCOA_LIBS"
+], [COCOA_LIBS=""])
+
+AC_SUBST([COCOA_LIBS])
dnl declare --enable-* args and collect ac_help strings
AC_ARG_ENABLE(debug,
PKG_PROG_PKG_CONFIG(0.16)
if test "x$enable_debug" = "xyes"; then
- if test x$cflags_set != xset ; then
+ if test "x$cflags_set" != "x" ; then
case " $CFLAGS " in
*[[\ \ ]]-g[[\ \ ]]*) ;;
*) CFLAGS="$CFLAGS -g" ;;
AC_CACHE_CHECK([for growing stack pointer],glib_cv_stack_grows,[
AC_TRY_RUN([
volatile int *a = 0, *b = 0;
- void foo (void);
- int main () { volatile int y = 7; a = &y; foo (); return b > a; }
- void foo (void) { volatile int x = 5; b = &x; }
+ void f (int i) { volatile int x = 5; if (i == 0) b = &x; else f (i - 1); }
+ int main () { volatile int y = 7; a = &y; f (100); return b > a ? 0 : 1; }
],
- glib_cv_stack_grows=no
- ,
glib_cv_stack_grows=yes
+ ,
+ glib_cv_stack_grows=no
,)
])
# check for header files
-AC_CHECK_HEADERS([dirent.h pwd.h grp.h sys/param.h sys/poll.h sys/resource.h])
-AC_CHECK_HEADERS([sys/time.h sys/times.h sys/wait.h unistd.h])
-AC_CHECK_HEADERS([sys/select.h sys/types.h stdint.h inttypes.h sched.h malloc.h])
+AC_CHECK_HEADERS([sys/param.h sys/resource.h mach/mach_time.h])
+AC_CHECK_HEADERS([sys/select.h stdint.h inttypes.h sched.h malloc.h])
AC_CHECK_HEADERS([sys/vfs.h sys/vmount.h sys/statfs.h sys/statvfs.h sys/filio.h])
AC_CHECK_HEADERS([mntent.h sys/mnttab.h sys/vfstab.h sys/mntctl.h fstab.h])
-AC_CHECK_HEADERS([sys/uio.h])
-AC_CHECK_HEADERS([linux/magic.h])
-AC_CHECK_HEADERS([sys/prctl.h])
+AC_CHECK_HEADERS([linux/magic.h linux/memfd.h sys/prctl.h])
+
+# Some versions of MSC lack these
+AC_CHECK_HEADERS([dirent.h sys/time.h])
# We don't care about this, but we need to keep including it in
# glibconfig.h for backward compatibility
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])
AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_blocks, struct statfs.f_fstypename, struct statfs.f_bavail],,, [#include <sys/types.h>
#include <sys/stat.h>
+#ifdef G_OS_UNIX
#include <unistd.h>
+#endif
#ifdef HAVE_SYS_STATFS_H
#include <sys/statfs.h>
#endif
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
int main ()
{
ssize_t s = 1;
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
int main ()
{
ssize_t s = 1;
AC_MSG_RESULT($glib_ssize_type)
# Check for some functions
-AC_CHECK_FUNCS(lstat strsignal 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(lstat strsignal vsnprintf stpcpy strcasecmp strncasecmp poll vasprintf setenv unsetenv getc_unlocked readlink symlink fdwalk memmem)
+AC_CHECK_FUNCS(lchmod lchown fchmod fchown utimes getresuid)
AC_CHECK_FUNCS(getmntent_r setmntent endmntent hasmntopt getfsstat getvfsstat fallocate)
-# Check for high-resolution sleep functions
case $host_os in aix*) ac_cv_func_splice=no ;; esac # AIX splice() is something else
AC_CHECK_FUNCS(splice)
AC_CHECK_FUNCS(prlimit)
AC_CHECK_FUNCS(newlocale uselocale strtod_l strtoll_l strtoull_l)
-AC_FUNC_VSNPRINTF_C99
-AC_FUNC_PRINTF_UNIX98
-
# Internet address families
if test $glib_native_win32 = yes; then
glib_inet_includes=["
#
# Check whether to use an included printf
#
+AC_FUNC_VSNPRINTF_C99
+AC_FUNC_PRINTF_UNIX98
AC_ARG_ENABLE(included-printf,
[AS_HELP_STRING([--enable-included-printf],
inotify_support=no
AC_CHECK_HEADERS([sys/inotify.h],
[
- inotify_support=yes
- AC_CHECK_FUNCS(inotify_init1)
+ AC_CHECK_FUNCS(inotify_init1, [inotify_support=yes], [inotify_support=no])
])
AM_CONDITIONAL(HAVE_INOTIFY, [test "$inotify_support" = "yes"])
# to always be linked with the thread libs on some platforms.
# LIBS="$LIBS $G_THREAD_LIBS"
AC_CHECK_FUNCS(localtime_r gmtime_r)
-AS_IF([ test "$ac_cv_header_pwd_h" = "yes"], [
+AS_IF([ test "$glib_native_win32" != "yes"], [
AC_CACHE_CHECK([for posix getpwuid_r],
ac_cv_func_posix_getpwuid_r,
[AC_TRY_RUN([
fi
fi
])
-AS_IF([ test "$ac_cv_header_grp_h" = "yes"], [
+AS_IF([ test "$glib_native_win32" != "yes"], [
AC_CACHE_CHECK([for posix getgrgid_r],
ac_cv_func_posix_getgrgid_r,
[AC_TRY_RUN([
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_MSG_CHECKING(for pthread_cond_timedwait_relative_np)
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[#include <pthread.h>],
- [pthread_cond_timedwait_monotonic(NULL, NULL, NULL)])],
+ [pthread_cond_timedwait_relative_np(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_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP,1,
+ [Have function pthread_cond_timedwait_relative_np])],
[AC_MSG_RESULT(no)])
CPPFLAGS="$glib_save_CPPFLAGS"
])
*-*-freebsd*|*-*-linux*)
G_THREAD_LIBS_FOR_GTHREAD="`echo $G_THREAD_LIBS | sed s/-pthread/-lpthread/`"
;;
- *-*-openbsd*)
- LDFLAGS="$LDFLAGS -pthread"
- ;;
*)
G_THREAD_LIBS_FOR_GTHREAD="$G_THREAD_LIBS"
;;
AC_CHECK_FUNCS(clock_gettime, [], [
AC_CHECK_LIB(rt, 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"
])
#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])
#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])
glib_poll_includes=["
#include <sys/types.h>
-#include <sys/poll.h>
+#include <poll.h>
"]
AS_IF([ test $ac_cv_header_sys_types_h = yes &&
- test $ac_cv_header_sys_poll_h = yes ], [
+ test $ac_cv_func_poll = yes ], [
glib_failed=false
GLIB_CHECK_VALUE(POLLIN, $glib_poll_includes, glib_failed=true)
GLIB_CHECK_VALUE(POLLOUT, $glib_poll_includes, glib_failed=true)
#include <stdlib.h>
#include <fcntl.h>
#include <poll.h>
- #ifdef HAVE_SYS_POLL_H
- #include <sys/poll.h>
- #endif
int main(void) {
struct pollfd fds[1];
int fd;
# gtkdocize greps for ^GTK_DOC_CHECK and parses it, so you need to have
# it on it's own line.
m4_ifdef([GTK_DOC_CHECK], [
-GTK_DOC_CHECK([1.15], [--flavour no-tmpl])
+GTK_DOC_CHECK([1.20], [--flavour no-tmpl])
],[
AM_CONDITIONAL([ENABLE_GTK_DOC],[false])
])
dnl *** Enable lcov coverage reports ***
dnl ************************************
-AC_ARG_ENABLE(gcov,
- AS_HELP_STRING([--enable-gcov],
+AC_ARG_ENABLE(coverage,
+ AS_HELP_STRING([--enable-coverage],
[enable coverage testing with gcov]),
[use_gcov=$enableval], [use_gcov=no])
AS_IF([ test "x$use_gcov" = "xyes"], [
dnl we need gcc:
if test "$GCC" != "yes"; then
- AC_MSG_ERROR([GCC is required for --enable-gcov])
+ AC_MSG_ERROR([GCC is required for --enable-coverage])
fi
dnl Check if ccache is being used
esac
if test "$gcc_ccache" = "yes" && (test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"); 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.])
+ AC_MSG_ERROR([ccache must be disabled when --enable-coverage 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 1.10"
if test "$glib_header_alloca_h" = "yes"; then
echo '#define GLIB_HAVE_ALLOCA_H' >> $outfile
fi
- if test x$glib_sys_poll_h = xyes; then
- echo '#define GLIB_HAVE_SYS_POLL_H' >> $outfile
- fi
if test x$glib_included_printf != xyes; then
echo "
/* Specifies that GLib's g_print*() functions wrap the
### this should always be true in a modern C/C++ compiler
+ ### and is statically asserted by glib-init.c
cat >>$outfile <<_______EOF
typedef signed char gint8;
typedef unsigned char guint8;
glib_header_alloca_h="$ac_cv_header_alloca_h"
fi
-if test x$ac_cv_header_sys_poll_h = xyes ; then
- glib_sys_poll_h=yes
-fi
-
if test x$enable_included_printf = xyes ; then
glib_included_printf=yes
fi
AC_ARG_ENABLE(Bsymbolic,
[AS_HELP_STRING([--disable-Bsymbolic],
[avoid linking with -Bsymbolic])],,
- [SAVED_LDFLAGS="${LDFLAGS}"
+ [SAVED_LDFLAGS="${LDFLAGS}" SAVED_LIBS="${LIBS}"
AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
LDFLAGS=-Wl,-Bsymbolic-functions
- AC_TRY_LINK([], [int main (void) { return 0; }],
+ LIBS=
+ AC_TRY_LINK([], [return 0],
AC_MSG_RESULT(yes)
enable_Bsymbolic=yes,
AC_MSG_RESULT(no)
enable_Bsymbolic=no)
- LDFLAGS="${SAVED_LDFLAGS}"])
+ LDFLAGS="${SAVED_LDFLAGS}" LIBS="${SAVED_LIBS}"])
if test "x${enable_Bsymbolic}" = "xyes"; then
GLIB_LINK_FLAGS=-Wl,-Bsymbolic-functions
AC_SUBST(GLIB_LINK_FLAGS)
dnl
+dnl Check for -z,nodelete linker flag: the type system assumes that
+dnl libgobject stays loaded for the lifetime of the process.
+dnl Since ld.bfd does not treat wrong -z options as fatal by default,
+dnl we also try to check for the --fatal-warnings linker flag if
+dnl auto-detecting.
+dnl
+
+AC_ARG_ENABLE([znodelete],
+ [AS_HELP_STRING([--disable-znodelete],
+ [avoid linking with -z,nodelete])],,
+ [SAVED_LDFLAGS="${LDFLAGS}" SAVED_LIBS="${LIBS}"
+ AC_MSG_CHECKING([for --fatal-warnings linker flag])
+ LDFLAGS=-Wl,--fatal-warnings
+ LIBS=
+ AC_TRY_LINK([], [return 0],
+ AC_MSG_RESULT(yes)
+ [ldflags_fatal=-Wl,--fatal-warnings],
+ AC_MSG_RESULT(no)
+ ldflags_fatal=)
+ AC_MSG_CHECKING([for -z,nodelete linker flag])
+ LDFLAGS="$ldflags_fatal -Wl,-z,nodelete"
+ AC_TRY_LINK([], [return 0],
+ AC_MSG_RESULT(yes)
+ enable_znodelete=yes,
+ AC_MSG_RESULT(no)
+ enable_znodelete=no)
+ LDFLAGS="${SAVED_LDFLAGS}" LIBS="${SAVED_LIBS}"])
+
+if test "x${enable_znodelete}" = "xyes"; then
+ GOBJECT_LINK_FLAGS=-Wl,-z,nodelete
+fi
+
+AC_SUBST(GOBJECT_LINK_FLAGS)
+
+dnl
dnl Check for -fvisibility=hidden to determine if we can do GNU-style
dnl visibility attributes for symbol export control
dnl
SAVED_CFLAGS="${CFLAGS}"
CFLAGS="-fvisibility=hidden"
AC_MSG_CHECKING([for -fvisibility=hidden compiler flag])
- AC_TRY_COMPILE([], [int main (void) { return 0; }],
+ AC_TRY_COMPILE([], [return 0],
AC_MSG_RESULT(yes)
enable_fvisibility_hidden=yes,
AC_MSG_RESULT(no)
build/win32/vs9/Makefile
build/win32/vs10/Makefile
build/win32/vs11/Makefile
+build/win32/vs12/Makefile
glib/Makefile
glib/glib.stp
glib/libcharset/Makefile
gio/tests/gdbus-object-manager-example/Makefile
gio/tests/services/Makefile
gio/tests/services/org.gtk.GDBus.Examples.ObjectManager.service
+gio/tests/modules/Makefile
po/Makefile.in
docs/Makefile
docs/reference/Makefile