Fix building with crypto++

Depending on the distro, the pkg-config package name of crypto++ could
be either cryptopp or libcrypto++. This commit changes configure to
check for both instead of cryptopp only.
This commit is contained in:
Arttu Ylä-Outinen 2016-10-10 15:03:32 +09:00
parent e7cdd47745
commit 8ae791a3e1

View file

@ -59,12 +59,15 @@ CFLAGS="$KVZ_CFLAGS $CFLAGS"
AC_ARG_WITH([cryptopp],
AS_HELP_STRING([--with-cryptopp],
[Build with cryptopp Enables selective encryption.]))
AS_IF([test "x$with_cryptopp" = "xyes"], [
PKG_CHECK_MODULES([cryptopp], [cryptopp],
AS_IF([test "x$with_cryptopp" = "xyes"],
[PKG_CHECK_MODULES([cryptopp], [cryptopp],
[AC_DEFINE([KVZ_SEL_ENCRYPTION], [1], [With cryptopp])],
[AC_MSG_ERROR([cryptopp not found with pkg-config])]
)
])
[PKG_CHECK_MODULES([cryptopp], [libcrypto++],
[AC_DEFINE([KVZ_SEL_ENCRYPTION], [1], [With cryptopp])],
[AC_MSG_ERROR([neither cryptopp nor libcrypto++ found with pkg-config])]
)]
)]
)
AM_CONDITIONAL([USE_CRYPTOPP], [test "x$with_cryptopp" = "xyes"])
CPPFLAGS="$CPPFLAGS $cryptopp_CFLAGS"