@@ -258,6 +258,8 @@ Build and configuration options:
258
258
--disable-cgroups Disable Cgroups support
259
259
--enable-capabilities Enable capabilities support
260
260
[Enabled on Linux if libcap available]
261
+ --enable-capabilties=pkg-config Enable capabilities support after checking libcap availablity
262
+ with pkg-config
261
263
--disable-capabilities Disable capabilities support
262
264
--enable-ioprio Enable support for I/O priority setting (via Linux API)
263
265
[Disabled]
@@ -374,6 +376,7 @@ for arg in "$@"; do
374
376
--enable-cgroups|--enable-cgroups=yes) SUPPORT_CGROUPS=1 ;;
375
377
--disable-cgroups|--enable-cgroups=no) SUPPORT_CGROUPS=0 ;;
376
378
--enable-capabilities|--enable-capabilities=yes) SUPPORT_CAPABILITIES=1 ;;
379
+ --enable-capabilities=pkg-config) SUPPORT_CAPABILITIES=pkg-config ;;
377
380
--disable-capabilities|--enable-capabilities=no) SUPPORT_CAPABILITIES=0 ;;
378
381
--enable-ioprio|--enable-ioprio=yes) SUPPORT_IOPRIO=1 ;;
379
382
--disable-ioprio|--enable-ioprio=no) SUPPORT_IOPRIO=0 ;;
541
544
if [ " $AUTO_LDFLAGS_BASE " = true ] && [ " $PLATFORM " = FreeBSD ]; then
542
545
try_ld_argument LDFLAGS_BASE -lrt
543
546
fi
544
- if [ " $SUPPORT_CAPABILITIES " != 0 ]; then
547
+ if [ " $SUPPORT_CAPABILITIES " = " pkg-config" ]; then
548
+ try_optional_pkgconfig_dependency SUPPORT_CAPABILITIES LDFLAGS_LIBCAP CXXFLAGS libcap
549
+ elif [ " $SUPPORT_CAPABILITIES " != 0 ]; then
545
550
if [ " $AUTO_LDFLAGS_LIBCAP " = true ]; then
546
551
try_ld_argument LDFLAGS_LIBCAP -lcap
547
552
if [ " $SUPPORT_CAPABILITIES " = AUTO ]; then
0 commit comments