summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 10 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 3e93c0276..8bc96bb45 100644
--- a/configure.ac
+++ b/configure.ac
@@ -213,20 +213,26 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
213 CFLAGS="$CFLAGS $t -Werror" 213 CFLAGS="$CFLAGS $t -Werror"
214 LDFLAGS="$LDFLAGS $t -Werror" 214 LDFLAGS="$LDFLAGS $t -Werror"
215 AC_LINK_IFELSE( 215 AC_LINK_IFELSE(
216 [AC_LANG_PROGRAM([[ #include <stdio.h> ]], 216 [AC_LANG_PROGRAM([[
217 #include <stdio.h>
218 int func (int t) {char b[100]; snprintf(b,sizeof b,"%d",t); return t;}
219 ]],
217 [[ 220 [[
218 char x[256]; 221 char x[256];
219 snprintf(x, sizeof(x), "XXX"); 222 snprintf(x, sizeof(x), "XXX%d", func(1));
220 ]])], 223 ]])],
221 [ AC_MSG_RESULT([yes]) 224 [ AC_MSG_RESULT([yes])
222 CFLAGS="$saved_CFLAGS $t" 225 CFLAGS="$saved_CFLAGS $t"
223 LDFLAGS="$saved_LDFLAGS $t" 226 LDFLAGS="$saved_LDFLAGS $t"
224 AC_MSG_CHECKING([if $t works]) 227 AC_MSG_CHECKING([if $t works])
225 AC_RUN_IFELSE( 228 AC_RUN_IFELSE(
226 [AC_LANG_PROGRAM([[ #include <stdio.h> ]], 229 [AC_LANG_PROGRAM([[
230 #include <stdio.h>
231 int func (int t) {char b[100]; snprintf(b,sizeof b,"%d",t); return t;}
232 ]],
227 [[ 233 [[
228 char x[256]; 234 char x[256];
229 snprintf(x, sizeof(x), "XXX"); 235 snprintf(x, sizeof(x), "XXX%d", func(1));
230 ]])], 236 ]])],
231 [ AC_MSG_RESULT([yes]) 237 [ AC_MSG_RESULT([yes])
232 break ], 238 break ],