Compile the cryptopp wrapper only when used

This should allow us to avoid an unnecessary dependancy to a C++
compiler.

Conflicts:
	configure.ac
This commit is contained in:
Ari Koivula 2016-06-07 15:36:48 +03:00
parent 651e84ff85
commit a2170f0763
2 changed files with 12 additions and 1 deletions

View file

@ -66,6 +66,7 @@ AS_IF([test "x$with_cryptopp" = "xyes"], [
)
])
AM_CONDITIONAL([USE_CRYPTOPP], [test "x$with_cryptopp" = "xyes"])
CPPFLAGS="$CPPFLAGS $cryptopp_CFLAGS"
LIBS="$LIBS $cryptopp_LIBS"

View file

@ -132,7 +132,6 @@ libkvazaar_la_SOURCES = \
strategyselector.h \
extras/libmd5.c \
extras/libmd5.h \
extras/crypto.cpp \
extras/crypto.h
libkvazaar_la_CFLAGS =
@ -143,6 +142,17 @@ libkvazaar_la_LIBADD = \
libsse2.la \
libsse41.la
if USE_CRYPTOPP
# The crypto.cpp has to be in it's own library, because otherwise
# autoconf wants to use CXXLD for linking, even if the cpp file
# is not included.
noinst_LTLIBRARIES += libcrypto.la
libkvazaar_la_LIBADD += libcrypto.la
libcrypto_la_SOURCES = \
extras/crypto.h \
extras/crypto.cpp
endif
libkvazaar_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined -version-number $(KVZ_API_VERSION)