More updates
This commit is contained in:
parent
86dc60b980
commit
58c1df4028
4 changed files with 134 additions and 0 deletions
15
m4/Makefile.am
Normal file
15
m4/Makefile.am
Normal file
|
@ -0,0 +1,15 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
# $Id: Makefile.am,v 1.3 2002/04/09 15:48:54 zarq Exp $
|
||||
|
||||
noinst_LIBRARIES = libvpn.a
|
||||
|
||||
INCLUDES = @INCLUDES@ -I. -I$(top_builddir) -I$(top_srcdir)/intl
|
||||
|
||||
libvpn_a_SOURCES = xmalloc.c pidfile.c utils.c getopt.c getopt1.c list.c avl_tree.c dropin.c
|
||||
|
||||
libvpn_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||
libvpn_a_DEPENDENCIES = $(libvpn_a_LIBADD)
|
||||
|
||||
noinst_HEADERS = xalloc.h pidfile.h utils.h getopt.h list.h avl_tree.h dropin.h
|
||||
|
||||
EXTRA_DIST = README
|
49
m4/openssl.m4
Normal file
49
m4/openssl.m4
Normal file
|
@ -0,0 +1,49 @@
|
|||
dnl Check to find the OpenSSL headers/libraries
|
||||
|
||||
AC_DEFUN(tinc_OPENSSL,
|
||||
[
|
||||
tinc_ac_save_CPPFLAGS="$CPPFLAGS"
|
||||
|
||||
AC_ARG_WITH(openssl-include,
|
||||
[ --with-openssl-include=DIR OpenSSL headers directory (without trailing /openssl)],
|
||||
[openssl_include="$withval"
|
||||
CFLAGS="$CFLAGS -I$withval"
|
||||
CPPFLAGS="$CPPFLAGS -I$withval"]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(openssl-lib,
|
||||
[ --with-openssl-lib=DIR OpenSSL library directory],
|
||||
[openssl_lib="$withval"
|
||||
LIBS="$LIBS -L$withval"]
|
||||
)
|
||||
|
||||
AC_CHECK_HEADERS(openssl/evp.h openssl/rsa.h openssl/rand.h openssl/err.h openssl/sha.h openssl/pem.h,
|
||||
[],
|
||||
[AC_MSG_ERROR("OpenSSL header files not found."); break]
|
||||
)
|
||||
|
||||
CPPFLAGS="$tinc_ac_save_CPPFLAGS"
|
||||
|
||||
AC_CHECK_LIB(crypto, SHA1_version,
|
||||
[LIBS="$LIBS -lcrypto"],
|
||||
[AC_MSG_ERROR("OpenSSL libraries not found.")]
|
||||
)
|
||||
|
||||
AC_CHECK_FUNCS(RAND_pseudo_bytes)
|
||||
|
||||
AC_CHECK_FUNC(OpenSSL_add_all_algorithms,
|
||||
[],
|
||||
AC_CHECK_FUNC(SSLeay_add_all_algorithms,
|
||||
[AC_DEFINE(HAVE_SSLEAY_ADD_ALL_ALGORITHMS)],
|
||||
[AC_MSG_ERROR("Missing required OpenSSL functionality!")]
|
||||
)
|
||||
)
|
||||
|
||||
AC_CHECK_FUNC(dlopen,
|
||||
[],
|
||||
AC_CHECK_LIB(dl, dlopen,
|
||||
[LIBS="$LIBS -ldl"],
|
||||
[AC_MSG_ERROR("OpenSSL depends on libdl.")]
|
||||
)
|
||||
)
|
||||
])
|
39
m4/tuntap.m4
Normal file
39
m4/tuntap.m4
Normal file
|
@ -0,0 +1,39 @@
|
|||
dnl Check to find out whether the running kernel has support for TUN/TAP
|
||||
|
||||
AC_DEFUN(tinc_TUNTAP,
|
||||
[
|
||||
AC_ARG_WITH(kernel,
|
||||
[ --with-kernel=dir give the directory with kernel sources]
|
||||
[ (default: /usr/src/linux)],
|
||||
kerneldir="$withval",
|
||||
kerneldir="/usr/src/linux"
|
||||
)
|
||||
|
||||
AC_CACHE_CHECK([for linux/if_tun.h], tinc_cv_linux_if_tun_h,
|
||||
[
|
||||
AC_TRY_COMPILE([#include "$kerneldir/include/linux/if_tun.h"],
|
||||
[int a = IFF_TAP;],
|
||||
if_tun_h="\"$kerneldir/include/linux/if_tun.h\"",
|
||||
[AC_TRY_COMPILE([#include <linux/if_tun.h>],
|
||||
[int a = IFF_TAP;],
|
||||
if_tun_h="default",
|
||||
if_tun_h="no"
|
||||
)]
|
||||
)
|
||||
|
||||
if test $if_tun_h = no; then
|
||||
tinc_cv_linux_if_tun_h=none
|
||||
else
|
||||
tinc_cv_linux_if_tun_h="$if_tun_h"
|
||||
fi
|
||||
])
|
||||
|
||||
if test $tinc_cv_linux_if_tun_h != none; then
|
||||
AC_DEFINE(HAVE_TUNTAP)
|
||||
if test $tinc_cv_linux_if_tun_h != default; then
|
||||
AC_DEFINE_UNQUOTED(LINUX_IF_TUN_H, $tinc_cv_linux_if_tun_h)
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(LINUX_IF_TUN_H)
|
||||
AC_SUBST(HAVE_TUNTAP)
|
||||
])
|
31
m4/zlib.m4
Normal file
31
m4/zlib.m4
Normal file
|
@ -0,0 +1,31 @@
|
|||
dnl Check to find the zlib headers/libraries
|
||||
|
||||
AC_DEFUN(tinc_ZLIB,
|
||||
[
|
||||
tinc_ac_save_CPPFLAGS="$CPPFLAGS"
|
||||
|
||||
AC_ARG_WITH(zlib-include,
|
||||
[ --with-zlib-include=DIR zlib headers directory],
|
||||
[zlib_include="$withval"
|
||||
CFLAGS="$CFLAGS -I$withval"
|
||||
CPPFLAGS="$CPPFLAGS -I$withval"]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(zlib-lib,
|
||||
[ --with-zlib-lib=DIR zlib library directory],
|
||||
[zlib_lib="$withval"
|
||||
LIBS="$LIBS -L$withval"]
|
||||
)
|
||||
|
||||
AC_CHECK_HEADERS(zlib.h,
|
||||
[],
|
||||
[AC_MSG_ERROR("zlib header files not found."); break]
|
||||
)
|
||||
|
||||
CPPFLAGS="$tinc_ac_save_CPPFLAGS"
|
||||
|
||||
AC_CHECK_LIB(z, compress2,
|
||||
[LIBS="$LIBS -lz"],
|
||||
[AC_MSG_ERROR("zlib libraries not found.")]
|
||||
)
|
||||
])
|
Loading…
Reference in a new issue