1 dnl Process this file with autoconf to produce a configure script.
3 AM_INIT_AUTOMAKE(tinc, 1.0)
4 AM_CONFIG_HEADER(config.h)
6 dnl Include the macros from the m4/ directory
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])
13 AC_DEFINE([__USE_BSD])
15 dnl Checks for programs.
18 AC_PROG_GCC_TRADITIONAL
26 dnl Checks for libraries.
28 dnl Checks for header files.
30 AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h syslog.h unistd.h gmp.h gmp2/gmp.h \
33 dnl Checks for typedefs, structures, and compiler characteristics.
40 dnl Checks for library functions.
44 AC_CHECK_FUNCS(ftime socket select strtol strerror)
48 # Check for the GNU Multi Precision Library
50 AC_CHECK_LIB(gmp2, mpz_powm, [
53 AC_CHECK_LIB(gmp, mpz_powm, [
57 if test $libgmp = none; then
58 AC_MSG_ERROR(libgmp is not installed. Please grab it from your
59 nearest GNU mirror and install it (see README))
61 LIBS="$LIBS -l$libgmp"
64 AC_OUTPUT([Makefile src/Makefile cipher/Makefile cipher/blowfish/Makefile
65 doc/Makefile lib/Makefile m4/Makefile redhat/Makefile])