chiark / gitweb /
Import release 0.1.10
[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$)
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(linux/if.h)
17 AC_C_BIGENDIAN
18 AC_CHECK_SIZEOF(unsigned long long)
19 AC_CHECK_SIZEOF(unsigned long)
20 AC_CHECK_SIZEOF(unsigned int)
21 AC_CHECK_SIZEOF(unsigned short)
22 AC_CHECK_SIZEOF(unsigned char)
23
24 dnl the order in which libraries is checked is important
25 dnl eg. adns on Solaris 2.5.1 depends on -lnsl and -lsocket
26 AC_CHECK_LIB(gmp,mpz_init_set_str)
27 AC_CHECK_LIB(gmp2,mpz_init_set_str)
28 AC_CHECK_LIB(gmp,__gmpz_init_set_str)
29 AC_CHECK_LIB(fl,yywrap)
30 AC_CHECK_LIB(nsl,inet_ntoa)
31 AC_CHECK_LIB(getopt,getopt_long)
32 AC_CHECK_LIB(gnugetopt,getopt_long)
33 AC_CHECK_LIB(socket,socket)
34 AC_CHECK_LIB(resolv,inet_aton)
35 AC_CHECK_LIB(adns,adns_init)
36
37 dnl check for getopt in standard library
38 AC_SUBST(LIBOBJS)
39 AC_CHECK_FUNCS(getopt_long , , [LIBOBJS="$LIBOBJS getopt.o getopt1.o"] ) 
40 dnl check for alloca
41 AC_CHECK_FUNCS(snprintf , , [LIBOBJS="$LIBOBJS snprintf.o"] )
42 AC_FUNC_ALLOCA()
43
44 AC_OUTPUT(Makefile,echo timestamp >stamp-h)