home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.shrubbery.net
/
2015-02-07.ftp.shrubbery.net.tar
/
ftp.shrubbery.net
/
pub
/
astraceroute
/
astraceroute-1.4.a12.2.tar.gz
/
astraceroute-1.4.a12.2.tar
/
astraceroute-1.4.a12.2
/
configure.in
< prev
next >
Wrap
Text File
|
2008-11-17
|
3KB
|
157 lines
dnl @(#) $Id: configure.in,v 1.4 2008/11/17 10:00:11 heas Exp $ (LBL)
dnl
dnl Copyright (c) 1995, 1996, 1997, 1999, 2000
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_PREREQ(2.13)
AC_INIT(traceroute.c)
AM_INIT_AUTOMAKE(astraceroute, `cat VERSION`)
VERSION=`cat VERSION`
AC_SUBST(VERSION)
AC_PROG_MAKE_SET()
umask 002
if test -z "$PWD" ; then
PWD=`pwd`
fi
AC_LBL_C_INIT([V_CCOPT], [V_INCLS])
# compiler specifics
AC_PROG_CC
AM_C_PROTOTYPES
AC_PROG_CPP
AC_C_CONST
AC_C_INLINE
AC_C_STRINGIZE
AC_CHECK_HEADERS(malloc.h sys/select.h sys/sockio.h net/route.h \
net/if_dl.h inet/mib2.h)
AC_REPLACE_FUNCS(strerror usleep)
AC_CHECK_FUNCS(setlinebuf)
if test $ac_cv_func_usleep = "no" ; then
AC_CHECK_FUNCS(nanosleep)
fi
AC_LBL_LIBRARY_NET
AC_CANONICAL_HOST
case "$host_os" in
bsd4*)
AC_DEFINE(HAVE_RAW_OPTIONS)
;;
bsdi*)
AC_DEFINE(HAVE_RAW_OPTIONS)
;;
freebsd*)
AC_DEFINE(HAVE_RAW_OPTIONS)
;;
linux*)
V_INCLS="$V_INCLS -Ilinux-include"
AC_DEFINE(BYTESWAP_IP_HDR)
;;
osf3*)
dnl Workaround around ip_hl vs. ip_vhl problem in netinet/ip.h
AC_DEFINE(__STDC__,2)
;;
solaris2.[[012345]]*)
AC_DEFINE(BYTESWAP_IP_HDR)
AC_DEFINE(CANT_HACK_IPCKSUM)
;;
solaris*)
AC_DEFINE(BYTESWAP_IP_HDR)
;;
esac
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"
else
t="generic"
fi
AM_CONDITIONAL(FAMIB, [test $t = "mib"])
AM_CONDITIONAL(FASOCKET, [test $t = "socket"])
AM_CONDITIONAL(FALINUX, [test $t = "linux"])
AM_CONDITIONAL(FAGENERIC, [test $t = "generic"])
AC_MSG_RESULT(${t})
AC_SEARCH_LIBS([res_query], [resolv], [], [
AC_ERROR([Could not find res_query()])])
AC_LBL_CHECK_TYPE(int32_t, int)
AC_LBL_CHECK_TYPE(u_int32_t, u_int)
AC_LBL_DEVEL(V_CCOPT)
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
rm -f gnuc.h
ln -s ${srcdirprefix}lbl/gnuc.h gnuc.h
fi
AC_SUBST(V_CCOPT)
AC_SUBST(V_INCLS)
AC_PROG_INSTALL
AC_OUTPUT(Makefile version.h)
if test -f .devel ; then
make depend
fi
exit 0