<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39652 >

On 03/09/07, Marko Lindqvist wrote:
>
>  Well, I have no environment to *test*, but I wrote patch anyway. This
> updates also mingw32 handling to present autoconf standards
> (AC_CANONICAL_HOST has been recommended since autoconf-2.13)

 Noticed that configure.ac already had AC_CANONICAL_TARGET. Replaced
that with AC_CANONICAL_HOST as Freeciv is not cross-compiler (autoconf
naming of build/host/target is sometimes confusing).


 - ML

diff -Nurd -X.diff_ignore freeciv/configure.ac freeciv/configure.ac
--- freeciv/configure.ac	2007-09-08 20:06:31.000000000 +0300
+++ freeciv/configure.ac	2007-09-09 17:57:01.000000000 +0300
@@ -7,7 +7,7 @@
 AC_CONFIG_SRCDIR([common/game.c])
 AC_CONFIG_AUX_DIR(bootstrap) # This can't be quoted or automake will fail
 AM_CONFIG_HEADER(config.h)
-AC_CANONICAL_TARGET
+AC_CANONICAL_HOST
 
 PACKAGE=freeciv
 
@@ -354,33 +354,40 @@
   # necessary with a working automake.
 fi
 
-case $host_os in
-  *mingw32* ) MINGW32=yes;;
-  *amigaos* ) AMIGA=yes;;
-  * ) AMIGA=no; MINGW32=no;;
-esac
+dnl Defaults
+MINGW32=no
+AMIGA=no
 
-dnl Amiga-specific settings
-if test x"$AMIGA" = "xyes"; then
-  AC_DEFINE(ALWAYS_ROOT, 1, [Amiga-specific setting - root])
-fi
+dnl Settings specific to host OS
+case "$host_os" in
 
-dnl Windows-specific settings
-AC_DIAGNOSE([obsolete],[AC_MINGW32 is obsolete: use AC_CANONICAL_HOST and $host_os])
+  *mingw32*)
+    dnl Windows-specific settings
+    MINGW32=yes
+    AC_CHECK_TOOL([WINDRES], [windres])
+    if test -z $WINDRES; then
+	  AC_MSG_ERROR([*** 'windres' missing.  Install binutils, fix your \$PATH, or set \$WINDRES manually. ***])
+    fi
 
-if test x"$MINGW32" = "xyes"; then
-  AC_CHECK_TOOL([WINDRES], [windres])
-  if test -z $WINDRES; then
-	AC_MSG_ERROR([*** 'windres' missing.  Install binutils, fix your \$PATH, or set \$WINDRES manually. ***])
-  fi
+    AC_DEFINE([SOCKET_ZERO_ISNT_STDIN], [1], [Mingw32-specific setting - stdin])
+    AC_DEFINE([ALWAYS_ROOT], [1], [Can execute program as root - Mingw32])
+    AC_DEFINE([WIN32_NATIVE], [1], [Mingw32-specific setting - native])
+    AC_DEFINE([HAVE_WINSOCK], [1], [Mingw32-specific setting - winsock])
+    AC_DEFINE([NONBLOCKING_SOCKETS], [1], [nonblocking sockets support])
+    LIBS="$LIBS -lwsock32"
+    ;;
 
-  AC_DEFINE(SOCKET_ZERO_ISNT_STDIN, 1, [Mingw32-specific setting - stdin])
-  AC_DEFINE(ALWAYS_ROOT, 1, [Mingw32-specific setting - root])
-  AC_DEFINE(WIN32_NATIVE, 1, [Mingw32-specific setting - native])
-  AC_DEFINE(HAVE_WINSOCK, 1, [Mingw32-specific setting - winsock])
-  AC_DEFINE(NONBLOCKING_SOCKETS, 1, [nonblocking sockets support])
-  LIBS="$LIBS -lwsock32"
-fi
+  *skyos*)
+    dnl SkyOS specific settings
+    AC_DEFINE([ALWAYS_ROOT], [1], [Can execute program as root - SkyOS])
+    ;;
+
+  *amigaos*)
+    AMIGA=yes
+    AC_DEFINE([ALWAYS_ROOT], [1], [Can execute program as root - Amiga])
+    ;;
+
+esac
 
 dnl note this has to match the path installed by po/Makefile
 if test x"$MINGW32" != "xyes"; then
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to