@@ -18,62 +18,39 @@ AC_ARG_WITH(
1818
1919AS_CASE ( [ "${with_ssdeep}"] ,
2020[ 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}"] )
2323
2424AS_IF ( [ test "x${test_paths}" != "x"] ,[
2525AC_MSG_CHECKING ( [ for ssdeep path] )
2626
2727 SSDEEP_LIB_NAME="fuzzy"
28- SSDEEP_LIB_FILENAME="lib$SSDEEP_LIB_NAME.so"
2928
3029 if test -z "$withssdeep" -o "$withssdeep" = "yes"; then
3130 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
5232 SSDEEP_CFLAGS="-I$i"
5333 fi
5434 done
5535 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"
6238 fi
6339 fi
6440
41+ SSDEEP_LDFLAGS="-lfuzzy"
42+ SSDEEP_LDADD="-lfuzzy"
43+
6544] )
6645
6746 if test -z "${SSDEEP_CFLAGS}"; then
6847AC_MSG_RESULT ( [ no] )
6948SSDEEP_LDFLAGS=""
7049SSDEEP_LDADD=""
71- # ifelse ( [ $2 ] , , AC_MSG_NOTICE ( [ optional ssdeep library not found] ) , $2 )
50+ AC_MSG_NOTICE ( [ optional ssdeep library not found] )
7251 else
7352 SSDEEP_CFLAGS="-DWITH_SSDEEP ${SSDEEP_CFLAGS}"
7453AC_MSG_RESULT ( [ ${SSDEEP_LDFLAGS} ${SSDEEP_CFLAGS}] )
75- #AC_MSG_NOTICE ( [ using ssdeep: ${SSDEEP_CFLAGS} ${SSDEEP_LDFLAGS}] )
76- #ifelse ( [ $1 ] , , ,$1 )
7754 fi
7855
7956AC_SUBST ( SSDEEP_LDFLAGS )