]> git.ipfire.org Git - pbs.git/blame - configure.ac
jobs: Update API
[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
85c6dc69
MT
47XGETTEXT="${XGETTEXT} --keyword=_:1,2 --keyword=N_:1,2 --no-location"
48
7c17bfff
MT
49GETTEXT_PACKAGE=pakfire-build-service
50AC_SUBST(GETTEXT_PACKAGE)
51
52AC_PROG_LN_S
53AC_PROG_MKDIR_P
54AC_PROG_SED
55
56# Python
b5831995 57AM_PATH_PYTHON([3.9])
7c17bfff 58
a2c89f4c
MT
59# pygmentize (from pygments)
60AC_CHECK_PROG(PYGMENTIZE, [pygmentize], [pygmentize])
61if test -z "${PYGMENTIZE}"; then
62 AC_MSG_ERROR([pygmentize is required])
63fi
64
73eadbe5
MT
65# SASSC
66AC_CHECK_PROG(SASSC, [sassc], [sassc])
67if test -z "${SASSC}"; then
68 AC_MSG_ERROR([sassc is required])
69fi
70
a72903c6
MT
71# uglifyjs
72AC_CHECK_PROG(UGLIFYJS, [uglifyjs], [uglifyjs])
73eadbe5 73if test -z "${UGLIFYJS}"; then
a72903c6 74 AC_MSG_ERROR([uglifyjs is required])
73eadbe5
MT
75fi
76
7c17bfff
MT
77save_LIBS="$LIBS"
78
79# pkg-config
80PKG_PROG_PKG_CONFIG
81# This makes sure pkg.m4 is available.
82m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
83
84# ------------------------------------------------------------------------------
85
004b47a2 86AX_PYTHON_MODULE([boto3], [fatal])
f927afd3 87AX_PYTHON_MODULE([kerberos], [fatal])
effcefe6 88AX_PYTHON_MODULE([location], [fatal])
b384ba48 89AX_PYTHON_MODULE([markdown], [fatal])
279c006d 90AX_PYTHON_MODULE([psycopg], [fatal])
9334c1a4 91AX_PYTHON_MODULE([psycopg_pool], [fatal])
a2c89f4c 92AX_PYTHON_MODULE([pygments], [fatal])
46fd52d1 93AX_PYTHON_MODULE([systemd.journal], [fatal])
effcefe6
MT
94
95# ------------------------------------------------------------------------------
96
7c17bfff
MT
97AC_ARG_WITH([systemd],
98 AS_HELP_STRING([--with-systemd], [Enable systemd support.])
99)
100
101AS_IF([test "x$with_systemd" != "xno"],
102 [PKG_CHECK_MODULES(systemd, [libsystemd],
103 [have_systemd=yes], [have_systemd=no])],
104 [have_systemd=no]
105)
106
107AS_IF([test "x$have_systemd" = "xyes"],
108 [AC_MSG_CHECKING([for systemd system unit directory])
109 AC_ARG_WITH([systemdsystemunitdir],
110 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
111 [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]
112 )
113
114 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
115
116 if test -n "$systemdsystemunitdir" -a "x$systemdsystemunitdir" != xno; then
117 AC_MSG_RESULT([$systemdsystemunitdir])
118 else
119 AC_MSG_ERROR([not found (try --with-systemdsystemunitdir)])
120 fi
121 ],
122 [AS_IF([test "x$with_systemd" = "xyes"],
123 [AC_MSG_ERROR([Systemd support is enabled but no systemd has been found.])
124 ])
125])
126
127AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$have_systemd" = "xyes"])
128
129# ------------------------------------------------------------------------------
130
131datadir="${datadir}/pakfire-build-service"
132localedir="${datadir}/translations"
133
134AC_CONFIG_FILES([
135 Makefile
136 po/Makefile.in
137 src/buildservice/__version__.py
138])
139
140AC_OUTPUT
141AC_MSG_RESULT([
142 ${PACKAGE_NAME} ${VERSION}
143
144 prefix: ${prefix}
145 sysconfdir: ${sysconfdir}
146
147 Systemd support ${have_systemd}
148])