]> git.ipfire.org Git - ipfire.org.git/blob - configure.ac
Merge remote-tracking branch 'rico/new-design' into new-design
[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 # ------------------------------------------------------------------------------
68
69 AC_ARG_WITH([systemd],
70 AS_HELP_STRING([--with-systemd], [Enable systemd support.])
71 )
72
73 AS_IF([test "x$with_systemd" != "xno"],
74 [PKG_CHECK_MODULES(systemd, [libsystemd],
75 [have_systemd=yes], [have_systemd=no])],
76 [have_systemd=no]
77 )
78
79 AS_IF([test "x$have_systemd" = "xyes"],
80 [AC_MSG_CHECKING([for systemd system unit directory])
81 AC_ARG_WITH([systemdsystemunitdir],
82 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
83 [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]
84 )
85
86 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
87
88 if test -n "$systemdsystemunitdir" -a "x$systemdsystemunitdir" != xno; then
89 AC_MSG_RESULT([$systemdsystemunitdir])
90 else
91 AC_MSG_ERROR([not found (try --with-systemdsystemunitdir)])
92 fi
93 ],
94 [AS_IF([test "x$with_systemd" = "xyes"],
95 [AC_MSG_ERROR([Systemd support is enabled but no systemd has been found.])
96 ])
97 ])
98
99 AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$have_systemd" = "xyes"])
100
101 datadir="${datadir}/ipfire.org"
102 localedir="${datadir}/translations"
103
104 AC_CONFIG_FILES([
105 Makefile
106 ])
107
108 AC_OUTPUT
109 AC_MSG_RESULT([
110 ${PACKAGE_NAME} ${VERSION}
111
112 prefix: ${prefix}
113 sysconfdir: ${sysconfdir}
114 datadir: ${datadir}
115 localedir: ${localedir}
116
117 systemd support ${have_systemd}
118 Python version: ${PYTHON_VERSION}
119 ])