Re: unrecognized options: --without-capng

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07 Apr 2016 16:00, Marcus Hoffmann wrote:
> Dear all,
> in experimenting a bit with configure options I found the
> --without-capng option (as reported by configure --help) giving the
> following warning (and having no effect):
> > configure: WARNING: unrecognized options: --without-capng
> 
> Looking into configure.ac I found the option should probably be named
> --without-cap_ng (AC_ARG_WITH([cap_ng],...).

yes, the help string is wrong.  it should be:
--- a/configure.ac
+++ b/configure.ac
@@ -1182,7 +1182,7 @@ AC_CHECK_FUNCS([setns])
 
 
 AC_ARG_WITH([cap_ng],
-  AS_HELP_STRING([--without-capng], [compile without libcap-ng]),
+  AS_HELP_STRING([--without-cap-ng], [compile without libcap-ng]),
   [], [with_cap_ng=auto]
 )
 AS_IF([test "x$with_cap_ng" = xno], [have_cap_ng=no],[

> But using this the configure script dies with the following message:
> 
> > configure: error: conditional "HAVE_CAP_NG" was never defined.
> > Usually this means the macro was only invoked conditionally.
> 
> --without-cap-ng produces the same result.
> 
> I tried fiddling around with the autoconf macros but got no further than
> that.

the helper macros can sometimes obscure things

--- a/configure.ac
+++ b/configure.ac
@@ -1189,7 +1189,10 @@ AC_ARG_WITH([cap_ng],
   AS_HELP_STRING([--without-capng], [compile without libcap-ng]),
   [], [with_cap_ng=auto]
 )
-AS_IF([test "x$with_cap_ng" = xno], [have_cap_ng=no],[
+AS_IF([test "x$with_cap_ng" = xno], [
+  AM_CONDITIONAL([HAVE_CAP_NG], [false])
+  have_cap_ng=no
+],[
   UL_CHECK_LIB([cap-ng], [capng_apply], [cap_ng])
 ])
 
-mike
From 110c2c94c59742e9879f2f39e6aec79925dc1592 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@xxxxxxxxxx>
Date: Thu, 7 Apr 2016 12:17:43 -0400
Subject: [PATCH] build-sys: fix cap-ng configure flag handling

Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx>
---
 configure.ac | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index e42a2c4..9e0e28b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1186,10 +1186,13 @@ AC_CHECK_FUNCS([setns])
 
 
 AC_ARG_WITH([cap_ng],
-  AS_HELP_STRING([--without-capng], [compile without libcap-ng]),
+  AS_HELP_STRING([--without-cap-ng], [compile without libcap-ng]),
   [], [with_cap_ng=auto]
 )
-AS_IF([test "x$with_cap_ng" = xno], [have_cap_ng=no],[
+AS_IF([test "x$with_cap_ng" = xno], [
+  AM_CONDITIONAL([HAVE_CAP_NG], [false])
+  have_cap_ng=no
+],[
   UL_CHECK_LIB([cap-ng], [capng_apply], [cap_ng])
 ])
 
-- 
2.7.4

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux