diff --git a/configure b/configure index eb36c0ddee..5db74e03e2 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh -# From configure.in Revision: 1.51 +# From configure.in Revision: 1.54 @@ -2756,6 +2756,58 @@ ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_aton.$O" fi +echo $ac_n "checking for vsnprintf""... $ac_c" 1>&6 +echo "configure:2761: checking for vsnprintf" >&5 +if eval "test \"`echo '$''{'ac_cv_func_vsnprintf'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char vsnprintf(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_vsnprintf) || defined (__stub___vsnprintf) +choke me +#else +vsnprintf(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_vsnprintf=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_vsnprintf=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'vsnprintf`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ISC_NEED_VSNPRINTF="#undef ISC_NEED_VSNPRINTF" +else + echo "$ac_t""no" 1>&6 +ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS vsnprintf.$O" + ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS vsnprintf.c" + ISC_NEEDVSNPRINTF="#define ISC_NEED_VSNPRINTF 1" +fi + + @@ -2905,6 +2957,7 @@ trap 'rm -fr `echo "make/rules lib/dns/sec/dst/Makefile lib/dns/sec/dst/include/Makefile lib/dns/sec/dst/include/dst/Makefile + lib/dns/config/Makefile lib/tests/Makefile lib/tests/include/Makefile lib/tests/include/tests/Makefile @@ -2991,6 +3044,7 @@ s%@ISC_IPV6_C@%$ISC_IPV6_C%g s%@ISC_NET_NEEDNTOP@%$ISC_NET_NEEDNTOP%g s%@ISC_NET_NEEDPTON@%$ISC_NET_NEEDPTON%g s%@ISC_NET_NEEDATON@%$ISC_NET_NEEDATON%g +s%@ISC_NEED_VSNPRINTF@%$ISC_NEED_VSNPRINTF%g s%@ISC_EXTRA_OBJS@%$ISC_EXTRA_OBJS%g s%@ISC_EXTRA_SRCS@%$ISC_EXTRA_SRCS%g s%@BIND9_TOP_BUILDDIR@%$BIND9_TOP_BUILDDIR%g diff --git a/configure.in b/configure.in index a8553af15e..114e3a4400 100644 --- a/configure.in +++ b/configure.in @@ -13,7 +13,7 @@ dnl PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS dnl ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS dnl SOFTWARE. -AC_REVISION($Revision: 1.54 $) +AC_REVISION($Revision: 1.55 $) AC_PREREQ(2.13) @@ -362,10 +362,10 @@ AC_CHECK_FUNC(inet_aton, ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_aton.c" ISC_NET_NEEDATON="#define ISC_NET_NEEDATON 1"] ) -AC_CHECK_FUNC(vsnprint, +AC_CHECK_FUNC(vsnprintf, [ISC_NEED_VSNPRINTF="#undef ISC_NEED_VSNPRINTF"], - [ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS vsnprint.$O", - ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS vsnprint.c" + [ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS vsnprintf.$O" + ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS vsnprintf.c" ISC_NEEDVSNPRINTF="#define ISC_NEED_VSNPRINTF 1"]) AC_SUBST(ISC_NET_NEEDNTOP) AC_SUBST(ISC_NET_NEEDPTON)