From: srittau Date: Sun, 8 Jun 2003 16:04:49 +0000 (+0000) Subject: Added check for libgcrypt (as an alternative to OpenSSL). X-Git-Tag: HEAD-before-afp3-merge~58 X-Git-Url: https://arthur.barton.de/gitweb/?a=commitdiff_plain;h=c2e550bfac1057f6df812dcaaa29a618ca9b1879;p=netatalk.git Added check for libgcrypt (as an alternative to OpenSSL). --- diff --git a/configure.in b/configure.in index a9edbe34..0a9a7bdb 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.186 2003-06-08 15:21:40 srittau Exp $ +dnl $Id: configure.in,v 1.187 2003-06-08 16:04:49 srittau Exp $ dnl configure.in for netatalk AC_INIT(etc/afpd/main.c) @@ -611,7 +611,8 @@ if test x"$this_os" = "xtru64"; then sysv_style=tru64 fi -dnl -- look for openssl +dnl -- look for OpenSSL and other crypt libraries +AC_PATH_GCRYPT AC_PATH_SSL dnl --------------------- check for building PGP UAM module diff --git a/macros/ssl-check.m4 b/macros/ssl-check.m4 index 8a9ef9b3..9fa7b372 100644 --- a/macros/ssl-check.m4 +++ b/macros/ssl-check.m4 @@ -1,6 +1,41 @@ -dnl $Id: ssl-check.m4,v 1.8 2003-01-29 00:16:31 srittau Exp $ +dnl $Id: ssl-check.m4,v 1.9 2003-06-08 16:04:49 srittau Exp $ dnl Autoconf macro to check for SSL or OpenSSL +AC_DEFUN([AC_PATH_GCRYPT], [ + + GCRYPT_CFLAGS="" + GCRYPT_LIBS="" + + search="yes" + errifnotfound="no" + + AC_ARG_ENABLE(libgcrypt, [ --disable-gcrypt disable compilation with libgcrypt], [ + if test "x$enableval" != "xdisable"; then + errifnotfound="yes" + else + search="no" + fi + ]) + + GCRYPT_CONFIG="" + if test "x$search" == "xyes"; then + AC_PATH_PROG([GCRYPT_CONFIG], [libgcrypt-config], [no]) + + if test "x$GCRYPT_CONFIG" == "xno"; then + if test "x$errifnotfound" == "xyes"; then + AC_MSG_ERROR([libgcrypt-config not found]) + fi + else + GCRYPT_CFLAGS="`$GCRYPT_CONFIG --cflags`" + GCRYPT_LIBS="`$GCRYPT_CONFIG --libs`" + fi + fi + + AC_SUBST(GCRYPT_CFLAGS) + AC_SUBST(GCRYPT_LIBS) + AM_CONDITIONAL(HAVE_GCRYPT, test -n "$GCRYPT_CONFIG") +]) + AC_DEFUN([AC_PATH_SSL], [ AC_ARG_WITH(ssl-dir, [ --with-ssl-dir=PATH specify path to OpenSSL installation (must contain lib and include dirs)],