Include a printf implementation supporting C99 snprintf and SUS
[platform/upstream/glib.git] / configure.in
index 65abfd3..65a6fc9 100644 (file)
@@ -2,9 +2,11 @@ dnl ***********************************
 dnl *** include special GLib macros ***
 dnl ***********************************
 builtin(include, acglib.m4)dnl
+builtin(include, glib/libcharset/codeset.m4)dnl
+builtin(include, glib/libcharset/glibc21.m4)dnl
 
-# require autoconf 2.13
-AC_PREREQ(2.13)
+# require autoconf 2.52
+AC_PREREQ(2.52)
 
 # Process this file with autoconf to produce a configure script.
 AC_INIT(glib/glib.h)
@@ -29,11 +31,11 @@ GLIB_AC_DIVERT_BEFORE_HELP([
 # if backwards compatibility has been broken,
 # set GLIB_BINARY_AGE _and_ GLIB_INTERFACE_AGE to 0.
 #
-GLIB_MAJOR_VERSION=1
-GLIB_MINOR_VERSION=3
-GLIB_MICRO_VERSION=7
+GLIB_MAJOR_VERSION=2
+GLIB_MINOR_VERSION=1
+GLIB_MICRO_VERSION=3
 GLIB_INTERFACE_AGE=0
-GLIB_BINARY_AGE=0
+GLIB_BINARY_AGE=`expr 100 '*' $GLIB_MINOR_VERSION + $GLIB_MICRO_VERSION`
 GLIB_VERSION=$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION.$GLIB_MICRO_VERSION
 ])dnl
 
@@ -46,13 +48,15 @@ AC_SUBST(GLIB_BINARY_AGE)
 
 # libtool versioning
 LT_RELEASE=$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION
-LT_CURRENT=`expr $GLIB_MICRO_VERSION - $GLIB_INTERFACE_AGE`
+LT_CURRENT=`expr 100 '*' $GLIB_MINOR_VERSION + $GLIB_MICRO_VERSION - $GLIB_INTERFACE_AGE`
 LT_REVISION=$GLIB_INTERFACE_AGE
 LT_AGE=`expr $GLIB_BINARY_AGE - $GLIB_INTERFACE_AGE`
+LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
 AC_SUBST(LT_RELEASE)
 AC_SUBST(LT_CURRENT)
 AC_SUBST(LT_REVISION)
 AC_SUBST(LT_AGE)
+AC_SUBST(LT_CURRENT_MINUS_AGE)
 
 VERSION=$GLIB_VERSION
 PACKAGE=glib
@@ -91,6 +95,50 @@ AC_MSG_RESULT([$glib_native_beos])
 
 dnl
 
+AC_MSG_CHECKING([for Win32])
+case "$host" in
+  *-*-mingw*)
+    glib_native_win32=yes
+    G_LIB_WIN32_RESOURCE=glib-win32res.lo
+    G_MODULE_WIN32_RESOURCE=gmodule-win32res.lo
+    G_OBJECT_WIN32_RESOURCE=gobject-win32res.lo
+    G_THREAD_WIN32_RESOURCE=gthread-win32res.lo
+    GLIB_DEF=glib.def
+    GMODULE_DEF=gmodule.def
+    GOBJECT_DEF=gobject.def
+    GTHREAD_DEF=gthread.def
+    TESTGMODULE_EXP=testgmodule.exp
+    ;;
+  *)
+    glib_native_win32=no
+    G_LIB_WIN32_RESOURCE=
+    G_MODULE_WIN32_RESOURCE=
+    G_OBJECT_WIN32_RESOURCE=
+    G_THREAD_WIN32_RESOURCE=
+    GLIB_DEF=
+    GMODULE_DEF=
+    GOBJECT_DEF=
+    GTHREAD_DEF=
+    TESTGMODULE_EXP=
+    ;;
+esac
+AC_MSG_RESULT([$glib_native_win32])
+AM_CONDITIONAL(OS_WIN32, test "$glib_native_win32" = "yes")
+AC_SUBST(G_LIB_WIN32_RESOURCE)
+AC_SUBST(G_MODULE_WIN32_RESOURCE)
+AC_SUBST(G_OBJECT_WIN32_RESOURCE)
+AC_SUBST(G_THREAD_WIN32_RESOURCE)
+AC_SUBST(GLIB_DEF)
+AC_SUBST(GMODULE_DEF)
+AC_SUBST(GOBJECT_DEF)
+AC_SUBST(GTHREAD_DEF)
+AC_SUBST(TESTGMODULE_EXP)
+
+if test "$glib_native_win32" = "yes"; then
+  AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
+fi
+AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
+
 GLIB_AC_DIVERT_BEFORE_HELP([
 # figure debugging default, prior to $ac_help setup
 case $GLIB_MINOR_VERSION in
@@ -148,6 +196,8 @@ AC_LANG_RESTORE
 AM_PROG_CC_STDC
 AC_PROG_INSTALL
 
+AC_SYS_LARGEFILE
+
 #
 # Find pkg-config
 #
@@ -156,10 +206,10 @@ if test x$PKG_CONFIG = xno ; then
   AC_MSG_ERROR([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/])
 fi
 
-if pkg-config --atleast-pkgconfig-version 0.5 ; then
+if $PKG_CONFIG --atleast-pkgconfig-version 0.14 ; then
   :
 else
-  AC_MSG_ERROR([*** pkg-config too old; version 0.5 or better required.])
+  AC_MSG_ERROR([*** pkg-config too old; version 0.14 or better required.])
 fi
 
 if test "x$enable_debug" = "xyes"; then
@@ -172,8 +222,45 @@ if test "x$enable_debug" = "xyes"; then
        
   GLIB_DEBUG_FLAGS="-DG_ENABLE_DEBUG"
 else
+  GLIB_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS"
+
   if test "x$enable_debug" = "xno"; then
-    GLIB_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
+    GLIB_DEBUG_FLAGS="$GLIB_DEBUG_FLAGS -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
+  fi
+fi
+
+# Ensure MSVC-compatible struct packing convention is used when
+# compiling for Win32 with gcc.
+# What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
+# gcc2 uses "-fnative-struct".
+if test x"$glib_native_win32" = xyes; then
+  if test x"$GCC" = xyes; then
+    msnative_struct=''
+    AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
+    if test -z "$ac_cv_prog_CC"; then
+      our_gcc="$CC"
+    else
+      our_gcc="$ac_cv_prog_CC"
+    fi
+    case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
+      2.)
+       if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
+         msnative_struct='-fnative-struct'
+       fi
+       ;;
+      *)
+       if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
+         msnative_struct='-mms-bitfields'
+       fi
+       ;;
+    esac
+    if test x"$msnative_struct" = x ; then
+      AC_MSG_RESULT([no way])
+      AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
+    else
+      CFLAGS="$CFLAGS $msnative_struct"
+      AC_MSG_RESULT([${msnative_struct}])
+    fi
   fi
 fi
 
