[icinga-checkins] icinga.org: icinga-core/master: Set INIT_OPTS depending on host OS

git at icinga.org git at icinga.org
Tue Oct 20 23:20:22 CEST 2009


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

Author: Hendrik Baecker <andurin at process-zero.de>
Date:   Tue Oct 20 23:20:19 2009 +0200

Set INIT_OPTS depending on host OS

IssueID #137

---

 Changelog    |    1 +
 Makefile.in  |    2 +-
 configure    |   12 +++++++++++-
 configure.in |    8 ++++++++
 4 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/Changelog b/Changelog
index fa915f4..c5a4689 100644
--- a/Changelog
+++ b/Changelog
@@ -34,6 +34,7 @@ Icinga 0.8.x Change Log
 * core init: delete 'su' usage since all previously su touched files were created by the icinga user
 * idoutils: fix unescape bug during tabstops
 * idoutils: fix idomod/icinga segfault while try to use ssl on unix sockets
+* core configure: set INIT_OPTS depending on detected host OS (no more root:root on FreeBSD?)
 
 0.8.4 - 09/15/2009
 * idoutils: fix failure_prediction_options in tables hosts, services for postgres
diff --git a/Makefile.in b/Makefile.in
index 9354eed..f7be9de 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -36,7 +36,7 @@ INSTALL_OPTS=@INSTALL_OPTS@
 COMMAND_OPTS=@COMMAND_OPTS@
 HTTPD_CONF=@HTTPD_CONF@
 INIT_DIR=@init_dir@
-INIT_OPTS=-o root -g root
+INIT_OPTS=@INIT_OPTS@
 CGICFGDIR=$(CGIDIR)
 PERLDIR=@PERLDIR@
 
diff --git a/configure b/configure
index 736714c..7d29aaf 100755
--- a/configure
+++ b/configure
@@ -728,6 +728,7 @@ PERLDIR
 PERLXSI_O
 BASEEXTRALIBS
 INITDIR
+INIT_OPTS
 INSTALLPERLSTUFF
 USE_EVENTBROKER
 USE_IDOUTILS
@@ -7644,33 +7645,40 @@ echo $ECHO_N "checking for linker flags for loadable modules... $ECHO_C" >&6; }
 	case $host_os in
 		solaris2*|sysv4*)
 			MOD_LDFLAGS="-G"
+			INIT_OPTS="-o root -g root"
 		;;
 		aix4*|aix5*)
 			#MOD_LDFLAGS="-G -bnoentry -bexpall"
 			MOD_LDFLAGS="-G -bM:SRE -bnoentry -bexpall"
+			INIT_OPTS="-o root -g root"
 		;;
 		freebsd2*)
 			# Non-ELF GNU linker
 			MOD_LDFLAGS="-Bshareable"
+			INIT_OPTS="-o root -g wheel"
 		;;
 		darwin*)
 			# Mach-O linker, a shared lib and a loadable
 			# object file is not the same thing.
 			MOD_LDFLAGS="-bundle -flat_namespace -undefined suppress"
 			MOD_CFLAGS="$MOD_CFLAGS -fno-common"
+			INIT_OPTS="-o root -g root"
 		;;
 		linux* | k*bsd*-gnu*)
 			# assume GNU linker and ELF
 			MOD_LDFLAGS="-shared"
 			MOD_CFLAGS="-fPIC"
+			INIT_OPTS="-o root -g root"
 		;;
 		freebsd*)
 			MOD_LDFLAGS="-shared"
 			MOD_CFLAGS="-fPIC"
+			INIT_OPTS="-o root -g wheel"
 		;;
 		*)
 			# assume GNU linker and ELF
 			MOD_LDFLAGS="-shared"
+			INIT_OPTS="-o root -g root"
 		;;
 	esac
 	{ echo "$as_me:$LINENO: result: $MOD_LDFLAGS" >&5
@@ -8162,6 +8170,7 @@ fi
 
 
 
+
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
 { echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -9090,6 +9099,7 @@ PERLDIR!$PERLDIR$ac_delim
 PERLXSI_O!$PERLXSI_O$ac_delim
 BASEEXTRALIBS!$BASEEXTRALIBS$ac_delim
 INITDIR!$INITDIR$ac_delim
+INIT_OPTS!$INIT_OPTS$ac_delim
 INSTALLPERLSTUFF!$INSTALLPERLSTUFF$ac_delim
 USE_EVENTBROKER!$USE_EVENTBROKER$ac_delim
 USE_IDOUTILS!$USE_IDOUTILS$ac_delim
@@ -9100,7 +9110,7 @@ LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 25; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 26; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/configure.in b/configure.in
index 3769514..c9b8ade 100644
--- a/configure.in
+++ b/configure.in
@@ -607,33 +607,40 @@ if test x$USE_EVENTBROKER = xyes; then
 	case $host_os in
 		solaris2*|sysv4*)
 			MOD_LDFLAGS="-G"
+			INIT_OPTS="-o root -g root"
 		;;
 		aix4*|aix5*)
 			#MOD_LDFLAGS="-G -bnoentry -bexpall"
 			MOD_LDFLAGS="-G -bM:SRE -bnoentry -bexpall"
+			INIT_OPTS="-o root -g root"
 		;;
 		freebsd2*)
 			# Non-ELF GNU linker
 			MOD_LDFLAGS="-Bshareable"
+			INIT_OPTS="-o root -g wheel"
 		;;
 		darwin*)
 			# Mach-O linker, a shared lib and a loadable
 			# object file is not the same thing.
 			MOD_LDFLAGS="-bundle -flat_namespace -undefined suppress"
 			MOD_CFLAGS="$MOD_CFLAGS -fno-common"
+			INIT_OPTS="-o root -g root"
 		;;
 		linux* | k*bsd*-gnu*)
 			# assume GNU linker and ELF
 			MOD_LDFLAGS="-shared"
 			MOD_CFLAGS="-fPIC"
+			INIT_OPTS="-o root -g root"
 		;;
 		freebsd*)
 			MOD_LDFLAGS="-shared"
 			MOD_CFLAGS="-fPIC"
+			INIT_OPTS="-o root -g wheel"
 		;;
 		*)
 			# assume GNU linker and ELF
 			MOD_LDFLAGS="-shared"
+			INIT_OPTS="-o root -g root"
 		;;
 	esac
 	AC_MSG_RESULT([$MOD_LDFLAGS])
@@ -862,6 +869,7 @@ AC_SUBST(PERLDIR)
 AC_SUBST(PERLXSI_O)
 AC_SUBST(BASEEXTRALIBS)
 AC_SUBST(INITDIR)
+AC_SUBST(INIT_OPTS)
 AC_SUBST(INSTALLPERLSTUFF)
 AC_SUBST(USE_EVENTBROKER)
 AC_SUBST(USE_IDOUTILS)





More information about the icinga-checkins mailing list