1 dnl Check to find the libgcrypt headers/libraries
3 AC_DEFUN([tinc_LIBGCRYPT],
6 AS_HELP_STRING([--with-libgcrypt=DIR], [libgcrypt base directory, or:]),
8 CPPFLAGS="$CPPFLAGS -I$withval/include"
9 LDFLAGS="$LDFLAGS -L$withval/lib"]
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"]
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"]
24 AC_CHECK_HEADERS([gcrypt.h],
26 [AC_MSG_ERROR([libgcrypt header files not found.]); break]
29 AC_CHECK_LIB(gcrypt, gcry_cipher_encrypt,
30 [LIBS="-lgcrypt $LIBS"],
31 [AC_MSG_ERROR([libgcrypt libraries not found.])]