chiark / gitweb /
Import release 0.1.13
[secnet.git] / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2
3 AC_INIT(secnet.c)
4 AC_CONFIG_HEADER(config.h)
5
6 AC_REVISION($Id: configure.in,v 1.2 2001/12/06 17:36:27 steve Exp $)
7
8 AC_LANG_C
9
10 AC_PROG_MAKE_SET
11 AC_PROG_CC
12 AC_PROG_INSTALL
13 AC_PATH_PROG(RM,rm)
14 AC_STDC_HEADERS
15 AC_CHECK_HEADERS(stdint.h inttypes.h)
16 AC_CHECK_HEADERS(net/if.h net/route.h)
17 AC_CHECK_HEADERS(linux/if.h)
18 AC_CHECK_HEADERS(stropts.h sys/sockio.h net/if_tun.h)
19 AC_C_BIGENDIAN
20 AC_CHECK_SIZEOF(unsigned long long)
21 AC_CHECK_SIZEOF(unsigned long)
22 AC_CHECK_SIZEOF(unsigned int)
23 AC_CHECK_SIZEOF(unsigned short)
24 AC_CHECK_SIZEOF(unsigned char)
25
26 dnl the order in which libraries is checked is important
27 dnl eg. adns on Solaris 2.5.1 depends on -lnsl and -lsocket
28 AC_CHECK_LIB(gmp,mpz_init_set_str)
29 AC_CHECK_LIB(gmp2,mpz_init_set_str)
30 AC_CHECK_LIB(gmp,__gmpz_init_set_str)
31 AC_CHECK_LIB(fl,yywrap)
32 AC_CHECK_LIB(nsl,inet_ntoa)
33 AC_CHECK_LIB(getopt,getopt_long)
34 AC_CHECK_LIB(gnugetopt,getopt_long)
35 AC_CHECK_LIB(socket,socket)
36 AC_CHECK_LIB(resolv,inet_aton)
37 AC_CHECK_LIB(adns,adns_init)
38
39 dnl check for getopt in standard library
40 AC_SUBST(LIBOBJS)
41 AC_CHECK_FUNCS(getopt_long , , [LIBOBJS="$LIBOBJS getopt.o getopt1.o"] ) 
42 dnl check for alloca
43 AC_CHECK_FUNCS(snprintf , , [LIBOBJS="$LIBOBJS snprintf.o"] )
44 AC_FUNC_ALLOCA()
45
46 AC_OUTPUT(Makefile,echo timestamp >stamp-h)