-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.ac
53 lines (36 loc) · 1.22 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
AC_INIT(libwdcap, 1.0.1, [email protected])
AM_INIT_AUTOMAKE([subdir-objects foreign])
AC_CONFIG_SRCDIR(src/WdcapPacketProcessor.cc)
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AC_PROG_CXX
AC_PROG_INSTALL
if test "$GCC" = "yes"; then
CFLAGS="$CFLAGS -Wall -W -O2 "
fi
AC_PROG_LIBTOOL
AC_CHECK_LIB([trace], [trace_pstart],,trace_found=0)
AC_CHECK_LIB([yaml], [yaml_document_get_node],,yaml_found=0)
AC_CHECK_LIB([crypto], [EVP_EncryptInit_ex],,crypto_found=0)
AC_CONFIG_FILES([Makefile src/Makefile])
if test "$trace_found" = 0; then
AC_MSG_ERROR(Required library libtrace4 not found; use LDFLAGS to specify library location)
fi
if test "$yaml_found" = 0; then
AC_MSG_ERROR(Required library libyaml not found; use LDFLAGS to specify library location)
fi
if test "$crypto_found" = 0; then
AC_MSG_ERROR(Required library libcrypto not found; use LDFLAGS to specify library location)
fi
AC_SUBST([ADD_LIBS])
AC_SUBST([ADD_LDFLAGS])
AC_SUBST([ADD_INCLS])
AC_OUTPUT
reportopt() {
if test x"$2" = xtrue -o x"$2" = xyes; then
AC_MSG_NOTICE([$1: Yes])
else
AC_MSG_NOTICE([$1: No])
fi
}