diff options
author | Jeremy T. Bouse <undrgrid@users.sourceforge.net> | 2003-03-06 06:40:46 +0000 |
---|---|---|
committer | Jeremy T. Bouse <undrgrid@users.sourceforge.net> | 2003-03-06 06:40:46 +0000 |
commit | 2e641a086800444de7f80ed6cb973290d6b84ec0 (patch) | |
tree | be9dcb76e9238142c914e92592389678b35d0151 /acinclude.m4 | |
parent | 1fdb0658c8c5637c0b6eb2c6847eb2fcb2e5650a (diff) | |
download | monitoring-plugins-2e641a086800444de7f80ed6cb973290d6b84ec0.tar.gz |
Adds --with-lwres and --enable-emulate-getaddrinfo but are not used in any of
the code at this time. Has a check for IPv6 support but only runs if using the
emulate-getaddrinfo routines, this needs to be modified.
!!! I need input from results of this run on various platforms to see what
results are seen in plugins/config.h so please help test !!!
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@371 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index e69de29b..70d82e4b 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -0,0 +1,78 @@ +dnl @synopsis ACX_WHICH_GETHOSTBYNAME_R +dnl +dnl Provides a test to determine the correct way to call gethostbyname_r +dnl +dnl defines HAVE_GETHOSTBYNAME_R to the number of arguments required +dnl +dnl e.g. 6 arguments (linux) +dnl e.g. 5 arguments (solaris) +dnl e.g. 3 arguments (osf/1) +dnl +dnl @version $Id$ +dnl @author Brian Stafford <brian@stafford.uklinux.net> +dnl +dnl based on version by Caolan McNamara <caolan@skynet.ie> +dnl based on David Arnold's autoconf suggestion in the threads faq +dnl +AC_DEFUN(ACX_WHICH_GETHOSTBYNAME_R, +[AC_CACHE_CHECK(number of arguments to gethostbyname_r, + acx_which_gethostbyname_r, [ + AC_TRY_COMPILE([ +# include <netdb.h> + ], [ + + char *name; + struct hostent *he; + struct hostent_data data; + (void) gethostbyname_r(name, he, &data); + + ],acx_which_gethostbyname_r=3, + [ +dnl acx_which_gethostbyname_r=0 + AC_TRY_COMPILE([ +# include <netdb.h> + ], [ + char *name; + struct hostent *he, *res; + char *buffer = NULL; + int buflen = 2048; + int h_errnop; + (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) + ],acx_which_gethostbyname_r=6, + + [ +dnl acx_which_gethostbyname_r=0 + AC_TRY_COMPILE([ +# include <netdb.h> + ], [ + char *name; + struct hostent *he; + char *buffer = NULL; + int buflen = 2048; + int h_errnop; + (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) + ],acx_which_gethostbyname_r=5,acx_which_gethostbyname_r=0) + + ] + + ) + ] + ) + ]) + +if test $acx_which_gethostbyname_r -gt 0 ; then + AC_DEFINE_UNQUOTED([HAVE_GETHOSTBYNAME_R], $acx_which_gethostbyname_r, + [Number of parameters to gethostbyname_r or 0 if not available]) +fi + +]) + +dnl @synopsis ACX_HELP_STRING(OPTION,DESCRIPTION) +AC_DEFUN([ACX_HELP_STRING], + [ $1 builtin([substr],[ ],len($1))[$2]]) + + +dnl @synopsis ACX_FEATURE(ENABLE_OR_WITH,NAME[,VALUE]) +AC_DEFUN([ACX_FEATURE], + [echo "builtin([substr],[ ],len(--$1-$2))--$1-$2: ifelse($3,,[$]translit($1-$2,-,_),$3)"]) + |