1dnl -------------------------------------------------------- -*- autoconf -*- 2dnl Licensed to the Apache Software Foundation (ASF) under one or more 3dnl contributor license agreements. See the NOTICE file distributed with 4dnl this work for additional information regarding copyright ownership. 5dnl The ASF licenses this file to You under the Apache License, Version 2.0 6dnl (the "License"); you may not use this file except in compliance with 7dnl the License. You may obtain a copy of the License at 8dnl 9dnl http://www.apache.org/licenses/LICENSE-2.0 10dnl 11dnl Unless required by applicable law or agreed to in writing, software 12dnl distributed under the License is distributed on an "AS IS" BASIS, 13dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14dnl See the License for the specific language governing permissions and 15dnl limitations under the License. 16 17dnl ----------------------------------------------------------------- 18dnl network.m4: Trafficserver's autoconf macros for testing network support 19dnl 20 21dnl 22dnl TS_CHECK_LOOPBACK_IFACE: try to figure out default loopback interface 23dnl 24AC_DEFUN([TS_CHECK_LOOPBACK_IFACE], [ 25default_loopback_iface="" 26AC_MSG_CHECKING([for loopback network interface]) 27case $host_os in 28 linux*) 29 default_loopback_iface=lo 30 ;; 31darwin* | freebsd* | solaris*) 32 default_loopback_iface=lo0 33 ;; 34esac 35AC_MSG_RESULT([$default_loopback_iface]) 36AC_SUBST([default_loopback_iface]) 37]) 38 39dnl 40dnl Check on IN6_IS_ADDR_UNSPECIFIED. We can't just check if it is defined 41dnl because some releases of FreeBSD and Solaris define it incorrectly. 42dnl 43AC_DEFUN([TS_CHECK_MACRO_IN6_IS_ADDR_UNSPECIFIED], [ 44AC_CACHE_CHECK([IN6_IS_ADDR_UNSPECIFIED macro works], ac_cv_macro_in6_is_addr_unspecified, 45TS_TRY_COMPILE_NO_WARNING([ 46#include <netinet/in.h> 47],[ 48 (void) IN6_IS_ADDR_UNSPECIFIED(0); 49], ac_cv_macro_in6_is_addr_unspecified=yes, ac_cv_macro_in6_is_addr_unspecified=no)) 50 51has_in6_is_addr_unspecified=1 52if test "x$ac_cv_macro_in6_is_addr_unspecified" = "xno"; then 53 has_in6_is_addr_unspecified=0 54fi 55AC_SUBST(has_in6_is_addr_unspecified) 56]) 57