Default passphrase length of 1024, added -h/--help options.
[tinc] / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(src/tincd.c)
3 AM_INIT_AUTOMAKE(tinc, 1.0)
4 AM_CONFIG_HEADER(config.h)
5
6 # Enable GNU extensions.
7 # Define this here, not in acconfig's @TOP@ section, since definitions
8 # in the latter don't make it into the configure-time tests.
9 AC_DEFINE([_GNU_SOURCE])
10 AC_DEFINE([__USE_BSD])
11
12 dnl Checks for programs.
13 AC_PROG_CC
14 AC_PROG_CPP
15 AC_PROG_GCC_TRADITIONAL
16 AC_PROG_AWK
17 AC_PROG_INSTALL
18 AC_PROG_LN_S
19 AC_PROG_RANLIB
20 AC_PROG_MAKE_SET
21 jm_PERL
22 AM_PROG_LIBTOOL
23
24 dnl Checks for libraries.
25
26 dnl Checks for header files.
27 AC_HEADER_STDC
28 AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h syslog.h unistd.h gmp.h gmp2/gmp.h \
29 sys/time.h)
30
31 dnl Checks for typedefs, structures, and compiler characteristics.
32 AC_C_CONST
33 AC_C_BIGENDIAN
34 AC_TYPE_PID_T
35 AC_TYPE_SIZE_T
36 AC_HEADER_TIME
37 AC_STRUCT_TM
38
39 dnl Checks for library functions.
40 AC_FUNC_MEMCMP
41 AC_FUNC_ALLOCA
42 AC_TYPE_SIGNAL
43 AC_CHECK_FUNCS(ftime socket select strtol strerror)
44 jm_FUNC_MALLOC
45 jm_FUNC_REALLOC
46
47 # Check for the GNU Multi Precision Library
48 libgmp=none
49 AC_CHECK_LIB(gmp2, mpz_powm, [
50   libgmp=gmp2
51 ])
52 AC_CHECK_LIB(gmp, mpz_powm, [
53   libgmp=gmp
54 ])
55
56 if test $libgmp = none; then
57   AC_MSG_ERROR(libgmp is not installed. Please grab it from your
58   nearest GNU mirror and install it (see README))
59 else
60   LIBS="$LIBS -l$libgmp"
61 fi
62
63 AC_OUTPUT([Makefile src/Makefile cipher/Makefile cipher/blowfish/Makefile
64 cipher/idea/Makefile doc/Makefile lib/Makefile m4/Makefile])