diff options
-rw-r--r-- | config.h.in | 3 | ||||
-rwxr-xr-x | configure | 18 | ||||
-rw-r--r-- | configure.in | 8 |
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 @@ -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 |