[icinga-checkins] icinga.org: icinga-core/test/core: install: add --enable-cgi-log to configure to enable cgi logging during build #2364

git at icinga.org git at icinga.org
Sat Feb 25 21:13:57 CET 2012


Module: icinga-core
Branch: test/core
Commit: 6a06e5d357de79558de0ece0ddd1bcb5029ff02e
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=6a06e5d357de79558de0ece0ddd1bcb5029ff02e

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Sat Feb 25 20:14:58 2012 +0100

install: add --enable-cgi-log to configure to enable cgi logging during build #2364

refs #2364

---

 Changelog                |    4 ++++
 configure                |   20 ++++++++++++++++++++
 configure.in             |   12 ++++++++++++
 sample-config/cgi.cfg.in |    2 +-
 subst.in                 |    1 +
 5 files changed, 38 insertions(+), 1 deletions(-)

diff --git a/Changelog b/Changelog
index aad7b52..dff7f0b 100644
--- a/Changelog
+++ b/Changelog
@@ -34,6 +34,7 @@ ENHANCEMENTS
 * install: revamp the broker_module entry in icinga.cfg pointing to new module definition #2348
 * install: change idomod extension from .o to .so, make .so the default extension for modules #2354
 * install: add configure target --with-eventhandler-dir and "make install-eventhandlers" for contrib/eventhandlers #2352
+* install: add --enable-cgi-log to configure to enable cgi logging during build #2364
 
 * icinga.spec: use --with-plugin-dir instead of --libexexdir for nagios plugins dir #2344
 * icinga.spec: make aware of the change of idomod.o location and changed extension (now .so) #2350
@@ -85,6 +86,9 @@ CHANGES
 * install: make install-eventhandlers #2352
 	** install sample eventhandlers to defined location
 
+* install: --enable-cgi-log #2364
+	** enables cgi logging (EXPERIMENTAL)
+
 
 1.6.1 - 02/12/2011
 
diff --git a/configure b/configure
index bc29252..9cf89a5 100755
--- a/configure
+++ b/configure
@@ -650,6 +650,7 @@ P1FILELOC
 PHPAPIEXTCMDDIR
 EXTCMDFILEDIR
 CGILOGDIR
+ENABLECGILOG
 LOGDIR
 EVENTHANDLERDIR
 PLUGINDIR
@@ -751,6 +752,7 @@ with_temp_file
 with_plugin_dir
 with_eventhandler_dir
 with_log_dir
+enable_enable_cgi_log
 with_cgi_log_dir
 with_ext_cmd_file_dir
 with_p1_file_dir
@@ -1409,6 +1411,7 @@ 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-cgi-log        enables cgi logging - experimental!!
   --disable-statusmap     disables compilation of statusmap CGI
   --disable-statuswrl     disables compilation of statuswrl (VRML) CGI
   --enable-nanosleep      enables use of nanosleep (instead sleep) in event
@@ -5408,6 +5411,21 @@ if test x$LOGDIR = xno; then
 fi
 
 
+ENABLE_CGILOG=no
+# Check whether --enable-enable-cgi-log was given.
+if test "${enable_enable_cgi_log+set}" = set; then :
+  enableval=$enable_enable_cgi_log; ENABLE_CGILOG=$enableval
+else
+  ENABLE_CGILOG=yes
+fi
+
+if test x$ENABLE_CGILOG = xyes; then
+        ENABLECGILOG=1
+else
+        ENABLECGILOG=0
+fi
+
+
 CGILOGDIR=no
 
 # Check whether --with-cgi-log-dir was given.
@@ -8570,8 +8588,10 @@ $as_echo "         Plugin directory:  $PLUGINDIR" >&6; }
 $as_echo "   Eventhandler directory:  $EVENTHANDLERDIR" >&6; }
 { $as_echo "$as_me:${as_lineno-$LINENO}: result:             Log directory:  $LOGDIR" >&5
 $as_echo "            Log directory:  $LOGDIR" >&6; }
+if test x$ENABLE_CGILOG = xyes; then
 { $as_echo "$as_me:${as_lineno-$LINENO}: result:         cgi log directory:  $CGILOGDIR" >&5
 $as_echo "        cgi log directory:  $CGILOGDIR" >&6; }
+fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result:    Check result directory:  $CHECKRESULTDIR" >&5
 $as_echo "   Check result directory:  $CHECKRESULTDIR" >&6; }
 { $as_echo "$as_me:${as_lineno-$LINENO}: result:            Temp directory:  $TMPDIR" >&5
diff --git a/configure.in b/configure.in
index d76fc8d..84587e5 100644
--- a/configure.in
+++ b/configure.in
@@ -355,6 +355,16 @@ if test x$LOGDIR = xno; then
 fi
 AC_SUBST(LOGDIR)
 
+dnl Enable cgi logging
+ENABLE_CGILOG=no
+AC_ARG_ENABLE(enable-cgi-log,AC_HELP_STRING([--enable-cgi-log],[enables cgi logging - experimental!!]),ENABLE_CGILOG=$enableval,ENABLE_CGILOG=yes)
+if test x$ENABLE_CGILOG = xyes; then
+        ENABLECGILOG=1
+else
+        ENABLECGILOG=0
+fi
+AC_SUBST(ENABLECGILOG)
+
 dnl Location of cgi logging path
 CGILOGDIR=no
 AC_ARG_WITH(cgi-log-dir,AC_HELP_STRING([--with-cgi-log-dir=<path>],[sets path to cgi logging directory]),CGILOGDIR=$withval,CGILOGDIR=no)
@@ -1371,7 +1381,9 @@ AC_MSG_RESULT([            Bin directory:  $bindir])
 AC_MSG_RESULT([         Plugin directory:  $PLUGINDIR])
 AC_MSG_RESULT([   Eventhandler directory:  $EVENTHANDLERDIR])
 AC_MSG_RESULT([            Log directory:  $LOGDIR])
+if test x$ENABLE_CGILOG = xyes; then
 AC_MSG_RESULT([        cgi log directory:  $CGILOGDIR])
+fi
 AC_MSG_RESULT([   Check result directory:  $CHECKRESULTDIR])
 AC_MSG_RESULT([           Temp directory:  $TMPDIR])
 AC_MSG_RESULT([   Ext Cmd file directory:  $EXTCMDFILEDIR])
diff --git a/sample-config/cgi.cfg.in b/sample-config/cgi.cfg.in
index d4d526d..0fd9e2e 100644
--- a/sample-config/cgi.cfg.in
+++ b/sample-config/cgi.cfg.in
@@ -95,7 +95,7 @@ use_pending_states=1
 # WARNING:
 # This log is highly experimental and changes may occure without notice. Use at your own risk!!
 
-use_logging=0
+use_logging=@ENABLECGILOG@
 
 
 # CGI LOG FILE
diff --git a/subst.in b/subst.in
index 0fa06be..33d68ac 100755
--- a/subst.in
+++ b/subst.in
@@ -27,6 +27,7 @@ while ($f = shift @ARGV) {
 		s|\@localstatedir\@|@localstatedir@|g;
 		s|\@sysconfdir\@|@sysconfdir@|g;
 		s|\@LOGDIR\@|@LOGDIR@|g;
+		s|\@ENABLECGILOG\@|@ENABLECGILOG@|g;
 		s|\@CGILOGDIR\@|@CGILOGDIR@|g;
 		s|\@PLUGINDIR\@|@PLUGINDIR@|g;
 		s|\@EVENTHANDLERDIR\@|@EVENTHANDLERDIR@|g;





More information about the icinga-checkins mailing list