]> git.ipfire.org Git - ipfire.org.git/blob - configure.ac
configure: Check for more python modules
[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.4])
31
32 # Python modules
33 AX_PYTHON_MODULE([hwdata],[])
34 AX_PYTHON_MODULE([iso3166],[])
35 AX_PYTHON_MODULE([ldap],[])
36 AX_PYTHON_MODULE([markdown2],[])
37 AX_PYTHON_MODULE([memcached],[])
38 AX_PYTHON_MODULE([psycopg2],[])
39 AX_PYTHON_MODULE([textile],[])
40 AX_PYTHON_MODULE([tornado],[])
41
42 # scss
43 AC_CHECK_PROG(SASSC, [sassc], [sassc])
44
45 # ------------------------------------------------------------------------------
46
47 AC_ARG_WITH([systemd],
48 AS_HELP_STRING([--with-systemd], [Enable systemd support.])
49 )
50
51 AS_IF([test "x$with_systemd" != "xno"],
52 [PKG_CHECK_MODULES(systemd, [libsystemd],
53 [have_systemd=yes], [have_systemd=no])],
54 [have_systemd=no]
55 )
56
57 AS_IF([test "x$have_systemd" = "xyes"],
58 [AC_MSG_CHECKING([for systemd system unit directory])
59 AC_ARG_WITH([systemdsystemunitdir],
60 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
61 [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]
62 )
63
64 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
65
66 if test -n "$systemdsystemunitdir" -a "x$systemdsystemunitdir" != xno; then
67 AC_MSG_RESULT([$systemdsystemunitdir])
68 else
69 AC_MSG_ERROR([not found (try --with-systemdsystemunitdir)])
70 fi
71 ],
72 [AS_IF([test "x$with_systemd" = "xyes"],
73 [AC_MSG_ERROR([Systemd support is enabled but no systemd has been found.])
74 ])
75 ])
76
77 AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$have_systemd" = "xyes"])
78
79 datadir="${datadir}/ipfire.org"
80 localedir="${datadir}/translations"
81
82 AC_CONFIG_FILES([
83 Makefile
84 ])
85
86 AC_OUTPUT
87 AC_MSG_RESULT([
88 ${PACKAGE_NAME} ${VERSION}
89
90 prefix: ${prefix}
91 sysconfdir: ${sysconfdir}
92 datadir: ${datadir}
93 localedir: ${localedir}
94
95 systemd support ${have_systemd}
96 Python version: ${PYTHON_VERSION}
97 ])