From: Dhaval Giani Date: Mon, 16 Feb 2009 08:45:54 +0000 (+0000) Subject: libcgroup: Add configure option to enable debug output X-Git-Tag: v0.34~118 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c8f9d54c6d49bba08767fb9a1593c5a4b85445b;p=thirdparty%2Flibcgroup.git libcgroup: Add configure option to enable debug output From: Jan Safranek There is new configure script option, which defines CGROUP_DEBUG. Usage: ./configure --enable-debug Signed-off-by: Jan Safranek Signed-off-by: Dhaval Giani git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@326 4f4bb910-9a46-0410-90c8-c897d4f1cd53 --- diff --git a/config.h.in b/config.h.in index b0518e2e..bfb66f4b 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 af6c5d45..2ae9b586 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 788877b2..48c51e8d 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