[xiph-commits] r9193 - trunk/speex

jm at motherfish-iii.xiph.org jm at motherfish-iii.xiph.org
Thu Apr 28 23:56:16 PDT 2005


Author: jm
Date: 2005-04-28 23:56:15 -0700 (Thu, 28 Apr 2005)
New Revision: 9193

Modified:
   trunk/speex/configure.ac
Log:
Detection of alloca and c99 arrays should work even when cross-compiling


Modified: trunk/speex/configure.ac
===================================================================
--- trunk/speex/configure.ac	2005-04-29 05:33:45 UTC (rev 9192)
+++ trunk/speex/configure.ac	2005-04-29 06:56:15 UTC (rev 9193)
@@ -37,23 +37,21 @@
 AC_C_RESTRICT
 
 
-
 AC_MSG_CHECKING(for C99 variable-size arrays)
-AC_TRY_RUN([
+AC_TRY_COMPILE( , [
 int foo=10;
-int main() {int array[foo];return 0;}
+int array[foo];
 ],
-[has_var_arrays=yes;AC_DEFINE([VAR_ARRAYS], [], [Use C99 variable-size arrays])],
-has_var_arrays=no,
-has_var_arrays=no,
+[has_var_arrays=yes;AC_DEFINE([VAR_ARRAYS], [], [Use C99 variable-size arrays])
+],
+has_var_arrays=no
 )
 AC_MSG_RESULT($has_var_arrays)
 
 AC_MSG_CHECKING(for alloca)
-AC_TRY_RUN([
-#include <alloca.h>
+AC_TRY_COMPILE( [#include <alloca.h>], [
 int foo=10;
-int main() {int *array = alloca(foo);return 0;}
+int *array = alloca(foo);
 ],
 [
 has_alloca=yes;
@@ -61,8 +59,7 @@
 AC_DEFINE([USE_ALLOCA], [], [Make use of alloca])
 fi
 ],
-has_alloca=no,
-has_alloca=no,
+has_alloca=no
 )
 AC_MSG_RESULT($has_alloca)
 



More information about the commits mailing list