From: des Date: Mon, 7 Aug 2006 15:47:39 +0000 (+0000) Subject: Improve detection of the presence and usability of asprintf() / vasprintf(). X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1a82fc8e15ae50e4e3c1b123de328bd48efa0e7;p=varnish Improve detection of the presence and usability of asprintf() / vasprintf(). git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@723 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/configure.ac b/varnish-cache/configure.ac index 3986669e..687e66f9 100644 --- a/varnish-cache/configure.ac +++ b/varnish-cache/configure.ac @@ -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