summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkira TAGOH <akira@tagoh.org>2015-07-27 11:00:37 +0900
committerAkira TAGOH <akira@tagoh.org>2015-07-27 11:01:06 +0900
commitbdade4f367bd8aee5ae16758440f8c505e1d6fae (patch)
tree80a6f29b74bb026c917fbe61c31cf74277ccee32
parentf7119e44f9d93b58da13163b2e465d409c4d9da7 (diff)
Fix the build fail on MSVC 14 (fixes issue#13)
Patch from David Ostrovsky
-rw-r--r--configure.ac15
1 files changed, 8 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index dd72c0d..7b105de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -221,10 +221,12 @@ AC_CHECK_HEADERS([dirent.h execinfo.h libgen.h sys/param.h])
AC_CHECK_FUNCS([backtrace getegid geteuid getgid getuid __secure_getenv secure_getenv strndup vasprintf vsnprintf])
AC_CHECK_VA_COPY
-if test "x$ac_cv_func_vsnprintf" = xyes; then
- AC_CACHE_CHECK([Whether vsnprintf is C99-compliant], [lt_cv_c99_vsnprintf],
- [AC_RUN_IFELSE([AC_LANG_SOURCE([[
+AC_CACHE_CHECK([Whether vsnprintf is C99-compliant], [lt_cv_c99_vsnprintf],
+ [AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <sys/types.h>
+#include <stdio.h>
#include <stdarg.h>
+#include <stdlib.h>
int
foo(char *format, ...)
{
@@ -247,10 +249,9 @@ main(void)
return foo("foo: %s", "bar");
}]])],
- [lt_cv_c99_vsnprintf=yes],[lt_cv_c99_vsnprintf=no],[lt_cv_c99_vsnprintf=no])])
- if test "x$lt_cv_c99_vsnprintf" = xyes; then
- AC_DEFINE(LT_HAVE_C99_VSNPRINTF, 1, [Have C99-compliant vsnprintf])
- fi
+ [lt_cv_c99_vsnprintf=yes],[lt_cv_c99_vsnprintf=no],[lt_cv_c99_vsnprintf=no])])
+if test "x$lt_cv_c99_vsnprintf" = xyes; then
+ AC_DEFINE(LT_HAVE_C99_VSNPRINTF, 1, [Have C99-compliant vsnprintf])
fi
dnl ======================================================================