]> git.ipfire.org Git - people/jschlag/pbs.git/blame - configure.ac
cli: Parse tornado options as well
[people/jschlag/pbs.git] / configure.ac
CommitLineData
7c17bfff
MT
1###############################################################################
2# #
3# Pakfire - The IPFire package management system #
4# Copyright (C) 2017 Pakfire 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([pakfire-build-service],
24 [2017.01],
25 [info@ipfire.org],
26 [pakfire-build-service],
27 [https://git.ipfire.org/?p=pbs.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=pakfire-build-service
48AC_SUBST(GETTEXT_PACKAGE)
49
50AC_PROG_LN_S
51AC_PROG_MKDIR_P
52AC_PROG_SED
53
54# Python
55AM_PATH_PYTHON([2.7])
56
57save_LIBS="$LIBS"
58
59# pkg-config
60PKG_PROG_PKG_CONFIG
61# This makes sure pkg.m4 is available.
62m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
63
64# ------------------------------------------------------------------------------
65
66AC_ARG_WITH([systemd],
67 AS_HELP_STRING([--with-systemd], [Enable systemd support.])
68)
69
70AS_IF([test "x$with_systemd" != "xno"],
71 [PKG_CHECK_MODULES(systemd, [libsystemd],
72 [have_systemd=yes], [have_systemd=no])],
73 [have_systemd=no]
74)
75
76AS_IF([test "x$have_systemd" = "xyes"],
77 [AC_MSG_CHECKING([for systemd system unit directory])
78 AC_ARG_WITH([systemdsystemunitdir],
79 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
80 [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]
81 )
82
83 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
84
85 if test -n "$systemdsystemunitdir" -a "x$systemdsystemunitdir" != xno; then
86 AC_MSG_RESULT([$systemdsystemunitdir])
87 else
88 AC_MSG_ERROR([not found (try --with-systemdsystemunitdir)])
89 fi
90 ],
91 [AS_IF([test "x$with_systemd" = "xyes"],
92 [AC_MSG_ERROR([Systemd support is enabled but no systemd has been found.])
93 ])
94])
95
96AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$have_systemd" = "xyes"])
97
98# ------------------------------------------------------------------------------
99
100datadir="${datadir}/pakfire-build-service"
101localedir="${datadir}/translations"
102
103AC_CONFIG_FILES([
104 Makefile
105 po/Makefile.in
106 src/buildservice/__version__.py
107])
108
109AC_OUTPUT
110AC_MSG_RESULT([
111 ${PACKAGE_NAME} ${VERSION}
112
113 prefix: ${prefix}
114 sysconfdir: ${sysconfdir}
115
116 Systemd support ${have_systemd}
117])