| 1 |
# Autoconf script |
| 2 |
|
| 3 |
AC_PREREQ(2.63) |
| 4 |
AC_INIT([e2guardian],[5.5.9r]) |
| 5 |
AM_INIT_AUTOMAKE([subdir-objects]) |
| 6 |
AC_CONFIG_HEADERS([e2config.h]) |
| 7 |
AC_CONFIG_MACRO_DIR([m4]) |
| 8 |
|
| 9 |
AC_CACHE_LOAD |
| 10 |
|
| 11 |
# Checks for programs. |
| 12 |
AC_PROG_CXX |
| 13 |
AC_PROG_CC |
| 14 |
AC_PROG_CPP |
| 15 |
AC_PROG_INSTALL |
| 16 |
AC_PROG_LN_S |
| 17 |
AC_PROG_MAKE_SET |
| 18 |
|
| 19 |
AC_LANG(C++) |
| 20 |
|
| 21 |
AC_CACHE_SAVE |
| 22 |
|
| 23 |
######################################################################### |
| 24 |
# Get GCC version |
| 25 |
######################################################################### |
| 26 |
GCC_VERSION=$(gcc --version | head -1 | awk '{print $NF}') |
| 27 |
|
| 28 |
GCC_VERSION_MAJOR=$(echo $GCC_VERSION |cut -d'.' -f1 2>/dev/null) |
| 29 |
GCC_VERSION_MINOR=$(echo $GCC_VERSION |cut -d'.' -f2 2>/dev/null) |
| 30 |
GCC_VERSION_PATCH=$(echo $GCC_VERSION |cut -d'.' -f3 2>/dev/null) |
| 31 |
|
| 32 |
# Checks for header files. |
| 33 |
AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stdlib.h]) |
| 34 |
AC_CHECK_HEADERS([string.h sys/socket.h sys/time.h syslog.h unistd.h locale.h]) |
| 35 |
AC_CHECK_HEADERS([sys/types.h sys/un.h sys/poll.h sys/resource.h]) |
| 36 |
AC_CHECK_HEADERS([pwd.h grp.h]) |
| 37 |
AC_CHECK_HEADERS([byteswap.h]) |
| 38 |
|
| 39 |
# Check system endianness |
| 40 |
AC_C_BIGENDIAN |
| 41 |
|
| 42 |
# check for zlib |
| 43 |
AC_MSG_CHECKING(if zlib should be statically linked) |
| 44 |
AC_ARG_ENABLE(static-zlib, |
| 45 |
[AS_HELP_STRING([--enable-static-zlib@<:@=no@:>@],[Enable static linking of zlib])], |
| 46 |
[ if test "x$enableval" = "xno"; then |
| 47 |
staticzlib=false |
| 48 |
AC_MSG_RESULT(no) |
| 49 |
else |
| 50 |
staticzlib=true |
| 51 |
AC_MSG_RESULT(yes) |
| 52 |
fi |
| 53 |
], |
| 54 |
[ |
| 55 |
staticzlib=false |
| 56 |
AC_MSG_RESULT(no) |
| 57 |
]) |
| 58 |
|
| 59 |
AC_MSG_CHECKING(for zlib) |
| 60 |
AC_ARG_WITH(zlib, |
| 61 |
[AS_HELP_STRING([--with-zlib@<:@=NONE@:>@],[non-standard search path for zlib library])], |
| 62 |
[ # check for header & func (in library) in given prefix |
| 63 |
CPPFLAGS="${CPPFLAGS} -I${withval}/include" |
| 64 |
if test "x$staticzlib" = "xtrue"; then |
| 65 |
LIBS="-Bstatic -L${withval} -lz -Bdynamic ${LIBS}" |
| 66 |
else |
| 67 |
LIBS="-L${withval}/lib -lz ${LIBS}" |
| 68 |
fi |
| 69 |
], |
| 70 |
[ # if --with-zlib is not supplied, we still need -lz in LIBS. |
| 71 |
if test "x$staticzlib" = "xtrue"; then |
| 72 |
LIBS="-Bstatic -lz -Bdynamic ${LIBS}" |
| 73 |
else |
| 74 |
LIBS="-lz ${LIBS}" |
| 75 |
fi |
| 76 |
]) |
| 77 |
AC_CHECK_HEADERS([zlib.h]) |
| 78 |
if ! test "x$staticzlib" = "xtrue"; then |
| 79 |
AC_CHECK_LIB(z, gzdopen, [AC_MSG_RESULT(yes)], [AC_MSG_ERROR([no zlib!])]) |
| 80 |
fi |
| 81 |
|
| 82 |
AC_CACHE_SAVE |
| 83 |
|
| 84 |
# Checks for typedefs, structures, and compiler characteristics. |
| 85 |
AC_TYPE_PID_T |
| 86 |
AC_TYPE_SIZE_T |
| 87 |
AC_TYPE_OFF_T |
| 88 |
AC_TYPE_UID_T |
| 89 |
|
| 90 |
# Checks for library functions. |
| 91 |
AC_FUNC_FORK |
| 92 |
AC_CHECK_FUNCS([dup2 gettimeofday memset select]) |
| 93 |
AC_CHECK_FUNCS([strerror strstr strtol]) |
| 94 |
AC_CHECK_FUNCS([setuid setgid umask seteuid setreuid setlocale]) |
| 95 |
AC_SEARCH_LIBS([floor], [m]) |
| 96 |
AC_SEARCH_LIBS([gethostbyname], [nsl]) |
| 97 |
AC_SEARCH_LIBS([socket], [socket], [], [ |
| 98 |
AC_CHECK_LIB( |
| 99 |
[socket], [socket], [LIBS="-lsocket -lnsl $LIBS"], |
| 100 |
[], [-lnsl] |
| 101 |
) |
| 102 |
]) |
| 103 |
AC_SEARCH_LIBS([inet_aton], [resolv]) |
| 104 |
|
| 105 |
AC_CACHE_SAVE |
| 106 |
|
| 107 |
AC_MSG_CHECKING(for backside with both hands) |
| 108 |
AC_MSG_RESULT(no) |
| 109 |
AC_MSG_CHECKING(build os) |
| 110 |
AC_CANONICAL_BUILD |
| 111 |
AC_MSG_RESULT($build_os) |
| 112 |
|
| 113 |
AC_MSG_CHECKING(for debug_high option) |
| 114 |
AC_ARG_WITH(debug_high, |
| 115 |
[AS_HELP_STRING([--with-debug_high@<:@=on@:>@],[switch on high level debug build mode])], |
| 116 |
[if test "x${withval}" = "xoff" ; then |
| 117 |
AC_MSG_RESULT(no) |
| 118 |
else |
| 119 |
AC_MSG_RESULT(yes) |
| 120 |
debug_high=${withval} |
| 121 |
AC_DEFINE(DEBUG_HIGH, 1, [Define to enable high level debug build mode]) |
| 122 |
fi], [ |
| 123 |
# enable by default |
| 124 |
AC_MSG_RESULT(yes) |
| 125 |
AC_DEFINE(DEBUG_HIGH, 1, [Define to enable high level debug build mode]) |
| 126 |
]) |
| 127 |
|
| 128 |
AC_MSG_CHECKING(for debug_low option) |
| 129 |
AC_ARG_WITH(debug_low, |
| 130 |
[AS_HELP_STRING([--with-debug_low@<:@=off@:>@],[switch on low level debug build mode])], |
| 131 |
[if test "x${withval}" = "xoff" ; then |
| 132 |
AC_MSG_RESULT(no) |
| 133 |
else |
| 134 |
AC_MSG_RESULT(yes) |
| 135 |
debug_low=${withval} |
| 136 |
AC_DEFINE(DEBUG_LOW, 1, [Define to enable low level debug build mode]) |
| 137 |
fi], [ |
| 138 |
# disable by default |
| 139 |
AC_MSG_RESULT(no) |
| 140 |
]) |
| 141 |
|
| 142 |
AC_MSG_CHECKING(for proxy user) |
| 143 |
AC_ARG_WITH(proxyuser, |
| 144 |
[AS_HELP_STRING([--with-proxyuser@<:@=nobody@:>@],[name of proxy user])], |
| 145 |
[if test "x${withval}" != "x" ; then |
| 146 |
AC_MSG_RESULT(yes) |
| 147 |
proxyuser=${withval} |
| 148 |
else |
| 149 |
AC_MSG_RESULT(no) |
| 150 |
proxyuser=nobody |
| 151 |
fi], [ |
| 152 |
# disable by default |
| 153 |
AC_MSG_RESULT(no) |
| 154 |
proxyuser=nobody |
| 155 |
]) |
| 156 |
AC_SUBST(E2PROXYUSER, "$proxyuser") |
| 157 |
#AC_DEFINE_UNQUOTED(__PROXYUSER,"$proxyuser","User to run as") |
| 158 |
|
| 159 |
AC_MSG_CHECKING(for proxy group) |
| 160 |
AC_ARG_WITH(proxygroup, |
| 161 |
[AS_HELP_STRING([--with-proxygroup@<:@=nobody@:>@],[name of proxy group])], |
| 162 |
[if test "x${withval}" != "x" ; then |
| 163 |
AC_MSG_RESULT(yes) |
| 164 |
proxygroup=${withval} |
| 165 |
else |
| 166 |
AC_MSG_RESULT(no) |
| 167 |
proxygroup=nobody |
| 168 |
fi], [ |
| 169 |
# disable by default |
| 170 |
AC_MSG_RESULT(no) |
| 171 |
proxygroup=nobody |
| 172 |
]) |
| 173 |
AC_SUBST(E2PROXYGROUP, "$proxygroup") |
| 174 |
#AC_DEFINE_UNQUOTED(__PROXYGROUP,"$proxygroup","Group to run as") |
| 175 |
|
| 176 |
AC_MSG_CHECKING(for piddir) |
| 177 |
AC_ARG_WITH(piddir, |
| 178 |
[AS_HELP_STRING([--with-piddir@<:@=${localstatedir}/run@:>@],[path for pid file])], |
| 179 |
[if test "x${withval}" != "x" ; then |
| 180 |
AC_MSG_RESULT(yes) |
| 181 |
piddir=${withval} |
| 182 |
else |
| 183 |
AC_MSG_RESULT(no) |
| 184 |
piddir="${localstatedir}/run" |
| 185 |
fi], [ |
| 186 |
# disable by default |
| 187 |
AC_MSG_RESULT(no) |
| 188 |
piddir="${localstatedir}/run" |
| 189 |
]) |
| 190 |
AC_FINALIZE_VAR(E2PIDDIR,"$piddir") |
| 191 |
AC_SUBST(E2PIDDIR) |
| 192 |
#AC_DEFINE_UNQUOTED([__PIDDIR],[${E2PIDDIR}], "path of pid directory") |
| 193 |
|
| 194 |
|
| 195 |
AC_MSG_CHECKING(for logdir) |
| 196 |
AC_ARG_WITH(logdir, |
| 197 |
[AS_HELP_STRING([--with-logdir@<:@=${localstatedir}/log/${PACKAGE_NAME}@:>@],[path for log files])], |
| 198 |
[if test "x${withval}" != "x" ; then |
| 199 |
AC_MSG_RESULT(yes) |
| 200 |
logdir=${withval} |
| 201 |
else |
| 202 |
AC_MSG_RESULT(no) |
| 203 |
logdir="${localstatedir}/log/${PACKAGE_NAME}" |
| 204 |
fi], [ |
| 205 |
# disable by default |
| 206 |
AC_MSG_RESULT(no) |
| 207 |
logdir="${localstatedir}/log/${PACKAGE_NAME}" |
| 208 |
]) |
| 209 |
AC_FINALIZE_VAR(E2LOGLOCATION,"$logdir") |
| 210 |
AC_SUBST(E2LOGLOCATION) |
| 211 |
# AC_DEFINE_UNQUOTED([__LOGLOCATION],[${E2LOGLOCATION}], "path of log directory") |
| 212 |
|
| 213 |
PKG_PROG_PKG_CONFIG |
| 214 |
|
| 215 |
# asking user if they want PCRE support |
| 216 |
AC_MSG_CHECKING(for PCRE support) |
| 217 |
AC_ARG_ENABLE( |
| 218 |
pcre, |
| 219 |
[AS_HELP_STRING([--enable-pcre@<:@=yes@:>@],[Enable support for the PCRE library])], |
| 220 |
[ if test "x$enableval" = "xno"; then |
| 221 |
pcre=false |
| 222 |
AC_MSG_RESULT(no) |
| 223 |
else |
| 224 |
pcre=true |
| 225 |
AC_MSG_RESULT(yes) |
| 226 |
fi |
| 227 |
], |
| 228 |
[ # enable by default |
| 229 |
pcre=true |
| 230 |
AC_MSG_RESULT(yes) |
| 231 |
] |
| 232 |
) |
| 233 |
|
| 234 |
if test "x$pcre" = "xtrue"; then |
| 235 |
PKG_CHECK_MODULES([PCRE],[libpcre >= 6.0]) |
| 236 |
AC_DEFINE([HAVE_PCRE],[],[Define to enable PCRE support]) |
| 237 |
PCRE_LIBS="-lpcreposix ${PCRE_LIBS}" |
| 238 |
else |
| 239 |
AC_CHECK_FUNCS([regcomp]) |
| 240 |
fi |
| 241 |
AM_CONDITIONAL(HAVE_PCRE, test "x$pcre" = "xtrue") |
| 242 |
|
| 243 |
AC_CHECK_HEADERS([pthread.h], [ LIBS="-lpthread ${LIBS}"], [ |
| 244 |
echo "pthread.h required, failing" |
| 245 |
exit -1 |
| 246 |
]) |
| 247 |
#AC_CHECK_HEADERS([event2/thread.h], [ |
| 248 |
#LIBS="-levent_pthreads ${LIBS}" |
| 249 |
#], [ |
| 250 |
#echo "libevent_pthreads required, failing" |
| 251 |
#exit -1 |
| 252 |
#]) |
| 253 |
|
| 254 |
[if test "$GCC_VERSION_MAJOR" -eq 4; then |
| 255 |
if test "$GCC_VERSION_MINOR" -ge 9; then |
| 256 |
if test "$GCC_VERSION_PATCH" -ge 3; then |
| 257 |
echo "Version: $GCC_VERSION" |
| 258 |
CXXFLAGS="${CXXFLAGS} --std=c++11" |
| 259 |
fi |
| 260 |
fi |
| 261 |
echo "Version: $GCC_VERSION " |
| 262 |
CXXFLAGS="${CXXFLAGS} --std=c++1y" |
| 263 |
else |
| 264 |
if test "$GCC_VERSION_MAJOR" -ge 5; then |
| 265 |
echo "Version: $GCC_VERSION " |
| 266 |
CXXFLAGS="${CXXFLAGS} --std=c++11" |
| 267 |
else |
| 268 |
echo "Version: $GCC_VERSION " |
| 269 |
CXXFLAGS="${CXXFLAGS} --std=c++1y" |
| 270 |
fi |
| 271 |
fi |
| 272 |
] |
| 273 |
|
| 274 |
CXXFLAGS="${CXXFLAGS} -funsigned-char" |
| 275 |
|
| 276 |
# ask user if they want large file support on 32 bit systems |
| 277 |
AC_MSG_CHECKING([for large file support]) |
| 278 |
AC_ARG_ENABLE( |
| 279 |
lfs, |
| 280 |
[AS_HELP_STRING([--enable-lfs@<:@=yes@:>@],[Enable large file support on 32 bit systems])], |
| 281 |
[ if test "x$enableval" = "xno"; then |
| 282 |
AC_MSG_RESULT(no) |
| 283 |
else |
| 284 |
lfsflags=`getconf LFS_CFLAGS` |
| 285 |
lfsld=`getconf LFS_LDFLAGS` |
| 286 |
lfslib=`getconf LFS_LIBS` |
| 287 |
CXXFLAGS="${CXXFLAGS} $lfsflags" |
| 288 |
LDFLAGS="${LDFLAGS} $lfsld" |
| 289 |
LIBS="${LIBS} $lfslib" |
| 290 |
AC_MSG_RESULT(yes) |
| 291 |
fi |
| 292 |
], |
| 293 |
[ # enable by default |
| 294 |
lfsflags=`getconf LFS_CFLAGS` |
| 295 |
lfsld=`getconf LFS_LDFLAGS` |
| 296 |
lfslib=`getconf LFS_LIBS` |
| 297 |
CXXFLAGS="${CXXFLAGS} $lfsflags " |
| 298 |
LDFLAGS="${LDFLAGS} $lfsld" |
| 299 |
LIBS="${LIBS} $lfslib" |
| 300 |
AC_MSG_RESULT(yes) |
| 301 |
]) |
| 302 |
|
| 303 |
# determine whether or not "off_t" is simply a typedef of |
| 304 |
# "int", "unsigned int", "long", etc. - if it is, the String |
| 305 |
# class won't compile if its off_t constructor is defined, |
| 306 |
# as that would represent a function redefinition. |
| 307 |
AC_MSG_CHECKING([for type collision with off_t]) |
| 308 |
AC_COMPILE_IFELSE( |
| 309 |
[ |
| 310 |
AC_LANG_PROGRAM( |
| 311 |
[[#include <sys/types.h>]],[[ |
| 312 |
struct Foo{ |
| 313 |
void f(const int); |
| 314 |
void f(const long); |
| 315 |
void f(const long unsigned); |
| 316 |
void f(const unsigned int); |
| 317 |
void f(const off_t); |
| 318 |
};]]) |
| 319 |
],[ |
| 320 |
AC_MSG_RESULT([no]) |
| 321 |
],[ |
| 322 |
AC_MSG_RESULT([yes]) |
| 323 |
AC_DEFINE([OFFT_COLLISION],[],[Define if type "off_t" is a typedef of another type for which String already has a constructor]) |
| 324 |
]) |
| 325 |
|
| 326 |
# by default, we do not need the content scanner list or config directories, nor the download manager list directory |
| 327 |
cslists=false |
| 328 |
csconfigs=false |
| 329 |
dmlists=false |
| 330 |
|
| 331 |
# asking user if they want clamd support |
| 332 |
AC_MSG_CHECKING(for clamd support) |
| 333 |
AC_ARG_ENABLE( |
| 334 |
clamd, |
| 335 |
[AS_HELP_STRING([--enable-clamd@<:@=no@:>@],[Enable support for the ClamD content scanner])], |
| 336 |
[ if test "x$enableval" = "xno"; then |
| 337 |
AC_MSG_RESULT(no) |
| 338 |
clamd=false |
| 339 |
CLAMDSUPPORT="!! Not compiled !! " |
| 340 |
else |
| 341 |
AC_MSG_RESULT(yes) |
| 342 |
clamd=true |
| 343 |
cslists=true |
| 344 |
csconfigs=true |
| 345 |
CLAMDSUPPORT="" |
| 346 |
AC_DEFINE([ENABLE_CLAMD],[],[Define to enable ClamD content scanner]) |
| 347 |
fi], |
| 348 |
[ |
| 349 |
AC_MSG_RESULT(no) |
| 350 |
clamd=false |
| 351 |
CLAMDSUPPORT="!! Not compiled !! " |
| 352 |
] |
| 353 |
) |
| 354 |
AM_CONDITIONAL(ENABLE_CLAMD, test "x$clamd" = "xtrue") |
| 355 |
AC_SUBST(CLAMDSUPPORT) |
| 356 |
|
| 357 |
# asking user if they want avastd support |
| 358 |
AC_MSG_CHECKING(for avastd support) |
| 359 |
AC_ARG_ENABLE( |
| 360 |
avastd, |
| 361 |
[AS_HELP_STRING([--enable-avastd@<:@=no@:>@],[Enable support for the AvastD content scanner])], |
| 362 |
[ if test "x$enableval" = "xno"; then |
| 363 |
AC_MSG_RESULT(no) |
| 364 |
avastd=false |
| 365 |
AVASTDSUPPORT="!! Not compiled !! " |
| 366 |
else |
| 367 |
AC_MSG_RESULT(yes) |
| 368 |
avastd=true |
| 369 |
cslists=true |
| 370 |
csconfigs=true |
| 371 |
AVASTDSUPPORT="" |
| 372 |
AC_DEFINE([ENABLE_AVASTD],[],[Define to enable AvastD content scanner]) |
| 373 |
fi], |
| 374 |
[ |
| 375 |
AC_MSG_RESULT(no) |
| 376 |
avastd=false |
| 377 |
AVASTDSUPPORT="!! Not compiled !! " |
| 378 |
] |
| 379 |
) |
| 380 |
AM_CONDITIONAL(ENABLE_AVASTD, test "x$avastd" = "xtrue") |
| 381 |
AC_SUBST(AVASTDSUPPORT) |
| 382 |
|
| 383 |
# asking user if they want icap support |
| 384 |
AC_MSG_CHECKING(for icap support) |
| 385 |
AC_ARG_ENABLE( |
| 386 |
icap, |
| 387 |
[AS_HELP_STRING([--enable-icap@<:@=no@:>@],[Enable support for ICAP AV server content scanner])], |
| 388 |
[ if test "x$enableval" = "xno"; then |
| 389 |
AC_MSG_RESULT(no) |
| 390 |
icap=false |
| 391 |
ICAPSUPPORT="!! Not compiled !! " |
| 392 |
else |
| 393 |
AC_MSG_RESULT(yes) |
| 394 |
icap=true |
| 395 |
cslists=true |
| 396 |
csconfigs=true |
| 397 |
AC_DEFINE([ENABLE_ICAP],[],[Define to enable ICAP content scanner]) |
| 398 |
ICAPSUPPORT="" |
| 399 |
fi], |
| 400 |
[ |
| 401 |
AC_MSG_RESULT(no) |
| 402 |
icap=false |
| 403 |
ICAPSUPPORT="!! Not compiled !! " |
| 404 |
] |
| 405 |
) |
| 406 |
AM_CONDITIONAL(ENABLE_ICAP, test "x$icap" = "xtrue") |
| 407 |
AC_SUBST(ICAPSUPPORT) |
| 408 |
|
| 409 |
# asking user if they want kavd support |
| 410 |
AC_MSG_CHECKING(for kavd support) |
| 411 |
AC_ARG_ENABLE( |
| 412 |
kavd, |
| 413 |
[AS_HELP_STRING([--enable-kavd@<:@=no@:>@],[Enable support for the Kaspersky AV daemon content scanner])], |
| 414 |
[ if test "x$enableval" = "xno"; then |
| 415 |
AC_MSG_RESULT(no) |
| 416 |
kavd=false |
| 417 |
KAVDSUPPORT="!! Not compiled !! " |
| 418 |
else |
| 419 |
AC_MSG_RESULT(yes) |
| 420 |
kavd=true |
| 421 |
cslists=true |
| 422 |
csconfigs=true |
| 423 |
KAVDSUPPORT="" |
| 424 |
AC_DEFINE([ENABLE_KAVD],[],[Define to enable KAVD content scanner]) |
| 425 |
fi], |
| 426 |
[ |
| 427 |
AC_MSG_RESULT(no) |
| 428 |
kavd=false |
| 429 |
KAVDSUPPORT="!! Not compiled !! " |
| 430 |
] |
| 431 |
) |
| 432 |
AM_CONDITIONAL(ENABLE_KAVD, test "x$kavd" = "xtrue") |
| 433 |
AC_SUBST(KAVDSUPPORT) |
| 434 |
|
| 435 |
# asking user if they want command-line content scanner support |
| 436 |
AC_MSG_CHECKING(for command-line content scanner support) |
| 437 |
AC_ARG_ENABLE( |
| 438 |
commandline, |
| 439 |
[AS_HELP_STRING([--enable-commandline@<:@=no@:>@],[Enable support for command-line content scanners])], |
| 440 |
[ if test "x$enableval" = "xno"; then |
| 441 |
AC_MSG_RESULT(no) |
| 442 |
commandline=false |
| 443 |
COMMANDLINESUPPORT="!! Not compiled !! " |
| 444 |
else |
| 445 |
AC_MSG_RESULT(yes) |
| 446 |
commandline=true |
| 447 |
cslists=true |
| 448 |
csconfigs=true |
| 449 |
COMMANDLINESUPPORT="" |
| 450 |
AC_DEFINE([ENABLE_COMMANDLINE],[],[Define to enable command-line content scanner]) |
| 451 |
fi], |
| 452 |
[ |
| 453 |
AC_MSG_RESULT(no) |
| 454 |
commandline=false |
| 455 |
COMMANDLINESUPPORT="!! Not compiled !! " |
| 456 |
]) |
| 457 |
AM_CONDITIONAL(ENABLE_COMMANDLINE, test "x$commandline" = "xtrue") |
| 458 |
AC_SUBST(COMMANDLINESUPPORT) |
| 459 |
|
| 460 |
# install CS configs and lists if necessary |
| 461 |
AM_CONDITIONAL(NEED_CSLISTS, test "x$cslists" = "xtrue") |
| 462 |
AM_CONDITIONAL(NEED_CSCONFIGS, test "x$csconfigs" = "xtrue") |
| 463 |
|
| 464 |
# install DM lists if necessary |
| 465 |
AM_CONDITIONAL(NEED_DMLISTS, test "x$dmlists" = "xtrue") |
| 466 |
|
| 467 |
# openssl now compiled by default |
| 468 |
PKG_CHECK_MODULES([OPENSSL],[ openssl >= 1.0.1]) |
| 469 |
CXXFLAGS="${CXXFLAGS} ${OPENSSL_CFLAGS}" |
| 470 |
LIBS="${LIBS} ${OPENSSL_LIBS}" |
| 471 |
|
| 472 |
# asking user if they want DNS auth support |
| 473 |
AC_MSG_CHECKING(for DNS support) |
| 474 |
AC_ARG_ENABLE( |
| 475 |
dnsauth, |
| 476 |
[AS_HELP_STRING([--enable-dnsauth@<:@=no@:>@],[Enable support for the DNS auth plugin])], |
| 477 |
[ if test "x$enableval" = "xno"; then |
| 478 |
AC_MSG_RESULT(no) |
| 479 |
dnsauth=false |
| 480 |
DNSAUTHSUPPORT="!! Not compiled !! " |
| 481 |
else |
| 482 |
AC_MSG_RESULT(yes) |
| 483 |
dnsauth=true |
| 484 |
DNSAUTHSUPPORT="" |
| 485 |
LIBS="${LIBS} -lresolv" |
| 486 |
AC_DEFINE([PRT_DNSAUTH],[],[Define to enable DNS auth plugin]) |
| 487 |
fi], |
| 488 |
[ |
| 489 |
AC_MSG_RESULT(no) |
| 490 |
dnsauth=false |
| 491 |
DNSAUTHSUPPORT="!! Not compiled !! " |
| 492 |
] |
| 493 |
) |
| 494 |
AM_CONDITIONAL(PRT_DNSAUTH, test "x$dnsauth" = "xtrue") |
| 495 |
AC_SUBST(DNSAUTHSUPPORT) |
| 496 |
|
| 497 |
|
| 498 |
# asking the user if they want email notifications |
| 499 |
AC_MSG_CHECKING(for email notification support) |
| 500 |
AC_ARG_ENABLE( |
| 501 |
email, |
| 502 |
[AS_HELP_STRING([--enable-email@<:@=no@:>@],[Enable support for email reporting functionality])], |
| 503 |
[ if test "x$enableval" = "xyes"; then |
| 504 |
email=true |
| 505 |
EMAILSUPPORT="" |
| 506 |
AC_MSG_RESULT(yes) |
| 507 |
AC_DEFINE([ENABLE_EMAIL],[],[Define to enable email reporting]) |
| 508 |
else |
| 509 |
email=false |
| 510 |
EMAILSUPPORT="#!! Not compiled !!" |
| 511 |
AC_MSG_RESULT(no) |
| 512 |
fi], |
| 513 |
[ |
| 514 |
email=false |
| 515 |
EMAILSUPPORT="#!! Not compiled !!" |
| 516 |
AC_MSG_RESULT(no) |
| 517 |
]) |
| 518 |
AC_SUBST(EMAILSUPPORT) |
| 519 |
|
| 520 |
AC_DEFINE_UNQUOTED([E2_CONFIGURE_OPTIONS], ["$ac_configure_args"], [Record configure-time options]) |
| 521 |
|
| 522 |
libdir="${libdir}/${PACKAGE_NAME}" |
| 523 |
|
| 524 |
AC_ARG_WITH(sysconfsubdir, |
| 525 |
[AS_HELP_STRING([--with-sysconfsubdir@<:@=e2guardian@:>@],[subdirectory under sysconfdir in which to place config files])], |
| 526 |
[if test "x$withval" != "x"; then |
| 527 |
e2sysconfdir="${sysconfdir}/${withval}" |
| 528 |
else |
| 529 |
e2sysconfdir="${sysconfdir}" |
| 530 |
fi], |
| 531 |
[e2sysconfdir="${sysconfdir}/${PACKAGE_NAME}"]) |
| 532 |
|
| 533 |
AC_FINALIZE_VAR(E2LIBDIR,"${libdir}") |
| 534 |
AC_SUBST(E2LIBDIR) |
| 535 |
AC_FINALIZE_VAR(E2BINDIR,"${sbindir}") |
| 536 |
AC_SUBST(E2BINDIR) |
| 537 |
AC_FINALIZE_VAR(E2CONFDIR,"${e2sysconfdir}") |
| 538 |
AC_SUBST(E2CONFDIR) |
| 539 |
AC_FINALIZE_VAR(E2DATADIR,"${datadir}/${PACKAGE_NAME}") |
| 540 |
AC_SUBST(E2DATADIR) |
| 541 |
AC_FINALIZE_VAR(E2CONFFILE,"${e2sysconfdir}/${PACKAGE_NAME}.conf") |
| 542 |
AC_SUBST(E2CONFFILE) |
| 543 |
#AC_DEFINE_UNQUOTED(__CONFDIR,"${e2sysconfdir}","") |
| 544 |
AC_DEFINE_UNQUOTED([__DATADIR],["${E2DATADIR}"],["Data directory path"]) |
| 545 |
AC_DEFINE_UNQUOTED(__CONFFILE,"${e2sysconfdir}/${PACKAGE_NAME}.conf","Configure file path") |
| 546 |
|
| 547 |
AC_CONFIG_FILES([Makefile |
| 548 |
data/Makefile |
| 549 |
data/languages/Makefile |
| 550 |
data/scripts/Makefile |
| 551 |
data/scripts/bsd-init |
| 552 |
data/scripts/e2guardian |
| 553 |
data/scripts/logrotation |
| 554 |
data/scripts/solaris-init |
| 555 |
data/scripts/systemv-init |
| 556 |
data/scripts/e2guardian.service |
| 557 |
doc/Makefile |
| 558 |
configs/e2guardian.conf |
| 559 |
configs/e2guardianf1.conf |
| 560 |
configs/examplef1.story |
| 561 |
configs/Makefile |
| 562 |
configs/lists/Makefile |
| 563 |
configs/lists/common/Makefile |
| 564 |
configs/lists/example.group/Makefile |
| 565 |
configs/lists/phraselists/Makefile |
| 566 |
configs/lists/oldphraselists/Makefile |
| 567 |
configs/lists/rooms/Makefile |
| 568 |
configs/lists/contentscanners/Makefile |
| 569 |
configs/lists/example.group/bannedphraselist |
| 570 |
configs/lists/example.group/oldbannedphraselist |
| 571 |
configs/lists/example.group/bannedurllist |
| 572 |
configs/lists/example.group/bannedsitelist |
| 573 |
configs/lists/example.group/domainsnobypass |
| 574 |
configs/lists/example.group/urlnobypass |
| 575 |
configs/lists/example.group/exceptionphraselist |
| 576 |
configs/lists/example.group/weightedphraselist |
| 577 |
configs/lists/example.group/oldexceptionphraselist |
| 578 |
configs/lists/example.group/oldweightedphraselist |
| 579 |
configs/downloadmanagers/Makefile |
| 580 |
configs/downloadmanagers/default.conf |
| 581 |
configs/contentscanners/Makefile |
| 582 |
configs/contentscanners/clamdscan.conf |
| 583 |
configs/contentscanners/avastdscan.conf |
| 584 |
configs/contentscanners/icapscan.conf |
| 585 |
configs/contentscanners/kavdscan.conf |
| 586 |
configs/contentscanners/commandlinescan.conf |
| 587 |
configs/authplugins/Makefile |
| 588 |
configs/lists/authplugins/Makefile |
| 589 |
configs/lists/downloadmanagers/Makefile |
| 590 |
src/Makefile |
| 591 |
]) |
| 592 |
|
| 593 |
AC_OUTPUT |
| 594 |
|