Index: configure.ac =================================================================== RCS file: /home/freeciv/CVS/freeciv/configure.ac,v retrieving revision 1.22.2.7 diff -u -r1.22.2.7 configure.ac --- configure.ac 27 Apr 2003 13:14:24 -0000 1.22.2.7 +++ configure.ac 13 May 2003 11:01:49 -0000 @@ -343,6 +343,7 @@ CLIENT_LIBS="$GTK_LIBS" if test x"$MINGW32" = "xyes"; then CFLAGS="$CFLAGS -mms-bitfields" + CLIENT_LDFLAGS="$LDFLAGS -mwindows" fi found_client=yes fi @@ -500,6 +501,7 @@ AC_SUBST(gui_sources) AC_SUBST(CLIENT_CFLAGS) AC_SUBST(CLIENT_LIBS) +AC_SUBST(CLIENT_LDFLAGS) AC_SUBST(SOUND_CFLAGS) AC_SUBST(SOUND_LIBS) AM_CONDITIONAL(ESD, test "x$ESD" = "xyes") Index: configure.in =================================================================== RCS file: /home/freeciv/CVS/freeciv/configure.in,v retrieving revision 1.201.2.6 diff -u -r1.201.2.6 configure.in --- configure.in 27 Apr 2003 13:14:24 -0000 1.201.2.6 +++ configure.in 13 May 2003 11:01:49 -0000 @@ -337,6 +337,7 @@ CLIENT_LIBS="$GTK_LIBS" if test x"$MINGW32" = "xyes"; then CFLAGS="$CFLAGS -mms-bitfields" + CLIENT_LDFLAGS="$LDFLAGS -mwindows" fi found_client=yes fi @@ -485,6 +486,7 @@ AC_SUBST(gui_sources) AC_SUBST(CLIENT_CFLAGS) AC_SUBST(CLIENT_LIBS) +AC_SUBST(CLIENT_LDFLAGS) AC_SUBST(SOUND_CFLAGS) AC_SUBST(SOUND_LIBS) AM_CONDITIONAL(ESD, test x"$ESD" = "xyes") Index: client/Makefile.am =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/Makefile.am,v retrieving revision 1.44 diff -u -r1.44 Makefile.am --- client/Makefile.am 24 Aug 2002 14:37:32 -0000 1.44 +++ client/Makefile.am 13 May 2003 11:01:49 -0000 @@ -168,6 +168,7 @@ audio_none.c \ audio_none.h +civclient_LDFLAGS = @CLIENT_LDFLAGS@ civclient_DEPENDENCIES = @gui_sources@/libguiclient.a \ ../common/libcivcommon.a agents/libagents.a civclient_LDADD = @gui_sources@/libguiclient.a \ Index: client/gui-gtk-2.0/graphics.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk-2.0/graphics.c,v retrieving revision 1.6.2.4 diff -u -r1.6.2.4 graphics.c --- client/gui-gtk-2.0/graphics.c 23 Apr 2003 02:41:33 -0000 1.6.2.4 +++ client/gui-gtk-2.0/graphics.c 13 May 2003 11:01:50 -0000 @@ -62,7 +62,11 @@ ***************************************************************************/ bool isometric_view_supported(void) { +#ifdef WIN32_NATIVE + return FALSE; +#else return TRUE; +#endif } /*************************************************************************** Index: common/support.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/support.c,v retrieving revision 1.21 diff -u -r1.21 support.c --- common/support.c 7 Aug 2002 11:21:48 -0000 1.21 +++ common/support.c 13 May 2003 11:01:50 -0000 @@ -170,10 +170,14 @@ /* suposed to give other application processor time for the mac */ WaitNextEvent(0, &the_event, usec, 0L); #else +#ifdef WIN32_NATIVE + Sleep(usec / 1000); +#else struct timeval tv; tv.tv_sec=0; tv.tv_usec=usec; select(0, NULL, NULL, NULL, &tv); +#endif #endif #endif #endif Index: m4/iconv.m4 =================================================================== RCS file: /home/freeciv/CVS/freeciv/m4/iconv.m4,v retrieving revision 1.1 diff -u -r1.1 iconv.m4 --- m4/iconv.m4 13 Apr 2002 13:51:47 -0000 1.1 +++ m4/iconv.m4 13 May 2003 11:01:50 -0000 @@ -1,18 +1,39 @@ -#serial AM2 +# iconv.m4 serial AM4 (gettext-0.11.3) +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + dnl From Bruno Haible. -AC_DEFUN([AM_ICONV], +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], +[ + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([iconv]) +]) + +AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). - AC_ARG_WITH([libiconv-prefix], -[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [ - for dir in `echo "$withval" | tr : ' '`; do - if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi - if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi - done - ]) + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + + dnl Add $INCICONV to CPPFLAGS before performing the following checks, + dnl because if the user has installed libiconv and not disabled its use + dnl via --without-libiconv-prefix, he wants to use it. The first + dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. + am_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ am_cv_func_iconv="no, consider installing GNU libiconv" @@ -25,7 +46,7 @@ am_cv_func_iconv=yes) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" - LIBS="$LIBS -liconv" + LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); @@ -38,6 +59,25 @@ ]) if test "$am_cv_func_iconv" = yes; then AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) + fi + if test "$am_cv_lib_iconv" = yes; then + AC_MSG_CHECKING([how to link with libiconv]) + AC_MSG_RESULT([$LIBICONV]) + else + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV + dnl either. + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + AC_SUBST(LIBICONV) + AC_SUBST(LTLIBICONV) +]) + +AC_DEFUN([AM_ICONV], +[ + AM_ICONV_LINK + if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL(am_cv_proto_iconv, [ AC_TRY_COMPILE([ @@ -60,9 +100,4 @@ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, [Define as const if the declaration of iconv() needs const.]) fi - LIBICONV= - if test "$am_cv_lib_iconv" = yes; then - LIBICONV="-liconv" - fi - AC_SUBST(LIBICONV) ])