@@ -195,13 +282,68 @@ if test "x$enable_rebuilds" = "xyes" && \
 fi
 AC_SUBST(REBUILD)
 
+# Need full path to Perl for glib-mkenums
+#
+if test "x$PERL" != x ; then
+  AC_PATH_PROG(PERL_PATH, $PERL)
+else
+  PERL_PATH="/usr/bin/env perl"
+fi
+AC_SUBST(PERL_PATH)
+
+dnl ***********************
+dnl *** Tests for iconv ***
+dnl ***********************
+dnl
+dnl We do this before the gettext checks, to avoid distortion
+
+AC_ARG_WITH(libiconv, [  --with-libiconv=[no/gnu/native] use the libiconv library ],,with_libiconv=maybe)
+
+found_iconv=no
+case $with_libiconv in
+  maybe)
+    # Check in the C library first
+    AC_CHECK_FUNC(iconv_open, with_libiconv=no; found_iconv=yes)
+    # Check if we have GNU libiconv
+    if test $found_iconv = "no"; then
+      AC_CHECK_LIB(iconv, libiconv_open, with_libiconv=gnu; found_iconv=yes)
+    fi
+    # Check if we have a iconv in -liconv, possibly from vendor
+    if test $found_iconv = "no"; then
+      AC_CHECK_LIB(iconv, iconv_open, with_libiconv=native; found_iconv=yes)
+    fi
+    ;;
+  no)
+    AC_CHECK_FUNC(iconv_open, with_libiconv=no; found_iconv=yes)
+    ;;
+  gnu|yes)
+    AC_CHECK_LIB(iconv, libiconv_open, with_libiconv=gnu; found_iconv=yes)
+    ;;
+  native)
+    AC_CHECK_LIB(iconv, iconv_open, with_libiconv=native; found_iconv=yes)
+    ;;
+esac
+
+if test "x$found_iconv" = "xno" ; then
+   AC_MSG_ERROR([*** No iconv() implementation found in C library or libiconv])
+fi
 
 dnl
 dnl gettext support
 dnl
 
-ALL_LINGUAS="az ca de es eu fr nn no ru sl sv ta tr uk zh_TW"
+ALL_LINGUAS="az be bg ca cs de el es eu fr gl hi ja ko ms nl nn no pl pt pt_BR ro ru sk sl sq sv ta tr uk vi zh_CN zh_TW"
 AM_GLIB_GNU_GETTEXT
+
+if test "$gt_cv_func_dgettext_libc" = "yes" || test "$gt_cv_func_dgettext_libintl" = "yes"; then
+  :
+else
+  AC_MSG_ERROR([
+*** You must have either have gettext support in your C library, or use the 
+*** GNU gettext library. (http://www.gnu.org/software/gettext/gettext.html
+])
+fi
+
 LIBS="$LIBS $INTLLIBS"
 
 GETTEXT_PACKAGE=glib20
@@ -213,7 +355,31 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
 GLIB_LOCALE_DIR="${prefix}/${DATADIRNAME}/locale"
 AC_DEFINE_UNQUOTED(GLIB_LOCALE_DIR,"$GLIB_LOCALE_DIR")
 
+AC_CHECK_FUNCS(bind_textdomain_codeset)
+
+dnl
+dnl Now we are done with gettext checks, figure out ICONV_LIBS
+dnl
+
+if test x$with_libiconv != xno ; then
+  case " $INTLLIBS " in
+  *[[\ \       ]]-liconv[[\ \  ]]*) ;;
+  *) ICONV_LIBS="-liconv" ;;
+  esac
+fi
+AC_SUBST(ICONV_LIBS)
+
+case $with_libiconv in
+  gnu)
+    AC_DEFINE(USE_LIBICONV_GNU, [Using GNU libiconv])
+    ;;
+  native)
+    AC_DEFINE(USE_LIBICONV_NATIVE, [Using a native implementation of iconv in a separate library])
+    ;;
+esac
+
 dnl Initialize libtool
+AM_DISABLE_STATIC
 AC_LIBTOOL_WIN32_DLL
 AM_PROG_LIBTOOL
 
@@ -284,10 +450,20 @@ AC_CHECK_SIZEOF(long)
 AC_CHECK_SIZEOF(int)
 AC_CHECK_SIZEOF(void *)
 AC_CHECK_SIZEOF(long long)
+AC_CHECK_SIZEOF(__int64)
+
+if test x$ac_cv_sizeof_long = x8 || test x$ac_cv_sizeof_long_long = x8 || test x$ac_cv_sizeof___int64 = x8 ; then
+  :
+else
+  AC_MSG_ERROR([
+*** GLib requires a 64 bit type. You might want to consider
+*** using the GNU C compiler.
+])
+fi
 
 if test x$ac_cv_sizeof_long_long = x8; then
        # long long is a 64 bit integer.
-       AC_MSG_CHECKING(for format to printf and scanf a gint64)
+       AC_MSG_CHECKING(for format to printf and scanf a guint64)
        AC_CACHE_VAL(glib_cv_long_long_format,[
                for format in ll q I64; do
                  AC_TRY_RUN([#include <stdio.h>  
@@ -308,6 +484,12 @@ if test x$ac_cv_sizeof_long_long = x8; then
         else
          AC_MSG_RESULT(none)
         fi
+elif test x$ac_cv_sizeof___int64 = x8; then
+       # __int64 is a 64 bit integer.
+       AC_MSG_CHECKING(for format to printf and scanf a guint64)
+       # We know this is MSVC, and what the formats are
+       glib_cv_long_long_format=I64
+       AC_MSG_RESULT(%${glib_cv_long_long_format}u)
 fi
 
 dnl long doubles were not used, and a portability problem
@@ -340,6 +522,21 @@ fi
 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; }
+               ],
+       glib_cv_stack_grows=no
+        ,
+       glib_cv_stack_grows=yes
+        ,)
+])
 
 dnl AC_C_INLINE is useless to us since it bails out too early, we need to
 dnl truely know which ones of `inline', `__inline' and `__inline__' are
