2010-03-25 23:20:59 +00:00
|
|
|
dnl +------------------------------------------------------------------+
|
|
|
|
dnl | Network UPS Tools: configure.in |
|
|
|
|
dnl +------------------------------------------------------------------+
|
|
|
|
|
2013-11-24 15:00:12 +00:00
|
|
|
dnl NUT version number is defined here, with a Git suffix in include/nut_version.h
|
2014-04-22 18:39:47 +00:00
|
|
|
AC_INIT(nut, 2.7.2)
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_CONFIG_SRCDIR(server/upsd.c)
|
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
echo "Network UPS Tools version ${PACKAGE_VERSION}"
|
|
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
NUT_CHECK_OS
|
|
|
|
AC_CONFIG_HEADER(include/config.h)
|
|
|
|
AC_PREFIX_DEFAULT(/usr/local/ups)
|
|
|
|
AM_INIT_AUTOMAKE
|
|
|
|
|
2011-01-26 09:35:08 +00:00
|
|
|
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)
|
|
|
|
m4_version_prereq(2.60, [
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_USE_SYSTEM_EXTENSIONS
|
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
2010-03-25 23:20:59 +00:00
|
|
|
|
|
|
|
dnl Use "./configure --enable-maintainer-mode" to keep Makefile.in and Makefile
|
|
|
|
dnl in sync after SVN updates.
|
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
2011-09-29 18:14:46 +00:00
|
|
|
dnl PKG_PROG_PKG_CONFIG
|
|
|
|
|
2012-06-01 13:55:19 +00:00
|
|
|
dnl Various version related processing
|
|
|
|
dnl ----------------------------------
|
|
|
|
|
2010-03-25 23:20:59 +00:00
|
|
|
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
|
|
|
|
dnl # reason is that the SVN revision should be computed at compile time,
|
|
|
|
dnl # not configure time.
|
|
|
|
dnl AC_DEFINE_UNQUOTED(UPS_VERSION, "${PACKAGE_VERSION}", [NUT version])
|
|
|
|
|
2012-01-24 10:22:33 +00:00
|
|
|
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])
|
|
|
|
|
2012-06-01 13:55:19 +00:00
|
|
|
NUT_NETVERSION="1.2"
|
|
|
|
AC_DEFINE_UNQUOTED(NUT_NETVERSION, "${NUT_NETVERSION}", [NUT network protocol version])
|
|
|
|
|
2012-01-24 10:22:33 +00:00
|
|
|
|
2010-03-25 23:20:59 +00:00
|
|
|
dnl Fix this early so we can expand with eval later
|
|
|
|
test "${prefix}" = "NONE" && prefix="${ac_default_prefix}"
|
|
|
|
test "${exec_prefix}" = "NONE" && exec_prefix='${prefix}'
|
|
|
|
|
|
|
|
CFLAGS=${CFLAGS-"-O"}
|
|
|
|
|
|
|
|
dnl NOTE: for definition of NUT_* autoconf macros, see m4/ directory
|
|
|
|
dnl and docs/macros.txt
|
|
|
|
|
|
|
|
dnl +------------------------------------------------------------------+
|
|
|
|
dnl | default values for things later on (can be overridden) |
|
|
|
|
|
|
|
|
STATEPATH="/var/state/ups"
|
|
|
|
|
|
|
|
cgiexecdir='${exec_prefix}/cgi-bin'
|
|
|
|
driverexecdir='${exec_prefix}/bin'
|
|
|
|
htmldir='${prefix}/html'
|
|
|
|
pkgconfigdir='${libdir}/pkgconfig'
|
|
|
|
hotplugdir='/etc/hotplug'
|
|
|
|
if test ! -d "${hotplugdir}"; then
|
|
|
|
hotplugdir=''
|
|
|
|
fi
|
|
|
|
udevdir='/lib/udev'
|
|
|
|
if test ! -d "${udevdir}"; then
|
|
|
|
udevdir='/etc/udev'
|
|
|
|
if test ! -d "${udevdir}"; then
|
|
|
|
udevdir=''
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2014-04-22 18:39:47 +00:00
|
|
|
devddir='/usr/local/etc/devd'
|
|
|
|
if test ! -d "${devddir}"; then
|
|
|
|
devddir='/etc/devd'
|
|
|
|
if test ! -d "${devddir}"; then
|
|
|
|
devddir=''
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2010-03-25 23:20:59 +00:00
|
|
|
RUN_AS_USER="nobody"
|
|
|
|
RUN_AS_GROUP="nobody"
|
|
|
|
PIDPATH="/var/run"
|
|
|
|
|
|
|
|
dnl Define directory where LIBOBJS replacement functions are
|
|
|
|
AC_CONFIG_LIBOBJ_DIR([common])
|
|
|
|
|
|
|
|
dnl +-------------------------------------------------------------------
|
|
|
|
|
|
|
|
AC_PROG_CC
|
|
|
|
dnl Needed for per-target flags
|
|
|
|
AM_PROG_CC_C_O
|
|
|
|
AC_PROG_CPP
|
2012-08-12 21:39:31 +00:00
|
|
|
AC_PROG_CXX
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_EGREP
|
|
|
|
AC_PATH_PROG(AR, ar)
|
|
|
|
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
|
|
|
dnl Postpone call to AC_PROG_LIBTOOL to allow disabling static lib
|
|
|
|
AC_C_BIGENDIAN
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_C_FLEXIBLE_ARRAY_MEMBER
|
|
|
|
AC_C_VARARRAYS
|
|
|
|
AC_CHECK_FUNCS(flock lockf fcvt fcvtl)
|
|
|
|
AC_CHECK_FUNCS(cfsetispeed tcsendbreak)
|
|
|
|
AC_CHECK_FUNCS(seteuid setsid getpassphrase)
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_CHECK_FUNCS(on_exit strptime setlogmask)
|
|
|
|
AC_CHECK_DECLS(LOG_UPTO, [], [], [#include <syslog.h>])
|
2010-03-25 23:20:59 +00:00
|
|
|
|
|
|
|
dnl the following may add stuff to LIBOBJS (is this still needed?)
|
|
|
|
AC_CHECK_FUNCS(vsnprintf snprintf, [], [
|
|
|
|
AC_LIBOBJ(snprintf)
|
|
|
|
AC_TYPE_LONG_DOUBLE
|
|
|
|
AC_TYPE_LONG_LONG_INT
|
|
|
|
])
|
|
|
|
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_REPLACE_FUNCS(setenv strerror atexit)
|
2010-03-25 23:20:59 +00:00
|
|
|
|
2012-08-12 21:39:31 +00:00
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Tests for CppUnit availability and usability
|
|
|
|
dnl Using CppUnit implies C++ support!
|
|
|
|
dnl Theoretically, libcppunit-dev will pull up to g++, through libstdc++...
|
|
|
|
dnl AM_PATH_CPPUNIT(1.9.6)
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES(CPPUNIT, cppunit, have_cppunit=yes, have_cppunit=no)
|
|
|
|
if test "${have_cppunit}" != "yes" ; then
|
|
|
|
AC_MSG_WARN([libcppunit not found.])
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(HAVE_CPPUNIT, test "${have_cppunit}" = "yes")
|
|
|
|
|
2010-03-25 23:20:59 +00:00
|
|
|
dnl
|
|
|
|
dnl Only use these when compiling with gcc
|
|
|
|
dnl
|
|
|
|
if ( test "${GCC}" = "yes" )
|
|
|
|
then
|
|
|
|
CFLAGS="${CFLAGS} -Wall -Wsign-compare"
|
|
|
|
fi
|
|
|
|
|
2011-06-01 20:31:49 +00:00
|
|
|
case ${target_os} in
|
2013-11-24 15:00:12 +00:00
|
|
|
solaris2* )
|
|
|
|
dnl On Solaris, this allows errno to use thread local storage
|
|
|
|
CFLAGS="${CFLAGS} -D_REENTRANT"
|
|
|
|
;;
|
|
|
|
aix* )
|
|
|
|
dnl On AIX, this allows errno to use thread local storage
|
|
|
|
CFLAGS="${CFLAGS} -D_REENTRANT"
|
|
|
|
;;
|
2011-06-01 20:31:49 +00:00
|
|
|
hpux11* )
|
2011-09-29 18:14:46 +00:00
|
|
|
dnl It seems like the thread safe string functions will not be included
|
2011-06-01 20:31:49 +00:00
|
|
|
dnl on 64 bit HP-UX unless we define _REENTRANT
|
|
|
|
CFLAGS="${CFLAGS} -D_REENTRANT"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2010-03-25 23:20:59 +00:00
|
|
|
dnl optind handling:
|
|
|
|
dnl need to check if unistd.h is enough, else try getopt.h, else need decls
|
|
|
|
AC_CHECK_DECLS(optind, [], [
|
|
|
|
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])
|
|
|
|
], [AC_INCLUDES_DEFAULT])
|
|
|
|
|
2011-09-29 18:14:46 +00:00
|
|
|
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)
|
|
|
|
|
2010-03-25 23:20:59 +00:00
|
|
|
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)])
|
|
|
|
SERLIBS="-lutil"
|
|
|
|
dnl put in some better defaults for FreeBSD
|
|
|
|
RUN_AS_USER="uucp"
|
|
|
|
], [
|
|
|
|
SERLIBS=""
|
|
|
|
], [
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <libutil.h>
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_CHECK_DECLS(__func__, [], [
|
|
|
|
AC_CHECK_DECLS(__FUNCTION__, [
|
|
|
|
AC_DEFINE(__func__, __FUNCTION__, [Replace missing __func__ declaration])
|
|
|
|
], [
|
|
|
|
AC_DEFINE(__func__, __LINE__, [Replace missing __func__ declaration])
|
|
|
|
], [AC_INCLUDES_DEFAULT])
|
|
|
|
], [AC_INCLUDES_DEFAULT])
|
|
|
|
|
|
|
|
dnl Solaris compatibility - check for -lnsl and -lsocket
|
|
|
|
AC_SEARCH_LIBS(gethostbyname, nsl)
|
|
|
|
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])
|
|
|
|
|
2011-09-29 18:14:46 +00:00
|
|
|
# pthread related checks
|
|
|
|
AC_SEARCH_LIBS([pthread_create], [pthread],
|
|
|
|
[AC_DEFINE(HAVE_PTHREAD, 1, [Define to enable pthread support code])],
|
|
|
|
[])
|
|
|
|
|
2010-03-25 23:20:59 +00:00
|
|
|
dnl ----------------------------------------------------------------------
|
|
|
|
dnl Check for types and define possible replacements
|
|
|
|
NUT_TYPE_SOCKLEN_T
|
|
|
|
|
|
|
|
dnl ----------------------------------------------------------------------
|
|
|
|
dnl check for --with-all (or --without-all, or --with-all=auto) flag
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for --with-all)
|
2011-09-29 18:14:46 +00:00
|
|
|
AC_ARG_WITH(all,
|
|
|
|
AS_HELP_STRING([--with-all], [enable serial, usb, snmp, neon, ipmi, powerman, cgi, dev, avahi]),
|
2011-01-26 09:35:08 +00:00
|
|
|
[
|
|
|
|
if test -n "${withval}"; then
|
2010-03-25 23:20:59 +00:00
|
|
|
dnl Note: we allow "no" as a positive value, because
|
|
|
|
dnl this is what the user expects from --without-all
|
|
|
|
if test -z "${with_serial}"; then with_serial="${withval}"; fi
|
|
|
|
if test -z "${with_usb}"; then with_usb="${withval}"; fi
|
2011-01-26 09:35:08 +00:00
|
|
|
if test -z "${with_snmp}"; then with_snmp="${withval}"; fi
|
2010-03-25 23:20:59 +00:00
|
|
|
if test -z "${with_neon}"; then with_neon="${withval}"; fi
|
|
|
|
if test -z "${with_powerman}"; then with_powerman="${withval}"; fi
|
2011-01-26 09:35:08 +00:00
|
|
|
if test -z "${with_cgi}"; then with_cgi="${withval}"; fi
|
|
|
|
if test -z "${with_dev}"; then with_dev="${withval}"; fi
|
2011-09-29 18:14:46 +00:00
|
|
|
if test -z "${with_avahi}"; then with_avahi="${withval}"; fi
|
|
|
|
if test -z "${with_ipmi}"; then with_ipmi="${withval}"; fi
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_MSG_RESULT("${withval}")
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(not given)
|
|
|
|
fi
|
2011-01-26 09:35:08 +00:00
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(not given)
|
2010-03-25 23:20:59 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
dnl ----------------------------------------------------------------------
|
|
|
|
dnl declare a number of --with-FEATURE options. Do this early, so that
|
|
|
|
dnl they are listed near the top by "./configure --help"
|
|
|
|
|
|
|
|
NUT_ARG_WITH([dev], [build and install the development files], [no])
|
|
|
|
NUT_ARG_WITH([serial], [build and install serial drivers], [yes])
|
|
|
|
NUT_ARG_WITH([usb], [build and install USB drivers], [auto])
|
2011-01-26 09:35:08 +00:00
|
|
|
NUT_ARG_WITH([doc], [build and install documentation], [no])
|
2012-01-24 10:22:33 +00:00
|
|
|
NUT_ARG_WITH([avahi], [build and install Avahi support], [auto])
|
2011-01-26 09:35:08 +00:00
|
|
|
|
|
|
|
dnl ----------------------------------------------------------------------
|
|
|
|
dnl Check for presence and compiler flags of various libraries
|
|
|
|
|
|
|
|
dnl These checks are performed unconditionally, even if the corresponding
|
|
|
|
dnl --with-* options are not given. This is because we cannot predict
|
|
|
|
dnl what will be in the --with-drivers argument.
|
|
|
|
|
|
|
|
NUT_CHECK_LIBNETSNMP
|
2010-03-25 23:20:59 +00:00
|
|
|
NUT_CHECK_LIBUSB
|
|
|
|
NUT_ARG_WITH([snmp], [build and install SNMP drivers], [auto])
|
|
|
|
NUT_CHECK_LIBNETSNMP
|
|
|
|
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
|
2011-09-29 18:14:46 +00:00
|
|
|
NUT_CHECK_LIBAVAHI
|
2010-03-25 23:20:59 +00:00
|
|
|
|
|
|
|
dnl ----------------------------------------------------------------------
|
|
|
|
dnl additional USB-related checks
|
|
|
|
|
|
|
|
dnl Solaris 10/11 USB handling (need librt and libusb runtime path)
|
2013-11-24 15:00:12 +00:00
|
|
|
dnl HPUX, since v11, needs an explicit activation of pthreads
|
2010-03-25 23:20:59 +00:00
|
|
|
case ${target_os} in
|
|
|
|
solaris2.1* )
|
|
|
|
echo Checking for Solaris 10 / 11 specific configuration for usb drivers
|
|
|
|
AC_SEARCH_LIBS(nanosleep, rt)
|
2011-01-26 09:35:08 +00:00
|
|
|
LIBUSB_LIBS="-R/usr/sfw/lib ${LIBUSB_LIBS}"
|
2010-03-25 23:20:59 +00:00
|
|
|
dnl FIXME: Sun's libusb doesn't support timeout (so blocks notification)
|
2013-11-24 15:00:12 +00:00
|
|
|
dnl and need to call libusb close upon reconnection
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_DEFINE(SUN_LIBUSB, 1, [Define to 1 for Sun version of the libusb.])
|
|
|
|
SUN_LIBUSB=1
|
|
|
|
;;
|
2013-11-24 15:00:12 +00:00
|
|
|
hpux11*)
|
|
|
|
CFLAGS="${CFLAGS} -lpthread"
|
2010-03-25 23:20:59 +00:00
|
|
|
esac
|
|
|
|
|
2011-01-26 09:35:08 +00:00
|
|
|
|
|
|
|
dnl ----------------------------------------------------------------------
|
|
|
|
dnl checks related to --with-serial
|
|
|
|
|
|
|
|
dnl ${nut_with_serial}: any value except "yes" or "no" is treated as "auto".
|
|
|
|
if test "${nut_with_serial}" != "no"; then
|
|
|
|
nut_with_serial="yes"
|
|
|
|
fi
|
2012-01-24 10:22:33 +00:00
|
|
|
|
|
|
|
NUT_REPORT_FEATURE([build serial drivers], [${nut_with_serial}], [],
|
|
|
|
[WITH_SERIAL], [Define to enable serial support])
|
2011-01-26 09:35:08 +00:00
|
|
|
|
|
|
|
dnl ----------------------------------------------------------------------
|
|
|
|
dnl checks related to --with-usb
|
|
|
|
|
|
|
|
dnl ${nut_with_usb}: any value except "yes" or "no" is treated as "auto".
|
|
|
|
if test "${nut_with_usb}" = "yes" -a "${nut_have_libusb}" != "yes"; then
|
|
|
|
AC_MSG_ERROR(["USB drivers requested, but libusb not found."])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "${nut_with_usb}" != "no"; then
|
|
|
|
nut_with_usb="${nut_have_libusb}"
|
|
|
|
fi
|
|
|
|
|
2012-01-24 10:22:33 +00:00
|
|
|
NUT_REPORT_FEATURE([build USB drivers], [${nut_with_usb}], [],
|
|
|
|
[WITH_USB], [Define to enable USB support])
|
2011-01-26 09:35:08 +00:00
|
|
|
|
|
|
|
dnl ----------------------------------------------------------------------
|
|
|
|
dnl checks related to --with-snmp
|
|
|
|
|
|
|
|
dnl ${nut_with_snmp}: any value except "yes" or "no" is treated as "auto".
|
|
|
|
if test "${nut_with_snmp}" = "yes" -a "${nut_have_libnetsnmp}" != "yes"; then
|
|
|
|
AC_MSG_ERROR(["Net-SNMP libraries not found, required for SNMP drivers"])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "${nut_with_snmp}" != "no"; then
|
|
|
|
nut_with_snmp="${nut_have_libnetsnmp}"
|
|
|
|
fi
|
|
|
|
|
2012-01-24 10:22:33 +00:00
|
|
|
NUT_REPORT_FEATURE([build SNMP drivers], [${nut_with_snmp}], [],
|
|
|
|
[WITH_SNMP], [Define to enable SNMP support])
|
2011-01-26 09:35:08 +00:00
|
|
|
|
|
|
|
dnl ----------------------------------------------------------------------
|
|
|
|
dnl checks related to --with-neon
|
|
|
|
|
|
|
|
dnl ${nut_with_neon}: any value except "yes" or "no" is treated as "auto".
|
|
|
|
if test "${nut_with_neon}" = "yes" -a "${nut_have_neon}" != "yes"; then
|
|
|
|
AC_MSG_ERROR(["neon libraries not found, required for neon based XML/HTTP driver"])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "${nut_with_neon}" != "no"; then
|
|
|
|
nut_with_neon="${nut_have_neon}"
|
|
|
|
fi
|
|
|
|
|
2012-01-24 10:22:33 +00:00
|
|
|
NUT_REPORT_FEATURE([build neon based XML driver], [${nut_with_neon}], [],
|
|
|
|
[WITH_NEON], [Define to enable Neon HTTP support])
|
2011-09-29 18:14:46 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2012-01-24 10:22:33 +00:00
|
|
|
NUT_REPORT_FEATURE([enable Avahi support], [${nut_with_avahi}], [],
|
|
|
|
[WITH_AVAHI], [Define to enable Avahi support])
|
2011-01-26 09:35:08 +00:00
|
|
|
|
|
|
|
dnl ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
dnl checks related to --with-powerman
|
|
|
|
|
|
|
|
dnl ${nut_with_powerman}: any value except "yes" or "no" is treated as "auto".
|
|
|
|
if test "${nut_with_powerman}" = "yes" -a "${nut_have_libpowerman}" != "yes"; then
|
|
|
|
AC_MSG_ERROR(["Powerman client libraries not found, required for Powerman PDU client driver"])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "${nut_with_powerman}" != "no"; then
|
|
|
|
nut_with_powerman="${nut_have_libpowerman}"
|
|
|
|
fi
|
|
|
|
|
2012-01-24 10:22:33 +00:00
|
|
|
NUT_REPORT_FEATURE([build Powerman PDU client driver], [${nut_with_powerman}], [],
|
|
|
|
[WITH_LIBPOWERMAN], [Define to enable Powerman PDU support])
|
2011-01-26 09:35:08 +00:00
|
|
|
|
2011-09-29 18:14:46 +00:00
|
|
|
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"
|
2012-01-24 10:22:33 +00:00
|
|
|
dnl AC_DEFINE(WITH_OPENIPMI, 1, [Define to enable IPMI support using OpenIPMI])
|
2011-09-29 18:14:46 +00:00
|
|
|
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"
|
2012-01-24 10:22:33 +00:00
|
|
|
AC_DEFINE(WITH_FREEIPMI, 1, [Define to enable IPMI support using FreeIPMI])
|
2011-09-29 18:14:46 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2012-01-24 10:22:33 +00:00
|
|
|
|
|
|
|
NUT_REPORT_FEATURE([build IPMI driver], [${nut_with_ipmi}], [${nut_ipmi_lib}],
|
|
|
|
[WITH_IPMI], [Define to enable IPMI support])
|
|
|
|
|
|
|
|
dnl Note: we still have to manually enable complementary AC_DEFINEs (see above)
|
|
|
|
dnl and AM_CONDITIONALs (see below)...
|
2011-09-29 18:14:46 +00:00
|
|
|
AM_CONDITIONAL(WITH_FREEIPMI, test "${nut_with_freeipmi}" = "yes")
|
|
|
|
dnl AM_CONDITIONAL(WITH_OPENIPMI, test "${nut_with_openipmi}" = "yes")
|
|
|
|
|
|
|
|
|
2012-08-12 21:39:31 +00:00
|
|
|
dnl ----------------------------------------------------------------------
|
|
|
|
dnl The Mac OS X meta-driver looks at IOKit Power Sources keys managed by
|
|
|
|
dnl the internal USB UPS driver.
|
|
|
|
dnl
|
|
|
|
dnl FIXME: be slightly more clever here:
|
|
|
|
|
|
|
|
NUT_ARG_WITH([macosx_ups], [build and install Mac OS X Power Sources meta-driver], [auto])
|
|
|
|
if test "${nut_with_macosx_ups}" != no; then
|
|
|
|
if test -d /System/Library/Frameworks/IOKit.framework/ ; then
|
|
|
|
nut_with_macosx_ups="yes"
|
|
|
|
else
|
|
|
|
nut_with_macosx_ups="no"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
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])
|
|
|
|
|
2010-03-25 23:20:59 +00:00
|
|
|
dnl ----------------------------------------------------------------------
|
2013-11-24 15:00:12 +00:00
|
|
|
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
|
|
|
|
dnl if both are available
|
2010-03-25 23:20:59 +00:00
|
|
|
|
2013-11-24 15:00:12 +00:00
|
|
|
nut_ssl_lib=""
|
2010-03-25 23:20:59 +00:00
|
|
|
|
2013-11-24 15:00:12 +00:00
|
|
|
NUT_ARG_WITH([ssl], [enable SSL support (either NSS or OpenSSL)], [auto])
|
|
|
|
NUT_ARG_WITH([nss], [enable SSL support using Mozilla NSS], [auto])
|
|
|
|
NUT_ARG_WITH([openssl], [enable SSL support using OpenSSL], [auto])
|
2010-03-25 23:20:59 +00:00
|
|
|
|
2013-11-24 15:00:12 +00:00
|
|
|
dnl ${nut_with_ssl}: any value except "yes" or "no" is treated as "auto".
|
2010-03-25 23:20:59 +00:00
|
|
|
if test "${nut_with_ssl}" != "no"; then
|
2013-11-24 15:00:12 +00:00
|
|
|
dnl check if either NSS or OpenSSL was explicitly requested
|
|
|
|
if test "${nut_with_nss}" = "yes"; then
|
|
|
|
NUT_CHECK_LIBNSS
|
|
|
|
if test "${nut_have_libnss}" != "yes"; then
|
|
|
|
AC_MSG_ERROR(["Mozilla NSS not found, required for SSL support"])
|
|
|
|
fi
|
|
|
|
elif test "${nut_with_openssl}" = "yes"; then
|
|
|
|
NUT_CHECK_LIBOPENSSL
|
|
|
|
if test "${nut_have_openssl}" != "yes"; then
|
|
|
|
AC_MSG_ERROR(["OpenSSL not found, required for SSL support"])
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
dnl Prefer OpenSSL over NSS otherwise
|
|
|
|
NUT_CHECK_LIBOPENSSL
|
|
|
|
if test "${nut_have_openssl}" != "yes"; then
|
|
|
|
NUT_CHECK_LIBNSS
|
|
|
|
if test "${nut_have_libnss}" != "yes"; then
|
|
|
|
dnl Only abort if SSL has been explicitly requested by the user
|
|
|
|
if test "${nut_with_ssl}" = "yes"; then
|
|
|
|
AC_MSG_ERROR(["Mozilla NSS and OpenSSL neither found, but are needed for the requested SSL support"])
|
|
|
|
else
|
|
|
|
AC_MSG_WARN(["Mozilla NSS and OpenSSL neither found, required for SSL support"])
|
|
|
|
fi
|
|
|
|
nut_with_ssl="no"
|
|
|
|
else
|
|
|
|
nut_with_nss="${nut_have_libnss}"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
nut_with_openssl="${nut_have_openssl}"
|
|
|
|
fi
|
|
|
|
fi
|
2010-03-25 23:20:59 +00:00
|
|
|
fi
|
|
|
|
|
2013-11-24 15:00:12 +00:00
|
|
|
AM_CONDITIONAL(WITH_NSS, test "${nut_with_nss}" = "yes")
|
|
|
|
AM_CONDITIONAL(WITH_OPENSSL, test "${nut_with_openssl}" = "yes")
|
|
|
|
|
|
|
|
NUT_REPORT_FEATURE([enable SSL support], [${nut_with_ssl}], [${nut_ssl_lib}],
|
|
|
|
[WITH_SSL], [Define to enable SSL])
|
2010-03-25 23:20:59 +00:00
|
|
|
|
|
|
|
dnl ----------------------------------------------------------------------
|
|
|
|
dnl Check for --with-wrap
|
|
|
|
|
|
|
|
NUT_ARG_WITH([wrap], [enable libwrap (tcp-wrappers) support], [auto])
|
|
|
|
|
|
|
|
dnl ${nut_with_wrap}: any value except "yes" or "no" is treated as "auto".
|
|
|
|
if test "${nut_with_wrap}" != "no"; then
|
|
|
|
dnl check for libwrap compiler flags
|
|
|
|
NUT_CHECK_LIBWRAP
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "${nut_with_wrap}" = "yes" -a "${nut_have_libwrap}" != "yes"; then
|
|
|
|
AC_MSG_ERROR(["libwrap not found"])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "${nut_with_wrap}" != "no"; then
|
|
|
|
nut_with_wrap="${nut_have_libwrap}"
|
|
|
|
fi
|
|
|
|
|
2012-01-24 10:22:33 +00:00
|
|
|
NUT_REPORT_FEATURE([enable libwrap (tcp-wrappers) support], [${nut_with_wrap}], [],
|
|
|
|
[WITH_WRAP], [Define to enable libwrap (tcp-wrappers) support])
|
|
|
|
|
|
|
|
|
|
|
|
dnl ----------------------------------------------------------------------
|
|
|
|
dnl Check for --with-libltdl
|
|
|
|
|
|
|
|
NUT_ARG_WITH([libltdl], [enable libltdl (Libtool dlopen abstraction) support], [auto])
|
|
|
|
|
|
|
|
dnl ${nut_with_libltdl}: any value except "yes" or "no" is treated as "auto".
|
|
|
|
if test "${nut_with_libltdl}" != "no"; then
|
|
|
|
dnl check for libltdl compiler flags
|
|
|
|
NUT_CHECK_LIBLTDL
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "${nut_with_libltdl}" = "yes" -a "${nut_have_libltdl}" != "yes"; then
|
|
|
|
AC_MSG_ERROR(["libltdl not found"])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "${nut_with_libltdl}" != "no"; then
|
|
|
|
nut_with_libltdl="${nut_have_libltdl}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
NUT_REPORT_FEATURE([enable libltdl (Libtool dlopen abstraction) support], [${nut_with_libltdl}], [],
|
|
|
|
[WITH_LIBLTDL], [Define to enable libltdl (Libtool dlopen abstraction) support])
|
2010-03-25 23:20:59 +00:00
|
|
|
|
2012-08-12 21:39:31 +00:00
|
|
|
dnl Explicitely report if we are building nut-scanner or not
|
|
|
|
dnl since it requires libltdl
|
|
|
|
NUT_REPORT([build nut-scanner], [${nut_with_libltdl}])
|
|
|
|
|
2010-03-25 23:20:59 +00:00
|
|
|
dnl ----------------------------------------------------------------------
|
|
|
|
dnl checks related to --with-cgi
|
|
|
|
|
|
|
|
NUT_ARG_WITH([cgi], [build and install the CGI programs], [no])
|
|
|
|
|
|
|
|
dnl ${nut_with_cgi}: any value except "yes" or "no" is treated as "auto".
|
|
|
|
if test "${nut_with_cgi}" != "no"; then
|
|
|
|
dnl check for libgd compiler flags
|
|
|
|
NUT_CHECK_LIBGD
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "${nut_with_cgi}" = "yes" -a "${nut_have_libgd}" != "yes"; then
|
|
|
|
AC_MSG_ERROR([libgd not found, required for CGI build])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "${nut_with_cgi}" != "no"; then
|
|
|
|
nut_with_cgi="${nut_have_libgd}"
|
|
|
|
fi
|
|
|
|
|
2012-01-24 10:22:33 +00:00
|
|
|
NUT_REPORT_FEATURE([build CGI programs], [${nut_with_cgi}], [],
|
|
|
|
[WITH_CGI], [Define to enable CGI (HTTP) support])
|
2010-03-25 23:20:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
dnl ----------------------------------------------------------------------
|
|
|
|
|
2011-01-26 09:35:08 +00:00
|
|
|
dnl checks related to --with-doc
|
2010-03-25 23:20:59 +00:00
|
|
|
|
2011-01-26 09:35:08 +00:00
|
|
|
dnl Always check for AsciiDoc prerequisites, since even if --with-doc
|
2014-04-22 18:39:47 +00:00
|
|
|
dnl is set to 'no', we may still want to build some doc targets manually
|
2011-01-26 09:35:08 +00:00
|
|
|
NUT_CHECK_ASCIIDOC
|
2010-03-25 23:20:59 +00:00
|
|
|
|
2011-01-26 09:35:08 +00:00
|
|
|
case "${nut_with_doc}" in
|
|
|
|
yes|all|auto)
|
|
|
|
nut_doc_build_list="html-single html-chunked pdf"
|
|
|
|
;;
|
|
|
|
no)
|
|
|
|
nut_doc_build_list=""
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
nut_doc_build_list="`echo ${nut_with_doc} | sed 's/,/ /g'`"
|
|
|
|
;;
|
|
|
|
esac
|
2010-03-25 23:20:59 +00:00
|
|
|
|
2011-01-26 09:35:08 +00:00
|
|
|
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}])
|
|
|
|
AX_COMPARE_VERSION([${ASCIIDOC_VERSION}], [ge], [8.6.3], [
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}"
|
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}"
|
|
|
|
])
|
|
|
|
;;
|
2010-03-25 23:20:59 +00:00
|
|
|
|
2011-01-26 09:35:08 +00:00
|
|
|
html-chunked)
|
|
|
|
AC_MSG_CHECKING([if a2x version can build ${nut_doc_build_target}])
|
|
|
|
AX_COMPARE_VERSION([${A2X_VERSION}], [ge], [8.6.3], [
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}"
|
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}"
|
|
|
|
])
|
|
|
|
;;
|
2010-03-25 23:20:59 +00:00
|
|
|
|
2011-01-26 09:35:08 +00:00
|
|
|
pdf)
|
|
|
|
AC_MSG_CHECKING([if dblatex version can build ${nut_doc_build_target}])
|
|
|
|
AX_COMPARE_VERSION([${DBLATEX_VERSION}], [ge], [0.2.5], [
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}"
|
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}"
|
|
|
|
])
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
2010-03-25 23:20:59 +00:00
|
|
|
|
2011-01-26 09:35:08 +00:00
|
|
|
case "${nut_with_doc}" in
|
|
|
|
auto)
|
|
|
|
if test -n "${DOC_BUILD_LIST}"; then
|
|
|
|
nut_with_doc="yes"
|
|
|
|
else
|
|
|
|
nut_with_doc="no"
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
no)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
if test -z "${DOC_NOBUILD_LIST}"; then
|
|
|
|
nut_with_doc="yes"
|
|
|
|
else
|
2012-06-01 13:55:19 +00:00
|
|
|
AC_MSG_ERROR(["Unable to build ${DOC_NOBUILD_LIST} documentation"])
|
2011-01-26 09:35:08 +00:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2014-04-22 18:39:47 +00:00
|
|
|
AC_MSG_CHECKING([if asciidoc version can build manpages (minimum required 8.6.3)])
|
2011-01-26 09:35:08 +00:00
|
|
|
AX_COMPARE_VERSION([${ASCIIDOC_VERSION}], [ge], [8.6.3], [
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
nut_have_asciidoc="yes"
|
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
nut_have_asciidoc="no"
|
|
|
|
])
|
|
|
|
|
2014-04-22 18:39:47 +00:00
|
|
|
AC_MSG_CHECKING([if a2x version can build manpages (minimum required 8.6.3)])
|
2011-01-26 09:35:08 +00:00
|
|
|
AX_COMPARE_VERSION([${A2X_VERSION}], [ge], [8.6.3], [
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
nut_have_asciidoc="no"
|
|
|
|
])
|
|
|
|
|
2012-01-24 10:22:33 +00:00
|
|
|
NUT_REPORT_FEATURE([build and install documentation], [${nut_with_doc}], [],
|
|
|
|
[WITH_ASCIIDOC], [Define to enable Asciidoc support])
|
|
|
|
|
|
|
|
dnl Notes: we also keep HAVE_ASCIIDOC for implicit targets, such as manpage
|
|
|
|
dnl building
|
2011-01-26 09:35:08 +00:00
|
|
|
AM_CONDITIONAL([HAVE_ASCIIDOC], [test "${nut_have_asciidoc}" = "yes"])
|
|
|
|
|
|
|
|
if test "${nut_with_doc}" = "yes"; then
|
|
|
|
NUT_REPORT([only build specific documentation format], [${DOC_BUILD_LIST}])
|
2010-03-25 23:20:59 +00:00
|
|
|
fi
|
|
|
|
|
2011-01-26 09:35:08 +00:00
|
|
|
dnl ----------------------------------------------------------------------
|
|
|
|
dnl checks related to --with-dev
|
|
|
|
|
|
|
|
dnl We only init libtool there to allow AC_DISABLE_STATIC
|
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
|
|
|
|
dnl ${nut_with_dev}: any value except "yes" or "no" is treated as "auto".
|
|
|
|
if test "${nut_with_dev}" != "no"; then
|
|
|
|
nut_with_dev="yes"
|
|
|
|
else
|
|
|
|
AC_DISABLE_STATIC
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(WITH_DEV, test "${nut_with_dev}" = "yes")
|
2012-01-24 10:22:33 +00:00
|
|
|
NUT_REPORT_FEATURE([build and install the development files], [${nut_with_dev}], [],
|
|
|
|
[WITH_DEV], [Define to enable development files support])
|
2010-03-25 23:20:59 +00:00
|
|
|
|
|
|
|
dnl ----------------------------------------------------------------------
|
|
|
|
|
2011-01-26 09:35:08 +00:00
|
|
|
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_MSG_CHECKING(state path)
|
|
|
|
AC_ARG_WITH(statepath,
|
2011-01-26 09:35:08 +00:00
|
|
|
AS_HELP_STRING([--with-statepath=PATH], [path for ups state files (/var/state/ups)]),
|
|
|
|
[
|
|
|
|
case "${withval}" in
|
2010-03-25 23:20:59 +00:00
|
|
|
yes|no)
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_MSG_ERROR(invalid option --with(out)-statepath - see docs/configure.txt)
|
2010-03-25 23:20:59 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
STATEPATH="${withval}"
|
|
|
|
;;
|
2011-01-26 09:35:08 +00:00
|
|
|
esac
|
|
|
|
], [])
|
|
|
|
AC_DEFINE_UNQUOTED(STATEPATH, "${STATEPATH}", [Path for UPS driver state files])
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_MSG_RESULT(${STATEPATH})
|
|
|
|
|
|
|
|
dnl ---------------------------------------------------------------------
|
|
|
|
dnl The 'alt pid path' is used by the drivers (via main.c) and upsd, since
|
2011-01-26 09:35:08 +00:00
|
|
|
dnl ideally they do not run as root and will not be able to write to the usual
|
2010-03-25 23:20:59 +00:00
|
|
|
dnl /var/run path. This defaults to the STATEPATH since they should be
|
|
|
|
dnl able to write there.
|
|
|
|
dnl
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(alt pid path)
|
|
|
|
AC_ARG_WITH(altpidpath,
|
2011-01-26 09:35:08 +00:00
|
|
|
AS_HELP_STRING([--with-altpidpath=PATH], [path for driver/upsd .pid files (<statepath>)]),
|
|
|
|
[
|
|
|
|
case "${withval}" in
|
2010-03-25 23:20:59 +00:00
|
|
|
yes|no)
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_MSG_ERROR(invalid option --with(out)-altpidpath - see docs/configure.txt)
|
2010-03-25 23:20:59 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
ALTPIDPATH="${withval}"
|
|
|
|
;;
|
2011-01-26 09:35:08 +00:00
|
|
|
esac
|
|
|
|
], [
|
2010-03-25 23:20:59 +00:00
|
|
|
ALTPIDPATH="${STATEPATH}"
|
2011-01-26 09:35:08 +00:00
|
|
|
])
|
|
|
|
AC_DEFINE_UNQUOTED(ALTPIDPATH, "${ALTPIDPATH}", [Path for pid files of drivers and upsd (usually STATEPATH)])
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_MSG_RESULT(${ALTPIDPATH})
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(driver path)
|
|
|
|
AC_ARG_WITH(drvpath,
|
2011-09-29 18:14:46 +00:00
|
|
|
AS_HELP_STRING([--with-drvpath=PATH], [where to install UPS drivers (EPREFIX/bin)]),
|
2011-01-26 09:35:08 +00:00
|
|
|
[
|
|
|
|
case "${withval}" in
|
2010-03-25 23:20:59 +00:00
|
|
|
yes|no)
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_MSG_ERROR(invalid option --with(out)-drvpath - see docs/configure.txt)
|
2010-03-25 23:20:59 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
driverexecdir="${withval}"
|
|
|
|
;;
|
2011-01-26 09:35:08 +00:00
|
|
|
esac
|
|
|
|
], [])
|
2010-03-25 23:20:59 +00:00
|
|
|
conftemp="${driverexecdir}"
|
|
|
|
eval conftemp=\"${conftemp}\"
|
|
|
|
eval conftemp=\"${conftemp}\"
|
|
|
|
AC_DEFINE_UNQUOTED(DRVPATH, "${conftemp}", [Default path for UPS drivers])
|
|
|
|
AC_MSG_RESULT(${driverexecdir})
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(cgi path)
|
|
|
|
AC_ARG_WITH(cgipath,
|
2011-01-26 09:35:08 +00:00
|
|
|
AS_HELP_STRING([--with-cgipath=PATH], [where to install CGI programs (EPREFIX/cgi-bin)]),
|
|
|
|
[
|
|
|
|
case "${withval}" in
|
2010-03-25 23:20:59 +00:00
|
|
|
yes|no)
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_MSG_ERROR(invalid option --with(out)-cgipath - see docs/configure.txt)
|
2010-03-25 23:20:59 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
cgiexecdir="${withval}"
|
|
|
|
;;
|
2011-01-26 09:35:08 +00:00
|
|
|
esac
|
|
|
|
], [])
|
2010-03-25 23:20:59 +00:00
|
|
|
conftemp="${cgiexecdir}"
|
|
|
|
eval conftemp=\"${conftemp}\"
|
|
|
|
eval conftemp=\"${conftemp}\"
|
|
|
|
AC_DEFINE_UNQUOTED(CGIPATH, "${conftemp}", [Default path for CGI programs])
|
|
|
|
AC_MSG_RESULT(${cgiexecdir})
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(html path)
|
|
|
|
AC_ARG_WITH(htmlpath,
|
2011-01-26 09:35:08 +00:00
|
|
|
AS_HELP_STRING([--with-htmlpath=PATH], [where to install HTML files (PREFIX/html)]),
|
|
|
|
[
|
|
|
|
case "${withval}" in
|
2010-03-25 23:20:59 +00:00
|
|
|
yes|no)
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_MSG_ERROR(invalid option --with(out)-htmlpath - see docs/configure.txt)
|
2010-03-25 23:20:59 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
htmldir="${withval}"
|
|
|
|
;;
|
2011-01-26 09:35:08 +00:00
|
|
|
esac
|
|
|
|
], [])
|
2010-03-25 23:20:59 +00:00
|
|
|
conftemp="${htmldir}"
|
|
|
|
eval conftemp=\"${conftemp}\"
|
|
|
|
eval conftemp=\"${conftemp}\"
|
|
|
|
AC_DEFINE_UNQUOTED(HTMLPATH, "${conftemp}", [Default path for HTML files])
|
|
|
|
AC_MSG_RESULT(${htmldir})
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(pidpath)
|
|
|
|
AC_ARG_WITH(pidpath,
|
2011-01-26 09:35:08 +00:00
|
|
|
AS_HELP_STRING([--with-pidpath=PATH], [path for .pid files (/var/run)]),
|
|
|
|
[
|
|
|
|
case "${withval}" in
|
2010-03-25 23:20:59 +00:00
|
|
|
yes|no)
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_MSG_ERROR(invalid option --with(out)-pidpath - see docs/configure.txt)
|
2010-03-25 23:20:59 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
PIDPATH="${withval}"
|
|
|
|
;;
|
2011-01-26 09:35:08 +00:00
|
|
|
esac
|
|
|
|
], [])
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_DEFINE_UNQUOTED(PIDPATH, "${PIDPATH}", [Path where the pid files should go])
|
|
|
|
AC_MSG_RESULT(${PIDPATH})
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(network port number)
|
|
|
|
AC_ARG_WITH(port,
|
2011-01-26 09:35:08 +00:00
|
|
|
AS_HELP_STRING([--with-port=PORT], [port for network communications (3493)]),
|
|
|
|
[
|
|
|
|
case "${withval}" in
|
2010-03-25 23:20:59 +00:00
|
|
|
yes|no)
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_MSG_ERROR(invalid option --with(out)-port - see docs/configure.txt)
|
2010-03-25 23:20:59 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
PORT="${withval}"
|
|
|
|
;;
|
2011-01-26 09:35:08 +00:00
|
|
|
esac
|
|
|
|
], [
|
2010-03-25 23:20:59 +00:00
|
|
|
PORT="3493"
|
2011-01-26 09:35:08 +00:00
|
|
|
])
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_DEFINE_UNQUOTED(PORT, ${PORT}, [Port for network communications])
|
|
|
|
AC_MSG_RESULT(${PORT})
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(user to run as)
|
|
|
|
AC_ARG_WITH(user,
|
2011-01-26 09:35:08 +00:00
|
|
|
AS_HELP_STRING([--with-user=username], [user for programs started as root (nobody)]),
|
|
|
|
[
|
|
|
|
case "${withval}" in
|
2010-03-25 23:20:59 +00:00
|
|
|
yes|no)
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_MSG_ERROR(invalid option --with(out)-user - see docs/configure.txt)
|
2010-03-25 23:20:59 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
RUN_AS_USER="${withval}"
|
|
|
|
nut_user_given=yes
|
|
|
|
;;
|
2011-01-26 09:35:08 +00:00
|
|
|
esac
|
|
|
|
], [
|
|
|
|
nut_user_given=no
|
|
|
|
])
|
|
|
|
AC_DEFINE_UNQUOTED(RUN_AS_USER, "${RUN_AS_USER}", [User to switch to if started as root])
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_MSG_RESULT(${RUN_AS_USER})
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(group membership of user to run as)
|
|
|
|
AC_ARG_WITH(group,
|
2011-01-26 09:35:08 +00:00
|
|
|
AS_HELP_STRING([--with-group=groupname], [group membership of user for programs started as root (nogroup)]),
|
|
|
|
[
|
|
|
|
case "${withval}" in
|
2010-03-25 23:20:59 +00:00
|
|
|
yes|no)
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_MSG_ERROR(invalid option --with(out)-group - see docs/configure.txt)
|
2010-03-25 23:20:59 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
RUN_AS_GROUP="${withval}"
|
|
|
|
nut_group_given=yes
|
|
|
|
;;
|
2011-01-26 09:35:08 +00:00
|
|
|
esac
|
|
|
|
], [
|
|
|
|
nut_group_given=no
|
|
|
|
])
|
|
|
|
AC_DEFINE_UNQUOTED(RUN_AS_GROUP, "${RUN_AS_GROUP}", [Group membership of user to switch to if started as root])
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_MSG_RESULT(${RUN_AS_GROUP})
|
|
|
|
|
2011-01-26 09:35:08 +00:00
|
|
|
dnl check that --with-user is given if --with-group is given.
|
|
|
|
if test "${nut_user_given}" = "yes" -a "${nut_group_given}" = "no"; then
|
|
|
|
AC_MSG_ERROR(["If you specify --with-user, you also must specify --with-group"])
|
|
|
|
elif test "${nut_user_given}" = "no" -a "${nut_group_given}" = "yes"; then
|
|
|
|
AC_MSG_ERROR(["If you specify --with-group, you also must specify --with-user"])
|
2010-03-25 23:20:59 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(facility for syslog)
|
|
|
|
AC_ARG_WITH(logfacility,
|
2011-01-26 09:35:08 +00:00
|
|
|
AS_HELP_STRING([--with-logfacility=FACILITY], [facility for log messages (LOG_DAEMON)]),
|
|
|
|
[
|
|
|
|
case "${withval}" in
|
2010-03-25 23:20:59 +00:00
|
|
|
yes|no)
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_MSG_ERROR(invalid option --with(out)-logfacility - see docs/configure.txt)
|
2010-03-25 23:20:59 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
LOGFACILITY="${withval}"
|
|
|
|
;;
|
2011-01-26 09:35:08 +00:00
|
|
|
esac
|
|
|
|
], [
|
2010-03-25 23:20:59 +00:00
|
|
|
LOGFACILITY="LOG_DAEMON"
|
2011-01-26 09:35:08 +00:00
|
|
|
])
|
|
|
|
AC_DEFINE_UNQUOTED(LOG_FACILITY, ${LOGFACILITY}, [Desired syslog facility - see syslog(3)])
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_MSG_RESULT(${LOGFACILITY})
|
|
|
|
|
2011-01-26 09:35:08 +00:00
|
|
|
dnl Autoconf versions before 2.62 do not allow consecutive quadrigraphs,
|
|
|
|
dnl so the help string depends on the version used
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_MSG_CHECKING(which drivers to build)
|
|
|
|
AC_ARG_WITH(drivers,
|
2011-01-26 09:35:08 +00:00
|
|
|
AS_HELP_STRING([m4_version_prereq(2.62,
|
|
|
|
[@<:@--with-drivers=driver@<:@,driver@:>@@:>@],
|
|
|
|
[[[[--with-drivers=driver@<:@,driver@:>@]]]])],
|
2011-09-29 18:14:46 +00:00
|
|
|
[Only build specific drivers (all)]),
|
2011-01-26 09:35:08 +00:00
|
|
|
[
|
|
|
|
case "${withval}" in
|
|
|
|
yes|no)
|
|
|
|
AC_MSG_ERROR(invalid option --with(out)-drivers - see docs/configure.txt)
|
2010-03-25 23:20:59 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
DRIVER_BUILD_LIST=`echo ${withval} | sed "s/,/ /g"`
|
|
|
|
AC_MSG_RESULT(${DRIVER_BUILD_LIST})
|
|
|
|
;;
|
|
|
|
esac
|
2011-01-26 09:35:08 +00:00
|
|
|
], [
|
2010-03-25 23:20:59 +00:00
|
|
|
DRIVER_BUILD_LIST="all"
|
|
|
|
AC_MSG_RESULT(all available)
|
2011-01-26 09:35:08 +00:00
|
|
|
])
|
2010-03-25 23:20:59 +00:00
|
|
|
AM_CONDITIONAL(SOME_DRIVERS, test "${DRIVER_BUILD_LIST}" != "all")
|
|
|
|
|
|
|
|
if test "${DRIVER_BUILD_LIST}" != "all"; then
|
2011-01-26 09:35:08 +00:00
|
|
|
NUT_REPORT([only build specific drivers], [${DRIVER_BUILD_LIST}])
|
2010-03-25 23:20:59 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(which driver man pages to install)
|
|
|
|
if test "${DRIVER_BUILD_LIST}" = "all"; then
|
2011-01-26 09:35:08 +00:00
|
|
|
DRIVER_MAN_LIST=all
|
|
|
|
AC_MSG_RESULT(all available)
|
2010-03-25 23:20:59 +00:00
|
|
|
else
|
2011-01-26 09:35:08 +00:00
|
|
|
DRIVER_MAN_LIST=""
|
|
|
|
for i in ${DRIVER_BUILD_LIST}; do
|
|
|
|
if test -f ${srcdir}/docs/man/$i.8; then
|
|
|
|
DRIVER_MAN_LIST="${DRIVER_MAN_LIST} $i.8"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
AC_MSG_RESULT(${DRIVER_MAN_LIST})
|
2010-03-25 23:20:59 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(whether to strip debug symbols)
|
|
|
|
AC_ARG_ENABLE(strip,
|
2011-01-26 09:35:08 +00:00
|
|
|
AS_HELP_STRING([--enable-strip], [Strip debugging symbols from binaries (no)]),
|
2010-03-25 23:20:59 +00:00
|
|
|
[
|
|
|
|
case "${withval}" in
|
2011-01-26 09:35:08 +00:00
|
|
|
no)
|
|
|
|
AC_MSG_RESULT(no)
|
2010-03-25 23:20:59 +00:00
|
|
|
;;
|
2011-01-26 09:35:08 +00:00
|
|
|
*)
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
CFLAGS="${CFLAGS} -s"
|
2010-03-25 23:20:59 +00:00
|
|
|
;;
|
|
|
|
esac
|
2011-01-26 09:35:08 +00:00
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(no)
|
2010-03-25 23:20:59 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(whether to install pkg-config *.pc files)
|
|
|
|
AC_ARG_WITH(pkgconfig-dir,
|
2011-01-26 09:35:08 +00:00
|
|
|
AS_HELP_STRING([--with-pkgconfig-dir=PATH], [where to install pkg-config *.pc files (EPREFIX/lib/pkgconfig)]),
|
|
|
|
[
|
|
|
|
case "${withval}" in
|
|
|
|
yes|auto)
|
|
|
|
;;
|
|
|
|
no)
|
|
|
|
pkgconfigdir=""
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
pkgconfigdir="${withval}"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
], [])
|
2010-03-25 23:20:59 +00:00
|
|
|
if test -n "${pkgconfigdir}"; then
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_MSG_RESULT(using ${pkgconfigdir})
|
2010-03-25 23:20:59 +00:00
|
|
|
else
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_MSG_RESULT(no)
|
2010-03-25 23:20:59 +00:00
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(WITH_PKG_CONFIG, test -n "${pkgconfigdir}")
|
|
|
|
|
2011-09-29 18:14:46 +00:00
|
|
|
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
|
|
|
|
], [])
|
2012-08-12 21:39:31 +00:00
|
|
|
dnl Override installation directory, with the local installation
|
|
|
|
dnl prefix. This is needed for 'distcheck*' targets, otherwise
|
|
|
|
dnl files will try to get intalled to the actual system directories
|
2011-09-29 18:14:46 +00:00
|
|
|
if test -n "${systemdsystemunitdir}"; then
|
2012-08-12 21:39:31 +00:00
|
|
|
systemdsystemshutdowndir="${libdir}/systemd/system-shutdown"
|
2011-09-29 18:14:46 +00:00
|
|
|
AC_MSG_RESULT(using ${systemdsystemunitdir})
|
2012-08-12 21:39:31 +00:00
|
|
|
systemdsystemunitdir="`echo ${systemdsystemunitdir} | sed 's/\/lib/\${libdir}/'`"
|
2011-09-29 18:14:46 +00:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(HAVE_SYSTEMD, test "$systemdsystemunitdir" != "")
|
|
|
|
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_MSG_CHECKING(whether to install hotplug rules)
|
|
|
|
AC_ARG_WITH(hotplug-dir,
|
2011-01-26 09:35:08 +00:00
|
|
|
AS_HELP_STRING([--with-hotplug-dir=PATH], [where to install hotplug rules (/etc/hotplug)]),
|
|
|
|
[
|
|
|
|
case "${withval}" in
|
|
|
|
yes)
|
|
|
|
if test -z "${hotplugdir}"; then
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
AC_MSG_ERROR(["hotplug directory requested but not found"])
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
auto)
|
|
|
|
;;
|
|
|
|
no)
|
|
|
|
hotplugdir=""
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
hotplugdir="${withval}"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
], [])
|
2010-03-25 23:20:59 +00:00
|
|
|
if test -n "${hotplugdir}"; then
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_MSG_RESULT(using ${hotplugdir})
|
2010-03-25 23:20:59 +00:00
|
|
|
else
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_MSG_RESULT(no)
|
2010-03-25 23:20:59 +00:00
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(WITH_HOTPLUG, test -n "${hotplugdir}")
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(whether to install udev rules)
|
|
|
|
AC_ARG_WITH(udev-dir,
|
2011-01-26 09:35:08 +00:00
|
|
|
AS_HELP_STRING([--with-udev-dir=PATH], [where to install udev rules (/lib/udev or /etc/udev)]),
|
|
|
|
[
|
|
|
|
case "${withval}" in
|
|
|
|
yes)
|
|
|
|
if test -z "${udevdir}"; then
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
AC_MSG_ERROR(["udev directory requested but not found"])
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
auto)
|
|
|
|
;;
|
|
|
|
no)
|
|
|
|
udevdir=""
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
udevdir="${withval}"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
], [])
|
2010-03-25 23:20:59 +00:00
|
|
|
if test -n "${udevdir}"; then
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_MSG_RESULT(using ${udevdir})
|
2010-03-25 23:20:59 +00:00
|
|
|
else
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_MSG_RESULT(no)
|
2010-03-25 23:20:59 +00:00
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(WITH_UDEV, test -n "${udevdir}")
|
|
|
|
|
2014-04-22 18:39:47 +00:00
|
|
|
dnl FreeBSD devd support:
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(whether to install FreeBSD devd.conf file)
|
|
|
|
AC_ARG_WITH(devd-dir,
|
|
|
|
AS_HELP_STRING([--with-devd-dir=PATH], [where to install devd.conf file (/usr/local/etc/devd or /etc/devd)]),
|
|
|
|
[
|
|
|
|
case "${withval}" in
|
|
|
|
yes)
|
|
|
|
if test -z "${devddir}"; then
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
AC_MSG_ERROR(["devd directory requested but not found"])
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
auto)
|
|
|
|
;;
|
|
|
|
no)
|
|
|
|
devddir=""
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
devddir="${withval}"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
], [])
|
|
|
|
if test -n "${devddir}"; then
|
|
|
|
AC_MSG_RESULT(using ${devddir})
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(WITH_DEVD, test -n "${devddir}")
|
|
|
|
|
|
|
|
dnl
|
|
|
|
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_PATH_PROGS([ASCIIDOC], [asciidoc], [none])
|
|
|
|
AM_CONDITIONAL([MANUALUPDATE], [test "x$ASCIIDOC" != "xnone"])
|
|
|
|
AC_PATH_PROGS([A2X], [a2x], [none])
|
|
|
|
|
2013-11-24 15:00:12 +00:00
|
|
|
dnl check for spell checking deps
|
|
|
|
AC_PATH_PROGS([ASPELL], [aspell], [none])
|
|
|
|
AM_CONDITIONAL([HAVE_ASPELL], [test "x$ASPELL" != "xnone"])
|
|
|
|
|
2010-03-25 23:20:59 +00:00
|
|
|
dnl expand ${sysconfdir} and write it out
|
|
|
|
conftemp="${sysconfdir}"
|
|
|
|
eval conftemp=\"${conftemp}\"
|
|
|
|
eval conftemp=\"${conftemp}\"
|
|
|
|
CONFPATH=${conftemp}
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_DEFINE_UNQUOTED(CONFPATH, "${conftemp}", [Default path for configuration files])
|
2010-03-25 23:20:59 +00:00
|
|
|
|
|
|
|
dnl same for datadir
|
|
|
|
conftemp="${datadir}"
|
|
|
|
eval conftemp=\"${conftemp}\"
|
|
|
|
eval conftemp=\"${conftemp}\"
|
2011-06-01 20:31:49 +00:00
|
|
|
DATADIR=${conftemp}
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_DEFINE_UNQUOTED(DATADIR, "${conftemp}", [Default path for data files])
|
2010-03-25 23:20:59 +00:00
|
|
|
|
|
|
|
dnl same for bindir
|
|
|
|
conftemp="${bindir}"
|
|
|
|
eval conftemp=\"${conftemp}\"
|
|
|
|
eval conftemp=\"${conftemp}\"
|
2011-06-01 20:31:49 +00:00
|
|
|
BINDIR=${conftemp}
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_DEFINE_UNQUOTED(BINDIR, "${conftemp}", [Default path for user executables])
|
2010-03-25 23:20:59 +00:00
|
|
|
|
2012-06-01 13:55:19 +00:00
|
|
|
dnl same for sbindir
|
|
|
|
conftemp="${sbindir}"
|
|
|
|
eval conftemp=\"${conftemp}\"
|
|
|
|
eval conftemp=\"${conftemp}\"
|
|
|
|
SBINDIR=${conftemp}
|
|
|
|
AC_DEFINE_UNQUOTED(SBINDIR, "${conftemp}", [Default path for system executables])
|
|
|
|
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_SUBST(OS_NAME)
|
2012-01-24 10:22:33 +00:00
|
|
|
AC_SUBST(TREE_VERSION)
|
2012-06-01 13:55:19 +00:00
|
|
|
AC_SUBST(NUT_NETVERSION)
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_SUBST(LIBSSL_CFLAGS)
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_SUBST(LIBSSL_LIBS)
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_SUBST(LIBGD_CFLAGS)
|
|
|
|
AC_SUBST(LIBGD_LDFLAGS)
|
|
|
|
AC_SUBST(LIBNETSNMP_CFLAGS)
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_SUBST(LIBNETSNMP_LIBS)
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_SUBST(LIBUSB_CFLAGS)
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_SUBST(LIBUSB_LIBS)
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_SUBST(LIBNEON_CFLAGS)
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_SUBST(LIBNEON_LIBS)
|
2011-09-29 18:14:46 +00:00
|
|
|
AC_SUBST(LIBAVAHI_CFLAGS)
|
|
|
|
AC_SUBST(LIBAVAHI_LIBS)
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_SUBST(LIBPOWERMAN_CFLAGS)
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_SUBST(LIBPOWERMAN_LIBS)
|
2011-09-29 18:14:46 +00:00
|
|
|
AC_SUBST(LIBIPMI_CFLAGS)
|
|
|
|
AC_SUBST(LIBIPMI_LIBS)
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_SUBST(DOC_BUILD_LIST)
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_SUBST(LIBWRAP_CFLAGS)
|
2011-01-26 09:35:08 +00:00
|
|
|
AC_SUBST(LIBWRAP_LIBS)
|
2012-01-24 10:22:33 +00:00
|
|
|
AC_SUBST(LIBLTDL_CFLAGS)
|
|
|
|
AC_SUBST(LIBLTDL_LIBS)
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_SUBST(DRIVER_BUILD_LIST)
|
|
|
|
AC_SUBST(DRIVER_MAN_LIST)
|
|
|
|
AC_SUBST(DRIVER_INSTALL_TARGET)
|
|
|
|
AC_SUBST(NETLIBS)
|
|
|
|
AC_SUBST(SERLIBS)
|
2012-06-01 13:55:19 +00:00
|
|
|
AC_SUBST(PIDPATH)
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_SUBST(STATEPATH)
|
|
|
|
AC_SUBST(CONFPATH)
|
|
|
|
AC_SUBST(BINDIR)
|
2013-11-24 15:00:12 +00:00
|
|
|
AC_SUBST(DRVPATH)
|
2012-06-01 13:55:19 +00:00
|
|
|
AC_SUBST(SBINDIR)
|
2011-09-29 18:14:46 +00:00
|
|
|
AC_SUBST(PORT)
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_SUBST(RUN_AS_USER)
|
|
|
|
AC_SUBST(RUN_AS_GROUP)
|
|
|
|
AC_SUBST(SUN_LIBUSB)
|
|
|
|
AC_SUBST(WORDS_BIGENDIAN)
|
|
|
|
AC_SUBST(cgiexecdir)
|
2014-04-22 18:39:47 +00:00
|
|
|
AC_SUBST(devddir)
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_SUBST(driverexecdir)
|
|
|
|
AC_SUBST(htmldir)
|
|
|
|
AC_SUBST(pkgconfigdir)
|
2011-09-29 18:14:46 +00:00
|
|
|
AC_SUBST(systemdsystemunitdir)
|
|
|
|
AC_SUBST(systemdsystemshutdowndir)
|
2010-03-25 23:20:59 +00:00
|
|
|
AC_SUBST(hotplugdir)
|
|
|
|
AC_SUBST(udevdir)
|
|
|
|
|
|
|
|
AC_OUTPUT([
|
|
|
|
clients/Makefile
|
|
|
|
common/Makefile
|
|
|
|
conf/Makefile
|
2013-11-24 15:00:12 +00:00
|
|
|
conf/upsmon.conf.sample
|
2010-03-25 23:20:59 +00:00
|
|
|
conf/upssched.conf.sample
|
|
|
|
data/html/header.html
|
|
|
|
data/html/Makefile
|
|
|
|
data/Makefile
|
2011-01-26 09:35:08 +00:00
|
|
|
data/driver.list
|
2010-03-25 23:20:59 +00:00
|
|
|
docs/Makefile
|
2011-01-26 09:35:08 +00:00
|
|
|
docs/man/Makefile
|
2010-03-25 23:20:59 +00:00
|
|
|
drivers/Makefile
|
|
|
|
include/Makefile
|
|
|
|
lib/libupsclient-config
|
|
|
|
lib/libupsclient.pc
|
2013-11-24 15:00:12 +00:00
|
|
|
lib/libnutclient.pc
|
2012-01-24 10:22:33 +00:00
|
|
|
lib/libnutscan.pc
|
2010-03-25 23:20:59 +00:00
|
|
|
lib/Makefile
|
2011-01-26 09:35:08 +00:00
|
|
|
scripts/augeas/Makefile
|
|
|
|
scripts/augeas/nutnutconf.aug
|
|
|
|
scripts/augeas/nutupsconf.aug
|
|
|
|
scripts/augeas/nutupsdconf.aug
|
|
|
|
scripts/augeas/nutupsdusers.aug
|
|
|
|
scripts/augeas/nutupsmonconf.aug
|
|
|
|
scripts/augeas/nutupsschedconf.aug
|
|
|
|
scripts/augeas/nuthostsconf.aug
|
|
|
|
scripts/augeas/nutupssetconf.aug
|
2011-09-29 18:14:46 +00:00
|
|
|
scripts/avahi/nut.service
|
2014-04-22 18:39:47 +00:00
|
|
|
scripts/devd/Makefile
|
|
|
|
scripts/devd/nut-usb.conf
|
2010-03-25 23:20:59 +00:00
|
|
|
scripts/hotplug/Makefile
|
|
|
|
scripts/hotplug/libhidups
|
2012-01-24 10:22:33 +00:00
|
|
|
scripts/HP-UX/nut.psf
|
2013-11-24 15:00:12 +00:00
|
|
|
scripts/HP-UX/postinstall
|
2010-03-25 23:20:59 +00:00
|
|
|
scripts/python/Makefile
|
2011-09-29 18:14:46 +00:00
|
|
|
scripts/systemd/Makefile
|
2012-06-01 13:55:19 +00:00
|
|
|
scripts/systemd/nut-driver.service
|
|
|
|
scripts/systemd/nut-monitor.service
|
|
|
|
scripts/systemd/nut-server.service
|
|
|
|
scripts/systemd/nutshutdown
|
2013-11-24 15:00:12 +00:00
|
|
|
scripts/Solaris/Makefile
|
|
|
|
scripts/Solaris/pkginfo
|
|
|
|
scripts/Solaris/postinstall
|
|
|
|
scripts/Solaris/preremove
|
|
|
|
scripts/Solaris/nut
|
2010-03-25 23:20:59 +00:00
|
|
|
scripts/udev/Makefile
|
2011-09-29 18:14:46 +00:00
|
|
|
scripts/udev/nut-ipmipsu.rules
|
2010-03-25 23:20:59 +00:00
|
|
|
scripts/udev/nut-usbups.rules
|
2012-06-01 13:55:19 +00:00
|
|
|
scripts/ufw/nut.ufw.profile
|
2010-03-25 23:20:59 +00:00
|
|
|
scripts/Makefile
|
|
|
|
server/Makefile
|
|
|
|
tools/Makefile
|
2011-09-29 18:14:46 +00:00
|
|
|
tools/nut-scanner/Makefile
|
2012-08-12 21:39:31 +00:00
|
|
|
tests/Makefile
|
2010-03-25 23:20:59 +00:00
|
|
|
Makefile
|
|
|
|
])
|
|
|
|
|
|
|
|
NUT_PRINT_FEATURE_REPORT
|