Compiles against ssdeep in non-standard location

Issue 871: (*nix) Tacks on the include and lib directory when
a the user specifies a path for ssdeep in an alternate location.
This commit is contained in:
Kurt Newman 2015-04-21 16:32:27 -05:00 committed by Felipe Zimmerle
parent 25666005ed
commit d9bebfb874

View File

@ -25,20 +25,23 @@ AS_IF([test "x${test_paths}" != "x"], [
AC_MSG_CHECKING([for ssdeep path])
SSDEEP_LIB_NAME="fuzzy"
ssdeep_dir=
if test -z "$withssdeep" -o "$withssdeep" = "yes"; then
for i in ${test_paths}; do
if test -f "$i/include/fuzzy.h"; then
SSDEEP_CFLAGS="-I$i"
SSDEEP_CFLAGS="-I$i/include"
ssdeep_dir=$i
fi
done
else
if test -f "$withssdeep/include/fuzzy.h"; then
SSDEEP_CFLAGS="-I$i"
SSDEEP_CFLAGS="-I$withssdeep/include"
ssdeep_dir=$withssdeep
fi
fi
SSDEEP_LDFLAGS="-lfuzzy"
SSDEEP_LDFLAGS="-L$ssdeep_dir/lib -lfuzzy"
SSDEEP_LDADD="-lfuzzy"
])