4 m4_define([dbus_major_version], [1])
5 m4_define([dbus_minor_version], [2])
6 m4_define([dbus_micro_version], [24])
7 m4_define([dbus_version],
8 [dbus_major_version.dbus_minor_version.dbus_micro_version])
9 AC_INIT(dbus, [dbus_version])
13 AM_INIT_AUTOMAKE([1.9 tar-ustar])
14 AM_CONFIG_HEADER(config.h)
17 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
19 GETTEXT_PACKAGE=dbus-1
20 AC_SUBST(GETTEXT_PACKAGE)
21 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The name of the gettext domain])
23 ## must come before we use the $USE_MAINTAINER_MODE variable later
26 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
28 # libtool versioning - this applies to libdbus
30 # See http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91 for details
33 ## increment if the interface has additions, changes, removals.
36 ## increment any time the source changes; set to
37 ## 0 if you increment CURRENT
40 ## increment if any interfaces have been added; set to 0
41 ## if any interfaces have been changed or removed. removal has
42 ## precedence over adding, so set to 0 if both happened.
49 DBUS_MAJOR_VERSION=dbus_major_version
50 DBUS_MINOR_VERSION=dbus_minor_version
51 DBUS_MICRO_VERSION=dbus_micro_version
52 DBUS_VERSION=dbus_major_version.dbus_minor_version.dbus_micro_version
54 AC_SUBST(DBUS_MAJOR_VERSION)
55 AC_SUBST(DBUS_MINOR_VERSION)
56 AC_SUBST(DBUS_MICRO_VERSION)
57 AC_SUBST(DBUS_VERSION)
67 AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests],[enable unit test code]),enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE)
68 AC_ARG_ENABLE(ansi, AS_HELP_STRING([--enable-ansi],[enable -ansi -pedantic gcc flags]),enable_ansi=$enableval,enable_ansi=no)
69 AC_ARG_ENABLE(verbose-mode, AS_HELP_STRING([--enable-verbose-mode],[support verbose debug mode]),enable_verbose_mode=$enableval,enable_verbose_mode=$USE_MAINTAINER_MODE)
70 AC_ARG_ENABLE(asserts, AS_HELP_STRING([--enable-asserts],[include assertion checks]),enable_asserts=$enableval,enable_asserts=$USE_MAINTAINER_MODE)
71 AC_ARG_ENABLE(checks, AS_HELP_STRING([--enable-checks],[include sanity checks on public API]),enable_checks=$enableval,enable_checks=yes)
72 AC_ARG_ENABLE(xml-docs, AS_HELP_STRING([--enable-xml-docs],[build XML documentation (requires xmlto)]),enable_xml_docs=$enableval,enable_xml_docs=auto)
73 AC_ARG_ENABLE(doxygen-docs, AS_HELP_STRING([--enable-doxygen-docs],[build DOXYGEN documentation (requires Doxygen)]),enable_doxygen_docs=$enableval,enable_doxygen_docs=auto)
74 AC_ARG_ENABLE(gcov, AS_HELP_STRING([--enable-gcov],[compile with coverage profiling instrumentation (gcc only)]),enable_gcov=$enableval,enable_gcov=no)
75 AC_ARG_ENABLE(abstract-sockets, AS_HELP_STRING([--enable-abstract-sockets],[use abstract socket namespace (linux only)]),enable_abstract_sockets=$enableval,enable_abstract_sockets=auto)
76 AC_ARG_ENABLE(selinux, AS_HELP_STRING([--enable-selinux],[build with SELinux support]),enable_selinux=$enableval,enable_selinux=auto)
77 AC_ARG_ENABLE(libaudit,AS_HELP_STRING([--enable-libaudit],[build audit daemon support for SELinux]),enable_libaudit=$enableval,enable_libaudit=auto)
78 AC_ARG_ENABLE(dnotify, AS_HELP_STRING([--enable-dnotify],[build with dnotify support (linux only)]),enable_dnotify=$enableval,enable_dnotify=auto)
79 AC_ARG_ENABLE(inotify, AS_HELP_STRING([--enable-inotify],[build with inotify support (linux only)]),enable_inotify=$enableval,enable_inotify=auto)
80 AC_ARG_ENABLE(kqueue, AS_HELP_STRING([--enable-kqueue],[build with kqueue support]),enable_kqueue=$enableval,enable_kqueue=auto)
81 AC_ARG_ENABLE(console-owner-file, AS_HELP_STRING([--enable-console-owner-file],[enable console owner file]),enable_console_owner_file=$enableval,enable_console_owner_file=auto)
82 AC_ARG_ENABLE(userdb-cache, AS_HELP_STRING([--enable-userdb-cache],[build with userdb-cache support]),enable_userdb_cache=$enableval,enable_userdb_cache=yes)
84 AC_ARG_WITH(xml, AS_HELP_STRING([--with-xml=[libxml/expat]],[XML library to use]))
85 AC_ARG_WITH(init-scripts, AS_HELP_STRING([--with-init-scripts=[redhat]],[Style of init scripts to install]))
86 AC_ARG_WITH(session-socket-dir, AS_HELP_STRING([--with-session-socket-dir=[dirname]],[Where to put sockets for the per-login-session message bus]))
87 AC_ARG_WITH(test-socket-dir, AS_HELP_STRING([--with-test-socket-dir=[dirname]],[Where to put sockets for make check]))
88 AC_ARG_WITH(system-pid-file, AS_HELP_STRING([--with-system-pid-file=[pidfile]],[PID file for systemwide daemon]))
89 AC_ARG_WITH(system-socket, AS_HELP_STRING([--with-system-socket=[filename]],[UNIX domain socket for systemwide daemon]))
90 AC_ARG_WITH(console-auth-dir, AS_HELP_STRING([--with-console-auth-dir=[dirname]],[directory to check for console ownerhip]))
91 AC_ARG_WITH(console-owner-file, AS_HELP_STRING([--with-console-owner-file=[filename]],[file whose owner determines current console owner]))
92 AC_ARG_WITH(dbus_user, AS_HELP_STRING([--with-dbus-user=<user>],[User for running the DBUS daemon (messagebus)]))
93 AC_ARG_WITH(dbus_daemondir, AS_HELP_STRING([--with-dbus-daemondir=[dirname]],[Directory for installing the DBUS daemon]))
95 AC_DEFINE(DBUS_UNIX,1,[dbus on unix])
97 dnl DBUS_BUILD_TESTS controls unit tests built in to .c files
98 dnl and also some stuff in the test/ subdir
99 AM_CONDITIONAL(DBUS_BUILD_TESTS, test x$enable_tests = xyes)
100 if test x$enable_tests = xyes; then
101 AC_DEFINE(DBUS_BUILD_TESTS,1,[Build test code])
104 if test x$enable_verbose_mode = xyes; then
105 AC_DEFINE(DBUS_ENABLE_VERBOSE_MODE,1,[Support a verbose mode])
108 if test x$enable_asserts = xno; then
109 AC_DEFINE(DBUS_DISABLE_ASSERT,1,[Disable assertion checking])
110 AC_DEFINE(G_DISABLE_ASSERT,1,[Disable GLib assertion macros])
113 # -rdynamic is needed for glibc's backtrace_symbols to work.
114 # No clue how much overhead this adds, but it's useful
115 # to do this on any assertion failure,
116 # so for now it's enabled anytime asserts are (currently not
117 # in production builds).
119 # To get -rdynamic you pass -export-dynamic to libtool.
120 AC_DEFINE(DBUS_BUILT_R_DYNAMIC,1,[whether -export-dynamic was passed to libtool])
121 R_DYNAMIC_LDFLAG=-export-dynamic
123 AC_SUBST(R_DYNAMIC_LDFLAG)
125 if test x$enable_checks = xno; then
126 AC_DEFINE(DBUS_DISABLE_CHECKS,1,[Disable public API sanity checking])
127 AC_DEFINE(G_DISABLE_CHECKS,1,[Disable GLib public API sanity checking])
130 if test x$enable_userdb_cache = xyes; then
131 AC_DEFINE(DBUS_ENABLE_USERDB_CACHE,1,[Build with caching of user data])
134 if test x$enable_gcov = xyes; then
135 ## so that config.h changes when you toggle gcov support
136 AC_DEFINE_UNQUOTED(DBUS_GCOV_ENABLED, 1, [Defined if gcov is enabled to force a rebuild due to config.h changing])
138 AC_MSG_CHECKING([for gcc 3.3 version of gcov file format])
140 AC_RUN_IFELSE( [AC_LANG_PROGRAM( , [[ if (__GNUC__ >=3 && __GNUC_MINOR__ >= 3) exit (0); else exit (1); ]])],
142 if test x$have_gcc33_gcov = xyes ; then
143 AC_DEFINE_UNQUOTED(DBUS_HAVE_GCC33_GCOV, 1, [Defined if we have gcc 3.3 and thus the new gcov format])
145 AC_MSG_RESULT($have_gcc33_gcov)
147 AM_CONDITIONAL(DBUS_GCOV_ENABLED, test x$enable_gcov = xyes)
149 # glibc21.m4 serial 3
150 dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc.
151 dnl This file is free software; the Free Software Foundation
152 dnl gives unlimited permission to copy and/or distribute it,
153 dnl with or without modifications, as long as this notice is preserved.
155 # Test for the GNU C Library, version 2.1 or newer.
158 AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
159 ac_cv_gnu_library_2_1,
160 [AC_EGREP_CPP([Lucky GNU user],
162 #include <features.h>
163 #ifdef __GNU_LIBRARY__
164 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
169 ac_cv_gnu_library_2_1=yes,
170 ac_cv_gnu_library_2_1=no)
176 AC_CHECK_SIZEOF(char)
177 AC_CHECK_SIZEOF(short)
178 AC_CHECK_SIZEOF(long)
180 AC_CHECK_SIZEOF(void *)
181 AC_CHECK_SIZEOF(long long)
182 AC_CHECK_SIZEOF(__int64)
184 ### See what our 64 bit type is called
185 AC_MSG_CHECKING([64-bit integer type])
190 dbusint64_constant='(val)'
191 dbusuint64_constant='(val)'
192 dbusint64_printf_modifier='""'
196 dbusint64_constant='(val##L)'
197 dbusuint64_constant='(val##UL)'
198 dbusint64_printf_modifier='"l"'
200 $ac_cv_sizeof_long_long)
201 dbusint64='long long'
202 dbusint64_constant='(val##LL)'
203 dbusuint64_constant='(val##ULL)'
204 # Ideally we discover what the format is, but this is
205 # only used in verbose mode, so eh...
206 if test x"$ac_cv_gnu_library_2_1" = xyes; then
207 dbusint64_printf_modifier='"ll"'
210 $ac_cv_sizeof___int64)
212 dbusint64_constant='(val##i64)'
213 dbusuint64_constant='(val##ui64)'
215 if test x"$ac_cv_gnu_library_2_1" = xyes; then
216 dbusint64_printf_modifier='"ll"'
221 if test -z "$dbusint64" ; then
222 DBUS_INT64_TYPE="no_int64_type_detected"
225 DBUS_UINT64_CONSTANT=
226 AC_MSG_RESULT([none found])
228 DBUS_INT64_TYPE="$dbusint64"
230 DBUS_INT64_CONSTANT="$dbusint64_constant"
231 DBUS_UINT64_CONSTANT="$dbusuint64_constant"
232 if test x"$dbusint64_printf_modifier" != x; then
233 AC_DEFINE_UNQUOTED(DBUS_INT64_PRINTF_MODIFIER, [$dbusint64_printf_modifier], [Define to printf modifier for 64 bit integer type])
235 AC_MSG_RESULT($DBUS_INT64_TYPE)
238 AC_SUBST(DBUS_INT64_TYPE)
239 AC_SUBST(DBUS_INT64_CONSTANT)
240 AC_SUBST(DBUS_UINT64_CONSTANT)
241 AC_SUBST(DBUS_HAVE_INT64)
243 ### see what 32-bit int is called
244 AC_MSG_CHECKING([32-bit integer type])
258 if test -z "$dbusint32" ; then
259 DBUS_INT32_TYPE="no_int32_type_detected"
260 AC_MSG_ERROR([No 32-bit integer type found])
262 DBUS_INT32_TYPE="$dbusint32"
263 AC_MSG_RESULT($DBUS_INT32_TYPE)
266 AC_SUBST(DBUS_INT32_TYPE)
268 ### see what 16-bit int is called
269 AC_MSG_CHECKING([16-bit integer type])
280 if test -z "$dbusint16" ; then
281 DBUS_INT16_TYPE="no_int16_type_detected"
282 AC_MSG_ERROR([No 16-bit integer type found])
284 DBUS_INT16_TYPE="$dbusint16"
285 AC_MSG_RESULT($DBUS_INT16_TYPE)
288 AC_SUBST(DBUS_INT16_TYPE)
293 # check at compile-time, so that it is possible to build universal
294 # (with multiple architectures at once on the compile line)
295 AH_VERBATIM([WORDS_BIGENDIAN_DARWIN], [
296 /* Use the compiler-provided endianness defines to allow universal compiling. */
297 #if defined(__BIG_ENDIAN__)
298 #define WORDS_BIGENDIAN 1
307 dnl **********************************
308 dnl *** va_copy checks (from GLib) ***
309 dnl **********************************
310 dnl we currently check for all three va_copy possibilities, so we get
311 dnl all results in config.log for bug reports.
312 AC_CACHE_CHECK([for an implementation of va_copy()],dbus_cv_va_copy,[
313 AC_LINK_IFELSE([#include <stdarg.h>
315 static void f (int i, ...) {
316 va_list args1, args2;
318 va_copy (args2, args1);
319 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
321 va_end (args1); va_end (args2);
327 [dbus_cv_va_copy=yes],
328 [dbus_cv_va_copy=no])
330 AC_CACHE_CHECK([for an implementation of __va_copy()],dbus_cv___va_copy,[
331 AC_LINK_IFELSE([#include <stdarg.h>
333 static void f (int i, ...) {
334 va_list args1, args2;
336 __va_copy (args2, args1);
337 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
339 va_end (args1); va_end (args2);
345 [dbus_cv___va_copy=yes],
346 [dbus_cv___va_copy=no])
349 if test "x$dbus_cv_va_copy" = "xyes"; then
350 dbus_va_copy_func=va_copy
351 else if test "x$dbus_cv___va_copy" = "xyes"; then
352 dbus_va_copy_func=__va_copy
356 if test -n "$dbus_va_copy_func"; then
357 AC_DEFINE_UNQUOTED(DBUS_VA_COPY,$dbus_va_copy_func,[A 'va_copy' style function])
361 AC_CACHE_CHECK([whether va_lists can be copied by value],
363 [AC_RUN_IFELSE([AC_LANG_PROGRAM(
369 static void f (int i, ...) {
370 va_list args1, args2;
373 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
375 va_end (args1); va_end (args2);
382 [dbus_cv_va_val_copy=yes],
383 [dbus_cv_va_val_copy=no],
384 [dbus_cv_va_val_copy=yes])
388 if test "x$dbus_cv_va_val_copy" = "xno"; then
389 AC_DEFINE(DBUS_VA_COPY_AS_ARRAY,1, ['va_lists' cannot be copies as values])
393 #### Atomic integers (checks by Sebastian Wilhelmi for GLib)
394 AC_MSG_CHECKING([whether to use inline assembler routines for atomic integers])
395 have_atomic_inc_cond=0
396 if test x"$GCC" = xyes; then
397 if test "x$enable_ansi" = "xyes"; then
407 AC_MSG_RESULT([darwin])
408 # check at compile-time, so that it is possible to build universal
409 # (with multiple architectures at once on the compile line)
410 have_atomic_inc_cond="(defined(__i386__) || defined(__x86_64__))"
413 AC_MSG_RESULT([i486])
414 have_atomic_inc_cond=1
424 AC_DEFINE_UNQUOTED([DBUS_USE_ATOMIC_INT_486_COND], [$have_atomic_inc_cond],
425 [Always defined; expands to 1 if we should use atomic integer implementation for 486, else 0])
426 AC_DEFINE_UNQUOTED(DBUS_HAVE_ATOMIC_INT_COND, [$have_atomic_inc_cond],
427 [Always defined; expands to 1 if we have an atomic integer implementation, else 0])
429 #### Various functions
430 AC_SEARCH_LIBS(socket,[socket network])
431 AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)])
433 AC_CHECK_FUNCS(vsnprintf vasprintf nanosleep usleep setenv clearenv unsetenv socketpair getgrouplist fpathconf setrlimit poll)
435 #### Check for broken poll; taken from Glib's configure
437 AC_MSG_CHECKING([for broken poll])
438 AC_RUN_IFELSE([AC_LANG_SOURCE([[
442 #ifdef HAVE_SYS_POLL_H
443 #include <sys/poll.h>
446 struct pollfd fds[1];
448 fd = open("/dev/null", 1);
450 fds[0].events = POLLIN;
452 if (poll(fds, 1, 0) < 0 || (fds[0].revents & POLLNVAL) != 0) {
453 exit(1); /* Does not work for devices -- fail */
459 AC_DEFINE(BROKEN_POLL,1,[poll doesn't work on devices])],
460 [broken_poll="no (cross compiling)"])
461 AC_MSG_RESULT($broken_poll)
463 AC_MSG_CHECKING(for dirfd)
465 #include <sys/types.h>
473 dbus_have_dirfd=yes, dbus_have_dirfd=no)
474 AC_MSG_RESULT($dbus_have_dirfd)
475 if test "$dbus_have_dirfd" = yes; then
476 AC_DEFINE(HAVE_DIRFD,1,[Have dirfd function])
478 AC_MSG_CHECKING(for DIR *dirp->dd_fd)
480 #include <sys/types.h>
489 dbus_have_ddfd=yes, dbus_have_ddfd=no)
490 AC_MSG_RESULT($dbus_have_ddfd)
491 if test "$dbus_have_ddfd" = yes; then
492 AC_DEFINE(HAVE_DDFD,1,[Have the ddfd member of DIR])
496 AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
498 AC_CHECK_HEADERS(errno.h)
500 AC_CHECK_HEADERS(unistd.h)
502 # Add -D_POSIX_PTHREAD_SEMANTICS if on Solaris
506 CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS" ;;
509 # checking for a posix version of getpwnam_r
510 # if we are cross compiling and can not run the test
511 # assume getpwnam_r is the posix version
512 # it is up to the person cross compiling to change
513 # this behavior if desired
515 AC_CACHE_CHECK([for posix getpwnam_r],
516 ac_cv_func_posix_getpwnam_r,
517 [AC_RUN_IFELSE([AC_LANG_PROGRAM(
524 struct passwd pwd, *pwptr = &pwd;
527 error = getpwnam_r ("", &pwd, buffer,
528 sizeof (buffer), &pwptr);
529 return (error < 0 && errno == ENOSYS)
532 [ac_cv_func_posix_getpwnam_r=yes],
533 [ac_cv_func_posix_getpwnam_r=no],
534 [ac_cv_func_posix_getpwnam_r=yes]
538 if test "$ac_cv_func_posix_getpwnam_r" = yes; then
539 AC_DEFINE(HAVE_POSIX_GETPWNAM_R,1,
540 [Have POSIX function getpwnam_r])
542 AC_CACHE_CHECK([for nonposix getpwnam_r],
543 ac_cv_func_nonposix_getpwnam_r,
544 [AC_TRY_LINK([#include <pwd.h>],
547 getpwnam_r ("", &pwd, buffer,
549 [ac_cv_func_nonposix_getpwnam_r=yes],
550 [ac_cv_func_nonposix_getpwnam_r=no])])
551 if test "$ac_cv_func_nonposix_getpwnam_r" = yes; then
552 AC_DEFINE(HAVE_NONPOSIX_GETPWNAM_R,1,
553 [Have non-POSIX function getpwnam_r])
557 dnl check for socklen_t
558 AC_MSG_CHECKING(whether socklen_t is defined)
560 #include <sys/types.h>
561 #include <sys/socket.h>
566 ],dbus_have_socklen_t=yes,dbus_have_socklen_t=no)
567 AC_MSG_RESULT($dbus_have_socklen_t)
569 if test "x$dbus_have_socklen_t" = "xyes"; then
570 AC_DEFINE(HAVE_SOCKLEN_T,1,[Have socklen_t type])
573 dnl check for writev header and writev function so we're
574 dnl good to go if HAVE_WRITEV gets defined.
575 AC_CHECK_HEADERS(sys/uio.h, [AC_CHECK_FUNCS(writev)])
577 dnl needed on darwin for NAME_MAX
578 AC_CHECK_HEADERS(sys/syslimits.h)
580 dnl check for flavours of varargs macros (test from GLib)
581 AC_MSG_CHECKING(for ISO C99 varargs macros in C)
583 int a(int p1, int p2, int p3);
584 #define call_a(...) a(1,__VA_ARGS__)
586 ],dbus_have_iso_c_varargs=yes,dbus_have_iso_c_varargs=no)
587 AC_MSG_RESULT($dbus_have_iso_c_varargs)
589 AC_MSG_CHECKING(for GNUC varargs macros)
591 int a(int p1, int p2, int p3);
592 #define call_a(params...) a(1,params)
594 ],dbus_have_gnuc_varargs=yes,dbus_have_gnuc_varargs=no)
595 AC_MSG_RESULT($dbus_have_gnuc_varargs)
597 dnl Output varargs tests
598 if test x$dbus_have_iso_c_varargs = xyes; then
599 AC_DEFINE(HAVE_ISO_VARARGS,1,[Have ISO C99 varargs macros])
601 if test x$dbus_have_gnuc_varargs = xyes; then
602 AC_DEFINE(HAVE_GNUC_VARARGS,1,[Have GNU-style varargs macros])
605 dnl Check for various credentials.
606 AC_MSG_CHECKING(for struct cmsgcred)
608 #include <sys/types.h>
609 #include <sys/socket.h>
611 struct cmsgcred cred;
614 ],dbus_have_struct_cmsgcred=yes,dbus_have_struct_cmsgcred=no)
615 AC_MSG_RESULT($dbus_have_struct_cmsgcred)
617 if test x$dbus_have_struct_cmsgcred = xyes; then
618 AC_DEFINE(HAVE_CMSGCRED,1,[Have cmsgcred structure])
621 AC_CHECK_FUNCS(getpeerucred getpeereid)
623 #### Abstract sockets
625 if test x$enable_abstract_sockets = xauto; then
628 AC_CACHE_CHECK([abstract socket namespace],
629 ac_cv_have_abstract_sockets,
630 [AC_RUN_IFELSE([AC_LANG_PROGRAM(
632 #include <sys/types.h>
636 #include <sys/socket.h>
642 struct sockaddr_un addr;
644 listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
648 fprintf (stderr, "socket() failed: %s\n", strerror (errno));
652 memset (&addr, '\0', sizeof (addr));
653 addr.sun_family = AF_UNIX;
654 strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test");
655 addr.sun_path[0] = '\0'; /* this is what makes it abstract */
657 if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
659 fprintf (stderr, "Abstract socket namespace bind() failed: %s\n",
666 [ac_cv_have_abstract_sockets=yes],
667 [ac_cv_have_abstract_sockets=no],
669 ac_cv_have_abstract_sockets=no
673 if test x$warn_on_xcompile = xyes ; then
674 AC_MSG_WARN([Cannot check for abstract sockets when cross-compiling, please use --enable-abstract-sockets])
679 if test x$enable_abstract_sockets = xyes; then
680 if test x$ac_cv_have_abstract_sockets = xno; then
681 AC_MSG_ERROR([Abstract sockets explicitly required, and support not detected.])
685 if test x$enable_abstract_sockets = xno; then
686 ac_cv_have_abstract_sockets=no;
689 if test x$ac_cv_have_abstract_sockets = xyes ; then
690 DBUS_PATH_OR_ABSTRACT=abstract
691 AC_DEFINE(HAVE_ABSTRACT_SOCKETS,1,[Have abstract socket namespace])
693 DBUS_PATH_OR_ABSTRACT=path
696 # this is used in addresses to prefer abstract, e.g.
697 # unix:path=/foo or unix:abstract=/foo
698 AC_SUBST(DBUS_PATH_OR_ABSTRACT)
700 #### Sort out XML library
703 AC_CHECK_LIB(expat, XML_ParserCreate_MM,
704 [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ],
707 # see what we want to use
708 dbus_use_libxml=false
710 if test x$with_xml = xexpat; then
711 if ! $have_expat ; then
712 AC_MSG_ERROR([Explicitly requested expat but expat not found])
715 elif test x$with_xml = xlibxml; then
716 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.6.0, have_libxml=true, have_libxml=false)
717 if ! $have_libxml ; then
718 AC_MSG_ERROR([Explicitly requested libxml but libxml not found])
722 ### expat is the default because libxml can't currently survive
723 ### our brutal OOM-handling unit test setup.
724 ### http://bugzilla.gnome.org/show_bug.cgi?id=109368
725 if test x$have_expat = xfalse; then
726 AC_MSG_ERROR([Could not find expat.h, check config.log for failed attempts])
728 ### By default, only use Expat since it's tested and known to work. If you're a
729 ### general-purpose OS vendor, please don't enable libxml. For embedded use
730 ### if your OS is built around libxml, that's another case.
734 AM_CONDITIONAL(DBUS_USE_EXPAT, $dbus_use_expat)
735 AM_CONDITIONAL(DBUS_USE_LIBXML, $dbus_use_libxml)
737 if $dbus_use_expat; then
741 if $dbus_use_libxml; then
742 XML_LIBS=$LIBXML_LIBS
743 XML_CFLAGS=$LIBXML_CFLAGS
746 # Thread lib detection
747 AC_CHECK_FUNC(pthread_cond_timedwait,[AC_CHECK_LIB(pthread,pthread_cond_timedwait,
748 [THREAD_LIBS="-lpthread"])])
750 LIBS="$LIBS $THREAD_LIBS"
751 AC_CHECK_FUNC(pthread_condattr_setclock,have_pthread_condattr_setclock=true,have_pthread_condattr_setclock=false)
752 if test x$have_pthread_condattr_setclock = xtrue; then
753 AC_SEARCH_LIBS([clock_getres],[rt],[THREAD_LIBS="$THREAD_LIBS -lrt"])
754 AC_MSG_CHECKING([for CLOCK_MONOTONIC])
755 AC_TRY_COMPILE([#include <time.h>
758 struct timespec monotonic_timer;
759 pthread_condattr_t attr;
760 pthread_condattr_init (&attr);
761 pthread_condattr_setclock (&attr, CLOCK_MONOTONIC);
762 clock_getres (CLOCK_MONOTONIC,&monotonic_timer);
763 ], have_clock_monotonic=true, have_clock_monotonic=false)
764 if test x$have_clock_monotonic = xtrue; then
765 AC_MSG_RESULT([found])
766 AC_DEFINE(HAVE_MONOTONIC_CLOCK, 1, [Define if we have CLOCK_MONOTONIC])
768 AC_MSG_RESULT([not found])
774 if test x$enable_selinux = xno ; then
777 # See if we have SELinux library
778 AC_CHECK_LIB(selinux, is_selinux_enabled,
779 have_selinux=yes, have_selinux=no)
781 # see if we have the SELinux header with the new D-Bus stuff in it
782 if test x$have_selinux = xyes ; then
783 AC_MSG_CHECKING([for DBUS Flask permissions in selinux/av_permissions.h])
784 AC_TRY_COMPILE([#include <selinux/av_permissions.h>],
785 [#ifdef DBUS__ACQUIRE_SVC return 0;
787 #error DBUS__ACQUIRE_SVC not defined
789 have_selinux=yes, have_selinux=no)
790 AC_MSG_RESULT($have_selinux)
793 if test x$enable_selinux = xauto ; then
794 if test x$have_selinux = xno ; then
795 AC_MSG_WARN([Sufficiently new SELinux library not found])
798 if test x$have_selinux = xno ; then
799 AC_MSG_ERROR([SElinux explicitly required, and SELinux library not found])
804 AM_CONDITIONAL(HAVE_SELINUX, test x$have_selinux = xyes)
806 if test x$have_selinux = xyes ; then
807 # the selinux code creates threads
808 # which requires libpthread even on linux
809 AC_CHECK_FUNC(pthread_create,,[AC_CHECK_LIB(pthread,pthread_create,
810 [SELINUX_THREAD_LIBS="-lpthread"])])
812 SELINUX_LIBS="-lselinux $SELINUX_THREAD_LIBS"
813 AC_DEFINE(HAVE_SELINUX,1,[SELinux support])
819 if test x$enable_inotify = xno ; then
822 AC_CHECK_HEADERS(sys/inotify.h, have_inotify=yes, have_inotify=no)
825 dnl check if inotify backend is enabled
826 if test x$have_inotify = xyes; then
827 AC_DEFINE(DBUS_BUS_ENABLE_INOTIFY,1,[Use inotify])
828 AC_CHECK_FUNCS(inotify_init1)
831 AM_CONDITIONAL(DBUS_BUS_ENABLE_INOTIFY, test x$have_inotify = xyes)
834 if test x$enable_dnotify = xno ; then
837 if test x$have_inotify = xno -a x$host_os = xlinux-gnu -o x$host_os = xlinux; then
844 dnl check if dnotify backend is enabled
845 if test x$have_dnotify = xyes; then
846 AC_DEFINE(DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX,1,[Use dnotify on Linux])
849 AM_CONDITIONAL(DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX, test x$have_dnotify = xyes)
852 if test x$enable_kqueue = xno ; then
856 AC_CHECK_HEADER(sys/event.h, , have_kqueue=no)
857 AC_CHECK_FUNC(kqueue, , have_kqueue=no)
859 if test x$enable_kqueue = xyes -a x$have_kqueue = xno; then
860 AC_MSG_ERROR(kqueue support explicitly enabled but not available)
864 dnl check if kqueue backend is enabled
865 if test x$have_kqueue = xyes; then
866 AC_DEFINE(DBUS_BUS_ENABLE_KQUEUE,1,[Use kqueue])
869 AM_CONDITIONAL(DBUS_BUS_ENABLE_KQUEUE, test x$have_kqueue = xyes)
871 dnl console owner file
872 if test x$enable_console_owner_file = xno ; then
873 have_console_owner_file=no;
877 have_console_owner_file=yes;
878 AC_DEFINE(HAVE_CONSOLE_OWNER_FILE,1,[Have console owner file])
881 have_console_owner_file=no;;
885 AM_CONDITIONAL(HAVE_CONSOLE_OWNER_FILE, test x$have_console_owner_file = xyes)
888 if test x$enable_libaudit = xno ; then
891 # See if we have audit daemon & capabilities library
892 AC_CHECK_LIB(audit, audit_log_user_avc_message,
893 have_libaudit=yes, have_libaudit=no)
894 if test x$have_libaudit = xyes ; then
895 AC_CHECK_LIB(cap-ng, capng_clear,
896 have_libaudit=yes, have_libaudit=no)
900 AM_CONDITIONAL(HAVE_LIBAUDIT, test x$have_libaudit = xyes)
902 if test x$have_libaudit = xyes ; then
903 SELINUX_LIBS="$SELINUX_LIBS -laudit -lcap-ng"
904 AC_DEFINE(HAVE_LIBAUDIT,1,[audit daemon SELinux support])
908 AC_MSG_CHECKING(for ADT API)
909 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
911 adt_user_context = ADT_USER;
912 ]], [[]])], [ check_adt_audit=yes ], [ check_adt_audit=no ])
914 if test ${check_adt_audit} = yes
916 AC_DEFINE([HAVE_ADT], [], [Adt audit API])
925 #### Set up final flags
927 DBUS_CLIENT_LIBS="$THREAD_LIBS"
928 AC_SUBST(DBUS_CLIENT_CFLAGS)
929 AC_SUBST(DBUS_CLIENT_LIBS)
931 DBUS_BUS_CFLAGS="$XML_CFLAGS"
932 DBUS_BUS_LIBS="$XML_LIBS $SELINUX_LIBS $INTLLIBS $THREAD_LIBS $ADT_LIBS"
933 AC_SUBST(DBUS_BUS_CFLAGS)
934 AC_SUBST(DBUS_BUS_LIBS)
936 DBUS_LAUNCHER_CFLAGS="$XML_CFLAGS"
937 DBUS_LAUNCHER_LIBS="$XML_LIBS $THREAD_LIBS"
938 AC_SUBST(DBUS_LAUNCHER_CFLAGS)
939 AC_SUBST(DBUS_LAUNCHER_LIBS)
942 DBUS_TEST_LIBS="$THREAD_LIBS"
943 AC_SUBST(DBUS_TEST_CFLAGS)
944 AC_SUBST(DBUS_TEST_LIBS)
949 ## for now enable_x11 just tracks have_x11,
950 ## there's no --enable-x11
951 if test x$no_x = xyes ; then
959 if test x$enable_x11 = xyes ; then
960 AC_DEFINE(DBUS_BUILD_X11,1,[Build X11-dependent code])
961 DBUS_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
962 DBUS_X_CFLAGS="$X_CFLAGS"
968 AC_SUBST(DBUS_X_CFLAGS)
969 AC_SUBST(DBUS_X_LIBS)
972 #### gcc warning flags
975 AC_MSG_CHECKING(whether $CC supports "$@")
978 $CC -c "$@" ${Cfile}.c -o ${Cfile}.o >/dev/null 2>&1
980 rm -f ${Cfile}.c ${Cfile}.o
982 0) AC_MSG_RESULT(yes);;
983 *) AC_MSG_RESULT(no);;
989 AC_MSG_CHECKING([whether $LD supports "$@"])
991 int one(void) { return 1; }
992 int two(void) { return 2; }
993 ], [ two(); ] , [_ac_ld_flag_supported=yes], [_ac_ld_flag_supported=no])
995 if test "$_ac_ld_flag_supported" = "yes"; then
998 if $CC -c conftest.c; then
999 ld_out=`$LD $@ -o conftest conftest.o 2>&1`
1001 if test $ld_ret -ne 0 ; then
1002 _ac_ld_flag_supported=no
1003 elif echo "$ld_out" | egrep 'option ignored|^usage:|unrecognized option|illegal option' >/dev/null ; then
1004 _ac_ld_flag_supported=no
1007 rm -f conftest.c conftest.o conftest
1010 AC_MSG_RESULT($_ac_ld_flag_supported)
1011 if test "$_ac_ld_flag_supported" = "yes" ; then
1018 if test x$USE_MAINTAINER_MODE = xyes; then
1019 if cc_supports_flag "-Werror"; then
1020 CFLAGS="$CFLAGS -Werror"
1024 if test "x$GCC" = "xyes"; then
1027 *[\ \ ]-Wall[\ \ ]*) ;;
1028 *) CFLAGS="$CFLAGS -Wall" ;;
1032 *[\ \ ]-Wchar-subscripts[\ \ ]*) ;;
1033 *) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
1037 *[\ \ ]-Wmissing-declarations[\ \ ]*) ;;
1038 *) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
1042 *[\ \ ]-Wmissing-prototypes[\ \ ]*) ;;
1043 *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
1047 *[\ \ ]-Wnested-externs[\ \ ]*) ;;
1048 *) CFLAGS="$CFLAGS -Wnested-externs" ;;
1052 *[\ \ ]-Wpointer-arith[\ \ ]*) ;;
1053 *) CFLAGS="$CFLAGS -Wpointer-arith" ;;
1057 *[\ \ ]-Wcast-align[\ \ ]*) ;;
1058 *) CFLAGS="$CFLAGS -Wcast-align" ;;
1062 *[\ \ ]-Wfloat-equal[\ \ ]*) ;;
1063 *) if cc_supports_flag -Wfloat-equals; then
1064 CFLAGS="$CFLAGS -Wfloat-equal"
1070 *[\ \ ]-Wdeclaration-after-statement[\ \ ]*) ;;
1071 *) if cc_supports_flag -Wdeclaration-after-statement; then
1072 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
1078 *[\ \ ]-fno-common[\ \ ]*) ;;
1079 *) if cc_supports_flag -fno-common; then
1080 CFLAGS="$CFLAGS -fno-common"
1086 *[\ \ ]-fPIC[\ \ ]*) ;;
1087 *) if cc_supports_flag -fPIC; then
1089 if ld_supports_flag -z,relro; then
1090 PIC_LDFLAGS="-Wl,-z,relro"
1097 *[\ \ ]-fPIE[\ \ ]*) ;;
1098 *) if cc_supports_flag -fPIE; then
1100 if ld_supports_flag -z,relro; then
1101 PIE_LDFLAGS="-pie -Wl,-z,relro"
1109 ### Disabled warnings, and compiler flag overrides
1111 # Let's just ignore unused for now
1113 *[\ \ ]-Wno-unused[\ \ ]*) ;;
1114 *) CFLAGS="$CFLAGS -Wno-unused" ;;
1117 # This group is for warnings we currently don't pass.
1118 # We would like to, however. Please fix.
1120 # http://bugs.freedesktop.org/show_bug.cgi?id=17433
1122 *[\ \ ]-Wno-sign-compare[\ \ ]*) ;;
1123 *) CFLAGS="$CFLAGS -Wno-sign-compare" ;;
1126 *[\ \ ]-Wno-pointer-sign[\ \ ]*) ;;
1127 *) if cc_supports_flag -Wno-pointer-sign; then
1128 CFLAGS="$CFLAGS -Wno-pointer-sign"
1133 # This one is special - it's not a warning override.
1134 # http://bugs.freedesktop.org/show_bug.cgi?id=10599
1136 *[\ \ ]-fno-strict-aliasing[\ \ ]*) ;;
1137 *) CFLAGS="$CFLAGS -fno-strict-aliasing" ;;
1139 ### End disabled warnings
1141 if test "x$enable_ansi" = "xyes"; then
1143 *[\ \ ]-ansi[\ \ ]*) ;;
1144 *) CFLAGS="$CFLAGS -ansi" ;;
1148 *[\ \ ]-D_POSIX_C_SOURCE*) ;;
1149 *) CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=199309L" ;;
1153 *[\ \ ]-D_BSD_SOURCE[\ \ ]*) ;;
1154 *) CFLAGS="$CFLAGS -D_BSD_SOURCE" ;;
1158 *[\ \ ]-pedantic[\ \ ]*) ;;
1159 *) CFLAGS="$CFLAGS -pedantic" ;;
1162 if test x$enable_gcov = xyes; then
1164 *[\ \ ]-fprofile-arcs[\ \ ]*) ;;
1165 *) CFLAGS="$CFLAGS -fprofile-arcs" ;;
1168 *[\ \ ]-ftest-coverage[\ \ ]*) ;;
1169 *) CFLAGS="$CFLAGS -ftest-coverage" ;;
1172 ## remove optimization
1173 CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*//g'`
1177 if test x$enable_gcov = xyes; then
1178 AC_MSG_ERROR([--enable-gcov can only be used with gcc])
1182 AC_SUBST(PIC_CFLAGS)
1183 AC_SUBST(PIC_LDFLAGS)
1184 AC_SUBST(PIE_CFLAGS)
1185 AC_SUBST(PIE_LDFLAGS)
1187 if ld_supports_flag --gc-sections; then
1188 SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
1189 CFLAGS="-ffunction-sections -fdata-sections $CFLAGS"
1191 AC_SUBST(SECTION_FLAGS)
1192 AC_SUBST(SECTION_LDFLAGS)
1193 AC_MSG_RESULT($ac_gcsections)
1196 # compress spaces in flags
1197 CFLAGS=`echo "$CFLAGS" | sed -e 's/ +/ /g'`
1198 CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/ +/ /g'`
1199 CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/ +/ /g'`
1202 ### Doxygen Documentation
1204 AC_PATH_PROG(DOXYGEN, doxygen, no)
1206 AC_MSG_CHECKING([whether to build Doxygen documentation])
1208 if test x$DOXYGEN = xno ; then
1214 if test x$enable_doxygen_docs = xauto ; then
1215 if test x$have_doxygen = xno ; then
1216 enable_doxygen_docs=no
1218 enable_doxygen_docs=yes
1222 if test x$enable_doxygen_docs = xyes; then
1223 if test x$have_doxygen = xno; then
1224 AC_MSG_ERROR([Building Doxygen docs explicitly required, but Doxygen not found])
1228 AM_CONDITIONAL(DBUS_DOXYGEN_DOCS_ENABLED, test x$enable_doxygen_docs = xyes)
1231 ### XML Documentation
1233 AC_PATH_PROG(XMLTO, xmlto, no)
1235 AC_MSG_CHECKING([whether to build XML documentation])
1237 if test x$XMLTO = xno ; then
1243 if test x$enable_xml_docs = xauto ; then
1244 if test x$have_xmlto = xno ; then
1251 if test x$enable_xml_docs = xyes; then
1252 if test x$have_xmlto = xno; then
1253 AC_MSG_ERROR([Building XML docs explicitly required, but xmlto not found])
1257 AM_CONDITIONAL(DBUS_XML_DOCS_ENABLED, test x$enable_xml_docs = xyes)
1260 #### Have to go $localstatedir->$prefix/var->/usr/local/var
1262 #### find the actual value for $prefix that we'll end up with
1263 ## (I know this is broken and should be done in the Makefile, but
1264 ## that's a major pain and almost nobody actually seems to care)
1265 AS_AC_EXPAND(EXPANDED_LOCALSTATEDIR, "$localstatedir")
1266 AS_AC_EXPAND(EXPANDED_SYSCONFDIR, "$sysconfdir")
1267 AS_AC_EXPAND(EXPANDED_BINDIR, "$bindir")
1268 AS_AC_EXPAND(EXPANDED_LIBDIR, "$libdir")
1269 AS_AC_EXPAND(EXPANDED_LIBEXECDIR, "$libexecdir")
1270 AS_AC_EXPAND(EXPANDED_DATADIR, "$datadir")
1272 #### Check our operating system
1273 operating_system=unknown
1274 if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then
1275 operating_system=redhat
1278 if test -f /etc/slackware-version || test -f $EXPANDED_SYSCONFDIR/slackware-version ; then
1279 operating_system=slackware
1282 #### Sort out init scripts
1284 if test x$with_init_scripts = x; then
1285 if test xredhat = x$operating_system ; then
1286 with_init_scripts=redhat
1288 if test xslackware = x$operating_system ; then
1289 with_init_scripts=slackware
1291 with_init_scripts=none
1296 AM_CONDITIONAL(DBUS_INIT_SCRIPTS_RED_HAT, test x$with_init_scripts = xredhat)
1298 AM_CONDITIONAL(DBUS_INIT_SCRIPTS_SLACKWARE, test x$with_init_scripts = xslackware)
1300 ##### Set up location for system bus socket
1301 if ! test -z "$with_system_socket"; then
1302 DBUS_SYSTEM_SOCKET=$with_system_socket
1304 DBUS_SYSTEM_SOCKET=${EXPANDED_LOCALSTATEDIR}/run/dbus/system_bus_socket
1307 AC_SUBST(DBUS_SYSTEM_SOCKET)
1308 AC_DEFINE_UNQUOTED(DBUS_SYSTEM_SOCKET,"$DBUS_SYSTEM_SOCKET",[The name of the socket the system bus listens on by default])
1310 ## system bus only listens on local domain sockets, and never
1311 ## on an abstract socket (so only root can create the socket)
1312 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="unix:path=$DBUS_SYSTEM_SOCKET"
1313 AC_SUBST(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS)
1314 AC_DEFINE_UNQUOTED(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS, "$DBUS_SYSTEM_BUS_DEFAULT_ADDRESS",[The default D-Bus address of the system bus])
1316 #### Set up the pid file
1317 if ! test -z "$with_system_pid_file"; then
1318 DBUS_SYSTEM_PID_FILE=$with_system_pid_file
1319 elif test x$with_init_scripts = xredhat ; then
1320 DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/messagebus.pid
1322 DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/dbus/pid
1325 AC_SUBST(DBUS_SYSTEM_PID_FILE)
1327 #### Directory to check for console ownership
1328 if ! test -z "$with_console_auth_dir"; then
1329 DBUS_CONSOLE_AUTH_DIR=$with_console_auth_dir
1331 DBUS_CONSOLE_AUTH_DIR=/var/run/console/
1334 AC_SUBST(DBUS_CONSOLE_AUTH_DIR)
1335 AC_DEFINE_UNQUOTED(DBUS_CONSOLE_AUTH_DIR, "$DBUS_CONSOLE_AUTH_DIR", [Directory to check for console ownerhip])
1337 #### File to check for console ownership
1338 if test x$have_console_owner_file = xyes; then
1339 if ! test -z "$with_console_owner_file"; then
1340 DBUS_CONSOLE_OWNER_FILE=$with_console_owner_file
1342 DBUS_CONSOLE_OWNER_FILE=/dev/console
1345 DBUS_CONSOLE_OWNER_FILE=
1348 AC_SUBST(DBUS_CONSOLE_OWNER_FILE)
1349 AC_DEFINE_UNQUOTED(DBUS_CONSOLE_OWNER_FILE, "$DBUS_CONSOLE_OWNER_FILE", [File to check for console ownerhip])
1351 #### User to start the system bus as
1352 if test -z "$with_dbus_user" ; then
1353 DBUS_USER=messagebus
1355 DBUS_USER=$with_dbus_user
1358 AC_DEFINE_UNQUOTED(DBUS_USER,"$DBUS_USER", [User for running the system BUS daemon])
1360 #### Direcotry to install data files into
1361 DBUS_DATADIR=$EXPANDED_DATADIR
1362 AC_SUBST(DBUS_DATADIR)
1363 AC_DEFINE_UNQUOTED(DBUS_DATADIR,"$DBUS_DATADIR", [Directory for installing DBUS data files])
1365 #### Directory to install dbus-daemon
1366 if test -z "$with_dbus_daemondir" ; then
1367 DBUS_DAEMONDIR=$EXPANDED_BINDIR
1369 DBUS_DAEMONDIR=$with_dbus_daemondir
1371 AC_SUBST(DBUS_DAEMONDIR)
1372 AC_DEFINE_UNQUOTED(DBUS_DAEMONDIR,"$DBUS_DAEMONDIR", [Directory for installing the DBUS daemon])
1374 #### Directory to install the other binaries
1375 DBUS_BINDIR="$EXPANDED_BINDIR"
1376 AC_SUBST(DBUS_BINDIR)
1377 AC_DEFINE_UNQUOTED(DBUS_BINDIR,"$DBUS_BINDIR", [Directory for installing the binaries])
1379 #### Directory to install the libexec binaries
1380 DBUS_LIBEXECDIR="$EXPANDED_LIBEXECDIR"
1381 AC_SUBST(DBUS_LIBEXECDIR)
1382 AC_DEFINE_UNQUOTED(DBUS_LIBEXECDIR,"$DBUS_LIBEXECDIR", [Directory for installing the libexec binaries])
1384 #### Tell tests where to find certain stuff in builddir
1387 AC_DEFUN([TEST_PATH], [
1388 TEST_$1=${DBUS_PWD}/test/$2
1389 AC_DEFINE_UNQUOTED(TEST_$1, "$TEST_$1",
1390 [Full path to test file test/$2 in builddir])
1394 TEST_PATH(VALID_SERVICE_DIR, data/valid-service-files)
1395 TEST_PATH(INVALID_SERVICE_DIR, data/invalid-service-files)
1396 TEST_PATH(VALID_SERVICE_SYSTEM_DIR, data/valid-service-files-system)
1397 TEST_PATH(INVALID_SERVICE_SYSTEM_DIR, data/invalid-service-files-system)
1398 TEST_PATH(SERVICE_BINARY, test-service)
1399 TEST_PATH(SHELL_SERVICE_BINARY, test-shell-service)
1400 TEST_PATH(EXIT_BINARY, test-exit)
1401 TEST_PATH(SEGFAULT_BINARY, test-segfault)
1402 TEST_PATH(SLEEP_FOREVER_BINARY, test-sleep-forever)
1403 TEST_PATH(PRIVSERVER_BINARY, name-test/test-privserver)
1405 AC_DEFINE_UNQUOTED(TEST_BUS_BINARY, "$DBUS_PWD/bus/dbus-daemon",
1406 [Full path to the daemon in the builddir])
1407 AC_SUBST(TEST_BUS_BINARY)
1409 ## Export the non-setuid external helper
1410 TEST_LAUNCH_HELPER_BINARY="$DBUS_PWD/bus/dbus-daemon-launch-helper-test"
1411 AC_SUBST(TEST_LAUNCH_HELPER_BINARY)
1412 AC_DEFINE_UNQUOTED(DBUS_TEST_LAUNCH_HELPER_BINARY, "$TEST_LAUNCH_HELPER_BINARY",
1413 [Full path to the launch helper test program in the builddir])
1415 #### Find socket directories
1416 if ! test -z "$TMPDIR" ; then
1417 DEFAULT_SOCKET_DIR=$TMPDIR
1418 elif ! test -z "$TEMP" ; then
1419 DEFAULT_SOCKET_DIR=$TEMP
1420 elif ! test -z "$TMP" ; then
1421 DEFAULT_SOCKET_DIR=$TMP
1423 DEFAULT_SOCKET_DIR=/tmp
1426 if ! test -z "$with_test_socket_dir" ; then
1427 TEST_SOCKET_DIR="$with_test_socket_dir"
1429 TEST_SOCKET_DIR=$DEFAULT_SOCKET_DIR
1431 AC_SUBST(TEST_SOCKET_DIR)
1432 AC_DEFINE_UNQUOTED(DBUS_TEST_SOCKET_DIR, "$TEST_SOCKET_DIR", [Where to put test sockets])
1434 if ! test -z "$with_session_socket_dir" ; then
1435 DBUS_SESSION_SOCKET_DIR="$with_session_socket_dir"
1437 DBUS_SESSION_SOCKET_DIR=$DEFAULT_SOCKET_DIR
1439 AC_DEFINE_UNQUOTED(DBUS_SESSION_SOCKET_DIR, "$DBUS_SESSION_SOCKET_DIR", [Where per-session bus puts its sockets])
1440 AC_SUBST(DBUS_SESSION_SOCKET_DIR)
1442 AC_DEFINE_UNQUOTED(DBUS_UNIX, "1", [Defined on UNIX and Linux systems and not on Windows])
1444 # darwin needs this to initialize the environment
1445 AC_CHECK_HEADERS(crt_externs.h)
1446 AC_CHECK_FUNC(_NSGetEnviron, [AC_DEFINE(HAVE_NSGETENVIRON, 1, [Define if your system needs _NSGetEnviron to set up the environment])])
1447 AH_VERBATIM(_DARWIN_ENVIRON,
1449 #if defined(HAVE_NSGETENVIRON) && defined(HAVE_CRT_EXTERNS_H)
1450 # include <sys/time.h>
1451 # include <crt_externs.h>
1452 # define environ (*_NSGetEnviron())
1458 dbus/dbus-arch-deps.h
1469 test/name-test/Makefile
1472 test/data/valid-config-files/debug-allow-all.conf
1473 test/data/valid-config-files/debug-allow-all-sha1.conf
1474 test/data/valid-config-files-system/debug-allow-all-pass.conf
1475 test/data/valid-config-files-system/debug-allow-all-fail.conf
1476 test/data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service
1477 test/data/valid-service-files/org.freedesktop.DBus.TestSuiteEchoService.service
1478 test/data/valid-service-files/org.freedesktop.DBus.TestSuiteForkingEchoService.service
1479 test/data/valid-service-files/org.freedesktop.DBus.TestSuiteSegfaultService.service
1480 test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service
1481 test/data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service
1482 test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteEchoService.service
1483 test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteSegfaultService.service
1484 test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service
1485 test/data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service
1486 test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoExec.service
1487 test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service
1488 test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service
1491 dnl ==========================================================================
1497 exec_prefix: ${exec_prefix}
1498 libdir: ${EXPANDED_LIBDIR}
1499 libexecdir: ${EXPANDED_LIBEXECDIR}
1500 bindir: ${EXPANDED_BINDIR}
1501 sysconfdir: ${EXPANDED_SYSCONFDIR}
1502 localstatedir: ${EXPANDED_LOCALSTATEDIR}
1503 datadir: ${EXPANDED_DATADIR}
1504 source code location: ${srcdir}
1507 cppflags: ${CPPFLAGS}
1508 cxxflags: ${CXXFLAGS}
1509 64-bit int: ${DBUS_INT64_TYPE}
1510 32-bit int: ${DBUS_INT32_TYPE}
1511 16-bit int: ${DBUS_INT16_TYPE}
1516 Maintainer mode: ${USE_MAINTAINER_MODE}
1517 gcc coverage profiling: ${enable_gcov}
1518 Building unit tests: ${enable_tests}
1519 Building verbose mode: ${enable_verbose_mode}
1520 Building assertions: ${enable_asserts}
1521 Building checks: ${enable_checks}
1522 Building SELinux support: ${have_selinux}
1523 Building inotify support: ${have_inotify}
1524 Building dnotify support: ${have_dnotify}
1525 Building kqueue support: ${have_kqueue}
1526 Building X11 code: ${enable_x11}
1527 Building Doxygen docs: ${enable_doxygen_docs}
1528 Building XML docs: ${enable_xml_docs}
1529 Building cache support: ${enable_userdb_cache}
1530 Gettext libs (empty OK): ${INTLLIBS}
1531 Using XML parser: ${with_xml}
1532 Init scripts style: ${with_init_scripts}
1533 Abstract socket names: ${ac_cv_have_abstract_sockets}
1534 System bus socket: ${DBUS_SYSTEM_SOCKET}
1535 System bus address: ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS}
1536 System bus PID file: ${DBUS_SYSTEM_PID_FILE}
1537 Session bus socket dir: ${DBUS_SESSION_SOCKET_DIR}
1538 Console auth dir: ${DBUS_CONSOLE_AUTH_DIR}
1539 Console owner file: ${have_console_owner_file}
1540 Console owner file path: ${DBUS_CONSOLE_OWNER_FILE}
1541 System bus user: ${DBUS_USER}
1542 Session bus services dir: ${EXPANDED_DATADIR}/dbus-1/services
1543 'make check' socket dir: ${TEST_SOCKET_DIR}
1546 if test x$enable_tests = xyes; then
1547 echo "NOTE: building with unit tests increases the size of the installed library and renders it insecure."
1549 if test x$enable_tests = xyes -a x$enable_asserts = xno; then
1550 echo "NOTE: building with unit tests but without assertions means tests may not properly report failures (this configuration is only useful when doing something like profiling the tests)"
1552 if test x$enable_gcov = xyes; then
1553 echo "NOTE: building with coverage profiling is definitely for developers only."
1555 if test x$enable_verbose_mode = xyes; then
1556 echo "NOTE: building with verbose mode increases library size, may slightly increase security risk, and decreases performance."
1558 if test x$enable_asserts = xyes; then
1559 echo "NOTE: building with assertions increases library size and decreases performance."
1561 if test x$enable_checks = xno; then
1562 echo "NOTE: building without checks for arguments passed to public API makes it harder to debug apps using D-Bus, but will slightly decrease D-Bus library size and _very_ slightly improve performance."
1564 if test x$dbus_use_libxml = xtrue; then
1566 echo "WARNING: You have chosen to use libxml as your xml parser however this code path is not maintained by the D-Bus developers and if it breaks you get to keep the pieces. If you have selected this option in err please reconfigure with expat (e.g. --with-xml=expat)."