diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2003-03-08 11:44:37 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2003-03-08 11:44:37 +0000 |
commit | fd0a7d3b5a206dd98f339d4d76b6b92be0b89090 (patch) | |
tree | 34bb27f10a9227b9800c05d1104d0333bc9ec9eb /configure.in | |
parent | af8af437f390e008361084b0a59e4cc155cc39c1 (diff) | |
download | monitoring-plugins-fd0a7d3b5a206dd98f339d4d76b6b92be0b89090.tar.gz |
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
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/configure.in b/configure.in index 7fccb98d..029b583c 100644 --- a/configure.in +++ b/configure.in | |||
@@ -493,6 +493,7 @@ if test x"$ac_cv_HAVE_VA_COPY" = x"yes"; then | |||
493 | AC_DEFINE(HAVE_VA_COPY,1,[Define if system has va_copy]) | 493 | AC_DEFINE(HAVE_VA_COPY,1,[Define if system has va_copy]) |
494 | fi | 494 | fi |
495 | 495 | ||
496 | AC_CHECK_FUNCS(vsnprintf snprintf asprintf vasprintf) | ||
496 | AC_CACHE_CHECK([for C99 vsnprintf],ac_cv_HAVE_C99_VSNPRINTF,[ | 497 | AC_CACHE_CHECK([for C99 vsnprintf],ac_cv_HAVE_C99_VSNPRINTF,[ |
497 | AC_TRY_RUN([ | 498 | AC_TRY_RUN([ |
498 | #include <sys/types.h> | 499 | #include <sys/types.h> |
@@ -523,28 +524,6 @@ if test x"$ac_cv_HAVE_C99_VSNPRINTF" = x"yes"; then | |||
523 | AC_DEFINE(HAVE_C99_VSNPRINTF,1,[Define if system has C99 compatible vsnprintf]) | 524 | AC_DEFINE(HAVE_C99_VSNPRINTF,1,[Define if system has C99 compatible vsnprintf]) |
524 | fi | 525 | fi |
525 | 526 | ||
526 | #AC_HAVE_DECL(asprintf, [#include <stdio.h>]) | ||
527 | #AC_HAVE_DECL(vasprintf, [#include <stdio.h>]) | ||
528 | #AC_HAVE_DECL(vsnprintf, [#include <stdio.h>]) | ||
529 | #AC_HAVE_DECL(snprintf, [#include <stdio.h>]) | ||
530 | |||
531 | AC_CHECK_FUNC(snprintf, | ||
532 | AC_DEFINE(HAVE_SNPRINTF,1,[Define if snprintf is present]), | ||
533 | LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a") | ||
534 | AC_CHECK_FUNC(vsnprintf, | ||
535 | AC_DEFINE(HAVE_VSNPRINTF,1,[Define if vsnprintf is present]), | ||
536 | LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a") | ||
537 | AC_CHECK_FUNC(vasprintf, | ||
538 | AC_DEFINE(HAVE_VASPRINTF,1,[Define if vasprintf is present]), | ||
539 | LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a") | ||
540 | AC_CHECK_FUNC(asprintf, | ||
541 | AC_DEFINE(HAVE_ASPRINTF,1,[Define if asprintf is present]), | ||
542 | LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a") | ||
543 | |||
544 | 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 | ||
545 | LIBS="$LIBS -lsnprintf" DEPLIBS="$DEPLIBS libsnprintf.a" | ||
546 | fi | ||
547 | |||
548 | AC_TRY_COMPILE([#include <sys/time.h>], | 527 | AC_TRY_COMPILE([#include <sys/time.h>], |
549 | [struct timeval *tv; | 528 | [struct timeval *tv; |
550 | struct timezone *tz;], | 529 | struct timezone *tz;], |