@@ -421,9 +618,15 @@ AC_MSG_RESULT($g_have_gnuc_varargs)
 AC_C_BIGENDIAN
 
 # check for header files
-AC_CHECK_HEADERS([float.h limits.h pwd.h sys/param.h sys/poll.h sys/select.h])
+AC_CHECK_HEADERS([dirent.h float.h limits.h pwd.h sys/param.h sys/poll.h sys/select.h])
 AC_CHECK_HEADERS([sys/time.h sys/times.h unistd.h values.h stdint.h sched.h])
 
+# Checks for libcharset
+jm_LANGINFO_CODESET
+jm_GLIBC21
+AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
+AC_CHECK_FUNCS(setlocale)
+
 AC_MSG_CHECKING(whether make is GNU Make)
 STRIP_BEGIN=
 STRIP_END=
@@ -460,8 +663,81 @@ GLIB_SIZEOF([$size_includes], size_t, size_t)
 GLIB_SIZEOF([$size_includes], ptrdiff_t, ptrdiff_t)
 GLIB_SIZEOF([$size_includes], intmax_t, intmax_t)
 
+dnl Try to figure out whether gsize, gssize should be long or int
+AC_MSG_CHECKING([for the appropriate definition for size_t])
+
+case $glib_cv_sizeof_size_t in
+  $ac_cv_sizeof_short) 
+      glib_size_type=short
+      ;;
+  $ac_cv_sizeof_int) 
+      glib_size_type=int
+      ;;
+  $ac_cv_sizeof_long) 
+      glib_size_type=long
+      ;;
+  *)  AC_MSG_ERROR([No type matching size_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 size_t. (This matters
+dnl on AIX with xlc)
+dnl
+if test $glib_cv_sizeof_size_t = $ac_cv_sizeof_int &&
+   test $glib_cv_sizeof_size_t = $ac_cv_sizeof_long ; then
+  GLIB_CHECK_COMPILE_WARNINGS([
+#include <stddef.h> 
+int main ()
+{
+  size_t s = 1;
+  unsigned int *size_int = &s;
+  return (int)*size_int;
+}
+    ],glib_size_type=int,
+      [GLIB_CHECK_COMPILE_WARNINGS([
+#include <stddef.h> 
+int main ()
+{
+   size_t s = 1;
+   unsigned long *size_long = &s;
+   return (int)*size_long;
+}
+        ],glib_size_type=long)])
+fi
+
+AC_MSG_RESULT(unsigned $glib_size_type)
+
 # Check for some functions
-AC_CHECK_FUNCS(lstat strerror strsignal memmove mkstemp vsnprintf stpcpy strcasecmp strncasecmp poll getcwd nanosleep)
+AC_CHECK_FUNCS(lstat strerror strsignal memmove mkstemp vsnprintf stpcpy strcasecmp strncasecmp poll getcwd nanosleep vasprintf unsetenv getc_unlocked)
+
+AC_FUNC_VSNPRINTF_C99
+AC_FUNC_PRINTF_UNIX98
+
+#
+# Check whether to use trio printf
+#
+
+AC_ARG_ENABLE(included-printf, [  --enable-included-printf    use included printf [default=auto]], enable_trio="$enableval")
+
+if test "$enable_trio" != "no" ; then
+  if test "$ac_cv_func_vsnprintf_c99" != "yes" ; then
+    enable_trio = yes
+  fi
+  if test "$ac_cv_func_printf_unix98" != "yes" ; then
+    enable_trio = yes
+  fi
+fi
+
+AM_CONDITIONAL(HAVE_GOOD_PRINTF, test "$enable_trio" != "yes")
+if test "$enable_trio" != "yes" ; then 
+  AC_DEFINE(HAVE_GOOD_PRINTF,1,[define to use system printf])
+  AC_DEFINE(HAVE_VASPRINTF,1)
+  AC_DEFINE(HAVE_C99_VSNPRINTF,1)
+  AC_DEFINE(HAVE_UNIX98_PRINTF,1)
+else
+  AC_DEFINE(HAVE_GOOD_PRINTF,0)
+fi
 
 # Check if bcopy can be used for overlapping copies, if memmove isn't found.
 # The check is borrowed from the PERL Configure script.
@@ -496,7 +772,7 @@ extern int sys_nerr;
 sys_errlist[sys_nerr-1][0] = 0;
 ], glib_ok=yes, glib_ok=no)
 AC_MSG_RESULT($glib_ok)
-if test $glib_ok = no; then
+if test "$glib_ok" = "no"; then
     AC_DEFINE(NO_SYS_ERRLIST,1,[global 'sys_errlist' not found])
 fi
 
@@ -507,7 +783,7 @@ extern char *sys_siglist[];
 exit (sys_siglist[0]);
 ], glib_ok=yes, glib_ok=no)
 AC_MSG_RESULT($glib_ok)
-if test $glib_ok = no; then
+if test "$glib_ok" = "no"; then
     AC_DEFINE(NO_SYS_SIGLIST,1,[global 'sys_siglist' not found])
 fi
 
@@ -517,7 +793,7 @@ AC_TRY_COMPILE([#include <signal.h>], [
 strlen (sys_siglist[0]);
 ], glib_ok=yes, glib_ok=no)
 AC_MSG_RESULT($glib_ok)
-if test $glib_ok = no; then
+if test "$glib_ok" = "no"; then
     AC_DEFINE(NO_SYS_SIGLIST_DECL,1,[global 'sys_siglist' not declared])
 fi
 
