Przeglądaj źródła

Changes to prepare to use NagiosEnterprises/autoconf-macros

John C. Frickson 9 lat temu
rodzic
commit
7f7c0e897f

+ 7 - 7
aclocal.m4

@@ -1,7 +1,7 @@
-m4_include([build-aux/ax_nagios_get_os])
-m4_include([build-aux/ax_nagios_get_distrib])
-m4_include([build-aux/ax_nagios_get_init])
-m4_include([build-aux/ax_nagios_get_inetd])
-m4_include([build-aux/ax_nagios_get_paths])
-m4_include([build-aux/ax_nagios_get_files])
-m4_include([build-aux/ax_nagios_get_ssl])
+m4_include([macros/ax_nagios_get_os])
+m4_include([macros/ax_nagios_get_distrib])
+m4_include([macros/ax_nagios_get_init])
+m4_include([macros/ax_nagios_get_inetd])
+m4_include([macros/ax_nagios_get_paths])
+m4_include([macros/ax_nagios_get_files])
+m4_include([macros/ax_nagios_get_ssl])

+ 0 - 154
build-aux/ax_nagios_get_distrib

@@ -1,154 +0,0 @@
-# ===========================================================================
-# SYNOPSIS
-#
-#   AX_NAGIOS_GET_DISTRIB_TYPE
-#
-# DESCRIPTION
-#
-#    This macro determines the O/S distribution of the computer it is run on.
-#    $dist_type will be set and will be one of:
-#        unknown (could not be determined)
-#        freebsd, netbsd, openbsd, dragonfly, etc (The BSDs)
-#        suse, rh, debian, gentoo (and possibly their descendants)
-#        Other major Linux distributions (and possibly their descendants)
-#        The O/S name for the rest
-#
-# LICENSE
-#
-#    Copyright (c) 2016 Nagios Core Development Team
-#
-#   This program is free software; you can redistribute it and/or modify it
-#   under the terms of the GNU General Public License as published by the
-#   Free Software Foundation; either version 2 of the License, or (at your
-#   option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-#   Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License along
-#   with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-#   As a special exception, the respective Autoconf Macro's copyright owner
-#   gives unlimited permission to copy, distribute and modify the configure
-#   scripts that are the output of Autoconf when processing the Macro. You
-#   need not follow the terms of the GNU General Public License when using
-#   or distributing such scripts, even though portions of the text of the
-#   Macro appear in them. The GNU General Public License (GPL) does govern
-#   all other use of the material that constitutes the Autoconf Macro.
-#
-#   This special exception to the GPL applies to versions of the Autoconf
-#   Macro released by the Autoconf Archive. When you make and distribute a
-#   modified version of the Autoconf Macro, you may extend this special
-#   exception to the GPL to apply to your modified version as well.
-# ===========================================================================
-
-AU_ALIAS([AC_NAGIOS_GET_DISTRIB_TYPE], [AX_NAGIOS_GET_DISTRIB_TYPE])
-AC_DEFUN([AX_NAGIOS_GET_DISTRIB_TYPE],
-[
-#
-# Get user hints for possible cross-compile
-#
-	AC_MSG_CHECKING(what the distribution type is )
-	AC_ARG_WITH(dist-type, AC_HELP_STRING([--with-dist-type=type],
-	[specify distribution type (suse, rh, debian, etc.)]),
-		[
-			#
-			# Run this if --with was specified
-			#
-			if test "x$withval" = x -o x$withval = xno; then
-				dist_type_wanted=yes
-			else
-				dist_type_wanted=no
-				dist_type="$withval"
-				dist_ver="unknown"
-				AC_MSG_RESULT($dist_type)
-			fi
-		], [
-			#
-			# Run this if --with was not specified
-			#
-			dist_type_wanted=yes
-		])
-
-		if test x$dist_type = xno; then
-			dist_type_wanted=yes
-		elif test x$dist_type = xyes; then
-			AC_MSG_ERROR([you must enter a distribution type if '--with-dist-type' is specified])
-		fi
-
-		#
-		# Determine distribution type if it wasn't supplied
-		#
-		dist_ver="unknown"
-
-		if test $dist_type_wanted=yes; then
-			dist_type="unknown"
-
-			if test "$opsys" != "linux"; then
-				dist_type="$opsys"
-				AS_CASE([$opsys],
-					[bsd],
-						dist_type=`uname -s | tr ["[A-Z]" "[a-z]"]`
-						dist_ver=`uname -r`,
-					[aix|hp-ux],
-						dist_ver=$OSTYPE,
-					[solaris],
-						dist_ver=`echo $OSTYPE | cut -d'.' -f2`,
-					[*],
-						dist_ver=$OSTYPE
-				)
-
-			else
-
-				if test -r "/etc/gentoo-release"; then
-					dist_type="gentoo"
-					dist_ver=`cat /etc/gentoo-release`
-
-				elif test -r "/etc/os-release"; then
-					. /etc/os-release
-					if test x"$ID_LIKE" != x; then
-						dist_type=`echo $ID_LIKE | cut -d' ' -f1 | tr ["[A-Z]" "[a-z]"]`
-					elif test x"$ID" = xol; then
-						dist_type=rh
-					else
-						dist_type=`echo $ID | tr ["[A-Z]" "[a-z]"]`
-					fi
-					if test x"$dist_type" = sles; then
-						dist_type=suse
-					fi
-					if test x"$VERSION_ID" != x; then
-						dist_ver=$VERSION_ID
-					elif test x"$VERSION" != x; then
-						dist_ver=`echo $VERSION | cut -d'.' -f1 | tr -d [:alpha:][:blank:][:punct:]`
-					fi
-
-				elif test -r "/etc/redhat-release"; then
-					dist_type=rh
-					dist_ver=`cat /etc/redhat-release`
-
-				elif test -r "/etc/debian_version"; then
-					dist_type="debian"
-					if test -r "/etc/lsb-release"; then
-						. /etc/lsb-release
-						dist_ver=`echo "$DISTRIB_RELEASE"`
-					else
-						dist_ver=`cat /etc/debian_version`
-					fi
-
-				elif test -r "/etc/SuSE-release"; then
-					dist_type=suse
-					dist_ver=`grep VERSION /etc/SuSE-release`
-
-				fi
-
-			fi
-
-			if test "$dist_ver" != "unknown"; then
-				dist_ver=`echo "$dist_ver" | cut -d'.' -f1 | tr -d [:alpha:][:blank:][:punct:]`
-			fi
-		fi
-
-		AC_MSG_RESULT($dist_type)
-])

+ 0 - 126
build-aux/ax_nagios_get_files

