X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=configure.ac;h=2703a32df7ca31f6700aca3ed5414bc581748479;hb=ea4f9ce8a060d53cbc299e4c384089f6cc926caa;hp=3811a26957be33957bf31c9357939b88b2f71079;hpb=341c0b1988542f88f6c506145fda2ebd694f3331;p=platform%2Fupstream%2Fglib.git diff --git a/configure.ac b/configure.ac index 3811a26..2703a32 100644 --- a/configure.ac +++ b/configure.ac @@ -30,8 +30,8 @@ m4_define(glib_configure_ac) # 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)]) @@ -61,7 +61,7 @@ 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} +cflags_set=${CFLAGS:+set} AM_INIT_AUTOMAKE([1.11 -Wno-portability no-define no-dist-gzip dist-xz tar-ustar]) AM_MAINTAINER_MODE([enable]) @@ -213,13 +213,19 @@ AM_CONDITIONAL(MS_LIB_AVAILABLE, [test x$ms_librarian = xyes]) 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, @@ -285,7 +291,7 @@ AC_SYS_LARGEFILE 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" ;; @@ -597,7 +603,7 @@ AC_CACHE_CHECK([for growing stack pointer],glib_cv_stack_grows,[ AC_TRY_RUN([ volatile int *a = 0, *b = 0; 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; } + int main () { volatile int y = 7; a = &y; f (100); return b > a ? 0 : 1; } ], glib_cv_stack_grows=yes , @@ -771,11 +777,11 @@ fi # check for header files -AC_CHECK_HEADERS([sys/param.h sys/poll.h sys/resource.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([linux/magic.h 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]) @@ -1665,8 +1671,7 @@ dnl ***************************** 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"]) @@ -2236,23 +2241,14 @@ AS_IF([ test x"$have_threads" = xposix], [ 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_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_MSG_CHECKING(for pthread_cond_timedwait_relative_np) AC_LINK_IFELSE( [AC_LANG_PROGRAM( [#include ], - [pthread_cond_timedwait_monotonic_np(NULL, NULL, NULL)])], + [pthread_cond_timedwait_relative_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" ]) @@ -2282,9 +2278,6 @@ case $host in *-*-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" ;; @@ -2297,7 +2290,6 @@ AC_SUBST(G_THREAD_LIBS_EXTRA) 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" ]) @@ -2394,13 +2386,7 @@ AC_CACHE_CHECK(for futex(2) system call, #include #include ],[ -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]) @@ -2411,12 +2397,7 @@ AC_CACHE_CHECK(for eventfd(2) system call, #include #include ],[ -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]) @@ -2429,11 +2410,11 @@ dnl **************************************** glib_poll_includes=[" #include -#include +#include "] 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) @@ -2458,9 +2439,6 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include - #ifdef HAVE_SYS_POLL_H - #include - #endif int main(void) { struct pollfd fds[1]; int fd; @@ -2596,7 +2574,7 @@ dnl ************************** # 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]) ]) @@ -2710,15 +2688,15 @@ dnl ************************************ 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 @@ -2729,7 +2707,7 @@ AS_IF([ test "x$use_gcov" = "xyes"], [ 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" @@ -2803,9 +2781,6 @@ _______EOF 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 @@ -2837,6 +2812,7 @@ _______EOF ### 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; @@ -3124,10 +3100,6 @@ else 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 @@ -3469,15 +3441,16 @@ dnl 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 @@ -3486,6 +3459,41 @@ fi 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 @@ -3502,7 +3510,7 @@ case "$host" in 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) @@ -3586,6 +3594,7 @@ build/win32/dirent/Makefile build/win32/vs9/Makefile build/win32/vs10/Makefile build/win32/vs11/Makefile +build/win32/vs12/Makefile glib/Makefile glib/glib.stp glib/libcharset/Makefile @@ -3614,6 +3623,7 @@ gio/tests/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