[icinga-checkins] icinga.org: icinga-core/dev/ido: install: add --with-plugin-dir to configure for setting the plugins path accordingly #2344

git at icinga.org git at icinga.org
Sat Feb 25 21:17:38 CET 2012


Module: icinga-core
Branch: dev/ido
Commit: 1ea76636c343ea5850ee949199f435c4acf93767
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=1ea76636c343ea5850ee949199f435c4acf93767

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Thu Feb 23 20:49:07 2012 +0100

install: add --with-plugin-dir to configure for setting the plugins path accordingly #2344

fixes #2344

---

 Changelog                     |    3 +++
 configure                     |   22 ++++++++++++++++++++++
 configure.in                  |   10 ++++++++++
 sample-config/resource.cfg.in |    4 ++--
 subst.in                      |    1 +
 5 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/Changelog b/Changelog
index 03330a2..59a1864 100644
--- a/Changelog
+++ b/Changelog
@@ -14,6 +14,7 @@ ENHANCEMENTS
 * core: allow empty host groups in service and host dependencies if allow_empty_hostgroup_assignment flag is set (Daniel Wittenberg) #2255
 
 * install: add configure option --with-temp-file=<filepath> to set temp_file for icinga.cfg #2121
+* install: add --with-plugin-dir to configure for setting the plugins path accordingly #2344
 
 FIXES
 * core: Plug some macro leaks triggered when sending notifications (Andreas Ericsson) #2109
@@ -29,6 +30,8 @@ CHANGES
 * debug: set debug_verbosity=2 by default
 * install: --with-temp-file=<filepath> #2121
 	** sets path to an Icinga exclusive update temp file i.e. /tmp/icinga.tmp
+* install: --with-plugin-dir=<path> #2344
+	** sets path to plugins directory path i.e. $prefix/libexec
 
 
 
diff --git a/configure b/configure
index 62a85eb..dc98333 100755
--- a/configure
+++ b/configure
@@ -651,6 +651,7 @@ PHPAPIEXTCMDDIR
 EXTCMDFILEDIR
 CGILOGDIR
 LOGDIR
+PLUGINDIR
 TMPFILE
 TMPDIR
 CHECKRESULTDIR
@@ -746,6 +747,7 @@ with_httpd_conf
 with_checkresult_dir
 with_temp_dir
 with_temp_file
+with_plugin_dir
 with_log_dir
 with_cgi_log_dir
 with_phpapi_log_dir
@@ -1447,6 +1449,9 @@ Optional Packages:
   --with-temp-file=<filepath>
                           sets path to an Icinga exclusive update temp file
                           i.e. /tmp/icinga.tmp
+  --with-plugin-dir=<path>
+                          sets path to plugins directory path i.e.
+                          $prefix/libexec
   --with-log-dir=<path>   sets path to logging directory
   --with-cgi-log-dir=<path>
                           sets path to cgi logging directory
@@ -5355,6 +5360,21 @@ if test x$TMPFILE = xno; then
 
 
 
+PLUGINDIR=no
+
+# Check whether --with-plugin-dir was given.
+if test "${with_plugin_dir+set}" = set; then :
+  withval=$with_plugin_dir; PLUGINDIR=$withval
+else
+  PLUGINDIR=no
+fi
+
+if test x$PLUGINDIR = xno; then
+	        PLUGINDIR="$libexecdir"
+	fi
+
+
+
 
 LOGDIR=no
 
@@ -8506,6 +8526,8 @@ $as_echo "        Install \${prefix}:  $prefix" >&6; }
 $as_echo "                Lock file:  $lockfile" >&6; }
 { $as_echo "$as_me:${as_lineno-$LINENO}: result:                 Temp file:  $TMPFILE" >&5
 $as_echo "                Temp file:  $TMPFILE" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result:          Plugin directory:  $PLUGINDIR" >&5
+$as_echo "         Plugin directory:  $PLUGINDIR" >&6; }
 { $as_echo "$as_me:${as_lineno-$LINENO}: result:             Log directory:  $LOGDIR" >&5
 $as_echo "            Log directory:  $LOGDIR" >&6; }
 { $as_echo "$as_me:${as_lineno-$LINENO}: result:         cgi log directory:  $CGILOGDIR" >&5
diff --git a/configure.in b/configure.in
index b62d1f9..0618535 100644
--- a/configure.in
+++ b/configure.in
@@ -326,6 +326,15 @@ if test x$TMPFILE = xno; then
 AC_SUBST(TMPFILE)
 
 
+dnl Location of plugin path
+PLUGINDIR=no
+AC_ARG_WITH(plugin-dir,AC_HELP_STRING([--with-plugin-dir=<path>],[sets path to plugins directory path i.e. $prefix/libexec]),PLUGINDIR=$withval,PLUGINDIR=no)
+if test x$PLUGINDIR = xno; then
+	        PLUGINDIR="$libexecdir"
+	fi
+AC_SUBST(PLUGINDIR)
+
+
 
 dnl ################
 dnl LOG DIRS
@@ -1337,6 +1346,7 @@ fi
 AC_MSG_RESULT([        Install \${prefix}:  $prefix])
 AC_MSG_RESULT([                Lock file:  $lockfile])
 AC_MSG_RESULT([                Temp file:  $TMPFILE])
+AC_MSG_RESULT([         Plugin directory:  $PLUGINDIR])
 AC_MSG_RESULT([            Log directory:  $LOGDIR])
 AC_MSG_RESULT([        cgi log directory:  $CGILOGDIR])
 AC_MSG_RESULT([   Check result directory:  $CHECKRESULTDIR])
diff --git a/sample-config/resource.cfg.in b/sample-config/resource.cfg.in
index 230a5dc..63e26d9 100644
--- a/sample-config/resource.cfg.in
+++ b/sample-config/resource.cfg.in
@@ -23,10 +23,10 @@
 ###########################################################################
 
 # Sets $USER1$ to be the path to the plugins
-$USER1$=@libexecdir@
+$USER1$=@PLUGINDIR@
 
 # Sets $USER2$ to be the path to event handlers
-#$USER2$=@libexecdir@/eventhandlers
+#$USER2$=@PLUGINDIR@/eventhandlers
 
 # Store some usernames and passwords (hidden from the CGIs)
 #$USER3$=someuser
diff --git a/subst.in b/subst.in
index e3143bc..30ce49e 100755
--- a/subst.in
+++ b/subst.in
@@ -28,6 +28,7 @@ while ($f = shift @ARGV) {
 		s|\@sysconfdir\@|@sysconfdir@|g;
 		s|\@LOGDIR\@|@LOGDIR@|g;
 		s|\@CGILOGDIR\@|@CGILOGDIR@|g;
+		s|\@PLUGINDIR\@|@PLUGINDIR@|g;
 		s|\@TMPDIR\@|@TMPDIR@|g;
 		s|\@TMPFILE\@|@TMPFILE@|g;
 		s|\@EXTCMDFILEDIR\@|@EXTCMDFILEDIR@|g;





More information about the icinga-checkins mailing list