Imported Upstream version 2.7.3
This commit is contained in:
parent
a356b56d11
commit
fd413a3168
283 changed files with 14978 additions and 6511 deletions
88
configure.ac
88
configure.ac
|
|
@ -1,9 +1,9 @@
|
|||
dnl +------------------------------------------------------------------+
|
||||
dnl | Network UPS Tools: configure.in |
|
||||
dnl | Network UPS Tools: configure.ac |
|
||||
dnl +------------------------------------------------------------------+
|
||||
|
||||
dnl NUT version number is defined here, with a Git suffix in include/nut_version.h
|
||||
AC_INIT(nut, 2.7.2)
|
||||
AC_INIT(nut, 2.7.3, [https://github.com/networkupstools/nut/issues])
|
||||
AC_CONFIG_SRCDIR(server/upsd.c)
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
echo "Network UPS Tools version ${PACKAGE_VERSION}"
|
||||
|
|
@ -11,7 +11,7 @@ AC_CANONICAL_SYSTEM
|
|||
NUT_CHECK_OS
|
||||
AC_CONFIG_HEADER(include/config.h)
|
||||
AC_PREFIX_DEFAULT(/usr/local/ups)
|
||||
AM_INIT_AUTOMAKE
|
||||
AM_INIT_AUTOMAKE([subdir-objects])
|
||||
|
||||
dnl we need Autoconf 2.60 or better to enable features of Posix that are extensions to C
|
||||
AC_MSG_CHECKING(for autoconf macro to enable system extensions)
|
||||
|
|
@ -23,7 +23,7 @@ m4_version_prereq(2.60, [
|
|||
])
|
||||
|
||||
dnl Use "./configure --enable-maintainer-mode" to keep Makefile.in and Makefile
|
||||
dnl in sync after SVN updates.
|
||||
dnl in sync after Git updates.
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
dnl PKG_PROG_PKG_CONFIG
|
||||
|
|
@ -42,6 +42,8 @@ dnl However, automatically define the tree version (mostly for AC_SUBST)
|
|||
TREE_VERSION="`echo ${PACKAGE_VERSION} | awk '{ print substr($0,1,3) }'`"
|
||||
AC_DEFINE_UNQUOTED(TREE_VERSION, "${TREE_VERSION}", [NUT tree version])
|
||||
|
||||
dnl Should not be necessary, since old servers have well-defined errors for
|
||||
dnl unsupported commands:
|
||||
NUT_NETVERSION="1.2"
|
||||
AC_DEFINE_UNQUOTED(NUT_NETVERSION, "${NUT_NETVERSION}", [NUT network protocol version])
|
||||
|
||||
|
|
@ -221,7 +223,7 @@ dnl check for --with-all (or --without-all, or --with-all=auto) flag
|
|||
|
||||
AC_MSG_CHECKING(for --with-all)
|
||||
AC_ARG_WITH(all,
|
||||
AS_HELP_STRING([--with-all], [enable serial, usb, snmp, neon, ipmi, powerman, cgi, dev, avahi]),
|
||||
AS_HELP_STRING([--with-all], [enable serial, usb, snmp, neon, ipmi, powerman, cgi, dev, avahi, linux_i2c]),
|
||||
[
|
||||
if test -n "${withval}"; then
|
||||
dnl Note: we allow "no" as a positive value, because
|
||||
|
|
@ -235,6 +237,7 @@ AC_ARG_WITH(all,
|
|||
if test -z "${with_dev}"; then with_dev="${withval}"; fi
|
||||
if test -z "${with_avahi}"; then with_avahi="${withval}"; fi
|
||||
if test -z "${with_ipmi}"; then with_ipmi="${withval}"; fi
|
||||
if test -z "${with_linux_i2c}"; then with_linux_i2c="${withval}"; fi
|
||||
AC_MSG_RESULT("${withval}")
|
||||
else
|
||||
AC_MSG_RESULT(not given)
|
||||
|
|
@ -464,6 +467,35 @@ NUT_REPORT_FEATURE([build Mac OS X meta-driver],
|
|||
[${nut_with_macosx_ups}], [${nut_macosx_ups_lib}],
|
||||
[WITH_MACOSX], [Define to enable Mac OS X meta-driver])
|
||||
|
||||
dnl ----------------------------------------------------------------------
|
||||
dnl checks related to --with_linux_i2c
|
||||
dnl Check for i2c header on Linux, used for ASEM UPS driver
|
||||
NUT_ARG_WITH([linux_i2c], [build and install i2c drivers], [auto])
|
||||
if test "${nut_with_linux_i2c}" != no; then
|
||||
case ${target_os} in
|
||||
linux* )
|
||||
AC_CHECK_DECLS(
|
||||
[i2c_smbus_read_word_data, i2c_smbus_write_word_data, i2c_smbus_read_block_data],
|
||||
[nut_with_linux_i2c="yes"],
|
||||
[nut_with_linux_i2c="no"],
|
||||
[#include <stdio.h>
|
||||
#include <linux/i2c-dev.h>
|
||||
]
|
||||
)
|
||||
;;
|
||||
* )
|
||||
nut_with_linux_i2c="no"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
NUT_REPORT_FEATURE(
|
||||
[build i2c based drivers],
|
||||
[${nut_with_linux_i2c}],
|
||||
[],
|
||||
[WITH_LINUX_I2C],
|
||||
[Define to enable I2C support]
|
||||
)
|
||||
|
||||
dnl ----------------------------------------------------------------------
|
||||
dnl Check for with-ssl, and --with-nss or --with-openssl
|
||||
dnl Only one can be enabled at a time, with a preference for OpenSSL
|
||||
|
|
@ -611,7 +643,7 @@ esac
|
|||
for nut_doc_build_target in ${nut_doc_build_list}; do
|
||||
case "${nut_doc_build_target}" in
|
||||
html-single)
|
||||
AC_MSG_CHECKING([if asciidoc version can build ${nut_doc_build_target}])
|
||||
AC_MSG_CHECKING([if asciidoc version can build ${nut_doc_build_target} (minimum required 8.6.3)])
|
||||
AX_COMPARE_VERSION([${ASCIIDOC_VERSION}], [ge], [8.6.3], [
|
||||
AC_MSG_RESULT(yes)
|
||||
DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}"
|
||||
|
|
@ -622,7 +654,7 @@ for nut_doc_build_target in ${nut_doc_build_list}; do
|
|||
;;
|
||||
|
||||
html-chunked)
|
||||
AC_MSG_CHECKING([if a2x version can build ${nut_doc_build_target}])
|
||||
AC_MSG_CHECKING([if a2x version can build ${nut_doc_build_target} (minimum required 8.6.3)])
|
||||
AX_COMPARE_VERSION([${A2X_VERSION}], [ge], [8.6.3], [
|
||||
AC_MSG_RESULT(yes)
|
||||
DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}"
|
||||
|
|
@ -633,7 +665,7 @@ for nut_doc_build_target in ${nut_doc_build_list}; do
|
|||
;;
|
||||
|
||||
pdf)
|
||||
AC_MSG_CHECKING([if dblatex version can build ${nut_doc_build_target}])
|
||||
AC_MSG_CHECKING([if dblatex version can build ${nut_doc_build_target} (minimum required 0.2.5)])
|
||||
AX_COMPARE_VERSION([${DBLATEX_VERSION}], [ge], [0.2.5], [
|
||||
AC_MSG_RESULT(yes)
|
||||
DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}"
|
||||
|
|
@ -659,7 +691,7 @@ no)
|
|||
if test -z "${DOC_NOBUILD_LIST}"; then
|
||||
nut_with_doc="yes"
|
||||
else
|
||||
AC_MSG_ERROR(["Unable to build ${DOC_NOBUILD_LIST} documentation"])
|
||||
AC_MSG_ERROR(["Unable to build ${DOC_NOBUILD_LIST} documentation (check for 'no' results above)"])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
|
@ -681,6 +713,31 @@ AX_COMPARE_VERSION([${A2X_VERSION}], [ge], [8.6.3], [
|
|||
nut_have_asciidoc="no"
|
||||
])
|
||||
|
||||
dnl TODO: test for docbook-xsl files (maybe build a test man page?)
|
||||
dnl https://github.com/networkupstools/nut/issues/162
|
||||
AC_MSG_CHECKING([if xsltproc is present (mandatory for man page regeneration)])
|
||||
if test -n "${XSLTPROC}"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
nut_have_asciidoc="no"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if xmllint is present (mandatory for man page regeneration)])
|
||||
if test -n "${XMLLINT}"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
nut_have_asciidoc="no"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if source-highlight is present (preferable for documentation generation)])
|
||||
if test -n "${SOURCE_HIGHLIGHT}"; then
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
NUT_REPORT_FEATURE([build and install documentation], [${nut_with_doc}], [],
|
||||
[WITH_ASCIIDOC], [Define to enable Asciidoc support])
|
||||
|
||||
|
|
@ -1010,7 +1067,6 @@ dnl files will try to get intalled to the actual system directories
|
|||
if test -n "${systemdsystemunitdir}"; then
|
||||
systemdsystemshutdowndir="${libdir}/systemd/system-shutdown"
|
||||
AC_MSG_RESULT(using ${systemdsystemunitdir})
|
||||
systemdsystemunitdir="`echo ${systemdsystemunitdir} | sed 's/\/lib/\${libdir}/'`"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
|
@ -1112,6 +1168,12 @@ dnl check for spell checking deps
|
|||
AC_PATH_PROGS([ASPELL], [aspell], [none])
|
||||
AM_CONDITIONAL([HAVE_ASPELL], [test "x$ASPELL" != "xnone"])
|
||||
|
||||
dnl AIX system
|
||||
AM_CONDITIONAL([SYSTEM_AIX], [test "xAIX" = "x`uname -s 2>/dev/null`"])
|
||||
|
||||
dnl processor type
|
||||
AC_DEFINE_UNQUOTED(CPU_TYPE, $target_cpu, [Define processor type])
|
||||
|
||||
dnl expand ${sysconfdir} and write it out
|
||||
conftemp="${sysconfdir}"
|
||||
eval conftemp=\"${conftemp}\"
|
||||
|
|
@ -1140,6 +1202,10 @@ eval conftemp=\"${conftemp}\"
|
|||
SBINDIR=${conftemp}
|
||||
AC_DEFINE_UNQUOTED(SBINDIR, "${conftemp}", [Default path for system executables])
|
||||
|
||||
dnl Current date
|
||||
now=`TZ=UTC date +%Y-%m-%d`
|
||||
|
||||
AC_SUBST(now)
|
||||
AC_SUBST(OS_NAME)
|
||||
AC_SUBST(TREE_VERSION)
|
||||
AC_SUBST(NUT_NETVERSION)
|
||||
|
|
@ -1201,6 +1267,7 @@ AC_OUTPUT([
|
|||
data/Makefile
|
||||
data/driver.list
|
||||
docs/Makefile
|
||||
docs/docinfo.xml
|
||||
docs/man/Makefile
|
||||
drivers/Makefile
|
||||
include/Makefile
|
||||
|
|
@ -1209,6 +1276,7 @@ AC_OUTPUT([
|
|||
lib/libnutclient.pc
|
||||
lib/libnutscan.pc
|
||||
lib/Makefile
|
||||
scripts/Aix/nut-aix.spec
|
||||
scripts/augeas/Makefile
|
||||
scripts/augeas/nutnutconf.aug
|
||||
scripts/augeas/nutupsconf.aug
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue