1 dnl Process this file with autoconf to produce a configure script.
3 dnl $Id: configure.in,v 1.16 2000/10/19 20:39:04 zarq Exp $
6 AM_INIT_AUTOMAKE(tinc, 1.0pre3)
7 AM_CONFIG_HEADER(config.h)
9 dnl Include the macros from the m4/ directory
10 AM_ACLOCAL_INCLUDE(m4)
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])
19 dnl Checks for programs.
22 AC_PROG_GCC_TRADITIONAL
32 dnl Checks for libraries.
34 dnl Checks for header files.
36 AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h syslog.h unistd.h sys/time.h linux/if_tun.h)
38 dnl Checks for typedefs, structures, and compiler characteristics.
45 dnl Checks for library functions.
49 AC_CHECK_FUNCS(ftime socket select strtol strerror)
57 AC_CHECK_FUNC(socket, [], [
58 AC_CHECK_LIB(socket, connect)
60 AC_CHECK_FUNC(gethostbyname, [], [
61 AC_CHECK_LIB(nsl, gethostbyname)
65 dnl From the autoconf manual
66 AC_CHECK_FUNCS(syslog)
67 if test $ac_cv_func_syslog = no; then
68 # syslog is not in the default libraries. See if it's in some other.
69 for lib in bsd socket inet; do
70 AC_CHECK_LIB($lib, syslog, [AC_DEFINE(HAVE_SYSLOG)
71 LIBS="$LIBS $lib"; break])
75 AC_CHECK_LIB(dl, dlopen, [
83 AC_CHECK_LIB(crypto, SHA1_version, [
87 if test $libcrypto = none; then
88 AC_MSG_ERROR(It seems like OpenSSL is not installed on this system.)
94 dnl Check for TUN/TAP support in the kernel
97 AC_OUTPUT([Makefile src/Makefile
98 doc/Makefile doc/es/Makefile intl/Makefile lib/Makefile
99 m4/Makefile po/Makefile.in redhat/Makefile debian/Makefile])