diff mbox

[iptables] configure: display summary at end of configure

Message ID 1359154090-11061-1-git-send-email-eric@regit.org
State Superseded
Headers show

Commit Message

Eric Leblond Jan. 25, 2013, 10:48 p.m. UTC
This patch adds a message at the end of configure which displays
the different compilation options and system settings.

An example result is the following:

Iptables Configuration:
  IPv4 support:				yes
  IPv6 support:				yes
  Devel support:			yes
  IPQ support:				no
  Large file support:			yes

Build parameters:
  Static build:				no
  Shared build:				yes
  Installation prefix (--prefix):	/usr/local
  Xtables extension directory:		/usr/local/lib/xtables
  Pkg-config directory:			/usr/local/lib/pkgconfig
  Kernel build directory:		/lib/modules/custom
  Host:					x86_64-unknown-linux-gnu
  GCC binary:				gcc

Signed-off-by: Eric Leblond <eric@regit.org>
---
 configure.ac |   46 +++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 45 insertions(+), 1 deletion(-)

Comments

Jan Engelhardt Jan. 26, 2013, 12:16 a.m. UTC | #1
On Friday 2013-01-25 23:48, Eric Leblond wrote:
>
>Build parameters:
>  Static build:				no
>  Shared build:				yes

--enable-static/shared has a different meaning in iptables:

   Put plugins into executable:           ${enable_static}
   Support plugins via dlopen:            ${enable_shared}
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Mr Dash Four Jan. 27, 2013, 2:09 p.m. UTC | #2
>   Devel support:			yes
>   
What is "Devel" support exactly? Is this supposed to be "Development" 
support? If so, why not spell it in full - it is not as if you are 
constrained in any way and can't put a few extra characters, is it?

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pablo Neira Ayuso June 5, 2013, 2:26 a.m. UTC | #3
Hi Eric,

On Fri, Jan 25, 2013 at 11:48:10PM +0100, Eric Leblond wrote:
> This patch adds a message at the end of configure which displays
> the different compilation options and system settings.
> 
> An example result is the following:
> 
> Iptables Configuration:
>   IPv4 support:				yes
>   IPv6 support:				yes
>   Devel support:			yes
>   IPQ support:				no
>   Large file support:			yes
> 
> Build parameters:
>   Static build:				no
>   Shared build:				yes
>   Installation prefix (--prefix):	/usr/local
>   Xtables extension directory:		/usr/local/lib/xtables
>   Pkg-config directory:			/usr/local/lib/pkgconfig
>   Kernel build directory:		/lib/modules/custom
>   Host:					x86_64-unknown-linux-gnu
>   GCC binary:				gcc

I recovered this patch and push it to master. I mangled it to fix a
conflict with the current tree and added the BPF utils to the display.
Thanks.

Regards.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index ffd088c..13d085e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,7 +49,8 @@  AC_ARG_ENABLE([devel],
 	[Install Xtables development headers]),
 	[enable_devel="$enableval"], [enable_devel="yes"])
 AC_ARG_ENABLE([libipq],
-	AS_HELP_STRING([--enable-libipq], [Build and install libipq]))
+	AS_HELP_STRING([--enable-libipq], [Build and install libipq]),
+	[enable_libipq="$enableval"], [enable_libipq="no"])
 AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH],
 	[Path to the pkgconfig directory [[LIBDIR/pkgconfig]]]),
 	[pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig'])
@@ -107,6 +108,20 @@  if [[ -n "$ksourcedir" ]]; then
 fi;
 pkgdatadir='${datadir}/xtables';
 
+define([EXPAND_VARIABLE],
+[$2=[$]$1
+if test $prefix = 'NONE'; then
+	prefix="/usr/local"
+fi
+while true; do
+  case "[$]$2" in
+    *\[$]* ) eval "$2=[$]$2" ;;
+    *) break ;;
+  esac
+done
+eval "$2=[$]$2"
+])dnl EXPAND_VARIABLE
+
 AC_SUBST([regular_CFLAGS])
 AC_SUBST([regular_CPPFLAGS])
 AC_SUBST([noundef_LDFLAGS])
@@ -129,3 +144,32 @@  AC_CONFIG_FILES([Makefile extensions/GNUmakefile include/Makefile
 	libxtables/Makefile utils/Makefile
 	include/xtables-version.h include/iptables/internal.h])
 AC_OUTPUT
+
+
+EXPAND_VARIABLE(xtlibdir, e_xtlibdir)
+EXPAND_VARIABLE(pkgconfigdir, e_pkgconfigdir)
+
+echo "
+Iptables Configuration:
+  IPv4 support:				${enable_ipv4}
+  IPv6 support:				${enable_ipv6}
+  Devel support:			${enable_devel}
+  IPQ support:				${enable_libipq}
+  Large file support:			${enable_largefile}
+
+Build parameters:
+  Static build:				${enable_static}
+  Shared build:				${enable_shared}
+  Installation prefix (--prefix):	${prefix}
+  Xtables extension directory:		${e_xtlibdir}
+  Pkg-config directory:			${e_pkgconfigdir}"
+
+if [[ -n "$ksourcedir" ]]; then
+	echo "  Kernel source directory:		${ksourcedir}"
+fi;
+if [[ -n "$kbuilddir" ]]; then
+	echo "  Kernel build directory:		${kbuilddir}"
+fi;
+
+echo "  Host:					${host}
+  GCC binary:				${CC}"