@@ -525,11 +801,11 @@ fi
 AC_MSG_CHECKING([for fd_set])
 AC_TRY_COMPILE([#include <sys/types.h>],
         [fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no)
-if test $gtk_ok = yes; then
+if test "$gtk_ok" = "yes"; then
     AC_MSG_RESULT([yes, found in sys/types.h])
 else
     AC_EGREP_HEADER(fd_set, sys/select.h, gtk_ok=yes)
-    if test $gtk_ok = yes; then
+    if test "$gtk_ok" = "yes"; then
        # *** FIXME: give it a different name
         AC_DEFINE(HAVE_SYS_SELECT_H,1,[found fd_set in sys/select.h])
         AC_MSG_RESULT([yes, found in sys/select.h])
@@ -577,7 +853,7 @@ char *p = malloc(10);
 (void) strlcat(p, "bye", 10);
 ], glib_ok=yes, glib_ok=no)
 AC_MSG_RESULT($glib_ok)
-if test $glib_ok = yes; then
+if test "$glib_ok" = "yes"; then
     AC_DEFINE(HAVE_STRLCPY,1,[Have functions strlcpy and strlcat])
 fi
   
@@ -667,7 +943,12 @@ dnl ***********************
 G_MODULE_LIBS=
 G_MODULE_LIBS_EXTRA=
 G_MODULE_PLUGIN_LIBS=
-G_MODULE_LDFLAGS=
+if test x"$glib_native_win32" = xyes; then
+  dnl No use for this on Win32
+  G_MODULE_LDFLAGS=
+else
+  G_MODULE_LDFLAGS=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
+fi
 dnl G_MODULE_IMPL= don't reset, so cmd-line can override
 G_MODULE_NEED_USCORE=0
 G_MODULE_BROKEN_RTLD_GLOBAL=0
@@ -686,7 +967,7 @@ if test -z "$G_MODULE_IMPL"; then
                      [])
 fi
 dnl *** load_image (BeOS)
-if test -z "$G_MODULE_IMPL" -a "x$glib_native_beos" = "xyes"; then
+if test -z "$G_MODULE_IMPL" && test "x$glib_native_beos" = "xyes"; then
   AC_CHECK_LIB(root, load_image,
       [G_MODULE_LIBS="-lbe -lroot -lglib"
       G_MODULE_LIBS_EXTRA="-L\$(top_builddir_full)/.libs"
@@ -694,6 +975,13 @@ if test -z "$G_MODULE_IMPL" -a "x$glib_native_beos" = "xyes"; then
       G_MODULE_IMPL=G_MODULE_IMPL_BEOS],
       [])
 fi   
+dnl *** NSLinkModule (dyld) in system libraries (Darwin)
+if test -z "$G_MODULE_IMPL"; then
+       AC_CHECK_FUNC(NSLinkModule,
+                     [G_MODULE_IMPL=G_MODULE_IMPL_DYLD
+                      G_MODULE_NEED_USCORE=1],
+                     [])
+fi
 dnl *** dlopen() and dlsym() in libdl
 if test -z "$G_MODULE_IMPL"; then
        AC_CHECK_LIB(dl, dlopen,
@@ -702,30 +990,8 @@ if test -z "$G_MODULE_IMPL"; then
                                   G_MODULE_IMPL=G_MODULE_IMPL_DL],[])],
                     [])
 fi
-dnl *** NSLinkModule (dyld) in system libraries (Darwin)
-if test -z "$G_MODULE_IMPL"; then
-       AC_CHECK_FUNC(NSLinkModule,
-                     [G_MODULE_IMPL=G_MODULE_IMPL_DYLD
-                      G_MODULE_NEED_USCORE=1],
-                     [])
-fi
 dnl *** shl_load() in libdld (HP-UX)
 if test -z "$G_MODULE_IMPL"; then
-        AC_MSG_CHECKING(how to export all symbols)
-        SAVED_LDFLAGS=$LDFLAGS
-        LDFLAGS="$LDFLAGS -Wl,-E"
-        AC_TRY_LINK(,[ return 0; ],
-                [ G_MODULE_LDFLAGS="-Wl,-E" ],[
-                LDFLAGS="$SAVED_LDFLAGS -bexpall"
-                AC_TRY_LINK(,[ return 0; ],
-                        [G_MODULE_LDFLAGS="-bexpall"],
-                        [G_MODULE_LDFLAGS="none"])
-        ])
-        LDFLAGS=$SAVED_LDFLAGS
-        AC_MSG_RESULT($G_MODULE_LDFLAGS)
-        if test "x$G_MODULE_LDFLAGS" = "xnone"; then
-                G_MODULE_LDFLAGS=
-        fi
        AC_CHECK_LIB(dld, shl_load,
                [G_MODULE_LIBS=-ldld
                G_MODULE_IMPL=G_MODULE_IMPL_DLD],
@@ -733,11 +999,6 @@ if test -z "$G_MODULE_IMPL"; then
 fi
 dnl *** additional checks for G_MODULE_IMPL_DL
 if test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL"; then
-       case "$host_os" in
-         linux*)
-           G_MODULE_LDFLAGS='-rdynamic'
-           ;;
-       esac
        LIBS_orig="$LIBS"
        LDFLAGS_orig="$LDFLAGS"
        LIBS="$LIBS $G_MODULE_LIBS"
@@ -909,23 +1170,11 @@ esac
 AC_MSG_RESULT($platform_win32)
 AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes)
 
-AC_MSG_CHECKING([if building for pure Win32])
-case "$host" in
-  *-*-mingw*)
-    os_win32=yes
-    ;;
-  *)
-    os_win32=no
-    ;;
-esac
-AC_MSG_RESULT($os_win32)
-AM_CONDITIONAL(OS_WIN32, test x$os_win32 = xyes)
-
 dnl ***********************
 dnl *** g_thread checks ***
 dnl ***********************
 
