Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Commit

Permalink
Set INIT_OPTS depending on host OS
Browse files Browse the repository at this point in the history
IssueID #137
  • Loading branch information
andurin committed Oct 20, 2009
1 parent b300d6c commit a9c790c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@

Expand Down
12 changes: 11 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,7 @@ PERLDIR
PERLXSI_O
BASEEXTRALIBS
INITDIR
INIT_OPTS
INSTALLPERLSTUFF
USE_EVENTBROKER
USE_IDOUTILS
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 8 additions & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit a9c790c

Please sign in to comment.