
Please read the documentation in docs or at https://libreswan.org/

Specific vendors/distribution build instructions available in packaging/

Build requirements
------------------
bison flex pkgconfig gcc make xmlto
nss-devel nspr-devel libevent-devel

for systemd: pkgconfig hostname systemd-devel
for pam/xauth: pam-devel
for dnssec support: unbound-devel ldns-devel
for FIPS support: fipscheck-devel
for libcap-ng support: libcap-ng-devel
for CRL fetching support: libcurl-devel
for CRL ldap fetching support: openldap-devel
for audit support: audit-libs-devel

Building userland
-----------------

	make all
	sudo make install

For a minimal install (no manpages) type:

	make base
	sudo make install-base

The file Makefile.inc.local can be used to enable/disable features
configured by mk/config.mk and mk/userland-cflags.mk

Optional building alternative KLIPS IPsec stack
-----------------------------------------------

On Linux 2.6 or higher for the running kernel:

	make module
	sudo make module_install

Build for a kernel different from the running kernel:

	make KERNELSRC=//usr/src/kernel/linux-9.42 module

Building KLIPS kernel module for the old Linux 2.4 kernel

	make module24
	sudo make minstall24

When using KLIPS with OCF:

	make CONFIG_KLIPS_OCF=y MODULE_DEF_INCLUDE=$${LIBRESWANSRCDIR}/packaging/ocf/config-all.hmodules module module_install

When called in openwrt/packaging/libreswan/Makefile to build kmod-libreswan

	make MODULE_DEFCONFIG=$${LIBRESWANSRCDIR}/packaging/openwrt/defconfig MODULE_DEF_INCLUDE=$${LIBRESWANSRCDIR}/packaging/openwrt/config-all.h module
