dnl Copyright (C) 2013-2019 Cisco Systems, Inc. and/or its affiliates. All rights reserved. dnl Copyright (C) 2007-2013 Sourcefire, Inc. dnl Copyright (C) 2002-2007 Tomasz Kojm dnl socklen_t check (c) Alexander V. Lukyanov 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 dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, dnl MA 02110-1301, USA. AC_PREREQ([2.59]) dnl For a release change [devel] to the real version [0.xy] dnl also change VERSION below AC_INIT([ClamAV], [0.102.0-beta], [https://bugzilla.clamav.net/], [clamav], [https://www.clamav.net/]) dnl put configure auxiliary into config AC_CONFIG_AUX_DIR([config]) dnl put configure auxiliary into config AC_CONFIG_AUX_DIR([config]) dnl enable C++ AC_PROG_CXX() AH_BOTTOM([#include "platform.h"]) AC_CONFIG_HEADERS([clamav-config.h libclammspack/config.h:libclammspack/config.h.in]) dnl safety check, this used to be a parameter to AC_INIT AC_CONFIG_SRCDIR([clamscan/clamscan.c]) AC_CONFIG_MACRO_DIR([m4]) AC_CREATE_TARGET_H([target.h]) dnl -Wall and -Werror here are NOT CFLAGS, they refer to automake warnings dnl enable stealth builds and psychedelic tests AM_INIT_AUTOMAKE([1.11 -Wall -Wportability -Wno-override std-options foreign dist-bzip2 no-define color-tests parallel-tests tar-ustar]) AM_SILENT_RULES([yes]) m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) dnl we told automake to not define these, since we want to include dnl the date in the version AC_DEFINE([PACKAGE], PACKAGE_NAME, [Name of package]) AC_USE_SYSTEM_EXTENSIONS m4_include([m4/reorganization/version.m4]) LT_CONFIG_LTDL_DIR([libltdl]) LT_INIT([dlopen disable-static]) LTDL_INIT([recursive]) PKG_PROG_PKG_CONFIG(0.16) m4_include([m4/reorganization/build_tools.m4]) m4_include([m4/reorganization/headers.m4]) AC_CONFIG_FILES([libltdl/Makefile]) AC_DEFINE([SCANBUFF], 131072, [scan buffer size]) AC_DEFINE([FILEBUFF], 8192, [file i/o buffer size]) m4_include([m4/reorganization/c_options.m4]) m4_include([m4/reorganization/compiler_checks.m4]) m4_include([m4/reorganization/linker_checks.m4]) AC_ARG_ENABLE([experimental], [AS_HELP_STRING([--enable-experimental], [enable experimental code])], enable_experimental=$enableval, enable_experimental="no") if test "$enable_experimental" = "yes"; then AC_DEFINE([CL_EXPERIMENTAL],1,[enable experimental code]) VERSION_SUFFIX="$VERSION_SUFFIX-exp" fi build_configure_args=`echo "$ac_configure_args" | sed -e 's/[\"]//g'` AC_SUBST([BUILD_CONFIGURE_FLAGS], [$build_configure_args]) m4_include([m4/reorganization/code_checks/fuzz.m4]) 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]) dnl libclamav dependencies m4_include([m4/reorganization/libs/xml.m4]) m4_include([m4/reorganization/libs/openssl.m4]) m4_include([m4/reorganization/libs/json.m4]) m4_include([m4/reorganization/libs/pcre.m4]) m4_include([m4/reorganization/libs/libmspack.m4]) if test "x$use_internal_mspack" = "xno"; then mspack_msg="External, $LIBMSPACK_CFLAGS $LIBMSPACK_LIBS" fi AM_MAINTAINER_MODE m4_include([m4/reorganization/libs/libz.m4]) m4_include([m4/reorganization/libs/bzip.m4]) m4_include([m4/reorganization/libs/unrar.m4]) m4_include([m4/reorganization/libs/systemd.m4]) 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/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]) m4_include([m4/reorganization/yara.m4]) m4_include([m4/reorganization/code_checks/fts.m4]) m4_include([m4/reorganization/prelude.m4]) m4_include([m4/reorganization/bsd.m4]) dnl Clamonacc loading m4_include([m4/reorganization/clamonacc.m4]) dnl Freshclam dependencies m4_include([m4/reorganization/libs/curl.m4]) m4_include([m4/reorganization/substitutions.m4]) m4_include([m4/reorganization/strni.m4]) if test "x$use_internal_mspack" = "xyes"; then mspack_msg="Internal" AC_SYS_LARGEFILE else mspack_msg="External, $LIBMSPACK_CFLAGS $LIBMSPACK_LIBS" fi dnl Enable Objective-C, needed for macOS, may not be inside conditional. AC_PROG_OBJC dnl Detect the target system build_linux=no build_windows=no build_mac=no case "${host_os}" in cygwin*|mingw*) build_windows=yes ;; darwin*) build_mac=yes ;; *) build_linux=yes ;; esac AM_CONDITIONAL([LINUX], [test "$build_linux" = "yes"]) AM_CONDITIONAL([WINDOWS], [test "$build_windows" = "yes"]) AM_CONDITIONAL([MACOS], [test "$build_mac" = "yes"]) AC_CONFIG_FILES([ clamscan/Makefile database/Makefile docs/Makefile clamd/Makefile clamd/clamav-daemon.service clamd/clamav-daemon.socket clamdscan/Makefile clamsubmit/Makefile clamav-milter/Makefile freshclam/clamav-freshclam.service freshclam/Makefile sigtool/Makefile clamconf/Makefile etc/Makefile test/Makefile unit_tests/Makefile fuzz/Makefile clamdtop/Makefile clambc/Makefile libfreshclam/Makefile Makefile clamav-config libclamav.pc platform.h docs/man/clamav-milter.8 docs/man/clamav-milter.conf.5 docs/man/clambc.1 docs/man/clamconf.1 docs/man/clamd.8 docs/man/clamd.conf.5 docs/man/clamdscan.1 docs/man/clamscan.1 docs/man/freshclam.1 docs/man/freshclam.conf.5 docs/man/sigtool.1 docs/man/clamdtop.1 docs/man/clamsubmit.1 clamav-types.h ]) AM_COND_IF([BUILD_CLAMONACC], [AC_CONFIG_FILES([clamonacc/Makefile])]) # Define variables needed to generate clamav-types.h. m4_include([m4/reorganization/types.m4]) AC_OUTPUT if test "$enable_llvm" = "yes" && test "$subdirfailed" != "no"; then AC_MSG_ERROR([Failed to configure LLVM, and LLVM was explicitly requested]) fi if test "$enable_llvm" = "auto" && test "$subdirfailed" != "no"; then system_llvm="MIA" llvm_linking="" fi AM_CONDITIONAL([ENABLE_LLVM], [test "$subdirfailed" != "yes" && test "$enable_llvm" != "no"]) AM_CONDITIONAL([ENABLE_YARA], [test "$enable_yara" != "no"]) AM_CONDITIONAL([ENABLE_CLAMSUBMIT], [test "X$have_curl" = "Xyes" && test "X$have_json" = "Xyes"]) no_recursion="yes"; AC_OUTPUT([libclamav/Makefile]) # Print a summary of what features we enabled AC_MSG_NOTICE([Summary of detected features follows]) cat <