@@ -1,126 +0,0 @@
-# ===========================================================================
-# SYNOPSIS
-#
-#   AX_NAGIOS_GET_FILES
-#
-# DESCRIPTION
-#
-#    This macro figures out which init and/or inetd files to use based
-#    on the results of the AX_NAGIOS_GET_OS, AX_NAGIOS_GET_DISTRIB_TYPE,
-#    AX_NAGIOS_GET_INIT and AX_NAGIOS_GET_INETD macros. It will select
-#    the appropriate files(s) from the 'startup' directory and copy it.
-#
-# LICENSE
-#
-#    Copyright (c) 2016 Nagios Core Development Team
-#
-#   This program is free software; you can redistribute it and/or modify it
-#   under the terms of the GNU General Public License as published by the
-#   Free Software Foundation; either version 2 of the License, or (at your
-#   option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-#   Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License along
-#   with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-#   As a special exception, the respective Autoconf Macro's copyright owner
-#   gives unlimited permission to copy, distribute and modify the configure
-#   scripts that are the output of Autoconf when processing the Macro. You
-#   need not follow the terms of the GNU General Public License when using
-#   or distributing such scripts, even though portions of the text of the
-#   Macro appear in them. The GNU General Public License (GPL) does govern
-#   all other use of the material that constitutes the Autoconf Macro.
-#
-#   This special exception to the GPL applies to versions of the Autoconf
-#   Macro released by the Autoconf Archive. When you make and distribute a
-#   modified version of the Autoconf Macro, you may extend this special
-#   exception to the GPL to apply to your modified version as well.
-# ===========================================================================
-
-AU_ALIAS([AC_NAGIOS_GET_FILES], [AX_NAGIOS_GET_FILES])
-AC_DEFUN([AX_NAGIOS_GET_FILES],
-[
-
-src_inetd=""
-src_init=""
-bsd_enable=""
-
-AC_MSG_CHECKING(for which init file to use )
-
-AS_CASE([$init_type],
-
-	[sysv],
-		src_init=default-init,
-
-	[systemd],
-		src_tmpfile=tmpfile.conf
-		src_init=default-service,
-
-	[bsd],
-		src_init=bsd-init,
-
-	[newbsd],
-		if test $dist_type = freebsd ; then
-			bsd_enable="_enable"
-			src_init=newbsd-init
-		elif test $dist_type = openbsd ; then
-			bsd_enable="_flags"
-			src_init=openbsd-init
-		elif test $dist_type = netbsd ; then
-			bsd_enable=""
-			src_init=newbsd-init
-		fi,
-
-#	[gentoo],
-
-	[openrc],
-		src_init=openrc-init,
-
-	[smf*],
-		src_init="solaris-init.xml"
-		src_inetd="solaris-inetd.xml",
-
-	[upstart],
-		if test $dist_type = rh ; then
-			src_init=rh-upstart-init
-		else
-			src_init=upstart-init
-		fi,
-
-	[launchd],
-		src_init="mac-init.plist"
-
-	[*],
-		src_init="unknown"
-)
-AC_MSG_RESULT($src_init)
-
-AC_MSG_CHECKING(for which inetd files to use )
-
-if test x$src_inetd = x; then
-
-	AS_CASE([$inetd_type],
-		[inetd*],
-			src_inetd=default-inetd,
-
-		[xinetd],
-			src_inetd=default-xinetd,
-
-		[systemd],
-			src_inetd=default-socket,
-
-		[launchd],
-			src_inetd="mac-inetd.plist",
-
-		[*],
-			src_inetd="unknown"
-	)
-
-fi
-AC_MSG_RESULT($src_inetd)
-
-])

+ 0 - 142
build-aux/ax_nagios_get_inetd

@@ -1,142 +0,0 @@
-# ===========================================================================
-# SYNOPSIS
-#
-#   AX_NAGIOS_GET_INETD
-#
-# DESCRIPTION
-#
-#    This macro determines whether inetd or xinetd is being used
-#    The argument are:
-#        the init type as determined by AX_NAGIOS_GET_INIT
-#    $inetd_type will be set and will be one of:
-#        unknown (could not be determined)
-#        launchd (Mac OS X)
-#        smf10   (Solaris)
-#        smf11   (Solaris)
-#        upstart (Older Debian)
-#        xinetd  (Most Linux, BSD)
-#        inetd   (The rest)
-#
-# LICENSE
-#
-#    Copyright (c) 2016 Nagios Core Development Team
-#
-#   This program is free software; you can redistribute it and/or modify it
-#   under the terms of the GNU General Public License as published by the
-#   Free Software Foundation; either version 2 of the License, or (at your
-#   option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-#   Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License along
-#   with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-#   As a special exception, the respective Autoconf Macro's copyright owner
-#   gives unlimited permission to copy, distribute and modify the configure
-#   scripts that are the output of Autoconf when processing the Macro. You
-#   need not follow the terms of the GNU General Public License when using
-#   or distributing such scripts, even though portions of the text of the
-#   Macro appear in them. The GNU General Public License (GPL) does govern
-#   all other use of the material that constitutes the Autoconf Macro.
-#
-#   This special exception to the GPL applies to versions of the Autoconf
-#   Macro released by the Autoconf Archive. When you make and distribute a
-#   modified version of the Autoconf Macro, you may extend this special
-#   exception to the GPL to apply to your modified version as well.
-# ===========================================================================
-
-AU_ALIAS([AC_NAGIOS_GET_INETD], [AX_NAGIOS_GET_INETD])
-AC_DEFUN([AX_NAGIOS_GET_INETD],
-[
-#
-# Get user hints for possible cross-compile
-#
-	AC_MSG_CHECKING(what inetd is being used )
-	AC_ARG_WITH(inetd_type, AC_HELP_STRING([--with-inetd-type=type],
-	[which super-server the system runs (inetd, xinetd, systemd, launchd,
-	 smf10, smf11, etc.)]),
-		[
-			inetd_type_wanted=yes
-			#
-			# Run this if --with was specified
-			#
-			if test "x$withval" = x -o x$withval = xno; then
-				inetd_type_wanted=yes
-			else
-				inetd_type_wanted=no
-				inetd_type="$withval"
-				AC_MSG_RESULT($inetd_type)
-			fi
-		], [
-			#
-			# Run this if --with was not specified
-			#
-			inetd_type_wanted=yes
-		])
-
-		if test x$inetd_type = xno; then
-			inetd_type_wanted=yes
-		elif test x$inetd_type = xyes; then
-			AC_MSG_ERROR([you must enter an inetd type if '--with-inetd-type' is specified])
-		fi
-
-		#
-		# Determine inetd type if it wasn't supplied
-		#
-		if test $inetd_type_wanted = yes; then
-
-			inetd_disabled=""
-
-			if test x"$init_type" = "xupstart"; then
-				inetd_type="upstart"
-			elif test "$opsys" = "osx"; then
-				inetd_type="launchd"
-			fi
-
-			if test x"$inetd_type" = x; then
-				AS_CASE([$dist_type],
-					[solaris],
-						if test x"$init_type" = "xsmf10" -o x"$init_type" = "xsmf11"; then
-							inetd_type="$init_type"
-						else
-							inetd_type="inetd"
-						fi,
-
-					[*bsd*],
-						inetd_type=`ps -A -o comm -c | grep inetd`,
-
-					[aix|hp-ux],
-						inetd_type=`UNIX95= ps -A -o comm | grep inetd | head -1`,
-
-					[*],
-						inetd_type=[`ps -C "inetd,xinetd" -o fname | grep -vi COMMAND`])
-			fi
-
-			if test x"$inetd_type" = x; then
-				if test -f /etc/xinetd.conf -a -d /etc/xinetd.d; then
-					inetd_disabled="(Not running)"
-					inetd_type=xinetd
-				elif test -f /etc/inetd.conf -o -f /usr/sbin/inetd; then
-					inetd_type=inetd
-					inetd_disabled="(Not running)"
-				fi
-			fi
-
-			if test x"$inetd_type" = x; then
-				if test x"$init_type" = "xsystemd"; then
-					inetd_type="systemd"
-				else
-					inetd_type="unknown"
-				fi
-			fi
-
-			if test -n "$inetd_disabled"; then
-				AC_MSG_RESULT($inetd_type $inetd_disabled)
-			else
-				AC_MSG_RESULT($inetd_type)
-			fi
-		fi
-])

+ 0 - 192
build-aux/ax_nagios_get_init

