]> git.ipfire.org Git - collecty.git/blame - configure.ac
Bump version to 002
[collecty.git] / configure.ac
CommitLineData
2fc9f9a2
MT
1###############################################################################
2# #
3# collecty - The IPFire statictics collection daemon #
4# Copyright (C) 2015 collecty development team #
5# #
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. #
10# #
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. #
15# #
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/>. #
18# #
19###############################################################################
20
21AC_PREREQ([2.64])
22
23AC_INIT([collecty],
08e390fc 24 [002],
2fc9f9a2
MT
25 [info@ipfire.org],
26 [collecty],
27 [http://git.ipfire.org/?p=oddments/collecty.git;a=summary])
28
29AC_CONFIG_MACRO_DIR([m4])
30AC_CONFIG_AUX_DIR([build-aux])
31
32AC_PREFIX_DEFAULT([/usr])
33
34AM_INIT_AUTOMAKE([
35 foreign
36 1.11
37 -Wall
38 -Wno-portability
39 silent-rules
40 tar-pax
41 subdir-objects
42])
43AM_SILENT_RULES([yes])
44
45IT_PROG_INTLTOOL([0.40.0])
46
47GETTEXT_PACKAGE=collecty
48AC_SUBST(GETTEXT_PACKAGE)
49
50AC_PROG_LN_S
51AC_PROG_MKDIR_P
52AC_PROG_SED
53
54AC_PATH_PROG([XSLTPROC], [xsltproc])
55
56# Python
57AM_PATH_PYTHON([2.7])
58
59save_LIBS="$LIBS"
60
61# pkg-config
62PKG_PROG_PKG_CONFIG
63# This makes sure pkg.m4 is available.
64m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
65
66# ------------------------------------------------------------------------------
67have_manpages=no
68AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-man-pages],
69 [do not install man pages]))
70AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes])
71AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
72
73# ------------------------------------------------------------------------------
74
75AC_ARG_WITH([systemd],
76 AS_HELP_STRING([--with-systemd], [Enable systemd support.])
77)
78
c968f6d9
MT
79AC_ARG_WITH([dbuspolicydir],
80 AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
81 [],
82 [with_dbuspolicydir=${sysconfdir}/dbus-1/system.d]
83)
84
85AC_ARG_WITH([dbussystemservicedir],
86 AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
87 [],
88 [with_dbussystemservicedir=${datadir}/dbus-1/system-services]
89)
90
2fc9f9a2
MT
91AS_IF([test "x$with_systemd" != "xno"],
92 [PKG_CHECK_MODULES(systemd, [libsystemd-daemon],
93 [have_systemd=yes], [have_systemd=no])],
94 [have_systemd=no]
95)
96
97AS_IF([test "x$have_systemd" = "xyes"],
98 [AC_MSG_CHECKING([for systemd system unit directory])
99 AC_ARG_WITH([systemdsystemunitdir],
100 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
101 [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]
102 )
103
104 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
105
106 if test -n "$systemdsystemunitdir" -a "x$systemdsystemunitdir" != xno; then
107 AC_MSG_RESULT([$systemdsystemunitdir])
108 else
109 AC_MSG_ERROR([not found (try --with-systemdsystemunitdir)])
110 fi
111 ],
112 [AS_IF([test "x$with_systemd" = "xyes"],
113 [AC_MSG_ERROR([Systemd support is enabled but no systemd has been found.])
114 ])
115])
116
117AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$have_systemd" = "xyes"])
118
c968f6d9
MT
119AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
120AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
121
2fc9f9a2
MT
122# ------------------------------------------------------------------------------
123
124AC_CONFIG_FILES([
125 Makefile
126 po/Makefile.in
127])
128
129AC_OUTPUT
130AC_MSG_RESULT([
131 ${PACKAGE_NAME} ${VERSION}
132
133 prefix: ${prefix}
c968f6d9
MT
134 D-Bus policy dir: ${with_dbuspolicydir}
135 D-Bus system dir: ${with_dbussystemservicedir}
2fc9f9a2
MT
136
137 Systemd support ${have_systemd}
138 Generate man-pages: ${have_manpages}
139])