Imported Upstream version 2.6.2
This commit is contained in:
parent
a367d9bc54
commit
45043b58d0
246 changed files with 18228 additions and 1415 deletions
151
configure.in
151
configure.in
|
|
@ -3,7 +3,7 @@ dnl | Network UPS Tools: configure.in |
|
|||
dnl +------------------------------------------------------------------+
|
||||
|
||||
dnl NUT version number is defined here and *only* here (no more include/version)
|
||||
AC_INIT(nut, 2.6.1)
|
||||
AC_INIT(nut, 2.6.2)
|
||||
AC_CONFIG_SRCDIR(server/upsd.c)
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
echo "Network UPS Tools version ${PACKAGE_VERSION}"
|
||||
|
|
@ -26,6 +26,8 @@ dnl Use "./configure --enable-maintainer-mode" to keep Makefile.in and Makefile
|
|||
dnl in sync after SVN updates.
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
dnl PKG_PROG_PKG_CONFIG
|
||||
|
||||
dnl # the following is commented out, because the UPS_VERSION macro now
|
||||
dnl # resides in include/nut_version.h, which is generated by Makefile.am,
|
||||
dnl # rather than in include/config.h, which is generated by configure. The
|
||||
|
|
@ -110,7 +112,7 @@ fi
|
|||
|
||||
case ${target_os} in
|
||||
hpux11* )
|
||||
dnl It seems like the thread safe string functions won't be included
|
||||
dnl It seems like the thread safe string functions will not be included
|
||||
dnl on 64 bit HP-UX unless we define _REENTRANT
|
||||
CFLAGS="${CFLAGS} -D_REENTRANT"
|
||||
;;
|
||||
|
|
@ -126,6 +128,16 @@ AC_CHECK_DECLS(optind, [], [
|
|||
], [AC_INCLUDES_DEFAULT])
|
||||
], [AC_INCLUDES_DEFAULT])
|
||||
|
||||
dnl do a 2nd check to ensure inclusion of getopt.h, in case optind is known
|
||||
AC_CHECK_HEADERS(getopt.h, [
|
||||
AC_DEFINE(NEED_GETOPT_H, 1, [Define if getopt.h is needed])
|
||||
], [
|
||||
AC_DEFINE(NEED_GETOPT_DECLS, 1, [Define to use explicit getopt declarations])
|
||||
], [AC_INCLUDES_DEFAULT])
|
||||
|
||||
dnl also check for getopt_long
|
||||
AC_CHECK_FUNCS(getopt_long)
|
||||
|
||||
dnl FreeBSD serial locking compatibility - look for uu_lock in libutil.h
|
||||
AC_CHECK_DECLS(uu_lock, [
|
||||
AC_DEFINE(HAVE_UU_LOCK, 1, [Use uu_lock for locking (FreeBSD)])
|
||||
|
|
@ -154,6 +166,11 @@ AC_SEARCH_LIBS(connect, socket)
|
|||
AC_HEADER_TIME
|
||||
AC_CHECK_HEADERS(sys/modem.h stdarg.h varargs.h sys/termios.h sys/time.h, [], [], [AC_INCLUDES_DEFAULT])
|
||||
|
||||
# pthread related checks
|
||||
AC_SEARCH_LIBS([pthread_create], [pthread],
|
||||
[AC_DEFINE(HAVE_PTHREAD, 1, [Define to enable pthread support code])],
|
||||
[])
|
||||
|
||||
dnl ----------------------------------------------------------------------
|
||||
dnl Check for types and define possible replacements
|
||||
NUT_TYPE_SOCKLEN_T
|
||||
|
|
@ -162,8 +179,8 @@ dnl ----------------------------------------------------------------------
|
|||
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, powerman, cgi, dev]),
|
||||
AC_ARG_WITH(all,
|
||||
AS_HELP_STRING([--with-all], [enable serial, usb, snmp, neon, ipmi, powerman, cgi, dev, avahi]),
|
||||
[
|
||||
if test -n "${withval}"; then
|
||||
dnl Note: we allow "no" as a positive value, because
|
||||
|
|
@ -175,6 +192,8 @@ AC_ARG_WITH(all,
|
|||
if test -z "${with_powerman}"; then with_powerman="${withval}"; fi
|
||||
if test -z "${with_cgi}"; then with_cgi="${withval}"; fi
|
||||
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
|
||||
AC_MSG_RESULT("${withval}")
|
||||
else
|
||||
AC_MSG_RESULT(not given)
|
||||
|
|
@ -210,6 +229,7 @@ NUT_ARG_WITH([neon], [build and install neon based XML/HTTP driver], [auto])
|
|||
NUT_CHECK_LIBNEON
|
||||
NUT_ARG_WITH([powerman], [build and install Powerman PDU client driver], [auto])
|
||||
NUT_CHECK_LIBPOWERMAN
|
||||
NUT_CHECK_LIBAVAHI
|
||||
|
||||
dnl ----------------------------------------------------------------------
|
||||
dnl additional USB-related checks
|
||||
|
|
@ -282,6 +302,26 @@ fi
|
|||
|
||||
AM_CONDITIONAL(WITH_NEONXML, test "${nut_with_neon}" = "yes")
|
||||
NUT_REPORT_FEATURE([build neon based XML driver], [${nut_with_neon}])
|
||||
if test "${nut_with_neon}" = "yes"; then
|
||||
AC_DEFINE_UNQUOTED(WITH_NEON, 1, [Define to enable Neon XML/HTTP support])
|
||||
fi
|
||||
|
||||
dnl ----------------------------------------------------------------------
|
||||
dnl checks related to --with-avahi
|
||||
|
||||
dnl ${nut_with_avahi}: any value except "yes" or "no" is treated as "auto".
|
||||
if test "${nut_with_avahi}" = "yes" -a "${nut_have_avahi}" != "yes"; then
|
||||
AC_MSG_ERROR(["avahi libraries not found"])
|
||||
fi
|
||||
|
||||
if test "${nut_with_avahi}" != "no"; then
|
||||
nut_with_avahi="${nut_have_avahi}"
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(WITH_AVAHI, test "${nut_with_avahi}" = "yes")
|
||||
if test "${nut_with_avahi}" = "yes"; then
|
||||
AC_DEFINE_UNQUOTED(WITH_AVAHI, 1, [Define to enable avahi support])
|
||||
fi
|
||||
|
||||
dnl ----------------------------------------------------------------------
|
||||
|
||||
|
|
@ -299,6 +339,68 @@ fi
|
|||
AM_CONDITIONAL(WITH_LIBPOWERMAN, test "${nut_with_powerman}" = "yes")
|
||||
NUT_REPORT_FEATURE([build Powerman PDU client driver], [${nut_with_powerman}])
|
||||
|
||||
dnl ----------------------------------------------------------------------
|
||||
dnl Check for with-ipmi, and --with-freeipmi (or --with-openipmi)
|
||||
dnl Only one can be enabled at a time, with a preference for FreeIPMI
|
||||
dnl if both are available (since it is the only one supported ATM!!)
|
||||
|
||||
nut_ipmi_lib=""
|
||||
|
||||
NUT_ARG_WITH([ipmi], [build and install IPMI PSU driver], [auto])
|
||||
NUT_ARG_WITH([freeipmi], [enable IPMI support using FreeIPMI], [auto])
|
||||
dnl NUT_ARG_WITH([openipmi], [enable IPMI support using OpenIPMI], [auto])
|
||||
|
||||
dnl ${nut_with_ipmi}: any value except "yes" or "no" is treated as "auto".
|
||||
if test "${nut_with_ipmi}" != "no"; then
|
||||
dnl check if FreeIPMI (and maybe later OpenIPMI) was explicitly requested
|
||||
if test "${nut_with_freeipmi}" = "yes"; then
|
||||
NUT_CHECK_LIBFREEIPMI
|
||||
if test "${nut_have_freeipmi}" != "yes"; then
|
||||
AC_MSG_ERROR(["GNU FreeIPMI not found, required for IPMI support"])
|
||||
fi
|
||||
dnl Implies --with-ipmi
|
||||
nut_with_ipmi="yes"
|
||||
dnl elif test "${nut_with_openipmi}" = "yes"; then
|
||||
dnl AC_MSG_ERROR(["OpenIPMI is not yet supported"])
|
||||
dnl NUT_CHECK_LIBOPENIPMI
|
||||
dnl if test "${nut_have_openipmi}" != "yes"; then
|
||||
dnl AC_MSG_ERROR(["OpenIPMI not found, required for IPMI support"])
|
||||
dnl fi
|
||||
dnl Implies --with-ipmi
|
||||
dnl nut_with_ipmi="yes"
|
||||
else
|
||||
dnl Prefer FreeIPMI over OpenIPMI otherwise
|
||||
NUT_CHECK_LIBFREEIPMI
|
||||
if test "${nut_have_freeipmi}" != "yes"; then
|
||||
if test "${nut_with_ipmi}" = "yes"; then
|
||||
AC_MSG_ERROR(["FreeIPMI not found, required for IPMI support"])
|
||||
fi
|
||||
nut_with_ipmi="no"
|
||||
dnl NUT_CHECK_OPENIPMI
|
||||
dnl if test "${nut_have_openipmi}" != "yes"; then
|
||||
dnl if test "${nut_with_ipmi}" = "yes"; then
|
||||
dnl AC_MSG_ERROR(["GNU FreeIPMI and OpenIPMI neither found, required for IPMI support"])
|
||||
dnl fi
|
||||
dnl nut_with_ipmi="no"
|
||||
dnl else
|
||||
dnl Implies --with-ipmi
|
||||
dnl nut_with_ipmi="yes"
|
||||
dnl nut_with_openipmi="yes"
|
||||
dnl fi
|
||||
else
|
||||
dnl Implies --with-ipmi
|
||||
nut_with_ipmi="yes"
|
||||
nut_with_freeipmi="yes"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(WITH_IPMI, test "${nut_with_ipmi}" = "yes")
|
||||
AM_CONDITIONAL(WITH_FREEIPMI, test "${nut_with_freeipmi}" = "yes")
|
||||
dnl AM_CONDITIONAL(WITH_OPENIPMI, test "${nut_with_openipmi}" = "yes")
|
||||
|
||||
NUT_REPORT_FEATURE([build IPMI driver], [${nut_with_ipmi} ${nut_ipmi_lib}])
|
||||
|
||||
dnl ----------------------------------------------------------------------
|
||||
dnl Check for --with-ssl
|
||||
|
||||
|
|
@ -550,7 +652,7 @@ AC_MSG_RESULT(${ALTPIDPATH})
|
|||
|
||||
AC_MSG_CHECKING(driver path)
|
||||
AC_ARG_WITH(drvpath,
|
||||
AS_HELP_STRING([--with-drvpath=PATH], [where to install ups drivers (EPREFIX/bin)]),
|
||||
AS_HELP_STRING([--with-drvpath=PATH], [where to install UPS drivers (EPREFIX/bin)]),
|
||||
[
|
||||
case "${withval}" in
|
||||
yes|no)
|
||||
|
|
@ -709,7 +811,7 @@ AC_ARG_WITH(drivers,
|
|||
AS_HELP_STRING([m4_version_prereq(2.62,
|
||||
[@<:@--with-drivers=driver@<:@,driver@:>@@:>@],
|
||||
[[[[--with-drivers=driver@<:@,driver@:>@]]]])],
|
||||
[Only use specific drivers (all)]),
|
||||
[Only build specific drivers (all)]),
|
||||
[
|
||||
case "${withval}" in
|
||||
yes|no)
|
||||
|
|
@ -783,6 +885,31 @@ else
|
|||
fi
|
||||
AM_CONDITIONAL(WITH_PKG_CONFIG, test -n "${pkgconfigdir}")
|
||||
|
||||
PKG_PROG_PKG_CONFIG
|
||||
systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd`
|
||||
AC_MSG_CHECKING(whether to install systemd files)
|
||||
AC_ARG_WITH([systemdsystemunitdir],
|
||||
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files (auto)]),
|
||||
[
|
||||
case "${withval}" in
|
||||
yes|auto)
|
||||
;;
|
||||
no)
|
||||
systemdsystemunitdir=""
|
||||
;;
|
||||
*)
|
||||
systemdsystemunitdir="${withval}"
|
||||
;;
|
||||
esac
|
||||
], [])
|
||||
if test -n "${systemdsystemunitdir}"; then
|
||||
systemdsystemshutdowndir="/lib/systemd/system-shutdown"
|
||||
AC_MSG_RESULT(using ${systemdsystemunitdir})
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_SYSTEMD, test "$systemdsystemunitdir" != "")
|
||||
|
||||
AC_MSG_CHECKING(whether to install hotplug rules)
|
||||
AC_ARG_WITH(hotplug-dir,
|
||||
AS_HELP_STRING([--with-hotplug-dir=PATH], [where to install hotplug rules (/etc/hotplug)]),
|
||||
|
|
@ -875,8 +1002,12 @@ AC_SUBST(LIBUSB_CFLAGS)
|
|||
AC_SUBST(LIBUSB_LIBS)
|
||||
AC_SUBST(LIBNEON_CFLAGS)
|
||||
AC_SUBST(LIBNEON_LIBS)
|
||||
AC_SUBST(LIBAVAHI_CFLAGS)
|
||||
AC_SUBST(LIBAVAHI_LIBS)
|
||||
AC_SUBST(LIBPOWERMAN_CFLAGS)
|
||||
AC_SUBST(LIBPOWERMAN_LIBS)
|
||||
AC_SUBST(LIBIPMI_CFLAGS)
|
||||
AC_SUBST(LIBIPMI_LIBS)
|
||||
AC_SUBST(DOC_BUILD_LIST)
|
||||
AC_SUBST(LIBWRAP_CFLAGS)
|
||||
AC_SUBST(LIBWRAP_LIBS)
|
||||
|
|
@ -894,6 +1025,7 @@ AC_SUBST(SERLIBS)
|
|||
AC_SUBST(STATEPATH)
|
||||
AC_SUBST(CONFPATH)
|
||||
AC_SUBST(BINDIR)
|
||||
AC_SUBST(PORT)
|
||||
AC_SUBST(RUN_AS_USER)
|
||||
AC_SUBST(RUN_AS_GROUP)
|
||||
AC_SUBST(SUN_LIBUSB)
|
||||
|
|
@ -902,6 +1034,8 @@ AC_SUBST(cgiexecdir)
|
|||
AC_SUBST(driverexecdir)
|
||||
AC_SUBST(htmldir)
|
||||
AC_SUBST(pkgconfigdir)
|
||||
AC_SUBST(systemdsystemunitdir)
|
||||
AC_SUBST(systemdsystemshutdowndir)
|
||||
AC_SUBST(hotplugdir)
|
||||
AC_SUBST(udevdir)
|
||||
|
||||
|
|
@ -931,16 +1065,21 @@ AC_OUTPUT([
|
|||
scripts/augeas/nutupsschedconf.aug
|
||||
scripts/augeas/nuthostsconf.aug
|
||||
scripts/augeas/nutupssetconf.aug
|
||||
scripts/avahi/nut.service
|
||||
scripts/hal/Makefile
|
||||
scripts/hal/ups-nut-device.fdi
|
||||
scripts/hotplug/Makefile
|
||||
scripts/hotplug/libhidups
|
||||
scripts/java/Makefile
|
||||
scripts/python/Makefile
|
||||
scripts/systemd/Makefile
|
||||
scripts/udev/Makefile
|
||||
scripts/udev/nut-ipmipsu.rules
|
||||
scripts/udev/nut-usbups.rules
|
||||
scripts/Makefile
|
||||
server/Makefile
|
||||
tools/Makefile
|
||||
tools/nut-scanner/Makefile
|
||||
Makefile
|
||||
])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue