ci+docs: switch to pkgconf on Linux too

Change-Id: If001acd87871077232fb3a33fe4e2570352cdc2e
diff --git a/.jenkins.d/00-deps.sh b/.jenkins.d/00-deps.sh
index a6c0054..d211328 100755
--- a/.jenkins.d/00-deps.sh
+++ b/.jenkins.d/00-deps.sh
@@ -14,9 +14,19 @@
     libboost-thread-dev
     libsqlite3-dev
     libssl-dev
-    pkg-config
+    pkgconf
     python3
 )
+DNF_PKGS=(
+    boost-devel
+    gcc-c++
+    libasan
+    lld
+    openssl-devel
+    pkgconf
+    python3
+    sqlite-devel
+)
 FORMULAE=(boost openssl pkgconf)
 PIP_PKGS=()
 case $JOB_NAME in
@@ -44,8 +54,7 @@
     sudo apt-get update -qq
     sudo apt-get install -qy --no-install-recommends "${APT_PKGS[@]}"
 elif [[ $ID_LIKE == *fedora* ]]; then
-    sudo dnf install -y gcc-c++ libasan lld pkgconf-pkg-config python3 \
-                        boost-devel openssl-devel sqlite-devel
+    sudo dnf install -y "${DNF_PKGS[@]}"
 fi
 
 if (( ${#PIP_PKGS[@]} )); then
diff --git a/.jenkins.d/40-headers-check.sh b/.jenkins.d/40-headers-check.sh
index 5e543dc..d34c7cc 100755
--- a/.jenkins.d/40-headers-check.sh
+++ b/.jenkins.d/40-headers-check.sh
@@ -17,8 +17,8 @@
 
 CXX=${CXX:-g++}
 STD=-std=c++17
-CXXFLAGS="-O2 -Wall -Wno-unknown-warning-option -Wno-enum-constexpr-conversion -Wno-unused-const-variable $(pkg-config --cflags libndn-cxx $PCFILE)"
-INCLUDEDIR="$(pkg-config --variable=includedir $PCFILE)"/$PROJ
+CXXFLAGS="-O2 -Wall -Wno-unknown-warning-option -Wno-enum-constexpr-conversion -Wno-unused-const-variable $(pkgconf --cflags libndn-cxx $PCFILE)"
+INCLUDEDIR="$(pkgconf --variable=includedir $PCFILE)"/$PROJ
 
 echo "Using: $CXX $STD $CXXFLAGS"
 
diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index 3c724fe..bac1893 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -11,7 +11,7 @@
     conf.start_msg('Checking C++ compiler version')
 
     cxx = conf.env.CXX_NAME # generic name of the compiler
-    ccver = tuple(int(i) for i in conf.env.CC_VERSION)
+    ccver = get_compiler_ver(conf)
     ccverstr = '.'.join(conf.env.CC_VERSION)
     errmsg = ''
     warnmsg = ''
@@ -60,6 +60,10 @@
     conf.env.DEFINES += generalFlags['DEFINES']
 
 
+def get_compiler_ver(conf):
+    return tuple(int(i) for i in conf.env.CC_VERSION)
+
+
 @Configure.conf
 def check_compiler_flags(conf):
     # Debug or optimized CXXFLAGS and LINKFLAGS are applied only if the
@@ -124,9 +128,6 @@
 
 
 class CompilerFlags:
-    def getCompilerVersion(self, conf):
-        return tuple(int(i) for i in conf.env.CC_VERSION)
-
     def getGeneralFlags(self, conf):
         """Get dict of CXXFLAGS, LINKFLAGS, and DEFINES that are always needed"""
         return {'CXXFLAGS': [], 'LINKFLAGS': [], 'DEFINES': []}
@@ -227,7 +228,7 @@
         elif Utils.unversioned_sys_platform() == 'freebsd':
             # Bug #4790
             flags['CXXFLAGS'] += [['-isystem', '/usr/local/include']]
-        if self.getCompilerVersion(conf) >= (18, 0, 0):
+        if get_compiler_ver(conf) >= (18, 0, 0) and get_compiler_ver(conf) < (20, 1, 0):
             # Bug #5300
             flags['CXXFLAGS'] += ['-Wno-enum-constexpr-conversion']
         return flags
@@ -241,10 +242,10 @@
         flags = super().getDebugFlags(conf)
         flags['CXXFLAGS'] += self.__cxxFlags
         # Enable assertions in libc++
-        if self.getCompilerVersion(conf) >= (18, 0, 0):
+        if get_compiler_ver(conf) >= (18, 0, 0):
             # https://libcxx.llvm.org/Hardening.html
             flags['DEFINES'] += ['_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE']
-        elif self.getCompilerVersion(conf) >= (15, 0, 0):
+        elif get_compiler_ver(conf) >= (15, 0, 0):
             # https://releases.llvm.org/15.0.0/projects/libcxx/docs/UsingLibcxx.html#enabling-the-safe-libc-mode
             flags['DEFINES'] += ['_LIBCPP_ENABLE_ASSERTIONS=1']
         # Tell libc++ to avoid including transitive headers
diff --git a/docs/INSTALL.rst b/docs/INSTALL.rst
index a7681d0..b104041 100644
--- a/docs/INSTALL.rst
+++ b/docs/INSTALL.rst
@@ -32,11 +32,11 @@
 
 - GCC >= 10.2 or clang >= 10.0 (if you are on Linux or FreeBSD)
 - Xcode >= 13.0 or corresponding version of Command Line Tools (if you are on macOS)
-- Python >= 3.8
-- pkg-config
 - Boost >= 1.71.0
 - OpenSSL >= 1.1.1
-- SQLite 3.x
+- SQLite >= 3.31
+- pkgconf >= 1.6
+- Python >= 3.8
 
 To build ndn-cxx from source, one must first install a C++ compiler and all necessary
 development tools and libraries:
@@ -45,13 +45,13 @@
 
     In a terminal, enter::
 
-        sudo apt install build-essential libboost-all-dev libssl-dev libsqlite3-dev pkg-config python3
+        sudo apt install build-essential libboost-all-dev libssl-dev libsqlite3-dev pkgconf python3
 
 - On **CentOS** and **Fedora**
 
     In a terminal, enter::
 
-        sudo dnf install gcc-c++ boost-devel openssl-devel sqlite-devel pkgconf-pkg-config python3
+        sudo dnf install gcc-c++ boost-devel openssl-devel sqlite-devel pkgconf python3
 
 - On **macOS**
 
@@ -185,10 +185,10 @@
 -  ``<LIBDIR>/libndn-cxx.so``, ``<LIBDIR>/libndn-cxx.so.<VERSION>`` (on Linux),
    ``<LIBDIR>/libndn-cxx.dylib``, ``<LIBDIR>/libndn-cxx.<VERSION>.dylib`` (on macOS):
    shared NDN C++ library (if enabled).
--  ``<LIBDIR>/pkgconfig/libndn-cxx.pc``: pkgconfig file storing all necessary flags to build
-   against the library. For example, if the ``pkg-config`` or ``pkgconf`` package is installed
-   and ``PKG_CONFIG_PATH`` is configured properly (or if ``<LIBDIR>/pkgconfig`` is a default
-   search path), the command ``pkg-config --cflags --libs libndn-cxx`` will return all
+-  ``<LIBDIR>/pkgconfig/libndn-cxx.pc``: pkgconfig file storing all necessary flags
+   to build against the library. For example, if ``pkgconf`` is installed and
+   ``PKG_CONFIG_PATH`` is configured properly (or if ``<LIBDIR>/pkgconfig`` is a default
+   search path), the command ``pkgconf --cflags --libs libndn-cxx`` will return all
    necessary compile and link flags for the ndn-cxx library.
 -  ``<BINDIR>/ndnsec``: command-line tool to manage NDN keys and certificates.
 -  ``<BINDIR>/ndnsec-*``: convenience aliases for ``ndnsec`` tools.