Fix edge local addresses not being set when connections are established.
[tinc] / m4 / libgcrypt.m4
1 dnl Check to find the libgcrypt headers/libraries
2
3 AC_DEFUN([tinc_LIBGCRYPT],
4 [
5   AC_ARG_WITH(libgcrypt,
6     AS_HELP_STRING([--with-libgcrypt=DIR], [libgcrypt base directory, or:]),
7     [libgcrypt="$withval"
8      CPPFLAGS="$CPPFLAGS -I$withval/include"
9      LDFLAGS="$LDFLAGS -L$withval/lib"]
10   )
11
12   AC_ARG_WITH(libgcrypt-include,
13     AS_HELP_STRING([--with-libgcrypt-include=DIR], [libgcrypt headers directory (without trailing /libgcrypt)]),
14     [libgcrypt_include="$withval"
15      CPPFLAGS="$CPPFLAGS -I$withval"]
16   )
17
18   AC_ARG_WITH(libgcrypt-lib,
19     AS_HELP_STRING([--with-libgcrypt-lib=DIR], [libgcrypt library directory]),
20     [libgcrypt_lib="$withval"
21      LDFLAGS="$LDFLAGS -L$withval"]
22   )
23
24   AC_CHECK_HEADERS([gcrypt.h],
25     [],
26     [AC_MSG_ERROR([libgcrypt header files not found.]); break]
27   )
28
29   AC_CHECK_LIB(gcrypt, gcry_cipher_encrypt,
30     [LIBS="-lgcrypt $LIBS"],
31     [AC_MSG_ERROR([libgcrypt libraries not found.])]
32   )
33 ])