From fd0a7d3b5a206dd98f339d4d76b6b92be0b89090 Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Sat, 8 Mar 2003 11:44:37 +0000 Subject: [PATCH] snprintf checks in configure.in like samba git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@386 f882894a-f735-0410-b71e-b25c423dba1c --- configure.in | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/configure.in b/configure.in index 7fccb98..029b583 100644 --- a/configure.in +++ b/configure.in @@ -493,6 +493,7 @@ if test x"$ac_cv_HAVE_VA_COPY" = x"yes"; then AC_DEFINE(HAVE_VA_COPY,1,[Define if system has va_copy]) fi +AC_CHECK_FUNCS(vsnprintf snprintf asprintf vasprintf) AC_CACHE_CHECK([for C99 vsnprintf],ac_cv_HAVE_C99_VSNPRINTF,[ AC_TRY_RUN([ #include @@ -523,28 +524,6 @@ if test x"$ac_cv_HAVE_C99_VSNPRINTF" = x"yes"; then AC_DEFINE(HAVE_C99_VSNPRINTF,1,[Define if system has C99 compatible vsnprintf]) fi -#AC_HAVE_DECL(asprintf, [#include ]) -#AC_HAVE_DECL(vasprintf, [#include ]) -#AC_HAVE_DECL(vsnprintf, [#include ]) -#AC_HAVE_DECL(snprintf, [#include ]) - -AC_CHECK_FUNC(snprintf, - AC_DEFINE(HAVE_SNPRINTF,1,[Define if snprintf is present]), - LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a") -AC_CHECK_FUNC(vsnprintf, - AC_DEFINE(HAVE_VSNPRINTF,1,[Define if vsnprintf is present]), - LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a") -AC_CHECK_FUNC(vasprintf, - AC_DEFINE(HAVE_VASPRINTF,1,[Define if vasprintf is present]), - LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a") -AC_CHECK_FUNC(asprintf, - AC_DEFINE(HAVE_ASPRINTF,1,[Define if asprintf is present]), - LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a") - -if test x"$ac_cv_HAVE_SNPRINTF" = x"no" -o x"$ac_cv_HAVE_VSNPRINTF" = x"no" -o x"$ac_cv_HAVE_VASPRINTF" = x"no" -o x"$ac_cv_HAVE_ASPRINTF" = x"no"; then - LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a" -fi - AC_TRY_COMPILE([#include ], [struct timeval *tv; struct timezone *tz;], -- 2.30.2