# <mclasen> on the unstable (ie master), interface age = 0
m4_define([glib_major_version], [2])
-m4_define([glib_minor_version], [37])
-m4_define([glib_micro_version], [0])
+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])
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
+AC_USE_SYSTEM_EXTENSIONS
AM_CONDITIONAL(HAVE_GCC, [test "$GCC" = "yes"])
AC_CANONICAL_HOST
-AC_MSG_CHECKING([for the BeOS])
-case $host in
- *-*-beos*)
- glib_native_beos="yes"
- ;;
- *)
- glib_native_beos="no"
- ;;
-esac
-AC_MSG_RESULT([$glib_native_beos])
-
dnl
AC_MSG_CHECKING([for Win32])
AC_MSG_RESULT([$glib_native_win32])
+AC_MSG_CHECKING([for the Android])
+case $host in
+ *android*)
+ glib_native_android="yes"
+ ;;
+ *)
+ glib_native_android="no"
+ ;;
+esac
+AC_MSG_RESULT([$glib_native_android])
+
AC_SUBST(LIB_EXE_MACHINE_FLAG)
glib_have_carbon=no
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=""])
-if test "x$glib_have_cocoa" = "xyes"; then
+AC_SUBST([CARBON_LIBS])
+
+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=""])
-gl_GLIBC21
-AS_IF([test "x$GLIBC21" = "xyes"], [
- AC_DEFINE([_GNU_SOURCE], 1, [Make all glibc extensions visible])
-])
+AC_SUBST([COCOA_LIBS])
dnl declare --enable-* args and collect ac_help strings
AC_ARG_ENABLE(debug,
[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"], [
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" ;;
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
])
AM_CONDITIONAL(OS_WIN32_AND_DLL_COMPILATION, [test x$glib_native_win32 = xyes -a x$glib_win32_static_compilation != xyes])
-dnl
-dnl DU4 native cc currently needs -std1 for ANSI mode (instead of K&R)
-dnl
-AS_IF([test $cross_compiling != yes], [
- AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
- glib_save_LIBS=$LIBS
- LIBS="$LIBS -lm"
- AC_TRY_RUN([#include <math.h>
- int main (void) { return (log(1) != log(1.)); }],
- AC_MSG_RESULT(none needed),
- glib_save_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS -std1"
- AC_TRY_RUN([#include <math.h>
- int main (void) { return (log(1) != log(1.)); }],
- AC_MSG_RESULT(-std1),
- AC_MSG_RESULT()
- CFLAGS=$glib_save_CFLAGS
- AC_MSG_WARN(
- [No ANSI prototypes found in library. (-std1 didn't work.)])
- )
- )
- LIBS=$glib_save_LIBS
-])
-
-dnl NeXTStep cc seems to need this
-AC_MSG_CHECKING([for extra flags for POSIX compliance])
-AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
- AC_MSG_RESULT(none needed),
- glib_save_CFLAGS=$CFLAGS
- CFLAGS="$CFLAGS -posix"
- AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
- AC_MSG_RESULT(-posix),
- AC_MSG_RESULT()
- CFLAGS=$glib_save_CFLAGS
- AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
-
# Checks for library functions.
-AC_FUNC_VPRINTF
AC_FUNC_ALLOCA
AC_CHECK_FUNCS(mmap posix_memalign memalign valloc fsync pipe2 issetugid)
-AC_CHECK_FUNCS(atexit on_exit timegm gmtime_r)
+AC_CHECK_FUNCS(timegm gmtime_r)
AC_CACHE_CHECK([for __libc_enable_secure], glib_cv_have_libc_enable_secure,
[AC_TRY_LINK([#include <unistd.h>
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
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
,)
])
}]])],[g_can_inline=yes],[g_can_inline=no])
AC_MSG_RESULT($g_can_inline)
-dnl *** check for working do while(0) macros ***
-AC_CACHE_CHECK([for working do while(0) macros], g_cv_support_dowhile_macros, [
- AC_TRY_COMPILE([],[
- #define STMT_START do
- #define STMT_END while(0)
- #define STMT_TEST STMT_START { i = 0; } STMT_END
- int main(void) { int i = 1; STMT_TEST; return i; }],
- [g_cv_support_dowhile_macros=yes],
- [g_cv_support_dowhile_macros=no],
- [g_cv_support_dowhile_macros=yes])
-])
-if test x$g_cv_support_dowhile_macros = xyes; then
- AC_DEFINE(HAVE_DOWHILE_MACROS, 1, [define for working do while(0) macros])
-fi
-
# check for flavours of varargs macros
AC_MSG_CHECKING(for ISO C99 varargs macros in C)
AC_TRY_COMPILE([],[
# check for header files
-AC_CHECK_HEADERS([dirent.h float.h limits.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 values.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 sys/mkdev.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_HEADERS([values.h])
AC_CHECK_HEADERS([sys/mount.h sys/sysctl.h], [], [],
[#if HAVE_SYS_PARAM_H
])
AC_CHECK_FUNCS(sysctlbyname)
+AC_HEADER_MAJOR
AC_CHECK_HEADERS([xlocale.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])
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
# Checks for libcharset
AM_LANGINFO_CODESET
-AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
-AC_CHECK_FUNCS(setlocale)
+gl_GLIBC21
# check additional type sizes
AC_CHECK_SIZEOF(size_t)
-dnl Try to figure out whether gsize, gssize should be long or int
+dnl Try to figure out whether gsize should be long or int
AC_MSG_CHECKING([for the appropriate definition for size_t])
case $ac_cv_sizeof_size_t in
AC_MSG_RESULT(unsigned $glib_size_type)
+AC_CHECK_SIZEOF(ssize_t)
+
+dnl Try to figure out whether gssize should be long or int
+AC_MSG_CHECKING([for the appropriate definition for ssize_t])
+
+case $ac_cv_sizeof_ssize_t in
+ $ac_cv_sizeof_short)
+ glib_ssize_type=short
+ ;;
+ $ac_cv_sizeof_int)
+ glib_ssize_type=int
+ ;;
+ $ac_cv_sizeof_long)
+ glib_ssize_type=long
+ ;;
+ $ac_cv_sizeof_long_long)
+ glib_ssize_type='long long'
+ ;;
+ $ac_cv_sizeof__int64)
+ glib_ssize_type='__int64'
+ ;;
+ *) AC_MSG_ERROR([No type matching ssize_t in size])
+ ;;
+esac
+
+dnl If int/long are the same size, we see which one produces
+dnl warnings when used in the location as ssize_t. (This matters
+dnl on Android where ssize_t is long and size_t is unsigned int)
+dnl
+AS_IF([test $ac_cv_sizeof_ssize_t = $ac_cv_sizeof_int &&
+ test $ac_cv_sizeof_ssize_t = $ac_cv_sizeof_long], [
+ GLIB_CHECK_COMPILE_WARNINGS([AC_LANG_SOURCE([[
+#if defined(_AIX) && !defined(__GNUC__)
+#pragma options langlvl=stdc89
+#endif
+#include <stddef.h>
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#include <sys/types.h>
+int main ()
+{
+ ssize_t s = 1;
+ int *size_int = &s;
+ return (int)*size_int;
+}
+ ]])],glib_ssize_type=int,
+ [GLIB_CHECK_COMPILE_WARNINGS([AC_LANG_SOURCE([[
+#if defined(_AIX) && !defined(__GNUC__)
+#pragma options langlvl=stdc89
+#endif
+#include <stddef.h>
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#include <sys/types.h>
+int main ()
+{
+ ssize_t s = 1;
+ long *size_long = &s;
+ return (int)*size_long;
+}
+ ]])],glib_ssize_type=long)])
+])
+
+AC_MSG_RESULT($glib_ssize_type)
+
# 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)
-# Check for high-resolution sleep functions
+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)
+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=["
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
AC_CHECK_HEADER([wspiapi.h], [WSPIAPI_INCLUDE="#include <wspiapi.h>"])
AC_SUBST(WSPIAPI_INCLUDE)
], [
- AC_MSG_CHECKING([if arpa/nameser_compat.h is needed])
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
- #include <arpa/nameser.h>],
- [int qclass = C_IN;])],
- [AC_MSG_RESULT([no])],
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
- #include <arpa/nameser.h>
- #include <arpa/nameser_compat.h>],
- [int qclass = C_IN;])],
- [AC_MSG_RESULT([yes])
- NAMESER_COMPAT_INCLUDE="#include <arpa/nameser_compat.h>"],
- [AC_MSG_ERROR([could not compile test program either way])])])
+ # Android does not have C_IN in public headers, we define it wherever necessary
+ AS_IF([test $glib_native_android != yes], [
+ AC_MSG_CHECKING([if arpa/nameser_compat.h is needed])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
+ #include <arpa/nameser.h>],
+ [int qclass = C_IN;])],
+ [AC_MSG_RESULT([no])],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
+ #include <arpa/nameser.h>
+ #include <arpa/nameser_compat.h>],
+ [int qclass = C_IN;])],
+ [AC_MSG_RESULT([yes])
+ NAMESER_COMPAT_INCLUDE="#include <arpa/nameser_compat.h>"],
+ [AC_MSG_ERROR([could not compile test program either way])])])])
AC_SUBST(NAMESER_COMPAT_INCLUDE)
# We can't just use AC_CHECK_FUNC/AC_CHECK_LIB here. Bug 586150
AC_CHECK_FUNC(socket, :, AC_CHECK_LIB(socket, socket,
[NETWORK_LIBS="-lsocket $NETWORK_LIBS"],
[AC_MSG_ERROR(Could not find socket())]))
+ save_libs="$LIBS"
+ LIBS="$LIBS $NETWORK_LIBS"
+ AC_MSG_CHECKING([for res_init])
+ AC_TRY_LINK([#include <sys/types.h>
+ #include <netinet/in.h>
+ #include <arpa/nameser.h>
+ #include <resolv.h>
+ ],[
+ res_init();
+ ],[AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_RES_INIT, 1, [Define to 1 if you have the 'res_init' function.])
+ ],[AC_MSG_RESULT([no])])
+ LIBS="$save_libs"
])
AC_SUBST(NETWORK_LIBS)
AC_MSG_ERROR([unable to determine number of arguments to statfs()])])])
])
+dnl
+dnl open takes O_DIRECTORY as an option
+dnl
+AC_MSG_CHECKING([open() option O_DIRECTORY])
+AC_TRY_COMPILE([#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>],
+[open(0, O_DIRECTORY, 0);],[
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_OPEN_O_DIRECTORY, 1, [open option O_DIRECTORY])],[
+ AC_MSG_RESULT([no])])
+
#
# 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],
AC_CHECK_FUNCS([snprintf wcslen])
AC_FUNC_SNPRINTF_C99
-# Check if bcopy can be used for overlapping copies, if memmove isn't found.
-# The check is borrowed from the PERL Configure script.
-AS_IF([test "$ac_cv_func_memmove" != "yes"], [
- AC_CACHE_CHECK(whether bcopy can handle overlapping copies,
- glib_cv_working_bcopy,[AC_TRY_RUN([
- int main() {
- char buf[128], abc[128], *b;
- int len, off, align;
- bcopy("abcdefghijklmnopqrstuvwxyz0123456789", abc, 36);
- for (align = 7; align >= 0; align--) {
- for (len = 36; len; len--) {
- b = buf+align; bcopy(abc, b, len);
- for (off = 1; off <= len; off++) {
- bcopy(b, b+off, len); bcopy(b+off, b, len);
- if (bcmp(b, abc, len)) return(1);
- }
- }
- }
- return(0);
- }],glib_cv_working_bcopy=yes,glib_cv_working_bcopy=no)])
-
- GLIB_ASSERT_SET(glib_cv_working_bcopy)
- if test "$glib_cv_working_bcopy" = "yes"; then
- AC_DEFINE(HAVE_WORKING_BCOPY,1,[Have a working bcopy])
- fi
-])
-
# Check if <sys/select.h> needs to be included for fd_set
AC_MSG_CHECKING([for fd_set])
AC_TRY_COMPILE([#include <sys/types.h>],
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
[G_MODULE_IMPL=G_MODULE_IMPL_DL],[])],
[])
])
-dnl *** load_image (BeOS)
-AS_IF([test -z "$G_MODULE_IMPL" && test "x$glib_native_beos" = "xyes"], [
- AC_CHECK_LIB(root, load_image,
- [G_MODULE_LIBS="-lbe -lroot -lglib-2.0 "
- G_MODULE_LIBS_EXTRA="-L\$(top_builddir_full)/.libs"
- G_MODULE_PLUGIN_LIBS="-L\$(top_builddir_full)/gmodule/.libs -lgmodule"
- G_MODULE_IMPL=G_MODULE_IMPL_BEOS],
- [])
-])
dnl *** NSLinkModule (dyld) in system libraries (Darwin)
AS_IF([ test -z "$G_MODULE_IMPL" ], [
AC_CHECK_FUNC(NSLinkModule,
G_MODULE_IMPL=G_MODULE_IMPL_DL],[])],
[])
])
-dnl *** shl_load() in libdld (HP-UX)
-AS_IF([ test -z "$G_MODULE_IMPL"], [
- AC_CHECK_LIB(dld, shl_load,
- [G_MODULE_LIBS=-ldld
- G_MODULE_IMPL=G_MODULE_IMPL_DLD],
- [])
-])
dnl *** additional checks for G_MODULE_IMPL_DL
AS_IF([ test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL" ], [
LIBS_orig="$LIBS"
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"])
have_threads=no
AS_IF([ test "x$with_threads" = xyes || test "x$with_threads" = xposix], [
- # -D_POSIX4_DRAFT_SOURCE -D_POSIX4A_DRAFT10_SOURCE is for DG/UX
- # -U_OSF_SOURCE is for Digital UNIX 4.0d
- GTHREAD_COMPILE_IMPL_DEFINES="-D_POSIX4_DRAFT_SOURCE -D_POSIX4A_DRAFT10_SOURCE -U_OSF_SOURCE"
- glib_save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $GTHREAD_COMPILE_IMPL_DEFINES"
AS_IF([ test "x$have_threads" = xno], [
AC_TRY_COMPILE([#include <pthread.h>],
[pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;],
have_threads=posix)
])
# Tru64Unix requires -pthread to find pthread.h. See #103020
- CPPFLAGS="$CPPFLAGS -pthread"
if test "x$have_threads" = xno; then
- AC_TRY_COMPILE([#include <pthread.h>],
+ glib_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -pthread"
+ AC_TRY_COMPILE([#include <pthread.h>],
[pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;],
have_threads=posix)
+ CPPFLAGS="$glib_save_CPPFLAGS"
fi
- CPPFLAGS="$glib_save_CPPFLAGS"
])
if test "x$with_threads" = xyes || test "x$with_threads" = xwin32; then
case $host in
G_THREAD_CFLAGS="-D_THREAD_SAFE"
fi
;;
- *-dg-dgux*) # DG/UX
- G_THREAD_CFLAGS="-D_REENTRANT -D_POSIX4A_DRAFT10_SOURCE"
- ;;
*-sysv5uw7*) # UnixWare 7
# We are not using gcc with -pthread. Catched above.
G_THREAD_CFLAGS="-Kthread"
])
g_threads_impl="POSIX"
+ AC_DEFINE([THREADS_POSIX], [1], [Use pthreads])
AC_SUBST(GTHREAD_COMPILE_IMPL_DEFINES)
CPPFLAGS="$glib_save_CPPFLAGS"
], [test x$have_threads = xwin32], [
+ AC_DEFINE([THREADS_WIN32], [1], [Use w32 threads])
g_threads_impl="WIN32"
], [
+ AC_DEFINE([THREADS_NONE], [1], [Use no threads])
g_threads_impl="NONE"
G_THREAD_LIBS=error
])
+AM_CONDITIONAL(THREADS_POSIX, [test "$g_threads_impl" = "POSIX"])
+AM_CONDITIONAL(THREADS_WIN32, [test "$g_threads_impl" = "WIN32"])
+AM_CONDITIONAL(THREADS_NONE, [test "$g_threads_impl" = "NONE"])
if test "x$G_THREAD_LIBS" = xerror; then
AC_MSG_ERROR($LIBS_NOT_FOUND_1$have_threads$LIBS_NOT_FOUND_2)
fi
-case $host in
- *-*-beos*)
- G_THREAD_LIBS="-lbe -lroot -lglib-2.0 "
- G_THREAD_LIBS_EXTRA="-L\$(top_builddir_full)/.libs"
- ;;
- *)
- ;;
-esac
-
AC_MSG_CHECKING(thread related libraries)
AC_MSG_RESULT($G_THREAD_LIBS)
# 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_relative_np)
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <pthread.h>],
+ [pthread_cond_timedwait_relative_np(NULL, NULL, NULL)])],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP,1,
+ [Have function pthread_cond_timedwait_relative_np])],
+ [AC_MSG_RESULT(no)])
CPPFLAGS="$glib_save_CPPFLAGS"
])
# b) FreeBSD doesn't do this either.
#
case $host in
+ *android*)
+ G_THREAD_LIBS_FOR_GTHREAD="$G_THREAD_LIBS"
+ ;;
*-*-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"
])
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])])
#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;
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)
# 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"
+ 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)
_______EOF
- if test x$glib_limits_h = xyes; then
- echo '#include <limits.h>' >> $outfile
- fi
- if test x$glib_float_h = xyes; then
- echo '#include <float.h>' >> $outfile
- fi
+ echo '#include <limits.h>' >> $outfile
+ echo '#include <float.h>' >> $outfile
if test x$glib_values_h = xyes; then
echo '#include <values.h>' >> $outfile
fi
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
G_BEGIN_DECLS
-#define G_MINFLOAT $glib_mf
-#define G_MAXFLOAT $glib_Mf
-#define G_MINDOUBLE $glib_md
-#define G_MAXDOUBLE $glib_Md
-#define G_MINSHORT $glib_ms
-#define G_MAXSHORT $glib_Ms
-#define G_MAXUSHORT $glib_Mus
-#define G_MININT $glib_mi
-#define G_MAXINT $glib_Mi
-#define G_MAXUINT $glib_Mui
-#define G_MINLONG $glib_ml
-#define G_MAXLONG $glib_Ml
-#define G_MAXULONG $glib_Mul
+#define G_MINFLOAT FLT_MIN
+#define G_MAXFLOAT FLT_MAX
+#define G_MINDOUBLE DBL_MIN
+#define G_MAXDOUBLE DBL_MAX
+#define G_MINSHORT SHRT_MIN
+#define G_MAXSHORT SHRT_MAX
+#define G_MAXUSHORT USHRT_MAX
+#define G_MININT INT_MIN
+#define G_MAXINT INT_MAX
+#define G_MAXUINT UINT_MAX
+#define G_MINLONG LONG_MIN
+#define G_MAXLONG LONG_MAX
+#define G_MAXULONG ULONG_MAX
_______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;
#define GLIB_SIZEOF_VOID_P $glib_void_p
#define GLIB_SIZEOF_LONG $glib_long
#define GLIB_SIZEOF_SIZE_T $glib_size_t
+#define GLIB_SIZEOF_SSIZE_T $glib_ssize_t
_______EOF
cat >>$outfile <<_______EOF
-typedef signed $glib_size_type_define gssize;
+typedef signed $glib_ssize_type_define gssize;
typedef unsigned $glib_size_type_define gsize;
#define G_GSIZE_MODIFIER $gsize_modifier
-#define G_GSSIZE_FORMAT $gssize_format
+#define G_GSSIZE_MODIFIER $gssize_modifier
#define G_GSIZE_FORMAT $gsize_format
+#define G_GSSIZE_FORMAT $gssize_format
#define G_MAXSIZE G_MAXU$glib_msize_type
-#define G_MINSSIZE G_MIN$glib_msize_type
-#define G_MAXSSIZE G_MAX$glib_msize_type
+#define G_MINSSIZE G_MIN$glib_mssize_type
+#define G_MAXSSIZE G_MAX$glib_mssize_type
typedef gint64 goffset;
#define G_MINOFFSET G_MININT64
cat >>$outfile <<_______EOF
-$glib_atexit
-$glib_memmove
+#ifndef G_DISABLE_DEPRECATED
+#define g_ATEXIT(proc) (atexit (proc))
+#define g_memmove(dest,src,len) G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END
+#endif
$glib_defines
$glib_os
$glib_static_compilation
if test x$g_have_eilseq = xno; then
cat >>$outfile <<_______EOF
#ifndef EILSEQ
-/* On some systems, like SunOS and NetBSD, EILSEQ is not defined.
+/* On some pre-C99 systems, EILSEQ is not defined.
* The correspondence between this and the corresponding definition
* in libiconv is essential.
*/
#define GINT_TO_BE(val) ((gint) GINT${gintbits}_TO_BE (val))
#define GUINT_TO_BE(val) ((guint) GUINT${gintbits}_TO_BE (val))
#define GSIZE_TO_LE(val) ((gsize) GUINT${gsizebits}_TO_LE (val))
-#define GSSIZE_TO_LE(val) ((gssize) GINT${gsizebits}_TO_LE (val))
+#define GSSIZE_TO_LE(val) ((gssize) GINT${gssizebits}_TO_LE (val))
#define GSIZE_TO_BE(val) ((gsize) GUINT${gsizebits}_TO_BE (val))
-#define GSSIZE_TO_BE(val) ((gssize) GINT${gsizebits}_TO_BE (val))
+#define GSSIZE_TO_BE(val) ((gssize) GINT${gssizebits}_TO_BE (val))
#define G_BYTE_ORDER $g_byte_order
#define GLIB_SYSDEF_POLLIN =$g_pollin
glib_header_alloca_h="$ac_cv_header_alloca_h"
fi
-case xyes in
-x$ac_cv_header_float_h)
- glib_float_h=yes
- glib_mf=FLT_MIN glib_Mf=FLT_MAX
- glib_md=DBL_MIN glib_Md=DBL_MAX
- ;;
-x$ac_cv_header_values_h)
- glib_values_h=yes
- glib_mf=MINFLOAT glib_Mf=MAXFLOAT
- glib_md=MINDOUBLE glib_Md=MAXDOUBLE
- ;;
-esac
-
-case xyes in
-x$ac_cv_header_limits_h)
- glib_limits_h=yes
- glib_ms=SHRT_MIN glib_Ms=SHRT_MAX glib_Mus=USHRT_MAX
- glib_mi=INT_MIN glib_Mi=INT_MAX glib_Mui=UINT_MAX
- glib_ml=LONG_MIN glib_Ml=LONG_MAX glib_Mul=ULONG_MAX
- ;;
-x$ac_cv_header_values_h)
- glib_values_h=yes
- glib_ms=MINSHORT glib_Ms=MAXSHORT glib_Mus="(((gushort)G_MAXSHORT)*2+1)"
- glib_mi=MININT glib_Mi=MAXINT glib_Mui="(((guint)G_MAXINT)*2+1)"
- glib_ml=MINLONG glib_Ml=MAXLONG glib_Mul="(((gulong)G_MAXLONG)*2+1)"
- ;;
-esac
-
-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
;;
esac
glib_size_t=$ac_cv_sizeof_size_t
+glib_ssize_t=$ac_cv_sizeof_ssize_t
glib_size_type_define="$glib_size_type"
+glib_ssize_type_define="$glib_ssize_type"
glib_void_p=$ac_cv_sizeof_void_p
glib_long=$ac_cv_sizeof_long
short)
gsize_modifier='"h"'
gsize_format='"hu"'
- gssize_format='"hi"'
glib_msize_type='SHRT'
;;
int)
gsize_modifier='""'
gsize_format='"u"'
- gssize_format='"i"'
glib_msize_type='INT'
;;
long)
gsize_modifier='"l"'
gsize_format='"lu"'
- gssize_format='"li"'
glib_msize_type='LONG'
;;
"long long"|__int64)
gsize_modifier='"I64"'
gsize_format='"I64u"'
- gssize_format='"I64i"'
glib_msize_type='INT64'
;;
esac
+case "$glib_ssize_type" in
+short)
+ gssize_modifier='"h"'
+ gssize_format='"hi"'
+ glib_mssize_type='SHRT'
+ ;;
+int)
+ gssize_modifier='""'
+ gssize_format='"i"'
+ glib_mssize_type='INT'
+ ;;
+long)
+ gssize_modifier='"l"'
+ gssize_format='"li"'
+ glib_mssize_type='LONG'
+ ;;
+"long long"|__int64)
+ gssize_modifier='"I64"'
+ gssize_format='"I64i"'
+ glib_mssize_type='INT64'
+ ;;
+esac
+
gintbits=`expr $ac_cv_sizeof_int \* 8`
glongbits=`expr $ac_cv_sizeof_long \* 8`
gsizebits=`expr $ac_cv_sizeof_size_t \* 8`
+gssizebits=`expr $ac_cv_sizeof_ssize_t \* 8`
case $ac_cv_sizeof_void_p in
$ac_cv_sizeof_int)
esac
-case xyes in
-x$ac_cv_func_atexit)
- glib_atexit="
-#ifdef NeXT /* @#%@! NeXTStep */
-# define g_ATEXIT(proc) (!atexit (proc))
-#else
-# define g_ATEXIT(proc) (atexit (proc))
-#endif"
- ;;
-x$ac_cv_func_on_exit)
- glib_atexit="
-#define g_ATEXIT(proc) (on_exit ((void (*)(int, void*))(proc), NULL))"
- ;;
-esac
-
-case xyes in
-x$ac_cv_func_memmove)
- glib_memmove='
-#define g_memmove(dest,src,len) G_STMT_START { memmove ((dest), (src), (len)); } G_STMT_END'
- ;;
-x$glib_cv_working_bcopy)
- glib_memmove="
-/* memmove isn't available, but bcopy can copy overlapping memory regions */
-#define g_memmove(d,s,n) G_STMT_START { bcopy ((s), (d), (n)); } G_STMT_END"
- ;;
-*)
- glib_memmove="
-/* memmove isn't found and bcopy can't copy overlapping memory regions,
- * so we have to roll our own copy routine. */
-void g_memmove (void* dest, const void * src, unsigned long len);"
- ;;
-esac
-
glib_defines="
#define GLIB_MAJOR_VERSION $GLIB_MAJOR_VERSION
#define GLIB_MINOR_VERSION $GLIB_MINOR_VERSION
g_pid_type="$glib_pid_type"
case $host in
- *-*-beos*)
- glib_os="#define G_OS_BEOS"
- ;;
*-*-cygwin*)
glib_os="#define G_OS_UNIX
#define G_PLATFORM_WIN32
# 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])
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