Author: cazfi
Date: Sat May  7 00:46:02 2016
New Revision: 32609

URL: http://svn.gna.org/viewcvs/freeciv?rev=32609&view=rev
Log:
Use AC_C_VARARRAYS instead of AC_C99_VARIABLE_ARRAYS.

See patch #7193

Modified:
    trunk/configure.ac
    trunk/m4/c99.m4

Modified: trunk/configure.ac
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/configure.ac?rev=32609&r1=32608&r2=32609&view=diff
==============================================================================
--- trunk/configure.ac  (original)
+++ trunk/configure.ac  Sat May  7 00:46:02 2016
@@ -691,7 +691,12 @@
 FC_GPROF
 
 AC_C99_VARIADIC_MACROS
-AC_C99_VARIABLE_ARRAYS
+
+AC_C_VARARRAYS
+if test "x$ac_cv_c_vararrays" != "xyes" ; then
+  AC_MSG_ERROR([A compiler supporting C99 variable arrays is required])
+fi
+
 AC_C99_INITIALIZERS
 AC_C99_STDINT_H
 

Modified: trunk/m4/c99.m4
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/m4/c99.m4?rev=32609&r1=32608&r2=32609&view=diff
==============================================================================
--- trunk/m4/c99.m4     (original)
+++ trunk/m4/c99.m4     Sat May  7 00:46:02 2016
@@ -18,26 +18,6 @@
            MSG("%s%d", "foo", 
1);]])],[ac_cv_c99_variadic_macros=yes],[ac_cv_c99_variadic_macros=no])])
   if test "x${ac_cv_c99_variadic_macros}" != "xyes"; then
     AC_MSG_ERROR([A compiler supporting C99 variadic macros is required])
-  fi
-])
-
-# Check C99-style variable-sized arrays (required):
-#
-#   char concat_str[strlen(s1) + strlen(s2) + 1];
-#
-AC_DEFUN([AC_C99_VARIABLE_ARRAYS],
-[
-  dnl Check for variable arrays
-  AC_CACHE_CHECK([for C99 variable arrays],
-    [ac_cv_c99_variable_arrays],
-    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <string.h>
-#include <stdio.h>
-]], [[char *s1 = "foo", *s2 = "bar";
-         char s3[strlen(s1) + strlen(s2) + 1];
-         sprintf(s3, "%s%s", s1, 
s2);]])],[ac_cv_c99_variable_arrays=yes],[ac_cv_c99_variable_arrays=no])])
-  if test "x${ac_cv_c99_variable_arrays}" != "xyes"; then
-    AC_MSG_ERROR([A compiler supporting C99 variable arrays is required])
   fi
 ])
 


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to