summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDhaval Giani <dhaval@linux.vnet.ibm.com>2009-02-16 08:45:54 +0000
committerDhaval Giani <dhaval@linux.vnet.ibm.com>2009-02-16 08:45:54 +0000
commit0c8f9d54c6d49bba08767fb9a1593c5a4b85445b (patch)
treec27e0801842411cac20c95c776fca1045c0dfe9c
parent492bd6ac5f9c703f1687ff8d56bb4a0d014557b8 (diff)
downloadlibcg-0c8f9d54c6d49bba08767fb9a1593c5a4b85445b.tar.gz
libcg-0c8f9d54c6d49bba08767fb9a1593c5a4b85445b.tar.xz
libcg-0c8f9d54c6d49bba08767fb9a1593c5a4b85445b.zip
libcgroup: Add configure option to enable debug output
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
-rw-r--r--config.h.in3
-rwxr-xr-xconfigure18
-rw-r--r--configure.in8
3 files changed, 29 insertions, 0 deletions
diff --git a/config.h.in b/config.h.in
index b0518e2..bfb66f4 100644
--- a/config.h.in
+++ b/config.h.in
@@ -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
diff --git a/configure b/configure
index af6c5d4..2ae9b58 100755
--- 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'
diff --git a/configure.in b/configure.in
index 788877b..48c51e8 100644
--- a/configure.in
+++ b/configure.in
@@ -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