Include system.h and ABOUT-NLS.
[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.0pre2)
4 AM_CONFIG_HEADER(config.h)
5
6 dnl Include the macros from the m4/ directory
7 AM_ACLOCAL_INCLUDE(m4)
8
9 # Enable GNU extensions.
10 # Define this here, not in acconfig's @TOP@ section, since definitions
11 # in the latter don't make it into the configure-time tests.
12 AC_DEFINE([_GNU_SOURCE], [__USE_BSD])
13
14 ALL_LINGUAS="nl"
15
16 dnl Checks for programs.
17 AC_PROG_CC
18 AC_PROG_CPP
19 AC_PROG_GCC_TRADITIONAL
20 AC_PROG_AWK
21 AC_PROG_INSTALL
22 AC_PROG_LN_S
23 AC_PROG_MAKE_SET
24 jm_PERL
25 AM_PROG_LIBTOOL
26
27 AC_ISC_POSIX
28
29 dnl Checks for libraries.
30
31 dnl Checks for header files.
32 AC_HEADER_STDC
33 AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h syslog.h unistd.h gmp.h gmp2/gmp.h \
34 sys/time.h)
35
36 dnl Checks for typedefs, structures, and compiler characteristics.
37 AC_C_CONST
38 AC_TYPE_PID_T
39 AC_TYPE_SIZE_T
40 AC_HEADER_TIME
41 AC_STRUCT_TM
42
43 dnl Checks for library functions.
44 AC_FUNC_MEMCMP
45 AC_FUNC_ALLOCA
46 AC_TYPE_SIGNAL
47 AC_CHECK_FUNCS(ftime socket select strtol strerror)
48 jm_FUNC_MALLOC
49 jm_FUNC_REALLOC
50
51 # Check for the GNU Multi Precision Library
52 libgmp=none
53 AC_CHECK_LIB(gmp2, mpz_powm, [
54   libgmp=gmp2
55 ])
56 AC_CHECK_LIB(gmp3, mpz_powm, [
57   libgmp=gmp3
58 ])
59 AC_CHECK_LIB(gmp, mpz_powm, [
60   libgmp=gmp
61 ])
62
63 if test $libgmp = none; then
64   AC_MSG_ERROR(libgmp is not installed. Please grab it from your
65   nearest GNU mirror and install it (see README))
66 else
67   LIBS="$LIBS -l$libgmp"
68 fi
69
70 AC_CHECK_LIB(dl, dlopen, [
71   LIBS="$LIBS -ldl"
72 ])
73
74 AC_OUTPUT([Makefile src/Makefile cipher/Makefile
75 cipher/blowfish/Makefile doc/Makefile intl/Makefile lib/Makefile
76 m4/Makefile po/Makefile.in redhat/Makefile debian/Makefile])