a23f1a0efc4ba32bc1b72afb66e826ba7cbd3b36
[tinc] / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2
3 dnl $Id: configure.in,v 1.13.2.4 2000/09/10 15:16:07 zarq Exp $
4
5 AC_INIT(src/tincd.c)
6 AM_INIT_AUTOMAKE(tinc, 1.0pre3)
7 AM_CONFIG_HEADER(config.h)
8
9 dnl Include the macros from the m4/ directory
10 AM_ACLOCAL_INCLUDE(m4)
11
12 # Enable GNU extensions.
13 # Define this here, not in acconfig's @TOP@ section, since definitions
14 # in the latter don't make it into the configure-time tests.
15 AC_DEFINE([_GNU_SOURCE], [__USE_BSD])
16
17 ALL_LINGUAS="es nl"
18
19 dnl Checks for programs.
20 AC_PROG_CC
21 AC_PROG_CPP
22 AC_PROG_GCC_TRADITIONAL
23 AC_PROG_AWK
24 AC_PROG_INSTALL
25 AC_PROG_LN_S
26 AC_PROG_MAKE_SET
27 jm_PERL
28 AM_PROG_LIBTOOL
29
30 AC_ISC_POSIX
31
32 dnl Checks for libraries.
33
34 dnl Checks for header files.
35 AC_HEADER_STDC
36 AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h syslog.h unistd.h gmp.h gmp2/gmp.h \
37 sys/time.h)
38
39 dnl Checks for typedefs, structures, and compiler characteristics.
40 AC_C_CONST
41 AC_TYPE_PID_T
42 AC_TYPE_SIZE_T
43 AC_HEADER_TIME
44 AC_STRUCT_TM
45
46 dnl Checks for library functions.
47 AC_FUNC_MEMCMP
48 AC_FUNC_ALLOCA
49 AC_TYPE_SIGNAL
50 AC_CHECK_FUNCS(ftime socket select strtol strerror)
51 jm_FUNC_MALLOC
52 jm_FUNC_REALLOC
53
54 AM_GNU_GETTEXT
55
56 # Check for the GNU Multi Precision Library
57 libgmp=none
58 AC_CHECK_LIB(gmp, mpz_powm, [
59   libgmp=gmp
60 ])
61 AC_CHECK_LIB(gmp2, mpz_powm, [
62   libgmp=gmp2
63 ])
64 AC_CHECK_LIB(gmp3, __gmpz_powm, [
65   libgmp=gmp3
66 ])
67 AC_CHECK_LIB(gmp, __gmpz_powm, [
68   libgmp=gmp
69 ])
70
71 if test $libgmp = none; then
72   AC_MSG_ERROR(libgmp is not installed. Please grab it from your
73   nearest GNU mirror and install it (see README))
74 else
75   LIBS="$LIBS -l$libgmp"
76 fi
77
78 AC_CHECK_LIB(dl, dlopen, [
79   LIBS="$LIBS -ldl"
80 ])
81
82
83 dnl Crypto stuff
84
85 libcrypto=none
86 AC_CHECK_LIB(crypto, SHA1_version, [
87   libcrypto=yes
88 ])
89
90 if test $libcrypto = none; then
91   AC_MSG_ERROR(It seems like OpenSSL is not installed on this system.)
92 else
93   LIBS="$LIBS -lcrypto"
94 fi
95
96
97 dnl Support for SunOS
98
99 AC_CHECK_LIB(socket, connect)
100 AC_CHECK_LIB(nsl, gethostbyname)
101
102 AC_OUTPUT([Makefile src/Makefile cipher/Makefile
103 doc/Makefile intl/Makefile lib/Makefile
104 m4/Makefile po/Makefile.in redhat/Makefile debian/Makefile])