1# 2# Include the TEA standard macro set 3# 4 5builtin(include,tclconfig/tcl.m4) 6 7# 8# Add here whatever m4 macros you want to define for your package 9# 10 11#-------------------------------------------------------------------- 12# TEA_ENABLE_INET6 13# 14# Check for Internet Protocol v6 support. 15# 16# Adds a --enable-ipv6 option to the configure program and 17# may define a new macro USE_INET6 18# 19#-------------------------------------------------------------------- 20 21AC_DEFUN(TEA_ENABLE_INET6, [ 22 AC_MSG_CHECKING([for INET6 support]) 23 AC_ARG_ENABLE(inet6, [ --enable-ipv6 build with ipv6], 24 [inet6_ok=$enableval], [inet6_ok=no]) 25 AC_DEFINE(USE_INET6) 26 if test "$inet6_ok" = "yes" 27 then 28 AC_MSG_RESULT([yes]) 29 USE_INET6=1 30 31 AC_CHECK_LIB(c,getaddrinfo,[inet6_ok=yes],[inet6_ok=no]) 32 if test "$inet6_ok" = "yes" 33 then 34 #CFLAGS="$CFLAGS -DUSE_INET6" 35 TEA_ADD_CFLAGS([-DUSE_INET6]) 36 else 37 USE_INET6=no 38 AC_MSG_ERROR([Cannot find getaddrinfo() - inet6 support disabled]) 39 fi 40 41 else 42 USE_INET6=0 43 AC_MSG_RESULT([no (default)]) 44 fi 45 46 AC_SUBST(USE_INET6) 47]) 48 49#------------------------------------------------------------------------- 50# TEA_PROG_DTPLITE 51# 52# Do we have a usable dtplite program to use in document generation? 53# 54# Results 55# Sets up DTPLITE 56# 57#------------------------------------------------------------------------- 58 59AC_DEFUN(TEA_PROG_DTPLITE, [ 60 AC_PATH_TOOL([DTPLITE], [dtplite], [:]) 61]) 62 63#------------------------------------------------------------------------- 64# TCLUDP_CHECK_CLOEXEC 65# 66# Do we have the FD_CLOEXEC flag available for fcntl() 67# 68# Results 69# Sets up HAVE_FCNTL_H and HAVE_FLAG_FD_CLOEXEC 70# 71#------------------------------------------------------------------------- 72 73AC_DEFUN(TCLUDP_CHECK_CLOEXEC, [ 74 AC_CHECK_HEADERS(fcntl.h) 75 AC_CACHE_CHECK([for usable FD_CLOEXEC flag],tcludp_cloexec, 76 AC_TRY_COMPILE([ 77#if HAVE_UNISTD_H 78#include <unistd.h> 79#endif 80#if HAVE_FCNTL_H 81#include <fcntl.h> 82#endif 83],[fcntl(1, F_SETFD, FD_CLOEXEC);],tcludp_cloexec=yes,tcludp_cloexec=no)) 84 if test "$tcludp_cloexec" = "yes" ; then 85 AC_DEFINE(HAVE_FLAG_FD_CLOEXEC, 1, [Can we use FD_CLOEXEC with fcntl?]) 86 fi 87]) 88 89#------------------------------------------------------------------------- 90# TCLUDP_CHECK_STRERROR 91# 92# Do we have strerror() 93# 94# Results 95# Sets HAVE_STRERROR 96# 97#------------------------------------------------------------------------- 98 99AC_DEFUN(TCLUDP_CHECK_STRERROR, [ 100 AC_CHECK_LIB(c,strerror,[tcludp_strerror_ok=yes],[tcludp_strerror_ok=no]) 101 if test "$tcludp_strerror_ok" = "yes"; then 102 TEA_ADD_CFLAGS([-DHAVE_STRERROR]) 103 fi 104]) 105 106#------------------------------------------------------------------------- 107# TCLUDP_CONFIG 108# 109# Do any TCLUDP specific configuration here. 110# 111# Results 112# See the individual sections referenced. 113# 114#------------------------------------------------------------------------- 115 116AC_DEFUN(TCLUDP_CONFIG, [ 117 TCLUDP_CHECK_CLOEXEC 118 TCLUDP_CHECK_STRERROR 119]) 120