chiark / gitweb /
Add IFLA_VTI defines to missing.h
[elogind.git] / configure.ac
1 #
2 #  This file is part of systemd.
3 #
4 #  Copyright 2010-2012 Lennart Poettering
5 #  Copyright 2010-2012 Kay Sievers
6 #
7 #  systemd is free software; you can redistribute it and/or modify it
8 #  under the terms of the GNU Lesser General Public License as published by
9 #  the Free Software Foundation; either version 2.1 of the License, or
10 #  (at your option) any later version.
11 #
12 #  systemd is distributed in the hope that it will be useful, but
13 #  WITHOUT ANY WARRANTY; without even the implied warranty of
14 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 #  Lesser General Public License for more details.
16 #
17 #  You should have received a copy of the GNU Lesser General Public License
18 #  along with systemd; If not, see <http://www.gnu.org/licenses/>.
19
20 AC_PREREQ([2.64])
21
22 AC_INIT([systemd],
23         [215],
24         [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd],
25         [systemd],
26         [http://www.freedesktop.org/wiki/Software/systemd])
27
28 AC_CONFIG_SRCDIR([src/core/main.c])
29 AC_CONFIG_MACRO_DIR([m4])
30 AC_CONFIG_HEADERS([config.h])
31 AC_CONFIG_AUX_DIR([build-aux])
32
33 AC_USE_SYSTEM_EXTENSIONS
34 AC_SYS_LARGEFILE
35 AC_PREFIX_DEFAULT([/usr])
36 AM_MAINTAINER_MODE([enable])
37 AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects])
38 AM_SILENT_RULES([yes])
39 AC_CANONICAL_HOST
40 AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
41 AS_IF([test "x$host_cpu" = "xmips" || test "x$host_cpu" = "xmipsel" ||
42        test "x$host_cpu" = "xmips64" || test "x$host_cpu" = "xmips64el"],
43       [AC_DEFINE(ARCH_MIPS, [], [Whether on mips arch])])
44
45 LT_PREREQ(2.2)
46 LT_INIT([disable-static])
47
48 AS_IF([test "x$enable_static" = "xyes"], [AC_MSG_ERROR([--enable-static is not supported by systemd])])
49 AS_IF([test "x$enable_largefile" = "xno"], [AC_MSG_ERROR([--disable-largefile is not supported by systemd])])
50
51 # i18n stuff for the PolicyKit policy files
52
53 # Check whether intltool can be found, disable NLS otherwise
54 AC_CHECK_PROG(intltool_found, [intltool-merge], [yes], [no])
55 AS_IF([test x"$intltool_found" != xyes],
56       [AS_IF([test x"$enable_nls" = xyes],
57              [AC_MSG_ERROR([--enable-nls requested but intltool not found])],
58              [AS_IF([test x"$enable_nls" != xno],
59                     [AC_MSG_WARN([*** Disabling NLS support because intltool was not found])
60                      enable_nls=no])
61              ])
62       ])
63
64 AM_NLS
65 AS_IF([test x"$enable_nls" != xno], [
66     # intltoolize greps for '^(AC|IT)_PROG_INTLTOOL', so it needs to be on its own line
67 IT_PROG_INTLTOOL([0.40.0])
68 ])
69
70 AS_IF([test -z "$INTLTOOL_POLICY_RULE"], [
71     # If intltool is not available, provide a dummy rule to fail generation of %.policy files with a meaningful error message
72     INTLTOOL_POLICY_RULE='%.policy: %.policy.in ; @echo "  ITMRG   " $@ && echo "*** intltool support required to build target $@" && false'
73     AC_SUBST(INTLTOOL_POLICY_RULE)
74 ])
75
76 GETTEXT_PACKAGE=systemd
77 AC_SUBST(GETTEXT_PACKAGE)
78
79 AC_PROG_MKDIR_P
80 AC_PROG_LN_S
81 AC_PROG_SED
82 AC_PROG_GREP
83 AC_PROG_AWK
84
85 AC_PROG_CC_C99
86
87 AC_PATH_PROG([M4], [m4])
88 AC_PATH_PROG([XSLTPROC], [xsltproc])
89
90 AC_PATH_PROG([QUOTAON], [quotaon], [/usr/sbin/quotaon], [$PATH:/usr/sbin:/sbin])
91 AC_PATH_PROG([QUOTACHECK], [quotacheck], [/usr/sbin/quotacheck], [$PATH:/usr/sbin:/sbin])
92
93 AC_PATH_PROG([KILL], [kill], [/usr/bin/kill], [$PATH:/usr/sbin:/sbin])
94
95 AC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod], [$PATH:/usr/sbin:/sbin])
96
97 AC_PATH_PROG([KEXEC], [kexec], [/usr/sbin/kexec], [$PATH:/usr/sbin:/sbin])
98
99 AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
100
101 M4_DEFINES=
102
103 # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
104 m4_ifdef([GTK_DOC_CHECK], [
105 GTK_DOC_CHECK([1.18],[--flavour no-tmpl])],
106          [AM_CONDITIONAL([ENABLE_GTK_DOC], [false])
107           enable_gtk_doc=no])
108
109 AS_IF([test "x$enable_gtk_doc" = "xyes" -a "x$XSLTPROC" = x], [
110         AC_MSG_ERROR([*** GTK doc requested but xsltproc not found])
111 ])
112
113 m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [
114 GOBJECT_INTROSPECTION_CHECK([1.31.1])
115 ], [
116    AM_CONDITIONAL([HAVE_INTROSPECTION], [false])
117    enable_introspection=no])
118
119 AC_CHECK_TOOL(STRINGS, strings)
120 AC_CHECK_TOOL(GPERF, gperf)
121 if test -z "$GPERF" ; then
122         AC_MSG_ERROR([*** gperf not found])
123 fi
124
125 # ------------------------------------------------------------------------------
126 address_sanitizer_cflags=
127 address_sanitizer_cppflags=
128 address_sanitizer_ldflags=
129 AC_ARG_ENABLE(address-sanitizer, AS_HELP_STRING([--enable-address-sanitizer], [enable -fsanitize=address]))
130 AS_IF([test "x$enable_address_sanitizer" = "xyes"], [
131             CC_CHECK_FLAG_APPEND([with_as_cflags], [CFLAGS], [-fsanitize=address])
132             AS_IF([test -z "$with_as_cflags"],
133                   [AC_MSG_ERROR([*** -fsanitize=address is not supported])])
134             address_sanitizer_cflags="$with_as_cflags -fno-omit-frame-pointer -DVALGRIND=1"
135             address_sanitizer_cppflags="-DVALGRIND=1"
136             address_sanitizer_ldflags="-Wc,-fsanitize=address"
137       ])
138
139 undefined_sanitizer_cflags=
140 undefined_sanitizer_cppflags=
141 undefined_sanitizer_ldflags=
142 AC_ARG_ENABLE(undefined-sanitizer, AS_HELP_STRING([--enable-undefined-sanitizer], [enable -fsanitize=undefined]))
143 AS_IF([test "x$enable_undefined_sanitizer" = "xyes"], [
144             CC_CHECK_FLAG_APPEND([with_us_cflags], [CFLAGS], [-fsanitize=undefined])
145             AS_IF([test -z "$with_us_cflags"],
146                   [AC_MSG_ERROR([*** -fsanitize=undefined is not supported])])
147             undefined_sanitizer_cflags="$with_us_cflags -fno-omit-frame-pointer -DVALGRIND=1"
148             undefined_sanitizer_cppflags="-DVALGRIND=1"
149             undefined_sanitizer_ldflags="-Wc,-fsanitize=undefined"
150       ])
151
152 sanitizer_cflags="$address_sanitizer_cflags $undefined_sanitizer_cflags"
153 sanitizer_cppflags="$address_sanitizer_cppflags $undefined_sanitizer_cppflags"
154 sanitizer_ldflags="$address_sanitizer_ldflags $undefined_sanitizer_ldflags"
155
156 CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
157         -pipe \
158         -Wall \
159         -Wextra \
160         -Wno-inline \
161         -Wundef \
162         "-Wformat=2 -Wformat-security -Wformat-nonliteral" \
163         -Wlogical-op \
164         -Wsign-compare \
165         -Wmissing-include-dirs \
166         -Wold-style-definition \
167         -Wpointer-arith \
168         -Winit-self \
169         -Wdeclaration-after-statement \
170         -Wfloat-equal \
171         -Wsuggest-attribute=noreturn \
172         -Wmissing-prototypes \
173         -Wstrict-prototypes \
174         -Wredundant-decls \
175         -Wmissing-declarations \
176         -Wmissing-noreturn \
177         -Wshadow \
178         -Wendif-labels \
179         -Wstrict-aliasing=2 \
180         -Wwrite-strings \
181         -Wno-long-long \
182         -Wno-overlength-strings \
183         -Wno-unused-parameter \
184         -Wno-missing-field-initializers \
185         -Wno-unused-result \
186         -Werror=overflow \
187         -Wdate-time \
188         -Wnested-externs \
189         -ffast-math \
190         -fno-common \
191         -fdiagnostics-show-option \
192         -fdiagnostics-color \
193         -fno-strict-aliasing \
194         -fvisibility=hidden \
195         -ffunction-sections \
196         -fdata-sections \
197         -fstack-protector \
198         -fstack-protector-strong \
199         -fPIE \
200         --param=ssp-buffer-size=4])
201 AS_CASE([$CFLAGS], [*-O[[12345\ ]]*],
202         [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
203                -flto -ffat-lto-objects])],
204         [AC_MSG_RESULT([skipping -flto, optimization not enabled])])
205 AC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
206
207 AS_CASE([$CFLAGS], [*-O[[12345\ ]]*],
208         [CC_CHECK_FLAGS_APPEND([with_cppflags], [CPPFLAGS], [\
209                -Wp,-D_FORTIFY_SOURCE=2])],
210         [AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
211 AC_SUBST([OUR_CPPFLAGS], "$with_cppflags $sanitizer_cppflags")
212
213 CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
214         -Wl,--as-needed \
215         -Wl,--no-undefined \
216         -Wl,--gc-sections \
217         -Wl,-z,relro \
218         -Wl,-z,now \
219         -pie \
220         -Wl,-fuse-ld=gold])
221 AC_SUBST([OUR_LDFLAGS], "$with_ldflags $sanitizer_ldflags")
222
223 AC_CHECK_SIZEOF(pid_t)
224 AC_CHECK_SIZEOF(uid_t)
225 AC_CHECK_SIZEOF(gid_t)
226 AC_CHECK_SIZEOF(time_t)
227 AC_CHECK_SIZEOF(rlim_t,,[
228        #include <sys/time.h>
229        #include <sys/resource.h>
230 ])
231
232 # ------------------------------------------------------------------------------
233 # we use python to build the man page index, and for systemd-python
234 have_python=no
235 AC_ARG_WITH([python],
236         [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])])
237
238 have_lxml=no
239 AS_IF([test "x$with_python" != "xno"], [
240         AM_PATH_PYTHON(,, [:])
241         AS_IF([test "x$PYTHON" != "x:"], [
242                 AC_MSG_CHECKING([for python lxml module])
243                 AS_IF(["$PYTHON" -c 'import lxml' 2>/dev/null], [have_lxml=yes])
244                 AC_MSG_RESULT([$have_lxml])
245                 AS_IF([test "x$have_lxml" = "xyes"], [have_python=yes],
246                       [AC_MSG_WARN([*** python support requires python-lxml module installed])])
247         ])
248 ])
249 AS_IF([test "$have_python" != "yes"], [
250       AS_IF([test "$with_python" = "yes"],
251             [AC_MSG_ERROR([*** python support requested but python support not found])])
252       AS_IF([test "$with_python" != "no"],
253             [AC_MSG_WARN([*** python support not found, some documentation cannot be built])])
254 ])
255
256 AM_CONDITIONAL([HAVE_PYTHON], [test "x$have_python" = "xyes"])
257 AS_IF([test "x$PYTHON_BINARY" = "x"],
258       [AS_IF([test "x$have_python" = "xyes"],
259              [PYTHON_BINARY="$(which "$PYTHON")"],
260              [PYTHON_BINARY=/usr/bin/python])])
261 AC_ARG_VAR(PYTHON_BINARY, [Python binary used to launch installed scripts])
262
263 AS_IF([test "x$have_python" != "xyes" -a "x$enable_python_devel" = "xyes"],
264       [AC_MSG_ERROR([*** python-devel support requires --with-python])])
265
266 have_python_devel=no
267 AC_ARG_ENABLE(python_devel, AS_HELP_STRING([--disable-python-devel], [Do not build python modules]))
268 AS_IF([test "x$have_python" = "xyes" -a "x$enable_python_devel" != "xno"], [
269       PKG_CHECK_MODULES([PYTHON_DEVEL], [python-${PYTHON_VERSION}],
270             [have_python_devel=yes],
271             [PKG_CHECK_MODULES([PYTHON_DEVEL], [python],
272                   [have_python_devel=yes],
273                   [have_python_devel=no])])
274       AS_IF([test "x$have_python_devel" = xno -a "x$enable_python_devel" = xyes],
275             [AC_MSG_ERROR([*** python-devel support requested but libraries not found])])
276       AC_PATH_PROGS(SPHINX_BUILD, sphinx-build-${PYTHON_VERSION} sphinx-build)
277 ])
278 AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"])
279
280 # ------------------------------------------------------------------------------
281
282 AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
283 AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers not found])])
284 AC_CHECK_HEADERS([linux/btrfs.h], [], [])
285
286 # unconditionally pull-in librt with old glibc versions
287 AC_SEARCH_LIBS([clock_gettime], [rt], [], [])
288
289 save_LIBS="$LIBS"
290 LIBS=
291 AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
292 CAP_LIBS="$LIBS"
293 AC_SUBST(CAP_LIBS)
294
295 LIBS=
296 AC_SEARCH_LIBS([mq_open], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])])
297 RT_LIBS="$LIBS"
298 AC_SUBST(RT_LIBS)
299 LIBS="$save_LIBS"
300
301 AC_CHECK_FUNCS([fanotify_init fanotify_mark])
302 AC_CHECK_FUNCS([__secure_getenv secure_getenv])
303 AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, LO_FLAGS_PARTSCAN],
304                [], [], [[
305 #include <sys/types.h>
306 #include <unistd.h>
307 #include <sys/mount.h>
308 #include <fcntl.h>
309 #include <sched.h>
310 #include <linux/loop.h>
311 ]])
312
313 AC_CHECK_DECLS([IFLA_MACVLAN_FLAGS,
314                 IFLA_VTI_REMOTE,
315                 IFLA_PHYS_PORT_ID,
316                 IFLA_BOND_AD_INFO,
317                 IFLA_VLAN_PROTOCOL,
318                 IFLA_VXLAN_LOCAL6,
319                 IFLA_IPTUN_6RD_RELAY_PREFIXLEN,
320                 IFLA_BRIDGE_VLAN_INFO],
321 [], [], [[
322 #include <inttypes.h>
323 #include <netinet/in.h>
324 #include <netinet/ether.h>
325 #include <linux/rtnetlink.h>
326 #include <net/if.h>
327 #include <linux/ip.h>
328 #include <linux/if_tunnel.h>
329 #include <linux/if_link.h>
330 #include <linux/if_bridge.h>
331 ]])
332
333 # This makes sure pkg.m4 is available.
334 m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
335
336 # ------------------------------------------------------------------------------
337 have_dbus=no
338 AC_ARG_ENABLE(dbus, AS_HELP_STRING([--disable-dbus], [disable usage of dbus-1 in tests]))
339 AS_IF([test "x$enable_dbus" != "xno"], [
340         PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2],
341                 [AC_DEFINE(HAVE_DBUS, 1, [Define if dbus-1 library is available]) have_dbus=yes],
342                 [have_dbus=no])
343         AS_IF([test "x$have_dbus" = "xno" -a "x$enable_dbus" = "xyes"],
344                 [AC_MSG_ERROR([*** dbus-1 support requested but libraries not found])])])
345 AM_CONDITIONAL(HAVE_DBUS, [test "$have_dbus" = "yes"])
346
347 # ------------------------------------------------------------------------------
348 have_compat_libs=no
349 AC_ARG_ENABLE([compat_libs], AS_HELP_STRING([--enable-compat-libs],[Enable creation of compatibility libraries]),
350                 [case "${enableval}" in
351                         yes) have_compat_libs=yes ;;
352                         no) have_compat_libs=no ;;
353                         *) AC_MSG_ERROR(bad value ${enableval} for --enable-compat-libs) ;;
354                 esac],
355                 [have_compat_libs=no])
356 AM_CONDITIONAL([ENABLE_COMPAT_LIBS], [test "$have_compat_libs" = "yes"])
357
358 # ------------------------------------------------------------------------------
359 have_coverage=no
360 AC_ARG_ENABLE(coverage, AS_HELP_STRING([--enable-coverage], [enable test coverage]))
361 if test "x$enable_coverage" = "xyes" ; then
362         AC_CHECK_PROG(lcov_found, [lcov], [yes], [no])
363         if test "x$lcov_found" = xno ; then
364                 AC_MSG_ERROR([*** lcov support requested but the program was not found])
365         else
366                 lcov_version_major="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 1`"
367                 lcov_version_minor="`lcov --version | cut -d ' ' -f 4 | cut -d '.' -f 2`"
368                 if test "$lcov_version_major" -eq 1 -a "$lcov_version_minor" -lt 10; then
369                         AC_MSG_ERROR([*** lcov version is too old. 1.10 required])
370                 else
371                         have_coverage=yes
372                         CC_CHECK_FLAGS_APPEND([with_coverage_cflags], [CFLAGS], [\
373                         -fprofile-arcs \
374                         -ftest-coverage])
375                         AC_SUBST([OUR_CFLAGS], "$with_cflags $with_coverage_cflags")
376                 fi
377         fi
378 fi
379 AM_CONDITIONAL(ENABLE_COVERAGE, [test "$have_coverage" = "yes"])
380
381 # ------------------------------------------------------------------------------
382 have_kmod=no
383 AC_ARG_ENABLE(kmod, AS_HELP_STRING([--disable-kmod], [disable loadable modules support]))
384 if test "x$enable_kmod" != "xno"; then
385         PKG_CHECK_EXISTS([ libkmod ], have_kmod=yes, have_kmod=no)
386         if test "x$have_kmod" = "xyes"; then
387                 PKG_CHECK_MODULES(KMOD, [ libkmod >= 15 ],
388                         [AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is available])],
389                         AC_MSG_ERROR([*** kmod version >= 15 not found]))
390         fi
391         if test "x$have_kmod" = xno -a "x$enable_kmod" = xyes; then
392                 AC_MSG_ERROR([*** kmod support requested, but libraries not found])
393         fi
394 fi
395 AM_CONDITIONAL(HAVE_KMOD, [test "$have_kmod" = "yes"])
396
397 # ------------------------------------------------------------------------------
398 have_blkid=no
399 AC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [disable blkid support]))
400 if test "x$enable_blkid" != "xno"; then
401         PKG_CHECK_MODULES(BLKID, [ blkid >= 2.20 ],
402                 [AC_DEFINE(HAVE_BLKID, 1, [Define if blkid is available]) have_blkid=yes], have_blkid=no)
403         if test "x$have_blkid" = xno -a "x$enable_blkid" = xyes; then
404                 AC_MSG_ERROR([*** blkid support requested but libraries not found])
405         fi
406 fi
407 AM_CONDITIONAL(HAVE_BLKID, [test "$have_blkid" = "yes"])
408
409 # ------------------------------------------------------------------------------
410 have_seccomp=no
411 AC_ARG_ENABLE(seccomp, AS_HELP_STRING([--disable-seccomp], [Disable optional SECCOMP support]))
412 if test "x$enable_seccomp" != "xno"; then
413         PKG_CHECK_MODULES(SECCOMP, [libseccomp >= 1.0.0],
414                [AC_DEFINE(HAVE_SECCOMP, 1, [Define if seccomp is available])
415                 have_seccomp=yes
416                 M4_DEFINES="$M4_DEFINES -DHAVE_SECCOMP"],
417                [have_seccomp=no])
418         if test "x$have_seccomp" = "xno" -a "x$enable_seccomp" = "xyes"; then
419                 AC_MSG_ERROR([*** seccomp support requested but libraries not found])
420         fi
421 fi
422 AM_CONDITIONAL(HAVE_SECCOMP, [test "$have_seccomp" = "yes"])
423
424 # ------------------------------------------------------------------------------
425 have_ima=yes
426 AC_ARG_ENABLE([ima], AS_HELP_STRING([--disable-ima],[Disable optional IMA support]),
427                 [case "${enableval}" in
428                         yes) have_ima=yes ;;
429                         no) have_ima=no ;;
430                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-ima) ;;
431                 esac],
432                 [have_ima=yes])
433
434 if test "x${have_ima}" != xno ; then
435         AC_DEFINE(HAVE_IMA, 1, [Define if IMA is available])
436 fi
437
438 # ------------------------------------------------------------------------------
439 have_chkconfig=yes
440 AC_ARG_ENABLE([chkconfig], AS_HELP_STRING([--disable-chkconfig],[Disable optional chkconfig support]),
441                 [case "${enableval}" in
442                         yes) have_chkconfig=yes ;;
443                         no) have_chkconfig=no ;;
444                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-chkconfig) ;;
445                 esac],
446                 [AC_PATH_PROG(CHKCONFIG, chkconfig)
447                 if test -z "$CHKCONFIG"; then
448                         have_chkconfig=no
449                 else
450                         have_chkconfig=yes
451                 fi])
452
453 if test "x${have_chkconfig}" != xno ; then
454         AC_DEFINE(HAVE_CHKCONFIG, 1, [Define if CHKCONFIG is available])
455 fi
456
457 # ------------------------------------------------------------------------------
458 have_selinux=no
459 AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
460 if test "x$enable_selinux" != "xno"; then
461         PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.1.9],
462                 [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available])
463                  have_selinux=yes
464                  M4_DEFINES="$M4_DEFINES -DHAVE_SELINUX"],
465                 [have_selinux=no])
466         if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
467                 AC_MSG_ERROR([*** SELinux support requested but libraries not found])
468         fi
469 fi
470 AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
471
472 have_apparmor=no
473 AC_ARG_ENABLE(apparmor, AS_HELP_STRING([--disable-apparmor], [Disable optional AppArmor support]))
474 if test "x$enable_apparmor" != "xno"; then
475         PKG_CHECK_MODULES([APPARMOR], [libapparmor],
476                 [AC_DEFINE(HAVE_APPARMOR, 1, [Define if AppArmor is available])
477                  have_apparmor=yes
478                  M4_DEFINES="$M4_DEFINES -DHAVE_APPARMOR"],
479                 [have_apparmor=no])
480         if test "x$have_apparmor" = xno -a "x$enable_apparmor" = xyes; then
481                 AC_MSG_ERROR([*** AppArmor support requested but libraries not found])
482         fi
483 fi
484 AM_CONDITIONAL(HAVE_APPARMOR, [test "$have_apparmor" = "yes"])
485
486
487 AC_ARG_WITH(debug-shell,
488         AS_HELP_STRING([--with-debug-shell=PATH],
489                 [Path to debug shell binary]),
490         [SUSHELL="$withval"],[
491         AS_IF([test "x${have_selinux}" != "xno"], [SUSHELL="/sbin/sushell"] , [SUSHELL="/bin/sh"])])
492
493 AC_SUBST(SUSHELL)
494
495 AC_ARG_WITH([debug-tty],
496         AS_HELP_STRING([--with-debug-tty=PATH],
497                 [Specify the tty device for debug shell]),
498         [DEBUGTTY="$withval"],
499         [DEBUGTTY=/dev/tty9])
500
501 AC_SUBST(DEBUGTTY)
502
503 AC_ARG_WITH([certificate-root],
504         AS_HELP_STRING([--with-certificate-root=PATH],
505                 [Specify the prefix for TLS certificates [/etc/ssl]]),
506         [CERTIFICATEROOT="$withval"],
507         [CERTIFICATEROOT="/etc/ssl"])
508
509 AC_SUBST(CERTIFICATEROOT)
510
511 # ------------------------------------------------------------------------------
512 have_xz=no
513 AC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support]))
514 if test "x$enable_xz" != "xno"; then
515         PKG_CHECK_MODULES(XZ, [ liblzma ],
516                 [AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes])
517         if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then
518                 AC_MSG_ERROR([*** XZ support requested but libraries not found])
519         fi
520 fi
521 AM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"])
522
523 # ------------------------------------------------------------------------------
524 have_lz4=no
525 AC_ARG_ENABLE(lz4, AS_HELP_STRING([--enable-lz4], [Enable optional LZ4 support]))
526 AS_IF([test "x$enable_lz4" == "xyes"], [
527         AC_CHECK_HEADERS(lz4.h,
528                [AC_DEFINE(HAVE_LZ4, 1, [Define in LZ4 is available]) have_lz4=yes],
529                [AC_MSG_ERROR([*** LZ4 support requested but headers not found])])
530 ])
531 AM_CONDITIONAL(HAVE_LZ4, [test "$have_lz4" = "yes"])
532
533 AM_CONDITIONAL(HAVE_COMPRESSION, [test "$have_xz" = "yes" -o "$have_lz4" = "yes"])
534
535 # ------------------------------------------------------------------------------
536 AC_ARG_ENABLE([pam],
537         AS_HELP_STRING([--disable-pam],[Disable optional PAM support]),
538                 [case "${enableval}" in
539                         yes) have_pam=yes ;;
540                         no) have_pam=no ;;
541                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-pam) ;;
542                 esac],
543                 [have_pam=auto])
544
545 if test "x${have_pam}" != xno ; then
546         AC_CHECK_HEADERS(
547                 [security/pam_modules.h security/pam_modutil.h security/pam_ext.h],
548                 [have_pam=yes],
549                 [if test "x$have_pam" = xyes ; then
550                         AC_MSG_ERROR([*** PAM headers not found.])
551                 fi])
552
553         AC_CHECK_LIB(
554                 [pam],
555                 [pam_syslog],
556                 [have_pam=yes],
557                 [if test "x$have_pam" = xyes ; then
558                         AC_MSG_ERROR([*** libpam not found.])
559                 fi])
560
561         if test "x$have_pam" = xyes ; then
562                 PAM_LIBS="-lpam -lpam_misc"
563                 AC_DEFINE(HAVE_PAM, 1, [PAM available])
564                 M4_DEFINES="$M4_DEFINES -DHAVE_PAM"
565         else
566                 have_pam=no
567         fi
568 else
569         PAM_LIBS=
570 fi
571 AC_SUBST(PAM_LIBS)
572 AM_CONDITIONAL([HAVE_PAM], [test "x$have_pam" != xno])
573
574 # ------------------------------------------------------------------------------
575 AC_ARG_ENABLE([acl],
576         AS_HELP_STRING([--disable-acl],[Disable optional ACL support]),
577                 [case "${enableval}" in
578                         yes) have_acl=yes ;;
579                         no) have_acl=no ;;
580                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-acl) ;;
581                 esac],
582                 [have_acl=auto])
583
584 if test "x${have_acl}" != xno ; then
585         AC_CHECK_HEADERS(
586                 [sys/acl.h acl/libacl.h],
587                 [have_acl=yes],
588                 [if test "x$have_acl" = xyes ; then
589                         AC_MSG_ERROR([*** ACL headers not found.])
590                 fi])
591
592         AC_CHECK_LIB(
593                 [acl],
594                 [acl_get_file],
595                 [have_acl=yes],
596                 [if test "x$have_acl" = xyes ; then
597                         AC_MSG_ERROR([*** libacl not found.])
598                 fi])
599
600         if test "x$have_acl" = xyes ; then
601                 ACL_LIBS="-lacl"
602                 AC_DEFINE(HAVE_ACL, 1, [ACL available])
603         else
604                 have_acl=no
605         fi
606 else
607         ACL_LIBS=
608 fi
609 AC_SUBST(ACL_LIBS)
610 AM_CONDITIONAL([HAVE_ACL], [test "x$have_acl" != xno])
611
612 # ------------------------------------------------------------------------------
613 AC_ARG_ENABLE([smack], AS_HELP_STRING([--disable-smack],[Disable optional SMACK support]),
614                 [case "${enableval}" in
615                         yes) have_smack=yes ;;
616                         no) have_smack=no ;;
617                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-smack) ;;
618                 esac],
619                 [have_smack=auto])
620
621 if test "x${have_smack}" = xauto; then
622         M4_DEFINES="$M4_DEFINES -DHAVE_SMACK"
623         have_smack=yes
624 fi
625
626 AC_ARG_WITH(smack-run-label,
627 AS_HELP_STRING([--with-smack-run-label=STRING],
628         [run systemd --system with a specific SMACK label]),
629         [AC_DEFINE_UNQUOTED(SMACK_RUN_LABEL, ["$withval"], [Run with a smack label])],
630         [])
631
632 if test "x${have_smack}" = xyes ; then
633         AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available])
634 fi
635
636 # ------------------------------------------------------------------------------
637 AC_ARG_ENABLE([gcrypt],
638         AS_HELP_STRING([--disable-gcrypt],[Disable optional GCRYPT support]),
639                 [case "${enableval}" in
640                         yes) have_gcrypt=yes ;;
641                         no) have_gcrypt=no ;;
642                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-gcrypt) ;;
643                 esac],
644                 [have_gcrypt=auto])
645
646 if test "x${have_gcrypt}" != xno ; then
647         AM_PATH_LIBGCRYPT(
648                 [1.4.5],
649                 [have_gcrypt=yes],
650                 [if test "x$have_gcrypt" = xyes ; then
651                         AC_MSG_ERROR([*** GCRYPT headers not found.])
652                 fi])
653
654         if test "x$have_gcrypt" = xyes ; then
655                 GCRYPT_LIBS="$LIBGCRYPT_LIBS"
656                 GCRYPT_CFLAGS="$LIBGCRYPT_CFLAGS"
657                 AC_DEFINE(HAVE_GCRYPT, 1, [GCRYPT available])
658         else
659                 have_gcrypt=no
660         fi
661 else
662         GCRYPT_LIBS=
663         GCRYPT_CFLAGS=
664 fi
665 AC_SUBST(GCRYPT_LIBS)
666 AC_SUBST(GCRYPT_CFLAGS)
667 AM_CONDITIONAL([HAVE_GCRYPT], [test "x$have_gcrypt" != xno])
668
669 # ------------------------------------------------------------------------------
670 AC_ARG_ENABLE([audit],
671         AS_HELP_STRING([--disable-audit],[Disable optional AUDIT support]),
672                 [case "${enableval}" in
673                         yes) have_audit=yes ;;
674                         no) have_audit=no ;;
675                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-audit) ;;
676                 esac],
677                 [have_audit=auto])
678
679 if test "x${have_audit}" != xno ; then
680         AC_CHECK_HEADERS(
681                 [libaudit.h],
682                 [have_audit=yes],
683                 [if test "x$have_audit" = xyes ; then
684                         AC_MSG_ERROR([*** AUDIT headers not found.])
685                 fi])
686
687         AC_CHECK_LIB(
688                 [audit],
689                 [audit_open],
690                 [have_audit=yes],
691                 [if test "x$have_audit" = xyes ; then
692                         AC_MSG_ERROR([*** libaudit not found.])
693                 fi])
694
695         if test "x$have_audit" = xyes ; then
696                 AUDIT_LIBS="-laudit"
697                 AC_DEFINE(HAVE_AUDIT, 1, [AUDIT available])
698         else
699                 have_audit=no
700         fi
701 else
702         AUDIT_LIBS=
703 fi
704 AC_SUBST(AUDIT_LIBS)
705
706 # ------------------------------------------------------------------------------
707 AC_ARG_ENABLE([elfutils],
708         AS_HELP_STRING([--disable-elfutils],[Disable optional ELFUTILS support]),
709                 [case "${enableval}" in
710                         yes) have_elfutils=yes ;;
711                         no) have_elfutils=no ;;
712                         *) AC_MSG_ERROR(bad value ${enableval} for --disable-elfutils) ;;
713                 esac],
714                 [have_elfutils=auto])
715
716 if test "x${have_elfutils}" != xno ; then
717         AC_CHECK_HEADERS(
718                 [elfutils/libdwfl.h],
719                 [],
720                 [if test "x$have_elfutils" = xyes ; then
721                         AC_MSG_ERROR([*** ELFUTILS headers not found.])
722                 fi])
723
724         AC_CHECK_LIB(
725                 [dw],
726                 [dwfl_begin],
727                 [],
728                 [if test "x$have_elfutils" = xyes ; then
729                         AC_MSG_ERROR([*** ELFUTILS libs not found.])
730                 fi])
731
732         AC_CHECK_LIB(
733                 [dw],
734                 [dwfl_core_file_attach],
735                 [have_elfutils=yes],
736                 [if test "x$have_elfutils" = xyes ; then
737                         AC_MSG_ERROR([*** ELFUTILS >= 158 is required.])
738                 fi])
739
740         if test "x$have_elfutils" = xyes ; then
741                 ELFUTILS_LIBS="-lelf -ldw"
742                 AC_DEFINE(HAVE_ELFUTILS, 1, [ELFUTILS available])
743         else
744                 have_elfutils=no
745         fi
746 else
747         ELFUTILS_LIBS=
748 fi
749 AC_SUBST(ELFUTILS_LIBS)
750 AM_CONDITIONAL(HAVE_ELFUTILS, [test "$have_elfutils" = "yes"])
751
752 # ------------------------------------------------------------------------------
753 have_libcryptsetup=no
754 AC_ARG_ENABLE(libcryptsetup, AS_HELP_STRING([--disable-libcryptsetup], [disable libcryptsetup tools]))
755 if test "x$enable_libcryptsetup" != "xno"; then
756         PKG_CHECK_MODULES(LIBCRYPTSETUP, [ libcryptsetup >= 1.6.0 ],
757                 [AC_DEFINE(HAVE_LIBCRYPTSETUP, 1, [Define if libcryptsetup is available]) have_libcryptsetup=yes], have_libcryptsetup=no)
758         if test "x$have_libcryptsetup" = xno -a "x$enable_libcryptsetup" = xyes; then
759                 AC_MSG_ERROR([*** libcryptsetup support requested but libraries not found])
760         fi
761 fi
762 AM_CONDITIONAL(HAVE_LIBCRYPTSETUP, [test "$have_libcryptsetup" = "yes"])
763
764 # ------------------------------------------------------------------------------
765 have_qrencode=no
766 AC_ARG_ENABLE(qrencode, AS_HELP_STRING([--disable-qrencode], [disable qrencode support]))
767 if test "x$enable_qrencode" != "xno"; then
768         PKG_CHECK_MODULES(QRENCODE, [ libqrencode ],
769                 [AC_DEFINE(HAVE_QRENCODE, 1, [Define if qrencode is available]) have_qrencode=yes], have_qrencode=no)
770         if test "x$have_qrencode" = xno -a "x$enable_qrencode" = xyes; then
771                 AC_MSG_ERROR([*** qrencode support requested but libraries not found])
772         fi
773 fi
774 AM_CONDITIONAL(HAVE_QRENCODE, [test "$have_qrencode" = "yes"])
775
776 # ------------------------------------------------------------------------------
777 have_microhttpd=no
778 AC_ARG_ENABLE(microhttpd, AS_HELP_STRING([--disable-microhttpd], [disable microhttpd support]))
779 if test "x$enable_microhttpd" != "xno"; then
780         PKG_CHECK_MODULES(MICROHTTPD, [libmicrohttpd >= 0.9.33],
781                 [AC_DEFINE(HAVE_MICROHTTPD, 1, [Define if microhttpd is available]) have_microhttpd=yes], have_microhttpd=no)
782         if test "x$have_microhttpd" = xno -a "x$enable_microhttpd" = xyes; then
783                 AC_MSG_ERROR([*** microhttpd support requested but libraries not found])
784         fi
785 fi
786 AM_CONDITIONAL(HAVE_MICROHTTPD, [test "$have_microhttpd" = "yes"])
787
788 # ------------------------------------------------------------------------------
789 have_gnutls=no
790 AC_ARG_ENABLE(gnutls, AS_HELP_STRING([--disable-gnutls], [disable gnutls support]))
791 if test "x$enable_gnutls" != "xno"; then
792         PKG_CHECK_MODULES(GNUTLS, [gnutls >= 3.1.4],
793                 [AC_DEFINE(HAVE_GNUTLS, 1, [Define if gnutls is available]) have_gnutls=yes], have_gnutls=no)
794         if test "x$have_gnutls" = xno -a "x$enable_gnutls" = xyes; then
795                 AC_MSG_ERROR([*** gnutls support requested but libraries not found])
796         fi
797 fi
798 AM_CONDITIONAL(HAVE_GNUTLS, [test "$have_gnutls" = "yes"])
799
800 # ------------------------------------------------------------------------------
801 have_libcurl=no
802 AC_ARG_ENABLE(libcurl, AS_HELP_STRING([--disable-libcurl], [disable libcurl support]))
803 if test "x$enable_libcurl" != "xno"; then
804         PKG_CHECK_MODULES(LIBCURL, [libcurl],
805                 [AC_DEFINE(HAVE_LIBCURL, 1, [Define if libcurl is available]) have_libcurl=yes], have_libcurl=no)
806         if test "x$have_libcurl" = xno -a "x$enable_libcurl" = xyes; then
807                 AC_MSG_ERROR([*** libcurl support requested but libraries not found])
808         fi
809 fi
810 AM_CONDITIONAL(HAVE_LIBCURL, [test "$have_libcurl" = "yes"])
811
812 # ------------------------------------------------------------------------------
813 have_binfmt=no
814 AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
815 if test "x$enable_binfmt" != "xno"; then
816         have_binfmt=yes
817 fi
818 AM_CONDITIONAL(ENABLE_BINFMT, [test "$have_binfmt" = "yes"])
819
820 # ------------------------------------------------------------------------------
821 have_vconsole=no
822 AC_ARG_ENABLE(vconsole, AS_HELP_STRING([--disable-vconsole], [disable vconsole tool]))
823 if test "x$enable_vconsole" != "xno"; then
824         have_vconsole=yes
825 fi
826 AM_CONDITIONAL(ENABLE_VCONSOLE, [test "$have_vconsole" = "yes"])
827
828 # ------------------------------------------------------------------------------
829 have_readahead=no
830 AC_ARG_ENABLE(readahead, AS_HELP_STRING([--disable-readahead], [disable readahead tools]))
831 if test "x$enable_readahead" != "xno"; then
832         have_readahead=yes
833 fi
834 AM_CONDITIONAL(ENABLE_READAHEAD, [test "$have_readahead" = "yes"])
835
836 # ------------------------------------------------------------------------------
837 have_bootchart=no
838 AC_ARG_ENABLE(bootchart, AS_HELP_STRING([--disable-bootchart], [disable bootchart tool]))
839 if test "x$enable_bootchart" != "xno"; then
840         have_bootchart=yes
841 fi
842 AM_CONDITIONAL(ENABLE_BOOTCHART, [test "$have_bootchart" = "yes"])
843
844 # ------------------------------------------------------------------------------
845 have_quotacheck=no
846 AC_ARG_ENABLE(quotacheck, AS_HELP_STRING([--disable-quotacheck], [disable quotacheck tools]))
847 if test "x$enable_quotacheck" != "xno"; then
848         have_quotacheck=yes
849 fi
850 AM_CONDITIONAL(ENABLE_QUOTACHECK, [test "$have_quotacheck" = "yes"])
851
852 # ------------------------------------------------------------------------------
853 have_tmpfiles=no
854 AC_ARG_ENABLE(tmpfiles, AS_HELP_STRING([--disable-tmpfiles], [disable tmpfiles support]))
855 if test "x$enable_tmpfiles" != "xno"; then
856         have_tmpfiles=yes
857 fi
858 AM_CONDITIONAL(ENABLE_TMPFILES, [test "$have_tmpfiles" = "yes"])
859
860 # ------------------------------------------------------------------------------
861 have_sysusers=no
862 AC_ARG_ENABLE(sysusers, AS_HELP_STRING([--disable-sysusers], [disable sysusers support]))
863 if test "x$enable_sysusers" != "xno"; then
864         have_sysusers=yes
865 fi
866 AM_CONDITIONAL(ENABLE_SYSUSERS, [test "$have_sysusers" = "yes"])
867
868 # ------------------------------------------------------------------------------
869 have_firstboot=no
870 AC_ARG_ENABLE(firstboot, AS_HELP_STRING([--disable-firstboot], [disable firstboot support]))
871 if test "x$enable_firstboot" != "xno"; then
872         have_firstboot=yes
873 fi
874 AM_CONDITIONAL(ENABLE_FIRSTBOOT, [test "$have_firstboot" = "yes"])
875
876 # ------------------------------------------------------------------------------
877 have_randomseed=no
878 AC_ARG_ENABLE(randomseed, AS_HELP_STRING([--disable-randomseed], [disable randomseed tools]))
879 if test "x$enable_randomseed" != "xno"; then
880         have_randomseed=yes
881 fi
882 AM_CONDITIONAL(ENABLE_RANDOMSEED, [test "$have_randomseed" = "yes"])
883
884 # ------------------------------------------------------------------------------
885 have_backlight=no
886 AC_ARG_ENABLE(backlight, AS_HELP_STRING([--disable-backlight], [disable backlight tools]))
887 if test "x$enable_backlight" != "xno"; then
888         have_backlight=yes
889 fi
890 AM_CONDITIONAL(ENABLE_BACKLIGHT, [test "$have_backlight" = "yes"])
891
892 # ------------------------------------------------------------------------------
893 have_rfkill=no
894 AC_ARG_ENABLE(rfkill, AS_HELP_STRING([--disable-rfkill], [disable rfkill tools]))
895 if test "x$enable_rfkill" != "xno"; then
896         have_rfkill=yes
897 fi
898 AM_CONDITIONAL(ENABLE_RFKILL, [test "$have_rfkill" = "yes"])
899
900 # ------------------------------------------------------------------------------
901 have_logind=no
902 AC_ARG_ENABLE(logind, AS_HELP_STRING([--disable-logind], [disable login daemon]))
903 if test "x$enable_logind" != "xno"; then
904         have_logind=yes
905 fi
906 AM_CONDITIONAL(ENABLE_LOGIND, [test "$have_logind" = "yes"])
907 AS_IF([test "$have_logind" = "yes"], [ AC_DEFINE(HAVE_LOGIND, [1], [Logind support available]) ])
908
909 # ------------------------------------------------------------------------------
910 have_machined=no
911 AC_ARG_ENABLE(machined, AS_HELP_STRING([--disable-machined], [disable machine daemon]))
912 if test "x$enable_machined" != "xno"; then
913         have_machined=yes
914 fi
915 AM_CONDITIONAL(ENABLE_MACHINED, [test "$have_machined" = "yes"])
916 AS_IF([test "$have_machined" = "yes"], [ AC_DEFINE(HAVE_MACHINED, [1], [Machined support available]) ])
917
918 # ------------------------------------------------------------------------------
919 have_hostnamed=no
920 AC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
921 if test "x$enable_hostnamed" != "xno"; then
922         have_hostnamed=yes
923 fi
924 AM_CONDITIONAL(ENABLE_HOSTNAMED, [test "$have_hostnamed" = "yes"])
925
926 # ------------------------------------------------------------------------------
927 have_timedated=no
928 AC_ARG_ENABLE(timedated, AS_HELP_STRING([--disable-timedated], [disable timedate daemon]))
929 if test "x$enable_timedated" != "xno"; then
930         have_timedated=yes
931 fi
932 AM_CONDITIONAL(ENABLE_TIMEDATED, [test "$have_timedated" = "yes"])
933
934 # ------------------------------------------------------------------------------
935 have_timesyncd=no
936 AC_ARG_ENABLE(timesyncd, AS_HELP_STRING([--disable-timesyncd], [disable timesync daemon]))
937 if test "x$enable_timesyncd" != "xno"; then
938         have_timesyncd=yes
939 fi
940 AM_CONDITIONAL(ENABLE_TIMESYNCD, [test "$have_timesyncd" = "yes"])
941
942 AC_ARG_WITH(ntp-servers,
943         AS_HELP_STRING([--with-ntp-servers=NTPSERVERS],
944                 [Space-separated list of default NTP servers]),
945         [NTP_SERVERS="$withval"],
946         [NTP_SERVERS="time1.google.com time2.google.com time3.google.com time4.google.com"])
947
948 AC_DEFINE_UNQUOTED(NTP_SERVERS, ["$NTP_SERVERS"], [Default NTP Servers])
949 AC_SUBST(NTP_SERVERS)
950
951 AC_ARG_WITH(time-epoch,
952         AS_HELP_STRING([--with-time-epoch=SECONDS],
953                 [Time epoch for time clients]),
954         [TIME_EPOCH="$withval"],
955         [TIME_EPOCH="`stat -c %Y ${srcdir}/NEWS 2>/dev/null || echo 0`"])
956
957 AC_DEFINE_UNQUOTED(TIME_EPOCH, [$TIME_EPOCH], [Time Epoch])
958
959 # ------------------------------------------------------------------------------
960 AC_ARG_WITH(system-uid-max,
961         AS_HELP_STRING([--with-system-uid-max=UID]
962                 [Maximum UID for system users]),
963         [SYSTEM_UID_MAX="$withval"],
964         [SYSTEM_UID_MAX="`awk 'BEGIN { uid=999 } /^\s*SYS_UID_MAX\s+/ { uid=$2 } END { print uid }' /etc/login.defs 2>/dev/null || echo 999`"])
965
966 AC_DEFINE_UNQUOTED(SYSTEM_UID_MAX, [$SYSTEM_UID_MAX], [Maximum System UID])
967 AC_SUBST(SYSTEM_UID_MAX)
968
969 # ------------------------------------------------------------------------------
970 AC_ARG_WITH(system-gid-max,
971         AS_HELP_STRING([--with-system-gid-max=GID]
972                 [Maximum GID for system groups]),
973         [SYSTEM_GID_MAX="$withval"],
974         [SYSTEM_GID_MAX="`awk 'BEGIN { gid=999 } /^\s*SYS_GID_MAX\s+/ { gid=$2 } END { print gid }' /etc/login.defs 2>/dev/null || echo 999`"])
975
976 AC_DEFINE_UNQUOTED(SYSTEM_GID_MAX, [$SYSTEM_GID_MAX], [Maximum System GID])
977 AC_SUBST(SYSTEM_GID_MAX)
978
979 # ------------------------------------------------------------------------------
980 have_localed=no
981 AC_ARG_ENABLE(localed, AS_HELP_STRING([--disable-localed], [disable locale daemon]))
982 if test "x$enable_localed" != "xno"; then
983         have_localed=yes
984 fi
985 AM_CONDITIONAL(ENABLE_LOCALED, [test "$have_localed" = "yes"])
986
987 # ------------------------------------------------------------------------------
988 have_coredump=no
989 AC_ARG_ENABLE(coredump, AS_HELP_STRING([--disable-coredump], [disable coredump hook]))
990 if test "x$enable_coredump" != "xno"; then
991         have_coredump=yes
992 fi
993 AM_CONDITIONAL(ENABLE_COREDUMP, [test "$have_coredump" = "yes"])
994
995 # ------------------------------------------------------------------------------
996 have_polkit=no
997 AC_ARG_ENABLE(polkit, AS_HELP_STRING([--disable-polkit], [disable PolicyKit support]))
998 if test "x$enable_polkit" != "xno"; then
999         AC_DEFINE(ENABLE_POLKIT, 1, [Define if PolicyKit support is to be enabled])
1000         have_polkit=yes
1001 fi
1002 AM_CONDITIONAL(ENABLE_POLKIT, [test "x$have_polkit" = "xyes"])
1003
1004 # ------------------------------------------------------------------------------
1005 have_resolved=no
1006 AC_ARG_ENABLE(resolved, AS_HELP_STRING([--disable-resolved], [disable resolve daemon]))
1007 if test "x$enable_resolved" != "xno"; then
1008         have_resolved=yes
1009 fi
1010 AM_CONDITIONAL(ENABLE_RESOLVED, [test "$have_resolved" = "yes"])
1011
1012 AC_ARG_WITH(dns-servers,
1013         AS_HELP_STRING([--with-dns-servers=DNSSERVERS],
1014                 [Space-separated list of default DNS servers]),
1015         [DNS_SERVERS="$withval"],
1016         [DNS_SERVERS="8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844"])
1017
1018 AC_DEFINE_UNQUOTED(DNS_SERVERS, ["$DNS_SERVERS"], [Default DNS Servers])
1019 AC_SUBST(DNS_SERVERS)
1020
1021 # ------------------------------------------------------------------------------
1022 have_networkd=no
1023 AC_ARG_ENABLE(networkd, AS_HELP_STRING([--disable-networkd], [disable networkd]))
1024 AS_IF([test "x$enable_networkd" != "xno"], [
1025         AC_DEFINE(ENABLE_NETWORKD, 1, [Define if networkd support is to be enabled])
1026         have_networkd=yes
1027 ])
1028 AM_CONDITIONAL(ENABLE_NETWORKD, [test "x$have_networkd" = "xyes"])
1029
1030 # ------------------------------------------------------------------------------
1031 have_efi=no
1032 AC_ARG_ENABLE(efi, AS_HELP_STRING([--disable-efi], [disable EFI support]))
1033 if test "x$enable_efi" != "xno"; then
1034         AC_DEFINE(ENABLE_EFI, 1, [Define if EFI support is to be enabled])
1035         have_efi=yes
1036 fi
1037 AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
1038
1039 # ------------------------------------------------------------------------------
1040 have_multi_seat_x=no
1041 AC_ARG_ENABLE(multi_seat_x, AS_HELP_STRING([--disable-multi-seat-x], [do not build multi-seat-x]))
1042 if test "x$enable_multi_seat_x" != "xno"; then
1043         have_multi_seat_x=yes
1044 fi
1045 AM_CONDITIONAL(ENABLE_MULTI_SEAT_X, [test "$have_multi_seat_x" = "yes"])
1046
1047 # ------------------------------------------------------------------------------
1048 have_terminal=no
1049 AC_ARG_ENABLE(terminal, AS_HELP_STRING([--enable-terminal], [enable terminal support]))
1050 if test "x$enable_terminal" = "xyes"; then
1051         AC_DEFINE(ENABLE_TERMINAL, 1, [Define if terminal support is to be enabled])
1052         have_terminal=yes
1053 fi
1054 AM_CONDITIONAL(ENABLE_TERMINAL, [test "x$have_terminal" = "xyes"])
1055
1056 # ------------------------------------------------------------------------------
1057 have_kdbus=no
1058 AC_ARG_ENABLE(kdbus, AS_HELP_STRING([--enable-kdbus], [do connect to kdbus by default]))
1059 if test "x$enable_kdbus" = "xyes"; then
1060         AC_DEFINE(ENABLE_KDBUS, 1, [Define if kdbus support is to be enabled])
1061         have_kdbus=yes
1062         M4_DEFINES="$M4_DEFINES -DENABLE_KDBUS"
1063 fi
1064 AM_CONDITIONAL(ENABLE_KDBUS, [test "$have_kdbus" = "yes"])
1065
1066 # ------------------------------------------------------------------------------
1067 AC_ARG_WITH(rc-local-script-path-start,
1068         AS_HELP_STRING([--with-rc-local-script-path-start=PATH],
1069                 [Path to /etc/rc.local]),
1070         [RC_LOCAL_SCRIPT_PATH_START="$withval"],
1071         [RC_LOCAL_SCRIPT_PATH_START="/etc/rc.local"])
1072
1073 AC_ARG_WITH(rc-local-script-path-stop,
1074         AS_HELP_STRING([--with-rc-local-script-path-stop=PATH],
1075                 [Path to /usr/sbin/halt.local]),
1076         [RC_LOCAL_SCRIPT_PATH_STOP="$withval"],
1077         [RC_LOCAL_SCRIPT_PATH_STOP="/usr/sbin/halt.local"])
1078
1079 AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_START, ["$RC_LOCAL_SCRIPT_PATH_START"], [Path of /etc/rc.local script])
1080 AC_DEFINE_UNQUOTED(RC_LOCAL_SCRIPT_PATH_STOP, ["$RC_LOCAL_SCRIPT_PATH_STOP"], [Path of /usr/sbin/halt.local script])
1081
1082 AC_SUBST(RC_LOCAL_SCRIPT_PATH_START)
1083 AC_SUBST(RC_LOCAL_SCRIPT_PATH_STOP)
1084
1085 # ------------------------------------------------------------------------------
1086 AC_ARG_WITH(kbd-loadkeys,
1087         AS_HELP_STRING([--with-kbd-loadkeys=PATH],
1088                 [Path to loadkeys]),
1089         [KBD_LOADKEYS="$withval"],
1090         [KBD_LOADKEYS="/usr/bin/loadkeys"])
1091
1092 AC_ARG_WITH(kbd-setfont,
1093         AS_HELP_STRING([--with-kbd-setfont=PATH],
1094                 [Path to setfont]),
1095         [KBD_SETFONT="$withval"],
1096         [KBD_SETFONT="/usr/bin/setfont"])
1097
1098 AC_DEFINE_UNQUOTED(KBD_LOADKEYS, ["$KBD_LOADKEYS"], [Path of loadkeys])
1099 AC_DEFINE_UNQUOTED(KBD_SETFONT, ["$KBD_SETFONT"], [Path of setfont])
1100
1101 AC_SUBST(KBD_LOADKEYS)
1102 AC_SUBST(KBD_SETFONT)
1103
1104 AC_ARG_WITH(telinit,
1105         AS_HELP_STRING([--with-telinit=PATH],
1106                 [Path to telinit]),
1107         [TELINIT="$withval"],
1108         [TELINIT="/lib/sysvinit/telinit"])
1109
1110 AC_DEFINE_UNQUOTED(TELINIT, ["$TELINIT"], [Path to telinit])
1111
1112 AC_SUBST(TELINIT)
1113
1114 AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h valgrind/valgrind.h])
1115
1116 # ------------------------------------------------------------------------------
1117 have_myhostname=no
1118 AC_ARG_ENABLE(myhostname, AS_HELP_STRING([--disable-myhostname], [disable nss-myhostname support]))
1119 if test "x$enable_myhostname" != "xno"; then
1120         AC_HEADER_STDC
1121         AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h sys/auxv.h])
1122
1123         AC_C_CONST
1124         AC_TYPE_SIZE_T
1125         AC_HEADER_TIME
1126
1127         AC_FUNC_MALLOC
1128         AC_FUNC_SELECT_ARGTYPES
1129         AC_CHECK_FUNCS([gethostbyaddr gethostbyname gettimeofday inet_ntoa memset select socket strcspn strdup strerror strncasecmp strcasecmp strspn])
1130
1131         have_myhostname=yes
1132 fi
1133 AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
1134
1135 # ------------------------------------------------------------------------------
1136 AC_ARG_WITH(firmware-path,
1137        AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
1138           [Firmware search path (default="")]),
1139        [], [with_firmware_path=""])
1140 OLD_IFS=$IFS
1141 IFS=:
1142 for i in $with_firmware_path; do
1143        if test "x${FIRMWARE_PATH}" = "x"; then
1144               FIRMWARE_PATH="\\\"${i}/\\\""
1145        else
1146               FIRMWARE_PATH="${FIRMWARE_PATH}, \\\"${i}/\\\""
1147        fi
1148 done
1149 IFS=$OLD_IFS
1150 AC_SUBST(FIRMWARE_PATH)
1151 AS_IF([test "x${FIRMWARE_PATH}" != "x"], [ AC_DEFINE(HAVE_FIRMWARE, 1, [Define if FIRMWARE is available]) ])
1152 AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"])
1153
1154 # ------------------------------------------------------------------------------
1155 AC_ARG_ENABLE([gudev],
1156        AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]),
1157        [], [enable_gudev=yes])
1158 AS_IF([test "x$enable_gudev" = "xyes"], [ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0 gio-2.0]) ])
1159 AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
1160 AS_IF([test "x$enable_gudev" = "xyes"], [ AC_DEFINE(HAVE_GLIB, 1, [Define if glib is available]) ])
1161
1162 # ------------------------------------------------------------------------------
1163 have_manpages=no
1164 AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
1165 AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes])
1166 AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
1167
1168 # ------------------------------------------------------------------------------
1169
1170 # Location of the init scripts as mandated by LSB
1171 SYSTEM_SYSVINIT_PATH=/etc/init.d
1172 SYSTEM_SYSVRCND_PATH=/etc/rc.d
1173
1174 AC_ARG_WITH([sysvinit-path],
1175         [AS_HELP_STRING([--with-sysvinit-path=PATH],
1176                 [Specify the path to where the SysV init scripts are located])],
1177         [SYSTEM_SYSVINIT_PATH="$withval"],
1178         [])
1179
1180 AC_ARG_WITH([sysvrcnd-path],
1181         [AS_HELP_STRING([--with-sysvrcnd-path=PATH],
1182                 [Specify the path to the base directory for the SysV rcN.d directories])],
1183         [SYSTEM_SYSVRCND_PATH="$withval"],
1184         [])
1185
1186 if test "x${SYSTEM_SYSVINIT_PATH}" != "x" -a "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
1187         AC_DEFINE(HAVE_SYSV_COMPAT, [], [SysV init scripts and rcN.d links are supported.])
1188         SYSTEM_SYSV_COMPAT="yes"
1189         M4_DEFINES="$M4_DEFINES -DHAVE_SYSV_COMPAT"
1190 elif test "x${SYSTEM_SYSVINIT_PATH}" != "x" -o "x${SYSTEM_SYSVRCND_PATH}" != "x"; then
1191         AC_MSG_ERROR([*** You need both --with-sysvinit-path=PATH and --with-sysvrcnd-path=PATH to enable SysV compatibility support, or both empty to disable it.])
1192 else
1193         SYSTEM_SYSV_COMPAT="no"
1194 fi
1195
1196 AC_SUBST(SYSTEM_SYSVINIT_PATH)
1197 AC_SUBST(SYSTEM_SYSVRCND_PATH)
1198 AC_SUBST(M4_DEFINES)
1199
1200 AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
1201
1202 AC_ARG_WITH([tty-gid],
1203         [AS_HELP_STRING([--with-tty-gid=GID],
1204                 [Specify the numeric GID of the 'tty' group])],
1205         [TTY_GID="$withval"],
1206         [TTY_GID="5"])
1207
1208 AC_DEFINE_UNQUOTED(TTY_GID, [$TTY_GID], [GID of the 'tty' group])
1209 AC_SUBST(TTY_GID)
1210
1211 AC_ARG_WITH([dbuspolicydir],
1212         AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
1213         [],
1214         [with_dbuspolicydir=$($PKG_CONFIG --variable=sysconfdir dbus-1)/dbus-1/system.d])
1215
1216 AC_ARG_WITH([dbussessionservicedir],
1217         AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
1218         [],
1219         [with_dbussessionservicedir=$($PKG_CONFIG --variable=session_bus_services_dir dbus-1)])
1220
1221 AC_ARG_WITH([dbussystemservicedir],
1222         AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
1223         [],
1224         [with_dbussystemservicedir=$(readlink -m $($PKG_CONFIG --variable=session_bus_services_dir dbus-1)/../system-services)])
1225
1226 AC_ARG_WITH([dbusinterfacedir],
1227         AS_HELP_STRING([--with-dbusinterfacedir=DIR], [D-Bus interface directory]),
1228         [],
1229         [with_dbusinterfacedir=$(readlink -m $($PKG_CONFIG --variable=session_bus_services_dir dbus-1)/../interfaces)])
1230
1231 AC_ARG_WITH([bashcompletiondir],
1232         AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
1233         [],
1234         [AS_IF([$($PKG_CONFIG --exists bash-completion)], [
1235                 with_bashcompletiondir=$($PKG_CONFIG --variable=completionsdir bash-completion)
1236         ] , [
1237                 with_bashcompletiondir=${datadir}/bash-completion/completions
1238         ])])
1239
1240 AC_ARG_WITH([zshcompletiondir],
1241         AS_HELP_STRING([--with-zshcompletiondir=DIR], [Zsh completions directory]),
1242         [], [with_zshcompletiondir=${datadir}/zsh/site-functions])
1243
1244 AC_ARG_WITH([rootprefix],
1245         AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
1246         [], [with_rootprefix=${ac_default_prefix}])
1247
1248 AC_ARG_WITH([rootlibdir],
1249         AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
1250         [],
1251         [with_rootlibdir=${libdir}])
1252
1253 AC_ARG_WITH([pamlibdir],
1254         AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
1255         [],
1256         [with_pamlibdir=${with_rootlibdir}/security])
1257
1258 AC_ARG_WITH([pamconfdir],
1259         AS_HELP_STRING([--with-pamconfdir=DIR], [Directory for PAM configuration]),
1260         [],
1261         [with_pamconfdir=${sysconfdir}/pam.d])
1262
1263 AC_ARG_ENABLE([split-usr],
1264         AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]),
1265         [],
1266         [AS_IF([test "x${ac_default_prefix}" != "x${with_rootprefix}"], [
1267                 enable_split_usr=yes
1268         ], [
1269                 enable_split_usr=no
1270         ])])
1271
1272 AS_IF([test "x${enable_split_usr}" = "xyes"], [
1273         AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr])
1274 ])
1275
1276 # Work around intltoolize and gtk-doc problems in VPATH builds
1277 AM_CONDITIONAL([ENABLE_GTK_DOC_TESTS], [test "x$0" = "x./configure"],
1278                                        [Define to do gtk-doc tests])
1279 AS_IF([test "x$0" != "x./configure"], [
1280         AC_SUBST([INTLTOOL_UPDATE], [/bin/true])
1281 ])
1282
1283 AC_ARG_ENABLE(tests,
1284        [AC_HELP_STRING([--disable-tests], [disable tests])],
1285        enable_tests=$enableval, enable_tests=yes)
1286 AM_CONDITIONAL(ENABLE_TESTS, [test x$enable_tests = xyes])
1287
1288 AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
1289 AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
1290 AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
1291 AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
1292 AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
1293 AC_SUBST([zshcompletiondir], [$with_zshcompletiondir])
1294 AC_SUBST([pamlibdir], [$with_pamlibdir])
1295 AC_SUBST([pamconfdir], [$with_pamconfdir])
1296 AC_SUBST([rootprefix], [$with_rootprefix])
1297 AC_SUBST([rootlibdir], [$with_rootlibdir])
1298
1299 AC_CONFIG_FILES([
1300         Makefile po/Makefile.in
1301         docs/libudev/Makefile
1302         docs/libudev/version.xml
1303         docs/gudev/Makefile
1304         docs/gudev/version.xml
1305 ])
1306
1307 AC_OUTPUT
1308 AC_MSG_RESULT([
1309         $PACKAGE_NAME $VERSION
1310
1311         libcryptsetup:           ${have_libcryptsetup}
1312         PAM:                     ${have_pam}
1313         AUDIT:                   ${have_audit}
1314         IMA:                     ${have_ima}
1315         AppArmor:                ${have_apparmor}
1316         SELinux:                 ${have_selinux}
1317         SECCOMP:                 ${have_seccomp}
1318         SMACK:                   ${have_smack}
1319         XZ:                      ${have_xz}
1320         LZ4:                     ${have_lz4}
1321         ACL:                     ${have_acl}
1322         GCRYPT:                  ${have_gcrypt}
1323         QRENCODE:                ${have_qrencode}
1324         MICROHTTPD:              ${have_microhttpd}
1325         CHKCONFIG:               ${have_chkconfig}
1326         GNUTLS:                  ${have_gnutls}
1327         libcurl:                 ${have_libcurl}
1328         ELFUTILS:                ${have_elfutils}
1329         binfmt:                  ${have_binfmt}
1330         vconsole:                ${have_vconsole}
1331         readahead:               ${have_readahead}
1332         bootchart:               ${have_bootchart}
1333         quotacheck:              ${have_quotacheck}
1334         tmpfiles:                ${have_tmpfiles}
1335         sysusers:                ${have_sysusers}
1336         firstboot:               ${have_firstboot}
1337         randomseed:              ${have_randomseed}
1338         backlight:               ${have_backlight}
1339         rfkill:                  ${have_rfkill}
1340         logind:                  ${have_logind}
1341         machined:                ${have_machined}
1342         hostnamed:               ${have_hostnamed}
1343         timedated:               ${have_timedated}
1344         timesyncd:               ${have_timesyncd}
1345         default NTP servers:     ${NTP_SERVERS}
1346         time epoch:              ${TIME_EPOCH}
1347         localed:                 ${have_localed}
1348         networkd:                ${have_networkd}
1349         resolved:                ${have_resolved}
1350         default DNS servers:     ${DNS_SERVERS}
1351         coredump:                ${have_coredump}
1352         polkit:                  ${have_polkit}
1353         efi:                     ${have_efi}
1354         kmod:                    ${have_kmod}
1355         blkid:                   ${have_blkid}
1356         dbus:                    ${have_dbus}
1357         nss-myhostname:          ${have_myhostname}
1358         gudev:                   ${enable_gudev}
1359         gintrospection:          ${enable_introspection}
1360         multi-seat-x:            ${have_multi_seat_x}
1361         terminal:                ${have_terminal}
1362         kdbus:                   ${have_kdbus}
1363         Python:                  ${have_python}
1364         Python Headers:          ${have_python_devel}
1365         man pages:               ${have_manpages}
1366         gtk-doc:                 ${enable_gtk_doc}
1367         test coverage:           ${have_coverage}
1368         Split /usr:              ${enable_split_usr}
1369         SysV compatibility:      ${SYSTEM_SYSV_COMPAT}
1370         compatibility libraries: ${have_compat_libs}
1371
1372         prefix:                  ${prefix}
1373         rootprefix:              ${with_rootprefix}
1374         sysconf dir:             ${sysconfdir}
1375         datarootdir:             ${datarootdir}
1376         includedir:              ${includedir}
1377         include_prefix:          ${INCLUDE_PREFIX}
1378         lib dir:                 ${libdir}
1379         rootlib dir:             ${with_rootlibdir}
1380         SysV init scripts:       ${SYSTEM_SYSVINIT_PATH}
1381         SysV rc?.d directories:  ${SYSTEM_SYSVRCND_PATH}
1382         Build Python:            ${PYTHON}
1383         Installation Python:     ${PYTHON_BINARY}
1384         sphinx binary:           ${SPHINX_BUILD}
1385         firmware path:           ${FIRMWARE_PATH}
1386         PAM modules dir:         ${with_pamlibdir}
1387         PAM configuration dir:   ${with_pamconfdir}
1388         D-Bus policy dir:        ${with_dbuspolicydir}
1389         D-Bus session dir:       ${with_dbussessionservicedir}
1390         D-Bus system dir:        ${with_dbussystemservicedir}
1391         D-Bus interfaces dir:    ${with_dbusinterfacedir}
1392         Bash completions dir:    ${with_bashcompletiondir}
1393         Zsh completions dir:     ${with_zshcompletiondir}
1394         Extra start script:      ${RC_LOCAL_SCRIPT_PATH_START}
1395         Extra stop script:       ${RC_LOCAL_SCRIPT_PATH_STOP}
1396         Debug shell:             ${SUSHELL} @ ${DEBUGTTY}
1397         TTY GID:                 ${TTY_GID}
1398         Maximum System UID:      ${SYSTEM_UID_MAX}
1399         Maximum System GID:      ${SYSTEM_GID_MAX}
1400         Certificate root:        ${CERTIFICATEROOT}
1401
1402         CFLAGS:                  ${OUR_CFLAGS} ${CFLAGS}
1403         CPPFLAGS:                ${OUR_CPPFLAGS} ${CPPFLAGS}
1404         LDFLAGS:                 ${OUR_LDFLAGS} ${LDFLAGS}
1405         PYTHON_CFLAGS:           ${PYTHON_DEVEL_CFLAGS}
1406         PYTHON_LIBS:             ${PYTHON_DEVEL_LIBS}
1407 ])