[icinga-checkins] icinga.org: icinga-web/master: * Added switch to disable api-check ( fixes #863)

git at icinga.org git at icinga.org
Mon Nov 22 17:12:54 CET 2010


Module: icinga-web
Branch: master
Commit: 397cbd93854550d613bf246fd5c62dd50a87f9e9
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=397cbd93854550d613bf246fd5c62dd50a87f9e9

Author: Marius Hein <marius.hein at netways.de>
Date:   Mon Nov 22 17:12:25 2010 +0100

* Added switch to disable api-check (fixes #863)

---

 configure    |   19 +++++++++++++++++++
 configure.ac |   12 +++++++++++-
 2 files changed, 30 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index 985c142..26b4bd3 100755
--- a/configure
+++ b/configure
@@ -650,6 +650,7 @@ with_web_apache_path
 with_bin_user
 with_bin_group
 with_icinga_api
+with_api_check
 with_db_type
 with_db_host
 with_db_port
@@ -1294,6 +1295,7 @@ Optional Packages:
   --with-bin-group=GROUP  group for all other files (default bin)
   --with-icinga-api=PATH  Path to icinga-api (default
                           /usr/local/icinga/share/icinga-api)
+  --without-api-check     Disable check for an existing icinga api
   --with-db-type=DBTYPE   Type of dbms (default mysql)
   --with-db-host=HOST     Host of dbms (default localhost)
   --with-db-port=PORT     Port of the dbms (default 3306)
@@ -2300,6 +2302,18 @@ fi
 
 
 
+# Check whether --with-api_check was given.
+if test "${with_api_check+set}" = set; then :
+  withval=$with_api_check; api_check=$withval
+else
+  api_check=yes
+
+fi
+
+
+
+if test "x$api_check" = xyes; then :
+
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IcingaApi" >&5
 $as_echo_n "checking for IcingaApi... " >&6; }
 	if  test -e $icinga_api/IcingaApi.php && $GREP -q "class IcingaApi" $icinga_api/IcingaApi.php ; then :
@@ -2309,6 +2323,11 @@ else
    as_fn_error $? "not found" "$LINENO" 5
 fi
 
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** Disable API check ***" >&5
+$as_echo "*** Disable API check ***" >&6; }
+fi
+
 
 # Web database switches
 
diff --git a/configure.ac b/configure.ac
index 403494d..88ec592 100755
--- a/configure.ac
+++ b/configure.ac
@@ -101,7 +101,17 @@ AC_ARG_WITH([icinga_api],
 	icinga_api=/usr/local/icinga/share/icinga-api
 )
 
-ACICINGA_CHECK_API([$icinga_api])
+AC_ARG_WITH([api_check],
+	AS_HELP_STRING([--without-api-check], [Disable check for an existing icinga api]),
+	api_check=$withval,
+	api_check=yes
+)
+
+
+AS_IF([test "x$api_check" = xyes],
+       ACICINGA_CHECK_API([$icinga_api]),
+       AC_MSG_RESULT([*** Disable API check ***]))
+       
 
 # Web database switches
 AC_ARG_WITH([db_type],





More information about the icinga-checkins mailing list