-AC_ARG_WITH(threads, [  --with-threads=[none/posix/dce/solaris] specify a thread implementation to use],
+AC_ARG_WITH(threads, [  --with-threads=[none/posix/dce/solaris/win32] specify a thread implementation to use],
        if test "x$with_threads" = x; then
                want_threads=yes
        else
@@ -935,9 +1184,6 @@ AC_ARG_WITH(threads, [  --with-threads=[none/posix/dce/solaris] specify a thread
 if test "x$enable_threads" = "xno"; then
         want_threads=no
 fi
-if test "x$want_threads" = "xnone"; then
-       want_threads=no
-fi
 
 dnl error and warning message
 dnl *************************
@@ -975,11 +1221,20 @@ POSIX_NO_PRIORITIES="I can not find the minimal and maximal priorities for
                priority. If you happen to know these main/max
                priorities, please inform the GLib developers."
 
+AIX_COMPILE_INFO="AIX's C compiler needs to be called by a different name, when
+               linking threaded applications. As GLib cannot do that 
+               automatically, you will get an linkg error everytime you are 
+               not using the right compiler. In that case you have to relink 
+               with the right compiler. Ususally just '_r' is appended 
+               to the compiler name."
 
 dnl determination of thread implementation
 dnl ***************************************
 
-have_threads=none
+# have_threads=no   means no thread support
+# 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*)
@@ -994,22 +1249,33 @@ if test "x$want_threads" = xyes || test "x$want_threads" = xposix \
        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"
-        if test "x$have_threads" = xnone; then
+        if test "x$have_threads" = xno; then
                 AC_TRY_COMPILE([#include <pthread.h>],
-                       [pthread_attr_t attr; pthread_attr_init(&attr);],
+                       [pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;],
                        have_threads=posix)
         fi
-        if test "x$have_threads" = xnone; then
+        if test "x$have_threads" = xno; then
                 AC_TRY_COMPILE([#include <pthread.h>],
-                       [pthread_attr_t attr; pthread_attr_create(&attr);],
-                       have_threads=posix)
+                       [pthread_mutex_t m; 
+                         pthread_mutex_init (&m, pthread_mutexattr_default);],
+                       have_threads=dce)
         fi
        CPPFLAGS="$glib_save_CPPFLAGS"
 fi
+if test "x$want_threads" = xyes || test "x$want_threads" = xwin32; then
+               case $host in
+                       *-*-mingw*)
+               have_threads=win32
+               ;;
+       esac
+fi
+if test "x$want_threads" = xnone; then
+       have_threads=none
+fi
 
 AC_MSG_CHECKING(for thread implementation)
 
-if test "x$have_threads" = xnone && test "x$want_threads" != xno; then
+if test "x$have_threads" = xno && test "x$want_threads" != xno; then
        AC_MSG_RESULT(none available)
         AC_MSG_WARN($THREAD_NO_IMPLEMENTATION)
 else
@@ -1024,33 +1290,85 @@ G_THREAD_LIBS=
 G_THREAD_LIBS_EXTRA=
 G_THREAD_CFLAGS=
 
-if test x"$have_threads" != xnone; then
+if test x"$have_threads" != xno; then
+
+  if test x"$have_threads" = xposix; then
+    # First we test for posix, whether -pthread or -pthreads do the trick as 
+    # both CPPFLAG and LIBS. 
+    # One of them does for most gcc versions and some other platforms/compilers
+    # too and could be considered as the canonical way to go. 
+    for flag in pthread pthreads; do
+      glib_save_CFLAGS="$CFLAGS"
+      CFLAGS="$CFLAGS -$flag"
+      AC_TRY_RUN([#include <pthread.h> 
+                 int check_me = 0;
+                 void* func(void* data) {return check_me = 42;}
+                 main()
+                 { pthread_t t; 
+                   void *ret;
+                   pthread_create (&t, 0, func, 0);
+                   pthread_join (t, &ret);
+                   exit (check_me != 42 || ret != 42);
+                  }],
+                  [G_THREAD_CFLAGS=-$flag
+                   G_THREAD_LIBS=-$flag])
+      CFLAGS="$glib_save_CFLAGS"
+    done
+  fi
+
+  if test x"$G_THREAD_CFLAGS" = x; then
 
-    G_THREAD_CFLAGS="-D_REENTRANT" # good default guess
+    # The canonical -pthread[s] does not work. Try something different.
 
     case $host in
        *-aix*)
-               G_THREAD_CFLAGS="$G_THREAD_CFLAGS -D_THREAD_SAFE"
                if test x"$GCC" = xyes; then
-                       G_THREAD_CFLAGS="$G_THREAD_CFLAGS -mthreads"
+                       # GCC 3.0 and above needs -pthread. 
+                       # Should be coverd by the case above.
+                       # GCC 2.x and below needs -mthreads
+                       G_THREAD_CFLAGS="-mthreads"             
+                       G_THREAD_LIBS=$G_THREAD_CFLAGS
+               else 
+                       # We are probably using the aix compiler. Normaly a 
+                       # program would have to be compiled with the _r variant
+                       # of the corresponding compiler, but we as GLib cannot 
+                       # do that: but the good news is that for compiling the
+                       # only difference is the added -D_THREAD_SAFE compile 
+                       # option. This is according to the "C for AIX User's 
+                       # Guide".
+                       G_THREAD_CFLAGS="-D_THREAD_SAFE"
                fi
                ;;
-       *-freebsd2.2*)
-               G_THREAD_CFLAGS="$G_THREAD_CFLAGS -D_THREAD_SAFE"
-
-               # FreeBSD 2.2.x shiped with gcc 2.7.2.x, which doesn't support
-               # -mthreads flag.
-               ;;      
-       *-sysv5uw7*)  # UnixWare 7 
-               if test "$GCC" != "yes"; then
-                               G_THREAD_CFLAGS="$G_THREAD_CFLAGS -Kthread"
-               else    
-                       G_THREAD_CFLAGS="$G_THREAD_CFLAGS -pthread"
-               fi      
-               ;;
        *-dg-dgux*)  # DG/UX
-               G_THREAD_CFLAGS="$G_THREAD_CFLAGS -D_POSIX4A_DRAFT10_SOURCE"
+               G_THREAD_CFLAGS="-D_REENTRANT -D_POSIX4A_DRAFT10_SOURCE"
+               ;;
+       *-osf*)
+               # So we are using dce threads. posix threads are already 
+               # catched above.
+               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"
+               G_THREAD_LIBS=$G_THREAD_CFLAGS
+               ;;
+       *)
+               G_THREAD_CFLAGS="-D_REENTRANT" # good default guess otherwise
+               ;;
     esac
