[PATCH 6/7] autotools conversion: commit the rest of the configure.ac changes.

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

 



From: Giorgio <giorgio.nicole@xxxxxxxx>

Mainly the handling of the option '--enable-debug' and the definition of
the cpp variable DEFAULT_INCLUDE_PATH; the definition is written to
the generated header 'config.h', included by all the 'src/*.c'.

Also updated the script 'autogen.sh' to support calling it from a
build directory different from the package root.
---
 autogen.sh   | 10 ++++++++--
 configure.ac | 30 ++++++++++++++++++++++++------
 2 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index a62e737..ce6243c 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,4 +1,10 @@
-#!/bin/bash
+#! /bin/sh
 
-autoreconf -fi;
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+autoreconf -fvi || exit 1
 rm -Rf autom4te*.cache config.h.in~
diff --git a/configure.ac b/configure.ac
index 18f6f51..f36f6ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,13 @@ AC_PREREQ(2.61)
 
 AC_COPYRIGHT([Copyright (c) 2008 Patrick McHardy <kaber@xxxxxxxxx>])
 AC_INIT([nftables], [0.3], [netfilter-devel@xxxxxxxxxxxxxxx])
+AM_INIT_AUTOMAKE([dist-bzip2 dist-xz])
+AM_MAINTAINER_MODE([disable])
+AM_SILENT_RULES([yes])
+AC_CONFIG_MACRO_DIR([m4])
+
 AC_DEFINE([RELEASE_NAME], ["Support Edward Snowden"], [Release name])
+AC_DEFINE_UNQUOTED([DEFAULT_INCLUDE_PATH],["$confdir"],[define DEFAULT_INCLUDE_PATH])
 
 AC_CONFIG_SRCDIR([src/rule.c])
 AC_CONFIG_HEADER([config.h])
@@ -14,10 +20,15 @@ AC_DEFINE([_GNU_SOURCE], [], [Enable various GNU extensions])
 AC_DEFINE([_STDC_FORMAT_MACROS], [], [printf-style format macros])
 
 AC_ARG_ENABLE([debug],
-	      AS_HELP_STRING([--enable-debug], [Enable debugging]),
-	      [CONFIG_DEBUG="$(echo $enableval | cut -b1)"],
-	      [CONFIG_DEBUG="y"])
-AC_SUBST([CONFIG_DEBUG])
+	      AS_HELP_STRING([--enable-debug], [Enable debugging]))
+
+AS_CASE([$enable_debug],
+	[yes],[
+	AC_DEFINE([DEBUG],1,[Debug enabled])
+	DEBUG_CPPFLAGS="-g -DDEBUG"
+	])
+
+AC_SUBST(DEBUG_CPPFLAGS)
 
 # Checks for programs.
 AC_PROG_CC
@@ -123,6 +134,13 @@ AC_TYPE_UINT64_T
 # Checks for library functions.
 AC_CHECK_FUNCS([memmove memset strchr strdup strerror strtoull])
 
-AC_CONFIG_FILES([Makefile Makefile.defs Makefile.rules])
-AC_CONFIG_FILES([src/Makefile doc/Makefile files/Makefile])
+AC_CONFIG_FILES([	Makefile				\
+			src/Makefile				\
+			doc/Makefile				\
+			files/Makefile				\
+			files/nftables/Makefile			\
+			include/Makefile			\
+			include/linux/Makefile			\
+			include/linux/netfilter/Makefile	\
+		])
 AC_OUTPUT
-- 
2.0.1

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




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux