ClamAV - Documentation is here: https://docs.clamav.net https://www.clamav.net/
Find a file
Micah Snyder (micasnyd) 9e20cdf6ea Add CMake build tooling
This patch adds experimental-quality CMake build tooling.

The libmspack build required a modification to use "" instead of <> for
header #includes. This will hopefully be included in the libmspack
upstream project when adding CMake build tooling to libmspack.

Removed use of libltdl when using CMake.

Flex & Bison are now required to build.

If -DMAINTAINER_MODE, then GPERF is also required, though it currently
doesn't actually do anything.  TODO!

I found that the autotools build system was generating the lexer output
but not actually compiling it, instead using previously generated (and
manually renamed) lexer c source. As a consequence, changes to the .l
and .y files weren't making it into the build. To resolve this, I
removed generated flex/bison files and fixed the tooling to use the
freshly generated files. Flex and bison are now required build tools.
On Windows, this adds a dependency on the winflexbison package,
which can be obtained using Chocolatey or may be manually installed.

CMake tooling only has partial support for building with external LLVM
library, and no support for the internal LLVM (to be removed in the
future). I.e. The CMake build currently only supports the bytecode
interpreter.

Many files used include paths relative to the top source directory or
relative to the current project, rather than relative to each build
target. Modern CMake support requires including internal dependency
headers the same way you would external dependency headers (albeit
with "" instead of <>). This meant correcting all header includes to
be relative to the build targets and not relative to the workspace.

For example, ...

```c
include "../libclamav/clamav.h"
include "clamd/clamd_others.h"
```

... becomes:

```c
// libclamav
include "clamav.h"

// clamd
include "clamd_others.h"
```

Fixes header name conflicts by renaming a few of the files.

Converted the "shared" code into a static library, which depends on
libclamav. The ironically named "shared" static library provides
features common to the ClamAV apps which are not required in
libclamav itself and are not intended for use by downstream projects.
This change was required for correct modern CMake practices but was
also required to use the automake "subdir-objects" option.
This eliminates warnings when running autoreconf which, in the next
version of autoconf & automake are likely to break the build.

libclamav used to build in multiple stages where an earlier stage is
a static library containing utils required by the "shared" code.
Linking clamdscan and clamdtop with this libclamav utils static lib
allowed these two apps to function without libclamav. While this is
nice in theory, the practical gains are minimal and it complicates
the build system. As such, the autotools and CMake tooling was
simplified for improved maintainability and this feature was thrown
out. clamdtop and clamdscan now require libclamav to function.

Removed the nopthreads version of the autotools
libclamav_internal_utils static library and added pthread linking to
a couple apps that may have issues building on some platforms without
it, with the intention of removing needless complexity from the
source. Kept the regular version of libclamav_internal_utils.la
though it is no longer used anywhere but in libclamav.

Added an experimental doxygen build option which attempts to build
clamav.h and libfreshclam doxygen html docs.

The CMake build tooling also may build the example program(s), which
isn't a feature in the Autotools build system.

Changed C standard to C90+ due to inline linking issues with socket.h
when linking libfreshclam.so on Linux.

Generate common.rc for win32.

Fix tabs/spaces in shared Makefile.am, and remove vestigial ifndef
from misc.c.

Add CMake files to the automake dist, so users can try the new
CMake tooling w/out having to build from a git clone.

clamonacc changes:
- Renamed FANOTIFY macro to HAVE_SYS_FANOTIFY_H to better match other
  similar macros.
- Added a new clamav-clamonacc.service systemd unit file, based on
  the work of ChadDevOps & Aaron Brighton.
- Added missing clamonacc man page.

Updates to clamdscan man page, add missing options.

Remove vestigial CL_NOLIBCLAMAV definitions (all apps now use
libclamav).