+  fi
 
     # if we are not finding the localtime_r function, then we probably are
     # not using the proper multithread flag
@@ -1082,20 +1400,19 @@ dnl ******************************
 mutex_has_default=no
 case $have_threads in
         posix|dce)
-          glib_save_CPPFLAGS="$CPPFLAGS"
-          CPPFLAGS="$CPPFLAGS $GTHREAD_COMPILE_IMPL_DEFINES"
-           G_THREAD_LIBS=error
-          glib_save_LIBS="$LIBS"
-          case $host in
-            *-sysv5uw7*) # UnixWare 7 
-               if test "$GCC" != "yes"; then
-                               G_THREAD_LIBS="-Kthread"
-               else    
-                       G_THREAD_LIBS="-pthread"
-               fi      
-               ;;
-             *)
-               for thread_lib in "" pthread pthread32 pthreads c_r thread dce; do
+          if test x"$G_THREAD_LIBS" = x; then
+            case $host in
+              *-aix*)
+                # We are not using gcc (would have set G_THREAD_LIBS) and thus 
+                # probably using the aix compiler.
+               AC_MSG_WARN($AIX_COMPILE_INFO)
+                ;;
+              *)
+               glib_save_CPPFLAGS="$CPPFLAGS"
+               CPPFLAGS="$CPPFLAGS $GTHREAD_COMPILE_IMPL_DEFINES"
+                G_THREAD_LIBS=error
+               glib_save_LIBS="$LIBS"
+               for thread_lib in "" pthread pthread32 pthreads thread dce; do
                        if test x"$thread_lib" = x; then
                                add_thread_lib=""
                                IN=""
@@ -1128,59 +1445,63 @@ case $have_threads in
                                [AC_MSG_RESULT(no)])
                done
                if test "x$G_THREAD_LIBS" = xerror; then
-                 AC_MSG_ERROR($LIBS_NOT_FOUND_1$have_threads$LIBS_NOT_FOUND_2)
-               fi
-               for thread_lib in "" rt rte; do
-                       if test x"$thread_lib" = x; then
-                               add_thread_lib=""
-                               IN=""
-                       else
-                               add_thread_lib="-l$thread_lib"
-                               IN=" in -l$thread_lib"
-                       fi
-                       LIBS="$glib_save_LIBS $add_thread_lib"
-                       
-                       AC_MSG_CHECKING(for sched_get_priority_min$IN)
-                       AC_TRY_RUN([#include <sched.h>
-                               #include <errno.h>
-                               int main() {
-                               errno = 0;
-                                return sched_get_priority_min(SCHED_OTHER)==-1
-                                       && errno != 0;
-                               }],
-                               [AC_MSG_RESULT(yes)
-                               G_THREAD_LIBS="$G_THREAD_LIBS $add_thread_lib"
-                               posix_priority_min="sched_get_priority_min(SCHED_OTHER)"
-                               posix_priority_max="sched_get_priority_max(SCHED_OTHER)"
-                               break],
-                               [AC_MSG_RESULT(no)])
-               done
+                 AC_MSG_ERROR($LIBS_NOT_FOUND_1$have_threads$LIBS_NOT_FOUND_2)
+               fi 
                LIBS="$glib_save_LIBS"
-               ;;
-           esac 
-           mutex_has_default=yes
-           mutex_default_type='pthread_mutex_t'
-           mutex_default_init='PTHREAD_MUTEX_INITIALIZER'
-           mutex_header_file='pthread.h'
-          if test "x$have_threads" = "xposix"; then
-            g_threads_impl="POSIX"
-          else
-            g_threads_impl="DCE"
-            have_threads="posix"
-          fi
-          AC_SUBST(GTHREAD_COMPILE_IMPL_DEFINES)
-           CPPFLAGS="$glib_save_CPPFLAGS"
-           ;;
+                ;;
+            esac
+          fi
+
+          glib_save_LIBS="$LIBS"
+         for thread_lib in "" rt rte; do
+           if test x"$thread_lib" = x; then
+             add_thread_lib=""
+             IN=""
+           else
+             add_thread_lib="-l$thread_lib"
+             IN=" in -l$thread_lib"
+           fi
+           LIBS="$glib_save_LIBS $add_thread_lib"
+       
+            AC_MSG_CHECKING(for sched_get_priority_min$IN)
+           AC_TRY_RUN([#include <sched.h>
+                       #include <errno.h>
+                       int main() {
+                         errno = 0;
+                          return sched_get_priority_min(SCHED_OTHER)==-1
+                               && errno != 0;}],
+                       [AC_MSG_RESULT(yes)
+                        G_THREAD_LIBS="$G_THREAD_LIBS $add_thread_lib"
+                        posix_priority_min="sched_get_priority_min(SCHED_OTHER)"
+                        posix_priority_max="sched_get_priority_max(SCHED_OTHER)"
+                        break],
+                       [AC_MSG_RESULT(no)])
+         done
+         LIBS="$glib_save_LIBS"
+          mutex_has_default=yes
+          mutex_default_type='pthread_mutex_t'
+          mutex_default_init='PTHREAD_MUTEX_INITIALIZER'
+          mutex_header_file='pthread.h'
+         if test "x$have_threads" = "xposix"; then
+           g_threads_impl="POSIX"
+         else
+           g_threads_impl="DCE"
+           have_threads="posix"
+         fi
+         AC_SUBST(GTHREAD_COMPILE_IMPL_DEFINES)
+          CPPFLAGS="$glib_save_CPPFLAGS"
+          ;;
         solaris)
-          G_THREAD_LIBS=error
-           AC_CHECK_LIB(thread, cond_init, G_THREAD_LIBS="-lthread")
            mutex_has_default=yes
            mutex_default_type='mutex_t'
           mutex_default_init="DEFAULTMUTEX"
            mutex_header_file='thread.h'
           g_threads_impl="SOLARIS"
            ;;
-        none)
+       win32)
+          g_threads_impl="WIN32"
+          ;;
+        none|no)
           g_threads_impl="NONE"
            ;;
         *)
@@ -1208,7 +1529,7 @@ AC_MSG_RESULT($G_THREAD_LIBS)
 dnl check for mt safe function variants and some posix functions
 dnl ************************************************************
 
