]>
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 | ||
9 | AC_CONFIG_AUX_DIR([build-aux]) | |
10 | ||
11 | AC_PREFIX_DEFAULT([/usr]) | |
12 | ||
13 | AM_INIT_AUTOMAKE([ | |
14 | foreign | |
15 | 1.11 | |
16 | -Wall | |
17 | -Wno-portability | |
18 | silent-rules | |
19 | tar-pax | |
20 | subdir-objects | |
21 | ]) | |
22 | AM_SILENT_RULES([yes]) | |
23 | ||
24 | AC_PROG_LN_S | |
25 | AC_PROG_MKDIR_P | |
26 | AC_PROG_SED | |
27 | ||
28 | # Python | |
77ac83e8 MT |
29 | AM_PATH_PYTHON([3.4]) |
30 | ||
3e8ee6a4 | 31 | # sass |
a292b0f8 | 32 | AC_CHECK_PROG(SASSC, [sassc], [sassc]) |
7ccbc261 MT |
33 | if test -z "${SASSC}"; then |
34 | AC_MSG_ERROR([sassc is required]) | |
35 | fi | |
a292b0f8 | 36 | |
662c7910 MT |
37 | # convert from ImageMagick |
38 | AC_CHECK_PROG(CONVERT, [convert], [convert]) | |
7ccbc261 MT |
39 | if test -z "${CONVERT}"; then |
40 | AC_MSG_ERROR([convert is required]) | |
41 | fi | |
662c7910 | 42 | |
a292b0f8 MT |
43 | # ------------------------------------------------------------------------------ |
44 | ||
45 | AC_ARG_WITH([systemd], | |
46 | AS_HELP_STRING([--with-systemd], [Enable systemd support.]) | |
47 | ) | |
48 | ||
49 | AS_IF([test "x$with_systemd" != "xno"], | |
50 | [PKG_CHECK_MODULES(systemd, [libsystemd], | |
51 | [have_systemd=yes], [have_systemd=no])], | |
52 | [have_systemd=no] | |
53 | ) | |
54 | ||
55 | AS_IF([test "x$have_systemd" = "xyes"], | |
56 | [AC_MSG_CHECKING([for systemd system unit directory]) | |
57 | AC_ARG_WITH([systemdsystemunitdir], | |
58 | AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), | |
59 | [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)] | |
60 | ) | |
61 | ||
62 | AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) | |
63 | ||
64 | if test -n "$systemdsystemunitdir" -a "x$systemdsystemunitdir" != xno; then | |
65 | AC_MSG_RESULT([$systemdsystemunitdir]) | |
66 | else | |
67 | AC_MSG_ERROR([not found (try --with-systemdsystemunitdir)]) | |
68 | fi | |
69 | ], | |
70 | [AS_IF([test "x$with_systemd" = "xyes"], | |
71 | [AC_MSG_ERROR([Systemd support is enabled but no systemd has been found.]) | |
72 | ]) | |
73 | ]) | |
74 | ||
75 | AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$have_systemd" = "xyes"]) | |
76 | ||
77 | datadir="${datadir}/ipfire.org" | |
78 | localedir="${datadir}/translations" | |
79 | ||
80 | AC_CONFIG_FILES([ | |
81 | Makefile | |
82 | ]) | |
83 | ||
84 | AC_OUTPUT | |
85 | AC_MSG_RESULT([ | |
86 | ${PACKAGE_NAME} ${VERSION} | |
87 | ||
88 | prefix: ${prefix} | |
89 | sysconfdir: ${sysconfdir} | |
90 | datadir: ${datadir} | |
91 | localedir: ${localedir} | |
92 | ||
93 | systemd support ${have_systemd} | |
11347e46 | 94 | Python version: ${PYTHON_VERSION} |
a292b0f8 | 95 | ]) |