]> git.ipfire.org Git - ipfire.org.git/blob - configure.ac
configure: Depend on jekyll for static pages
[ipfire.org.git] / configure.ac
1 AC_PREREQ([2.64])
2
3 AC_INIT([ipfire.org],
4 [000],
5 [michael.tremer@ipfire.org],
6 [ipfire.org],
7 [https://www.ipfire.org/])
8
9 AC_CONFIG_MACRO_DIR([m4])
10 AC_CONFIG_AUX_DIR([build-aux])
11
12 AC_PREFIX_DEFAULT([/usr])
13
14 AM_INIT_AUTOMAKE([
15 foreign
16 1.11
17 -Wall
18 -Wno-portability
19 silent-rules
20 tar-pax
21 subdir-objects
22 ])
23 AM_SILENT_RULES([yes])
24
25 AC_PROG_LN_S
26 AC_PROG_MKDIR_P
27 AC_PROG_SED
28
29 # Python
30 AM_PATH_PYTHON([3.11])
31
32 AX_PYTHON_MODULE([PIL], [fatal])
33 AX_PYTHON_MODULE([feedparser], [fatal])
34 AX_PYTHON_MODULE([html2text], [fatal])
35 AX_PYTHON_MODULE([iso3166], [fatal])
36 AX_PYTHON_MODULE([jsonschema], [fatal])
37 AX_PYTHON_MODULE([kerberos], [fatal])
38 AX_PYTHON_MODULE([ldap], [fatal])
39 AX_PYTHON_MODULE([magic], [fatal])
40 AX_PYTHON_MODULE([panoramisk], [fatal])
41 AX_PYTHON_MODULE([phonenumbers], [fatal])
42 AX_PYTHON_MODULE([psycopg], [fatal])
43 AX_PYTHON_MODULE([pycares], [fatal])
44 AX_PYTHON_MODULE([pynliner], [fatal])
45 AX_PYTHON_MODULE([redis.asyncio], [fatal])
46 AX_PYTHON_MODULE([tornado], [fatal])
47 AX_PYTHON_MODULE([zxcvbn], [fatal])
48
49 # sass
50 AC_CHECK_PROG(SASSC, [sassc], [sassc])
51 if test -z "${SASSC}"; then
52 AC_MSG_ERROR([sassc is required])
53 fi
54
55 # convert from ImageMagick
56 AC_CHECK_PROG(CONVERT, [convert], [convert])
57 if test -z "${CONVERT}"; then
58 AC_MSG_ERROR([convert is required])
59 fi
60
61 # ffmpeg
62 AC_CHECK_PROG(FFMPEG, [ffmpeg], [ffmpeg])
63 if test -z "${FFMPEG}"; then
64 AC_MSG_ERROR([ffmpeg is required])
65 fi
66
67 # jekyll
68 AC_CHECK_PROG(JEKYLL, [jekyll], [jekyll])
69 if test -z "${JEKYLL}"; then
70 AC_MSG_ERROR([jekyll is required])
71 fi
72
73 # ------------------------------------------------------------------------------
74
75 AC_ARG_WITH([systemd],
76 AS_HELP_STRING([--with-systemd], [Enable systemd support.])
77 )
78
79 AS_IF([test "x$with_systemd" != "xno"],
80 [PKG_CHECK_MODULES(systemd, [libsystemd],
81 [have_systemd=yes], [have_systemd=no])],
82 [have_systemd=no]
83 )
84
85 AS_IF([test "x$have_systemd" = "xyes"],
86 [AC_MSG_CHECKING([for systemd system unit directory])
87 AC_ARG_WITH([systemdsystemunitdir],
88 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
89 [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]
90 )
91
92 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
93
94 if test -n "$systemdsystemunitdir" -a "x$systemdsystemunitdir" != xno; then
95 AC_MSG_RESULT([$systemdsystemunitdir])
96 else
97 AC_MSG_ERROR([not found (try --with-systemdsystemunitdir)])
98 fi
99 ],
100 [AS_IF([test "x$with_systemd" = "xyes"],
101 [AC_MSG_ERROR([Systemd support is enabled but no systemd has been found.])
102 ])
103 ])
104
105 AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$have_systemd" = "xyes"])
106
107 datadir="${datadir}/ipfire.org"
108 localedir="${datadir}/translations"
109
110 AC_CONFIG_FILES([
111 Makefile
112 ])
113
114 AC_OUTPUT
115 AC_MSG_RESULT([
116 ${PACKAGE_NAME} ${VERSION}
117
118 prefix: ${prefix}
119 sysconfdir: ${sysconfdir}
120 datadir: ${datadir}
121 localedir: ${localedir}
122
123 systemd support ${have_systemd}
124 Python version: ${PYTHON_VERSION}
125 ])