-if test x"$have_threads" != xnone; then
+if test x"$have_threads" != xno; then
        glib_save_LIBS="$LIBS"
        # we are not doing the following for now, as this might require glib 
        # to always be linked with the thread libs on some platforms. 
@@ -1264,13 +1585,20 @@ if test x"$have_threads" != xnone; then
                                  [Have function pthread_attr_setstacksize])],
                        [AC_MSG_RESULT(no)])
                AC_MSG_CHECKING(for minimal/maximal thread priority)
-               if test x"$posix_priority_min" = xnone; then
+               if test x"$posix_priority_min" = x; then
                        AC_EGREP_CPP(PX_PRIO_MIN,[#include <pthread.h>
                                PX_PRIO_MIN],,[
                                posix_priority_min=PX_PRIO_MIN
                                posix_priority_max=PX_PRIO_MAX])
                fi
-               if test x"$posix_priority_min" = xnone; then
+               if test x"$posix_priority_min" = x; then
+                       # AIX
+                       AC_EGREP_CPP(PTHREAD_PRIO_MIN,[#include <pthread.h>
+                               PTHREAD_PRIO_MIN],,[
+                               posix_priority_min=PTHREAD_PRIO_MIN
+                               posix_priority_max=PTHREAD_PRIO_MIN])
+               fi
+               if test x"$posix_priority_min" = x; then
                        AC_EGREP_CPP(PRI_OTHER_MIN,[#include <pthread.h>
                                PRI_OTHER_MIN],,[
                                posix_priority_min=PRI_OTHER_MIN        
@@ -1325,7 +1653,10 @@ if test x"$have_threads" != xnone; then
                          AC_DEFINE(G_THREAD_USE_PID_SURROGATE, 1, [whether to use the PID niceness surrogate for thread priorities])
                         ],
                        [AC_MSG_RESULT(no)])
-       else # solaris threads
+       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
 
@@ -1339,12 +1670,13 @@ if test x"$have_threads" != xnone; then
        if test "$ac_cv_func_localtime_r" != "yes"; then
                AC_MSG_WARN($FUNC_NO_LOCALTIME_R)
        fi
-else 
-       # If no thread implementation exists, we will provide enough
-       # space for a pointer
-       GLIB_SIZEOF(, void*, system_thread)
 fi     
 
+if test x"$glib_cv_sizeof_system_thread" = x; then
+   # use a pointer as a fallback.
+   GLIB_SIZEOF(,void *, system_thread)
+fi
+
 AC_DEFINE_UNQUOTED(G_THREAD_SOURCE,"gthread-$have_threads.c",
                   [Source file containing theread implementation])
 AC_SUBST(G_THREAD_CFLAGS)
@@ -1396,7 +1728,7 @@ dnl **********************
 
 case $host in
   *-*-cygwin*)
-       G_LIBS_EXTRA="-luser32 -lwsock32 -lkernel32"
+       G_LIBS_EXTRA="-luser32 -lkernel32"
     ;;
   *-*-mingw*)
        G_LIBS_EXTRA="-lwsock32"
@@ -1407,38 +1739,6 @@ case $host in
 esac
 AC_SUBST(G_LIBS_EXTRA)
 
-dnl ***********************
-dnl *** Tests for iconv ***
-dnl ***********************
-
-AC_ARG_WITH(libiconv, [ --with-libiconv     Use the libiconv library ],,with_libiconv=maybe)
-
-found_iconv=no
-
-if test "x$with_libiconv" != "xyes" ; then
-   # 
-   # Check in the C library 
-   #
-   AC_CHECK_FUNC(iconv_open, with_libiconv=no; found_iconv=yes)
-fi
-
-if test "x$with_libiconv" != "xno" ; then
-   #
-   # Check for libiconv
-   #
-   AC_CHECK_LIB(iconv, libiconv_open, with_libiconv=yes; found_iconv=yes)
-fi
-
-if test "x$found_iconv" = "xno" ; then
-   AC_MSG_ERROR([*** No iconv() implementation found in C library or libiconv])
-fi
-
-if test "x$with_libiconv" = "xyes" ; then
-  ICONV_LIBS="-liconv"
-  AC_DEFINE(USE_LIBICONV)
-fi
-AC_SUBST(ICONV_LIBS)
-
 dnl If the system doesn't define EILSEQ, we should define EILSEQ ourselves
 dnl since we need it for g_iconv()
 
@@ -1451,6 +1751,19 @@ int error = EILSEQ;
 ], have_eilseq=yes, have_eilseq=no);
 AC_MSG_RESULT($have_eilseq)
 
+dnl ******************************************************************
+dnl *** Look for glib-genmarshal in PATH if we are cross-compiling ***
+dnl ******************************************************************
+
+AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
+
+if test $cross_compiling = yes; then
+  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)
+  fi
+fi
+
 dnl **************************
 dnl *** Checks for gtk-doc ***
 dnl **************************
@@ -1489,9 +1802,9 @@ AC_CHECK_PROG(DB2HTML, db2html, true, false)
 AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
 
 dnl Let people disable the gtk-doc stuff.
