@@ -18,62 +18,39 @@ AC_ARG_WITH(
18
18
19
19
AS_CASE ( [ "${with_ssdeep}"] ,
20
20
[ no] , [ test_paths=] ,
21
- [ yes] , [ test_paths="/usr/lib /usr/local/lib /usr/local/libfuzzy /usr/local/fuzzy /usr/local / opt/libfuzzy /opt/fuzzy /opt /usr" ] )
22
- [ test_paths="${with_ssdeep}"] ,
21
+ [ yes] , [ test_paths="/usr/ /usr/local/ /usr/local/libfuzzy /usr/local/fuzzy /opt/libfuzzy /opt/fuzzy /opt /opt/local" ] ,
22
+ [ test_paths="${with_ssdeep}"] )
23
23
24
24
AS_IF ( [ test "x${test_paths}" != "x"] , [
25
25
AC_MSG_CHECKING ( [ for ssdeep path] )
26
26
27
27
SSDEEP_LIB_NAME="fuzzy"
28
- SSDEEP_LIB_FILENAME="lib$SSDEEP_LIB_NAME.so"
29
28
30
29
if test -z "$withssdeep" -o "$withssdeep" = "yes"; then
31
30
for i in ${test_paths}; do
32
- if test -f "$i/$SSDEEP_LIB_FILENAME"; then
33
- SSDEEP_LIB_DIR="$i"
34
- fi
35
- done
36
- else
37
- if test -f "$withssdeep/$SSDEEP_LIB_FILENAME"; then
38
- SSDEEP_LIB_DIR="$withssdeep"
39
- else
40
- if test -f "$withssdeep/.libs/$SSDEEP_LIB_FILENAME"; then
41
- SSDEEP_LIB_DIR="$withssdeep/.libs/"
42
- fi
43
- fi
44
- fi
45
-
46
- SSDEEP_LDFLAGS="-l$SSDEEP_LIB_NAME"
47
- SSDEEP_LDADD="-l$SSDEEP_LIB_NAME"
48
-
49
- if test -z "$withssdeep" -o "$withssdeep" = "yes"; then
50
- for i in /usr/include /usr/local/include; do
51
- if test -f "$i/$SSDEEP_LIB_NAME.h"; then
31
+ if test -f "$i/include/fuzzy.h"; then
52
32
SSDEEP_CFLAGS="-I$i"
53
33
fi
54
34
done
55
35
else
56
- if test -f "$withssdeep/../$SSDEEP_LIB_NAME.h"; then
57
- SSDEEP_CFLAGS="-I$withssdeep/../"
58
- else
59
- if test -f "$withssdeep/$SSDEEP_LIB_NAME.h"; then
60
- SSDEEP_CFLAGS="-I$withssdeep"
61
- fi
36
+ if test -f "$withssdeep/include/fuzzy.h"; then
37
+ SSDEEP_CFLAGS="-I$i"
62
38
fi
63
39
fi
64
40
41
+ SSDEEP_LDFLAGS="-lfuzzy"
42
+ SSDEEP_LDADD="-lfuzzy"
43
+
65
44
] )
66
45
67
46
if test -z "${SSDEEP_CFLAGS}"; then
68
47
AC_MSG_RESULT ( [ no] )
69
48
SSDEEP_LDFLAGS=""
70
49
SSDEEP_LDADD=""
71
- # ifelse ( [ $2 ] , , AC_MSG_NOTICE ( [ optional ssdeep library not found] ) , $2 )
50
+ AC_MSG_NOTICE ( [ optional ssdeep library not found] )
72
51
else
73
52
SSDEEP_CFLAGS="-DWITH_SSDEEP ${SSDEEP_CFLAGS}"
74
53
AC_MSG_RESULT ( [ ${SSDEEP_LDFLAGS} ${SSDEEP_CFLAGS}] )
75
- #AC_MSG_NOTICE ( [ using ssdeep: ${SSDEEP_CFLAGS} ${SSDEEP_LDFLAGS}] )
76
- #ifelse ( [ $1 ] , , , $1 )
77
54
fi
78
55
79
56
AC_SUBST ( SSDEEP_LDFLAGS )
0 commit comments