]>
Commit | Line | Data |
---|---|---|
a292b0f8 MT |
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 | ||
a117acc2 | 9 | AC_CONFIG_MACRO_DIR([m4]) |
a292b0f8 MT |
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 | |
77ac83e8 MT |
30 | AM_PATH_PYTHON([3.4]) |
31 | ||
a117acc2 MT |
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([panoramisk], [fatal]) | |
40 | AX_PYTHON_MODULE([phonenumbers], [fatal]) | |
41 | AX_PYTHON_MODULE([psycopg], [fatal]) | |
42 | AX_PYTHON_MODULE([pycares], [fatal]) | |
43 | AX_PYTHON_MODULE([redis.asyncio], [fatal]) | |
44 | AX_PYTHON_MODULE([tornado], [fatal]) | |
45 | AX_PYTHON_MODULE([zxcvbn], [fatal]) | |
46 | ||
3e8ee6a4 | 47 | # sass |
a292b0f8 | 48 | AC_CHECK_PROG(SASSC, [sassc], [sassc]) |
7ccbc261 MT |
49 | if test -z "${SASSC}"; then |
50 | AC_MSG_ERROR([sassc is required]) | |
51 | fi | |
a292b0f8 | 52 | |
662c7910 MT |
53 | # convert from ImageMagick |
54 | AC_CHECK_PROG(CONVERT, [convert], [convert]) | |
7ccbc261 MT |
55 | if test -z "${CONVERT}"; then |
56 | AC_MSG_ERROR([convert is required]) | |
57 | fi | |
662c7910 | 58 | |
1f7a7927 MT |
59 | # ffmpeg |
60 | AC_CHECK_PROG(FFMPEG, [ffmpeg], [ffmpeg]) | |
61 | if test -z "${FFMPEG}"; then | |
62 | AC_MSG_ERROR([ffmpeg is required]) | |
63 | fi | |
64 | ||
a292b0f8 MT |
65 | # ------------------------------------------------------------------------------ |
66 | ||
67 | AC_ARG_WITH([systemd], | |
68 | AS_HELP_STRING([--with-systemd], [Enable systemd support.]) | |
69 | ) | |
70 | ||
71 | AS_IF([test "x$with_systemd" != "xno"], | |
72 | [PKG_CHECK_MODULES(systemd, [libsystemd], | |
73 | [have_systemd=yes], [have_systemd=no])], | |
74 | [have_systemd=no] | |
75 | ) | |
76 | ||
77 | AS_IF([test "x$have_systemd" = "xyes"], | |
78 | [AC_MSG_CHECKING([for systemd system unit directory]) | |
79 | AC_ARG_WITH([systemdsystemunitdir], | |
80 | AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), | |
81 | [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)] | |
82 | ) | |
83 | ||
84 | AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) | |
85 | ||
86 | if test -n "$systemdsystemunitdir" -a "x$systemdsystemunitdir" != xno; then | |
87 | AC_MSG_RESULT([$systemdsystemunitdir]) | |
88 | else | |
89 | AC_MSG_ERROR([not found (try --with-systemdsystemunitdir)]) | |
90 | fi | |
91 | ], | |
92 | [AS_IF([test "x$with_systemd" = "xyes"], | |
93 | [AC_MSG_ERROR([Systemd support is enabled but no systemd has been found.]) | |
94 | ]) | |
95 | ]) | |
96 | ||
97 | AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$have_systemd" = "xyes"]) | |
98 | ||
99 | datadir="${datadir}/ipfire.org" | |
100 | localedir="${datadir}/translations" | |
101 | ||
102 | AC_CONFIG_FILES([ | |
103 | Makefile | |
104 | ]) | |
105 | ||
106 | AC_OUTPUT | |
107 | AC_MSG_RESULT([ | |
108 | ${PACKAGE_NAME} ${VERSION} | |
109 | ||
110 | prefix: ${prefix} | |
111 | sysconfdir: ${sysconfdir} | |
112 | datadir: ${datadir} | |
113 | localedir: ${localedir} | |
114 | ||
115 | systemd support ${have_systemd} | |
11347e46 | 116 | Python version: ${PYTHON_VERSION} |
a292b0f8 | 117 | ]) |