X-Git-Url: http://www.average.org/gitweb/?p=pam_pcsc_cr.git;a=blobdiff_plain;f=configure.ac;h=17b40dda9711a63f8e5145c65e5437da20a1380e;hp=4a9453d3126a62d7d791a95250141dbb4155a532;hb=67023db2952f4c3ec55a247dec401366f6b92e99;hpb=3d841899fe8859b2ce6af8fdfd8fa961c7651425 diff --git a/configure.ac b/configure.ac index 4a9453d..17b40dd 100644 --- a/configure.ac +++ b/configure.ac @@ -67,8 +67,29 @@ AS_IF([test "x$TOMCRYPT_CFLAGS" != "x" -o "x$TOMCRYPT_LIBS" != "x" ], [ CPPFLAGS="$TOMCRYPT_CFLAGS $CPPFLAGS" LIBS="$TOMCRYPT_LIBS $LIBS" -AS_IF([test "x$use_openssl" != "xyes" -a "x$use_tomcrypt" != "xyes"], [ - AC_MSG_ERROR([[Neither openssl nor tomcrypt libraries present]]) +AC_ARG_ENABLE(gcrypt, + [ --enable-gcrypt use libgcrypt even when openssl present]) + +AS_IF([test "x$use_openssl" != "xyes" && test "x$use_tomcrypt" != "xyes" || \ + test "x$enable_tomcrypt" = "xyes"], [ + AM_PATH_LIBGCRYPT() +]) +AC_ARG_WITH(libgcrypt-include-path, + [ --with-libgcrypt-include-path=PATH path to libgcrypt includes], + [LIBGCRYPT_CFLAGS="-I $withval"], + []) +AC_ARG_WITH(libgcrypt-lib-path, + [ --with-libgcrypt-lib-path=PATH path to libgcrypt libs], + [LIBGCRYPT_LIBS="-L $withval -lgcrypt"], + []) +AS_IF([test "x$LIBGCRYPT_CFLAGS" != "x" -o "x$LIBGCRYPT_LIBS" != "x" ], [ + use_gcrypt=yes +]) +CPPFLAGS="$LIBGCRYPT_CFLAGS $CPPFLAGS" +LIBS="$LIBGCRYPT_LIBS $LIBS" + +AS_IF([test "x$use_openssl" != "xyes" -a "x$use_tomcrypt" != "xyes" -a "x$use_gcrypt" != "xyes"], [ + AC_MSG_ERROR([[Neither openssl, tomcrypt or gcrypt libraries present]]) ]) AS_IF([test "x$use_openssl" = "xyes"], [ @@ -79,6 +100,10 @@ AS_IF([test "x$use_tomcrypt" = "xyes"], [ CRYPTO_OBJS+=" tom_crypto.lo" AC_DEFINE([HAVE_TOMCRYPT], [1], [Use libtomcrypt]) ]) +AS_IF([test "x$use_gcrypt" = "xyes"], [ + CRYPTO_OBJS+=" gnu_crypto.lo" + AC_DEFINE([HAVE_GCRYPT], [1], [Use libgcrypt]) +]) AC_SUBST(CRYPTO_OBJS) dnl Checks for header files.