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