-
Notifications
You must be signed in to change notification settings - Fork 7
/
configure.ac
47 lines (40 loc) · 1.3 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
AC_INIT(armadito-mod-yara, 0.11.0, fdechelle@teclib.com)
AM_INIT_AUTOMAKE([foreign])
# collect arguments
# debug
AC_ARG_ENABLE([debug],
AS_HELP_STRING([--enable-debug],[enable debugging @<:@default is yes@:>@]),
,
enable_debug="yes")
# check for needed programs
AC_PROG_CC([gcc])
AC_PROG_LIBTOOL
# check for debug
AC_MSG_CHECKING(for debug)
AC_MSG_RESULT($enable_debug)
AM_CONDITIONAL([DEBUG], [test "$enable_debug" = "yes"])
if test "$enable_debug" = "yes"; then
AC_DEFINE(DEBUG,1,[Define DEBUG to enable debug messages])
CFLAGS="${CFLAGS} -g"
fi
PKG_PROG_PKG_CONFIG
# check for libarmadito
PKG_CHECK_MODULES(LIBARMADITO, libarmadito, [HAVE_LIBARMADITO=yes], [HAVE_LIBARMADITO=no])
# check for libarmadito/armadito.h in source tree
if test "$HAVE_LIBARMADITO" = "no"; then
OLD_CPPFLAGS="$CPPFLAGS"
CPPFLAGS=-I$srcdir/../../armadito-core/libmodule/include
AC_CHECK_HEADER([libarmadito/armadito.h], [], [AC_MSG_ERROR([cannot find Armadito module library])], [])
CPPFLAGS="$OLD_CPPFLAGS"
LIBARMADITO_CFLAGS='-I$(top_srcdir)/../../armadito-core/libmodule/include'
AC_SUBST([LIBARMADITO_CFLAGS])
fi
# check for libyara
PKG_CHECK_MODULES(LIBYARA, yara, [HAVE_LIBYARA=yes], [AC_MSG_ERROR([cannot find YARA library])])
# Output files
AC_CONFIG_FILES([
Makefile
src/Makefile
conf/Makefile
])
AC_OUTPUT