f51e962f |
dnl Copyright (C) 2002 - 2006 Tomasz Kojm <tkojm@clamav.net> |
15fbe96f |
dnl readdir_r checks (c) COPYRIGHT MIT 1995 |
4c8f2d76 |
dnl socklen_t check (c) Alexander V. Lukyanov <lav@yars.free.net> |
28e73e95 |
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software |
48b7b4a7 |
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
dnl MA 02110-1301, USA. |
28e73e95 |
|
28241733 |
AC_PREREQ([2.59]) |
4c56bffa |
dnl For a release change [devel] to the real version [0.xy]
dnl also change VERSION below |
f19d260a |
AC_INIT([ClamAV], [devel], [http://bugs.clamav.net/], [clamav], [http://www.clamav.net/]) |
4c56bffa |
|
be4bf7f4 |
AH_BOTTOM([#include "platform.h"]) |
4c56bffa |
dnl put configure auxiliary into config |
6053d09a |
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_HEADER([clamav-config.h]) |
4c56bffa |
dnl safety check, this used to be a parameter to AC_INIT
AC_CONFIG_SRCDIR([clamscan/clamscan.c]) |
6053d09a |
AC_CONFIG_MACRO_DIR([m4])
AC_CREATE_TARGET_H([target.h]) |
4c56bffa |
dnl -Wall and -Werror here are NOT CFLAGS, they refer to automake warnings |
295f1d1f |
dnl enable stealth builds and psychedelic tests |
f2571e34 |
AM_INIT_AUTOMAKE([1.11 -Wall -Wportability -Wno-override std-options foreign dist-bzip2 no-define color-tests parallel-tests tar-ustar]) |
295f1d1f |
AM_SILENT_RULES([yes]) |
4c56bffa |
dnl we told automake to not define these, since we want to include
dnl the date in the version |
28241733 |
AC_DEFINE([PACKAGE], PACKAGE_NAME, [Name of package]) |
a3962a62 |
AC_USE_SYSTEM_EXTENSIONS |
4c56bffa |
|
9a022125 |
m4_include([m4/reorganization/version.m4]) |
a0e5e844 |
|
094104a7 |
LT_CONFIG_LTDL_DIR([libltdl]) |
48b79163 |
LT_INIT([dlopen disable-static]) |
094104a7 |
LTDL_INIT([recursive]) |
9a022125 |
m4_include([m4/reorganization/build_tools.m4])
m4_include([m4/reorganization/headers.m4])
|
094104a7 |
AC_CONFIG_FILES([libltdl/Makefile]) |
28e73e95 |
|
28241733 |
AC_DEFINE([SCANBUFF], 131072, [scan buffer size])
AC_DEFINE([FILEBUFF], 8192, [file i/o buffer size]) |
28e73e95 |
|
9a022125 |
m4_include([m4/reorganization/c_options.m4])
m4_include([m4/reorganization/compiler_checks.m4])
m4_include([m4/reorganization/linker_checks.m4]) |
02c1afff |
|
28241733 |
AC_ARG_ENABLE([experimental], |
5e395b1f |
[AS_HELP_STRING([--enable-experimental], [enable experimental code])], |
71dd1750 |
enable_experimental=$enableval, enable_experimental="no")
if test "$enable_experimental" = "yes"; then |
28241733 |
AC_DEFINE([CL_EXPERIMENTAL],1,[enable experimental code]) |
b105842c |
VERSION_SUFFIX="$VERSION_SUFFIX-exp" |
71dd1750 |
fi
|
9b2f14fa |
build_configure_args=`echo "$ac_configure_args" | sed -e 's/[\"]//g'`
AC_SUBST([BUILD_CONFIGURE_FLAGS], [$build_configure_args])
|
9a022125 |
m4_include([m4/reorganization/code_checks/functions.m4])
m4_include([m4/reorganization/code_checks/mpool.m4])
m4_include([m4/reorganization/code_checks/unit_tests.m4])
m4_include([m4/reorganization/code_checks/coverage.m4]) |
28e73e95 |
|
70ab826f |
dnl libclamav dependencies
m4_include([m4/reorganization/libs/xml.m4])
m4_include([m4/reorganization/libs/openssl.m4]) |
e56f0949 |
m4_include([m4/reorganization/libs/json.m4]) |
d9a7c276 |
m4_include([m4/reorganization/libs/pcre.m4]) |
70ab826f |
|
6c7dbf7d |
AM_MAINTAINER_MODE |
9a022125 |
m4_include([m4/reorganization/libs/libz.m4])
m4_include([m4/reorganization/libs/bzip.m4])
m4_include([m4/reorganization/libs/unrar.m4]) |
b68375fd |
m4_include([m4/reorganization/libs/systemd.m4]) |
9a022125 |
m4_include([m4/reorganization/code_checks/ipv6.m4])
m4_include([m4/reorganization/code_checks/dns.m4])
m4_include([m4/reorganization/code_checks/fanotify.m4])
m4_include([m4/reorganization/code_checks/setpgrp.m4])
m4_include([m4/reorganization/milter/enable.m4])
m4_include([m4/reorganization/code_checks/iconv.m4])
m4_include([m4/reorganization/code_checks/pthreads.m4])
m4_include([m4/reorganization/code_checks/reentrant.m4])
m4_include([m4/reorganization/utility_checks/id.m4])
m4_include([m4/reorganization/utility_checks/yp.m4])
m4_include([m4/reorganization/usergroup.m4])
m4_include([m4/reorganization/debug.m4])
m4_include([m4/reorganization/customversion.m4])
m4_include([m4/reorganization/nocache.m4])
m4_include([m4/reorganization/dns.m4])
m4_include([m4/reorganization/bigstack.m4])
m4_include([m4/reorganization/dbdir.m4])
m4_include([m4/reorganization/cfgdir.m4])
m4_include([m4/reorganization/code_checks/in_port_t.m4])
m4_include([m4/reorganization/code_checks/in_addr_t.m4])
m4_include([m4/reorganization/os_checks.m4])
m4_include([m4/reorganization/milter/check.m4])
m4_include([m4/reorganization/code_checks/pthread_02.m4])
m4_include([m4/reorganization/code_checks/readdir.m4])
m4_include([m4/reorganization/code_checks/ctime.m4])
m4_include([m4/reorganization/code_checks/socklen_t.m4])
m4_include([m4/reorganization/clamav_user.m4])
m4_include([m4/reorganization/code_checks/compiler_attribs.m4])
m4_include([m4/reorganization/code_checks/select.m4])
m4_include([m4/reorganization/code_checks/stat64.m4])
m4_include([m4/reorganization/code_checks/shift.m4])
m4_include([m4/reorganization/code_checks/features.m4])
m4_include([m4/reorganization/clamdtop.m4])
m4_include([m4/reorganization/distcheck.m4])
m4_include([m4/reorganization/llvm.m4])
m4_include([m4/reorganization/sha_collect.m4]) |
baeb6253 |
m4_include([m4/reorganization/yara.m4]) |
ae83ce21 |
m4_include([m4/reorganization/libfreshclam.m4]) |
9a022125 |
|
f4265a5a |
m4_include([m4/reorganization/prelude.m4])
|
9a022125 |
m4_include([m4/reorganization/bsd.m4])
dnl Freshclam dependencies
m4_include([m4/reorganization/libs/curl.m4]) |
b2e7c931 |
|
9a022125 |
m4_include([m4/reorganization/substitutions.m4]) |
16b28d07 |
|
0da5ca02 |
m4_include([m4/reorganization/libmspack.m4]) |
d3699d57 |
if test "x$use_internal_mspack" = "xyes"; then |
0da5ca02 |
mspack_msg="Internal"
AC_CONFIG_SUBDIRS([libclamav/libmspack-0.5alpha]) |
d3699d57 |
else |
0da5ca02 |
mspack_msg="External, $LIBMSPACK_CFLAGS $LIBMSPACK_LIBS" |
d3699d57 |
fi
|
9a022125 |
AC_CONFIG_FILES([ |
28e73e95 |
clamscan/Makefile
database/Makefile
docs/Makefile
clamd/Makefile |
b68375fd |
clamd/clamav-daemon.service
clamd/clamav-daemon.socket |
28e73e95 |
clamdscan/Makefile |
9a022125 |
clamsubmit/Makefile |
28e73e95 |
clamav-milter/Makefile |
b68375fd |
freshclam/clamav-freshclam.service |
28e73e95 |
freshclam/Makefile
sigtool/Makefile |
dc4f2ce8 |
clamconf/Makefile |
28e73e95 |
etc/Makefile |
ace28304 |
test/Makefile |
fe473bcb |
unit_tests/Makefile |
8db0a346 |
clamdtop/Makefile |
997a1efe |
clambc/Makefile |
5ed00445 |
libfreshclam/Makefile |
28e73e95 |
Makefile |
9f51cb51 |
clamav-config
libclamav.pc |
f0942811 |
platform.h |
a39ae468 |
docs/man/clamav-milter.8 |
3ba20396 |
docs/man/clamav-milter.conf.5 |
0e34854a |
docs/man/clambc.1 |
a39ae468 |
docs/man/clamconf.1 |
8600c7eb |
docs/man/clamd.8
docs/man/clamd.conf.5 |
a39ae468 |
docs/man/clamdscan.1
docs/man/clamscan.1 |
8600c7eb |
docs/man/freshclam.1
docs/man/freshclam.conf.5 |
a39ae468 |
docs/man/sigtool.1 |
8db0a346 |
docs/man/clamdtop.1 |
38ccc5b0 |
docs/man/clamsubmit.1 |
28e73e95 |
]) |
c528900f |
|
9a022125 |
AC_OUTPUT
|
29227461 |
if test "$enable_llvm" = "yes" && test "$subdirfailed" != "no"; then
AC_MSG_ERROR([Failed to configure LLVM, and LLVM was explicitly requested])
fi |
08db1743 |
if test "$enable_llvm" = "auto" && test "$subdirfailed" != "no"; then
system_llvm="MIA"
llvm_linking=""
fi
|
2c7d5adc |
AM_CONDITIONAL([ENABLE_LLVM], |
b1ac5f59 |
[test "$subdirfailed" != "yes" && test "$enable_llvm" != "no"]) |
baeb6253 |
AM_CONDITIONAL([ENABLE_YARA],
[test "$enable_yara" != "no"]) |
c5470ab8 |
AM_CONDITIONAL([ENABLE_CLAMSUBMIT],
[test "X$have_curl" = "Xyes" && test "X$have_json" = "Xyes"]) |
2c7d5adc |
no_recursion="yes"; |
baeb6253 |
|
2c7d5adc |
AC_OUTPUT([libclamav/Makefile])
|
fdb7b9e9 |
# Print a summary of what features we enabled
AC_MSG_NOTICE([Summary of detected features follows])
cat <<EOF
OS : $target_os
pthreads : $have_pthreads ($THREAD_LIBS)
EOF
|
5bc25673 |
AC_MSG_NOTICE([Summary of miscellaneous features]) |
86cec97d |
if test "x$CHECK_LIBS" = "x"; then
check_libs="no"
else
check_libs="$CHECK_LIBS"
fi
CL_MSG_STATUS([check ],[$check_libs],[$enable_check_ut]) |
de1271a1 |
CL_MSG_STATUS([fanotify ],[$want_fanotify],[$want_fanotify]) |
fdb7b9e9 |
if test "x$ac_cv_have_control_in_msghdr" = "xyes"; then
CL_MSG_STATUS([fdpassing ],[$have_fdpass],[$want_fdpassing])
else
CL_MSG_STATUS([fdpassing ],[n/a],[])
fi
CL_MSG_STATUS([IPv6 ],[$have_cv_ipv6],[$want_ipv6])
AC_MSG_NOTICE([Summary of optional tools])
CL_MSG_STATUS([clamdtop ],[$CURSES_LIBS],[$enable_clamdtop])
CL_MSG_STATUS([milter ],[yes],[$have_milter]) |
c5470ab8 |
if test "X$have_curl" = "Xyes" && test "X$have_json" = "Xyes"; then
CL_MSG_STATUS([clamsubmit ], [yes], [yes])
else
CL_MSG_STATUS([clamsubmit ], [no], [no])
fi |
fdb7b9e9 |
|
5bc25673 |
AC_MSG_NOTICE([Summary of engine performance features]) |
fdb7b9e9 |
if test "x$enable_debug" = "xyes"; then
CL_MSG_STATUS([release mode],[no],[debug build]) |
16a94a51 |
else
CL_MSG_STATUS([release mode],[yes],[yes]) |
fdb7b9e9 |
fi |
4311fe44 |
have_jit="no" |
fdb7b9e9 |
if test "$subdirfailed" = "no"; then |
4311fe44 |
have_jit="yes" |
fdb7b9e9 |
fi |
1d9f629f |
if test "$enable_llvm" = "no"; then
CL_MSG_STATUS([llvm ],[$have_jit],[$enable_llvm])
elif test "x$llvm_linking" = "x"; then
CL_MSG_STATUS([llvm ],[$have_jit($llvmver), from $system_llvm],[$enable_llvm]) |
08db1743 |
else |
1d9f629f |
CL_MSG_STATUS([llvm ],[$have_jit($llvmver), from $system_llvm ($llvm_linking)],[$enable_llvm]) |
08db1743 |
fi |
fdb7b9e9 |
CL_MSG_STATUS([mempool ],[$have_mempool],[$enable_mempool])
AC_MSG_NOTICE([Summary of engine detection features]) |
fcd80914 |
CL_MSG_STATUS([bzip2 ],[$bzip_check],[$want_bzip2]) |
fdb7b9e9 |
CL_MSG_STATUS([zlib ],[$ZLIB_HOME],[yes])
CL_MSG_STATUS([unrar ],[$want_unrar],[$want_unrar]) |
d9a7c276 |
if test "x$LIBJSON_HOME" != "x"; then |
690af59a |
CL_MSG_STATUS([libjson ],[$LIBJSON_HOME],[$have_json]) |
d9a7c276 |
fi
if test "x$PCRE_HOME" = "x"; then
CL_MSG_STATUS([pcre ],[no],[$have_pcre])
else
CL_MSG_STATUS([pcre ],[$PCRE_HOME],[$have_pcre])
fi |
d3699d57 |
CL_MSG_STATUS([preclass ],[$LIBJSON_HOME],[$have_json])
CL_MSG_STATUS([libmspack ],[yes],[$mspack_msg]) |
9a022125 |
if test "x$XML_LIBS" = "x"; then |
1548d5de |
CL_MSG_STATUS([libxml2 ],[no],[]) |
217295cc |
else |
1548d5de |
CL_MSG_STATUS([libxml2 ],[yes, from $XML_HOME],[]) |
217295cc |
fi |
baeb6253 |
CL_MSG_STATUS([yara ],[$enable_yara],[$enable_yara]) |
fdb7b9e9 |
|
b105842c |
# Yep, downgrading the compiler avoids the bug too:
# 4.0.x, and 4.1.0 are the known buggy versions
# 3.4 doesn't have the bug
if test "x$gcc_check" != "xyes"; then
AC_MSG_WARN([
****** Optimizations disabled to avoid compiler bugs
****** The resulting binaries will be slow!
****** It is recommended to either upgrade or downgrade your compiler
])
fi
|
fcd80914 |
if test "x$cross_compiling" != "xno" || test "x$gcc_check" != "xyes" || test "x$zlib_check" = "xno" || test "x$bzip_check" != "xok" ; then |
c528900f |
AC_MSG_WARN([
****** WARNING: |
fcd80914 |
****** You are cross compiling to a different host or you are
****** linking to bugged system libraries or you have manually
****** disabled important configure checks. |
c528900f |
****** Please be aware that this build may be badly broken.
****** DO NOT REPORT BUGS BASED ON THIS BUILD !!!
])
fi
|