]> git.ipfire.org Git - collecty.git/blobdiff - configure.ac
Makefile: Fix generating man-pages only
[collecty.git] / configure.ac
index 899fc2d42ab3b495fe0af1c818ab6bee694f197e..4f61f7c28d636f85160313a26a845172858fd4e7 100644 (file)
@@ -21,7 +21,7 @@
 AC_PREREQ([2.64])
 
 AC_INIT([collecty],
-       [001],
+       [004],
        [info@ipfire.org],
        [collecty],
        [http://git.ipfire.org/?p=oddments/collecty.git;a=summary])
@@ -41,6 +41,8 @@ AM_INIT_AUTOMAKE([
        subdir-objects
 ])
 AM_SILENT_RULES([yes])
+LT_PREREQ(2.2)
+LT_INIT([disable-static])
 
 IT_PROG_INTLTOOL([0.40.0])
 
@@ -51,13 +53,46 @@ AC_PROG_LN_S
 AC_PROG_MKDIR_P
 AC_PROG_SED
 
+# C Compiler
+AC_PROG_CC
+AC_PROG_CC_C99
+AC_PROG_CC_C_O
+AC_PROG_GCC_TRADITIONAL
+
+AC_CHECK_HEADERS_ONCE([
+       errno.h
+       fcntl.h
+       linux/hdreg.h
+       mntent.h
+       stdbool.h
+       string.h
+       sys/ioctl.h
+       time.h
+])
+
 AC_PATH_PROG([XSLTPROC], [xsltproc])
 
+PKG_CHECK_MODULES([OPING], [liboping])
+
 # Python
-AM_PATH_PYTHON([2.7])
+AM_PATH_PYTHON([3.2])
+PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}])
+
+# libatasmart
+PKG_CHECK_MODULES([LIBATASMART], [libatasmart >= 0.19])
 
 save_LIBS="$LIBS"
 
+# lm-sensors
+AC_CHECK_HEADERS([sensors/sensors.h sensors/errors.h])
+
+LIBS=
+AC_CHECK_LIB(sensors, sensors_init, [], [AC_MSG_ERROR([*** sensors library not found])])
+SENSORS_LIBS="$LIBS"
+AC_SUBST(SENSORS_LIBS)
+
+LIBS="$save_LIBS"
+
 # pkg-config
 PKG_PROG_PKG_CONFIG
 # This makes sure pkg.m4 is available.
@@ -76,8 +111,20 @@ AC_ARG_WITH([systemd],
        AS_HELP_STRING([--with-systemd], [Enable systemd support.])
 )
 
+AC_ARG_WITH([dbuspolicydir],
+       AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
+       [],
+       [with_dbuspolicydir=${sysconfdir}/dbus-1/system.d]
+)
+
+AC_ARG_WITH([dbussystemservicedir],
+       AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
+       [],
+       [with_dbussystemservicedir=${datadir}/dbus-1/system-services]
+)
+
 AS_IF([test "x$with_systemd" != "xno"],
-      [PKG_CHECK_MODULES(systemd, [libsystemd-daemon],
+      [PKG_CHECK_MODULES(systemd, [libsystemd],
       [have_systemd=yes], [have_systemd=no])],
       [have_systemd=no]
 )
@@ -104,11 +151,15 @@ AS_IF([test "x$have_systemd" = "xyes"],
 
 AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$have_systemd" = "xyes"])
 
+AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
+AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
+
 # ------------------------------------------------------------------------------
 
 AC_CONFIG_FILES([
        Makefile
        po/Makefile.in
+       src/collecty/__version__.py
 ])
 
 AC_OUTPUT
@@ -116,6 +167,8 @@ AC_MSG_RESULT([
        ${PACKAGE_NAME} ${VERSION}
 
        prefix:                 ${prefix}
+       D-Bus policy dir:       ${with_dbuspolicydir}
+       D-Bus system dir:       ${with_dbussystemservicedir}
 
        Systemd support         ${have_systemd}
        Generate man-pages:     ${have_manpages}