apcupsd-ups: fix cut-n-paste error
[networkupstools/kirr.git] / configure.in
blob5beac572ad30cfa51057c6d6a95c963ddbba02f9
1 dnl +------------------------------------------------------------------+
2 dnl | Network UPS Tools: configure.in                                  |
3 dnl +------------------------------------------------------------------+
5 dnl NUT version number is defined here, with a Git suffix in include/nut_version.h
6 AC_INIT(nut, 2.7.1-pre2)
7 AC_CONFIG_SRCDIR(server/upsd.c)
8 AC_CONFIG_MACRO_DIR([m4])
9 echo "Network UPS Tools version ${PACKAGE_VERSION}"
10 AC_CANONICAL_SYSTEM
11 NUT_CHECK_OS
12 AC_CONFIG_HEADER(include/config.h)
13 AC_PREFIX_DEFAULT(/usr/local/ups)
14 AM_INIT_AUTOMAKE
16 dnl we need Autoconf 2.60 or better to enable features of Posix that are extensions to C
17 AC_MSG_CHECKING(for autoconf macro to enable system extensions)
18 m4_version_prereq(2.60, [
19         AC_MSG_RESULT(yes)
20         AC_USE_SYSTEM_EXTENSIONS
21 ], [
22         AC_MSG_RESULT(no)
25 dnl Use "./configure --enable-maintainer-mode" to keep Makefile.in and Makefile
26 dnl in sync after SVN updates.
27 AM_MAINTAINER_MODE
29 dnl PKG_PROG_PKG_CONFIG
31 dnl Various version related processing
32 dnl ----------------------------------
34 dnl # the following is commented out, because the UPS_VERSION macro now
35 dnl # resides in include/nut_version.h, which is generated by Makefile.am,
36 dnl # rather than in include/config.h, which is generated by configure.  The
37 dnl # reason is that the SVN revision should be computed at compile time,
38 dnl # not configure time.
39 dnl AC_DEFINE_UNQUOTED(UPS_VERSION, "${PACKAGE_VERSION}", [NUT version])
41 dnl However, automatically define the tree version (mostly for AC_SUBST)
42 TREE_VERSION="`echo ${PACKAGE_VERSION} | awk '{ print substr($0,1,3) }'`"
43 AC_DEFINE_UNQUOTED(TREE_VERSION, "${TREE_VERSION}", [NUT tree version])
45 NUT_NETVERSION="1.2"
46 AC_DEFINE_UNQUOTED(NUT_NETVERSION, "${NUT_NETVERSION}", [NUT network protocol version])
49 dnl Fix this early so we can expand with eval later
50 test "${prefix}" = "NONE" && prefix="${ac_default_prefix}"
51 test "${exec_prefix}" = "NONE" && exec_prefix='${prefix}'
53 CFLAGS=${CFLAGS-"-O"}
55 dnl NOTE: for definition of NUT_* autoconf macros, see m4/ directory
56 dnl and docs/macros.txt
58 dnl +------------------------------------------------------------------+
59 dnl | default values for things later on (can be overridden)           |
61 STATEPATH="/var/state/ups"
63 cgiexecdir='${exec_prefix}/cgi-bin'
64 driverexecdir='${exec_prefix}/bin'
65 htmldir='${prefix}/html'
66 pkgconfigdir='${libdir}/pkgconfig'
67 hotplugdir='/etc/hotplug'
68 if test ! -d "${hotplugdir}"; then
69    hotplugdir=''
71 udevdir='/lib/udev'
72 if test ! -d "${udevdir}"; then
73    udevdir='/etc/udev'
74    if test ! -d "${udevdir}"; then
75       udevdir=''
76    fi
79 RUN_AS_USER="nobody"
80 RUN_AS_GROUP="nobody"
81 PIDPATH="/var/run"
83 dnl Define directory where LIBOBJS replacement functions are
84 AC_CONFIG_LIBOBJ_DIR([common])
86 dnl +-------------------------------------------------------------------
88 AC_PROG_CC
89 dnl Needed for per-target flags
90 AM_PROG_CC_C_O
91 AC_PROG_CPP
92 AC_PROG_CXX
93 AC_PROG_INSTALL
94 AC_PROG_EGREP
95 AC_PATH_PROG(AR, ar)
96 AC_CHECK_TOOL(RANLIB, ranlib, :)
97 dnl Postpone call to AC_PROG_LIBTOOL to allow disabling static lib
98 AC_C_BIGENDIAN
99 AC_C_INLINE
100 AC_C_FLEXIBLE_ARRAY_MEMBER
101 AC_C_VARARRAYS
102 AC_CHECK_FUNCS(flock lockf fcvt fcvtl)
103 AC_CHECK_FUNCS(cfsetispeed tcsendbreak)
104 AC_CHECK_FUNCS(seteuid setsid getpassphrase)
105 AC_CHECK_FUNCS(on_exit strptime setlogmask)
106 AC_CHECK_DECLS(LOG_UPTO, [], [], [#include <syslog.h>])
108 dnl the following may add stuff to LIBOBJS (is this still needed?)
109 AC_CHECK_FUNCS(vsnprintf snprintf, [], [
110         AC_LIBOBJ(snprintf)
111         AC_TYPE_LONG_DOUBLE
112         AC_TYPE_LONG_LONG_INT
115 AC_REPLACE_FUNCS(setenv strerror atexit)
119 dnl Tests for CppUnit availability and usability
120 dnl Using CppUnit implies C++ support!
121 dnl Theoretically, libcppunit-dev will pull up to g++, through libstdc++...
122 dnl AM_PATH_CPPUNIT(1.9.6)
124 PKG_CHECK_MODULES(CPPUNIT, cppunit, have_cppunit=yes, have_cppunit=no)
125 if test "${have_cppunit}" != "yes" ; then
126         AC_MSG_WARN([libcppunit not found.])
128 AM_CONDITIONAL(HAVE_CPPUNIT, test "${have_cppunit}" = "yes")
131 dnl Only use these when compiling with gcc
133 if ( test "${GCC}" = "yes" )
134 then
135   CFLAGS="${CFLAGS} -Wall -Wsign-compare"
138 case ${target_os} in
139    solaris2* )
140       dnl On Solaris, this allows errno to use thread local storage
141       CFLAGS="${CFLAGS} -D_REENTRANT"
142       ;;
143    aix* )
144       dnl On AIX, this allows errno to use thread local storage
145       CFLAGS="${CFLAGS} -D_REENTRANT"
146       ;;
147    hpux11* )
148       dnl It seems like the thread safe string functions will not be included
149       dnl on 64 bit HP-UX unless we define _REENTRANT
150       CFLAGS="${CFLAGS} -D_REENTRANT"
151       ;;
152 esac
154 dnl optind handling:
155 dnl need to check if unistd.h is enough, else try getopt.h, else need decls
156 AC_CHECK_DECLS(optind, [], [
157         AC_CHECK_HEADERS(getopt.h, [
158                 AC_DEFINE(NEED_GETOPT_H, 1, [Define if getopt.h is needed])
159         ], [
160                 AC_DEFINE(NEED_GETOPT_DECLS, 1, [Define to use explicit getopt declarations])
161         ], [AC_INCLUDES_DEFAULT])
162 ], [AC_INCLUDES_DEFAULT])
164 dnl do a 2nd check to ensure inclusion of getopt.h, in case optind is known
165 AC_CHECK_HEADERS(getopt.h, [
166         AC_DEFINE(NEED_GETOPT_H, 1, [Define if getopt.h is needed])
167 ], [
168         AC_DEFINE(NEED_GETOPT_DECLS, 1, [Define to use explicit getopt declarations])
169 ], [AC_INCLUDES_DEFAULT])
171 dnl also check for getopt_long
172 AC_CHECK_FUNCS(getopt_long)
174 dnl FreeBSD serial locking compatibility - look for uu_lock in libutil.h
175 AC_CHECK_DECLS(uu_lock, [
176         AC_DEFINE(HAVE_UU_LOCK, 1, [Use uu_lock for locking (FreeBSD)])
177         SERLIBS="-lutil"
178         dnl put in some better defaults for FreeBSD
179         RUN_AS_USER="uucp"
180 ], [
181         SERLIBS=""
182 ], [
183 #include <sys/types.h>
184 #include <libutil.h>
187 AC_CHECK_DECLS(__func__, [], [
188         AC_CHECK_DECLS(__FUNCTION__, [
189                 AC_DEFINE(__func__, __FUNCTION__, [Replace missing __func__ declaration])
190         ], [
191                 AC_DEFINE(__func__, __LINE__, [Replace missing  __func__ declaration])
192         ], [AC_INCLUDES_DEFAULT])
193 ], [AC_INCLUDES_DEFAULT])
194               
195 dnl Solaris compatibility - check for -lnsl and -lsocket
196 AC_SEARCH_LIBS(gethostbyname, nsl)
197 AC_SEARCH_LIBS(connect, socket)
199 AC_HEADER_TIME
200 AC_CHECK_HEADERS(sys/modem.h stdarg.h varargs.h sys/termios.h sys/time.h, [], [], [AC_INCLUDES_DEFAULT])
202 # pthread related checks
203 AC_SEARCH_LIBS([pthread_create], [pthread],
204        [AC_DEFINE(HAVE_PTHREAD, 1, [Define to enable pthread support code])],
205        [])
207 dnl ----------------------------------------------------------------------
208 dnl Check for types and define possible replacements
209 NUT_TYPE_SOCKLEN_T
211 dnl ----------------------------------------------------------------------
212 dnl check for --with-all (or --without-all, or --with-all=auto) flag
214 AC_MSG_CHECKING(for --with-all)
215 AC_ARG_WITH(all,
216         AS_HELP_STRING([--with-all], [enable serial, usb, snmp, neon, ipmi, powerman, cgi, dev, avahi]),
218         if test -n "${withval}"; then
219                 dnl Note: we allow "no" as a positive value, because
220                 dnl this is what the user expects from --without-all
221                 if test -z "${with_serial}"; then with_serial="${withval}"; fi
222                 if test -z "${with_usb}"; then with_usb="${withval}"; fi
223                 if test -z "${with_snmp}"; then with_snmp="${withval}"; fi
224                 if test -z "${with_neon}"; then with_neon="${withval}"; fi
225                 if test -z "${with_powerman}"; then with_powerman="${withval}"; fi
226                 if test -z "${with_cgi}"; then with_cgi="${withval}"; fi
227                 if test -z "${with_dev}"; then with_dev="${withval}"; fi
228                 if test -z "${with_avahi}"; then with_avahi="${withval}"; fi
229                 if test -z "${with_ipmi}"; then with_ipmi="${withval}"; fi
230                 AC_MSG_RESULT("${withval}")
231         else
232                 AC_MSG_RESULT(not given)
233         fi
234 ], [
235         AC_MSG_RESULT(not given)
238 dnl ----------------------------------------------------------------------
239 dnl declare a number of --with-FEATURE options. Do this early, so that
240 dnl they are listed near the top by "./configure --help"
242 NUT_ARG_WITH([dev], [build and install the development files], [no])
243 NUT_ARG_WITH([serial], [build and install serial drivers], [yes])
244 NUT_ARG_WITH([usb], [build and install USB drivers], [auto])
245 NUT_ARG_WITH([doc], [build and install documentation], [no])
246 NUT_ARG_WITH([avahi], [build and install Avahi support], [auto])
248 dnl ----------------------------------------------------------------------
249 dnl Check for presence and compiler flags of various libraries
251 dnl These checks are performed unconditionally, even if the corresponding
252 dnl --with-* options are not given. This is because we cannot predict
253 dnl what will be in the --with-drivers argument.
255 NUT_CHECK_LIBNETSNMP
256 NUT_CHECK_LIBUSB
257 NUT_ARG_WITH([hal], [build and install HAL support], [no])
258 NUT_CHECK_LIBHAL
259 NUT_CONFIG_LIBHAL
260 NUT_ARG_WITH([snmp], [build and install SNMP drivers], [auto])
261 NUT_CHECK_LIBNETSNMP
262 NUT_ARG_WITH([neon], [build and install neon based XML/HTTP driver], [auto])
263 NUT_CHECK_LIBNEON
264 NUT_ARG_WITH([powerman], [build and install Powerman PDU client driver], [auto])
265 NUT_CHECK_LIBPOWERMAN
266 NUT_CHECK_LIBAVAHI
268 dnl ----------------------------------------------------------------------
269 dnl additional USB-related checks
271 dnl Solaris 10/11 USB handling (need librt and libusb runtime path)
272 dnl HPUX, since v11, needs an explicit activation of pthreads
273 case ${target_os} in
274    solaris2.1* )
275       echo Checking for Solaris 10 / 11 specific configuration for usb drivers
276       AC_SEARCH_LIBS(nanosleep, rt)
277       LIBUSB_LIBS="-R/usr/sfw/lib ${LIBUSB_LIBS}"
278       dnl FIXME: Sun's libusb doesn't support timeout (so blocks notification)
279       dnl and need to call libusb close upon reconnection
280       AC_DEFINE(SUN_LIBUSB, 1, [Define to 1 for Sun version of the libusb.])
281       SUN_LIBUSB=1
282       ;;
283     hpux11*)
284       CFLAGS="${CFLAGS} -lpthread"
285 esac
288 dnl ----------------------------------------------------------------------
289 dnl checks related to --with-serial
291 dnl ${nut_with_serial}: any value except "yes" or "no" is treated as "auto".
292 if test "${nut_with_serial}" != "no"; then
293   nut_with_serial="yes"
296 NUT_REPORT_FEATURE([build serial drivers], [${nut_with_serial}], [],
297                                         [WITH_SERIAL], [Define to enable serial support])
299 dnl ----------------------------------------------------------------------
300 dnl checks related to --with-usb
302 dnl ${nut_with_usb}: any value except "yes" or "no" is treated as "auto".
303 if test "${nut_with_usb}" = "yes" -a "${nut_have_libusb}" != "yes"; then
304    AC_MSG_ERROR(["USB drivers requested, but libusb not found."])
307 if test "${nut_with_usb}" != "no"; then
308    nut_with_usb="${nut_have_libusb}"
311 NUT_REPORT_FEATURE([build USB drivers], [${nut_with_usb}], [],
312                                         [WITH_USB], [Define to enable USB support])
314 dnl ----------------------------------------------------------------------
315 dnl checks related to --with-snmp
317 dnl ${nut_with_snmp}: any value except "yes" or "no" is treated as "auto".
318 if test "${nut_with_snmp}" = "yes" -a "${nut_have_libnetsnmp}" != "yes"; then
319    AC_MSG_ERROR(["Net-SNMP libraries not found, required for SNMP drivers"])
322 if test "${nut_with_snmp}" != "no"; then
323    nut_with_snmp="${nut_have_libnetsnmp}"
326 NUT_REPORT_FEATURE([build SNMP drivers], [${nut_with_snmp}], [],
327                                         [WITH_SNMP], [Define to enable SNMP support])
329 dnl ----------------------------------------------------------------------
330 dnl checks related to --with-neon
332 dnl ${nut_with_neon}: any value except "yes" or "no" is treated as "auto".
333 if test "${nut_with_neon}" = "yes" -a "${nut_have_neon}" != "yes"; then
334    AC_MSG_ERROR(["neon libraries not found, required for neon based XML/HTTP driver"])
337 if test "${nut_with_neon}" != "no"; then
338    nut_with_neon="${nut_have_neon}"
341 NUT_REPORT_FEATURE([build neon based XML driver], [${nut_with_neon}], [],
342                                         [WITH_NEON], [Define to enable Neon HTTP support])
344 dnl ----------------------------------------------------------------------
345 dnl checks related to --with-avahi
347 dnl ${nut_with_avahi}: any value except "yes" or "no" is treated as "auto".
348 if test "${nut_with_avahi}" = "yes" -a "${nut_have_avahi}" != "yes"; then
349    AC_MSG_ERROR(["avahi libraries not found"])
352 if test "${nut_with_avahi}" != "no"; then
353    nut_with_avahi="${nut_have_avahi}"
356 NUT_REPORT_FEATURE([enable Avahi support], [${nut_with_avahi}], [],
357                                         [WITH_AVAHI], [Define to enable Avahi support])
359 dnl ----------------------------------------------------------------------
361 dnl checks related to --with-powerman
363 dnl ${nut_with_powerman}: any value except "yes" or "no" is treated as "auto".
364 if test "${nut_with_powerman}" = "yes" -a "${nut_have_libpowerman}" != "yes"; then
365    AC_MSG_ERROR(["Powerman client libraries not found, required for Powerman PDU client driver"])
368 if test "${nut_with_powerman}" != "no"; then
369    nut_with_powerman="${nut_have_libpowerman}"
372 NUT_REPORT_FEATURE([build Powerman PDU client driver], [${nut_with_powerman}], [],
373                                         [WITH_LIBPOWERMAN], [Define to enable Powerman PDU support])
375 dnl ----------------------------------------------------------------------
376 dnl Check for with-ipmi, and --with-freeipmi (or --with-openipmi)
377 dnl Only one can be enabled at a time, with a preference for FreeIPMI
378 dnl if both are available (since it is the only one supported ATM!!)
380 nut_ipmi_lib=""
382 NUT_ARG_WITH([ipmi], [build and install IPMI PSU driver], [auto])
383 NUT_ARG_WITH([freeipmi], [enable IPMI support using FreeIPMI], [auto])
384 dnl NUT_ARG_WITH([openipmi], [enable IPMI support using OpenIPMI], [auto])
386 dnl ${nut_with_ipmi}: any value except "yes" or "no" is treated as "auto". 
387 if test "${nut_with_ipmi}" != "no"; then
388    dnl check if FreeIPMI (and maybe later OpenIPMI) was explicitly requested
389    if test "${nut_with_freeipmi}" = "yes"; then
390       NUT_CHECK_LIBFREEIPMI
391       if test "${nut_have_freeipmi}" != "yes"; then
392          AC_MSG_ERROR(["GNU FreeIPMI not found, required for IPMI support"])
393       fi
394       dnl Implies --with-ipmi
395       nut_with_ipmi="yes"
396    dnl elif test "${nut_with_openipmi}" = "yes"; then
397       dnl AC_MSG_ERROR(["OpenIPMI is not yet supported"])
398       dnl NUT_CHECK_LIBOPENIPMI
399       dnl if test "${nut_have_openipmi}" != "yes"; then
400       dnl    AC_MSG_ERROR(["OpenIPMI not found, required for IPMI support"])
401       dnl fi
402       dnl    Implies --with-ipmi
403       dnl    nut_with_ipmi="yes"
404       dnl    AC_DEFINE(WITH_OPENIPMI, 1, [Define to enable IPMI support using OpenIPMI])
405    else
406       dnl Prefer FreeIPMI over OpenIPMI otherwise
407       NUT_CHECK_LIBFREEIPMI
408       if test "${nut_have_freeipmi}" != "yes"; then
409          if test "${nut_with_ipmi}" = "yes"; then
410             AC_MSG_ERROR(["FreeIPMI not found, required for IPMI support"])
411          fi
412          nut_with_ipmi="no"
413          dnl NUT_CHECK_OPENIPMI
414          dnl if test "${nut_have_openipmi}" != "yes"; then
415          dnl    if test "${nut_with_ipmi}" = "yes"; then
416          dnl       AC_MSG_ERROR(["GNU FreeIPMI and OpenIPMI neither found, required for IPMI support"])
417          dnl    fi
418          dnl    nut_with_ipmi="no"
419          dnl else
420          dnl    Implies --with-ipmi
421          dnl    nut_with_ipmi="yes"
422          dnl    nut_with_openipmi="yes"
423          dnl fi
424       else
425          dnl Implies --with-ipmi
426          nut_with_ipmi="yes"
427          nut_with_freeipmi="yes"
428          AC_DEFINE(WITH_FREEIPMI, 1, [Define to enable IPMI support using FreeIPMI])
429       fi
430    fi
434 NUT_REPORT_FEATURE([build IPMI driver], [${nut_with_ipmi}], [${nut_ipmi_lib}],
435                                         [WITH_IPMI], [Define to enable IPMI support])
437 dnl Note: we still have to manually enable complementary AC_DEFINEs (see above)
438 dnl and AM_CONDITIONALs (see below)...
439 AM_CONDITIONAL(WITH_FREEIPMI, test "${nut_with_freeipmi}" = "yes")
440 dnl AM_CONDITIONAL(WITH_OPENIPMI, test "${nut_with_openipmi}" = "yes")
443 dnl ----------------------------------------------------------------------
444 dnl The Mac OS X meta-driver looks at IOKit Power Sources keys managed by
445 dnl the internal USB UPS driver.
447 dnl FIXME: be slightly more clever here:
449 NUT_ARG_WITH([macosx_ups], [build and install Mac OS X Power Sources meta-driver], [auto])
450 if test "${nut_with_macosx_ups}" != no; then
451    if test -d /System/Library/Frameworks/IOKit.framework/ ; then
452       nut_with_macosx_ups="yes"
453    else
454       nut_with_macosx_ups="no"
455    fi
458 NUT_REPORT_FEATURE([build Mac OS X meta-driver],
459                         [${nut_with_macosx_ups}], [${nut_macosx_ups_lib}],
460                         [WITH_MACOSX], [Define to enable Mac OS X meta-driver])
462 dnl ----------------------------------------------------------------------
463 dnl Check for with-ssl, and --with-nss or --with-openssl
464 dnl Only one can be enabled at a time, with a preference for OpenSSL
465 dnl if both are available
467 nut_ssl_lib=""
469 NUT_ARG_WITH([ssl], [enable SSL support (either NSS or OpenSSL)], [auto])
470 NUT_ARG_WITH([nss], [enable SSL support using Mozilla NSS], [auto])
471 NUT_ARG_WITH([openssl], [enable SSL support using OpenSSL], [auto])
473 dnl ${nut_with_ssl}: any value except "yes" or "no" is treated as "auto". 
474 if test "${nut_with_ssl}" != "no"; then
475    dnl check if either NSS or OpenSSL was explicitly requested
476    if test "${nut_with_nss}" = "yes"; then
477       NUT_CHECK_LIBNSS
478       if test "${nut_have_libnss}" != "yes"; then
479          AC_MSG_ERROR(["Mozilla NSS not found, required for SSL support"])
480       fi
481    elif test "${nut_with_openssl}" = "yes"; then
482       NUT_CHECK_LIBOPENSSL
483       if test "${nut_have_openssl}" != "yes"; then
484          AC_MSG_ERROR(["OpenSSL not found, required for SSL support"])
485       fi
486    else
487       dnl Prefer OpenSSL over NSS otherwise
488       NUT_CHECK_LIBOPENSSL
489       if test "${nut_have_openssl}" != "yes"; then
490          NUT_CHECK_LIBNSS
491          if test "${nut_have_libnss}" != "yes"; then
492             dnl Only abort if SSL has been explicitly requested by the user
493             if test "${nut_with_ssl}" = "yes"; then
494                AC_MSG_ERROR(["Mozilla NSS and OpenSSL neither found, but are needed for the requested SSL support"])
495             else
496                AC_MSG_WARN(["Mozilla NSS and OpenSSL neither found, required for SSL support"])
497             fi
498             nut_with_ssl="no"
499          else
500             nut_with_nss="${nut_have_libnss}"
501          fi
502       else
503          nut_with_openssl="${nut_have_openssl}"
504       fi
505    fi
508 AM_CONDITIONAL(WITH_NSS, test "${nut_with_nss}" = "yes")
509 AM_CONDITIONAL(WITH_OPENSSL, test "${nut_with_openssl}" = "yes")
511 NUT_REPORT_FEATURE([enable SSL support], [${nut_with_ssl}], [${nut_ssl_lib}],
512                                         [WITH_SSL], [Define to enable SSL])
514 dnl ----------------------------------------------------------------------
515 dnl Check for --with-wrap
517 NUT_ARG_WITH([wrap], [enable libwrap (tcp-wrappers) support], [auto])
519 dnl ${nut_with_wrap}: any value except "yes" or "no" is treated as "auto".
520 if test "${nut_with_wrap}" != "no"; then
521    dnl check for libwrap compiler flags
522    NUT_CHECK_LIBWRAP
525 if test "${nut_with_wrap}" = "yes" -a "${nut_have_libwrap}" != "yes"; then
526    AC_MSG_ERROR(["libwrap not found"])
529 if test "${nut_with_wrap}" != "no"; then
530    nut_with_wrap="${nut_have_libwrap}"
533 NUT_REPORT_FEATURE([enable libwrap (tcp-wrappers) support], [${nut_with_wrap}], [],
534                                         [WITH_WRAP], [Define to enable libwrap (tcp-wrappers) support])
537 dnl ----------------------------------------------------------------------
538 dnl Check for --with-libltdl
540 NUT_ARG_WITH([libltdl], [enable libltdl (Libtool dlopen abstraction) support], [auto])
542 dnl ${nut_with_libltdl}: any value except "yes" or "no" is treated as "auto".
543 if test "${nut_with_libltdl}" != "no"; then
544    dnl check for libltdl compiler flags
545    NUT_CHECK_LIBLTDL
548 if test "${nut_with_libltdl}" = "yes" -a "${nut_have_libltdl}" != "yes"; then
549    AC_MSG_ERROR(["libltdl not found"])
552 if test "${nut_with_libltdl}" != "no"; then
553    nut_with_libltdl="${nut_have_libltdl}"
556 NUT_REPORT_FEATURE([enable libltdl (Libtool dlopen abstraction) support], [${nut_with_libltdl}], [],
557                                         [WITH_LIBLTDL], [Define to enable libltdl (Libtool dlopen abstraction) support])
559 dnl Explicitely report if we are building nut-scanner or not
560 dnl since it requires libltdl
561 NUT_REPORT([build nut-scanner], [${nut_with_libltdl}])
563 dnl ----------------------------------------------------------------------
564 dnl checks related to --with-cgi
566 NUT_ARG_WITH([cgi], [build and install the CGI programs], [no])
568 dnl ${nut_with_cgi}: any value except "yes" or "no" is treated as "auto".
569 if test "${nut_with_cgi}" != "no"; then
570    dnl check for libgd compiler flags
571    NUT_CHECK_LIBGD
574 if test "${nut_with_cgi}" = "yes" -a "${nut_have_libgd}" != "yes"; then
575    AC_MSG_ERROR([libgd not found, required for CGI build])
578 if test "${nut_with_cgi}" != "no"; then
579    nut_with_cgi="${nut_have_libgd}"
582 NUT_REPORT_FEATURE([build CGI programs], [${nut_with_cgi}], [],
583                                         [WITH_CGI], [Define to enable CGI (HTTP) support])
585 dnl ----------------------------------------------------------------------
586 dnl checks related to --with-hal
588 dnl ${nut_with_hal}: any value except "yes" or "no" is treated as "auto".
589 if test "${nut_with_hal}" = "yes" -a "${nut_have_libhal}" != "yes"; then
590    AC_MSG_ERROR(["libhal not found, required for HAL support"])
593 if test "${nut_with_hal}" = "yes" -a "${nut_have_libusb}" != "yes"; then
594    AC_MSG_ERROR(["libusb not found, required for HAL support"])
597 if test "${nut_with_hal}" != "no"; then
598    if test "${nut_have_libhal}" = "yes" -a "${nut_have_libusb}" = "yes"; then
599       nut_with_hal="yes"
600    else
601       nut_with_hal="no"
602    fi
605 AM_CONDITIONAL(WITH_HAL, test "${nut_with_hal}" = "yes")
606 NUT_REPORT_FEATURE([enable HAL support], [${nut_with_hal}], [],
607                                         [WITH_HAL], [Define to enable HAL support])
609 dnl ----------------------------------------------------------------------
611 dnl checks related to --with-doc
613 dnl Always check for AsciiDoc prerequisites, since even if --with-doc
614 dnl is set to 'no', we may still want to build the website, or some
615 dnl doc targets manually
616 NUT_CHECK_ASCIIDOC
618 case "${nut_with_doc}" in
619         yes|all|auto)
620                 nut_doc_build_list="html-single html-chunked pdf"
621                 ;;
622         no)
623                 nut_doc_build_list=""
624                 ;;
625         *)
626                 nut_doc_build_list="`echo ${nut_with_doc} | sed 's/,/ /g'`"
627                 ;;
628 esac
630 for nut_doc_build_target in ${nut_doc_build_list}; do
631         case "${nut_doc_build_target}" in
632         html-single)
633                 AC_MSG_CHECKING([if asciidoc version can build ${nut_doc_build_target}])
634                 AX_COMPARE_VERSION([${ASCIIDOC_VERSION}], [ge], [8.6.3], [
635                         AC_MSG_RESULT(yes)
636                         DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}"
637                 ], [
638                         AC_MSG_RESULT(no)
639                         DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}"
640                 ])
641                 ;;
643         html-chunked)
644                 AC_MSG_CHECKING([if a2x version can build ${nut_doc_build_target}])
645                 AX_COMPARE_VERSION([${A2X_VERSION}], [ge], [8.6.3], [
646                         AC_MSG_RESULT(yes)
647                         DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}"
648                 ], [
649                         AC_MSG_RESULT(no)
650                         DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}"
651                 ])
652                 ;;
654         pdf)
655                 AC_MSG_CHECKING([if dblatex version can build ${nut_doc_build_target}])
656                 AX_COMPARE_VERSION([${DBLATEX_VERSION}], [ge], [0.2.5], [
657                         AC_MSG_RESULT(yes)
658                         DOC_BUILD_LIST="${DOC_BUILD_LIST} ${nut_doc_build_target}"
659                 ], [
660                         AC_MSG_RESULT(no)
661                         DOC_NOBUILD_LIST="${DOC_NOBUILD_LIST} ${nut_doc_build_target}"
662                 ])
663                 ;;
664         esac
665 done
667 case "${nut_with_doc}" in
668 auto)
669         if test -n "${DOC_BUILD_LIST}"; then
670                 nut_with_doc="yes"
671         else
672                 nut_with_doc="no"
673         fi
674         ;;      
676         ;;
678         if test -z "${DOC_NOBUILD_LIST}"; then
679                 nut_with_doc="yes"
680         else
681                 AC_MSG_ERROR(["Unable to build ${DOC_NOBUILD_LIST} documentation"])
682         fi
683         ;;
684 esac
686 AC_MSG_CHECKING([if asciidoc version can build website (minimum required 8.6.3)])
687 AX_COMPARE_VERSION([${ASCIIDOC_VERSION}], [ge], [8.6.3], [
688         AC_MSG_RESULT(yes)
689         nut_have_asciidoc="yes"
690 ], [
691         AC_MSG_RESULT(no)
692         nut_have_asciidoc="no"
695 AC_MSG_CHECKING([if a2x version can build website (minimum required 8.6.3)])
696 AX_COMPARE_VERSION([${A2X_VERSION}], [ge], [8.6.3], [
697         AC_MSG_RESULT(yes)
698 ], [
699         AC_MSG_RESULT(no)
700         nut_have_asciidoc="no"
703 NUT_REPORT_FEATURE([build and install documentation], [${nut_with_doc}], [],
704                                         [WITH_ASCIIDOC], [Define to enable Asciidoc support])
706 dnl Notes: we also keep HAVE_ASCIIDOC for implicit targets, such as manpage
707 dnl building
708 AM_CONDITIONAL([HAVE_ASCIIDOC], [test "${nut_have_asciidoc}" = "yes"])
710 if test "${nut_with_doc}" = "yes"; then
711         NUT_REPORT([only build specific documentation format], [${DOC_BUILD_LIST}])
714 dnl ----------------------------------------------------------------------
715 dnl checks related to --with-dev
717 dnl We only init libtool there to allow AC_DISABLE_STATIC
718 AC_PROG_LIBTOOL
720 dnl ${nut_with_dev}: any value except "yes" or "no" is treated as "auto".
721 if test "${nut_with_dev}" != "no"; then
722   nut_with_dev="yes"
723 else
724   AC_DISABLE_STATIC
726 AM_CONDITIONAL(WITH_DEV, test "${nut_with_dev}" = "yes")
727 NUT_REPORT_FEATURE([build and install the development files], [${nut_with_dev}], [],
728                                         [WITH_DEV], [Define to enable development files support])
730 dnl ----------------------------------------------------------------------
733 AC_MSG_CHECKING(state path)
734 AC_ARG_WITH(statepath,
735         AS_HELP_STRING([--with-statepath=PATH], [path for ups state files (/var/state/ups)]),
737         case "${withval}" in
738         yes|no)
739                 AC_MSG_ERROR(invalid option --with(out)-statepath - see docs/configure.txt)
740                 ;;
741         *)
742                 STATEPATH="${withval}"
743                 ;;
744         esac
745 ], [])
746 AC_DEFINE_UNQUOTED(STATEPATH, "${STATEPATH}", [Path for UPS driver state files])
747 AC_MSG_RESULT(${STATEPATH})
749 dnl ---------------------------------------------------------------------
750 dnl The 'alt pid path' is used by the drivers (via main.c) and upsd, since
751 dnl ideally they do not run as root and will not be able to write to the usual
752 dnl /var/run path.  This defaults to the STATEPATH since they should be
753 dnl able to write there.
756 AC_MSG_CHECKING(alt pid path)
757 AC_ARG_WITH(altpidpath,
758         AS_HELP_STRING([--with-altpidpath=PATH], [path for driver/upsd .pid files (<statepath>)]),
760         case "${withval}" in
761         yes|no)
762                 AC_MSG_ERROR(invalid option --with(out)-altpidpath - see docs/configure.txt)
763                 ;;
764         *)
765                 ALTPIDPATH="${withval}"
766                 ;;
767         esac
768 ], [
769         ALTPIDPATH="${STATEPATH}"
771 AC_DEFINE_UNQUOTED(ALTPIDPATH, "${ALTPIDPATH}", [Path for pid files of drivers and upsd (usually STATEPATH)])
772 AC_MSG_RESULT(${ALTPIDPATH})
774 AC_MSG_CHECKING(driver path)
775 AC_ARG_WITH(drvpath,
776         AS_HELP_STRING([--with-drvpath=PATH], [where to install UPS drivers (EPREFIX/bin)]),
778         case "${withval}" in
779         yes|no)
780                 AC_MSG_ERROR(invalid option --with(out)-drvpath - see docs/configure.txt)
781                 ;;
782         *)
783                 driverexecdir="${withval}"
784                 ;;
785         esac
786 ], [])
787 conftemp="${driverexecdir}"
788 eval conftemp=\"${conftemp}\"
789 eval conftemp=\"${conftemp}\"
790 AC_DEFINE_UNQUOTED(DRVPATH, "${conftemp}", [Default path for UPS drivers])
791 AC_MSG_RESULT(${driverexecdir})
793 AC_MSG_CHECKING(cgi path)
794 AC_ARG_WITH(cgipath,
795         AS_HELP_STRING([--with-cgipath=PATH], [where to install CGI programs (EPREFIX/cgi-bin)]),
797         case "${withval}" in
798         yes|no)
799                 AC_MSG_ERROR(invalid option --with(out)-cgipath - see docs/configure.txt)
800                 ;;
801         *)
802                 cgiexecdir="${withval}"
803                 ;;
804         esac
805 ], [])
806 conftemp="${cgiexecdir}"
807 eval conftemp=\"${conftemp}\"
808 eval conftemp=\"${conftemp}\"
809 AC_DEFINE_UNQUOTED(CGIPATH, "${conftemp}", [Default path for CGI programs])
810 AC_MSG_RESULT(${cgiexecdir})
812 AC_MSG_CHECKING(html path)
813 AC_ARG_WITH(htmlpath,
814         AS_HELP_STRING([--with-htmlpath=PATH], [where to install HTML files (PREFIX/html)]),
816         case "${withval}" in
817         yes|no)
818                 AC_MSG_ERROR(invalid option --with(out)-htmlpath - see docs/configure.txt)
819                 ;;
820         *)
821                 htmldir="${withval}"
822                 ;;
823         esac
824 ], [])
825 conftemp="${htmldir}"
826 eval conftemp=\"${conftemp}\"
827 eval conftemp=\"${conftemp}\"
828 AC_DEFINE_UNQUOTED(HTMLPATH, "${conftemp}", [Default path for HTML files])
829 AC_MSG_RESULT(${htmldir})
831 AC_MSG_CHECKING(pidpath)
832 AC_ARG_WITH(pidpath,
833         AS_HELP_STRING([--with-pidpath=PATH], [path for .pid files (/var/run)]),
835         case "${withval}" in
836         yes|no)
837                 AC_MSG_ERROR(invalid option --with(out)-pidpath - see docs/configure.txt)
838                 ;;
839         *)
840                 PIDPATH="${withval}"
841                 ;;
842         esac
843 ], [])
844 AC_DEFINE_UNQUOTED(PIDPATH, "${PIDPATH}", [Path where the pid files should go])
845 AC_MSG_RESULT(${PIDPATH})
847 AC_MSG_CHECKING(network port number)
848 AC_ARG_WITH(port,
849         AS_HELP_STRING([--with-port=PORT], [port for network communications (3493)]),
851         case "${withval}" in
852         yes|no)
853                 AC_MSG_ERROR(invalid option --with(out)-port - see docs/configure.txt)
854                 ;;
855         *)
856                 PORT="${withval}"
857                 ;;
858         esac
859 ], [
860         PORT="3493"
862 AC_DEFINE_UNQUOTED(PORT, ${PORT}, [Port for network communications])
863 AC_MSG_RESULT(${PORT})
865 AC_MSG_CHECKING(user to run as)
866 AC_ARG_WITH(user,
867         AS_HELP_STRING([--with-user=username], [user for programs started as root (nobody)]),
869         case "${withval}" in
870         yes|no)
871                 AC_MSG_ERROR(invalid option --with(out)-user - see docs/configure.txt)
872                 ;;
873         *)
874                 RUN_AS_USER="${withval}"
875                 nut_user_given=yes
876                 ;;
877         esac
878 ], [
879         nut_user_given=no
881 AC_DEFINE_UNQUOTED(RUN_AS_USER, "${RUN_AS_USER}", [User to switch to if started as root])
882 AC_MSG_RESULT(${RUN_AS_USER})
884 AC_MSG_CHECKING(group membership of user to run as)
885 AC_ARG_WITH(group,
886         AS_HELP_STRING([--with-group=groupname], [group membership of user for programs started as root (nogroup)]),
888         case "${withval}" in
889         yes|no)
890                 AC_MSG_ERROR(invalid option --with(out)-group - see docs/configure.txt)
891                 ;;
892         *)
893                 RUN_AS_GROUP="${withval}"
894                 nut_group_given=yes
895                 ;;
896         esac
897 ], [
898         nut_group_given=no
900 AC_DEFINE_UNQUOTED(RUN_AS_GROUP, "${RUN_AS_GROUP}", [Group membership of user to switch to if started as root])
901 AC_MSG_RESULT(${RUN_AS_GROUP})
903 dnl check that --with-user is given if --with-group is given.
904 if test "${nut_user_given}" = "yes" -a "${nut_group_given}" = "no"; then
905         AC_MSG_ERROR(["If you specify --with-user, you also must specify --with-group"])
906 elif test "${nut_user_given}" = "no" -a "${nut_group_given}" = "yes"; then
907         AC_MSG_ERROR(["If you specify --with-group, you also must specify --with-user"])
910 AC_MSG_CHECKING(facility for syslog)
911 AC_ARG_WITH(logfacility,
912         AS_HELP_STRING([--with-logfacility=FACILITY], [facility for log messages (LOG_DAEMON)]),
914         case "${withval}" in
915         yes|no)
916                 AC_MSG_ERROR(invalid option --with(out)-logfacility - see docs/configure.txt)
917                 ;;
918         *)
919                 LOGFACILITY="${withval}"
920                 ;;
921         esac
922 ], [
923         LOGFACILITY="LOG_DAEMON"
925 AC_DEFINE_UNQUOTED(LOG_FACILITY, ${LOGFACILITY}, [Desired syslog facility - see syslog(3)])
926 AC_MSG_RESULT(${LOGFACILITY})
928 dnl Autoconf versions before 2.62 do not allow consecutive quadrigraphs,
929 dnl so the help string depends on the version used
930 AC_MSG_CHECKING(which drivers to build)
931 AC_ARG_WITH(drivers,
932         AS_HELP_STRING([m4_version_prereq(2.62,
933                 [@<:@--with-drivers=driver@<:@,driver@:>@@:>@],
934                 [[[[--with-drivers=driver@<:@,driver@:>@]]]])],
935         [Only build specific drivers (all)]),
937         case "${withval}" in
938         yes|no)
939                 AC_MSG_ERROR(invalid option --with(out)-drivers - see docs/configure.txt)
940                 ;;
941         *)
942                 DRIVER_BUILD_LIST=`echo ${withval} | sed "s/,/ /g"`
943                 AC_MSG_RESULT(${DRIVER_BUILD_LIST})
944                 ;;
945         esac
946 ], [
947         DRIVER_BUILD_LIST="all"
948         AC_MSG_RESULT(all available)
950 AM_CONDITIONAL(SOME_DRIVERS, test "${DRIVER_BUILD_LIST}" != "all")
952 if test "${DRIVER_BUILD_LIST}" != "all"; then
953         NUT_REPORT([only build specific drivers], [${DRIVER_BUILD_LIST}])
956 AC_MSG_CHECKING(which driver man pages to install)
957 if test "${DRIVER_BUILD_LIST}" = "all"; then
958         DRIVER_MAN_LIST=all
959         AC_MSG_RESULT(all available)
960 else
961         DRIVER_MAN_LIST=""
962         for i in ${DRIVER_BUILD_LIST}; do
963                 if test -f ${srcdir}/docs/man/$i.8; then
964                         DRIVER_MAN_LIST="${DRIVER_MAN_LIST} $i.8"
965                 fi
966         done
967         AC_MSG_RESULT(${DRIVER_MAN_LIST})
970 AC_MSG_CHECKING(whether to strip debug symbols)
971 AC_ARG_ENABLE(strip,
972         AS_HELP_STRING([--enable-strip], [Strip debugging symbols from binaries (no)]),
974         case "${withval}" in
975         no)
976                 AC_MSG_RESULT(no)
977                 ;;
978         *)
979                 AC_MSG_RESULT(yes)
980                 CFLAGS="${CFLAGS} -s"
981                 ;;
982         esac
983 ], [
984         AC_MSG_RESULT(no)
987 AC_MSG_CHECKING(whether to install pkg-config *.pc files)
988 AC_ARG_WITH(pkgconfig-dir,
989         AS_HELP_STRING([--with-pkgconfig-dir=PATH], [where to install pkg-config *.pc files (EPREFIX/lib/pkgconfig)]),
991         case "${withval}" in
992         yes|auto)
993                 ;;
994         no)
995                 pkgconfigdir=""
996                 ;;
997         *)
998                 pkgconfigdir="${withval}"
999                 ;;
1000         esac
1001 ], [])
1002 if test -n "${pkgconfigdir}"; then
1003         AC_MSG_RESULT(using ${pkgconfigdir})
1004 else
1005         AC_MSG_RESULT(no)
1007 AM_CONDITIONAL(WITH_PKG_CONFIG, test -n "${pkgconfigdir}")
1009 PKG_PROG_PKG_CONFIG
1010 systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd`
1011 AC_MSG_CHECKING(whether to install systemd files)
1012 AC_ARG_WITH([systemdsystemunitdir],
1013         AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files (auto)]),
1015         case "${withval}" in
1016         yes|auto)
1017                 ;;
1018         no)
1019                 systemdsystemunitdir=""
1020                 ;;
1021         *)
1022                 systemdsystemunitdir="${withval}"
1023                 ;;
1024         esac
1025 ], [])
1026 dnl Override installation directory, with the local installation
1027 dnl prefix. This is needed for 'distcheck*' targets, otherwise
1028 dnl files will try to get intalled to the actual system directories
1029 if test -n "${systemdsystemunitdir}"; then
1030         systemdsystemshutdowndir="${libdir}/systemd/system-shutdown"
1031         AC_MSG_RESULT(using ${systemdsystemunitdir})
1032         systemdsystemunitdir="`echo ${systemdsystemunitdir} | sed 's/\/lib/\${libdir}/'`"
1033 else
1034         AC_MSG_RESULT(no)
1036 AM_CONDITIONAL(HAVE_SYSTEMD, test "$systemdsystemunitdir" != "")
1038 AC_MSG_CHECKING(whether to install hotplug rules)
1039 AC_ARG_WITH(hotplug-dir,
1040         AS_HELP_STRING([--with-hotplug-dir=PATH], [where to install hotplug rules (/etc/hotplug)]),
1042         case "${withval}" in
1043         yes)
1044                 if test -z "${hotplugdir}"; then
1045                         AC_MSG_RESULT(no)
1046                         AC_MSG_ERROR(["hotplug directory requested but not found"])
1047                 fi
1048                 ;;
1049         auto)
1050                 ;;
1051         no)
1052                 hotplugdir=""
1053                 ;;
1054         *)
1055                 hotplugdir="${withval}"
1056                 ;;
1057         esac
1058 ], [])
1059 if test -n "${hotplugdir}"; then
1060         AC_MSG_RESULT(using ${hotplugdir})
1061 else
1062         AC_MSG_RESULT(no)
1064 AM_CONDITIONAL(WITH_HOTPLUG, test -n "${hotplugdir}")
1066 AC_MSG_CHECKING(whether to install udev rules)
1067 AC_ARG_WITH(udev-dir,
1068         AS_HELP_STRING([--with-udev-dir=PATH], [where to install udev rules (/lib/udev or /etc/udev)]),
1070         case "${withval}" in
1071         yes)
1072                 if test -z "${udevdir}"; then
1073                         AC_MSG_RESULT(no)
1074                         AC_MSG_ERROR(["udev directory requested but not found"])
1075                 fi
1076                 ;;
1077         auto)
1078                 ;;
1079         no)
1080                 udevdir=""
1081                 ;;
1082         *)
1083                 udevdir="${withval}"
1084                 ;;
1085         esac
1086 ], [])
1087 if test -n "${udevdir}"; then
1088         AC_MSG_RESULT(using ${udevdir})
1089 else
1090         AC_MSG_RESULT(no)
1092 AM_CONDITIONAL(WITH_UDEV, test -n "${udevdir}")
1094 AC_PATH_PROGS([ASCIIDOC], [asciidoc], [none])
1095 AM_CONDITIONAL([MANUALUPDATE], [test "x$ASCIIDOC" != "xnone"])
1096 AC_PATH_PROGS([A2X], [a2x], [none])
1098 dnl check for spell checking deps
1099 AC_PATH_PROGS([ASPELL], [aspell], [none])
1100 AM_CONDITIONAL([HAVE_ASPELL], [test "x$ASPELL" != "xnone"])
1102 dnl expand ${sysconfdir} and write it out
1103 conftemp="${sysconfdir}"
1104 eval conftemp=\"${conftemp}\"
1105 eval conftemp=\"${conftemp}\"
1106 CONFPATH=${conftemp}
1107 AC_DEFINE_UNQUOTED(CONFPATH, "${conftemp}", [Default path for configuration files])
1109 dnl same for datadir
1110 conftemp="${datadir}"
1111 eval conftemp=\"${conftemp}\"
1112 eval conftemp=\"${conftemp}\"
1113 DATADIR=${conftemp}
1114 AC_DEFINE_UNQUOTED(DATADIR, "${conftemp}", [Default path for data files])
1116 dnl same for bindir
1117 conftemp="${bindir}"
1118 eval conftemp=\"${conftemp}\"
1119 eval conftemp=\"${conftemp}\"
1120 BINDIR=${conftemp}
1121 AC_DEFINE_UNQUOTED(BINDIR, "${conftemp}", [Default path for user executables])
1123 dnl same for sbindir
1124 conftemp="${sbindir}"
1125 eval conftemp=\"${conftemp}\"
1126 eval conftemp=\"${conftemp}\"
1127 SBINDIR=${conftemp}
1128 AC_DEFINE_UNQUOTED(SBINDIR, "${conftemp}", [Default path for system executables])
1130 AC_SUBST(OS_NAME)
1131 AC_SUBST(TREE_VERSION)
1132 AC_SUBST(NUT_NETVERSION)
1133 AC_SUBST(LIBSSL_CFLAGS)
1134 AC_SUBST(LIBSSL_LIBS)
1135 AC_SUBST(LIBGD_CFLAGS)
1136 AC_SUBST(LIBGD_LDFLAGS)
1137 AC_SUBST(LIBNETSNMP_CFLAGS)
1138 AC_SUBST(LIBNETSNMP_LIBS)
1139 AC_SUBST(LIBUSB_CFLAGS)
1140 AC_SUBST(LIBUSB_LIBS)
1141 AC_SUBST(LIBNEON_CFLAGS)
1142 AC_SUBST(LIBNEON_LIBS)
1143 AC_SUBST(LIBAVAHI_CFLAGS)
1144 AC_SUBST(LIBAVAHI_LIBS)
1145 AC_SUBST(LIBPOWERMAN_CFLAGS)
1146 AC_SUBST(LIBPOWERMAN_LIBS)
1147 AC_SUBST(LIBIPMI_CFLAGS)
1148 AC_SUBST(LIBIPMI_LIBS)
1149 AC_SUBST(DOC_BUILD_LIST)
1150 AC_SUBST(LIBWRAP_CFLAGS)
1151 AC_SUBST(LIBWRAP_LIBS)
1152 AC_SUBST(LIBLTDL_CFLAGS)
1153 AC_SUBST(LIBLTDL_LIBS)
1154 AC_SUBST(HAL_USER)
1155 AC_SUBST(HAL_DEVICE_MATCH_KEY)
1156 AC_SUBST(HAL_FDI_PATH)
1157 AC_SUBST(HAL_CALLOUTS_PATH)
1158 AC_SUBST(LIBHAL_CFLAGS)
1159 AC_SUBST(LIBHAL_LIBS)
1160 AC_SUBST(DRIVER_BUILD_LIST)
1161 AC_SUBST(DRIVER_MAN_LIST)
1162 AC_SUBST(DRIVER_INSTALL_TARGET)
1163 AC_SUBST(NETLIBS)
1164 AC_SUBST(SERLIBS)
1165 AC_SUBST(PIDPATH)
1166 AC_SUBST(STATEPATH)
1167 AC_SUBST(CONFPATH)
1168 AC_SUBST(BINDIR)
1169 AC_SUBST(DRVPATH)
1170 AC_SUBST(SBINDIR)
1171 AC_SUBST(PORT)
1172 AC_SUBST(RUN_AS_USER)
1173 AC_SUBST(RUN_AS_GROUP)
1174 AC_SUBST(SUN_LIBUSB)
1175 AC_SUBST(WORDS_BIGENDIAN)
1176 AC_SUBST(cgiexecdir)
1177 AC_SUBST(driverexecdir)
1178 AC_SUBST(htmldir)
1179 AC_SUBST(pkgconfigdir)
1180 AC_SUBST(systemdsystemunitdir)
1181 AC_SUBST(systemdsystemshutdowndir)
1182 AC_SUBST(hotplugdir)
1183 AC_SUBST(udevdir)
1185 AC_OUTPUT([
1186  clients/Makefile
1187  common/Makefile
1188  conf/Makefile
1189  conf/upsmon.conf.sample
1190  conf/upssched.conf.sample
1191  data/html/header.html
1192  data/html/Makefile
1193  data/Makefile
1194  data/driver.list
1195  docs/Makefile
1196  docs/man/Makefile
1197  docs/website/Makefile
1198  drivers/Makefile
1199  include/Makefile
1200  lib/libupsclient-config
1201  lib/libupsclient.pc
1202  lib/libnutclient.pc
1203  lib/libnutscan.pc
1204  lib/Makefile
1205  scripts/augeas/Makefile
1206  scripts/augeas/nutnutconf.aug
1207  scripts/augeas/nutupsconf.aug
1208  scripts/augeas/nutupsdconf.aug
1209  scripts/augeas/nutupsdusers.aug
1210  scripts/augeas/nutupsmonconf.aug
1211  scripts/augeas/nutupsschedconf.aug
1212  scripts/augeas/nuthostsconf.aug
1213  scripts/augeas/nutupssetconf.aug
1214  scripts/avahi/nut.service
1215  scripts/hal/Makefile
1216  scripts/hal/ups-nut-device.fdi
1217  scripts/hotplug/Makefile
1218  scripts/hotplug/libhidups
1219  scripts/HP-UX/nut.psf
1220  scripts/HP-UX/postinstall
1221  scripts/python/Makefile
1222  scripts/systemd/Makefile
1223  scripts/systemd/nut-driver.service
1224  scripts/systemd/nut-monitor.service
1225  scripts/systemd/nut-server.service
1226  scripts/systemd/nutshutdown
1227  scripts/Solaris/Makefile
1228  scripts/Solaris/pkginfo
1229  scripts/Solaris/postinstall
1230  scripts/Solaris/preremove
1231  scripts/Solaris/nut 
1232  scripts/udev/Makefile
1233  scripts/udev/nut-ipmipsu.rules
1234  scripts/udev/nut-usbups.rules
1235  scripts/ufw/nut.ufw.profile
1236  scripts/Makefile
1237  server/Makefile
1238  tools/Makefile
1239  tools/nut-scanner/Makefile
1240  tests/Makefile
1241  Makefile
1244 NUT_PRINT_FEATURE_REPORT