@@ -1,192 +0,0 @@
-# ===========================================================================
-# SYNOPSIS
-#
-#   AX_NAGIOS_GET_INIT
-#
-# DESCRIPTION
-#
-#    This macro determines the O/S distribution of the computer it is run on.
-#    $init_type will be set and will be one of:
-#        unknown (could not be determined)
-#        launchd (Mac OS X)
-#        bsd     (Slackware Linux)
-#        newbsd  (FreeBSD, OpenBSD, NetBSD, Dragonfly, etc)
-#        smf10   (Solaris)
-#        smf11   (Solaris)
-#        systemd (Linux SystemD)
-#        gentoo  (Older Gentoo)
-#        openrc  (Recent Gentoo and some others)
-#        upstart (Older Debian)
-#        sysv    (The rest)
-#
-# LICENSE
-#
-#    Copyright (c) 2016 Nagios Core Development Team
-#
-#   This program is free software; you can redistribute it and/or modify it
-#   under the terms of the GNU General Public License as published by the
-#   Free Software Foundation; either version 2 of the License, or (at your
-#   option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-#   Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License along
-#   with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-#   As a special exception, the respective Autoconf Macro's copyright owner
-#   gives unlimited permission to copy, distribute and modify the configure
-#   scripts that are the output of Autoconf when processing the Macro. You
-#   need not follow the terms of the GNU General Public License when using
-#   or distributing such scripts, even though portions of the text of the
-#   Macro appear in them. The GNU General Public License (GPL) does govern
-#   all other use of the material that constitutes the Autoconf Macro.
-#
-#   This special exception to the GPL applies to versions of the Autoconf
-#   Macro released by the Autoconf Archive. When you make and distribute a
-#   modified version of the Autoconf Macro, you may extend this special
-#   exception to the GPL to apply to your modified version as well.
-# ===========================================================================
-
-AU_ALIAS([AC_NAGIOS_GET_INIT], [AX_NAGIOS_GET_INIT])
-AC_DEFUN([AX_NAGIOS_GET_INIT],
-[
-#
-# Get user hints for possible cross-compile
-#
-	AC_MSG_CHECKING(what init system is being used )
-	AC_ARG_WITH(init_type,AC_HELP_STRING([--with-init-type=type],
-	 [specify init type (bsd, sysv, systemd, launchd, smf10, smf11, upstart,
-		openrc, etc.)]),
-		[
-			#
-			# Run this if --with was specified
-			#
-			if test "x$withval" = x -o x$withval = xno; then
-					init_type_wanted=yes
-			else
-					init_type_wanted=no
-					init_type="$withval"
-					AC_MSG_RESULT($init_type)
-			fi
-		], [
-			#
-			# Run this if --with was not specified
-			#
-			init_type_wanted=yes
-		])
-
-		if test x$init_type = xno; then
-			init_type_wanted=yes
-		elif test x$init_type = xyes; then
-			AC_MSG_ERROR([you must enter an init type if '--with-init-type' is specified])
-		fi
-
-		#
-		# Determine init type if it wasn't supplied
-		#
-		if test $init_type_wanted = yes; then
-			init_type=""
-
-			if test x"$opsys" = x; then
-				init_type="unknown"
-				init_type_wanted=no
-			elif test x"$dist_type" = x; then
-				init_type="unknown"
-				init_type_wanted=no
-			elif test "$opsys" = "osx"; then
-				init_type="launchd"
-				init_type_wanted=no
-			elif test "$opsys" = "bsd"; then
-				init_type="newbsd"
-				init_type_wanted=no
-			elif test "$dist_type" = "solaris"; then
-				if test -d "/lib/svc/manifest"; then
-					init_type="smf11"
-					init_type_wanted=no
-				elif test -d "/lib/svc/monitor"; then
-					init_type="smf10"
-					init_type_wanted=no
-				else
-					init_type="sysv"
-					init_type_wanted=no
-				fi
-			elif test "$dist_type" = "slackware"; then
-				init_type="bsd"
-				init_type_wanted=no
-			fi
-		fi
-
-		PSCMD="ps -p1 -o args"
-		AS_CASE([$dist_type],
-			[aix],		PSCMD="env UNIX95=1; ps -p1 -o args",
-			[solaris],	PSCMD="env UNIX95=1; ps -p1 -o args",
-			[hp-ux],	PSCMD="env UNIX95=1; ps -p1 -o args")
-
-		if test "$init_type_wanted" = yes; then
-			pid1=`$PSCMD | grep -vi COMMAND | cut -d' ' -f1`
-			if test x"$pid1" = "x"; then
-				init_type="unknown"
-				init_type_wanted=no
-			fi
-			if `echo $pid1 | grep "systemd" > /dev/null`; then
-				init_type="systemd"
-				init_type_wanted=no
-			fi
-
-			if test "$init_type_wanted" = yes; then
-				if test "$pid1" = "init"; then
-					if test -e "/sbin/init"; then
-						pid1="/sbin/init";
-					elif test -e "/usr/sbin/init"; then
-						pid1="/usr/sbin/init"
-					else
-						init_type="unknown"
-						init_type_wanted=no
-					fi
-				fi
-				if test -L "$pid1"; then
-					pid1=`readlink "$pid1"`
-				fi
-			fi
-
-			if test "$init_type_wanted" = yes; then
-				if `echo $pid1 | grep "systemd" > /dev/null`; then
-					init_type="systemd"
-					init_type_wanted=no
-				elif test -f "/sbin/rc"; then
-					if test -f /sbin/runscript; then
-						init_type_wanted=no
-						if `/sbin/start-stop-daemon -V | grep "OpenRC" > /dev/null`; then
-							init_type="openrc"
-						else
-							init_type="gentoo"
-						fi
-					fi
-				fi
-			fi
-
-			if test "$init_type_wanted" = yes; then
-				if test "$pid1" = "/sbin/init" -o "$pid1" = "/usr/sbin/init"; then
-					if `/sbin/init --version 2>/dev/null | grep "upstart" >/dev/null`; then
-						init_type="upstart"
-						init_type_wanted=no
-					elif test -f "/etc/rc" -a ! -L "/etc/rc"; then
-						init_type="newbsd"
-						init_type_wanted=no
-					else
-						init_type="sysv"
-						init_type_wanted=no
-					fi
-				fi
-			fi
-
-			if test "$init_type_wanted" = yes; then
-				init_type="unknown"
-			fi
-		fi
-
-		AC_MSG_RESULT($init_type)
-])

+ 0 - 97
build-aux/ax_nagios_get_os

@@ -1,97 +0,0 @@
-# ===========================================================================
-# SYNOPSIS
-#
-#   AX_NAGIOS_GET_OS
-#
-# DESCRIPTION
-#
-#    This macro determines the operating system of the computer it is run on.
-#
-# LICENSE
-#
-#    Copyright (c) 2016 Nagios Core Development Team
-#
-#   This program is free software; you can redistribute it and/or modify it
-#   under the terms of the GNU General Public License as published by the
-#   Free Software Foundation; either version 2 of the License, or (at your
-#   option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-#   Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License along
-#   with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-#   As a special exception, the respective Autoconf Macro's copyright owner
-#   gives unlimited permission to copy, distribute and modify the configure
-#   scripts that are the output of Autoconf when processing the Macro. You
-#   need not follow the terms of the GNU General Public License when using
-#   or distributing such scripts, even though portions of the text of the
-#   Macro appear in them. The GNU General Public License (GPL) does govern
-#   all other use of the material that constitutes the Autoconf Macro.
-#
-#   This special exception to the GPL applies to versions of the Autoconf
-#   Macro released by the Autoconf Archive. When you make and distribute a
-#   modified version of the Autoconf Macro, you may extend this special
-#   exception to the GPL to apply to your modified version as well.
-# ===========================================================================
-
-AU_ALIAS([AC_NAGIOS_GET_OS], [AX_NAGIOS_GET_OS])
-AC_DEFUN([AX_NAGIOS_GET_OS],
-[
-#
-# Get user hints
-#
-	AC_MSG_CHECKING(what the operating system is )
-	AC_ARG_WITH(opsys, AC_HELP_STRING([--with-opsys=OS],
-	[specify operating system (linux, osx, bsd, solaris, irix, cygwin,
-	 aix, hp-ux, etc.)]),
-		[
-			#
-			# Run this if --with was specified
-			#
-			if test "x$withval" = x -o x$withval = xno; then
-				opsys_wanted=yes
-			else
-				opsys_wanted=no
-				opsys="$withval"
-				AC_MSG_RESULT($opsys)
-			fi
-		], [
-			#
-			# Run this if --with was not specified
-			#
-			opsys_wanted=yes
-		])
-
-		if test x$opsys = xno; then
-			opsys=""
-			opsys_wanted=yes
-		elif test x$opsys = xyes; then
-			AC_MSG_ERROR([you must enter an O/S type if '--with-opsys' is specified])
-		fi
-
-		#
-		# Determine operating system if it wasn't supplied
-		#
-		if test $opsys_wanted=yes; then
-			opsys=`uname -s | tr ["[A-Z]" "[a-z]"]`
-			if test x"$opsys" = "x"; then opsys="unknown"; fi
-			AS_CASE([$opsys],
-				[darwin*],		opsys="osx",
-				[*bsd*],		opsys="bsd",
-				[dragonfly],	opsys="bsd",
-				[sunos],		opsys="solaris",
-				[gnu/hurd],		opsys="linux",
-				[irix*],		opsys="irix",
-				[cygwin*],		opsys="cygwin",
-				[mingw*],		opsys="mingw",
-				[msys*],		opsys="msys")
-		fi
-
-		arch=`uname -m | tr ["[A-Z]" "[a-z]"]`
-
-		AC_MSG_RESULT($opsys)
-])

