-
Notifications
You must be signed in to change notification settings - Fork 59
/
Copy pathconfigure.ac
61 lines (49 loc) · 1.53 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT(yextend, 1.6, [email protected])
AC_CONFIG_SRCDIR([main.cpp])
AM_INIT_AUTOMAKE([foreign subdir-objects])
AC_CONFIG_HEADERS([config.h])
# Checks for programs
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_MAKE_SET
# Checks for py libs
AC_MSG_CHECKING([checking for Python libraries used in unit tests])
# Check for Python nose library
python -c 'import nose' 2> /dev/null
if test $? != 0; then
AC_MSG_ERROR(["Cannot run unit tests: missing Python nose library"])
fi
AC_MSG_RESULT([ok])
# Checks for libraries
AC_CHECK_LIB([archive], [archive_read_new])
AC_CHECK_LIB([crypto], [OPENSSL_init])
AC_CHECK_LIB([yara], [main])
AC_CHECK_LIB([z], [main])
AC_CHECK_LIB([pcrecpp], [main])
AC_CHECK_LIB([uuid], [main])
AC_CHECK_LIB([bz2], [main])
# Checks for header files
AC_CHECK_HEADERS([stdint.h stdlib.h string.h syslog.h unistd.h uuid.h])
# Checks for installed progs
AC_CHECK_PROG(PDFTOTEXT,[pdftotext],[pdftotext],[no])
test "$PDFTOTEXT" == "no" && AC_MSG_ERROR([Required program 'pdftotext' not found.])
# Checks for typedefs, structures, and compiler characteristics
AC_CHECK_HEADER_STDBOOL
AC_TYPE_INT64_T
AC_TYPE_OFF_T
AC_TYPE_SIZE_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T
# Checks for library functions
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_FUNC_STRTOD
AC_CHECK_FUNCS([getcwd memset strchr strdup strstr])
AC_SUBST([AM_CXXFLAGS], [-std=c++11])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT