1 ###############################################################################
3 # collecty - The IPFire statictics collection daemon #
4 # Copyright (C) 2015 collecty development team #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
11 # This program is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
16 # You should have received a copy of the GNU General Public License #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
19 ###############################################################################
27 [http://git.ipfire.org/?p=oddments/collecty.git;a=summary])
29 AC_CONFIG_MACRO_DIR([m4])
30 AC_CONFIG_AUX_DIR([build-aux])
32 AC_PREFIX_DEFAULT([/usr])
43 AM_SILENT_RULES([yes])
45 LT_INIT([disable-static])
47 IT_PROG_INTLTOOL([0.40.0])
49 # Interpret embedded Python in HTML files
50 XGETTEXT="${XGETTEXT} -L Python --keyword=_:1,2 --keyword=N_:1,2 --no-location"
52 GETTEXT_PACKAGE=${PACKAGE_TARNAME}
53 AC_SUBST(GETTEXT_PACKAGE)
63 AC_PROG_GCC_TRADITIONAL
65 AC_CHECK_HEADERS_ONCE([
76 AC_PATH_PROG([XSLTPROC], [xsltproc])
78 PKG_CHECK_MODULES([OPING], [liboping])
82 PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}])
85 PKG_CHECK_MODULES([LIBATASMART], [libatasmart >= 0.19])
90 AC_CHECK_HEADERS([sensors/sensors.h sensors/errors.h])
93 AC_CHECK_LIB(sensors, sensors_init, [], [AC_MSG_ERROR([*** sensors library not found])])
95 AC_SUBST(SENSORS_LIBS)
101 # This makes sure pkg.m4 is available.
102 m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
104 # ------------------------------------------------------------------------------
106 AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-man-pages],
107 [do not install man pages]))
108 AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes])
109 AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
111 # ------------------------------------------------------------------------------
113 AC_ARG_WITH([systemd],
114 AS_HELP_STRING([--with-systemd], [Enable systemd support.])
117 AC_ARG_WITH([dbuspolicydir],
118 AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
120 [with_dbuspolicydir=${sysconfdir}/dbus-1/system.d]
123 AC_ARG_WITH([dbussystemservicedir],
124 AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
126 [with_dbussystemservicedir=${datadir}/dbus-1/system-services]
129 AS_IF([test "x$with_systemd" != "xno"],
130 [PKG_CHECK_MODULES(systemd, [libsystemd],
131 [have_systemd=yes], [have_systemd=no])],
135 AS_IF([test "x$have_systemd" = "xyes"],
136 [AC_MSG_CHECKING([for systemd system unit directory])
137 AC_ARG_WITH([systemdsystemunitdir],
138 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
139 [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]
142 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
144 if test -n "$systemdsystemunitdir" -a "x$systemdsystemunitdir" != xno; then
145 AC_MSG_RESULT([$systemdsystemunitdir])
147 AC_MSG_ERROR([not found (try --with-systemdsystemunitdir)])
150 [AS_IF([test "x$with_systemd" = "xyes"],
151 [AC_MSG_ERROR([Systemd support is enabled but no systemd has been found.])
155 AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$have_systemd" = "xyes"])
157 AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
158 AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
160 # ------------------------------------------------------------------------------
165 src/collecty/__version__.py
170 ${PACKAGE_NAME} ${VERSION}
173 D-Bus policy dir: ${with_dbuspolicydir}
174 D-Bus system dir: ${with_dbussystemservicedir}
176 Systemd support ${have_systemd}
177 Generate man-pages: ${have_manpages}