+ 0 - 704
build-aux/ax_nagios_get_paths

@@ -1,704 +0,0 @@
-# ===========================================================================
-# SYNOPSIS
-#
-#   AX_NAGIOS_GET_PATHS
-#
-# DESCRIPTION
-#
-#    This macro figures out the installation & run paths for various systems
-#    The argument are:
-#        the O/S determined by the AX_NAGIOS_GET_OS macro.
-#        the distribution type as determined by AX_NAGIOS_GET_DISTRIB_TYPE
-#        the init type as determined by AX_NAGIOS_GET_INIT
-#        the inetd type as determined by AX_NAGIOS_GET_INETD
-#
-# LICENSE
-#
-#    Copyright (c) 2016 Nagios Core Development Team
-#
-#   This program is free software; you can redistribute it and/or modify it
-#   under the terms of the GNU General Public License as published by the
-#   Free Software Foundation; either version 2 of the License, or (at your
-#   option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-#   Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License along
-#   with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-#   As a special exception, the respective Autoconf Macro's copyright owner
-#   gives unlimited permission to copy, distribute and modify the configure
-#   scripts that are the output of Autoconf when processing the Macro. You
-#   need not follow the terms of the GNU General Public License when using
-#   or distributing such scripts, even though portions of the text of the
-#   Macro appear in them. The GNU General Public License (GPL) does govern
-#   all other use of the material that constitutes the Autoconf Macro.
-#
-#   This special exception to the GPL applies to versions of the Autoconf
-#   Macro released by the Autoconf Archive. When you make and distribute a
-#   modified version of the Autoconf Macro, you may extend this special
-#   exception to the GPL to apply to your modified version as well.
-# ===========================================================================
-
-AU_ALIAS([AC_NAGIOS_GET_PATHS], [AX_NAGIOS_GET_PATHS])
-AC_DEFUN([AX_NAGIOS_GET_PATHS],
-[
-
-if test x$DBG_PATHS != x; then
-	echo
-	echo Incoming paths:
-	echo "    prefix        $prefix"
-	echo "    exec_prefix   $exec_prefix"
-	echo "    bindir        $bindir"
-	echo "    sbindir       $sbindir"
-	echo "    libexecdir    $libexecdir"
-	echo "    sysconfdir    $sysconfdir"
-	echo "    localstatedir $localstatedir"
-	echo "    datarootdir   $datarootdir"
-	echo "    datadir       $datadir"
-	echo "    localedir     $localedir"
-	echo
-fi
-
-AC_MSG_CHECKING(for which paths to use )
-
-AC_ARG_ENABLE(install_method,
-	AC_HELP_STRING([--enable-install-method=<method>],
-	[sets the install method to use: 'default' (the default) will install to
-	/usr/local/nagios, 'os' will try to determine which method to use based
-	on OS type and distribution. Fine tuning using the '--bindir', etc.
-	overrides above will still work]),
-	install_method=$enableval,
-	install_method=default
-)
-
-AC_ARG_ENABLE(showdirs_only,
-	AC_HELP_STRING([--enable-showdirs-only=yes],
-	[This option will cause 'configure' to stop after determining the install
-	 locations based on '--enable-install-method', so you can see the
-	 destinations before a full './configure', 'make', 'make install'
-	 process.]),
-	showdirs_only=$enableval,
-	showdirs_only=no
-)
-
-AS_CASE([$install_method],
-	[yes], install_method="os",
-	[no],  install_method="default",
-	[default|os], :,
-	[*], echo >&6; AC_MSG_ERROR(['--enable-install-method=$install_method' is invalid])
-)
-
-if test $showdirs_only != "no"; then showdirs_only="yes"; fi
-
-AS_CASE([$dist_type],
-	[*solaris*|*hp-ux*|*aix*|*osx*], opsys=unix)
-
-
-need_cgi=no
-need_web=no
-need_brk=no
-need_plg=no
-need_pipe=no
-need_spl=no
-need_loc=no
-need_log_subdir=no
-need_etc_subdir=no
-need_pls_dir=no
-
-AS_CASE([$PKG_NAME],
-	[nagios],
-		need_log_subdir=yes
-		need_etc_subdir=yes
-		need_pls_dir=yes
-		need_brk=yes
-		need_pipe=yes
-		need_spl=yes
-		need_loc=yes
-		need_cgi=yes
-		need_web=yes,
-
-	[ndoutils],
-		need_spl=yes,
-
-	[nrpe],
-		need_plg=yes,
-
-	[nsca],
-		need_cgi=no,
-
-	[plugins],
-		need_loc=yes
-		need_plg=yes
-)
-
-AC_ARG_WITH(pkgsysconfdir, AC_HELP_STRING([--with-pkgsysconfdir=DIR],
-	[where configuration files should be placed]),
-	if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
-		pkgsysconfdir="$withval"
-	fi)
-AC_ARG_WITH(objsysconfdir, AC_HELP_STRING([--with-objsysconfdir=DIR],
-	[where object configuration files should be placed]),
-	if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
-		objsysconfdir="$withval"
-	fi)
-AC_ARG_WITH(privatesysconfdir, AC_HELP_STRING([--with-privatesysconfdir=DIR],
-	[where private configuration files should be placed]),
-	if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
-		privatesysconfdir="$withval"
-	fi)
-AC_ARG_WITH(webdir, AC_HELP_STRING([--with-webdir=DIR],
-	[where the website files should be placed]),
-	if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
-		webdir="$withval"
-	fi)
-AC_ARG_WITH(pluginsdir, AC_HELP_STRING([--with-pluginsdir=DIR],
-	[where the plugins should be placed]),
-	if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
-		pluginsdir="$withval"
-	fi)
-AC_ARG_WITH(brokersdir, AC_HELP_STRING([--with-brokersdir=DIR],
-	[where the broker modules should be placed]),
-	if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
-		brokersdir="$withval"
-	fi)
-AC_ARG_WITH(cgibindir, AC_HELP_STRING([--with-cgibindir=DIR],
-	[where the CGI programs should be placed]),
-	if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
-		cgibindir="$withval"
-	fi)
-AC_ARG_WITH(logdir, AC_HELP_STRING([--with-logdir=DIR],
-	[where log files should be placed]),
-	if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
-		logdir="$withval"
-	fi)
-AC_ARG_WITH(piddir, AC_HELP_STRING([--with-piddir=DIR],
-	[where the PID file should be placed]),
-	if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
-		piddir="$withval"
-	fi)
-AC_ARG_WITH(pipedir, AC_HELP_STRING([--with-pipedir=DIR],
-	[where socket and pipe files should be placed]),
-	if test x$withval != x -a x$withval != xno -a x$withval != xyes; then
-		pipedir="$withval"
-	fi)
-
-
-#
-# Setup the base directory
-#
-
-if test $install_method = "default"; then
-	if test $opsys = "unix"; then
-		if test x"$prefix" = "xNONE"; then prefix="/usr/local/nagios"; fi
-	else
-		if test x"$prefix" = "xNONE"; then prefix=${ac_default_prefix}; fi
-	fi
-	datarootdir=${datarootdir="$prefix"}
-
-else
-	if test x"$datadir" = x'${datarootdir}'; then AS_UNSET(datadir); fi
-	if test x"$sysconfdir" = x'${prefix}/etc'; then AS_UNSET(sysconfdir); fi
-
-	if test x"$prefix" = "xNONE"; then
-		if test $dist_type = freebsd -o $dist_type = openbsd -o $dist_type = osx; then
-			prefix="/usr/local"
-		elif test $dist_type = netbsd; then
-			prefix="/usr/pkg"
-		else
-			prefix="/usr"
-		fi
-	fi
-	if test x"$exec_prefix" = "xNONE"; then exec_prefix=$prefix; fi
-	if test x"$localstatedir" = x'${prefix}/var'; then
-		if test $dist_type = "osx"; then
-			localstatedir="/private/var"
-		else
-			localstatedir="/var"
-		fi
-	fi
-
-	if test $opsys = "unix"; then
-		if test x"$datarootdir" = x'${prefix}/share'; then
-			if test $dist_type = "hp-ux"; then
-				datarootdir="/usr/local/share"
-				if test x"$libexecdir" = x'${exec_prefix}/libexec'; then
-					libexecdir="/usr/nagios"
-				fi
-			elif test $dist_type = "osx"; then
-				datarootdir="/usr/local/share"
-				if test x"$libexecdir" = x'${exec_prefix}/libexec'; then
-					libexecdir="/usr/local/nagios"
-				fi
-			elif test x"$libexecdir" = x'${exec_prefix}/libexec'; then
-				libexecdir="/usr/lib/nagios"
-			fi
-		fi
-		if test $dist_type = "osx"; then
-			if test x"$sbindir" = x'${exec_prefix}/sbin'; then
-				sbindir="$libexecdir"
-			fi
-			if test x"$libexecdir" = x'${exec_prefix}/libexec'; then
-				libexecdir="/usr/local/libexec/nagios"
-			fi
-		fi
-	elif test $opsys = "bsd"; then
-		if test x"$libexecdir" = x'${exec_prefix}/libexec'; then
-			libexecdir=${exec_prefix}/libexec/nagios;
-		fi
-	elif test x"$libexecdir" = x'${exec_prefix}/lib'; then
-		libexecdir=${libexecdir}/nagios;
-	elif test x"$libexecdir" = x'${exec_prefix}/libexec'; then
-		libexecdir=${exec_prefix}/lib/nagios;
-	fi
-
-fi
-
-if test x"$exec_prefix" = "xNONE"; then exec_prefix=${prefix}; fi
-
-tmpfilesd=${tmpfilesd="/usr/lib/tmpfiles.d"}
-if test ! -d "$tmpfilesd"; then
-	tmpfilesd="N/A"
-else
-	tmpfilesd="$tmpfilesd/$PKG_NAME.conf"
-fi
-subsyslockdir=${subsyslockdir="/var/lock/subsys"}
-if test ! -d "$subsyslockdir"; then
-	subsyslockdir="N/A"
-	subsyslockfile="N/A"
-else
-	subsyslockfile="$subsyslockdir/$PKG_NAME"
-fi
-if test "$need_loc" = no; then
-	localedir="N/A"
-fi
-
-if test $install_method = "default" ; then
-	#
-	# Do the default setup
-	#
-	sbindir=${bindir}
-	datadir=${datadir="$datarootdir"}
-	if test $need_web = yes; then
-		webdir=${webdir="$datadir"}
-	else
-		webdir="N/A"
-	fi
-	if test $opsys = "unix"; then
-		sysconfdir=${sysconfdir="/etc/opt"}
-	fi
-	pkgsysconfdir=${pkgsysconfdir="$sysconfdir"}
-	if test $need_etc_subdir = yes; then
-		objsysconfdir=${objsysconfdir="$pkgsysconfdir/objects"}
-	else
-		objsysconfdir="N/A"
-	fi
-	privatesysconfdir=${privatesysconfdir="$pkgsysconfdir"}
-	logdir=${logdir="$localstatedir"}
-	piddir=${piddir="$localstatedir"}
-	if test "$need_pipe" = yes; then
-		pipedir=${pipedir="$localstatedir/rw"}
-	else
-		pipedir="N/A"
-	fi
-	if test "$need_pls_dir" = yes; then
-		pkglocalstatedir=${pkglocalstatedir="$localstatedir"}
-	else
-		pkglocalstatedir="N/A"
-	fi
-	if test "$need_spl" = yes; then
-		spooldir=${spooldir="$localstatedir/var"}
-	else
-		spooldir="N/A"
-	fi
-	if test $need_brk = yes; then
-		brokersdir=${brokersdir="$bindir"}
-	else
-		brokersdir="N/A"
-	fi
-	if test $need_plg = yes; then
-		pluginsdir=${pluginsdir="$libexecdir"}
-	else
-		pluginsdir="N/A"
-	fi
-	if test $need_cgi = yes; then
-		cgibindir=${cgibindir="$prefix/sbin"}
-	else
-		cgibindir="N/A"
-	fi
-
-elif test $opsys = "linux"; then
-
-	#
-	# Linux "Standard" install
-	#
-	install_method="$install_method : FHS"
-	datadir=${datadir="$datarootdir/nagios"}
-	if test $need_web = yes; then
-		webdir=${webdir="$datadir/html"}
-	else
-		webdir="N/A"
-	fi
-	sysconfdir=${sysconfdir="/etc"}
-	pkgsysconfdir=${pkgsysconfdir="$sysconfdir/nagios"}
-	if test $need_etc_subdir = yes; then
-		objsysconfdir=${objsysconfdir="$pkgsysconfdir/objects"}
-	else
-		objsysconfdir="N/A"
-	fi
-	privatesysconfdir=${privatesysconfdir="$pkgsysconfdir/private"}
-	if test $need_log_subdir = yes; then
-		logdir=${logdir="$localstatedir/log/$PKG_NAME"}
-	else
-		logdir=${logdir="$localstatedir/log"}
-	fi
-	piddir=${piddir="$localstatedir/run/${PKG_NAME}"}
-	if test "$need_pipe" = yes; then
-		pipedir=${pipedir="$localstatedir/run/${PKG_NAME}"}
-	else
-		pipedir="N/A"
-	fi
-	if test "$need_pls_dir" = yes; then
-		pkglocalstatedir=${pkglocalstatedir="$localstatedir/lib/$PKG_NAME"}
-	else
-		pkglocalstatedir="N/A"
-	fi
-	if test "$need_spl" = yes; then
-		spooldir=${spooldir="$localstatedir/spool/$PKG_NAME"}
-	else
-		spooldir="N/A"
-	fi
-	if test $need_brk = yes; then
-		brokersdir=${brokersdir="$libexecdir/brokers"}
-	else
-		brokersdir="N/A"
-	fi
-	if test $need_plg = yes; then
-		pluginsdir=${pluginsdir="$libexecdir/plugins"}
-	else
-		pluginsdir="N/A"
-	fi
-	if test $need_cgi = yes; then
-		cgibindir=${cgibindir="$libexecdir/cgi-bin"}
-	else
-		cgibindir="N/A"
-	fi
-
-elif test $opsys = "unix"; then
-
-	#
-	# "Standard" Unix install
-	#
-	install_method="$install_method : Unix Standard"
-	if test $dist_type = osx; then
-		install_method="$install_method : OS X Standard"
-		sbindir=${sbindir="/usr/local/libexec"}
-	fi
-	datadir=${datadir="$datarootdir/nagios"}
-	if test $need_web = yes; then
-		webdir=${webdir="$datadir/html"}
-	else
-		webdir="N/A"
-	fi
-	if test $dist_type = osx; then
-		sysconfdir=${sysconfdir="/private/etc"}
-	else
-		sysconfdir=${sysconfdir="/etc"}
-	fi
-	pkgsysconfdir=${pkgsysconfdir="$sysconfdir/nagios"}
-	if test $need_etc_subdir = yes; then
-		objsysconfdir=${objsysconfdir="$pkgsysconfdir/objects"}
-	else
-		objsysconfdir="N/A"
-	fi
-	privatesysconfdir=${privatesysconfdir="$pkgsysconfdir/private"}
-	if test "$need_pls_dir" = yes; then
-		pkglocalstatedir=${pkglocalstatedir="$localstatedir/lib/$PKG_NAME"}
-	else
-		pkglocalstatedir="N/A"
-	fi
-	if test "$need_loc" = yes; then
-		localedir=${localedir="/usr/local/share/locale/<lang>/LC_MESSAGES/nagios-plugins.mo"}
-	fi
-	if test "$need_spl" = yes; then
-		spooldir=${spooldir="$localstatedir/spool/$PKG_NAME"}
-	else
-		spooldir="N/A"
-	fi
-	if test $need_brk = yes; then
-		brokersdir=${brokersdir="$libexecdir/brokers"}
-	else
-		brokersdir="N/A"
-	fi
-	if test $need_plg = yes; then
-		pluginsdir=${pluginsdir="$libexecdir/plugins"}
-	else
-		pluginsdir="N/A"
-	fi
-	if test $need_cgi = yes; then
-		cgibindir=${cgibindir="$libexecdir/cgi-bin"}
-	else
-		cgibindir="N/A"
-	fi
-	AS_CASE([$dist_type],
-		[*hp-ux*],
-			piddir=${piddir="$pkgsysconfdir"}
-			pipedir=${pipedir="$pkglocalstatedir"}
-			logdir=${logdir="$pkglocalstatedir/log"},
-
-		[*],
-			piddir=${piddir="$localstatedir/run/${PKG_NAME}"}
-			if test "$need_pipe" = yes; then
-				pipedir=${pipedir="$localstatedir/run/${PKG_NAME}"}
-			else
-				pipedir="N/A"
-			fi
-			if test $need_log_subdir = yes; then
-				logdir=${logdir="$localstatedir/log/$PKG_NAME"}
-			else
-				logdir=${logdir="$localstatedir/log"}
-			fi
-	)
-
-elif test $opsys = "bsd"; then
-
-	#
-	# "Standard" BSD install
-	#
-	install_method="$install_method : BSD"
-	if test $dist_type = freebsd -o $dist_type = openbsd; then
-		prefix=${prefix="/usr/local"}
-		exec_prefix=${exec_prefix="/usr/local"}
-		if test $dist_type = freebsd; then
-			install_method="$install_method : FreeBSD"
-		else
-			install_method="$install_method : OpenBSD"
-		fi
-	elif test $dist_type = netbsd; then
-		prefix=${prefix="/usr/pkg"}
-		exec_prefix=${exec_prefix="/usr/pkg"}
-		install_method="$install_method : NetBSD"
-	fi
-	datadir=${datadir="$datarootdir/nagios"}
-	if test $need_web = yes -o $need_cgi = yes; then
-		if test $dist_type = freebsd; then
-			webdir=${webdir="$prefix/www/nagios"}
-		elif test $dist_type = netbsd; then
-			webdir=${webdir="$prefix/share/nagios"}
-		elif test $dist_type = openbsd; then
-			webdir=${webdir="/var/www/nagios"}
-		fi
-	else
-		webdir="N/A"
-	fi
-	if test $dist_type = freebsd; then
-		sysconfdir=${sysconfdir="/usr/local/etc"}
-	else
-		sysconfdir=${sysconfdir="/etc"}
-	fi
-	pkgsysconfdir=${pkgsysconfdir="$sysconfdir/nagios"}
-	if test $need_etc_subdir = yes; then
-		objsysconfdir=${objsysconfdir="$pkgsysconfdir/objects"}
-	else
-		objsysconfdir="N/A"
-	fi
-	privatesysconfdir=${privatesysconfdir="$pkgsysconfdir/private"}
-	if test "$need_pls_dir" = yes; then
-		pkglocalstatedir=${pkglocalstatedir="$localstatedir/lib/$PKG_NAME"}
-	else
-		pkglocalstatedir="N/A"
-	fi
-	if test "$need_loc" = yes; then
-		localedir=${localedir="/usr/local/share/locale/<lang>/LC_MESSAGES/nagios-plugins.mo"}
-	fi
-	if test "$need_spl" = yes; then
-		spooldir=${spooldir="$localstatedir/spool/$PKG_NAME"}
-	else
-		spooldir="N/A"
-	fi
-	if test $need_brk = yes; then
-		brokersdir=${brokersdir="$libexecdir/brokers"}
-	else
-		brokersdir="N/A"
-	fi
-	if test $need_plg = yes; then
-		pluginsdir=${pluginsdir="$libexecdir/plugins"}
-	else
-		pluginsdir="N/A"
-	fi
-	if test $need_cgi = yes; then
-		if test $dist_type = freebsd; then
-			cgibindir=${cgibindir="$webdir/cgi-bin"}
-		elif test $dist_type = netbsd; then
-			cgibindir=${pluginsdir="$libexecdir/cgi-bin"}
-		elif test $dist_type = openbsd; then
-			cgibindir=${pluginsdir="/var/www/cgi-bin/nagios"}
-		fi
-	else
-		cgibindir="N/A"
-	fi
-	piddir=${piddir="$localstatedir/run/${PKG_NAME}"}
-	if test "$need_pipe" = yes; then
-		pipedir=${pipedir="$localstatedir/run/${PKG_NAME}"}
-	else
-		pipedir="N/A"
-	fi
-	if test $need_log_subdir = yes; then
-		logdir=${logdir="$localstatedir/log/$PKG_NAME"}
-	else
-		logdir=${logdir="$localstatedir/log"}
-	fi
-
-else
-
-	#
-	# Unknown install
-	#
-	install_method="unknown"
-	webdir=unknown
-	pkgsysconfdir=unknown
-	objsysconfdir=unknown
-	privatesysconfdir=unknown
-	logdir=unknown
-	piddir=unknown
-	pipedir=unknown
-	pkglocalstatedir=unknown
-	spooldir=unknown
-	brokersdir=unknown
-	pluginsdir=unknown
-	cgibindir=unknown
-
-fi
-
-eval prefix=$prefix
-eval exec_prefix=$exec_prefix
-eval bindir=$bindir
-eval sbindir=$sbindir
-eval datarootdir=$datarootdir
-eval datadir=$datadir
-eval libexecdir=$libexecdir
-eval brokersdir=$brokersdir
-eval pluginsdir=$pluginsdir
-eval cgibindir=$cgibindir
-eval pkglocalstatedir=$pkglocalstatedir
-eval webdir=$webdir
-eval localedir=$localedir
-eval sysconfdir=$sysconfdir
-eval pkgsysconfdir=$pkgsysconfdir
-eval piddir=$piddir
-
-#
-# Init scripts/files
-#
-AS_CASE([$init_type],
-
-	[sysv],
-		if test $dist_type = "hp-ux"; then
-			initdir=${initdir="/sbin/init.d"}
-		else
-			initdir=${initdir="/etc/init.d"}
-		fi
-		initname=${initname="$PKG_NAME"}
-		initconfdir=${initconfdir="/etc/conf.d"}
-		initconf=${initconf="$initconfdir/$PKG_NAME"},
-
-	[systemd],
-		if test $dist_type = "debian"; then
-			initdir=${initdir="/lib/systemd/system"}
-		else
-			initdir=${initdir="/usr/lib/systemd/system"}
-		fi
-		initname=${initname="$PKG_NAME.service"},
-
-	[bsd],
-		initdir=${initdir="/etc/rc.d"}
-		initname=${initname="rc.$PKG_NAME"},
-
-	[newbsd],
-		initdir=${initdir="/etc/rc.d"}
-		initname=${initname="$PKG_NAME"},
-
-	[gentoo],
-		initdir=${initdir="/etc/init.d"}
-		initname=${initname="$PKG_NAME"}
-		initconfdir=${initconfdir="/etc/init.d"}
-		initconf=${initconf="$initconfdir/$PKG_NAME"},
-
-	[openrc],
-		initdir=${initdir="/etc/init.d"}
-		initname=${initname="$PKG_NAME"}
-		initconfdir=${initconfdir="/etc/conf.d"}
-		initconf=${initconf="$initconfdir/$PKG_NAME"},
-
-	[smf*],
-		if test $init_type = smf10; then
-			initdir=${initdir="/var/svc/manifest/network/nagios"}
-		else
-			initdir=${initdir="/lib/svc/manifest/network/nagios"}
-		fi
-		initname=${initname="$PKG_NAME.xml"}
-		initconfdir=unknown
-		initconf=unknown,
-
-	[upstart],
-		initdir=${initdir="/etc/init"}
-		initname=${initname="$PKG_NAME.conf"}
-		initconfdir=${initconfdir="/etc/default"}
-		initconf=${initconf="$initconfdir/$PKG_NAME"},
-
-	[launchd],
-		initdir=${initdir="/Library/LaunchDaemons"}
-		initname=${initname="org.nagios.$PKG_NAME.plist"},
-#		initconfdir=${initconfdir="/private/etc"}
-#		initconf=${initconf="$initconfdir/$PKG_NAME"},
-
-
-	[*],
-		initdir=unknown
-		initname=unknown)
-
-#
-# Inetd (per connection) scripts/files
-#
-AS_CASE([$inetd_type],
-	[inetd*],
-		inetddir=${inetddir="/etc"}
-		inetdname=${inetdname="inetd.conf"},
-
-	[xinetd],
-		inetddir=${inetddir="/etc/xinetd.d"}
-		inetdname=${inetdname="$PKG_NAME"},
-
-	[systemd],
-		if test $dist_type = "debian"; then
-			inetddir=${inetddir="/lib/systemd/system"}
-		else
-			inetddir=${inetddir="/usr/lib/systemd/system"}
-		fi
-		netdname=${inetdname="$PKG_NAME.socket"},
-
-	[smf*],
-		if test $init_type = smf10; then
-			inetddir=${inetddir="/var/svc/manifest/network/nagios"}
-		else
-			inetddir=${inetddir="/lib/svc/manifest/network/nagios"}
-		fi
-		inetdname=${inetdname="$PKG_NAME.xml"},
-
-#	[upstart],
-#		inetddir=${inetddir="/etc/init.d"}
-#		inetdname=${inetdname="$PKG_NAME"},
-
-	[launchd],
-		inetddir=${inetddir="/Library/LaunchDaemons"}
-		inetdname=${inetdname="org.nagios.$PKG_NAME.plist"},
-
-	[*],
-		inetddir=${inetddir="unknown"}
-		inetdname=${inetdname="unknown"})
-
-AC_MSG_RESULT($install_method)
-])

