1
2AC_COPYRIGHT([Copyright 2014-2017 The ConsoleKit2 Team])
3
4AC_PREREQ([2.62])
5AC_INIT([ConsoleKit2],
6        [1.2.2],
7        [https://github.com/ConsoleKit2/ConsoleKit2/issues],
8        [ConsoleKit2],
9        [https://github.com/ConsoleKit2/ConsoleKit2])
10VERSION_MAJOR=1
11VERSION_MINOR=2
12VERSION_REVISION=1
13
14
15COPYRIGHT_YEARS="2014 - 2017"
16
17AC_CONFIG_HEADERS([config.h])
18AC_CONFIG_AUX_DIR([autotools])
19AC_CONFIG_MACRO_DIR([m4])
20AC_CONFIG_SRCDIR([src/ck-manager.c])
21
22AM_INIT_AUTOMAKE([1.9 dist-bzip2 tar-ustar no-dist-gzip])
23m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
24AM_MAINTAINER_MODE([enable])
25
26# for O_NOFOLLOW support
27AC_USE_SYSTEM_EXTENSIONS
28
29AC_SEARCH_LIBS([strerror],[cposix])
30AC_PROG_CC
31AM_PROG_CC_C_O
32AC_HEADER_STDC
33LT_INIT([disable-static])
34AC_HEADER_STDC
35AC_FUNC_FORK
36AC_FUNC_MALLOC
37AC_HEADER_MAJOR
38AC_PATH_X
39AC_TYPE_PID_T
40AC_TYPE_SIZE_T
41AC_TYPE_SSIZE_T
42AC_TYPE_UID_T
43
44AC_SUBST(VERSION)
45
46# Save flags to aclocal
47ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
48
49AM_GNU_GETTEXT_VERSION([0.19])
50GETTEXT_PACKAGE=ConsoleKit2
51AC_SUBST(GETTEXT_PACKAGE)
52AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of default gettext domain])
53AM_GNU_GETTEXT([external])
54AM_NLS
55
56# Dependencies
57m4_define([glib_minimum_version], [2.40])
58m4_define([dbus_minimum_version], [0.82])
59m4_define([x11_minimum_version], [1.0.0])
60m4_define([polkit_minimum_version], [0.92])
61m4_define([cgmanager_minimum_version], [0.0.0])
62m4_define([libevdev_minimum_version], [0.2])
63m4_define([libdrm_minimum_version], [2.4.60])
64m4_define([libudev_minimum_version], [190])
65m4_define([selinux_minimum_version], [1.0])
66
67AC_CHECK_HEADERS([unistd.h paths.h sys/vt.h sys/consio.h fcntl.h limits.h \
68                  sys/ioctl.h sys/param.h sys/socket.h syslog.h kvm.h \
69                  sys/sysctl.h sys/user.h poll.h libintl.h locale.h \
70                  sys/wait.h sys/resource.h sys/mount.h sys/param.h ftw.h \
71		  sys/sysmacros.h sys/types.h libudev.h linux/input.h \
72		  sys/mkdev.h devattr.h sys/kd.h sys/kbio.h libprop/proplib.h \
73		  linux/kd.h sys/queue.h sys/stat.h sys/fcntl.h \
74		  dev/wscons/wsdisplay_usl_io.h dev/wscons/wsconsio.h \
75		  vfs/tmpfs/tmpfs_mount.h])
76
77AC_CHECK_FUNCS([getpeerucred getpeereid memset setenv strchr strdup \
78                strerror strrchr strspn strstr strtol strtoul uname \
79                setlocale mount umount unmount])
80
81AC_CHECK_MEMBERS([struct stat.st_rdev])
82
83AC_CHECK_FILE(/sys/class/tty/tty0/active,
84              [AC_DEFINE([HAVE_SYS_VT_SIGNAL], [1], [System has a means of signaling VT changes])],
85              [])
86
87
88XDT_CHECK_PACKAGE([LIBDBUS], [dbus-1], [dbus_minimum_version])
89XDT_CHECK_PACKAGE([GLIB], [glib-2.0], [glib_minimum_version])
90XDT_CHECK_PACKAGE([GIO], [gio-2.0], [glib_minimum_version])
91XDT_CHECK_PACKAGE([GIO_UNIX], [gio-unix-2.0], [glib_minimum_version])
92
93
94AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_40, [Ignore post 2.40 deprecations])
95AC_DEFINE(GLIB_VERSION_MAX_ALLOWED, GLIB_VERSION_2_40, [Prevent post 2.40 APIs])
96
97
98# Check for X11 installed
99XDT_CHECK_LIBX11()
100if test "x$with_x" = "xyes" ; then
101        XDT_CHECK_LIBX11_REQUIRE()
102fi
103AM_CONDITIONAL([USE_LIBX11], [test "x$with_x" = xyes])
104
105# Check for Polkit/PolicyKit
106XDT_CHECK_OPTIONAL_PACKAGE([POLKIT], [polkit-gobject-1], [polkit_minimum_version],
107                           [polkit], [Enable PolicyKit support @<:@default=auto@:>@])
108
109
110AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
111
112
113# Solaris requires libresolv for daemon()
114case "$host_os" in
115	solaris*)
116		AC_CHECK_LIB(resolv, daemon, [CK2_LIBS="$CK2_LIBS -lresolv"])
117	;;
118	kfreebsd*-gnu)
119		have_getpeereid=no
120		AC_CHECK_LIB(bsd, getpeereid, have_getpeereid=yes)
121		if test "x$have_getpeereid" = "xyes"; then
122			CK2_LIBS="${CK2_LIBS} -lbsd"
123			TOOLS_LIBS="${TOOLS_LIBS} -lbsd"
124			AC_DEFINE(HAVE_GETPEEREID, [], [Define if we have getpeereid])
125		fi
126	;;
127esac
128
129
130dnl ---------------------------------------------------------------------------
131dnl - Are we specifying a different dbus root ?
132dnl ---------------------------------------------------------------------------
133
134AC_ARG_WITH(dbus-sys,
135	[AS_HELP_STRING([--with-dbus-sys=<dir>],[where D-BUS system.d directory is])])
136AC_ARG_WITH(dbus-services,
137	[AS_HELP_STRING([--with-dbus-services=<dir>],[where D-BUS services directory is])])
138if ! test -z "$with_dbus_sys" ; then
139        DBUS_SYS_DIR="$with_dbus_sys"
140else
141        DBUS_SYS_DIR="$sysconfdir/dbus-1/system.d"
142fi
143AC_SUBST(DBUS_SYS_DIR)
144
145
146dnl ---------------------------------------------------------------------------
147dnl - Check for libz
148dnl ---------------------------------------------------------------------------
149
150have_libz=no
151AC_CHECK_LIB(z, compress,
152  [AC_CHECK_HEADER(zlib.h, [have_libz=yes], [])], [])
153if test "x$have_libz" != "xyes"; then
154  AC_MSG_ERROR([Unable to find libz])
155fi
156Z_LIBS="${Z_LIBS} -lz"
157AC_SUBST(Z_LIBS)
158
159
160dnl ---------------------------------------------------------------------------
161dnl - Path to rundir e.g. /var/run
162dnl ---------------------------------------------------------------------------
163
164AC_ARG_WITH(rundir,
165	[AS_HELP_STRING([--with-rundir=<dir>],[run directory location, e.g. /var/run])])
166if ! test -z "$with_rundir" ; then
167        RUNDIR="$with_rundir"
168else
169        RUNDIR="$localstatedir/run"
170fi
171AC_SUBST(RUNDIR)
172
173
174dnl ---------------------------------------------------------------------------
175dnl - PID file
176dnl ---------------------------------------------------------------------------
177
178AC_ARG_WITH(pid-file,
179	[AS_HELP_STRING([--with-pid-file=<file>],[pid file location])])
180
181if ! test -z "$with_pid_file"; then
182   CONSOLE_KIT_PID_FILE=$with_pid_file
183else
184   CONSOLE_KIT_PID_FILE=${RUNDIR}/ConsoleKit/pid
185fi
186
187AC_SUBST(CONSOLE_KIT_PID_FILE)
188
189dnl ---------------------------------------------------------------------------
190dnl Figure out what tools backend to build
191dnl ---------------------------------------------------------------------------
192
193CK_BACKEND=""
194KVM_LIBS=""
195case "$host" in
196        *-*-openbsd*)
197        CK_BACKEND="openbsd"
198        AC_CHECK_LIB(kvm, kvm_openfiles, have_kvm=yes,
199                AC_MSG_ERROR([Unable to find libkvm which is needed on OpenBSD]))
200        if test "x$have_kvm" = "xyes"; then
201                KVM_LIBS="-lkvm"
202        fi
203        ;;
204        *-*-freebsd* | *-*-kfreebsd*-gnu )
205        CK_BACKEND="freebsd"
206        AC_CHECK_LIB(kvm, kvm_openfiles, have_kvm=yes,
207                AC_MSG_ERROR([Unable to find libkvm which is needed on FreeBSD/DragonflyBSD]))
208        if test "x$have_kvm" = "xyes"; then
209                KVM_LIBS="-lkvm"
210        fi
211	AC_CHECK_LIB(procstat, procstat_open_sysctl, have_procstat=yes,
212                AC_MSG_WARN([Unable to find libprocstat which is used on FreeBSD]))
213	if test "x$have_procstat" = "xyes"; then
214                KVM_LIBS="${KVM_LIBS} -lprocstat"
215        fi
216        ;;
217        *-*-dragonfly*)
218        CK_BACKEND="dragonfly"
219        AC_CHECK_LIB(kvm, kvm_openfiles, have_kvm=yes,
220        AC_MSG_ERROR([Unable to find libkvm which is needed on DragonflyBSD]))
221        if test "x$have_kvm" = "xyes"; then
222        KVM_LIBS="-lkvm"
223        fi
224	      AC_CHECK_LIB(procstat, procstat_open_sysctl, have_procstat=yes,
225        AC_MSG_WARN([Unable to find libprocstat which is used on FreeBSD]))
226	      if test "x$have_procstat" = "xyes"; then
227        KVM_LIBS="${KVM_LIBS} -lprocstat"
228        fi
229        ;;
230        *-*-netbsd*)
231        CK_BACKEND="netbsd"
232        AC_CHECK_LIB(kvm, kvm_openfiles, have_kvm=yes,
233                AC_MSG_ERROR([Unable to find libkvm which is needed on NetBSD]))
234        if test "x$have_kvm" = "xyes"; then
235                KVM_LIBS="-lkvm"
236        fi
237        ;;
238        *-*-linux*)
239        CK_BACKEND="linux"
240        ;;
241        *-*-solaris*)
242        CK_BACKEND="solaris"
243        ;;
244        *-*-gnu*)
245        CK_BACKEND="gnu"
246        ;;
247	*)
248	AC_MSG_ERROR([No sysdeps back-end implemented for host $host])
249	;;
250esac
251
252AC_SUBST(KVM_LIBS)
253
254AM_CONDITIONAL(CK_COMPILE_LINUX, test x$CK_BACKEND = xlinux, [Compiling for Linux])
255AM_CONDITIONAL(CK_COMPILE_FREEBSD, test x$CK_BACKEND = xfreebsd, [Compiling for FreeBSD])
256AM_CONDITIONAL(CK_COMPILE_DRAGONFLY, test x$CK_BACKEND = xdragonfly, [Compiling for DragonFly])
257AM_CONDITIONAL(CK_COMPILE_NETBSD, test x$CK_BACKEND = xnetbsd, [Compiling for NetBSD])
258AM_CONDITIONAL(CK_COMPILE_OPENBSD, test x$CK_BACKEND = xopenbsd, [Compiling for OpenBSD])
259AM_CONDITIONAL(CK_COMPILE_SOLARIS, test x$CK_BACKEND = xsolaris, [Compiling for Solaris])
260AM_CONDITIONAL(CK_COMPILE_GNU, test x$CK_BACKEND = xgnu, [Compiling for GNU])
261AC_SUBST(CK_BACKEND)
262
263dnl ---------------------------------------------------------------------------
264dnl Check for PAM
265dnl ---------------------------------------------------------------------------
266
267have_pam=no
268have_linuxpam=no
269AC_CHECK_LIB(pam, pam_getenv, have_pam=yes)
270AM_CONDITIONAL(HAVE_PAM, test x$have_pam = xyes)
271if test "x$have_pam" = "xyes"; then
272	PAM_LIBS="${PAM_LIBS} -lpam"
273fi
274AC_SUBST(HAVE_PAM)
275AC_SUBST(PAM_LIBS)
276
277AC_CHECK_HEADERS([security/pam_modutil.h security/pam_ext.h])
278AC_CHECK_LIB(pam, pam_syslog, [AC_DEFINE(HAVE_PAM_SYSLOG, [], [Define to 1 if you have the pam_syslog function])])
279
280# Check if we should build the PAM module
281msg_pam_module=no
282AC_ARG_ENABLE(pam-module,
283	[AS_HELP_STRING([--enable-pam-module],[build PAM module])],
284        , enable_pam_module=no)
285if test "x$enable_pam_module" = "xyes"; then
286	if test "x$have_pam" = "xno"; then
287    		AC_MSG_ERROR([--enable-pam-module requires PAM but PAM was not found])
288	fi
289	AC_DEFINE(ENABLE_PAM_MODULE, [], [Set if we build PAM module])
290	msg_pam_module=yes
291fi
292AM_CONDITIONAL(ENABLE_PAM_MODULE, test "x$enable_pam_module" = "xyes")
293
294#Check if we can build an optional test program
295AC_CHECK_LIB(pam_misc, misc_conv, have_linuxpam=yes)
296AM_CONDITIONAL(HAVE_LINUXPAM, test "x$have_linuxpam" = "xyes")
297
298
299# cgroups - Using the kernel to track processes instead of the cookie
300XDT_CHECK_OPTIONAL_PACKAGE([CGMANAGER], [libcgmanager], [cgmanager_minimum_version],
301    [libcgmanager],
302    [cgmanager - Using the kernel to track processes instead of a session cookie])
303
304# libevdev - for device management with a session controller
305XDT_CHECK_OPTIONAL_PACKAGE([LIBEVDEV], [libevdev], [libevdev_minimum_version],
306    [libevdev],
307    [libevdev - for device management with a sessions controller])
308
309# libdrm - for device management with a session controller
310XDT_CHECK_OPTIONAL_PACKAGE([LIBDRM], [libdrm], [libdrm_minimum_version],
311    [libdrm],
312    [libdrm - for device management with a sessions controller])
313
314# libudev - use udev as a device manager for ck-device-udev.c
315XDT_CHECK_OPTIONAL_PACKAGE([LIBUDEV], [libudev], [libudev_minimum_version],
316    [libudev],
317    [libudev - use udev as a device manager for ck-device-udev.c])
318
319# selinux
320XDT_CHECK_OPTIONAL_PACKAGE([SELINUX], [libselinux], [selinux_minimum_version], [libselinux],
321                           [Security-Enhanced Linux support])
322
323
324dnl ------------------------------------------------------------------------------
325dnl udev-acl - apply ACLs for users with local forground sessions
326dnl ------------------------------------------------------------------------------
327AC_ARG_ENABLE([udev-acl],
328	AS_HELP_STRING([--enable-udev-acl], [enable local user acl permissions support @<:@default=disabled@:>@]),
329	[], [enable_udev_acl=no])
330AS_IF([test "x$enable_udev_acl" = "xyes"], [
331
332	PKG_CHECK_MODULES([UDEV_ACL], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0 libudev])
333	AC_CHECK_LIB([acl], [acl_init], [UDEV_ACL_LIBS="$UDEV_ACL_LIBS -lacl"], AC_MSG_ERROR([libacl not found]))
334	AC_CHECK_HEADER([acl/libacl.h], [:], AC_MSG_ERROR([libacl header not found]))
335	UDEVDIR=`$PKG_CONFIG --variable udevdir udev`
336	if test -z "$UDEVDIR" ; then
337		UDEVDIR="/lib/udev"
338	fi
339	AC_SUBST(UDEVDIR)
340])
341AM_CONDITIONAL([ENABLE_UDEV_ACL], [test "x$enable_udev_acl" = "xyes"])
342
343
344
345
346# DragonFly BSD supplies devattr, we already checked for the header above
347# make sure we can find the lib
348have_devattr=no
349AC_CHECK_LIB([devattr], [udev_device_unref], [
350	LIBS="$LIBS -ldevattr"
351	have_devattr=yes
352	])
353
354have_libprop=no
355AC_CHECK_LIB([prop], [prop_dictionary_get_cstring], [
356	LIBS="$LIBS -lprop"
357	have_libprop=yes
358	])
359
360
361use_udev=no
362if test ["x$LIBUDEV_FOUND" = "xyes" -a "x$LIBDRM_FOUND" = "xyes"]; then
363	use_udev=yes
364fi
365if test ["$have_devattr" = "yes" -a "$have_libprop" = "yes"]; then
366	use_udev=yes
367fi
368
369
370
371# we need both udev/devattr and libdrm for udev support
372AS_IF(test ["$use_udev" = "yes"], [
373  AC_DEFINE([USE_UDEV_BACKEND], [1], [Define if we meet requirements to use the udev backend])
374])
375AM_CONDITIONAL([USE_UDEV_BACKEND], [test ["$use_udev" = "yes"]])
376AC_SUBST(USE_UDEV_BACKEND)
377
378
379
380dnl ---------------------------------------------------------------------------
381dnl - Install directory for PAM security module
382dnl ---------------------------------------------------------------------------
383
384AC_ARG_WITH(pam-module-dir,
385	[AS_HELP_STRING([--with-pam-module-dir=<dir>],[directory to install PAM security module])])
386if ! test -z "$with_pam_module_dir"; then
387	PAM_MODULE_DIR="$with_pam_module_dir"
388else
389	PAM_MODULE_DIR="/lib/security"
390fi
391AC_SUBST(PAM_MODULE_DIR)
392
393
394dnl ---------------------------------------------------------------------------
395dnl - Install directory for xinitrc file
396dnl ---------------------------------------------------------------------------
397
398AC_ARG_WITH(xinitrc-dir,
399	[AS_HELP_STRING([--with-xinitrc-dir=<dir>],[directory to install Xsession.d script for ck-launch-session])])
400if ! test -z "$with_xinitrc_dir"; then
401	XINITRC_DIR="$with_xinitrc_dir"
402else
403	XINITRC_DIR="$sysconfdir/X11/xinit/xinitrc.d"
404fi
405AC_SUBST(XINITRC_DIR)
406
407dnl ---------------------------------------------------------------------------
408dnl - DocBook Documentation
409dnl ---------------------------------------------------------------------------
410
411AC_ARG_ENABLE(docbook-docs,
412	[AS_HELP_STRING([--enable-docbook-docs],[build documentation (requires xmlto)])],
413	enable_docbook_docs=$enableval,enable_docbook_docs=no)
414AC_PATH_PROG(XMLTO, xmlto, no)
415AC_MSG_CHECKING([whether to build DocBook documentation])
416if test x$XMLTO = xno ; then
417	have_docbook=no
418else
419	have_docbook=yes
420fi
421if test x$enable_docbook_docs = xauto ; then
422	 if test x$have_docbook = xno ; then
423        	enable_docbook_docs=no
424	else
425		enable_docbook_docs=yes
426	fi
427fi
428if test x$enable_docbook_docs = xyes; then
429	if test x$have_docbook = xno; then
430		AC_MSG_ERROR([Building DocBook docs explicitly required, but DocBook not found])
431	fi
432fi
433AM_CONDITIONAL(DOCBOOK_DOCS_ENABLED, test x$enable_docbook_docs = xyes)
434AC_MSG_RESULT(yes)
435
436AC_ARG_VAR([XMLTO],[Define/override the xmlto location.])
437AC_ARG_VAR([XMLTO_FLAGS],[Define/override xmlto options, like --skip-validation.])
438
439dnl ---------------------------------------------------------------------------
440dnl Check for xsltproc
441dnl ---------------------------------------------------------------------------
442AC_PATH_PROG([XSLTPROC], [xsltproc])
443
444
445# check for gtk-doc
446m4_ifdef([GTK_DOC_CHECK], [
447GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
448],[
449AM_CONDITIONAL([ENABLE_GTK_DOC], false)
450])
451
452dnl ---------------------------------------------------------------------------
453dnl check for inotify
454dnl ---------------------------------------------------------------------------
455
456enable_inotify=no
457AC_CHECK_FUNC(inotify_init,
458	[AC_CHECK_HEADER([sys/inotify.h],
459		[enable_inotify=yes],
460		[])],
461                [])
462
463AM_CONDITIONAL(ENABLE_INOTIFY, test "x$enable_inotify" = "xyes")
464
465if test "x$enable_inotify" = "xyes" ; then
466	AC_DEFINE(ENABLE_INOTIFY, [], [Define if we have inotify])
467fi
468
469dnl ---------------------------------------------------------------------------
470dnl check for RBAC
471dnl ---------------------------------------------------------------------------
472
473msg_rbac_shutdown=no
474AC_ARG_ENABLE(rbac-shutdown,
475	[AS_HELP_STRING([--enable-rbac-shutdown=<key>],[Build with RBAC support specifying shutdown/reboot RBAC authentication key])],
476	enable_rbac_shutdown=$enableval,enable_rbac_shutdown=no)
477if test "x$enable_rbac_shutdown" != "xno"; then
478	RBAC_LIBS="-lsecdb -lsocket -lnsl"
479	AC_DEFINE(ENABLE_RBAC_SHUTDOWN, [], [Set if we build with RBAC support])
480	AC_DEFINE_UNQUOTED(RBAC_SHUTDOWN_KEY, "$enable_rbac_shutdown", [Set if we build with RBAC support])
481	msg_rbac_shutdown="yes, using key $enable_rbac_shutdown"
482fi
483AC_SUBST(RBAC_LIBS)
484
485#
486# Enable Tests
487#
488AC_ARG_ENABLE(tests,
489	[AS_HELP_STRING([--enable-tests],[enable validation test framework @<:@default=@<:@disabled@:>@@:>@])],
490	enable_tests=yes, enable_tests=no)
491AC_MSG_CHECKING([whether to build the validation test framework])
492AM_CONDITIONAL(BUILD_TESTS, test "x$enable_tests" = "xyes")
493AC_MSG_RESULT($enable_tests)
494
495dnl ---------------------------------------------------------------------------
496dnl Finish
497dnl ---------------------------------------------------------------------------
498
499# Check for introspection for libck2
500GOBJECT_INTROSPECTION_CHECK([1.30.0])
501
502# Enable Debug
503XDT_FEATURE_DEBUG
504
505# Check for linker optimizations
506XDT_FEATURE_LINKER_OPTS()
507
508# Flags
509
510AC_SUBST(CK2_LIBS)
511AC_SUBST(TOOLS_LIBS)
512
513AC_SUBST(CFLAGS)
514AC_SUBST(CPPFLAGS)
515AC_SUBST(LDFLAGS)
516
517# systemd
518AC_ARG_WITH([systemdsystemunitdir],
519        AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
520        [], [with_systemdsystemunitdir=no])
521AS_IF([test "x$with_systemdsystemunitdir" != "xno"], [ AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
522AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != "xno"])
523
524# Misc version info
525VERSION_MESSAGE="${VERSION}"
526COPYRIGHT_MESSAGE="Copyright © ${COPYRIGHT_YEARS} the ConsoleKit2 team"
527AC_DEFINE_UNQUOTED(VERSION_MESSAGE, "${VERSION_MESSAGE}", [Simple version string])
528AC_DEFINE_UNQUOTED(COPYRIGHT_MESSAGE, "${COPYRIGHT_MESSAGE}", [Copyright string])
529AC_DEFINE_UNQUOTED(COPYRIGHT_YEARS, "${COPYRIGHT_YEARS}", [The copyright years])
530AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MAJOR,${VERSION_MAJOR}, [version major number])
531AC_DEFINE_UNQUOTED(PACKAGE_VERSION_MINOR,${VERSION_MINOR}, [version minor number])
532AC_DEFINE_UNQUOTED(PACKAGE_VERSION_REVISION,${VERSION_REVISION}, [version revision number])
533AC_DEFINE_UNQUOTED(PACKAGE, "ConsoleKit2", [The name of this package])
534AC_SUBST(COPYRIGHT_MESSAGE)
535AC_SUBST(VERSION_MESSAGE)
536AC_SUBST(VERSION_MAJOR)
537AC_SUBST(VERSION_MINOR)
538AC_SUBST(VERSION_REVISION)
539AC_SUBST(COPYRIGHT_YEARS)
540AC_SUBST(PACKAGE)
541
542# Files
543
544AC_CONFIG_FILES([
545Makefile
546src/Makefile
547tools/70-udev-acl.rules
548tools/71-udev-seat.rules
549tools/Makefile
550tools/linux/Makefile
551tools/freebsd/Makefile
552tools/netbsd/Makefile
553tools/openbsd/Makefile
554tools/solaris/Makefile
555data/Makefile
556doc/Makefile
557doc/console-kit-daemon.1m
558doc/dbus/ConsoleKit.xml
559doc/dbus/Makefile
560libconsolekit/Makefile
561libconsolekit/libconsolekit.pc
562libck-connector/Makefile
563libck-connector/ck-connector.pc
564pam-ck-connector/Makefile
565po/Makefile.in
566])
567
568AC_OUTPUT
569
570echo "
571                    ConsoleKit $VERSION
572                    ========================
573
574	prefix:                   ${prefix}
575	exec_prefix:              ${exec_prefix}
576        libdir:                   ${libdir}
577        bindir:                   ${bindir}
578        sbindir:                  ${sbindir}
579        sysconfdir:               ${sysconfdir}
580        localstatedir:            ${localstatedir}
581        rundir:                   ${RUNDIR}
582        datadir:                  ${datadir}
583	source code location:	  ${srcdir}
584	compiler:		  ${CC}
585	cflags:		          ${CFLAGS}
586        Debugging support:        $enable_debug
587	build tests:              ${enable_tests}
588        Maintainer mode:          ${USE_MAINTAINER_MODE}
589
590        dbus-1 system.d dir:      ${DBUS_SYS_DIR}
591        Build backend:            ${CK_BACKEND}
592        PAM module dir:           ${PAM_MODULE_DIR}
593        Build PAM module:         ${msg_pam_module}
594        Build udev-acl:           ${enable_udev_acl}"
595
596if test x"$LIBUDEV_FOUND" = x"yes"; then
597echo "        udev support              yes"
598else
599echo "        udev support              no"
600fi
601
602if test x"$CGMANAGER_FOUND" = x"yes"; then
603echo "        cgroup support            yes"
604else
605echo "        cgroup support            no"
606fi
607
608if test x"$LIBEVDEV_FOUND" = x"yes"; then
609echo "        libevdev support          yes"
610else
611echo "        libevdev support          no"
612fi
613
614if test x"$LIBDRM_FOUND" = x"yes"; then
615echo "        libdrm support            yes"
616else
617echo "        libdrm support            no"
618fi
619
620if test "$use_udev" = "yes"; then
621echo "        session controller        udev"
622else
623echo "        session controller        none"
624fi
625
626if test x"$SELINUX_FOUND" = x"yes"; then
627echo "        SELinux support:          yes"
628else
629echo "        SELinux support:          no"
630fi
631
632echo "
633        Build docs:               ${enable_docbook_docs}
634        xinitrc dir:              ${XINITRC_DIR}"
635
636if test x"$POLKIT_FOUND" = x"yes"; then
637echo "        PolicyKit support         yes"
638else
639echo "        PolicyKit support         no"
640fi
641
642echo "        RBAC (Solaris) support:   ${msg_rbac_shutdown}"
643
644if test x"$POLKIT_FOUND" != x"yes" -a x${msg_rbac_shutdown} = xno; then
645   echo "WARNING: PolicyKit and RBAC are disabled. You need to manually edit the ConsoleKit.conf"
646   echo "         file to lock down the service. Failure to do so may be"
647   echo "         a huge SECURITY HOLE. I repeat: YOU NEED TO EDIT THE FILE"
648   echo "         ConsoleKit.conf to match your distro/site to avoid NASTY SECURITY HOLES."
649   echo ""
650fi
651