dnl +------------------------------------------------------------------+ dnl | Network UPS Tools: configure.in | dnl +------------------------------------------------------------------+ dnl NUT version number is defined here and *only* here (no more include/version) AC_INIT(nut, 2.2.0) AC_CONFIG_SRCDIR(server/upsd.c) echo "Network UPS Tools version ${PACKAGE_VERSION}" AC_CANONICAL_SYSTEM AC_CONFIG_HEADER(include/config.h) AC_PREFIX_DEFAULT(/usr/local/ups) AM_INIT_AUTOMAKE dnl Use "./configure --enable-maintainer-mode" to keep Makefile.in and Makefile dnl in sync after SVN updates. AM_MAINTAINER_MODE 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]) 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' pkgcfgdir='/usr/lib/pkgconfig' if test ! -d "${pkgcfgdir}"; then pkgcfgdir='' fi hotplugdir='/etc/hotplug' if test ! -d "${hotplugdir}"; then hotplugdir='' fi udevdir='/etc/udev' if test ! -d "${udevdir}"; then udevdir='' fi 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 AC_PROG_INSTALL AC_PROG_EGREP AC_PATH_PROG(AR, ar) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_PROG_LIBTOOL AC_C_INLINE AC_CHECK_FUNCS(flock lockf fcvt fcvtl) AC_CHECK_FUNCS(cfsetispeed tcsendbreak) AC_CHECK_FUNCS(seteuid setsid getpassphrase) AC_CHECK_FUNCS(on_exit) dnl the following may add stuff to LIBOBJS AC_CHECK_FUNCS(vsnprintf snprintf, , [AC_LIBOBJ(snprintf)] ) AC_REPLACE_FUNCS(setenv inet_aton strerror atexit) dnl dnl Only use these when compiling with gcc dnl if ( test "${GCC}" = "yes" ) then CFLAGS="${CFLAGS} -Wall -Wsign-compare" fi dnl Endianness handling, using default behavior dnl eg defines WORDS_BIGENDIAN if BigEnd, dnl nothing if LittleEnd, abort otherwise AC_C_BIGENDIAN dnl optind handling: dnl need to check if unistd.h is enough, else try getopt.h, else need decls AC_MSG_CHECKING(for getopt declarations) AC_TRY_COMPILE( [#include ], [int i = optind;], nut_getopt_decl_in_unistd=yes, nut_getopt_decl_in_unistd=no) if test "${nut_getopt_decl_in_unistd}" = "yes"; then AC_MSG_RESULT(in unistd.h) else AC_CHECK_HEADER(getopt.h, [have_getopt_h=yes], [have_getopt_h=]) if test "${have_getopt_h}" = "yes"; then AC_DEFINE(NEED_GETOPT_H, 1, [Define if getopt.h is needed]) AC_MSG_RESULT(using getopt.h) else AC_DEFINE(NEED_GETOPT_DECLS, 1, [Define to use explicit getopt declarations]) AC_MSG_RESULT(using explicit getopt declarations) fi fi dnl FreeBSD serial locking compatibility - look for uu_lock in libutil.h AC_MSG_CHECKING(whether to use uu_lock) AC_EGREP_HEADER(uu_lock, libutil.h, [ AC_MSG_RESULT(yes) SERLIBS="-lutil" AC_DEFINE(HAVE_UU_LOCK, 1, [Use uu_lock for locking (FreeBSD)]) dnl put in some better defaults for FreeBSD RUN_AS_USER="uucp" ],[ AC_MSG_RESULT(no) SERLIBS="" ]) dnl Solaris compatibility - check for -lnsl and -lsocket if connect() is gone AC_CHECK_FUNCS(connect) if ( test "${ac_cv_func_connect}" = "no" ); then AC_CHECK_LIB(nsl, gethostbyname) AC_CHECK_LIB(socket, connect) fi AC_CHECK_HEADERS(sys/modem.h stdarg.h varargs.h sys/termios.h) AC_HEADER_TIME AC_CHECK_HEADERS(sys/time.h) dnl ---------------------------------------------------------------------- dnl Check for types and define possible replacements NUT_TYPE_SOCKLEN_T NUT_TYPE_UINT16_T NUT_TYPE_UINT8_T dnl ---------------------------------------------------------------------- dnl check for --with-all (or --without-all, or --with-all=auto) flag AC_MSG_CHECKING(for --with-all) AC_ARG_WITH(all, AC_HELP_STRING([--with-all], [enable serial, usb, snmp, hal, cgi, lib]), [ if test -n "${withval}"; then dnl Note: we allow "no" as a positive value, because dnl this is what the user expects from --without-all if test -z "${with_cgi}"; then with_cgi="${withval}"; fi if test -z "${with_lib}"; then with_lib="${withval}"; fi if test -z "${with_serial}"; then with_serial="${withval}"; fi if test -z "${with_snmp}"; then with_snmp="${withval}"; fi if test -z "${with_usb}"; then with_usb="${withval}"; fi if test -z "${with_hal}"; then with_hal="${withval}"; fi AC_MSG_RESULT("${withval}") else AC_MSG_RESULT(not given) fi ], [ AC_MSG_RESULT(not given) ]) 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([serial], [build and install serial drivers], [yes]) NUT_ARG_WITH([usb], [build and install USB drivers], [auto]) NUT_ARG_WITH([snmp], [build and install SNMP drivers], [auto]) NUT_ARG_WITH([hal], [build and install HAL support], [no]) NUT_ARG_WITH([cgi], [build and install the CGI programs], [no]) NUT_ARG_WITH([lib], [build and install the upsclient library], [no]) 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 NUT_CHECK_LIBUSB NUT_CHECK_LIBHAL dnl ---------------------------------------------------------------------- dnl additional USB-related checks dnl Check for libusb "force driver unbind" availability dnl Need at least libusb 0.1.8 AC_CHECK_LIB(usb, usb_detach_kernel_driver_np, [ AC_DEFINE(LIBUSB_HAS_DETACH_KRNL_DRV, 1, [Define to 1 if libusb supports `usb_detach_kernel_driver_np' function.]) ], [], [${LIBUSB_LDFLAGS}]) dnl Check for Linux hiddev dnl the actual check is done in a macro, see m4/nut_check_hiddev.m4 NUT_CHECK_HIDDEV if test -n "${nut_linux_hiddev}"; then AC_DEFINE_UNQUOTED(LINUX_HIDDEV, "${nut_linux_hiddev}", [Complete path for Linux hiddev.h]) nut_have_hiddev=yes else nut_have_hiddev=no fi dnl Solaris 10/11 USB handling (need librt and libusb runtime path) case ${target_os} in solaris2.1* ) echo Checking for Solaris 10 / 11 specific configuration for usb drivers AC_SEARCH_LIBS(nanosleep,rt) LIBUSB_LDFLAGS="-R/usr/sfw/lib ${LIBUSB_LDFLAGS}" dnl FIXME: Sun's libusb doesn't support timeout (so blocks notification) dnl and need to call libusb close upon reconnexion AC_DEFINE(SUN_LIBUSB, 1, [Define to 1 for Sun version of the libusb.]) SUN_LIBUSB=1 ;; esac dnl ---------------------------------------------------------------------- dnl Check for --with-ssl NUT_ARG_WITH([ssl], [enable SSL development code], [auto]) dnl ${nut_with_ssl}: any value except "yes" or "no" is treated as "auto". if test "${nut_with_ssl}" != "no"; then dnl check for libssl compiler flags NUT_CHECK_LIBSSL fi if test "${nut_with_ssl}" = "yes" -a "${nut_have_libssl}" != "yes"; then AC_MSG_ERROR(["OpenSSL not found, required for SSL support"]) fi if test "${nut_with_ssl}" != "no"; then nut_with_ssl="${nut_have_libssl}" fi if test "${nut_with_ssl}" = "yes"; then AC_DEFINE(HAVE_SSL, 1, [Define to enable SSL development code]) fi NUT_REPORT_FEATURE([enable SSL development code], [${nut_with_ssl}]) dnl ---------------------------------------------------------------------- dnl check whether to compile IPv6 features NUT_ARG_WITH([ipv6], [enable IPv6 support], [auto]) dnl ${nut_with_ipv6}: any value except "yes" or "no" is treated as "auto". if test "${nut_with_ipv6}" != "no"; then dnl check for IPv6 prerequisites NUT_CHECK_IPV6 fi if test "${nut_with_ipv6}" = "yes" -a "${nut_have_ipv6}" != "yes"; then AC_MSG_ERROR(["Some feature required for IPv6 support is missing"]) fi if test "${nut_with_ipv6}" != "no"; then nut_with_ipv6="${nut_have_ipv6}" fi if test "${nut_with_ipv6}" = "yes"; then AC_DEFINE(HAVE_IPV6, 1, [Define to enable IPv6 support]) fi NUT_REPORT_FEATURE([enable IPv6 support], [${nut_with_ipv6}]) dnl ---------------------------------------------------------------------- dnl checks related to --with-cgi 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 AM_CONDITIONAL(WITH_CGI, test "${nut_with_cgi}" = "yes") NUT_REPORT_FEATURE([build CGI programs], [${nut_with_cgi}]) dnl ---------------------------------------------------------------------- dnl checks related to --with-lib dnl ${nut_with_lib}: any value except "yes" or "no" is treated as "auto". if test "${nut_with_lib}" != "no"; then nut_with_lib="yes" fi AM_CONDITIONAL(WITH_LIB, test "${nut_with_lib}" = "yes") NUT_REPORT_FEATURE([build upsclient library], [${nut_with_lib}]) 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 AM_CONDITIONAL(WITH_SERIAL, test "${nut_with_serial}" = "yes") NUT_REPORT_FEATURE([build serial drivers], [${nut_with_serial}]) 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 AM_CONDITIONAL(WITH_SNMP, test "${nut_with_snmp}" = "yes") NUT_REPORT_FEATURE([build SNMP drivers], [${nut_with_snmp}]) dnl ---------------------------------------------------------------------- dnl checks related to --with-usb dnl ${nut_with_usb}: any value except "yes" or "no" is treated as "auto". dnl If user requested USB drivers, insist on building all of them if test "${nut_with_usb}" = "yes"; then if test "${nut_have_libusb}" != "yes" -a "${nut_have_hiddev}" != "yes"; then AC_MSG_ERROR([USB drivers requested but neither libusb nor hiddev.h found]) elif test "${nut_have_libusb}" != "yes"; then AC_MSG_ERROR([USB drivers requested, but libusb not found. Use --with-usb=auto to build only available drivers.]) elif test "${nut_have_hiddev}" != "yes"; then AC_MSG_ERROR([USB drivers requested, but hiddev not found. Use --with-usb=auto to build only available drivers.]) fi fi if test "${nut_with_usb}" != "no"; then nut_with_usb="yes" if test "${nut_have_libusb}" = "yes" -a "${nut_have_hiddev}" = "yes"; then nut_usb_msg="yes" elif test "${nut_have_libusb}" = "yes"; then nut_usb_msg="libusb-based drivers only" elif test "${nut_have_hiddev}" = "yes"; then nut_usb_msg="hiddev-based drivers only" else nut_usb_msg="no" nut_with_usb="no" fi else nut_usb_msg="no" fi AM_CONDITIONAL(WITH_USB, test "${nut_with_usb}" = "yes") AM_CONDITIONAL(HAVE_LIBUSB, test "${nut_have_libusb}" = "yes") AM_CONDITIONAL(HAVE_HIDDEV, test "${nut_have_hiddev}" = "yes") NUT_REPORT_FEATURE([build USB drivers], [${nut_usb_msg}]) dnl ---------------------------------------------------------------------- dnl checks related to --with-hal dnl ${nut_with_hal}: any value except "yes" or "no" is treated as "auto". if test "${nut_with_hal}" = "yes" -a "${nut_have_libhal}" != "yes"; then AC_MSG_ERROR(["libhal not found, required for HAL support"]) fi if test "${nut_with_hal}" = "yes" -a "${nut_have_libusb}" != "yes"; then AC_MSG_ERROR(["libusb not found, required for HAL support"]) fi if test "${nut_with_hal}" != "no"; then if test "${nut_have_libhal}" = "yes" -a "${nut_have_libusb}" = "yes"; then nut_with_hal="yes" else nut_with_hal="no" fi fi AM_CONDITIONAL(WITH_HAL, test "${nut_with_hal}" = "yes") NUT_REPORT_FEATURE([enable HAL support], [${nut_with_hal}]) dnl ---------------------------------------------------------------------- AC_MSG_CHECKING(state path) AC_ARG_WITH(statepath, AC_HELP_STRING([--with-statepath=PATH], [path for ups state files (/var/state/ups)]), [ case "${withval}" in yes|no) ;; *) STATEPATH="${withval}" ;; esac], ) AC_DEFINE_UNQUOTED(STATEPATH, "${STATEPATH}", [Path for UPS driver state files]) AC_MSG_RESULT(${STATEPATH}) dnl --------------------------------------------------------------------- dnl The 'alt pid path' is used by the drivers (via main.c) and upsd, since dnl ideally they do not run as root and won't be able to write to the usual 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, AC_HELP_STRING([--with-altpidpath=PATH], [path for driver/upsd .pid files ()]), [ case "${withval}" in yes|no) ALTPIDPATH="${STATEPATH}" ;; *) ALTPIDPATH="${withval}" ;; esac], ALTPIDPATH="${STATEPATH}" ) AC_DEFINE_UNQUOTED(ALTPIDPATH, "${ALTPIDPATH}", [Path for pid files of drivers and upsd (usually STATEPATH)]) AC_MSG_RESULT(${ALTPIDPATH}) AC_MSG_CHECKING(driver path) AC_ARG_WITH(drvpath, AC_HELP_STRING([--with-drvpath=PATH], [where to install ups drivers (EPREFIX/bin)]), [ case "${withval}" in yes|no) ;; *) driverexecdir="${withval}" ;; esac], ) 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, AC_HELP_STRING([--with-cgipath=PATH], [where to install CGI programs (EPREFIX/cgi-bin)]), [ case "${withval}" in yes|no) ;; *) cgiexecdir="${withval}" ;; esac], ) 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, AC_HELP_STRING([--with-htmlpath=PATH], [where to install HTML files (PREFIX/html)]), [ case "${withval}" in yes|no) ;; *) htmldir="${withval}" ;; esac], ) 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, AC_HELP_STRING([--with-pidpath=PATH], [path for .pid files (/var/run)]), [ case "${withval}" in yes|no) ;; *) PIDPATH="${withval}" ;; esac], ) 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, AC_HELP_STRING([--with-port=PORT], [port for network communications (3493)]), [ case "${withval}" in yes|no) PORT="3493" ;; *) PORT="${withval}" ;; esac], PORT="3493" ) AC_DEFINE_UNQUOTED(PORT, ${PORT}, [Port for network communications]) AC_MSG_RESULT(${PORT}) nut_user_given= AC_MSG_CHECKING(user to run as) AC_ARG_WITH(user, AC_HELP_STRING([--with-user=username], [user for programs started as root (nobody)]), [ case "${withval}" in yes|no) ;; *) RUN_AS_USER="${withval}" nut_user_given=yes ;; esac], ) AC_DEFINE_UNQUOTED(RUN_AS_USER, "${RUN_AS_USER}", [User to switch to if started as root]) AC_MSG_RESULT(${RUN_AS_USER}) nut_group_given= AC_MSG_CHECKING(group membership of user to run as) AC_ARG_WITH(group, AC_HELP_STRING([--with-group=groupname], [group membership of user for programs started as root (nogroup)]), [ case "${withval}" in yes|no) ;; *) RUN_AS_GROUP="${withval}" nut_group_given=yes ;; esac], ) AC_DEFINE_UNQUOTED(RUN_AS_GROUP, "${RUN_AS_GROUP}", [Group membership of user to switch to if started as root]) AC_MSG_RESULT(${RUN_AS_GROUP}) dnl check that --with-user is given iff --with-group is given. if test -n "$nut_user_given" -a -z "$nut_group_given"; then AC_MSG_ERROR(["If you specify --with-user, you also must specify --with-group"]) elif test -z "$nut_user_given" -a -n "$nut_group_given"; then AC_MSG_ERROR(["If you specify --with-group, you also must specify --with-user"]) fi AC_MSG_CHECKING(facility for syslog) AC_ARG_WITH(logfacility, AC_HELP_STRING([--with-logfacility=FACILITY], [facility for log messages (LOG_DAEMON)]), [ case "${withval}" in yes|no) LOGFACILITY="LOG_DAEMON" ;; *) LOGFACILITY="${withval}" ;; esac], LOGFACILITY="LOG_DAEMON" ) AC_DEFINE_UNQUOTED(LOG_FACILITY, ${LOGFACILITY}, [Desired syslog facility - see syslog(3)]) AC_MSG_RESULT(${LOGFACILITY}) AC_MSG_CHECKING(which drivers to build) AC_ARG_WITH(drivers, AC_HELP_STRING([[[[--with-drivers=driver@<:@,driver...@:>@]]]], [Only use specific drivers (all)]), [ case "${withval}" in yes | no) dnl ignore calls without any arguments DRIVER_BUILD_LIST="all" AC_MSG_RESULT(all available) ;; *) DRIVER_BUILD_LIST=`echo ${withval} | sed "s/,/ /g"` AC_MSG_RESULT(${DRIVER_BUILD_LIST}) ;; esac ], [ DRIVER_BUILD_LIST="all" AC_MSG_RESULT(all available) ] ) AM_CONDITIONAL(SOME_DRIVERS, test "${DRIVER_BUILD_LIST}" != "all") if test "${DRIVER_BUILD_LIST}" != "all"; then NUT_REPORT([only build specific drivers], [${DRIVER_BUILD_LIST}]) fi AC_MSG_CHECKING(which driver man pages to install) if test "${DRIVER_BUILD_LIST}" = "all"; then DRIVER_MAN_LIST=all AC_MSG_RESULT(all available) else DRIVER_MAN_LIST="" for i in ${DRIVER_BUILD_LIST}; do if test -f ${srcdir}/man/$i.8; then DRIVER_MAN_LIST="${DRIVER_MAN_LIST} $i.8" fi done AC_MSG_RESULT(${DRIVER_MAN_LIST}) fi AC_MSG_CHECKING(whether to strip debug symbols) AC_ARG_ENABLE(strip, [ --enable-strip Strip debugging symbols from binaries [no]], [ case "${withval}" in no) AC_MSG_RESULT(no) ;; *) AC_MSG_RESULT(yes) CFLAGS="${CFLAGS} -s" ;; esac ], [ AC_MSG_RESULT(no) ]) AC_MSG_CHECKING(whether to enable pkg-config support) AC_ARG_WITH(pkgconfig-dir, AC_HELP_STRING([--with-pkgconfig-dir=PATH], [where to install pkg-config *.pc files (/usr/lib/pkgconfig)]), [ case "${withval}" in yes) if test -z "${pkgcfgdir}"; then AC_MSG_RESULT(no) AC_MSG_ERROR(["pkg-config directory requested but not found]) fi ;; auto) ;; no) pkgcfgdir="" ;; *) pkgcfgdir="${withval}" ;; esac ], ) if test -n "${pkgcfgdir}"; then AC_MSG_RESULT(using ${pkgcfgdir}) else AC_MSG_RESULT(no) fi AM_CONDITIONAL(WITH_PKG_CONFIG, test -n "${pkgcfgdir}") AC_MSG_CHECKING(whether to install hotplug rules) AC_ARG_WITH(hotplug-dir, AC_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 ], ) if test -n "${hotplugdir}"; then AC_MSG_RESULT(using ${hotplugdir}) else AC_MSG_RESULT(no) fi AM_CONDITIONAL(WITH_HOTPLUG, test -n "${hotplugdir}") AC_MSG_CHECKING(whether to install udev rules) AC_ARG_WITH(udev-dir, AC_HELP_STRING([--with-udev-dir=PATH], [where to install udev rules (/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 ], ) if test -n "${udevdir}"; then AC_MSG_RESULT(using ${udevdir}) else AC_MSG_RESULT(no) fi AM_CONDITIONAL(WITH_UDEV, test -n "${udevdir}") dnl 'long long' check - this gets used down in snprintf.o dnl AC_CACHE_CHECK([for long long],nut_cv_have_longlong,[ AC_TRY_RUN([#include main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }], nut_cv_have_longlong=yes,nut_cv_have_longlong=no,nut_cv_have_longlong=cross)]) if test "${nut_cv_have_longlong}" = "yes"; then AC_DEFINE(HAVE_LONG_LONG, 1, [long long support for snprintf]) fi dnl expand ${sysconfdir} and write it out conftemp="${sysconfdir}" eval conftemp=\"${conftemp}\" eval conftemp=\"${conftemp}\" CONFPATH=${conftemp} AC_DEFINE_UNQUOTED(CONFPATH, "${conftemp}", [Default path for configuration files]) dnl same for datadir conftemp="${datadir}" eval conftemp=\"${conftemp}\" eval conftemp=\"${conftemp}\" AC_DEFINE_UNQUOTED(DATADIR, "${conftemp}", [Default path for data files]) AC_SUBST(LIBSSL_CFLAGS) AC_SUBST(LIBSSL_LDFLAGS) AC_SUBST(LIBGD_CFLAGS) AC_SUBST(LIBGD_LDFLAGS) AC_SUBST(LIBNETSNMP_CFLAGS) AC_SUBST(LIBNETSNMP_LDFLAGS) AC_SUBST(LIBUSB_CFLAGS) AC_SUBST(LIBUSB_LDFLAGS) AC_SUBST(HAL_USER) AC_SUBST(LIBHAL_CFLAGS) AC_SUBST(LIBHAL_LDFLAGS) AC_SUBST(DRIVER_BUILD_LIST) AC_SUBST(DRIVER_MAN_LIST) AC_SUBST(DRIVER_INSTALL_TARGET) AC_SUBST(NETLIBS) AC_SUBST(SERLIBS) AC_SUBST(STATEPATH) AC_SUBST(CONFPATH) AC_SUBST(RUN_AS_USER) AC_SUBST(RUN_AS_GROUP) AC_SUBST(LINUX_HIDDEV) AC_SUBST(SUN_LIBUSB) AC_SUBST(WORDS_BIGENDIAN) AC_SUBST(cgiexecdir) AC_SUBST(driverexecdir) AC_SUBST(htmldir) AC_SUBST(pkgcfgdir) AC_SUBST(hotplugdir) AC_SUBST(udevdir) AC_OUTPUT([ clients/Makefile common/Makefile conf/Makefile data/html/header.html data/html/Makefile data/Makefile docs/Makefile drivers/Makefile include/Makefile lib/libupsclient-config lib/libupsclient.pc lib/Makefile man/Makefile packaging/Makefile packaging/debian/Makefile packaging/mandriva/Makefile packaging/generic-rpm/Makefile packaging/generic-rpm/nut.spec packaging/redhat/Makefile packaging/redhat/nut.spec scripts/hotplug/Makefile scripts/hotplug/libhidups scripts/udev/Makefile scripts/udev/nut-usbups.rules scripts/Makefile server/Makefile Makefile ]) NUT_PRINT_FEATURE_REPORT