X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=secnet.git;a=blobdiff_plain;f=configure.in;h=0c0c545aded3b2d86cf46e047cfc5f0de95057b8;hp=29ced956f70575a1583b3f283d3cda80325d6f16;hb=83dbdd3f25ac7edca6365ca7a299e4b8eee6b83e;hpb=00152558bd7f5c51096fd2fa83e8609aa02aa29c diff --git a/configure.in b/configure.in index 29ced95..0c0c545 100644 --- a/configure.in +++ b/configure.in @@ -11,6 +11,14 @@ AC_REVISION($Id: configure.in,v 1.4 2002/09/09 22:05:02 steve Exp $) AC_LANG_C +# If fink is on the path then it is assumed we should use it. +AC_PATH_PROG([FINK],[fink]) +if test "x$FINK" != x; then + finkdir=`echo $FINK|sed 's,/[[^/]]*/[[^/]]*$,,'` + CPPFLAGS="-I$finkdir/include ${CPPFLAGS}" + LDFLAGS="-L$finkdir/lib ${LDFLAGS}" +fi + AC_PROG_MAKE_SET AC_PROG_CC AC_PROG_INSTALL @@ -62,8 +70,18 @@ AC_CHECK_LIB(resolv,inet_aton) AC_CHECK_LIB(adns,adns_init) REQUIRE_HEADER([adns.h]) -dnl check for getopt in standard library -AC_REPLACE_FUNCS([snprintf]) +AC_MSG_NOTICE([Checking requirements for IPv6 support...]) +enable_ipv6=true +m4_define(NO_IPV6,[enable_ipv6=false]) +AC_CHECK_DECL(AF_INET6, [],[NO_IPV6],[#include ]) +AC_CHECK_FUNC(adns_addr2text, [],[NO_IPV6]) +if $enable_ipv6; then + AC_MSG_NOTICE([Enabling IPv6 support]) + AC_DEFINE(CONFIG_IPV6, 1, + [Define to 1 to use IPv6 support in system and adns]) +else + AC_MSG_WARN([Disabling IPv6 support]) +fi AC_OUTPUT(Makefile,echo timestamp >stamp-h) @@ -124,12 +142,6 @@ typedef unsigned char uint8_t; #endif #endif -#ifndef HAVE_SNPRINTF -#include -#include -#include "snprintf.h" -#endif - #ifdef __GNUC__ #define NORETURN(_x) void _x __attribute__ ((noreturn)) #define FORMAT(_a,_b,_c) __attribute__ ((format (_a,_b,_c)))