]> git.ipfire.org Git - people/ms/westferry.git/blame - configure.ac
system: Add proof-of-concept for automatic form data saving
[people/ms/westferry.git] / configure.ac
CommitLineData
4f357333
MT
1###############################################################################
2# #
3# Westferry - The IPFire web user interface #
4# Copyright (C) 2015 IPFire 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([westferry],
24 [001],
25 [info@ipfire.org],
26 [westferry],
27 [http://git.ipfire.org/?p=westferry.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=westferry
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([3.4])
58
942d841a
MT
59# SASSC
60AC_CHECK_PROG(SASSC, [sassc], [sassc])
61if test -z "${SASSC}"; then
62 AC_MSG_ERROR([sassc is required])
63fi
64
52b2d2ac
MT
65# uglifyjs.terser
66AC_CHECK_PROG(UGLIFYJS, [uglifyjs.terser], [uglifyjs.terser])
67
4f357333
MT
68save_LIBS="$LIBS"
69
70# pkg-config
71PKG_PROG_PKG_CONFIG
72# This makes sure pkg.m4 is available.
73m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
74
75# ------------------------------------------------------------------------------
76have_manpages=no
77AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-man-pages],
78 [do not install man pages]))
79AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes])
80AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
81
82# ------------------------------------------------------------------------------
83
84AC_ARG_WITH([systemd],
85 AS_HELP_STRING([--with-systemd], [Enable systemd support.])
86)
87
88AS_IF([test "x$with_systemd" != "xno"],
89 [PKG_CHECK_MODULES(systemd, [libsystemd],
90 [have_systemd=yes], [have_systemd=no])],
91 [have_systemd=no]
92)
93
94AS_IF([test "x$have_systemd" = "xyes"],
95 [AC_MSG_CHECKING([for systemd system unit directory])
96 AC_ARG_WITH([systemdsystemunitdir],
97 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
98 [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]
99 )
100
101 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
102
103 if test -n "$systemdsystemunitdir" -a "x$systemdsystemunitdir" != xno; then
104 AC_MSG_RESULT([$systemdsystemunitdir])
105 else
106 AC_MSG_ERROR([not found (try --with-systemdsystemunitdir)])
107 fi
108 ],
109 [AS_IF([test "x$with_systemd" = "xyes"],
110 [AC_MSG_ERROR([Systemd support is enabled but no systemd has been found.])
111 ])
112])
113
114AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$have_systemd" = "xyes"])
115
116# ------------------------------------------------------------------------------
117
118AC_CONFIG_FILES([
119 Makefile
120 po/Makefile.in
121 src/westferry/backend/__version__.py
122])
123
124AC_OUTPUT
125AC_MSG_RESULT([
126 ${PACKAGE_NAME} ${VERSION}
127
128 prefix: ${prefix}
129 sysconfdir: ${sysconfdir}
130
131 Systemd support ${have_systemd}
132 Generate man-pages: ${have_manpages}
133])