Rename Windows mspack.dll to libmspack.dll so all ClamAV-built
libraries have the lib-prefix with Visual Studio as with CMake.
2020-08-13 00:25:34 -07:00
clamav-milter Add CMake build tooling 2020-08-13 00:25:34 -07:00
clambc Add CMake build tooling 2020-08-13 00:25:34 -07:00
clamconf Add CMake build tooling 2020-08-13 00:25:34 -07:00
clamd Add CMake build tooling 2020-08-13 00:25:34 -07:00
clamdscan Add CMake build tooling 2020-08-13 00:25:34 -07:00
clamdtop Add CMake build tooling 2020-08-13 00:25:34 -07:00
clamonacc Add CMake build tooling 2020-08-13 00:25:34 -07:00
clamscan Add CMake build tooling 2020-08-13 00:25:34 -07:00
clamsubmit Add CMake build tooling 2020-08-13 00:25:34 -07:00
cmake Add CMake build tooling 2020-08-13 00:25:34 -07:00
config Remove autotools generated files, add autogen.sh 2020-07-17 15:40:32 -07:00
database Remove autotools generated files, add autogen.sh 2020-07-17 15:40:32 -07:00
docs Add CMake build tooling 2020-08-13 00:25:34 -07:00
etc Add CMake build tooling 2020-08-13 00:25:34 -07:00
examples Add CMake build tooling 2020-08-13 00:25:34 -07:00
freshclam Add CMake build tooling 2020-08-13 00:25:34 -07:00
fuzz Add CMake build tooling 2020-08-13 00:25:34 -07:00
libclamav Add CMake build tooling 2020-08-13 00:25:34 -07:00
libclammspack Add CMake build tooling 2020-08-13 00:25:34 -07:00
libclamunrar Add CMake build tooling 2020-08-13 00:25:34 -07:00
libclamunrar_iface Add CMake build tooling 2020-08-13 00:25:34 -07:00
libfreshclam Add CMake build tooling 2020-08-13 00:25:34 -07:00
llvm/lib/Target Merge LLVM upstream r90002 2009-11-27 12:44:52 +02:00
m4 Add CMake build tooling 2020-08-13 00:25:34 -07:00
shared Add CMake build tooling 2020-08-13 00:25:34 -07:00
sigtool Add CMake build tooling 2020-08-13 00:25:34 -07:00
test Remove autotools generated files, add autogen.sh 2020-07-17 15:40:32 -07:00
unit_tests Add CMake build tooling 2020-08-13 00:25:34 -07:00
win32 Add CMake build tooling 2020-08-13 00:25:34 -07:00
.clang-format Formatting touch-up 2020-01-03 15:53:29 -05:00
.gitattributes Add .gitattributes to set ChangeLog merge driver. 2009-07-13 19:47:47 +03:00
.gitignore Remove autotools generated files, add autogen.sh 2020-07-17 15:40:32 -07:00
autogen.sh Remove autotools generated files, add autogen.sh 2020-07-17 15:40:32 -07:00
ChangeLog.md Documentation update and cleanup. Transition to MarkDown files for improved rendering on GitHub.com 2018-03-06 17:43:54 -05:00
clam-format Add CMake build tooling 2020-08-13 00:25:34 -07:00
clamav-config.h.cmake.in Add CMake build tooling 2020-08-13 00:25:34 -07:00
clamav-config.h.in Add CMake build tooling 2020-08-13 00:25:34 -07:00
clamav-config.in remove old CVS-stuff and make the repository look more like SVN 2007-02-17 19:02:20 +00:00
clamav-types.h.in Update copyright dates for 2020 2020-01-03 15:44:07 -05:00
clamav-version.h.in Update copyright dates for 2020 2020-01-03 15:44:07 -05:00
CMakeLists.txt Add CMake build tooling 2020-08-13 00:25:34 -07:00
CMakeOptions.cmake Add CMake build tooling 2020-08-13 00:25:34 -07:00
configure.ac Add CMake build tooling 2020-08-13 00:25:34 -07:00
COPYING Add verbiage regarding linking OpenSSL 2014-04-17 09:29:47 -04:00
COPYING.bzip2 Merging the post0.92 stuff 2007-12-13 19:45:38 +00:00
COPYING.curl clamonacc - changing libcurl config version check for clamonacc to key from curl-config 2019-10-02 16:08:28 -04:00
COPYING.file re-enable text detection (ASCII, UTF8, UTF16) 2008-01-07 14:20:38 +00:00
COPYING.getopt shared, clamconf: drop old stuff; replace getopt.[ch] with my_getopt 2009-01-02 17:04:11 +00:00
COPYING.LGPL re-include RAR code 2007-12-12 21:46:34 +00:00
COPYING.llvm Fix typo, use the correct path for LLVM's LICENSE.TXT. 2010-04-09 14:31:27 +03:00
COPYING.lzma update lzma licence 2009-08-05 23:35:58 +02:00
COPYING.pcre added pcre source for windows build; needs trimming 2015-05-29 17:10:19 -04:00
COPYING.regex COPYING.BSD -> COPYING.regex; add COPYING.sha256 2009-03-01 16:19:45 +00:00
COPYING.unrar re-include RAR code 2007-12-12 21:46:34 +00:00
COPYING.YARA Add licence file COPYING.YARA. 2015-05-01 12:12:59 -04:00
COPYING.zlib revert nsis zlibs 2008-02-14 02:12:13 +00:00
INSTALL.autotools.md Add CMake build tooling 2020-08-13 00:25:34 -07:00
INSTALL.cmake.md Add CMake build tooling 2020-08-13 00:25:34 -07:00
Jenkinsfile Jenkins: Expose branch name for downstream pipelines 2020-06-30 09:27:15 -07:00
libclamav.pc.in Improve pkgconfig. Patch supplied by Andreas Cadhalpun. 2015-09-09 17:58:04 -04:00
Makefile.am Add CMake build tooling 2020-08-13 00:25:34 -07:00
NEWS.md Add CMake build tooling 2020-08-13 00:25:34 -07:00
platform.h.in Add CMake build tooling 2020-08-13 00:25:34 -07:00
README.md Add CMake build tooling 2020-08-13 00:25:34 -07:00
target.h.cmake.in Add CMake build tooling 2020-08-13 00:25:34 -07:00

