Now these optional features are enabled during applicable layer tests if
their packages appear to be available on the build system. This should
help prevent regressions like the one fixed in recent commit
53ed1a9.
sudo sed --in-place -E 's/# (deb-src.*updates main)/ \1/g' /etc/apt/sources.list
sudo apt-get --quiet=2 update
sudo apt-get --quiet=2 build-dep squid
- sudo apt-get --quiet=2 install linuxdoc-tools libtool-bin ${{ matrix.compiler.CC }} ccache
+ sudo apt-get --quiet=2 install linuxdoc-tools libtool-bin ${{ matrix.compiler.CC }} ccache valgrind
- name: Checkout sources
uses: actions/checkout@v4
action="${1}"
config="${2}"
+# Allow a layer to enable optional default-disabled features when
+# those features are supported in the current build environment
+# (and we can easily detect such support).
+if ${PKG_CONFIG:-pkg-config} --exists 'libecap >= 1.0 libecap < 1.1' 2>/dev/null
+then
+ CONFIGURE_FLAGS_MAYBE_ENABLE_ECAP="--enable-ecap"
+else
+ echo "WARNING: eCAP testing disabled" >&2
+fi
+if ${PKG_CONFIG:-pkg-config} --exists valgrind 2>/dev/null
+then
+ CONFIGURE_FLAGS_MAYBE_ENABLE_VALGRIND="--with-valgrind-debug"
+else
+ echo "WARNING: Valgrind testing disabled" >&2
+fi
+
# cache_file may be set by environment variable
configcache=""
if [ -n "$cache_file" ]; then
# We can't test them automatically everywhere without detecting those
# optional packages first.
#
-# --enable-ecap \
# --enable-epoll \
# --enable-kqueue \
# --enable-win32-service \
-# --with-valgrind-debug \
# --with-gnutls \
# --with-tdb \
# --with-cap \
--enable-build-info=squid\ test\ build \
--enable-ssl-crtd \
--with-openssl \
+ $CONFIGURE_FLAGS_MAYBE_ENABLE_ECAP \
+ $CONFIGURE_FLAGS_MAYBE_ENABLE_VALGRIND \
"
# Fix the distclean testing.
# We can't test them automatically everywhere without detecting those
# optional packages first.
#
-# --enable-ecap \
# --enable-epoll \
# --enable-kqueue \
# --enable-win32-service \
-# --with-valgrind-debug \
# --with-ldap \
#
# --enable-cpu-profiling \ Requires CPU support.
--with-pic \
--with-pthreads \
--enable-build-info=squid\ test\ build \
+ $CONFIGURE_FLAGS_MAYBE_ENABLE_ECAP \
+ $CONFIGURE_FLAGS_MAYBE_ENABLE_VALGRIND \
"
# Fix the distclean testing.