2002-07-28 02:24:33 +00:00
|
|
|
dnl @(#) $Id: configure.in,v 1.33 2000/12/18 09:38:26 leres Exp $ (LBL)
|
1996-09-30 19:09:55 +00:00
|
|
|
dnl
|
2002-07-28 02:24:33 +00:00
|
|
|
dnl Copyright (c) 1995, 1996, 1997, 1999, 2000
|
1996-09-30 19:09:55 +00:00
|
|
|
dnl The Regents of the University of California. All rights reserved.
|
|
|
|
dnl
|
|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
dnl
|
|
|
|
|
|
|
|
AC_INIT(traceroute.c)
|
|
|
|
|
|
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
|
|
|
|
umask 002
|
|
|
|
|
|
|
|
if test -z "$PWD" ; then
|
|
|
|
PWD=`pwd`
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_LBL_C_INIT(V_CCOPT, V_INCLS)
|
|
|
|
|
2002-07-28 02:24:33 +00:00
|
|
|
AC_CHECK_HEADERS(malloc.h sys/select.h sys/sockio.h net/route.h \
|
|
|
|
net/if_dl.h inet/mib2.h)
|
1996-09-30 19:09:55 +00:00
|
|
|
|
2002-07-28 02:24:33 +00:00
|
|
|
AC_REPLACE_FUNCS(strerror usleep)
|
1996-09-30 19:09:55 +00:00
|
|
|
AC_CHECK_FUNCS(setlinebuf)
|
2002-07-28 02:24:33 +00:00
|
|
|
if test $ac_cv_func_usleep = "no" ; then
|
|
|
|
AC_CHECK_FUNCS(nanosleep)
|
|
|
|
fi
|
1996-09-30 19:09:55 +00:00
|
|
|
|
2002-07-28 02:24:33 +00:00
|
|
|
AC_LBL_LIBRARY_NET
|
1996-09-30 19:09:55 +00:00
|
|
|
|
|
|
|
case "$target_os" in
|
|
|
|
|
|
|
|
bsd4*)
|
|
|
|
AC_DEFINE(HAVE_RAW_OPTIONS)
|
|
|
|
;;
|
|
|
|
|
|
|
|
bsdi*)
|
|
|
|
AC_DEFINE(HAVE_RAW_OPTIONS)
|
|
|
|
;;
|
|
|
|
|
|
|
|
freebsd*)
|
|
|
|
AC_DEFINE(HAVE_RAW_OPTIONS)
|
|
|
|
;;
|
|
|
|
|
2002-07-28 02:24:33 +00:00
|
|
|
linux*)
|
|
|
|
V_INCLS="$V_INCLS -Ilinux-include"
|
|
|
|
AC_DEFINE(BYTESWAP_IP_HDR)
|
|
|
|
;;
|
|
|
|
|
1996-09-30 19:09:55 +00:00
|
|
|
osf3*)
|
|
|
|
dnl Workaround around ip_hl vs. ip_vhl problem in netinet/ip.h
|
|
|
|
AC_DEFINE(__STDC__,2)
|
|
|
|
;;
|
|
|
|
|
2002-07-28 02:24:33 +00:00
|
|
|
solaris2.[[012345]]*)
|
|
|
|
AC_DEFINE(BYTESWAP_IP_HDR)
|
|
|
|
AC_DEFINE(CANT_HACK_IPCKSUM)
|
|
|
|
;;
|
|
|
|
|
1996-09-30 19:09:55 +00:00
|
|
|
solaris*)
|
2002-07-28 02:24:33 +00:00
|
|
|
AC_DEFINE(BYTESWAP_IP_HDR)
|
1996-09-30 19:09:55 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2002-07-28 02:24:33 +00:00
|
|
|
dnl
|
|
|
|
dnl What kind of routing table lookup do we have?
|
|
|
|
dnl
|
|
|
|
AC_MSG_CHECKING(routing table type)
|
|
|
|
t="generic"
|
|
|
|
if test $ac_cv_header_inet_mib2_h = yes ; then
|
|
|
|
t="mib"
|
|
|
|
elif test $ac_cv_header_net_route_h = yes -a \
|
|
|
|
$ac_cv_header_net_if_dl_h = yes ; then
|
|
|
|
t="socket"
|
|
|
|
elif test -f /proc/net/route ; then
|
|
|
|
t="linux"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_RESULT(${t})
|
|
|
|
V_FINDSADDR="findsaddr-${t}.c"
|
|
|
|
|
|
|
|
|
|
|
|
AC_LBL_CHECK_TYPE(int32_t, int)
|
|
|
|
AC_LBL_CHECK_TYPE(u_int32_t, u_int)
|
1996-09-30 19:09:55 +00:00
|
|
|
|
|
|
|
AC_LBL_DEVEL(V_CCOPT)
|
|
|
|
|
2002-07-28 02:24:33 +00:00
|
|
|
AC_LBL_SOCKADDR_SA_LEN
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(if struct icmp has icmp_nextmtu)
|
|
|
|
AC_CACHE_VAL(ac_cv_struct_icmp_has_icmp_nextmtu,
|
|
|
|
LBL_SAVE_CFLAGS="$CFLAGS"
|
|
|
|
CFLAGS="$CFLAGS $V_INCLS"
|
|
|
|
AC_TRY_COMPILE([
|
|
|
|
# include <sys/param.h>
|
|
|
|
# include <sys/socket.h>
|
|
|
|
# include <netinet/in_systm.h>
|
|
|
|
# if __STDC__
|
|
|
|
/* osf3 has REALLY good prototyes */
|
|
|
|
struct mbuf;
|
|
|
|
struct rtentry;
|
|
|
|
# endif
|
|
|
|
# include <netinet/in.h>
|
|
|
|
# include <netinet/ip.h>
|
|
|
|
# include <netinet/ip_icmp.h>
|
|
|
|
# include <netinet/if_ether.h>],
|
|
|
|
[u_int i = sizeof(((struct icmp *)0)->icmp_nextmtu)],
|
|
|
|
ac_cv_struct_icmp_has_icmp_nextmtu=yes,
|
|
|
|
ac_cv_struct_icmp_has_icmp_nextmtu=no)
|
|
|
|
CFLAGS="$LBL_SAVE_CFLAGS")
|
|
|
|
AC_MSG_RESULT($ac_cv_struct_icmp_has_icmp_nextmtu)
|
|
|
|
if test $ac_cv_struct_icmp_has_icmp_nextmtu = yes ; then
|
|
|
|
AC_DEFINE(HAVE_ICMP_NEXTMTU)
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "${srcdir}" = "." ; then
|
|
|
|
srcdirprefix=""
|
|
|
|
else
|
|
|
|
srcdirprefix="./"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -r ${srcdirprefix}lbl/gnuc.h ; then
|
1996-09-30 19:09:55 +00:00
|
|
|
rm -f gnuc.h
|
2002-07-28 02:24:33 +00:00
|
|
|
ln -s ${srcdirprefix}lbl/gnuc.h gnuc.h
|
1996-09-30 19:09:55 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(V_CCOPT)
|
|
|
|
AC_SUBST(V_INCLS)
|
2002-07-28 02:24:33 +00:00
|
|
|
AC_SUBST(V_FINDSADDR)
|
1996-09-30 19:09:55 +00:00
|
|
|
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
|
|
|
|
AC_OUTPUT(Makefile)
|
|
|
|
|
|
|
|
if test -f .devel ; then
|
|
|
|
make depend
|
|
|
|
fi
|
|
|
|
|
|
|
|
exit 0
|