forked from Ramaguru-Forks/ssdeep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
89 lines (72 loc) · 2.67 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
AC_INIT([ssdeep],[2.14.2],[[email protected]])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
AM_CONFIG_HEADER([config.h])
AC_CANONICAL_HOST
AC_PROG_CC
AC_PROG_CXX
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
AC_PROG_INSTALL
AC_CONFIG_MACRO_DIR([m4])
case $host in
*-*-*linux*-*) AC_DEFINE([__LINUX__],1,[Linux operating system functions]) ;;
*-*-mingw32) CPPFLAGS="-DUNICODE -D_UNICODE $CPPFLAGS"
esac
# Bring additional directories where things might be found into our
# search path. I don't know why autoconf doesn't do this by default
AC_ARG_ENABLE([auto-search],
[AS_HELP_STRING([--disable-auto-search], [disable searching additional include and library directories])],,
[enable_auto_search=yes])
with_auto_headers_default=$enable_auto_search
with_auto_libs_default=$enable_auto_search
AC_ARG_WITH([auto-headers],
[AS_HELP_STRING([--without-auto-headers], [disable searching additional include directories])],,
[with_auto_headers=$with_auto_headers_default])
AC_ARG_WITH([auto-libs],
[AS_HELP_STRING([--without-auto-libs], [disable searching additional library directories])],,
[with_auto_libs=$with_auto_libs_default])
for spfx in /usr/local /opt/local /sw ; do
if test "x$with_auto_headers" = xyes; then
AC_MSG_CHECKING([for ${spfx}/include])
if test -d ${spfx}/include; then
CPPFLAGS="-I${spfx}/include $CPPFLAGS"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
fi
if test "x$with_auto_libs" = xyes; then
AC_MSG_CHECKING([for ${spfx}/lib])
if test -d ${spfx}/lib; then
LDFLAGS="-L${spfx}/lib $LDFLAGS"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
fi
done
AC_C_BIGENDIAN
AC_SYS_LARGEFILE
AC_CHECK_HEADERS([libgen.h])
AC_CHECK_HEADERS([dirent.h])
AC_CHECK_HEADERS([inttypes.h])
AC_CHECK_HEADERS([fcntl.h sys/types.h sys/ioctl.h sys/param.h wchar.h unistd.h sys/stat.h sys/disk.h])
AC_CHECK_HEADER([inttypes.h],,AC_MSG_ERROR([You must have inttypes.h or some other C99 equivalent]),)
# Bit-parallel string processing
AC_ARG_ENABLE([bitparallel-string-ops],
[AS_HELP_STRING([--disable-bitparallel-string-ops], [disable using bit-parallel string operations (which would work best at 64-bit environment)])],,
[enable_bitparallel_string_ops=yes])
AS_IF([test "x$enable_bitparallel_string_ops" = xno],[
AC_DEFINE([SSDEEP_DISABLE_POSITION_ARRAY], [1], [Define to 1 if the user chose to disable bit-parallel string operations.])
],)
# These includes are required on FreeBSD
AC_CHECK_HEADERS([sys/mount.h],[],[],
[#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif])
AC_FUNC_FSEEKO
AC_OUTPUT