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
dnl gettext support
dnl
-ALL_LINGUAS="de fr no sl tr uk"
+ALL_LINGUAS="de fr no ru sl tr uk"
AM_GLIB_GNU_GETTEXT
LIBS="$LIBS $INTLLIBS"
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
# 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()
{
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
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)
# Check if bcopy can be used for overlapping copies, if memmove isn't found.
# The check is borrowed from the PERL Configure script.
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,
[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
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 ***
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=""
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 ***********************
;;
*-*-cygwin*)
glib_os="#define G_OS_UNIX
+#define G_PLATFORM_WIN32
#define G_WITH_CYGWIN"
;;
*-*-mingw*)
- glib_os="#define G_OS_WIN32"
+ glib_os="#define G_OS_WIN32
+#define G_PLATFORM_WIN32"
;;
*)
glib_os="#define G_OS_UNIX"