X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=macros%2Fssl-check.m4;h=66c8f7a8caecd5c1b7473fb9c890e8859a126d33;hb=2726bc50a91ff4fc06813edaab91e3596df37e8f;hp=13171f600976cbf244c0697730f78d0337270557;hpb=f9ca290e9dc1144c0e7450b4c8e66033c121ffdc;p=netatalk.git diff --git a/macros/ssl-check.m4 b/macros/ssl-check.m4 index 13171f60..66c8f7a8 100644 --- a/macros/ssl-check.m4 +++ b/macros/ssl-check.m4 @@ -1,6 +1,42 @@ -dnl $Id: ssl-check.m4,v 1.7 2003-01-26 16:51:22 srittau Exp $ +dnl $Id: ssl-check.m4,v 1.12 2004-01-14 16:10:29 bfernhomberg 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(gcrypt, [ --disable-gcrypt disable compilation with libgcrypt], [ + if test "x$enableval" != "xno"; 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`" + AC_DEFINE(HAVE_GCRYPT, 1, [Define if libgcrypt is available]) + fi + fi + + AC_SUBST(GCRYPT_CFLAGS) + AC_SUBST(GCRYPT_LIBS) + AM_CONDITIONAL(HAVE_GCRYPT, test "x$GCRYPT_CONFIG" != "xno") +]) + 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)], @@ -33,14 +69,8 @@ AC_DEFUN([AC_PATH_SSL], [ fi AC_MSG_RESULT([$ssldir (enabling RANDNUM and DHX support)]) -dnl FIXME: The following looks crude and probably doesn't work properly. - dnl Check for the crypto library: - AC_CHECK_LIB(crypto, main) - dnl Check for "DES" library (for SSLeay, not openssl): - AC_CHECK_LIB(des, main) - - AC_DEFINE(OPENSSL_DHX, 1) - AC_DEFINE(UAM_DHX, 1) + AC_DEFINE(OPENSSL_DHX, 1, [Define if the OpenSSL DHX modules should be built]) + AC_DEFINE(UAM_DHX, 1, [Define if the DHX UAM modules should be compiled]) compile_ssl=yes break fi