Make some changes to the way that GMainContext works:
[platform/upstream/glib.git] / configure.in
index afe2fe2..260d5ee 100644 (file)
@@ -7,7 +7,7 @@ builtin(include, acglib.m4)dnl
 AC_PREREQ(2.13)
 
 # Process this file with autoconf to produce a configure script.
-AC_INIT(glist.c)
+AC_INIT(glib/glib.h)
 
 # Save this value here, since automake will set cflags later
 cflags_set=${CFLAGS+set}
@@ -31,7 +31,7 @@ GLIB_AC_DIVERT_BEFORE_HELP([
 #
 GLIB_MAJOR_VERSION=1
 GLIB_MINOR_VERSION=3
-GLIB_MICRO_VERSION=2
+GLIB_MICRO_VERSION=7
 GLIB_INTERFACE_AGE=0
 GLIB_BINARY_AGE=0
 GLIB_VERSION=$GLIB_MAJOR_VERSION.$GLIB_MINOR_VERSION.$GLIB_MICRO_VERSION
@@ -101,7 +101,6 @@ esac[]dnl
 
 dnl declare --enable-* args and collect ac_help strings
 AC_ARG_ENABLE(debug, [  --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
-AC_ARG_ENABLE(msg-prefix, [  --enable-msg-prefix     turn on program name and PID prefixing of messages and warnings],,enable_msg_prefix=no)
 AC_ARG_ENABLE(gc_friendly, [  --enable-gc-friendly    turn on garbage collector friendliness [default=no]],,enable_gc_friendly=no)
 AC_ARG_ENABLE(mem_pools, [  --disable-mem-pools     disable all glib memory pools],,disable_mem_pools=no)
 AC_ARG_ENABLE(ansi, [  --enable-ansi           turn on strict ansi [default=no]],
@@ -114,15 +113,6 @@ if test "x$enable_threads" != "xyes"; then
   enable_threads=no
 fi
 
-if test "x$enable_debug" = "xyes"; then
-  test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
-  GLIB_DEBUG_FLAGS="-DG_ENABLE_DEBUG"
-else
-  if test "x$enable_debug" = "xno"; then
-    GLIB_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
-  fi
-fi
-
 AC_DEFINE_UNQUOTED(G_COMPILED_WITH_DEBUGGING, "${enable_debug}",
        [Whether glib was compiled with debugging enabled])
 
@@ -144,16 +134,52 @@ else
   AC_MSG_RESULT(yes)
 fi
 
-if test "x$enable_msg_prefix" = "xyes"; then
-  AC_DEFINE_UNQUOTED(G_ENABLE_MSG_PREFIX, 1, 
-                    [Enable prefixing of error messages with program names])
-fi
-
-# Checks for programs.
+dnl Checks for programs.
 AC_PROG_CC
+
+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)
+AC_LANG_SAVE
+AC_LANG_CPLUSPLUS
+AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=)
+AM_CONDITIONAL(HAVE_CXX, test "$CXX" != "")
+AC_LANG_RESTORE
+
 AM_PROG_CC_STDC
 AC_PROG_INSTALL
 
+#
+# Find pkg-config
+#
+AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+if test x$PKG_CONFIG = xno ; then
+  AC_MSG_ERROR([*** pkg-config not found. See http://pkgconfig.sourceforge.net])
+fi
+
+if pkg-config --atleast-pkgconfig-version 0.5 ; then
+  :
+else
+  AC_MSG_ERROR([*** pkg-config too old; version 0.5 or better required.])
+fi
+
+if test "x$enable_debug" = "xyes"; then
+  if test x$cflags_set != xset ; then
+      case " $CFLAGS " in
+      *[[\ \   ]]-g[[\ \       ]]*) ;;
+      *) CFLAGS="$CFLAGS -g" ;;
+      esac
+  fi
+       
+  GLIB_DEBUG_FLAGS="-DG_ENABLE_DEBUG"
+else
+  if test "x$enable_debug" = "xno"; then
+    GLIB_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS"
+  fi
+fi
+
+AC_CYGWIN
+AC_EXEEXT
+
 # define a MAINT-like variable REBUILD which is set if Perl
 # and awk are found, so autogenerated sources can be rebuilt
 AC_PROG_AWK
@@ -169,7 +195,26 @@ if test "x$enable_rebuilds" = "xyes" && \
 fi
 AC_SUBST(REBUILD)
 
+
+dnl
+dnl gettext support
+dnl
+
+ALL_LINGUAS="az ca de fr no ru sl sv tr uk"
+AM_GLIB_GNU_GETTEXT
+LIBS="$LIBS $INTLLIBS"
+
+GETTEXT_PACKAGE=glib20
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
+
+# AM_GLIB_GNU_GETTEXT above substs $DATADIRNAME
+# this is the directory where the *.{mo,gmo} files are installed
+GLIB_LOCALE_DIR="${prefix}/${DATADIRNAME}/locale"
+AC_DEFINE_UNQUOTED(GLIB_LOCALE_DIR,"$GLIB_LOCALE_DIR")
+
 dnl Initialize libtool
+AC_LIBTOOL_WIN32_DLL
 AM_PROG_LIBTOOL
 
 if test "x$GCC" = "xyes"; then
@@ -244,7 +289,7 @@ 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_CACHE_VAL(glib_cv_long_long_format,[
-               for format in ll q; do
+               for format in ll q I64; do
                  AC_TRY_RUN([#include <stdio.h>  
                        int main()
                        {
@@ -259,7 +304,7 @@ if test x$ac_cv_sizeof_long_long = x8; then
                        break)
                done])
        if test -n "$glib_cv_long_long_format"; then
-         AC_MSG_RESULT(%${glib_cv_long_long_format}i)
+         AC_MSG_RESULT(%${glib_cv_long_long_format}u)
         else
          AC_MSG_RESULT(none)
         fi
@@ -339,6 +384,38 @@ case x$glib_cv_hasinline in
 xyes) AC_DEFINE(G_HAVE_INLINE,1,[Have inline keyword])
 esac
 
+# check for flavours of varargs macros
+AC_MSG_CHECKING(for ISO C99 varargs macros in C)
+AC_TRY_COMPILE([],[
+int a(int p1, int p2, int p3);
+#define call_a(...) a(1,__VA_ARGS__)
+call_a(2,3);
+],g_have_iso_c_varargs=yes,g_have_iso_c_varargs=no)
+AC_MSG_RESULT($g_have_iso_c_varargs)
+
+AC_MSG_CHECKING(for ISO C99 varargs macros in C++)
+if test "$CXX" = ""; then
+dnl No C++ compiler
+  g_have_iso_cxx_varargs=no
+else
+  AC_LANG_CPLUSPLUS
+  AC_TRY_COMPILE([],[
+int a(int p1, int p2, int p3);
+#define call_a(...) a(1,__VA_ARGS__)
+call_a(2,3);
+],g_have_iso_cxx_varargs=yes,g_have_iso_cxx_varargs=no)
+  AC_LANG_C
+fi
+AC_MSG_RESULT($g_have_iso_cxx_varargs)
+
+AC_MSG_CHECKING(for GNUC varargs macros)
+AC_TRY_COMPILE([],[
+int a(int p1, int p2, int p3);
+#define call_a(params...) a(1,params)
+call_a(2,3);
+],g_have_gnuc_varargs=yes,g_have_gnuc_varargs=no)
+AC_MSG_RESULT($g_have_gnuc_varargs)
+
 # check for bytesex stuff
 AC_C_BIGENDIAN
 
@@ -383,7 +460,7 @@ GLIB_SIZEOF([$size_includes], ptrdiff_t, ptrdiff_t)
 GLIB_SIZEOF([$size_includes], intmax_t, intmax_t)
 
 # Check for some functions
-AC_CHECK_FUNCS(lstat strerror strsignal memmove mkstemp vsnprintf strcasecmp strncasecmp poll getcwd)
+AC_CHECK_FUNCS(lstat strerror strsignal memmove mkstemp vsnprintf stpcpy strcasecmp strncasecmp poll getcwd nanosleep)
 
 # Check if bcopy can be used for overlapping copies, if memmove isn't found.
 # The check is borrowed from the PERL Configure script.
@@ -592,7 +669,14 @@ G_MODULE_PLUGIN_LIBS=
 G_MODULE_LDFLAGS=
 dnl G_MODULE_IMPL= don't reset, so cmd-line can override
 G_MODULE_NEED_USCORE=0
+G_MODULE_BROKEN_RTLD_GLOBAL=0
 G_MODULE_HAVE_DLERROR=0
+dnl *** force native WIN32 shared lib loader 
+if test -z "$G_MODULE_IMPL"; then
+  case "$host" in
+  *-*-mingw*|*-*-cygwin*) G_MODULE_IMPL=G_MODULE_IMPL_WIN32 ;;
+  esac
+fi
 dnl *** dlopen() and dlsym() in system libraries
 if test -z "$G_MODULE_IMPL"; then
        AC_CHECK_FUNC(dlopen,
@@ -609,7 +693,7 @@ if test -z "$G_MODULE_IMPL" -a "x$glib_native_beos" = "xyes"; then
       G_MODULE_IMPL=G_MODULE_IMPL_BEOS],
       [])
 fi   
-# *** dlopen() and dlsym() in libdl
+dnl *** dlopen() and dlsym() in libdl
 if test -z "$G_MODULE_IMPL"; then
        AC_CHECK_LIB(dl, dlopen,
                     [AC_CHECK_LIB(dl, dlsym,
@@ -617,6 +701,13 @@ 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)
@@ -650,6 +741,36 @@ if test "$G_MODULE_IMPL" = "G_MODULE_IMPL_DL"; then
        LDFLAGS_orig="$LDFLAGS"
        LIBS="$LIBS $G_MODULE_LIBS"
        LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS"
+dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness
+       AC_CACHE_CHECK([for RTLD_GLOBAL brokenness],
+               glib_cv_rtldglobal_broken,[
+               AC_TRY_RUN([
+               #include <dlfcn.h>
+                #ifndef RTLD_GLOBAL
+                #define RTLD_GLOBAL 0
+                #endif
+                #ifndef RTLD_LAZY
+                #define RTLD_LAZY 0
+                #endif
+               int pthread_create;
+               int main () {
+               void *handle, *global, *local;
+               global = &pthread_create;
+               handle = dlopen ("libpthread.so", RTLD_GLOBAL | RTLD_LAZY);
+               if (!handle) return 0;
+               local = dlsym (handle, "pthread_create");
+               return global == local;
+               }],
+                       [glib_cv_rtldglobal_broken=no],
+                       [glib_cv_rtldglobal_broken=yes],
+                       [])
+               rm -f plugin.c plugin.o plugin.lo
+       ])
+       if test "x$glib_cv_rtldglobal_broken" = "xyes"; then
+               G_MODULE_BROKEN_RTLD_GLOBAL=1
+       else
+               G_MODULE_BROKEN_RTLD_GLOBAL=0
+       fi
 dnl *** check whether we need preceeding underscores
        AC_CACHE_CHECK([for preceeding underscore in symbols],
                glib_cv_uscore,[
@@ -667,7 +788,7 @@ dnl *** check whether we need preceeding underscores
                        [glib_cv_uscore=yes],
                        [glib_cv_uscore=no],
                        [])
-               rm -f plugin.c plugin.o plugin.lo
+               rm -f plugin.c plugin.$ac_objext plugin.lo
        ])
        if test "x$glib_cv_uscore" = "xyes"; then
                G_MODULE_NEED_USCORE=1
@@ -682,9 +803,12 @@ dnl *** check for having dlerror()
                [G_MODULE_HAVE_DLERROR=0])
        LIBS="$LIBS_orig"
 fi
-dnl *** done, have e got an implementation?
+dnl *** done, have we got an implementation?
 if test -z "$G_MODULE_IMPL"; then
        G_MODULE_IMPL=0
+        G_MODULE_SUPPORTED=false
+else
+        G_MODULE_SUPPORTED=true
 fi
 
 AC_MSG_CHECKING(for the suffix of shared libraries)
@@ -701,15 +825,100 @@ case "$host_os" in
 esac
 AC_MSG_RESULT(.$glib_gmodule_suffix)
  
+AC_SUBST(G_MODULE_SUPPORTED)
 AC_SUBST(G_MODULE_IMPL)
 AC_SUBST(G_MODULE_LIBS)
 AC_SUBST(G_MODULE_LIBS_EXTRA)
 AC_SUBST(G_MODULE_PLUGIN_LIBS)
 AC_SUBST(G_MODULE_LDFLAGS)
 AC_SUBST(G_MODULE_HAVE_DLERROR)
+AC_SUBST(G_MODULE_BROKEN_RTLD_GLOBAL)
 AC_SUBST(G_MODULE_NEED_USCORE)
 AC_SUBST(GLIB_DEBUG_FLAGS)
 
+dnl **********************
+dnl *** g_spawn checks ***
+dnl **********************
+
+AC_MSG_CHECKING(for gspawn implementation)
+case "$host" in
+  *-*-mingw*)
+    GSPAWN=gspawn-win32.lo
+    ;;
+  *)
+    GSPAWN=gspawn.lo
+    ;;    
+esac
+AC_MSG_RESULT($GSPAWN)
+AC_SUBST(GSPAWN)
+
+dnl *************************
+dnl *** GIOChannel checks ***
+dnl *************************
+
+AC_MSG_CHECKING(for GIOChannel implementation)
+case "$host" in
+  *-*-mingw*)
+    GIO=giowin32.lo
+    ;;
+  *)
+    GIO=giounix.lo
+    ;;    
+esac
+AC_MSG_RESULT($GIO)
+AC_SUBST(GIO)
+
+dnl ****************************************
+dnl *** platform dependent source checks ***
+dnl ****************************************
+
+AC_MSG_CHECKING(for platform-dependent source)
+case "$host" in
+  *-*-cygwin*|*-*-mingw*)
+    PLATFORMDEP=gwin32.lo
+    ;;
+  *)
+    PLATFORMDEP=
+    ;;    
+esac
+AC_MSG_RESULT($PLATFORMDEP)
+AC_SUBST(PLATFORMDEP)
+
+AC_MSG_CHECKING([whether to compile timeloop])
+case "$host" in
+  *-*-cygwin*|*-*-mingw*)
+    enable_timeloop=no
+    ;;
+  *)
+    enable_timeloop=yes
+    ;;    
+esac
+AC_MSG_RESULT($enable_timeloop)
+AM_CONDITIONAL(ENABLE_TIMELOOP, test x$enable_timeloop = xyes)
+
+AC_MSG_CHECKING([if building for some Win32 platform])
+case "$host" in
+  *-*-mingw*|*-*-cygwin*)
+    platform_win32=yes
+    ;;
+  *)
+    platform_win32=no
+    ;;
+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 ***
@@ -736,7 +945,7 @@ THREAD_NO_IMPLEMENTATION="You do not have any known thread system on your
                 computer. GLib will not have a default thread implementation."
 
 FLAG_DOES_NOT_WORK="I can't find the MACRO to enable thread safety on your
