]> err.no Git - varnish/commitdiff
Improve detection of the presence and usability of asprintf() / vasprintf().
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 7 Aug 2006 15:47:39 +0000 (15:47 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 7 Aug 2006 15:47:39 +0000 (15:47 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@723 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/configure.ac

index 3986669ebbb481dced39e1c0531d937e6bcbc3df..687e66f9bfeb06bea69628ce449bbb380d2e1b80 100644 (file)
@@ -61,11 +61,21 @@ AC_FUNC_VPRINTF
 AC_CHECK_FUNCS([strerror])
 AC_FUNC_STRERROR_R
 AC_CHECK_FUNCS([socket])
-AC_CHECK_FUNCS([vasprintf])
-AC_CHECK_FUNCS([asprintf])
 AC_CHECK_FUNCS([strlcat])
 AC_CHECK_FUNCS([strlcpy])
 
+# asprintf() and vasprintf() are tricky, because on some systems, they
+# are present in the C library, but their prototypes are hidden behind
+# conditionals which we won't bother to unravel.
+AC_CHECK_DECL([asprintf],
+       AC_DEFINE(HAVE_ASPRINTF,1,[Whether asprintf() is available]),
+       ,
+       [stdio.h])
+AC_CHECK_DECL([vasprintf],
+       AC_DEFINE(HAVE_VASPRINTF,1,[Whether vasprintf() is available]),
+       ,
+       [stdio.h])
+
 AC_CONFIG_FILES([
     Makefile
     bin/Makefile