1 dnl @(#) $Id: configure.in,v 1.33 2000/12/18 09:38:26 leres Exp $ (LBL)
3 dnl Copyright (c) 1995, 1996, 1997, 1999, 2000
4 dnl The Regents of the University of California. All rights reserved.
6 dnl Process this file with autoconf to produce a configure script.
15 if test -z "$PWD" ; then
19 AC_LBL_C_INIT(V_CCOPT, V_INCLS)
21 AC_CHECK_HEADERS(malloc.h sys/select.h sys/sockio.h net/route.h \
22 net/if_dl.h inet/mib2.h)
24 AC_REPLACE_FUNCS(strerror usleep)
25 AC_CHECK_FUNCS(setlinebuf)
26 if test $ac_cv_func_usleep = "no" ; then
27 AC_CHECK_FUNCS(nanosleep)
35 AC_DEFINE(HAVE_RAW_OPTIONS)
39 AC_DEFINE(HAVE_RAW_OPTIONS)
43 AC_DEFINE(HAVE_RAW_OPTIONS)
47 V_INCLS="$V_INCLS -Ilinux-include"
48 AC_DEFINE(BYTESWAP_IP_HDR)
52 dnl Workaround around ip_hl vs. ip_vhl problem in netinet/ip.h
57 AC_DEFINE(BYTESWAP_IP_HDR)
58 AC_DEFINE(CANT_HACK_IPCKSUM)
62 AC_DEFINE(BYTESWAP_IP_HDR)
67 dnl What kind of routing table lookup do we have?
69 AC_MSG_CHECKING(routing table type)
71 if test $ac_cv_header_inet_mib2_h = yes ; then
73 elif test $ac_cv_header_net_route_h = yes -a \
74 $ac_cv_header_net_if_dl_h = yes ; then
76 elif test -f /proc/net/route ; then
81 V_FINDSADDR="findsaddr-${t}.c"
84 AC_LBL_CHECK_TYPE(int32_t, int)
85 AC_LBL_CHECK_TYPE(u_int32_t, u_int)
89 AC_LBL_SOCKADDR_SA_LEN
91 AC_MSG_CHECKING(if struct icmp has icmp_nextmtu)
92 AC_CACHE_VAL(ac_cv_struct_icmp_has_icmp_nextmtu,
93 LBL_SAVE_CFLAGS="$CFLAGS"
94 CFLAGS="$CFLAGS $V_INCLS"
96 # include <sys/param.h>
97 # include <sys/socket.h>
98 # include <netinet/in_systm.h>
100 /* osf3 has REALLY good prototyes */
104 # include <netinet/in.h>
105 # include <netinet/ip.h>
106 # include <netinet/ip_icmp.h>
107 # include <netinet/if_ether.h>],
108 [u_int i = sizeof(((struct icmp *)0)->icmp_nextmtu)],
109 ac_cv_struct_icmp_has_icmp_nextmtu=yes,
110 ac_cv_struct_icmp_has_icmp_nextmtu=no)
111 CFLAGS="$LBL_SAVE_CFLAGS")
112 AC_MSG_RESULT($ac_cv_struct_icmp_has_icmp_nextmtu)
113 if test $ac_cv_struct_icmp_has_icmp_nextmtu = yes ; then
114 AC_DEFINE(HAVE_ICMP_NEXTMTU)
117 if test "${srcdir}" = "." ; then
123 if test -r ${srcdirprefix}lbl/gnuc.h ; then
125 ln -s ${srcdirprefix}lbl/gnuc.h gnuc.h
130 AC_SUBST(V_FINDSADDR)
136 if test -f .devel ; then