Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • knot/knot-dns
  • sopak/knot
  • zansorgova/knot
  • dkg/knot-dns
  • julianbrost/knot
  • severo/knot-dns
  • edmonds/knot-dns
  • jfoote/knot-dns
  • jhdac/knot-dns
  • shane/knot-dns
  • matje/knot-dns
  • Archange/knot-dns
  • pspirek/knot-dns
  • mguegan/knot-dns
  • bitfehler/knot-dns
  • UpadhyayAlok/knot-dns
  • quite/knot-dns
  • jruzicka/knot-dns
  • dxld/knot-dns
  • nde1/knot-dns
  • peterthomassen/knot-dns
  • jpmens/knot-dns
22 results
Show changes
Commits on Source (17158)
;; emacs local configuration settings for knot source
;; surmised by dkg on 2017-03-25 12:15:55-0500
((c-mode
(indent-tabs-mode . t)
(tab-width . 8)
(c-basic-offset . 8)
(c-file-style . "linux"))
)
.git
.gitattributes export-ignore
.gitignore export-ignore
*.swp
*~
Knot.creator.user*
Makefile.in
aclocal.m4
autoscan.log
config.guess
config.sub
configure
configure.scan
depcomp
install-sh
missing
src/Makefile.in
ylwrap
autom4te.cache
*.la
*.a
*.o
*.orig
*.lo
*.rej
*.pyc
*.pc
.libs/
.deps/
.dirstamp
/tmp
/Knot.creator.user*
/Knot.cflags
/Knot.cxxflags
/Doxyfile
/aclocal.m4
/ar-lib
/autoscan.log
/config.guess
/config.sub
/config.log
/config.status
/libtool
/ltmain.sh
/configure
/configure.scan
/compile
/depcomp
/install-sh
/missing
/ylwrap
/autom4te.cache/
/src/config.h
/src/config.h.in
/src/stamp-*
/INSTALL
/m4/libtool.m4
/m4/ltoptions.m4
/m4/ltsugar.m4
/m4/ltversion.m4
/m4/lt~obsolete.m4
/test-driver
Makefile
Makefile.in
/src/lib*/version.h
/samples/knot.sample.conf
/src/knot/modules/static_modules.h
# dnstap
/src/contrib/dnstap/Makefile
/src/contrib/dnstap/Makefile.in
/src/contrib/dnstap/dnstap.pb-c.c
/src/contrib/dnstap/dnstap.pb-c.h
# zscanner
/src/libzscanner/scanner.c
# xdp
/src/libknot/xdp/bpf-kernel.ll
# Binaries
/src/kcatalogprint
/src/kdig
/src/keymgr
/src/khost
/src/kjournalprint
/src/knotc
/src/knotd
/src/knsec3hash
/src/knsupdate
/src/kxdpgun
/src/kzonecheck
/src/kzonesign
# Generated tarballs
/knot-*.tar.xz
# Packaging output
/pkg
# Code coverage
*.gcda
*.gcno
/coverage.info
/coverage.html
# Vagrant
.vagrant
# eclipse
/.project
/.cproject
/.settings/
# cygwin
*.exe
*.exe.manifest
# clang
.qtc_clangd
variables:
DEBIAN_FRONTEND: noninteractive
LC_ALL: C
GIT_STRATEGY: fetch
DOCKER_DRIVER: overlay2
GIT_SUBMODULE_STRATEGY: recursive
DISTROTEST_PRIORITY: 6
PKGTEST: 0
stages:
- image
- build
- test
- pkg
- documentation
.image: &image
stage: image
before_script:
- docker info
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build --no-cache -t "$IMAGE_TAG" "scripts/docker/$IMAGE_NAME-$IMAGE_VER"
- docker push "$IMAGE_TAG"
tags:
- dind
only:
variables:
- $SCHEDULE_TYPE == "weekly"
docker:knot-dns:debian:
<<: *image
variables:
IMAGE_NAME: debian
IMAGE_VER: latest
IMAGE_TAG: $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_VER
tags:
- dind
- amd64
docker:knot-dns:debian-arm64:
<<: *image
variables:
IMAGE_NAME: debian
IMAGE_VER: latest
IMAGE_TAG: $CI_REGISTRY_IMAGE/$IMAGE_NAME-arm64:$IMAGE_VER
tags:
- dind
- arm64
docker:knot-dns:debian:unstable:
<<: *image
variables:
IMAGE_NAME: debian
IMAGE_VER: unstable
IMAGE_TAG: $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_VER
tags:
- dind
- amd64
docker:knot-dns:ubuntu:
<<: *image
variables:
IMAGE_NAME: ubuntu
IMAGE_VER: latest
IMAGE_TAG: $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_VER
tags:
- dind
- amd64
docker:knot-dns:rocky:
<<: *image
variables:
IMAGE_NAME: rocky
IMAGE_VER: latest
IMAGE_TAG: $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_VER
tags:
- dind
- amd64
docker:knot-dns:fedora:
<<: *image
variables:
IMAGE_NAME: fedora
IMAGE_VER: latest
IMAGE_TAG: $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_VER
tags:
- dind
- amd64
.fedora_latest: &fedora_latest
image: "$CI_REGISTRY/knot/knot-dns/fedora:latest"
tags:
- docker
- linux
- amd64
except:
- schedules
.rocky_latest: &rocky_latest
image: "$CI_REGISTRY/knot/knot-dns/rocky:latest"
tags:
- docker
- linux
- amd64
except:
- schedules
.debian_stable: &debian_stable
image: "$CI_REGISTRY/knot/knot-dns/debian:latest"
tags:
- docker
- linux
- amd64
except:
- schedules
.debian_stable_arm64: &debian_stable_arm64
image: "$CI_REGISTRY/knot/knot-dns/debian-arm64:latest"
tags:
- docker
- linux
- arm64
except:
- schedules
.debian_unstable: &debian_unstable
image: "$CI_REGISTRY/knot/knot-dns/debian:unstable"
tags:
- docker
- linux
- amd64
except:
- schedules
.ubuntu_latest: &ubuntu_latest
image: "$CI_REGISTRY/knot/knot-dns/ubuntu:latest"
tags:
- docker
- linux
- amd64
except:
- schedules
.build: &build_job
stage: build
script:
- autoreconf -fi
- ./configure --disable-fastparser --enable-quic $EXTRA_CONFIGURE || ( cat config.log && exit 1 )
- make all V=1
artifacts:
untracked: true
expire_in: '1 hour'
except:
- schedules
.test: &test_job
stage: test
before_script:
- find -exec touch -t $(date +%m%d%H%M) {} \;
script:
- make check V=1
except:
- schedules
build:fedora:amd64:
<<: *fedora_latest
<<: *build_job
test:fedora:amd64:
<<: *fedora_latest
<<: *test_job
dependencies:
- build:fedora:amd64
build:rocky:amd64:
<<: *rocky_latest
<<: *build_job
test:rocky:amd64:
<<: *rocky_latest
<<: *test_job
dependencies:
- build:rocky:amd64
build:ubuntu:amd64:
<<: *ubuntu_latest
<<: *build_job
test:ubuntu:amd64:
<<: *ubuntu_latest
<<: *test_job
dependencies:
- build:ubuntu:amd64
build:debian:amd64:
variables:
EXTRA_CONFIGURE: --enable-xdp=yes
<<: *debian_stable
<<: *build_job
except: # run on schedules as well, for debian:symbols tests
test:debian:amd64:
<<: *debian_stable
<<: *test_job
dependencies:
- build:debian:amd64
build:debian:arm64:
<<: *debian_stable_arm64
<<: *build_job
test:debian:arm64:
<<: *debian_stable_arm64
<<: *test_job
dependencies:
- build:debian:arm64
build:debian:unstable:amd64:
<<: *debian_unstable
<<: *build_job
test:debian:unstable:amd64:
<<: *debian_unstable
<<: *test_job
dependencies:
- build:debian:unstable:amd64
build:debian:unstable:amd64:asan:
variables:
CC: clang
CFLAGS: "-fsanitize=address -g -O2 -fno-omit-frame-pointer"
LDFLAGS: "-fsanitize=address"
LSAN_OPTIONS: verbosity=1:log_threads=1
allow_failure: true
<<: *debian_unstable
<<: *build_job
test:debian:unstable:amd64:asan:
variables:
CC: clang
CFLAGS: "-fsanitize=address -g -O2"
LDFLAGS: "-fsanitize=address"
LSAN_OPTIONS: verbosity=1:log_threads=1
allow_failure: true
<<: *debian_unstable
<<: *test_job
dependencies:
- build:debian:unstable:amd64:asan
build:debian:unstable:amd64:ubsan:
variables:
CC: clang
CFLAGS: "-fsanitize=undefined -fno-sanitize=nonnull-attribute -g -O2"
LDFLAGS: "-fsanitize=undefined"
UBSAN_OPTIONS: print_stacktrace=1
allow_failure: true
<<: *debian_unstable
<<: *build_job
test:debian:unstable:amd64:ubsan:
variables:
CC: clang
CFLAGS: "-fsanitize=undefined -fno-sanitize=nonnull-attribute -g -O2"
LDFLAGS: "-fsanitize=undefined"
UBSAN_OPTIONS: print_stacktrace=1
allow_failure: true
<<: *debian_unstable
<<: *test_job
dependencies:
- build:debian:unstable:amd64:ubsan
build:archive:
<<: *debian_stable
stage: build
script:
- autoreconf -fi
- mkdir _build
- cd _build
- ../configure
- make distcheck V=1 DISTCHECK_CONFIGURE_FLAGS="--disable-static" -j2
- make html singlehtml
only:
- master
- tags
- triggers
- schedules
except: []
artifacts:
paths:
- _build/*.tar.xz
- _build/doc/_build/html
- _build/doc/_build/singlehtml
pages:
stage: documentation
needs:
- build:archive
script:
- mkdir -p public/master
- mv _build/doc/_build/html public/master/html
- mv _build/doc/_build/singlehtml public/master/singlehtml
only:
- master
artifacts:
paths:
- public
build:documentation:
<<: *debian_stable
stage: documentation
only:
- tags
- triggers
dependencies:
- build:debian:amd64
script:
- make -C doc html singlehtml pdf epub V=1
artifacts:
paths:
- doc/_build/html/
- doc/_build/singlehtml/
- doc/_build/latex/KnotDNS.pdf
- doc/_build/epub/KnotDNS.epub
expire_in: '1 hour'
# packaging tests using apkg
.apkg_image: &apkg_image
# apkg images use LC_ALL=C.UTF-8
variables:
LC_ALL: C.UTF-8
.pkg_test: &pkg_test
<<: *apkg_image
stage: pkg
needs:
- pkg:make-archive
only:
variables:
- $PKGTEST == "1"
artifacts:
paths:
- pkg/
expire_in: '1 week'
script:
- python3 -m pip install git+https://gitlab.nic.cz/packaging/apkg.git
# make sure the archive from pkg:make-archive is available
- apkg info cache | grep archive/dev
- apkg install --build-dep
- apkg test --test-dep
.pkg_test_deb: &pkg_test_deb
<<: *pkg_test
before_script:
- apt update
pkg:make-archive:
# archive is created once and reused in other pkg jobs
<<: *apkg_image
stage: pkg
needs:
- build:debian:amd64
only:
variables:
- $PKGTEST == "1"
image: $CI_REGISTRY/packaging/apkg/test/debian-12
artifacts:
paths:
- pkg/
before_script:
- apt update
script:
- python3 -m pip install apkg
- apkg build-dep
- apkg make-archive
pkg:debian-13:
<<: *pkg_test_deb
image: $CI_REGISTRY/packaging/apkg/test/debian-13
pkg:debian-12:
<<: *pkg_test_deb
image: $CI_REGISTRY/packaging/apkg/test/debian-12
pkg:debian-11:
<<: *pkg_test_deb
image: $CI_REGISTRY/packaging/apkg/test/debian-11
pkg:ubuntu-24.04:
<<: *pkg_test_deb
image: $CI_REGISTRY/packaging/apkg/test/ubuntu-24.04
pkg:ubuntu-22.04:
<<: *pkg_test_deb
image: $CI_REGISTRY/packaging/apkg/test/ubuntu-22.04
pkg:ubuntu-20.04:
<<: *pkg_test_deb
image: $CI_REGISTRY/packaging/apkg/test/ubuntu-20.04
pkg:fedora-41:
<<: *pkg_test
image: $CI_REGISTRY/packaging/apkg/test/fedora-41
pkg:fedora-40:
<<: *pkg_test
image: $CI_REGISTRY/packaging/apkg/test/fedora-40
pkg:alma-9:
<<: *pkg_test
image: $CI_REGISTRY/packaging/apkg/test/alma-9
pkg:rocky-8:
<<: *pkg_test
image: $CI_REGISTRY/packaging/apkg/test/rocky-8
pkg:opensuse-15.6:
<<: *pkg_test
image: $CI_REGISTRY/packaging/apkg/test/opensuse-15.6
[submodule "tests-fuzz/fuzz_zscanner.in"]
path = tests-fuzz/fuzz_zscanner.in
url = https://gitlab.nic.cz/knot/fuzzing/fuzz_zscanner.in.git
[submodule "tests-fuzz/fuzz_packet.in"]
path = tests-fuzz/fuzz_packet.in
url = https://gitlab.nic.cz/knot/fuzzing/fuzz_packet.in.git
Ľuboš Slovák <lubos.slovak@nic.cz>
Marek Vavruša <marek.vavrusa@nic.cz>
Jan Kadlec <jan.kadlec@nic.cz>
Ondřej Surý <ondrej.sury@nic.cz>
This diff is collapsed.
Coding style
============
* Indentation: TAB (8 spaces width)
* Braces: K&R, 1TBS
* Max line width: 80 chars
* Pointer asterisk attached to the name of the variable
* Own structures/types: _t suffix (f.e. nameserver_t)
* Header guard format: _KNOT_HEADER_H_
* Spaces around binary operators
* Space between keyword and bracket (f.e. "if (predicate)")
* No space between variable and typecast (f.e. "return (int)val;")
To sum it up, Linux KNF is used, see [1].
[1] Linux Coding Style:
http://kerneltrap.org/files/Jeremy/CodingStyle.txt
AStyle command format
=====================
astyle --style=1tbs -t8 -w -p -H -U -j --align-pointer=name
Doxygen
=======
* Format: Qt-style
* "\brief", not "@brief"
* "/*!", not "/**"
* Order of sections
* brief description
* long description
* notes
* warnings
* parameters
* return values
* todos
* Always use \brief (no autobrief)
* Indent text (using spaces only) in multiple-line sections
* In multi-line comments, opening line (/*!) should be empty
* One empty line between two consecutive sections
* Struct and union members documented on the same line if the comment fits
* Use \retval (or more of them) instead of \return
if the function returns some distinct values
(such as 0 for no error, -1 for something else, etc.)
Example
=======
/*!
* \brief Some structure.
*
* Longer description.
*/
struct some_struct {
/*!
* \brief This comment does not fit on the same line as the member
* as it is rather large.
*/
int fd;
int flags; /*!< Flags. */
};
/*!
* \brief Brief description of some function.
*
* Longer description.
*
* \note This function is deprecated.
*
* \warning Do not use this function!
*
* \param param1 Some parameter.
* \param param2 Other parameter. This one has rather large comment,
* so its next line is indented for better readability.
*
* \retval 0 on success.
* \retval -1 if some error occured.
*
* \todo Remove (deprecated).
*/
## Intermediate stage ##
FROM debian:bookworm-slim AS builder
# Environment
ENV BUILD_PKGS \
autoconf \
automake \
gcc \
libbpf-dev \
libedit-dev \
libfstrm-dev \
libgnutls28-dev \
libidn2-dev \
liblmdb-dev \
libmaxminddb-dev \
libmnl-dev \
libnghttp2-dev \
libngtcp2-crypto-gnutls-dev \
libngtcp2-dev \
libprotobuf-c-dev \
libsystemd-dev \
libtool \
liburcu-dev \
libxdp-dev \
make \
pkg-config \
protobuf-c-compiler
# Install dependencies
RUN apt-get update && \
apt-get install -yqq ${BUILD_PKGS}
# Build the project
COPY . /knot-src
WORKDIR /knot-src
ARG FASTPARSER=disable
RUN autoreconf -if && \
CFLAGS="-g -O2 -DNDEBUG -D_FORTIFY_SOURCE=3 -fstack-protector-strong" \
./configure --prefix=/ \
--with-rundir=/rundir \
--with-storage=/storage \
--with-configdir=/config \
--with-module-dnstap=yes \
--${FASTPARSER}-fastparser \
--enable-quic \
--enable-dnstap \
--disable-static \
--disable-documentation && \
make -j$(grep -c ^processor /proc/cpuinfo)
# Run unittests if requested and install the project
ARG CHECK=disable
RUN if [ "$CHECK" = "enable" ]; then make -j$(grep -c ^processor /proc/cpuinfo) check; fi && \
make install DESTDIR=/tmp/knot-install
## Final stage ##
FROM debian:bookworm-slim
LABEL maintainer="Knot DNS <knot-dns@labs.nic.cz>"
# Environment
ENV RUNTIME_PKGS \
dbus \
libbpf1 \
libedit2 \
libfstrm0 \
libgnutls30 \
libidn2-0 \
liblmdb0 \
libmaxminddb0 \
libmnl0 \
libnghttp2-14 \
libngtcp2-crypto-gnutls2 \
libngtcp2-9 \
libprotobuf-c1 \
liburcu8 \
libxdp1
# Install dependencies and create knot user and group
ARG UID=53
RUN apt-get update && \
apt-get install -yqq ${RUNTIME_PKGS} adduser && \
rm -rf /var/lib/apt/lists/* && \
ldconfig && \
adduser --quiet --system --group --no-create-home --home /storage --uid=${UID} knot && \
install -o knot -g knot -d /config /rundir /storage
# Copy artifacts
# `COPY --from=builder /tmp/knot-install/ /` doesn't work with DOCKER_BUILDKIT=1 under buildx
COPY --from=builder /tmp/knot-install/bin/ /bin/
COPY --from=builder /tmp/knot-install/config/ /config/
COPY --from=builder /tmp/knot-install/include/ /include/
COPY --from=builder /tmp/knot-install/lib/ /lib/
COPY --from=builder /tmp/knot-install/sbin/ /sbin/
# Prepare configurations for optional D-Bus signaling
COPY --from=builder /knot-src/distro/common/system-local.conf /etc/dbus-1/
COPY --from=builder /knot-src/distro/common/cz.nic.knotd.conf /usr/share/dbus-1/system.d/
RUN mkdir -p /run/dbus
# Expose port
EXPOSE 53/UDP
EXPOSE 53/TCP
EXPOSE 853/UDP
EXPOSE 853/TCP
# Prepare shared directories
VOLUME /config
VOLUME /rundir
VOLUME /storage
/*!
\defgroup server Server control module.
\defgroup threading Threading API.
\defgroup network Socket API.
\defgroup query_processing DNS query processing.
\defgroup utils Utilities, constants and macros.
\defgroup debugging Server debugging API.
\defgroup logging Server logging API.
\defgroup statistics Statistics module (optional).
\defgroup dnslib dnslib - Generic DNS library.
\defgroup hashing Hash table and functions.
\defgroup common_lib Common library.
\defgroup alloc Memory allocation.
\defgroup tests Unit tests.
\defgroup zoneparser Zone compiler utility
\defgroup ctl Control utility
\mainpage Knot API documentation.
Knot is an open-source, high-performace, purely authoritative DNS server.
<h2>Requirements</h2>
- liburcu (at least 0.4.5): http://lttng.org/urcu
- automake
- autoconf
- libtool
<h2>Installation</h2>
Knot uses autotools to generate makefiles.
\todo Add some more info about usage and requirements.
\code
$ autoreconf -i
$ ./configure
$ make
\endcode
<h2>Starting the server</h2>
When compiled, the following executables are created (in the src/ directory):
- \em knotd - The server
- \em knotc - Control utility
- \em knot-zcompile - Zone compiler
- \em unittests - Unit tests for the server and dnslib
- \em unittests-zcompile - Unit tests for the zone compiler
1. Add path to knotd and knot-zcompile executables to PATH
2. Prepare a configuration file. You may copy and edit the one provided with
the server (\em samples/knot.conf.sample).
2. Compile zone
\code
$ src/knotc -c path-to-config-file compile
\endcode
3. Run the server
\code
$ src/knotc -c path-to-config-file start
\endcode
<h2>Server modules</h2>
- \ref server
- \ref threading
- \ref network
- \ref query_processing
- \ref utils
- \ref debugging
- \ref logging
- \ref statistics
<h2>DNS library</h2>
- \ref dnslib
- \ref hashing
<h2>Common library</h2>
- \ref common_lib
- \ref alloc
<h2>Other modules</h2>
- \ref tests
- \ref zoneparser
- \ref ctl
*/
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
2006, 2007, 2008, 2009 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without warranty of any kind.
Basic Installation
==================
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented
below. The lack of an optional feature in a given package is not
necessarily a bug. More recommendations for GNU packages can be found
in *note Makefile Conventions: (standards)Makefile Conventions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
cache files.
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You need `configure.ac' if
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system.
Running `configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package, generally using the just-built uninstalled binaries.
4. Type `make install' to install the programs and any data files and
documentation. When installing into a prefix owned by root, it is
recommended that the package be configured and built as a regular
user, and only the `make install' phase executed with root
privileges.
5. Optionally, type `make installcheck' to repeat any self-tests, but
this time using the binaries in their final installed location.
This target does not install anything. Running this target as a
regular user, particularly if the prior `make install' required
root privileges, verifies that the installation completed
correctly.
6. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
7. Often, you can also type `make uninstall' to remove the installed
files again. In practice, not all packages have tested that
uninstallation works correctly, even though it is required by the
GNU Coding Standards.
8. Some packages, particularly those that use Automake, provide `make
distcheck', which can by used by developers to test that all other
targets like `make install' and `make uninstall' work correctly.
This target is generally not run by end users.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. Run `./configure --help'
for details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'. This
is known as a "VPATH" build.
With a non-GNU `make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
installed the package for one architecture, use `make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple `-arch' options to the
compiler but only a single `-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CPP="gcc -E" CXXCPP="g++ -E"
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
using the `lipo' tool if you have problems.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX', where PREFIX must be an
absolute file name.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them. In general, the
default for these options is expressed in terms of `${prefix}', so that
specifying just `--prefix' will affect all of the other directory
specifications that were not explicitly provided.
The most portable way to affect installation locations is to pass the
correct locations to `configure'; however, many packages provide one or
both of the following shortcuts of passing variable assignments to the
`make install' command line to change installation locations without
having to reconfigure or recompile.
The first method involves providing an override variable for each
affected directory. For example, `make install
prefix=/alternate/directory' will choose an alternate location for all
directory configuration variables that were expressed in terms of
`${prefix}'. Any directories that were specified during `configure',
but not in terms of `${prefix}', must each be overridden at install
time for the entire installation to be relocated. The approach of
makefile variable overrides for each directory variable is required by
the GNU Coding Standards, and ideally causes no recompilation.
However, some platforms have known limitations with the semantics of
shared libraries that end up requiring recompilation when using this
method, particularly noticeable in packages that use GNU Libtool.
The second method involves providing the `DESTDIR' variable. For
example, `make install DESTDIR=/alternate/directory' will prepend
`/alternate/directory' before all installation names. The approach of
`DESTDIR' overrides is not required by the GNU Coding Standards, and
does not work on platforms that have drive letters. On the other hand,
it does better at avoiding recompilation issues, and works well even
when some directory options were not specified in terms of `${prefix}'
at `configure' time.
Optional Features
=================
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Some packages offer the ability to configure how verbose the
execution of `make' will be. For these packages, running `./configure
--enable-silent-rules' sets the default to minimal output, which can be
overridden with `make V=1'; while running `./configure
--disable-silent-rules' sets the default to verbose, which can be
overridden with `make V=0'.
Particular systems
==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
CC is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
to try
./configure CC="cc"
and if that doesn't work, try
./configure CC="cc -nodtk"
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
directory contains several dysfunctional programs; working variants of
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
in your `PATH', put it _after_ `/usr/bin'.
On Haiku, software installed for all users goes in `/boot/common',
not `/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
Specifying the System Type
==========================
There may be some features `configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, `configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS
KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf bug. Until the bug is fixed you can use this workaround:
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
`configure' recognizes the following options to control how it
operates.
`--help'
`-h'
Print a summary of all of the options to `configure', and exit.
`--help=short'
`--help=recursive'
Print a summary of the options unique to this package's
`configure', and exit. The `short' variant lists options used
only in the top level, while the `recursive' variant lists options
also present in any nested packages.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--prefix=DIR'
Use DIR as the installation prefix. *note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
`--no-create'
`-n'
Run the configure checks, but stop before creating any output
files.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
// ADD PREDEFINED MACROS HERE!
./src/config.h
\ No newline at end of file
This diff is collapsed.
obj
src/alloc
src/ctl
src/dnslib
src/hash
src/lib
src/other
src/server
src/stat
src/tests/libtap
src/tests
src/zoneparser
src
\ No newline at end of file
src
src/contrib
src/contrib/dnstap
src/contrib/libngtcp2
src/contrib/libngtcp2/ngtcp2
src/contrib/libngtcp2/ngtcp2/crypto
src/contrib/libngtcp2/ngtcp2/lib
src/contrib/licenses
src/contrib/openbsd
src/contrib/proxyv2
src/contrib/qp-trie
src/contrib/ucw
src/contrib/url-parser
src/contrib/vpool
src/knot
src/knot/catalog
src/knot/common
src/knot/conf
src/knot/ctl
src/knot/dnssec
src/knot/dnssec/kasp
src/knot/events
src/knot/events/handlers
src/knot/include
src/knot/journal
src/knot/modules
src/knot/modules/cookies
src/knot/modules/dnsproxy
src/knot/modules/dnstap
src/knot/modules/geoip
src/knot/modules/noudp
src/knot/modules/onlinesign
src/knot/modules/probe
src/knot/modules/queryacl
src/knot/modules/rrl
src/knot/modules/stats
src/knot/modules/synthrecord
src/knot/modules/whoami
src/knot/nameserver
src/knot/query
src/knot/server
src/knot/updates
src/knot/worker
src/knot/zone
src/libdnssec
src/libdnssec/key
src/libdnssec/keystore
src/libdnssec/nsec
src/libdnssec/p11
src/libdnssec/shared
src/libdnssec/sign
src/libknot
src/libknot/control
src/libknot/db
src/libknot/packet
src/libknot/probe
src/libknot/rrtype
src/libknot/xdp
src/libknot/yparser
src/libzscanner
src/utils
src/utils/common
src/utils/kcatalogprint
src/utils/kdig
src/utils/keymgr
src/utils/khost
src/utils/kjournalprint
src/utils/knotc
src/utils/knotd
src/utils/knsec3hash
src/utils/knsupdate
src/utils/knsupdate/tests
src/utils/kxdpgun
src/utils/kzonecheck
src/utils/kzonesign
tests
tests/contrib
tests-fuzz
tests-fuzz/check
tests-fuzz/knotd_wrap
tests/knot
tests/knot/semantic_check_data
tests/libdnssec
tests/libknot
tests/libzscanner
tests/libzscanner/data
tests/libzscanner/data/includes
tests/modules
tests/tap
tests/utils
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src
SUBDIRS = src tests tests-fuzz python samples distro doc
EXTRA_DIST = README.md
.PHONY: singlehtml epub install-singlehtml install-epub
singlehtml install-singlehtml epub install-epub:
$(MAKE) -C doc $@
.PHONY: check-compile
check-compile:
$(MAKE) $(AM_MAKEFLAGS) -C tests $@
$(MAKE) $(AM_MAKEFLAGS) -C tests-fuzz $@
AM_DISTCHECK_CONFIGURE_FLAGS =
CODE_COVERAGE_INFO = coverage.info
CODE_COVERAGE_HTML = coverage.html
CODE_COVERAGE_DIRS = \
src/contrib \
src/knot \
src/libdnssec \
src/libknot \
src/libzscanner
code_coverage_quiet = --quiet
check-code-coverage:
if CODE_COVERAGE_ENABLED
$(MAKE) $(AM_MAKEFLAGS) code-coverage-initial
-$(MAKE) $(AM_MAKEFLAGS) -k check
$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture
$(MAKE) $(AM_MAKEFLAGS) code-coverage-html
$(MAKE) $(AM_MAKEFLAGS) code-coverage-summary
else
@echo "You need to run configure with --enable-code-coverage to enable code coverage"
endif
code-coverage-initial:
if CODE_COVERAGE_ENABLED
$(LCOV) $(code_coverage_quiet) \
--no-external \
$(foreach dir, $(CODE_COVERAGE_DIRS), --directory $(top_builddir)/$(dir)) \
--capture --initial \
--ignore-errors source \
--no-checksum \
--compat-libtool \
--output-file $(CODE_COVERAGE_INFO)
else
@echo "You need to run configure with --enable-code-coverage to enable code coverage"
endif
code-coverage-capture:
if CODE_COVERAGE_ENABLED
$(LCOV) $(code_coverage_quiet) \
--no-external \
$(foreach dir, $(CODE_COVERAGE_DIRS), --directory $(builddir)/$(dir)) \
--capture \
--ignore-errors source \
--no-checksum \
--compat-libtool \
--output-file $(CODE_COVERAGE_INFO)
else
@echo "You need to run configure with --enable-code-coverage to enable code coverage"
endif
code-coverage-html:
if CODE_COVERAGE_ENABLED
@echo "Generating code coverage HTML report (this might take a while)"
LANG=C $(GENHTML) $(code_coverage_quiet) \
--output-directory $(CODE_COVERAGE_HTML) \
--title "Knot DNS $(PACKAGE_VERSION) Code Coverage" \
--legend --show-details \
--ignore-errors source \
$(CODE_COVERAGE_INFO)
else
@echo "You need to run configure with --enable-code-coverage to enable code coverage"
endif
code-coverage-summary:
if CODE_COVERAGE_ENABLED
$(LCOV) \
--summary $(CODE_COVERAGE_INFO)
else
@echo "You need to run configure with --enable-code-coverage to enable code coverage"
endif
if CODE_COVERAGE_ENABLED
clean-local: code-coverage-clean
-find . -name "*.gcno" -delete
code-coverage-clean:
-$(LCOV) --directory $(top_builddir) -z
-rm -rf $(CODE_COVERAGE_INFO) $(CODE_COVERAGE_HTML)
-find . -name "*.gcda" -o -name "*.gcov" -delete
endif
.PHONY: check-code-coverage code-coverage-initial code-coverage-capture code-coverage-html code-coverage-summary code-coverage-clean
.NOTPARALLEL: clean