forked from l3ib/fsniper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
50 lines (44 loc) · 1.43 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_PREREQ(2.59)
AC_INIT([fsniper], [git], [andrew@andrewyates.net])
AM_MAINTAINER_MODE
AC_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AC_ISC_POSIX
AC_PROG_RANLIB
AC_LANG([C])
AC_LANG_COMPILER_REQUIRE
AC_HEADER_STDC([])
AC_PROG_CC
AC_PROG_INSTALL
AC_CHECK_LIB(magic, magic_open, [], AC_MSG_ERROR([libmagic not found]))
AC_CHECK_LIB(pcre, pcre_version, [], AC_MSG_ERROR([libpcre not found]))
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug],[build a debug version [[default=no]]]),
[DEBUG=$enableval], [DEBUG="no"])
if test "$DEBUG" = "yes"; then
FLAGS="-g3 -ggdb -Wall -Wextra -pedantic"
else
FLAGS=""
fi
AC_ARG_ENABLE([efence],
AC_HELP_STRING([--enable-efence],[build with electric fence [[default=no]]]),
[EFENCE=$enableval], [EFENCE="no"])
if test "$EFENCE" = "yes"; then
AC_CHECK_HEADER([efence.h],[],
[AC_MSG_ERROR([efence.h required for electric fence support])])
AC_DEFINE(USE_EFENCE, 1, [Define to enable electric fence])
LIBS="-lefence $LIBS"
fi
AC_ARG_ENABLE([syslog],
AC_HELP_STRING([--disable-syslog],[build without syslog support [[default=yes]]]),
[SYSLOG=$enableval], [SYSLOG="yes"])
if test "$SYSLOG" = "yes"; then
AC_CHECK_HEADER([syslog.h],[],
[AC_MSG_ERROR([syslog.h required for syslog support])])
AC_DEFINE(USE_SYSLOG, 1, [Define to enable syslog support])
else
AC_MSG_WARN([Syslog support will be disabled])
fi
AC_SUBST(FLAGS)
AC_CONFIG_FILES( Makefile src/Makefile )
AC_OUTPUT