ClamAV

ClamAV® is an open source antivirus engine for detecting trojans, viruses, malware & other malicious threats.

Documentation & FAQ

Official documentation can be found online at ClamAV.net. Our source code release tarballs also includes a copy of the documentation for offline reading.

ClamAV Signatures

Anyone can learn to read and write ClamAV signatures. Take a look at the signature writing documentation and phishing signature writing documentation to get started!

Installation Instructions

UNIX

Build from Source on Linux/Unix/Mac

For basic compile and install instructions on Linux/Unix platforms, check out the install instructions.

For detailed instructions specific to building ClamAV please investigate our the Linux/Unix/Mac Install instructions in the User Manual.

For instructions on how to build ClamAV using our new experimental CMake build tooling, see INSTALL.cmake.md

Install from a binary package

For binary package distribution installation instructions, head over to our website.

Windows

Build from Source on Windows

The instructions for building ClamAV from source on Windows is located in the Win32 README.

Using an Install Package

We provide an installer to install ClamAV on Windows to "C:\Program Files". This install method will require you to have Adminstrator priveleges.

We also provide a "Portable Install Package" (i.e. a zip of the required files) for users that may wish to run ClamAV without installing it to a system-owned directory.

For details on how to use either option, head over to the Windows Install instructions in the User Manual.

For instructions on how to build ClamAV using our new experimental CMake build tooling, see INSTALL.cmake.md

Upgrading from a previous version

Some tips on how to upgrade from a previous version of ClamAV.

ClamAV News

For information about the features in this and prior releases, read the news.

Catch up on the latest about ClamAV by reading our blog and follow us on Twitter @clamav.

Join the ClamAV Community

The best way to get in touch with the ClamAV community is to join our our mailing lists, and tune to #clamav on IRC.

Want to make a contribution?

The ClamAV development team welcomes code contributions, improvements to our documentation, and also bug reports. Thanks for joining us!

Credits

The ClamAV Team