# set glib_binary_age _and_ glib_interface_age to 0.
#
m4_define([glib_major_version], [2])
-m4_define([glib_minor_version], [7])
-m4_define([glib_micro_version], [8])
-m4_define([glib_interface_age], [7])
+m4_define([glib_minor_version], [11])
+m4_define([glib_micro_version], [0])
+m4_define([glib_interface_age], [0])
m4_define([glib_binary_age],
[m4_eval(100 * glib_minor_version + glib_micro_version)])
m4_define([glib_version],
AC_MSG_CHECKING([whether to enable garbage collector friendliness])
if test "x$enable_gc_friendly" = "xyes"; then
- AC_DEFINE(ENABLE_GC_FRIENDLY, 1, [Whether to enable GC friendliness])
- AC_SUBST(ENABLE_GC_FRIENDLY)
+ AC_DEFINE(ENABLE_GC_FRIENDLY_DEFAULT, 1, [Whether to enable GC friendliness by default])
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([*** No iconv() implementation found in C library or libiconv])
fi
+jm_GLIBC21
+AC_ARG_ENABLE(iconv-cache,
+ [AC_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 gettext support
dnl
-ALL_LINGUAS="am ar az be bg bn bs ca cs cy da de el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu id is it ja ko lt lv mk mn ms nb ne nl nn no or pa pl pt pt_BR ro ru rw sk sl sq sr sr@ije sr@Latn sv ta te th tl tr uk vi wa xh yi zh_CN zh_TW"
+ALL_LINGUAS="am ar az be bg bn bs ca cs cy da de el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu id is it ja ka ko ku lt lv mk ml mn ms nb ne nl nn no or pa pl pt pt_BR ro ru rw 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"
GLIB_GNU_GETTEXT
if test "$gt_cv_have_gettext" != "yes" ; then
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)
+
AC_CHECK_SIZEOF(char)
AC_CHECK_SIZEOF(short)
AC_CHECK_SIZEOF(long)
}],[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_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])
+])
+if test x$g_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([],[
AC_C_BIGENDIAN
# check for header files
-AC_CHECK_HEADERS([dirent.h float.h limits.h pwd.h sys/param.h sys/poll.h sys/select.h sys/types.h])
-AC_CHECK_HEADERS([sys/time.h sys/times.h unistd.h values.h stdint.h sched.h])
+AC_CHECK_HEADERS([dirent.h float.h limits.h pwd.h sys/param.h sys/poll.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 sched.h malloc.h])
# Checks for libcharset
jm_LANGINFO_CODESET
# Check for some functions
AC_CHECK_FUNCS(lstat strerror strsignal memmove mkstemp vsnprintf stpcpy strcasecmp strncasecmp poll getcwd nanosleep vasprintf setenv unsetenv getc_unlocked readlink symlink)
+AC_CHECK_HEADERS(crt_externs.h)
+AC_CHECK_FUNCS(_NSGetEnviron)
+
AC_FUNC_VSNPRINTF_C99
AC_FUNC_PRINTF_UNIX98
dnl ****************************************
+dnl *** posix_memalign ***
+dnl ****************************************
+AC_MSG_CHECKING(for a compliant posix_memalign() implementation)
+AC_CACHE_VAL(glib_cv_compliant_posix_memalign,[
+ glib_cv_compliant_posix_memalign=0
+ if test "$ac_cv_func_posix_memalign" = "yes" ; then
+ AC_TRY_RUN([
+ #define _XOPEN_SOURCE 600
+ #include <stdlib.h> /* posix_memalign() should be defined here */
+ /* some systems break if #include <malloc.h> used */
+ static void test_memalign (size_t boundary, size_t size) {
+ void *mem = 0;
+ if (posix_memalign (&mem, boundary, size) != 0 || !mem)
+ exit (1);
+ else
+ free (mem);
+ }
+ int main() {
+ test_memalign ( 128, 128 - 2 * sizeof (void*));
+ test_memalign ( 256, 256 - 2 * sizeof (void*));
+ test_memalign ( 512, 512 - 2 * sizeof (void*));
+ test_memalign ( 1024, 1024 - 2 * sizeof (void*));
+ test_memalign ( 2048, 2048 - 2 * sizeof (void*));
+ test_memalign ( 4096, 4096 - 2 * sizeof (void*));
+ test_memalign ( 8192, 8192 - 2 * sizeof (void*));
+ test_memalign (16384, 16384 - 2 * sizeof (void*));
+ test_memalign (32768, 32768 - 2 * sizeof (void*));
+ exit (0); /* success */
+ }
+ ],
+ [glib_cv_compliant_posix_memalign=1], [], [:])
+ :
+ fi
+ ])
+if test "$glib_cv_compliant_posix_memalign" = "1"; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(POSIX_MEMALIGN_WITH_COMPLIANT_ALLOCS, 1, [define if posix_memalign() can allocate any size])
+else
+ AC_MSG_RESULT(no)
+fi
+
+
+dnl ****************************************
dnl *** strlcpy/strlcat ***
dnl ****************************************
# Check for strlcpy
AC_MSG_CHECKING(for the suffix of shared libraries)
case "$host_os" in
hpux9* | hpux10* | hpux11*) # taken from ltconfig
- glib_gmodule_suffix='sl'
+ case "$host_cpu" in
+ hppa*)
+ glib_gmodule_suffix='sl'
+ ;;
+ ia64*)
+ glib_gmodule_suffix='so'
+ ;;
+ esac
;;
cygwin* | mingw*)
glib_gmodule_suffix='dll'
dnl ***********************
AC_ARG_WITH(threads,
- [AC_HELP_STRING([--with-threads=@<:@none/posix/dce/solaris/win32@:>@],
+ [AC_HELP_STRING([--with-threads=@<:@none/posix/dce/win32@:>@],
[specify a thread implementation to use])],
[if test "x$with_threads" = x; then
want_threads=yes
# have_threads=none means no default thread implementation
have_threads=no
-if test "x$want_threads" = xyes || test "x$want_threads" = xsolaris; then
- case $host in
- *-*-solaris*)
- AC_CHECK_LIB(thread, cond_init, have_threads=solaris)
- ;;
- esac
-fi
if test "x$want_threads" = xyes || test "x$want_threads" = xposix \
|| test "x$want_threads" = xdce; then
# -D_POSIX4_DRAFT_SOURCE -D_POSIX4A_DRAFT10_SOURCE is for DG/UX
# One of them does for most gcc versions and some other platforms/compilers
# too and could be considered as the canonical way to go.
case $host in
- *-*-cygwin*)
- # skip cygwin -pthread or -pthreads test
+ *-*-cygwin*|*-*-darwin*)
+ # skip cygwin and darwin -pthread or -pthreads test
;;
*)
for flag in pthread pthreads mt; do
G_THREAD_CFLAGS="-threads"
G_THREAD_LIBS=$G_THREAD_CFLAGS
;;
- *-solaris*)
- if test x"$GCC" = xyes; then
- # We are using solaris threads. posix threads are
- # already catched above.
- G_THREAD_CFLAGS="-threads"
- else
- G_THREAD_CFLAGS="-mt"
- fi
- G_THREAD_LIBS=$G_THREAD_CFLAGS
- ;;
*-sysv5uw7*) # UnixWare 7
# We are not using gcc with -pthread. Catched above.
G_THREAD_CFLAGS="-Kthread"
AC_SUBST(GTHREAD_COMPILE_IMPL_DEFINES)
CPPFLAGS="$glib_save_CPPFLAGS"
;;
- solaris)
- mutex_has_default=yes
- mutex_default_type='mutex_t'
- mutex_default_init="DEFAULTMUTEX"
- mutex_header_file='thread.h'
- g_threads_impl="SOLARIS"
- ;;
win32)
g_threads_impl="WIN32"
;;
elif test x"$have_threads" = xwin32; then
# It's a pointer to a private struct
GLIB_SIZEOF(,struct _GThreadData *, system_thread)
- elif test x"$have_threads" = xsolaris; then
- GLIB_SIZEOF([#include <thread.h>], thread_t, system_thread)
fi
LIBS="$glib_save_LIBS"
${glib_extension}typedef unsigned $gint64 guint64;
#define G_GINT64_CONSTANT(val) $gint64_constant
+#define G_GUINT64_CONSTANT(val) $guint64_constant
_______EOF
if test x$gint64_format != x ; then
};
#define G_STATIC_MUTEX_INIT { NULL, { { $g_mutex_contents} } }
#define g_static_mutex_get_mutex(mutex) \\
- (g_thread_use_default_impl ? ((GMutex*) &((mutex)->static_mutex)) : \\
+ (g_thread_use_default_impl ? ((GMutex*) ((mutex)->static_mutex.pad)) : \\
g_static_mutex_get_mutex_impl_shortcut (&((mutex)->runtime_mutex)))
_______EOF
else
guint64_format='"u"'
glib_extension=
gint64_constant='(val)'
+ guint64_constant='(val)'
;;
$ac_cv_sizeof_long)
gint64=long
guint64_format='"lu"'
glib_extension=
gint64_constant='(val##L)'
+ guint64_constant='(val##UL)'
;;
$ac_cv_sizeof_long_long)
gint64='long long'
fi
glib_extension='G_GNUC_EXTENSION '
gint64_constant='(G_GNUC_EXTENSION (val##LL))'
+ guint64_constant='(G_GNUC_EXTENSION (val##ULL))'
;;
$ac_cv_sizeof___int64)
gint64='__int64'
fi
glib_extension=
gint64_constant='(val##i64)'
+ guint64_constant='(val##ui64)'
;;
esac
glib_size_t=$ac_cv_sizeof_size_t
build/Makefile
build/win32/Makefile
build/win32/dirent/Makefile
+build/win32/vs8/Makefile
glib/Makefile
glib/libcharset/Makefile
glib/gnulib/Makefile