-                platform (normaly it's "_REENTRANT"). I'll not use any flag on
+                platform (normally it's "_REENTRANT"). I'll not use any flag on
                 compilation now, but then your programs might not work.
                 Please provide information on how it is done on your system."
 
@@ -842,17 +1051,22 @@ if test x"$have_threads" != xnone; then
                G_THREAD_CFLAGS="$G_THREAD_CFLAGS -D_POSIX4A_DRAFT10_SOURCE"
     esac
 
-    # if we are not finding the ctime_r function, then we probably are
+    # if we are not finding the localtime_r function, then we probably are
     # not using the proper multithread flag
 
     glib_save_CPPFLAGS="$CPPFLAGS"
     CPPFLAGS="$CPPFLAGS $G_THREAD_CFLAGS"
 
-    AC_TRY_COMPILE([#include <time.h>],
-       [time_t t; char b[30]; ctime_r (&t, b);], ,
-           [AC_TRY_COMPILE([#include <time.h>],
-               [time_t t; char b[30]; ctime_r (&t, b, 30);], ,
-                       AC_MSG_WARN($FLAG_DOES_NOT_WORK))])
+    # First we test, whether localtime_r is declared in time.h
+    # directly. Then we test whether a macro localtime_r exists, in
+    # which case localtime_r in the test program is replaced and thus
+    # if we still find localtime_r in the output, it is not defined as 
+    # a macro.
+
+    AC_EGREP_CPP([[^a-zA-Z1-9_]localtime_r[^a-zA-Z1-9_]], [#include <time.h>], ,
+      [AC_EGREP_CPP([[^a-zA-Z1-9_]localtime_r[^a-zA-Z1-9_]], [#include <time.h> 
+                                                          localtime_r(a,b)],
+                  AC_MSG_WARN($FLAG_DOES_NOT_WORK))])
 
     CPPFLAGS="$glib_save_CPPFLAGS"
 
@@ -880,7 +1094,7 @@ case $have_threads in
                fi      
                ;;
              *)
-               for thread_lib in "" pthread pthreads c_r thread dce; do
+               for thread_lib in "" pthread pthread32 pthreads c_r thread dce; do
                        if test x"$thread_lib" = x; then
                                add_thread_lib=""
                                IN=""
@@ -1020,7 +1234,7 @@ if test x"$have_threads" != xnone; then
                else
                        AC_CACHE_CHECK([for nonposix getpwuid_r],
                                ac_cv_func_nonposix_getpwuid_r,
-                               [AC_TRY_COMPILE([#include <pwd.h>],
+                               [AC_TRY_LINK([#include <pwd.h>],
                                        [char buffer[10000];
                                        struct passwd pwd;
                                        getpwuid_r (0, &pwd, buffer, 
@@ -1037,9 +1251,8 @@ if test x"$have_threads" != xnone; then
        if test x"$have_threads" = xposix; then
                glib_save_CPPFLAGS="$CPPFLAGS"
                CPPFLAGS="$CPPFLAGS $GTHREAD_COMPILE_IMPL_DEFINES"
-               GLIB_SIZEOF([#include <pthread.h>],
-                       pthread_t,
-                       system_thread)
+               dnl we might grow sizeof(pthread_t) later on, so use a dummy name here
+               GLIB_SIZEOF([#include <pthread.h>], pthread_t, system_thread)
                # This is not AC_CHECK_FUNC to also work with function
                # name mangling in header files.
                AC_MSG_CHECKING(for pthread_attr_setstacksize)
@@ -1107,17 +1320,12 @@ if test x"$have_threads" != xnone; then
                          exit (getpid()==other_pid || 
                                $posix_priority_min != $posix_priority_max);
                        }],
-                       [AC_MSG_RESULT(yes),
-                        AC_DEFINE(G_THREAD_USE_PID_SURROGATE, 1,
-                               [whether to use the PID niceness surrogate for thread priorities])
-
-                        glib_cv_sizeof_system_thread=`expr $glib_cv_sizeof_system_thread + $ac_cv_sizeof_long`],
+                       [AC_MSG_RESULT(yes)
+                         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
-               GLIB_SIZEOF([#include <thread.h>],
-                       thread_t,
-                       system_thread)
+               GLIB_SIZEOF([#include <thread.h>], thread_t, system_thread)
        fi
 
        LIBS="$glib_save_LIBS"
@@ -1181,6 +1389,23 @@ GLIB_SYSDEFS(
        glibconfig-sysdefs.h,
        =)
 
+dnl **********************
+dnl *** Win32 API libs ***
+dnl **********************
+
+case $host in
+  *-*-cygwin*)
+       G_LIBS_EXTRA="-luser32 -lwsock32 -lkernel32"
+    ;;
+  *-*-mingw*)
+       G_LIBS_EXTRA="-lwsock32"
+    ;;
+  *)
+       G_LIBS_EXTRA=""
+    ;;
+esac
+AC_SUBST(G_LIBS_EXTRA)
+
 dnl ***********************
 dnl *** Tests for iconv ***
 dnl ***********************
@@ -1239,8 +1464,23 @@ fi
 
 AC_SUBST(HTML_DIR)
 
-
 AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
+
+gtk_doc_min_version=0.6
+if $GTKDOC ; then 
+    gtk_doc_version=`gtkdoc-mkdb --version`
+    AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
+    if perl <<EOF ; then
+      exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) &&
+            ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
+EOF
+      AC_MSG_RESULT(yes)
+   else
+      AC_MSG_RESULT(no)
+      GTKDOC=false
+   fi
+fi
+
 AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC)
 AC_SUBST(HAVE_GTK_DOC)
 
@@ -1295,7 +1535,7 @@ case "$CONFIG_OTHER" in
 #ifndef __G_LIBCONFIG_H__
 #define __G_LIBCONFIG_H__
 
-#include <gmacros.h>
+#include <glib/gmacros.h>
 
 _______EOF
 
@@ -1429,7 +1669,29 @@ $glib_vacopy
 #else  /* !__cplusplus */
 $glib_inline
 #endif /* !__cplusplus */
+
+_______EOF
+
+       if test x$g_have_iso_c_varargs = xyes ; then
+               cat >>$outfile <<_______EOF
+#ifndef __cplusplus
+# define G_HAVE_ISO_VARARGS 1
+#endif
+_______EOF
+       fi
+       if test x$g_have_iso_cxx_varargs = xyes ; then
+               cat >>$outfile <<_______EOF
+#ifdef __cplusplus
+# define G_HAVE_ISO_VARARGS 1
+#endif
+_______EOF
+       fi
+       if test x$g_have_gnuc_varargs = xyes ; then
+               cat >>$outfile <<_______EOF
+
+#define G_HAVE_GNUC_VARARGS 1
 _______EOF
+       fi
 
        echo >>$outfile
        if test x$g_have_eilseq = xno; then
@@ -1454,17 +1716,14 @@ typedef struct _GStaticMutex GStaticMutex;
 struct _GStaticMutex
 {
   struct _GMutex *runtime_mutex;
-  struct {
-    union {
-      char   pad[$g_mutex_sizeof];
-      double dummy_double;
-      void  *dummy_pointer;
-      long   dummy_long;
-    } mutex;
-    void *debug_info;
+  union {
+    char   pad[$g_mutex_sizeof];
+    double dummy_double;
+    void  *dummy_pointer;
+    long   dummy_long;
   } static_mutex;
 };
-#define        G_STATIC_MUTEX_INIT     { NULL, { { { $g_mutex_contents} }, NULL } }
+#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_static_mutex_get_mutex_impl (&((mutex)->runtime_mutex)))
@@ -1714,6 +1973,10 @@ if test x$glib_cv_has__inline__ = xyes; then
 #define G_HAVE___INLINE__ 1"
 fi
 
+g_have_gnuc_varargs=$g_have_gnuc_varargs
+g_have_iso_c_varargs=$g_have_iso_c_varargs
+g_have_iso_cxx_varargs=$g_have_iso_cxx_varargs
+
 case xyes in
 x$ac_cv_c_bigendian)
   g_byte_order=G_BIG_ENDIAN
@@ -1749,8 +2012,13 @@ case $host in
     ;;
   *-*-cygwin*)
     glib_os="#define G_OS_UNIX
+#define G_PLATFORM_WIN32
 #define G_WITH_CYGWIN"
-v    ;;
+    ;;
+  *-*-mingw*)
+    glib_os="#define G_OS_WIN32
+#define G_PLATFORM_WIN32"
+    ;;
   *)
     glib_os="#define G_OS_UNIX"
     ;;
@@ -1759,28 +2027,30 @@ esac
 
 AC_OUTPUT([
 glib-2.0.pc
+glib-2.0-uninstalled.pc
 gmodule-2.0.pc
+gmodule-2.0-uninstalled.pc
 gthread-2.0.pc
+gthread-2.0-uninstalled.pc
 gobject-2.0.pc
+gobject-2.0-uninstalled.pc
 glib.spec
 Makefile
-glib-config-2.0
 build/Makefile
 build/win32/Makefile
+glib/Makefile
 gmodule/gmoduleconf.h
 gmodule/Makefile
 gobject/Makefile
 gthread/Makefile
+po/Makefile.in
 docs/Makefile
-docs/glib-config.1
 docs/reference/Makefile
 docs/reference/glib/Makefile
 docs/reference/gobject/Makefile
 tests/Makefile
-],[case "$CONFIG_FILES" in
-*glib-config-2.0*)chmod +x glib-config-2.0;;
-esac
-echo ""
+m4macros/Makefile
+],[echo ""
 echo " *** IMPORTANT *** "
 echo ""
 echo "This is a development version of GLib.  You should be using a stable"
@@ -1790,10 +2060,5 @@ 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 "If you install this version of GLib, we strongly recommend that you"
-echo "install it in a different prefix than GLib 1.2.  Use --prefix as an"
-echo "argument to configure to do this.  Otherwise, you will not be able to"
-echo "do development with GLib 1.2 any longer."
-echo ""
 echo " *** You should be using GLib 1.2 instead. ***"
 ])