-AC_ARG_ENABLE(gtk-doc, [  --enable-gtk-doc        use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
+AC_ARG_ENABLE(gtk-doc, [  --enable-gtk-doc        use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=no)
 
-if test x$enable_gtk_doc = xauto ; then
+if test x$enable_gtk_doc = xyes ; then
   if test x$GTKDOC = xtrue ; then
     enable_gtk_doc=yes
   else
@@ -1574,6 +1887,10 @@ G_BEGIN_DECLS
 #define G_MAXLONG      $glib_Ml
 #define G_MAXULONG     $glib_Mul
 
+#define G_MININT64     ((gint64)  0x8000000000000000)
+#define G_MAXINT64     ((gint64)  0x7fffffffffffffff)
+#define G_MAXUINT64    ((guint64) 0xffffffffffffffff)
+
 _______EOF
 
 
@@ -1603,44 +1920,37 @@ typedef unsigned $gint32 guint32;
 _______EOF
        fi
 
-
-       if test -n "$gint64"; then
-         cat >>$outfile <<_______EOF
-#define G_HAVE_GINT64 1
+       cat >>$outfile <<_______EOF
+#define G_HAVE_GINT64 1          /* deprecated, always true */
 
 ${glib_extension}typedef signed $gint64 gint64;
 ${glib_extension}typedef unsigned $gint64 guint64;
 
 #define G_GINT64_CONSTANT(val) $gint64_constant
 _______EOF
-               if test -n "$gint64_format"; then
+
+       if test x$gint64_format != x ; then
          cat >>$outfile <<_______EOF
 #define G_GINT64_FORMAT $gint64_format
 #define G_GUINT64_FORMAT $guint64_format
 _______EOF
-               fi
-       fi
+        else
+         cat >>$outfile <<_______EOF
+#undef G_GINT64_FORMAT
+#undef G_GUINT64_FORMAT
+_______EOF
+        fi           
 
         cat >>$outfile <<_______EOF
 
 #define GLIB_SIZEOF_VOID_P $glib_void_p
 #define GLIB_SIZEOF_LONG   $glib_long
+#define GLIB_SIZEOF_SIZE_T $glib_size_t
 
 _______EOF
 
-       case x$glib_size_t in
-        x2) echo "typedef gint16  gssize;" >> $outfile
-            echo "typedef guint16 gsize;"  >> $outfile
-            ;;
-        x4) echo "typedef gint32  gssize;" >> $outfile
-            echo "typedef guint32 gsize;"  >> $outfile
-            ;;
-        x8) echo "typedef gint64  gssize;" >> $outfile
-            echo "typedef guint64 gsize;"  >> $outfile
-            ;;
-       *)  echo "#error size of size_t is unknown" >> $outfile
-            ;;
-        esac
+echo "typedef signed $glib_size_type_define gssize;" >> $outfile
+echo "typedef unsigned $glib_size_type_define gsize;" >> $outfile
 
        if test -z "$glib_unknown_void_p"; then
          cat >>$outfile <<_______EOF
@@ -1690,10 +2000,24 @@ _______EOF
        if test x$g_have_gnuc_varargs = xyes ; then
                cat >>$outfile <<_______EOF
 
+/* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
+ * is passed ISO vararg support is turned off, and there is no work
+ * around to turn it on, so we unconditionally turn it off.
+ */
+#if __GNUC__ == 2 && __GNUC_MINOR__ == 95
+#  undef G_HAVE_ISO_VARARGS
+#endif
+
 #define G_HAVE_GNUC_VARARGS 1
 _______EOF
        fi
 
+       case x$g_stack_grows in
+       xyes) echo "#define G_HAVE_GROWING_STACK 1" >>$outfile ;;
+       *)    echo "#define G_HAVE_GROWING_STACK 0" >>$outfile ;;
+       esac
+
+
        echo >>$outfile
        if test x$g_have_eilseq = xno; then
                cat >>$outfile <<_______EOF
@@ -1755,10 +2079,7 @@ union _GSystemThread
 _______EOF
 
        echo >>$outfile
-       g_bit_sizes="16 32"
-       if test -n "$gint64"; then
-         g_bit_sizes="$g_bit_sizes 64"
-       fi
+       g_bit_sizes="16 32 64"
        for bits in $g_bit_sizes; do
          cat >>$outfile <<_______EOF
 #define GINT${bits}_TO_${g_bs_native}(val)     ((gint${bits}) (val))
@@ -1809,7 +2130,11 @@ esac
 # on variable expansion in case labels.  Look at the generated config.status
 # for a hint.
 
-glib_header_alloca_h="$ac_cv_header_alloca_h"
+if test "x${ac_cv_working_alloca_h+set}" = xset ; then
+  glib_header_alloca_h="$ac_cv_working_alloca_h"
+else
+  glib_header_alloca_h="$ac_cv_header_alloca_h"
+fi
 
 case xyes in
 x$ac_cv_header_float_h)
@@ -1896,8 +2221,18 @@ $ac_cv_sizeof_long_long)
   glib_extension='G_GNUC_EXTENSION '
   gint64_constant='(G_GNUC_EXTENSION (val##LL))'
   ;;
+$ac_cv_sizeof___int64)
+  gint64='__int64'
+  if test -n "$glib_cv_long_long_format"; then
+    gint64_format='"'$glib_cv_long_long_format'i"'
+    guint64_format='"'$glib_cv_long_long_format'u"'
+  fi
+  glib_extension=
+  gint64_constant='(val##i64)'
+  ;;
 esac
 glib_size_t=$glib_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
 
@@ -1991,10 +2326,12 @@ x$ac_cv_c_bigendian)
   ;;
 esac
 
+g_stack_grows=$glib_cv_stack_grows
+
 g_have_eilseq=$have_eilseq
 
 case x$have_threads in
-xnone) g_enable_threads_def="#undef";;
+xno)   g_enable_threads_def="#undef";;
 *)     g_enable_threads_def="#define";;
 esac
 
@@ -2036,13 +2373,19 @@ gthread-2.0-uninstalled.pc
 gobject-2.0.pc
 gobject-2.0-uninstalled.pc
 glib.spec
+glib-zip
+glib-gettextize
 Makefile
 build/Makefile
 build/win32/Makefile
+build/win32/dirent/Makefile
 glib/Makefile
+glib/libcharset/Makefile
+glib/trio/Makefile
 gmodule/gmoduleconf.h
 gmodule/Makefile
 gobject/Makefile
+gobject/glib-mkenums
 gthread/Makefile
 po/Makefile.in
 docs/Makefile
@@ -2051,15 +2394,4 @@ docs/reference/glib/Makefile
 docs/reference/gobject/Makefile
 tests/Makefile
 m4macros/Makefile
-],[echo ""
-echo " *** IMPORTANT *** "
-echo ""
-echo "This is a development version of GLib.  You should be using a stable"
-echo "version, which is available at ftp://ftp.gtk.org/pub/gtk/v1.2/.  The"
-echo "version you just configured is meant for developers of GLib only:"
-echo ""
-echo "  * You should not base stable software on this version of GLib."
-echo "  * GNOME developers should use a stable version of GLib."
-echo ""
-echo " *** You should be using GLib 1.2 instead. ***"
 ])