+ 0 - 281
build-aux/ax_nagios_get_ssl

@@ -1,281 +0,0 @@
-# ===========================================================================
-# SYNOPSIS
-#
-#   AX_NAGIOS_GET_SSL
-#
-# DESCRIPTION
-#
-#    This macro finds the openssl binary, the header files directory and
-#    the library files directory. It will also search for the gnutls
-#    compatibility library/headers and the nss compatibility library/headers.
-#
-# LICENSE
-#
-#    Copyright (c) 2016 Nagios Core Development Team
-#
-#   This program is free software; you can redistribute it and/or modify it
-#   under the terms of the GNU General Public License as published by the
-#   Free Software Foundation; either version 2 of the License, or (at your
-#   option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-#   Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License along
-#   with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-#   As a special exception, the respective Autoconf Macro's copyright owner
-#   gives unlimited permission to copy, distribute and modify the configure
-#   scripts that are the output of Autoconf when processing the Macro. You
-#   need not follow the terms of the GNU General Public License when using
-#   or distributing such scripts, even though portions of the text of the
-#   Macro appear in them. The GNU General Public License (GPL) does govern
-#   all other use of the material that constitutes the Autoconf Macro.
-#
-#   This special exception to the GPL applies to versions of the Autoconf
-#   Macro released by the Autoconf Archive. When you make and distribute a
-#   modified version of the Autoconf Macro, you may extend this special
-#   exception to the GPL to apply to your modified version as well.
-# ===========================================================================
-
-AU_ALIAS([AC_NAGIOS_GET_SSL], [AX_NAGIOS_GET_SSL])
-AC_DEFUN([AX_NAGIOS_GET_SSL],
-[
-
-# -------------------------------
-#  SSL library and include paths
-# -------------------------------
-
-SSL_TYPE=openssl
-ssl_dir=
-ssl_inc_dir=
-ssl_lib_dir=
-SSL_INC_DIR=
-SSL_LIB_DIR=
-
-AC_SUBST(HAVE_SSL)
-AC_SUBST(SSL_INC_DIR)
-AC_SUBST(SSL_LIB_DIR)
-
-
-# gnutls/openssl.h
-# nss_compat_ossl/nss_compat_ossl.h
-
-# Which type - openssl, gnutls-openssl, nss
-AC_ARG_WITH([ssl-type],
-dnl	AS_HELP_STRING([--with-ssl-type=TYPE],[replace TYPE with gnutls or nss to use one of these instead of openssl]),
-	AS_HELP_STRING([--with-ssl-type=TYPE],[replace TYPE with gnutls to use that instead of openssl]),
-	[SSL_TYPE=$withval])
-
-AC_ARG_WITH([ssl],
-	AS_HELP_STRING([--with-ssl=DIR],[sets location of the SSL installation]),
-	[ssl_dir=$withval])
-AC_ARG_WITH([ssl-inc],
-	AS_HELP_STRING([--with-ssl-inc=DIR],
-		[sets location of the SSL include files]),
-	[ssl_inc_dir=$withval])
-AC_ARG_WITH([ssl-lib],
-	AS_HELP_STRING([--with-ssl-lib=DIR],[sets location of the SSL libraries]),
-	[ssl_lib_dir=$withval])
-
-AC_ARG_WITH([kerberos-inc],
-	AS_HELP_STRING([--with-kerberos-inc=DIR],
-		[sets location of the Kerberos include files]),
-	[kerberos_inc_dir=$withval])
-
-if test x$SSL_TYPE = xyes; then
-    SSL_TYPE=openssl
-fi
-
-
-dflt_hdrs="$ssl_inc_dir $ssl_dir $ssl_dir/include $ssl_dir/include \
-			/usr/local/opt/{BBB} /usr/include/{BBB} /usr/local/include{BBB} \
-			/usr/local/{AAA} /usr/local/{BBB} /usr/lib/{AAA} /usr/lib/{BBB} \
-			/usr/{AAA} /usr/pkg /usr/local /usr /usr/freeware/lib/{BBB} \
-			/usr/sfw /usr/sfw/include /opt/{BBB}"
-
-dflt_libs="$ssl_lib_dir {ssldir} {ssldir}/lib {ssldir}/lib64 /usr/lib64 \
-			/usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/i386-linux-gnu \
-			/usr/local/lib /usr/lib/{AAA} /usr/{AAA}/lib /usr/{BBB}/lib \
-			/usr/pkg/lib /usr/freeware/lib/{BBB} /usr/sfw/lib /opt/freeware/lib \
-			/opt/{BBB}/lib/hpux64 /opt/{BBB}/lib/pa20_64 /opt/{BBB}/lib/hpux32 \
-			/opt/{BBB}/lib /opt/{BBB}";
-
-
-AS_CASE([$SSL_TYPE],
-	[no], [SSL_TYPE=NONE],
-	[yes|openssl],
-		[ssl_hdr_dirs=`echo "$dflt_hdrs" | sed -e 's/{AAA}/ssl/g' | sed -e 's/{BBB}/openssl/g'`
-		 ssl_lib_dirs=`echo "$dflt_libs" | sed -e 's/{AAA}/ssl/g' | sed -e 's/{BBB}/openssl/g'`
-		 ssl_hdr=ssl.h
-		 ssl_lib=libssl],
-	[gnutls],
-		[ssl_hdr_dirs=`echo "$dflt_hdrs" | sed -e 's/{AAA}/gnutls/g' | sed -e 's/{BBB}/gnutls/g'`
-		 ssl_lib_dirs=`echo "$dflt_libs" | sed -e 's/{AAA}/gnutls/g' | sed -e 's/{BBB}/gnutls/g'`
-		 ssl_hdr=compat.h
-		 ssl_lib=libgnutls],
-	[nss],
-		[ssl_hdr_dirs=`echo "$dflt_hdrs" | sed -e 's/{AAA}/nss_compat_ossl/g' | sed -e 's/{BBB}/nss_compat_ossl/g'`
-		 ssl_lib_dirs=`echo "$dflt_libs" | sed -e 's/{AAA}/nss_compat_ossl/g' | sed -e 's/{BBB}/nss_compat_ossl/g'`
-		 ssl_hdr=nss_compat_ossl.h
-		 ssl_lib=libnss_compat],
-	[*], echo >&6; AC_MSG_ERROR(['--with-ssl-type=$SSL_TYPE' is invalid])
-)
-
-
-# Check for SSL support
-
-if test x$SSL_TYPE != xNONE; then
-
-	found_ssl=no
-
-	# RedHat 8.0 and 9.0 include openssl compiled with kerberos,
-	# so we must include header file
-	# Must come before openssl checks for Redhat EL 3
-	AC_MSG_CHECKING(for Kerberos include files)
-	found_kerberos=no
-	for dir in $kerberos_inc_dir /usr/kerberos/include /usr/include/krb5 \
-				/usr/include; do
-		kerbdir="$dir"
-		if test -f "$dir/krb5.h"; then
-			found_kerberos=yes
-			CFLAGS="$CFLAGS -I$kerbdir"
-			AC_DEFINE_UNQUOTED(HAVE_KRB5_H,[1],[Have the krb5.h header file])
-			break
-		fi
-	done
-
-	if test x_$found_kerberos != x_yes; then
-		AC_MSG_WARN(could not find include files)
-	else
-		AC_MSG_RESULT(found Kerberos include files in $kerbdir)
-	fi
-
-	# First, try using pkg_config
-#	AC_CHECK_TOOL([PKG_CONFIG], [pkg-config])
-#	if test x"$PKG_CONFIG" != x ; then
-#		cflags=`$PKG_CONFIG $SSL_TYPE --cflags-only-I 2>/dev/null`
-#		if test $? = 0; then
-#			CFLAGS="$CFLAGS $cflags"
-#			LDFLAGS="$LDFLAGS `$PKG_CONFIG $SSL_TYPE --libs-only-L 2>/dev/null`"
-#			LIBS="$LIBS `$PKG_CONFIG $SSL_TYPE --libs-only-l 2>/dev/null`"
-#			found_ssl=yes
-#			AC_DEFINE_UNQUOTED(HAVE_SSL,[1],[Have SSL support])
-#		fi
-#	fi
-
-	if test x_$found_ssl != x_yes; then
-
-		# Find the SSL Headers
-
-		AC_MSG_CHECKING(for SSL headers)
-		for dir in $ssl_hdr_dirs; do
-			ssldir="$dir"
-			if test -f "$dir/include/openssl/$ssl_hdr"; then
-				found_ssl=yes
-				CFLAGS="$CFLAGS -I$dir/include/openssl -I$ssldir/include"
-				SSL_INC_DIR="$dir/include/openssl"
-				break
-			fi
-			if test -f "$dir/include/$ssl_hdr"; then
-				found_ssl=yes
-				CFLAGS="$CFLAGS -I$dir/include"
-				SSL_INC_DIR="$dir/include"
-				break
-			fi
-			if test -f "$dir/$ssl_hdr"; then
-				found_ssl=yes
-				CFLAGS="$CFLAGS -I$dir"
-				SSL_INC_DIR="$dir"
-				ssldir="$dir/.."
-				break
-			fi
-			if test -f "$dir/openssl/$ssl_hdr"; then
-				found_ssl=yes
-				CFLAGS="$CFLAGS -I$dir/openssl"
-				SSL_INC_DIR="$dir/openssl"
-				ssldir="$dir/.."
-				break
-			fi
-		done
-
-		if test x_$found_ssl != x_yes; then
-			AC_MSG_ERROR(Cannot find ssl headers)
-		else
-			AC_MSG_RESULT(found in $ssldir)
-
-			# Now try and find SSL libraries
-
-			AC_MSG_CHECKING(for SSL libraries)
-			found_ssl=no
-			ssl_lib_dirs=`echo "$ssl_lib_dirs" | sed -e "s|{ssldir}|$ssldir|g"`
-
-			if test "`uname -s`" = "Darwin" ; then
-				soext="dylib"
-			elif test "`uname -s`" = "HP-UX" ; then
-				if test x$arch = "xia64"; then
-					soext="so"
-				else
-					soext="sl"
-				fi
-			elif test "`uname -s`" = "AIX" ; then
-				soext="a"
-			else
-				soext="so"
-			fi
-
-			for dir in $ssl_lib_dirs; do
-				if test -f "$dir/$ssl_lib.$soext"; then
-					found_ssl=yes
-					SSL_LIB_DIR="$dir"
-					break
-				fi
-			done
-
-			if test x_$found_ssl != x_yes; then
-				AC_MSG_ERROR(Cannot find ssl libraries)
-			else
-				AC_MSG_RESULT(found in $SSL_LIB_DIR)
-
-				LDFLAGS="$LDFLAGS -L$SSL_LIB_DIR";
-				LIBS="$LIBS -l`echo $ssl_lib | sed -e 's/^lib//'` -lcrypto";
-				AC_DEFINE_UNQUOTED(HAVE_SSL,[1],[Have SSL support])
-			fi
-		fi
-	fi
-
-	if test x$found_ssl = xyes ; then
-		# try to compile and link to see if SSL is set up properly
-		AC_MSG_CHECKING([whether compiling and linking against SSL works])
-
-		AC_LINK_IFELSE(
-			[AC_LANG_PROGRAM([#include <openssl/ssl.h>], [SSL_new(NULL)])],
-			[
-				AC_MSG_RESULT([yes])
-				$1
-			], [
-				AC_MSG_ERROR([no])
-				$2
-			])
-	fi
-
-	if test x$found_ssl = xyes -a x$need_dh = xyes; then
-
-		# Find the openssl program
-
-		if test x$need_dh = xyes; then
-			AC_PATH_PROG(sslbin,openssl,value-if-not-found,$ssl_dir/sbin$PATH_SEPARATOR$ssl_dir/bin$PATH_SEPARATOR$PATH)
-			AC_DEFINE(USE_SSL_DH)
-			# Generate DH parameters
-			if test -f "$sslbin"; then
-				echo ""
-				echo "*** Generating DH Parameters for SSL/TLS ***"
-				# awk to strip off meta data at bottom of dhparam output
-				$sslbin dhparam -C 2048 | awk '/^-----/ {exit} {print}' > include/dh.h
-			fi
-		fi
-	fi
-fi
-])

+ 0 - 30
configure.ac

@@ -48,36 +48,6 @@ AC_SUBST(TARGET_VER)
 AC_SUBST(TARGET_OS)
 AC_SUBST(TARGET_ARCH)
 AC_SUBST(TARGET_PLATFORM)
-AC_SUBST(opsys)
-AC_SUBST(arch)
-AC_SUBST(dist_type)
-AC_SUBST(dist_ver)
-AC_SUBST(init_type)
-AC_SUBST(inetd_type)
-AC_SUBST(pkgsysconfdir)
-AC_SUBST(objsysconfdir)
-AC_SUBST(sbindir)
-AC_SUBST(initname)
-AC_SUBST(inetdname)
-AC_SUBST(pluginsdir)
-AC_SUBST(brokersdir)
-AC_SUBST(cgibindir)
-AC_SUBST(webdir)
-AC_SUBST(privatesysconfdir)
-AC_SUBST(pkglocalstatedir)
-AC_SUBST(logdir)
-AC_SUBST(piddir)
-AC_SUBST(pipedir)
-AC_SUBST(spooldir)
-AC_SUBST(initdir)
-AC_SUBST(inetddir)
-AC_SUBST(tmpfilesd)
-AC_SUBST(subsyslockdir)
-AC_SUBST(subsyslockfile)
-AC_SUBST(src_tmpfile)
-AC_SUBST(src_init)
-AC_SUBST(src_inetd)
-AC_SUBST(bsd_enable)
 
 dnl Figure out how to invoke "install" and what install options to use.
 AC_PROG_INSTALL

+ 3 - 3
startup/default-init.in

@@ -88,7 +88,7 @@ start)
 	$MSG_CMD "Starting nrpe "
 	$START_CMD $NRPE_BIN -c $NRPE_CFG -d
 	RETVAL=$?
-	if test $PRT_STAT = log_end_msg; then
+	if test "$PRT_STAT" = log_end_msg; then
 		$PRT_STAT $RETVAL
 	else
 		$PRT_STAT
@@ -103,7 +103,7 @@ stop)
 	$MSG_CMD "Shutting down nrpe "
 	$TERM_CMD
 	RETVAL=$?
-	if test $PRT_STAT = log_end_msg; then
+	if test "$PRT_STAT" = log_end_msg; then
 		$PRT_STAT $RETVAL
 	else
 		$PRT_STAT
@@ -141,7 +141,7 @@ status)
 	$STAT_MSG
 	$STAT_CMD
 	RETVAL=$?
-	if test $PRT_STAT != log_end_msg; then
+	if test "$PRT_STAT" != log_end_msg; then
 		$PRT_STAT
 	fi
 	;;