m4_define(glib_configure_in)
#
-# The following version number definitions apply to GLib, GModule, GObject
-# and GThread as a whole, so if changes occoured in any of them, they are all
-# treated with the same interface and binary age.
+# The following version number definitions apply to GLib, GModule, GObject,
+# GThread and GIO as a whole, so if changes occurred in any of them, they are
+# all treated with the same interface and binary age.
#
# Making releases:
# glib_micro_version += 1;
# set glib_binary_age _and_ glib_interface_age to 0.
#
m4_define([glib_major_version], [2])
-m4_define([glib_minor_version], [17])
-m4_define([glib_micro_version], [1])
-m4_define([glib_interface_age], [0])
+m4_define([glib_minor_version], [22])
+m4_define([glib_micro_version], [2])
+m4_define([glib_interface_age], [2])
m4_define([glib_binary_age],
[m4_eval(100 * glib_minor_version + glib_micro_version)])
m4_define([glib_version],
# Specify a configuration file
AM_CONFIG_HEADER([config.h])
+# Support silent build rules, requires at least automake-1.11. Enable
+# by either passing --enable-silent-rules to configure or passing V=0
+# to make
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
GLIB_MAJOR_VERSION=glib_major_version
GLIB_MINOR_VERSION=glib_minor_version
dnl
AC_MSG_CHECKING([for Win32])
+LIB_EXE_MACHINE_FLAG=X86
case "$host" in
*-*-mingw*)
glib_native_win32=yes
glib_pid_type='void *'
+ glib_cv_stack_grows=no
# Unfortunately the mingw implementations of C99-style snprintf and vsnprintf
# don't seem to be quite good enough, at least not in mingw-runtime-3.14.
# (Sorry, I don't know exactly what is the problem, but it is related to
# So preset the autoconf cache variables.
ac_cv_func_vsnprintf_c99=no
ac_cv_func_snprintf_c99=no
+ case "$host" in
+ x86_64-*-*)
+ LIB_EXE_MACHINE_FLAG=X64
+ ;;
+ esac
;;
*)
glib_native_win32=no
AC_MSG_RESULT([$glib_native_win32])
+AC_SUBST(LIB_EXE_MACHINE_FLAG)
+
glib_have_carbon=no
AC_MSG_CHECKING([for Mac OS X Carbon support])
AC_TRY_CPP([
AC_MSG_RESULT([$glib_have_carbon])
AM_CONDITIONAL(OS_WIN32, [test "$glib_native_win32" = "yes"])
+AM_CONDITIONAL(OS_WIN32_X64, [test "$LIB_EXE_MACHINE_FLAG" = "X64"])
AM_CONDITIONAL(OS_UNIX, [test "$glib_native_win32" != "yes"])
AM_CONDITIONAL(OS_LINUX, [test "$glib_os_linux" = "yes"])
AM_CONDITIONAL(OS_CARBON, [test "$glib_have_carbon" = "yes"])
AC_MSG_RESULT([yes])
fi
+dnl location to install runtime libraries, e.g. ../../lib to install
+dnl to /lib if libdir is /usr/lib
+AC_ARG_WITH(runtime-libdir,
+ [AC_HELP_STRING([--with-runtime-libdir=RELPATH],
+ [Install runtime libraries relative to libdir])],
+ [],
+ [with_runtime_libdir=""])
+GLIB_RUNTIME_LIBDIR="$with_runtime_libdir"
+ABS_GLIB_RUNTIME_LIBDIR="`readlink -f $libdir/$with_runtime_libdir`"
+AC_SUBST(GLIB_RUNTIME_LIBDIR)
+AC_SUBST(ABS_GLIB_RUNTIME_LIBDIR)
+AM_CONDITIONAL(HAVE_GLIB_RUNTIME_LIBDIR, [test "x$with_runtime_libdir" != "x"])
+
dnl Checks for programs.
AC_PROG_CC
+AC_PROG_CPP
dnl Check for a working C++ compiler, but do not bail out, if none is found.
AC_CHECK_PROGS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], [gcc])
dnl gettext support
dnl
-ALL_LINGUAS="am ar as az be be@latin bg bn bn_IN bs ca cs cy da de dz el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu hy id is it ja ka kn ko ku lt lv mg mk ml mn mr ms nb ne nl nn oc or pa pl pt pt_BR ro ru rw si sk sl sq sr sr@Latn sr@ije sv ta te th tl tr tt uk vi wa xh yi zh_CN zh_HK zh_TW"
+ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
+AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS'])
GLIB_GNU_GETTEXT
if test "$gt_cv_have_gettext" != "yes" ; then
AM_DISABLE_STATIC
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
+dnl when using libtool 2.x create libtool early, because it's used in configure
+m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
+
if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
esac
fi
+CPPFLAGS="$CPPFLAGS -DG_DISABLE_SINGLE_INCLUDES"
+
if test "$glib_native_win32" = "yes"; then
if test x$enable_static = xyes -a x$enable_shared = xyes; then
AC_MSG_ERROR([Can not build both shared and static at the same time on Windows.])
# Checks for library functions.
AC_FUNC_VPRINTF
-AC_FUNC_MMAP
AC_FUNC_ALLOCA
-AC_CHECK_FUNCS(posix_memalign)
-AC_CHECK_FUNCS(memalign)
-AC_CHECK_FUNCS(valloc)
-
-AC_CHECK_FUNCS(atexit on_exit)
-
-AC_CHECK_FUNCS(timegm gmtime_r)
+AC_CHECK_FUNCS(mmap posix_memalign memalign valloc fsync pipe2)
+AC_CHECK_FUNCS(atexit on_exit timegm gmtime_r)
AC_CHECK_SIZEOF(char)
AC_CHECK_SIZEOF(short)
AC_MSG_RESULT($g_can_inline)
dnl *** check for working do while(0) macros ***
-AC_CACHE_CHECK([for working do while(0) macros], g_support_dowhile_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_support_dowhile_macros=yes],
- [g_support_dowhile_macros=no],
- [g_support_dowhile_macros=yes])
+ [g_cv_support_dowhile_macros=yes],
+ [g_cv_support_dowhile_macros=no],
+ [g_cv_support_dowhile_macros=yes])
])
-if test x$g_support_dowhile_macros = xyes; then
+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 bytesex stuff
AC_C_BIGENDIAN
+if test x$ac_cv_c_bigendian = xuniversal ; then
+AC_TRY_COMPILE([#include <endian.h>], [#if __BYTE_ORDER == __BIG_ENDIAN
+#else
+#error Not a big endian.
+#endif],
+ ac_cv_c_bigendian=yes
+ ,AC_TRY_COMPILE([#include <endian.h>], [#if __BYTE_ORDER == __LITTLE_ENDIAN
+#else
+#error Not a little endian.
+#endif],
+ ac_cv_c_bigendian=no
+ ,AC_MSG_WARN([Could not determine endianness.])))
+fi
+
# 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/select.h sys/types.h stdint.h sched.h malloc.h])
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])
# 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],,, [#include <sys/types.h>
+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>
#include <unistd.h>
+#ifdef HAVE_SYS_STATFS_H
+#include <sys/statfs.h>
+#endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
$ac_cv_sizeof_long)
glib_size_type=long
;;
+ $ac_cv_sizeof_long_long)
+ glib_size_type='long long'
+ ;;
+ $ac_cv_sizeof__int64)
+ glib_size_type='__int64'
+ ;;
*) AC_MSG_ERROR([No type matching size_t in size])
;;
esac
# 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)
-AC_CHECK_FUNCS(chown lchown fchmod fchown link statvfs statfs utimes getgrgid getpwuid)
+AC_CHECK_FUNCS(chown lchmod lchown fchmod fchown link statvfs statfs utimes getgrgid getpwuid)
AC_CHECK_FUNCS(getmntent_r setmntent endmntent hasmntopt getmntinfo)
# Check for high-resolution sleep functions
AC_CHECK_FUNCS(nanosleep nsleep)
AC_FUNC_VSNPRINTF_C99
AC_FUNC_PRINTF_UNIX98
+# Internet address families
+if test $glib_native_win32 = yes; then
+ glib_inet_includes=["
+#include <winsock2.h>
+ "]
+else
+ glib_inet_includes=["
+#include <sys/types.h>
+#include <sys/socket.h>
+ "]
+fi
+
+glib_failed=false
+GLIB_CHECK_VALUE(AF_INET, $glib_inet_includes, glib_failed=true)
+GLIB_CHECK_VALUE(AF_INET6, $glib_inet_includes, glib_failed=true)
+# winsock defines this even though it doesn't support it
+GLIB_CHECK_VALUE(AF_UNIX, $glib_inet_includes, glib_failed=true)
+if $glib_failed ; then
+ AC_MSG_ERROR([Could not determine values for AF_INET* constants])
+fi
+
+glib_failed=false
+GLIB_CHECK_VALUE(MSG_PEEK, $glib_inet_includes, glib_failed=true)
+GLIB_CHECK_VALUE(MSG_OOB, $glib_inet_includes, glib_failed=true)
+GLIB_CHECK_VALUE(MSG_DONTROUTE, $glib_inet_includes, glib_failed=true)
+if $glib_failed ; then
+ AC_MSG_ERROR([Could not determine values for MSG_* constants])
+fi
+
+AC_CHECK_FUNCS(getprotobyname_r endservent)
+AC_CHECK_HEADERS([netdb.h winsock2.h mswsock.h])
+
+# For gio/libasyncns
+if test $glib_native_win32 = no; then
+ AC_CHECK_FUNCS(strndup setresuid setreuid)
+ AC_CHECK_HEADERS(sys/prctl.h arpa/nameser_compat.h)
+ AC_CHECK_FUNC(res_query, ,
+ [AC_CHECK_LIB(resolv, res_query, [ LIBASYNCNS_LIBADD="-lresolv" ],
+ [ save_libs="$LIBS"
+ LIBS="-lresolv $LIBS"
+ AC_MSG_CHECKING([for res_query in -lresolv (alternate version)])
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[#include <resolv.h>]], [[res_query(0,0,0,0,0)]])],
+ [ AC_MSG_RESULT(yes)
+ LIBASYNCNS_LIBADD="-lresolv" ],
+ [ AC_MSG_RESULT(no)
+ AC_CHECK_LIB(bind, res_query,
+ [ LIBASYNCNS_LIBADD="-lbind" ],
+ [ AC_MSG_ERROR(res_query not found) ] ) ] )
+ LIBS="$save_libs"
+ ] )
+ ]
+ )
+ AC_SUBST(LIBASYNCNS_LIBADD)
+fi
+
+case $host in
+ *-*-solaris* )
+ AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Needed to get declarations for msg_control and msg_controllen on Solaris)
+ AC_DEFINE(_XOPEN_SOURCE, 2, Needed to get declarations for msg_control and msg_controllen on Solaris)
+ AC_DEFINE(__EXTENSIONS__, 1, Needed to get declarations for msg_control and msg_controllen on Solaris)
+ ;;
+esac
+
dnl
dnl if statfs() takes 2 arguments (Posix) or 4 (Solaris)
dnl
G_MODULE_SUPPORTED=true
fi
-AC_MSG_CHECKING(for the suffix of shared libraries)
+AC_MSG_CHECKING(for the suffix of module shared libraries)
export SED
shrext_cmds=`./libtool --config | grep '^shrext_cmds='`
eval $shrext_cmds
AC_CHECK_LIB(selinux, is_selinux_enabled,
[AC_CHECK_HEADERS(selinux/selinux.h,
- [AC_SEARCH_LIBS(lgetfilecon_raw, selinux,
+ [AC_CHECK_LIB(selinux, lgetfilecon_raw,
[AC_DEFINE(HAVE_SELINUX, 1, [Define to 1 if libselinux is available])
SELINUX_LIBS="-lselinux"
msg_selinux=yes])
AC_CHECK_HEADERS([sys/inotify.h],
[
inotify_support=yes
+ AC_CHECK_FUNCS(inotify_init1)
])
AM_CONDITIONAL(HAVE_INOTIFY, [test "$inotify_support" = "yes"])
[arm atomic implementation])
glib_memory_barrier_needed=no
;;
+ crisv32*|etraxfs*)
+ AC_MSG_RESULT([crisv32])
+ AC_DEFINE_UNQUOTED(G_ATOMIC_CRISV32, 1,
+ [crisv32 atomic implementation])
+ glib_memory_barrier_needed=no
+ ;;
+ cris*|etrax*)
+ AC_MSG_RESULT([cris])
+ AC_DEFINE_UNQUOTED(G_ATOMIC_CRIS, 1,
+ [cris atomic implementation])
+ glib_memory_barrier_needed=no
+ ;;
*)
AC_MSG_RESULT([none])
glib_memory_barrier_needed=yes
AM_CONDITIONAL(ENABLE_REGEX, $enable_regex)
if test x$enable_regex = xtrue; then
+ AC_DEFINE(ENABLE_REGEX, [], [include GRegex])
# Check if we should use the internal or the system-supplied pcre
AC_ARG_WITH(pcre,
[AC_HELP_STRING([--with-pcre=@<:@internal/system@:>@],
dnl *** Checks for gtk-doc ***
dnl **************************
-GTK_DOC_CHECK([1.8])
+GTK_DOC_CHECK([1.11])
AC_ARG_ENABLE(man,
[AC_HELP_STRING([--enable-man],
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
+ * system printf functions. This is useful to know, for example,
+ * when using glibc's register_printf_function().
+ */" >> $outfile
+ echo '#define GLIB_USING_SYSTEM_PRINTF' >> $outfile
+ fi
cat >> $outfile <<_______EOF
#define G_MINOFFSET G_MININT64
#define G_MAXOFFSET G_MAXINT64
+#define G_GOFFSET_MODIFIER G_GINT64_MODIFIER
+#define G_GOFFSET_FORMAT G_GINT64_FORMAT
+#define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val)
+
_______EOF
if test -z "$glib_unknown_void_p"; then
#define GINT_TO_POINTER(i) ((gpointer) ${glib_gpi_cast} (i))
#define GUINT_TO_POINTER(u) ((gpointer) ${glib_gpui_cast} (u))
+
+typedef signed $glib_intptr_type_define gintptr;
+typedef unsigned $glib_intptr_type_define guintptr;
+
+#define G_GINTPTR_MODIFIER $gintptr_modifier
+#define G_GINTPTR_FORMAT $gintptr_format
+#define G_GUINTPTR_FORMAT $guintptr_format
_______EOF
else
echo '#error SIZEOF_VOID_P unknown - This should never happen' >>$outfile
_______EOF
fi
cat >>$outfile <<_______EOF
-#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
+#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
#define G_GNUC_INTERNAL __hidden
#elif defined (__GNUC__) && defined (G_HAVE_GNUC_VISIBILITY)
#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
#else
#define G_GNUC_INTERNAL
-#endif
+#endif
_______EOF
} static_mutex;
};
#define G_STATIC_MUTEX_INIT { NULL, { { $g_mutex_contents} } }
-#ifdef __cplusplus
#define g_static_mutex_get_mutex(mutex) \\
- (g_thread_use_default_impl ? ((GMutex*) ((mutex)->static_mutex.pad)) : \\
+ (g_thread_use_default_impl ? ((GMutex*)(gpointer) ((mutex)->static_mutex.pad)) : \\
g_static_mutex_get_mutex_impl_shortcut (&((mutex)->runtime_mutex)))
-#else
-#define g_static_mutex_get_mutex(mutex) \\
- (g_thread_use_default_impl ? ((GMutex*) (void*) ((mutex)->static_mutex.pad)) : \\
- g_static_mutex_get_mutex_impl_shortcut (&((mutex)->runtime_mutex)))
-#endif
_______EOF
else
cat >>$outfile <<_______EOF
#define G_MODULE_SUFFIX "$g_module_suffix"
+/* A GPid is an abstraction for a process "handle". It is *not* an
+ * abstraction for a process identifier in general. GPid is used in
+ * GLib only for descendant processes spawned with the g_spawn*
+ * functions. On POSIX there is no "process handle" concept as such,
+ * but on Windows a GPid is a handle to a process, a kind of pointer,
+ * not a process identifier.
+ */
typedef $g_pid_type GPid;
+#define GLIB_SYSDEF_AF_UNIX $g_af_unix
+#define GLIB_SYSDEF_AF_INET $g_af_inet
+#define GLIB_SYSDEF_AF_INET6 $g_af_inet6
+
+#define GLIB_SYSDEF_MSG_OOB $g_msg_oob
+#define GLIB_SYSDEF_MSG_PEEK $g_msg_peek
+#define GLIB_SYSDEF_MSG_DONTROUTE $g_msg_dontroute
+
G_END_DECLS
#endif /* GLIBCONFIG_H */
glib_sys_poll_h=yes
fi
+if test x$enable_included_printf = xyes ; then
+ glib_included_printf=yes
+fi
+
case 2 in
$ac_cv_sizeof_short)
gint16=short
;;
esac
glib_size_t=$ac_cv_sizeof_size_t
-glib_size_type_define=$glib_size_type
-glib_void_p=$ac_cv_sizeof_long
-glib_long=$ac_cv_sizeof_void_p
+glib_size_type_define="$glib_size_type"
+glib_void_p=$ac_cv_sizeof_void_p
+glib_long=$ac_cv_sizeof_long
-case $glib_size_type in
+case "$glib_size_type" in
short)
gsize_modifier='"h"'
gsize_format='"hu"'
gssize_format='"li"'
glib_msize_type='LONG'
;;
+"long long"|__int64)
+ gsize_modifier='"I64"'
+ gsize_format='"I64u"'
+ gssize_format='"I64i"'
+ glib_msize_type='INT64'
+ ;;
esac
gintbits=`expr $ac_cv_sizeof_int \* 8`
glongbits=`expr $ac_cv_sizeof_long \* 8`
-
case $ac_cv_sizeof_void_p in
-$ac_cv_sizeof_int) glib_gpi_cast='' glib_gpui_cast='' ;;
-$ac_cv_sizeof_long) glib_gpi_cast='(glong)' glib_gpui_cast='(gulong)' ;;
-*) glib_unknown_void_p=yes ;;
+$ac_cv_sizeof_int)
+ glib_intptr_type_define=int
+ gintptr_modifier='""'
+ gintptr_format='"i"'
+ guintptr_format='"u"'
+ glib_gpi_cast=''
+ glib_gpui_cast=''
+ ;;
+$ac_cv_sizeof_long)
+ glib_intptr_type_define=long
+ gintptr_modifier='"l"'
+ gintptr_format='"li"'
+ guintptr_format='"lu"'
+ glib_gpi_cast='(glong)'
+ glib_gpui_cast='(gulong)'
+ ;;
+$ac_cv_sizeof_long_long)
+ glib_intptr_type_define='long long'
+ gintptr_modifier='"I64"'
+ gintptr_format='"I64i"'
+ guintptr_format='"I64u"'
+ glib_gpi_cast='(gint64)'
+ glib_gpui_cast='(guint64)'
+ ;;
+$ac_cv_sizeof___int64)
+ glib_intptr_type_define=__int64
+ gintptr_modifier='"I64"'
+ gintptr_format='"I64i"'
+ guintptr_format='"I64u"'
+ glib_gpi_cast='(gint64)'
+ glib_gpui_cast='(guint64)'
+ ;;
+*)
+ glib_unknown_void_p=yes
+ ;;
esac
g_have_gnuc_visibility=$g_have_gnuc_visibility
g_have_sunstudio_visibility=$g_have_sunstudio_visibility
-case xyes in
-x$ac_cv_c_bigendian)
+if test x$ac_cv_c_bigendian = xyes; then
g_byte_order=G_BIG_ENDIAN
g_bs_native=BE
g_bs_alien=LE
- ;;
-*)
+else
g_byte_order=G_LITTLE_ENDIAN
g_bs_native=LE
g_bs_alien=BE
- ;;
-esac
+fi
g_pollin=$glib_cv_value_POLLIN
g_pollout=$glib_cv_value_POLLOUT
g_pollerr=$glib_cv_value_POLLERR
g_pollnval=$glib_cv_value_POLLNVAL
+g_af_unix=$glib_cv_value_AF_UNIX
+g_af_inet=$glib_cv_value_AF_INET
+g_af_inet6=$glib_cv_value_AF_INET6
+
+g_msg_peek=$glib_cv_value_MSG_PEEK
+g_msg_oob=$glib_cv_value_MSG_OOB
+g_msg_dontroute=$glib_cv_value_MSG_DONTROUTE
+
g_stack_grows=$glib_cv_stack_grows
g_have_eilseq=$have_eilseq
build/win32/Makefile
build/win32/dirent/Makefile
build/win32/vs8/Makefile
+build/win32/vs9/Makefile
glib/Makefile
glib/libcharset/Makefile
glib/gnulib/Makefile
gio/Makefile
gio/xdgmime/Makefile
gio/inotify/Makefile
+gio/libasyncns/Makefile
gio/fen/Makefile
gio/fam/Makefile
gio/win32/Makefile