m4_define([glib_major_version], [2])
m4_define([glib_minor_version], [29])
-m4_define([glib_micro_version], [0])
+m4_define([glib_micro_version], [12])
m4_define([glib_interface_age], [0])
m4_define([glib_binary_age],
[m4_eval(100 * glib_minor_version + glib_micro_version)])
# Save this value here, since automake will set cflags later
cflags_set=${CFLAGS+set}
-AM_INIT_AUTOMAKE([1.10 no-define])
+AM_INIT_AUTOMAKE([1.11 no-define no-dist-gzip dist-xz tar-ustar])
+AM_MAINTAINER_MODE([enable])
-# Support silent build rules, requires at least automake-1.11. Disable
+# Support silent build rules. Disable
# by either passing --disable-silent-rules to configure or passing V=1
# to make
-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+AM_SILENT_RULES([yes])
GLIB_MAJOR_VERSION=glib_major_version
GLIB_MINOR_VERSION=glib_minor_version
AC_SUBST(LT_AGE)
AC_SUBST(LT_CURRENT_MINUS_AGE)
-dnl Initialize maintainer mode
-AM_MAINTAINER_MODE
-
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
LDFLAGS="$LDFLAGS -framework Carbon"
fi
+gl_GLIBC21
+if test "x$GLIBC21" = "xyes"; then
+ AC_DEFINE([_GNU_SOURCE], 1, [Make all glibc extensions visible])
+fi
dnl declare --enable-* args and collect ac_help strings
AC_ARG_ENABLE(debug,
fi
fi
-gl_GLIBC21
AC_ARG_ENABLE(iconv-cache,
[AC_HELP_STRING([--enable-iconv-cache=@<:@yes/no/auto@:>@],
[cache iconv descriptors [default=auto]])],,
AC_SUBST(ZLIB_LIBS)
fi
+PKG_CHECK_MODULES(LIBFFI, [libffi >= 3.0.0])
+AC_SUBST(LIBFFI_CFLAGS)
+AC_SUBST(LIBFFI_LIBS)
+
dnl
dnl gettext support
dnl
AC_CHECK_FUNCS(mmap posix_memalign memalign valloc fsync pipe2)
AC_CHECK_FUNCS(atexit on_exit timegm gmtime_r)
+dnl don't use AC_CHECK_FUNCS here, otherwise HAVE_QSORT_R will
+dnl be automatically defined, which we don't want to do
+dnl until we have checked this function is actually usable
+AC_CHECK_FUNC([qsort_r])
+
+# BSD has a qsort_r with wrong argument order
+if test x$ac_cv_func_qsort_r = xyes ; then
+ AC_CACHE_CHECK([if qsort_r uses glibc compatible argument order], glib_cv_have_qsort_r, [
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #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;
+ }]])],[glib_cv_have_qsort_r=yes],[glib_cv_have_qsort_r=no])])
+fi
+
+if test x$glib_cv_have_qsort_r = xyes ; then
+ AC_DEFINE(HAVE_QSORT_R, 1, [Define to 1 if you have the 'qsort_r' function])
+fi
+
AC_CHECK_SIZEOF(char)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(long)
dnl truely know which ones of `inline', `__inline' and `__inline__' are
dnl actually supported.
AC_CACHE_CHECK([for __inline],glib_cv_has__inline,[
- AC_COMPILE_IFELSE([
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
__inline int foo () { return 0; }
int main () { return foo (); }
- ],
+ ]])],
glib_cv_has__inline=yes
,
glib_cv_has__inline=no
xyes) AC_DEFINE(G_HAVE___INLINE,1,[Have __inline keyword])
esac
AC_CACHE_CHECK([for __inline__],glib_cv_has__inline__,[
- AC_COMPILE_IFELSE([
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
__inline__ int foo () { return 0; }
int main () { return foo (); }
- ],
+ ]])],
glib_cv_has__inline__=yes
,
glib_cv_has__inline__=no
xyes) AC_DEFINE(G_HAVE___INLINE__,1,[Have __inline__ keyword])
esac
AC_CACHE_CHECK([for inline], glib_cv_hasinline,[
- AC_COMPILE_IFELSE([
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#undef inline
inline int foo () { return 0; }
int main () { return foo (); }
- ],
+ ]])],
glib_cv_hasinline=yes
,
glib_cv_hasinline=no
# if we can use inline functions in headers
AC_MSG_CHECKING(if inline functions in headers work)
-AC_LINK_IFELSE([
+AC_LINK_IFELSE([AC_LANG_SOURCE([[
#if defined (G_HAVE_INLINE) && defined (__GNUC__) && defined (__STRICT_ANSI__)
# undef inline
# define inline __inline__
int
main (void) {
int i = 1;
-}],[g_can_inline=yes],[g_can_inline=no])
+}]])],[g_can_inline=yes],[g_can_inline=no])
AC_MSG_RESULT($g_can_inline)
dnl *** check for working do while(0) macros ***
# check for GNUC visibility support
AC_MSG_CHECKING(for GNUC visibility attribute)
-GLIB_CHECK_COMPILE_WARNINGS([
+GLIB_CHECK_COMPILE_WARNINGS([AC_LANG_SOURCE([[
void
__attribute__ ((visibility ("hidden")))
f_hidden (void)
f_default();
return 0;
}
-],g_have_gnuc_visibility=yes,g_have_gnuc_visibility=no)
+]])],g_have_gnuc_visibility=yes,g_have_gnuc_visibility=no)
AC_MSG_RESULT($g_have_gnuc_visibility)
AM_CONDITIONAL(HAVE_GNUC_VISIBILITY, [test x$g_have_gnuc_visibility = xyes])
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 sys/mkdev.h])
+AC_CHECK_HEADERS([linux/magic.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
-gl_GLIBC21
AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
AC_CHECK_FUNCS(setlocale)
dnl
if test $ac_cv_sizeof_size_t = $ac_cv_sizeof_int &&
test $ac_cv_sizeof_size_t = $ac_cv_sizeof_long ; then
- GLIB_CHECK_COMPILE_WARNINGS([
+ GLIB_CHECK_COMPILE_WARNINGS([AC_LANG_SOURCE([[
#if defined(_AIX) && !defined(__GNUC__)
#pragma options langlvl=stdc89
#endif
unsigned int *size_int = &s;
return (int)*size_int;
}
- ],glib_size_type=int,
- [GLIB_CHECK_COMPILE_WARNINGS([
+ ]])],glib_size_type=int,
+ [GLIB_CHECK_COMPILE_WARNINGS([AC_LANG_SOURCE([[
#if defined(_AIX) && !defined(__GNUC__)
#pragma options langlvl=stdc89
#endif
unsigned long *size_long = &s;
return (int)*size_long;
}
- ],glib_size_type=long)])
+ ]])],glib_size_type=long)])
fi
AC_MSG_RESULT(unsigned $glib_size_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 statvfs statfs utimes getgrgid getpwuid)
+AC_CHECK_FUNCS(chown lchmod lchown fchmod fchown link utimes getgrgid getpwuid)
AC_CHECK_FUNCS(getmntent_r setmntent endmntent hasmntopt getmntinfo)
# Check for high-resolution sleep functions
AC_CHECK_FUNCS(splice)
+# To avoid finding a compatibility unusable statfs, which typically
+# successfully compiles, but warns to use the newer statvfs interface:
+AS_IF([test $ac_cv_header_sys_statvfs_h = yes], [AC_CHECK_FUNCS([statvfs])])
+AS_IF([test $ac_cv_header_sys_statfs_h = yes], [AC_CHECK_FUNCS([statfs])])
+
+AC_MSG_CHECKING([whether to use statfs or statvfs])
+# Some systems have both statfs and statvfs, pick the most "native" for these
+AS_IF([test x$ac_cv_func_statfs = xyes && test x$ac_cv_func_statvfs = yes],
+ [
+ # on solaris and irix, statfs doesn't even have the f_bavail field
+ AS_IF([test $ac_cv_member_struct_statfs_f_bavail = yes],
+ [ac_cv_func_statfs=no],
+ # else, at least on linux, statfs is the actual syscall
+ [ac_cv_func_statvfs=no])
+ ])
+
+AS_IF([test x$ac_cv_func_statfs = xyes],
+ [
+ AC_DEFINE([USE_STATFS], [1], [Define to use statfs()])
+ AC_MSG_RESULT([statfs])
+ ],
+ [test x$ac_cv_func_statvfs = xyes],
+ [
+ AC_DEFINE([USE_STATVFS], [1], [Define to use statvfs()])
+ AC_MSG_RESULT([statvfs])
+ ],
+ [ AC_MSG_RESULT([neither])])
+
AC_CHECK_HEADERS(crt_externs.h)
AC_CHECK_FUNCS(_NSGetEnviron)
dnl we currently check for all three va_copy possibilities, so we get
dnl all results in config.log for bug reports.
AC_CACHE_CHECK([for an implementation of va_copy()],glib_cv_va_copy,[
- AC_LINK_IFELSE([#include <stdarg.h>
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[#include <stdarg.h>
#include <stdlib.h>
void f (int i, ...) {
va_list args1, args2;
int main() {
f (0, 42);
return 0;
- }],
+ }]])],
[glib_cv_va_copy=yes],
[glib_cv_va_copy=no])
])
AC_CACHE_CHECK([for an implementation of __va_copy()],glib_cv___va_copy,[
- AC_LINK_IFELSE([#include <stdarg.h>
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[#include <stdarg.h>
#include <stdlib.h>
void f (int i, ...) {
va_list args1, args2;
int main() {
f (0, 42);
return 0;
- }],
+ }]])],
[glib_cv___va_copy=yes],
[glib_cv___va_copy=no])
])
dnl ** Check for Solaris FEN (GIO) **
dnl *********************************
fen_support=no
-AC_COMPILE_IFELSE([
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#include <port.h>
#ifndef PORT_SOURCE_FILE
#error "Please upgrade to Nevada 72 or above to suppoert FEN"
#endif
-int main() { return 0; } ],
+int main() { return 0; } ]])],
[
fen_support=yes
],)
AC_TRY_RUN(glib_thread_test(0),
glib_flag_works=yes,
glib_flag_works=no,
- [AC_LINK_IFELSE(glib_thread_test(0),
+ [AC_LINK_IFELSE([AC_LANG_SOURCE(glib_thread_test(0))],
glib_flag_works=yes,
glib_flag_works=no)])
CFLAGS="$glib_save_CFLAGS"
AC_TRY_RUN(glib_thread_test($defattr),
glib_result=yes,
glib_result=no,
- [AC_LINK_IFELSE(glib_thread_test($defattr),
+ [AC_LINK_IFELSE([AC_LANG_SOURCE(glib_thread_test($defattr))],
glib_result=yes,
glib_result=no)])
AC_MSG_RESULT($glib_result)
AC_TRY_RUN(glib_sched_priority_test,
glib_result=yes,
glib_result=no,
- [AC_LINK_IFELSE(glib_sched_priority_test,
+ [AC_LINK_IFELSE([AC_LANG_SOURCE(glib_sched_priority_test)],
glib_result=yes,
glib_result=no)])
AC_MSG_RESULT($glib_result)
[glib_cv_gcc_has_builtin_atomic_operations=no])
AC_MSG_RESULT($glib_cv_gcc_has_builtin_atomic_operations)
- if test $glib_cv_gcc_has_builtin_atomic_operations = yes; then
- glib_memory_barrier_needed=yes
- else
case $host_cpu in
i386)
AC_MSG_RESULT([none])
operations much faster. The resulting code will not run
on very old sparcs though."
- AC_LINK_IFELSE([[
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[
main ()
{
int tmp1, tmp2, tmp3;
__asm__ __volatile__("casx [%2], %0, %1"
: "=&r" (tmp1), "=&r" (tmp2) : "r" (&tmp3));
- }]],
+ }]])],
AC_MSG_RESULT([sparcv9])
AC_DEFINE_UNQUOTED(G_ATOMIC_SPARCV9, 1,
[sparcv9 atomic implementation]),
glib_memory_barrier_needed=yes
;;
esac
- fi
else
if test $glib_native_win32 = yes; then
# For Windows but not using gcc. No barriers needed then either.
dnl ************************
dnl ** Check for futex(2) **
dnl ************************
-AC_MSG_CHECKING([for futex(2) system call])
-AC_COMPILE_IFELSE([
+AC_CACHE_CHECK(for futex(2) system call,
+ glib_cv_futex,AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
#include <linux/futex.h>
-#include <syscall.h>
+#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])
+fi
+AC_CACHE_CHECK(for eventfd(2) system call,
+ glib_cv_eventfd,AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+#include <sys/eventfd.h>
+#include <unistd.h>
+],[
int
main (void)
{
- /* it's not like this actually runs or anything... */
- syscall (SYS_futex, NULL, FUTEX_WAKE, FUTEX_WAIT);
+ eventfd (0, EFD_CLOEXEC);
return 0;
}
-],
-[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_FUTEX, [test "$have_futex" = "yes"],
- [we have the futex(2) system call])
-],
-[
- AC_MSG_RESULT(no)
-])
+])],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])
+fi
dnl ****************************************
dnl *** GLib POLL* compatibility defines ***
echo >>$outfile
echo "#define G_ATOMIC_OP_MEMORY_BARRIER_NEEDED 1" >>$outfile
fi
-
+ if test x"$g_gcc_atomic_ops" != xno; then
+ echo >>$outfile
+ echo "#define G_ATOMIC_OP_USE_GCC_BUILTINS 1" >>$outfile
+ fi
echo >>$outfile
g_bit_sizes="16 32 64"
for bits in $g_bit_sizes; do
g_mutex_contents="$glib_cv_byte_contents_gmutex"
g_memory_barrier_needed="$glib_memory_barrier_needed"
+g_gcc_atomic_ops="$glib_cv_gcc_has_builtin_atomic_operations"
g_module_suffix="$glib_gmodule_suffix"
build/win32/Makefile
build/win32/dirent/Makefile
build/win32/vs9/Makefile
+build/win32/vs10/Makefile
glib/Makefile
glib/glib.stp
glib/libcharset/Makefile
gthread/Makefile
gthread/tests/Makefile
gio/Makefile
+gio/gdbus-codegen/Makefile
+gio/gdbus-codegen/config.py
gio/xdgmime/Makefile
gio/inotify/Makefile
gio/libasyncns/Makefile
gio/fam/Makefile
gio/win32/Makefile
gio/tests/Makefile
+gio/tests/gdbus-object-manager-example/Makefile
po/Makefile.in
docs/Makefile
docs/reference/Makefile
docs/reference/gobject/Makefile
docs/reference/gobject/version.xml
docs/reference/gio/Makefile
+docs/reference/gio/gdbus-object-manager-example/Makefile
docs/reference/gio/version.xml
tests/Makefile
tests/gobject/Makefile