]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
libcgroup: Add configure option to enable debug output
authorDhaval Giani <dhaval@linux.vnet.ibm.com>
Mon, 16 Feb 2009 08:45:54 +0000 (08:45 +0000)
committerDhaval Giani <dhaval@linux.vnet.ibm.com>
Mon, 16 Feb 2009 08:45:54 +0000 (08:45 +0000)
From: Jan Safranek <jsafrane@redhat.com>

There is new configure script option, which defines CGROUP_DEBUG.
Usage: ./configure --enable-debug

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@326 4f4bb910-9a46-0410-90c8-c897d4f1cd53

config.h.in
configure
configure.in

index b0518e2ec762d98c7c43edf282c6c5c7de5bed10..bfb66f4bd38642f348839d79b50898e20d558fd8 100644 (file)
@@ -1,5 +1,8 @@
 /* config.h.in.  Generated from configure.in by autoheader.  */
 
+/* Define to enable extra debugging output. */
+#undef CGROUP_DEBUG
+
 /* Define to 1 if your system has a working `chown' function. */
 #undef HAVE_CHOWN
 
index af6c5d4529926f78c61229c103a2e12543e7cb43..2ae9b586a35de524ee32359af0cce4ff2bc72de5 100755 (executable)
--- a/configure
+++ b/configure
@@ -697,6 +697,7 @@ SHELL'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
+enable_debug
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1330,6 +1331,12 @@ if test -n "$ac_init_help"; then
    esac
   cat <<\_ACEOF
 
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-debug          enable extra debugging output [default=no]
+
 Some influential environment variables:
   CXX         C++ compiler command
   CXXFLAGS    C++ compiler flags
@@ -1799,6 +1806,17 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 ac_config_headers="$ac_config_headers config.h"
 
 
+# Process command line options
+# Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then
+  enableval=$enable_debug;
+cat >>confdefs.h <<\_ACEOF
+#define CGROUP_DEBUG /**/
+_ACEOF
+
+fi
+
+
 # Checks for programs.
 ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
index 788877b26d60bc6e60d20a7de92b81b63722d3ea..48c51e8d51ab8a01867531777e53f88f063bfffb 100644 (file)
@@ -18,6 +18,14 @@ AC_INIT([control groups library and utilities], 0.32.2,
 AC_CONFIG_SRCDIR([wrapper.c])
 AC_CONFIG_HEADER([config.h])
 
+# Process command line options
+AC_ARG_ENABLE([debug],
+       [AC_HELP_STRING([--enable-debug],
+               [enable extra debugging output [default=no]])],
+       [AC_DEFINE([CGROUP_DEBUG], [],
+               [Define to enable extra debugging output.])],
+       [])
+
 # Checks for programs.
 AC_PROG_CXX
 AC_PROG_CC