* configure.in: Check for no-common compiler flag (OS-X fix from
[platform/upstream/dbus.git] / configure.in
1 dnl -*- mode: m4 -*-
2 AC_PREREQ(2.52)
3
4 AC_INIT(dbus/dbus.h)
5
6 AC_CANONICAL_TARGET
7
8 AM_INIT_AUTOMAKE(dbus, 0.93)
9
10 AM_CONFIG_HEADER(config.h)
11
12 # Honor aclocal flags
13 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
14
15 GETTEXT_PACKAGE=dbus-1
16 AC_SUBST(GETTEXT_PACKAGE)
17 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The name of the gettext domain])
18
19  ## must come before we use the $USE_MAINTAINER_MODE variable later
20 AM_MAINTAINER_MODE
21
22 # libtool versioning - this applies to libdbus
23 #
24 # See http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91 for details
25 #
26
27 ## increment if the interface has additions, changes, removals.
28 LT_CURRENT=3
29
30 ## increment any time the source changes; set to
31 ##  0 if you increment CURRENT
32 LT_REVISION=0
33
34 ## increment if any interfaces have been added; set to 0
35 ## if any interfaces have been changed or removed. removal has
36 ## precedence over adding, so set to 0 if both happened.
37 LT_AGE=0
38
39 AC_SUBST(LT_CURRENT)
40 AC_SUBST(LT_REVISION)
41 AC_SUBST(LT_AGE)
42
43
44 AC_PROG_CC
45 AC_PROG_CXX
46 AC_ISC_POSIX
47 AC_HEADER_STDC
48
49 AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests],[enable unit test code]),enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE)
50 AC_ARG_ENABLE(ansi, AS_HELP_STRING([--enable-ansi],[enable -ansi -pedantic gcc flags]),enable_ansi=$enableval,enable_ansi=no)
51 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)
52 AC_ARG_ENABLE(asserts, AS_HELP_STRING([--enable-asserts],[include assertion checks]),enable_asserts=$enableval,enable_asserts=$USE_MAINTAINER_MODE)
53 AC_ARG_ENABLE(checks, AS_HELP_STRING([--enable-checks],[include sanity checks on public API]),enable_checks=$enableval,enable_checks=yes)
54 AC_ARG_ENABLE(xml-docs, AS_HELP_STRING([--enable-xml-docs],[build XML documentation (requires xmlto)]),enable_xml_docs=$enableval,enable_xml_docs=auto)
55 AC_ARG_ENABLE(doxygen-docs, AS_HELP_STRING([--enable-doxygen-docs],[build DOXYGEN documentation (requires Doxygen)]),enable_doxygen_docs=$enableval,enable_doxygen_docs=auto)
56 AC_ARG_ENABLE(gcov, AS_HELP_STRING([--enable-gcov],[compile with coverage profiling instrumentation (gcc only)]),enable_gcov=$enableval,enable_gcov=no)
57 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)
58 AC_ARG_ENABLE(selinux, AS_HELP_STRING([--enable-selinux],[build with SELinux support]),enable_selinux=$enableval,enable_selinux=auto)
59 AC_ARG_ENABLE(dnotify, AS_HELP_STRING([--enable-dnotify],[build with dnotify support (linux only)]),enable_dnotify=$enableval,enable_dnotify=auto)
60 AC_ARG_ENABLE(kqueue, AS_HELP_STRING([--enable-kqueue],[build with kqueue support]),enable_kqueue=$enableval,enable_kqueue=auto)
61 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)
62
63 AC_ARG_WITH(xml, AS_HELP_STRING([--with-xml=[libxml/expat]],[XML library to use]))
64 AC_ARG_WITH(init-scripts, AS_HELP_STRING([--with-init-scripts=[redhat]],[Style of init scripts to install]))
65 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]))
66 AC_ARG_WITH(test-socket-dir, AS_HELP_STRING([--with-test-socket-dir=[dirname]],[Where to put sockets for make check]))
67 AC_ARG_WITH(system-pid-file, AS_HELP_STRING([--with-system-pid-file=[pidfile]],[PID file for systemwide daemon]))
68 AC_ARG_WITH(system-socket, AS_HELP_STRING([--with-system-socket=[filename]],[UNIX domain socket for systemwide daemon]))
69 AC_ARG_WITH(console-auth-dir, AS_HELP_STRING([--with-console-auth-dir=[dirname]],[directory to check for console ownerhip]))
70 AC_ARG_WITH(console-owner-file, AS_HELP_STRING([--with-console-owner-file=[filename]],[file whose owner determines current console owner]))
71 AC_ARG_WITH(dbus_user, AS_HELP_STRING([--with-dbus-user=<user>],[User for running the DBUS daemon (messagebus)]))
72 AC_ARG_WITH(dbus_daemondir, AS_HELP_STRING([--with-dbus-daemondir=[dirname]],[Directory for installing the DBUS daemon]))
73
74
75 dnl DBUS_BUILD_TESTS controls unit tests built in to .c files 
76 dnl and also some stuff in the test/ subdir
77 AM_CONDITIONAL(DBUS_BUILD_TESTS, test x$enable_tests = xyes)
78 if test x$enable_tests = xyes; then
79     AC_DEFINE(DBUS_BUILD_TESTS,1,[Build test code])
80 fi
81
82 if test x$enable_verbose_mode = xyes; then
83     AC_DEFINE(DBUS_ENABLE_VERBOSE_MODE,1,[Support a verbose mode])
84 fi
85 if test x$enable_asserts = xno; then
86     AC_DEFINE(DBUS_DISABLE_ASSERT,1,[Disable assertion checking])
87     AC_DEFINE(G_DISABLE_ASSERT,1,[Disable GLib assertion macros])
88 fi
89 if test x$enable_checks = xno; then
90     AC_DEFINE(DBUS_DISABLE_CHECKS,1,[Disable public API sanity checking])
91     AC_DEFINE(G_DISABLE_CHECKS,1,[Disable GLib public API sanity checking])
92 fi
93
94 #### gcc warning flags
95
96 cc_supports_flag() {
97   AC_MSG_CHECKING(whether $CC supports "$@")
98   Cfile=/tmp/foo${$}
99   touch ${Cfile}.c
100   $CC -c "$@" ${Cfile}.c -o ${Cfile}.o >/dev/null 2>&1
101   rc=$?
102   rm -f ${Cfile}.c ${Cfile}.o
103   case $rc in
104     0) AC_MSG_RESULT(yes);;
105     *) AC_MSG_RESULT(no);;
106   esac
107   return $rc
108 }
109
110 if test "x$GCC" = "xyes"; then
111   changequote(,)dnl
112   case " $CFLAGS " in
113   *[\ \ ]-Wall[\ \      ]*) ;;
114   *) CFLAGS="$CFLAGS -Wall" ;;
115   esac
116
117   case " $CFLAGS " in
118   *[\ \ ]-Wchar-subscripts[\ \  ]*) ;;
119   *) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
120   esac
121
122   case " $CFLAGS " in
123   *[\ \ ]-Wmissing-declarations[\ \     ]*) ;;
124   *) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
125   esac
126
127   case " $CFLAGS " in
128   *[\ \ ]-Wmissing-prototypes[\ \       ]*) ;;
129   *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
130   esac
131
132   case " $CFLAGS " in
133   *[\ \ ]-Wnested-externs[\ \   ]*) ;;
134   *) CFLAGS="$CFLAGS -Wnested-externs" ;;
135   esac
136
137   case " $CFLAGS " in
138   *[\ \ ]-Wpointer-arith[\ \    ]*) ;;
139   *) CFLAGS="$CFLAGS -Wpointer-arith" ;;
140   esac
141
142   case " $CFLAGS " in
143   *[\ \ ]-Wcast-align[\ \       ]*) ;;
144   *) CFLAGS="$CFLAGS -Wcast-align" ;;
145   esac
146
147   case " $CFLAGS " in
148   *[\ \ ]-Wfloat-equal[\ \      ]*) ;;
149   *) if cc_supports_flag -Wfloat-equals; then
150         CFLAGS="$CFLAGS -Wfloat-equal" 
151      fi
152      ;;
153   esac
154
155   case " $CFLAGS " in
156   *[\ \ ]-Wsign-compare[\ \     ]*) ;;
157   *) CFLAGS="$CFLAGS -Wsign-compare" ;;
158   esac
159
160   case " $CFLAGS " in
161   *[\ \ ]-Wdeclaration-after-statement[\ \      ]*) ;;
162   *) if cc_supports_flag -Wdeclaration-after-statement; then
163         CFLAGS="$CFLAGS -Wdeclaration-after-statement"
164      fi
165      ;;
166   esac
167
168   case " $CFLAGS " in
169   *[\ \ ]-fno-common[\ \        ]*) ;;
170   *) if cc_supports_flag -fno-common; then
171         CFLAGS="$CFLAGS -fno-common"
172      fi
173      ;;
174   esac
175
176   if test "x$enable_ansi" = "xyes"; then
177     case " $CFLAGS " in
178     *[\ \       ]-ansi[\ \      ]*) ;;
179     *) CFLAGS="$CFLAGS -ansi" ;;
180     esac
181
182     case " $CFLAGS " in
183     *[\ \       ]-D_POSIX_C_SOURCE*) ;;
184     *) CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=199309L" ;;
185     esac
186
187     case " $CFLAGS " in
188     *[\ \       ]-D_BSD_SOURCE[\ \      ]*) ;;
189     *) CFLAGS="$CFLAGS -D_BSD_SOURCE" ;;
190     esac
191
192     case " $CFLAGS " in
193     *[\ \       ]-pedantic[\ \  ]*) ;;
194     *) CFLAGS="$CFLAGS -pedantic" ;;
195     esac
196   fi
197   if test x$enable_gcov = xyes; then
198     case " $CFLAGS " in
199     *[\ \       ]-fprofile-arcs[\ \     ]*) ;;
200     *) CFLAGS="$CFLAGS -fprofile-arcs" ;;
201     esac
202     case " $CFLAGS " in
203     *[\ \       ]-ftest-coverage[\ \    ]*) ;;
204     *) CFLAGS="$CFLAGS -ftest-coverage" ;;
205     esac
206
207     ## remove optimization
208     CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*//g'`
209   fi
210   changequote([,])dnl
211 else
212   if test x$enable_gcov = xyes; then
213     AC_MSG_ERROR([--enable-gcov can only be used with gcc])
214   fi
215 fi
216
217 AM_PROG_LIBTOOL
218
219 changequote(,)dnl
220 # let ourselves use our own unstable API
221 CPPFLAGS="-DDBUS_API_SUBJECT_TO_CHANGE=1 $CPPFLAGS"
222 # compress spaces in flags
223 CFLAGS=`echo "$CFLAGS" | sed -e 's/ +/ /g'`
224 CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/ +/ /g'`
225 CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/ +/ /g'`
226 changequote([,])dnl
227
228 if test x$enable_gcov = xyes; then
229      ## so that config.h changes when you toggle gcov support
230      AC_DEFINE_UNQUOTED(DBUS_GCOV_ENABLED, 1, [Defined if gcov is enabled to force a rebuild due to config.h changing])
231
232      AC_MSG_CHECKING([for gcc 3.3 version of gcov file format])
233      have_gcc33_gcov=no
234      AC_RUN_IFELSE( [AC_LANG_PROGRAM( , [[ if (__GNUC__ >=3 && __GNUC_MINOR__ >= 3) exit (0); else exit (1); ]])],  
235                    have_gcc33_gcov=yes)
236      if test x$have_gcc33_gcov = xyes ; then
237          AC_DEFINE_UNQUOTED(DBUS_HAVE_GCC33_GCOV, 1, [Defined if we have gcc 3.3 and thus the new gcov format])
238      fi
239      AC_MSG_RESULT($have_gcc33_gcov)
240 fi
241 AM_CONDITIONAL(DBUS_GCOV_ENABLED, test x$enable_gcov = xyes)
242
243 #### Integer sizes 
244
245 AC_CHECK_SIZEOF(char)
246 AC_CHECK_SIZEOF(short)
247 AC_CHECK_SIZEOF(long)
248 AC_CHECK_SIZEOF(int)
249 AC_CHECK_SIZEOF(void *)
250 AC_CHECK_SIZEOF(long long)
251 AC_CHECK_SIZEOF(__int64)
252
253 ### See what our 64 bit type is called
254 AC_MSG_CHECKING([64-bit integer type])
255
256 case 8 in
257 $ac_cv_sizeof_int)
258   dbusint64=int
259   dbusint64_constant='(val)'
260   dbusuint64_constant='(val)'
261   ;;
262 $ac_cv_sizeof_long)
263   dbusint64=long
264   dbusint64_constant='(val##L)'
265   dbusuint64_constant='(val##UL)'
266   ;;
267 $ac_cv_sizeof_long_long)
268   dbusint64='long long'
269   dbusint64_constant='(val##LL)'
270   dbusuint64_constant='(val##ULL)'
271   ;;
272 $ac_cv_sizeof___int64)
273   dbusint64=__int64
274   dbusint64_constant='(val##i64)'
275   dbusuint64_constant='(val##ui64)'
276   ;;
277 esac
278
279 if test -z "$dbusint64" ; then
280         DBUS_INT64_TYPE="no_int64_type_detected"
281         DBUS_HAVE_INT64=0
282         DBUS_INT64_CONSTANT=
283         DBUS_UINT64_CONSTANT=
284         AC_MSG_RESULT([none found])
285 else
286         DBUS_INT64_TYPE="$dbusint64"
287         DBUS_HAVE_INT64=1
288         DBUS_INT64_CONSTANT="$dbusint64_constant"
289         DBUS_UINT64_CONSTANT="$dbusuint64_constant"
290         AC_MSG_RESULT($DBUS_INT64_TYPE)
291 fi
292
293 AC_SUBST(DBUS_INT64_TYPE)
294 AC_SUBST(DBUS_INT64_CONSTANT)
295 AC_SUBST(DBUS_UINT64_CONSTANT)
296 AC_SUBST(DBUS_HAVE_INT64)
297
298 ### see what 32-bit int is called
299 AC_MSG_CHECKING([32-bit integer type])
300
301 case 4 in
302 $ac_cv_sizeof_short)
303   dbusint32=int
304   ;;
305 $ac_cv_sizeof_int)
306   dbusint32=int
307   ;;
308 $ac_cv_sizeof_long)
309   dbusint32=long
310   ;;
311 esac
312
313 if test -z "$dbusint32" ; then
314         DBUS_INT32_TYPE="no_int32_type_detected"
315         AC_MSG_ERROR([No 32-bit integer type found])
316 else
317         DBUS_INT32_TYPE="$dbusint32"
318         AC_MSG_RESULT($DBUS_INT32_TYPE)
319 fi
320
321 AC_SUBST(DBUS_INT32_TYPE)
322
323 ### see what 16-bit int is called
324 AC_MSG_CHECKING([16-bit integer type])
325
326 case 2 in
327 $ac_cv_sizeof_short)
328   dbusint16=short
329   ;;
330 $ac_cv_sizeof_int)
331   dbusint16=int
332   ;;
333 esac
334
335 if test -z "$dbusint16" ; then
336         DBUS_INT16_TYPE="no_int16_type_detected"
337         AC_MSG_ERROR([No 16-bit integer type found])
338 else
339         DBUS_INT16_TYPE="$dbusint16"
340         AC_MSG_RESULT($DBUS_INT16_TYPE)
341 fi
342
343 AC_SUBST(DBUS_INT16_TYPE)
344
345 ## byte order
346 AC_C_BIGENDIAN
347
348
349 dnl **********************************
350 dnl *** va_copy checks (from GLib) ***
351 dnl **********************************
352 dnl we currently check for all three va_copy possibilities, so we get
353 dnl all results in config.log for bug reports.
354 AC_CACHE_CHECK([for an implementation of va_copy()],dbus_cv_va_copy,[
355         AC_LINK_IFELSE([#include <stdarg.h>
356         void f (int i, ...) {
357         va_list args1, args2;
358         va_start (args1, i);
359         va_copy (args2, args1);
360         if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
361           exit (1);
362         va_end (args1); va_end (args2);
363         }
364         int main() {
365           f (0, 42);
366           return 0;
367         }],
368         [dbus_cv_va_copy=yes],
369         [dbus_cv_va_copy=no])
370 ])
371 AC_CACHE_CHECK([for an implementation of __va_copy()],dbus_cv___va_copy,[
372         AC_LINK_IFELSE([#include <stdarg.h>
373         void f (int i, ...) {
374         va_list args1, args2;
375         va_start (args1, i);
376         __va_copy (args2, args1);
377         if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
378           exit (1);
379         va_end (args1); va_end (args2);
380         }
381         int main() {
382           f (0, 42);
383           return 0;
384         }],
385         [dbus_cv___va_copy=yes],
386         [dbus_cv___va_copy=no])
387 ])
388
389 if test "x$dbus_cv_va_copy" = "xyes"; then
390   dbus_va_copy_func=va_copy
391 else if test "x$dbus_cv___va_copy" = "xyes"; then
392   dbus_va_copy_func=__va_copy
393 fi
394 fi
395
396 if test -n "$dbus_va_copy_func"; then
397   AC_DEFINE_UNQUOTED(DBUS_VA_COPY,$dbus_va_copy_func,[A 'va_copy' style function])
398 fi
399
400 AC_CACHE_CHECK([whether va_lists can be copied by value],dbus_cv_va_val_copy,[
401         AC_TRY_RUN([#include <stdarg.h>
402         void f (int i, ...) {
403         va_list args1, args2;
404         va_start (args1, i);
405         args2 = args1;
406         if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
407           exit (1);
408         va_end (args1); va_end (args2);
409         }
410         int main() {
411           f (0, 42);
412           return 0;
413         }],
414         [dbus_cv_va_val_copy=yes],
415         [dbus_cv_va_val_copy=no],
416         [dbus_cv_va_val_copy=yes])
417 ])
418
419 if test "x$dbus_cv_va_val_copy" = "xno"; then
420   AC_DEFINE(DBUS_VA_COPY_AS_ARRAY,1, ['va_lists' cannot be copies as values])
421 fi
422
423
424 #### Atomic integers (checks by Sebastian Wilhelmi for GLib)
425 AC_MSG_CHECKING([whether to use inline assembler routines for atomic integers])
426 have_atomic_inc=no
427 if test x"$GCC" = xyes; then
428   if test "x$enable_ansi" = "xyes"; then
429     AC_MSG_RESULT([no])
430   else
431     case $host_cpu in
432       i386)
433         AC_MSG_RESULT([no])
434         ;;
435       i?86)
436         AC_MSG_RESULT([i486])
437         AC_DEFINE_UNQUOTED(DBUS_USE_ATOMIC_INT_486, 1, [Use atomic integer implementation for 486])
438         have_atomic_inc=yes
439         ;;
440       *)
441         AC_MSG_RESULT([no])
442         ;;
443     esac
444   fi
445 fi
446 if test x$have_atomic_inc = xyes ; then
447   AC_DEFINE_UNQUOTED(DBUS_HAVE_ATOMIC_INT, 1, [Some atomic integer implementation present])
448 fi
449
450 #### Various functions
451 AC_CHECK_LIB(socket,socket)
452 AC_CHECK_LIB(nsl,gethostbyname)
453
454 AC_CHECK_FUNCS(vsnprintf vasprintf nanosleep usleep poll setenv unsetenv socketpair getgrouplist)
455
456 AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
457
458 AC_CACHE_CHECK([for posix getpwnam_r],
459                 ac_cv_func_posix_getpwnam_r,
460                 [AC_TRY_RUN([
461 #include <errno.h>
462 #include <pwd.h>
463 int main () { 
464     char buffer[10000];
465     struct passwd pwd, *pwptr = &pwd;
466     int error;
467     errno = 0;
468     error = getpwnam_r ("", &pwd, buffer, 
469                         sizeof (buffer), &pwptr);
470    return (error < 0 && errno == ENOSYS) 
471            || error == ENOSYS; 
472 }               ],
473         [ac_cv_func_posix_getpwnam_r=yes],
474         [ac_cv_func_posix_getpwnam_r=no])])
475 if test "$ac_cv_func_posix_getpwnam_r" = yes; then
476         AC_DEFINE(HAVE_POSIX_GETPWNAM_R,1,
477                 [Have POSIX function getpwnam_r])
478 else
479         AC_CACHE_CHECK([for nonposix getpwnam_r],
480                 ac_cv_func_nonposix_getpwnam_r,
481                 [AC_TRY_LINK([#include <pwd.h>],
482                         [char buffer[10000];
483                         struct passwd pwd;
484                         getpwnam_r ("", &pwd, buffer, 
485                                         sizeof (buffer));],
486                         [ac_cv_func_nonposix_getpwnam_r=yes],
487                         [ac_cv_func_nonposix_getpwnam_r=no])])
488                 if test "$ac_cv_func_nonposix_getpwnam_r" = yes; then
489                 AC_DEFINE(HAVE_NONPOSIX_GETPWNAM_R,1,
490                         [Have non-POSIX function getpwnam_r])
491         fi
492 fi
493
494 dnl check for socklen_t
495 AC_MSG_CHECKING(whether socklen_t is defined)
496 AC_TRY_COMPILE([
497 #include <sys/types.h>
498 #include <sys/socket.h>
499 #include <netdb.h>
500 ],[
501 socklen_t foo;
502 foo = 1;
503 ],dbus_have_socklen_t=yes,dbus_have_socklen_t=no)
504 AC_MSG_RESULT($dbus_have_socklen_t)
505
506 if test "x$dbus_have_socklen_t" = "xyes"; then
507     AC_DEFINE(HAVE_SOCKLEN_T,1,[Have socklen_t type])
508 fi
509
510 dnl check for writev header and writev function so we're 
511 dnl good to go if HAVE_WRITEV gets defined.
512 AC_CHECK_HEADERS(sys/uio.h, [AC_CHECK_FUNCS(writev)])
513
514 dnl check for flavours of varargs macros (test from GLib)
515 AC_MSG_CHECKING(for ISO C99 varargs macros in C)
516 AC_TRY_COMPILE([],[
517 int a(int p1, int p2, int p3);
518 #define call_a(...) a(1,__VA_ARGS__)
519 call_a(2,3);
520 ],dbus_have_iso_c_varargs=yes,dbus_have_iso_c_varargs=no)
521 AC_MSG_RESULT($dbus_have_iso_c_varargs)
522
523 AC_MSG_CHECKING(for GNUC varargs macros)
524 AC_TRY_COMPILE([],[
525 int a(int p1, int p2, int p3);
526 #define call_a(params...) a(1,params)
527 call_a(2,3);
528 ],dbus_have_gnuc_varargs=yes,dbus_have_gnuc_varargs=no)
529 AC_MSG_RESULT($dbus_have_gnuc_varargs)
530
531 dnl Output varargs tests
532 if test x$dbus_have_iso_c_varargs = xyes; then
533     AC_DEFINE(HAVE_ISO_VARARGS,1,[Have ISO C99 varargs macros])
534 fi
535 if test x$dbus_have_gnuc_varargs = xyes; then
536     AC_DEFINE(HAVE_GNUC_VARARGS,1,[Have GNU-style varargs macros])
537 fi
538
539 dnl Check for various credentials.
540 AC_MSG_CHECKING(for struct cmsgcred)
541 AC_TRY_COMPILE([
542 #include <sys/types.h>
543 #include <sys/socket.h>
544 ],[
545 struct cmsgcred cred;
546
547 cred.cmcred_pid = 0;
548 ],dbus_have_struct_cmsgcred=yes,dbus_have_struct_cmsgcred=no)
549 AC_MSG_RESULT($dbus_have_struct_cmsgcred)
550
551 if test x$dbus_have_struct_cmsgcred = xyes; then
552     AC_DEFINE(HAVE_CMSGCRED,1,[Have cmsgcred structure])
553 fi
554
555 AC_CHECK_FUNCS(getpeerucred getpeereid)
556
557 #### Abstract sockets
558
559 AC_MSG_CHECKING(abstract socket namespace)
560 AC_LANG_PUSH(C)
561 AC_RUN_IFELSE([AC_LANG_PROGRAM(
562 [[
563 #include <sys/types.h>
564 #include <stdlib.h>
565 #include <string.h>
566 #include <stdio.h>
567 #include <sys/socket.h>
568 #include <sys/un.h>
569 #include <errno.h>
570 ]],
571 [[
572   int listen_fd;
573   struct sockaddr_un addr;
574   
575   listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
576   
577   if (listen_fd < 0)
578     {
579       fprintf (stderr, "socket() failed: %s\n", strerror (errno));
580       exit (1);
581     }
582
583   memset (&addr, '\0', sizeof (addr));
584   addr.sun_family = AF_UNIX;
585   strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test");
586   addr.sun_path[0] = '\0'; /* this is what makes it abstract */
587   
588   if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
589     {
590        fprintf (stderr, "Abstract socket namespace bind() failed: %s\n", 
591                 strerror (errno));
592        exit (1);
593     }
594   else 
595     exit (0);
596 ]])],
597               [have_abstract_sockets=yes],
598               [have_abstract_sockets=no])
599 AC_LANG_POP(C)
600 AC_MSG_RESULT($have_abstract_sockets)
601
602 if test x$enable_abstract_sockets = xyes; then
603     if test x$have_abstract_sockets = xno; then
604         AC_MSG_ERROR([Abstract sockets explicitly required, and support not detected.])
605     fi
606 fi
607
608 if test x$enable_abstract_sockets = xno; then
609    have_abstract_sockets=no;
610 fi
611
612 if test x$have_abstract_sockets = xyes ; then
613    DBUS_PATH_OR_ABSTRACT=abstract
614    AC_DEFINE(HAVE_ABSTRACT_SOCKETS,1,[Have abstract socket namespace])
615 else
616    DBUS_PATH_OR_ABSTRACT=path
617 fi
618
619 # this is used in addresses to prefer abstract, e.g. 
620 # unix:path=/foo or unix:abstract=/foo 
621 AC_SUBST(DBUS_PATH_OR_ABSTRACT)
622
623 #### Sort out XML library
624
625 # see what we have
626 AC_CHECK_LIB(expat, XML_ParserCreate_MM,
627              [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ],
628              have_expat=false)
629
630 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.6.0, have_libxml=true, have_libxml=false)
631
632 # see what we want to use
633 dbus_use_libxml=false
634 dbus_use_expat=false
635 if test x$with_xml = xexpat; then
636         dbus_use_expat=true
637         if ! $have_expat ; then
638            AC_MSG_ERROR([Explicitly requested expat but expat not found])
639         fi
640 elif test x$with_xml = xlibxml; then
641         dbus_use_libxml=true
642         if ! $have_libxml ; then
643            AC_MSG_ERROR([Explicitly requested libxml but libxml not found])
644         fi
645 else
646         ### expat is the default because libxml can't currently survive 
647         ### our brutal OOM-handling unit test setup.
648         ### http://bugzilla.gnome.org/show_bug.cgi?id=109368
649         if $have_expat ; then
650                 with_xml=expat
651                 dbus_use_expat=true
652         elif $have_libxml ; then
653                 with_xml=libxml
654                 dbus_use_libxml=true
655         else
656                 AC_MSG_ERROR([No XML library found, check config.log for failed attempts])
657         fi
658 fi
659
660 AM_CONDITIONAL(DBUS_USE_EXPAT, $dbus_use_expat)
661 AM_CONDITIONAL(DBUS_USE_LIBXML, $dbus_use_libxml)
662
663 if $dbus_use_expat; then
664    XML_LIBS=-lexpat
665    XML_CFLAGS=
666 fi
667 if $dbus_use_libxml; then
668    XML_LIBS=$LIBXML_LIBS
669    XML_CFLAGS=$LIBXML_CFLAGS
670 fi
671
672 # SELinux detection
673 if test x$enable_selinux = xno ; then
674     have_selinux=no;
675 else
676     # See if we have SELinux library
677     AC_CHECK_LIB(selinux, is_selinux_enabled, 
678                  have_selinux=yes, have_selinux=no)
679
680     # see if we have the SELinux header with the new D-Bus stuff in it
681     if test x$have_selinux = xyes ; then
682         AC_MSG_CHECKING([for DBUS Flask permissions in selinux/av_permissions.h])
683         AC_TRY_COMPILE([#include <selinux/av_permissions.h>],
684                         [#ifdef DBUS__ACQUIRE_SVC return 0;
685                          #else
686                          #error DBUS__ACQUIRE_SVC not defined
687                          #endif],
688                         have_selinux=yes, have_selinux=no)
689         AC_MSG_RESULT($have_selinux)
690     fi
691
692     if test x$enable_selinux = xauto ; then
693         if test x$have_selinux = xno ; then
694                 AC_MSG_WARN([Sufficiently new SELinux library not found])
695         fi
696     else 
697         if test x$have_selinux = xno ; then
698                 AC_MSG_ERROR([SElinux explicitly required, and SELinux library not found])
699         fi
700     fi
701 fi
702
703 AM_CONDITIONAL(HAVE_SELINUX, test x$have_selinux = xyes)
704
705 if test x$have_selinux = xyes ; then
706     SELINUX_LIBS="-lselinux -lpthread"
707     AC_DEFINE(HAVE_SELINUX,1,[SELinux support])
708 else
709     SELINUX_LIBS=
710 fi
711
712 # dnotify checks
713 if test x$enable_dnotify = xno ; then
714     have_dnotify=no;
715 else
716     if test x$target_os = xlinux-gnu -o x$target_os = xlinux; then
717         have_dnotify=yes;       
718     else
719         have_dnotify=no;
720     fi
721 fi
722
723 dnl check if dnotify backend is enabled
724 if test x$have_dnotify = xyes; then
725    AC_DEFINE(DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX,1,[Use dnotify on Linux])
726 fi
727
728 AM_CONDITIONAL(DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX, test x$have_dnotify = xyes)
729
730 # kqueue checks
731 if test x$enable_kqueue = xno ; then
732     have_kqueue=no
733 else
734     have_kqueue=yes
735     AC_CHECK_HEADER(sys/event.h, , have_kqueue=no)
736     AC_CHECK_FUNC(kqueue, , have_kqueue=no)
737
738     if test x$enable_kqueue = xyes -a x$have_kqueue = xno; then
739         AC_MSG_ERROR(kqueue support explicitly enabled but not available)
740     fi
741 fi
742
743 dnl check if kqueue backend is enabled
744 if test x$have_kqueue = xyes; then
745    AC_DEFINE(DBUS_BUS_ENABLE_KQUEUE,1,[Use kqueue])
746 fi
747
748 AM_CONDITIONAL(DBUS_BUS_ENABLE_KQUEUE, test x$have_kqueue = xyes) 
749
750 dnl console owner file
751 if test x$enable_console_owner_file = xno ; then
752     have_console_owner_file=no;
753 else
754     case $target_os in
755     solaris*)
756         have_console_owner_file=yes;
757         AC_DEFINE(HAVE_CONSOLE_OWNER_FILE,1,[Have console owner file])
758         ;;
759     *)
760         have_console_owner_file=no;;
761     esac
762 fi
763
764 AM_CONDITIONAL(HAVE_CONSOLE_OWNER_FILE, test x$have_console_owner_file = xyes)
765
766 #### Set up final flags
767 DBUS_CLIENT_CFLAGS=
768 DBUS_CLIENT_LIBS=
769 AC_SUBST(DBUS_CLIENT_CFLAGS)
770 AC_SUBST(DBUS_CLIENT_LIBS)
771
772 DBUS_BUS_CFLAGS=$XML_CFLAGS
773 DBUS_BUS_LIBS="$XML_LIBS $SELINUX_LIBS $INTLLIBS"
774 AC_SUBST(DBUS_BUS_CFLAGS)
775 AC_SUBST(DBUS_BUS_LIBS)
776
777 DBUS_TEST_CFLAGS=
778 DBUS_TEST_LIBS=
779 AC_SUBST(DBUS_TEST_CFLAGS)
780 AC_SUBST(DBUS_TEST_LIBS)
781
782 ### X11 detection
783 AC_PATH_XTRA
784
785 ## for now enable_x11 just tracks have_x11, 
786 ## there's no --enable-x11
787 if test x$no_x = xyes ; then
788    have_x11=no
789    enable_x11=no
790 else
791    have_x11=yes
792    enable_x11=yes
793 fi
794
795 if test x$enable_x11 = xyes ; then
796    AC_DEFINE(DBUS_BUILD_X11,1,[Build X11-dependent code])
797    DBUS_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
798    DBUS_X_CFLAGS="$X_CFLAGS"
799 else
800    DBUS_X_LIBS=
801    DBUS_X_CFLAGS=
802 fi
803
804 AC_SUBST(DBUS_X_CFLAGS)
805 AC_SUBST(DBUS_X_LIBS)
806
807 ### Doxygen Documentation
808
809 AC_PATH_PROG(DOXYGEN, doxygen, no)
810
811 AC_MSG_CHECKING([whether to build Doxygen documentation])
812
813 if test x$DOXYGEN = xno ; then
814     have_doxygen=no
815 else
816     have_doxygen=yes
817 fi
818
819 if test x$enable_doxygen_docs = xauto ; then
820     if test x$have_doxygen = xno ; then
821         enable_doxygen_docs=no
822     else
823         enable_doxygen_docs=yes
824     fi
825 fi
826
827 if test x$enable_doxygen_docs = xyes; then
828     if test x$have_doxygen = xno; then
829         AC_MSG_ERROR([Building Doxygen docs explicitly required, but Doxygen not found])
830     fi
831 fi
832
833 AM_CONDITIONAL(DBUS_DOXYGEN_DOCS_ENABLED, test x$enable_doxygen_docs = xyes)
834 AC_MSG_RESULT(yes)
835
836 ### XML Documentation
837
838 AC_PATH_PROG(XMLTO, xmlto, no)
839
840 AC_MSG_CHECKING([whether to build XML documentation])
841
842 if test x$XMLTO = xno ; then
843     have_xmlto=no
844 else
845     have_xmlto=yes
846 fi
847
848 if test x$enable_xml_docs = xauto ; then
849     if test x$have_xmlto = xno ; then
850         enable_xml_docs=no
851     else
852         enable_xml_docs=yes
853     fi
854 fi
855
856 if test x$enable_xml_docs = xyes; then
857     if test x$have_xmlto = xno; then
858         AC_MSG_ERROR([Building XML docs explicitly required, but xmlto not found])
859     fi
860 fi
861
862 AM_CONDITIONAL(DBUS_XML_DOCS_ENABLED, test x$enable_xml_docs = xyes)
863 AC_MSG_RESULT(yes)
864
865 #### Have to go $localstatedir->$prefix/var->/usr/local/var   
866 #### someone please fix this a better way...
867
868 #### find the actual value for $prefix that we'll end up with
869 ##   (I know this is broken and should be done in the Makefile, but
870 ##    that's a major pain and almost nobody actually seems to care)
871 REAL_PREFIX=
872 if test "x$prefix" = "xNONE"; then
873   REAL_PREFIX=$ac_default_prefix
874 else
875   REAL_PREFIX=$prefix
876 fi
877
878 ## temporarily change prefix and exec_prefix
879 old_prefix=$prefix
880 prefix=$REAL_PREFIX
881
882 if test "x$exec_prefix" = xNONE ; then
883    REAL_EXEC_PREFIX=$REAL_PREFIX
884 else
885    REAL_EXEC_PREFIX=$exec_prefix
886 fi
887 old_exec_prefix=$exec_prefix
888 exec_prefix=$REAL_EXEC_PREFIX
889
890 ## eval everything
891 LOCALSTATEDIR_TMP="$localstatedir"
892 EXPANDED_LOCALSTATEDIR=`eval echo $LOCALSTATEDIR_TMP`
893 AC_SUBST(EXPANDED_LOCALSTATEDIR)
894
895 SYSCONFDIR_TMP="$sysconfdir"
896 EXPANDED_SYSCONFDIR=`eval echo $SYSCONFDIR_TMP`
897 AC_SUBST(EXPANDED_SYSCONFDIR)
898
899 BINDIR_TMP="$bindir"
900 EXPANDED_BINDIR=`eval echo $BINDIR_TMP`
901 AC_SUBST(EXPANDED_BINDIR)
902
903 LIBDIR_TMP="$libdir"
904 EXPANDED_LIBDIR=`eval echo $LIBDIR_TMP`
905 AC_SUBST(EXPANDED_LIBDIR)
906
907 DATADIR_TMP="$datadir"
908 EXPANDED_DATADIR=`eval echo $DATADIR_TMP`
909 AC_SUBST(EXPANDED_DATADIR)
910
911 ## put prefix and exec_prefix back
912 prefix=$old_prefix
913 exec_prefix=$old_exec_prefix
914
915 #### Check our operating system
916 operating_system=unknown
917 if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then
918    operating_system=redhat
919 fi
920
921 if test -f /etc/slackware-version || test -f $EXPANDED_SYSCONFDIR/slackware-version ; then
922    operating_system=slackware
923 fi
924
925 #### Sort out init scripts
926
927 if test x$with_init_scripts = x; then
928     if test xredhat = x$operating_system ; then
929         with_init_scripts=redhat
930     else
931         if test xslackware = x$operating_system ; then
932                 with_init_scripts=slackware
933             else
934                 with_init_scripts=none
935         fi
936     fi
937 fi
938
939 AM_CONDITIONAL(DBUS_INIT_SCRIPTS_RED_HAT, test x$with_init_scripts = xredhat)
940
941 AM_CONDITIONAL(DBUS_INIT_SCRIPTS_SLACKWARE, test x$with_init_scripts = xslackware)
942
943 ##### Set up location for system bus socket
944 if ! test -z "$with_system_socket"; then
945    DBUS_SYSTEM_SOCKET=$with_system_socket
946 else
947    DBUS_SYSTEM_SOCKET=${EXPANDED_LOCALSTATEDIR}/run/dbus/system_bus_socket
948 fi
949
950 AC_SUBST(DBUS_SYSTEM_SOCKET)
951 AC_DEFINE_UNQUOTED(DBUS_SYSTEM_SOCKET,"$DBUS_SYSTEM_SOCKET",[The name of the socket the system bus listens on by default])
952
953 ## system bus only listens on local domain sockets, and never 
954 ## on an abstract socket (so only root can create the socket)
955 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="unix:path=$DBUS_SYSTEM_SOCKET"
956 AC_SUBST(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS)
957 AC_DEFINE_UNQUOTED(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS, "$DBUS_SYSTEM_BUS_DEFAULT_ADDRESS",[The default D-Bus address of the system bus])
958
959 #### Set up the pid file
960 if ! test -z "$with_system_pid_file"; then
961    DBUS_SYSTEM_PID_FILE=$with_system_pid_file
962 elif test x$with_init_scripts = xredhat ; then
963    DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/messagebus.pid
964 else
965    DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/dbus/pid
966 fi
967
968 AC_SUBST(DBUS_SYSTEM_PID_FILE)
969
970 #### Directory to check for console ownership
971 if ! test -z "$with_console_auth_dir"; then
972    DBUS_CONSOLE_AUTH_DIR=$with_console_auth_dir
973 else
974    DBUS_CONSOLE_AUTH_DIR=/var/run/console/
975 fi
976
977 AC_SUBST(DBUS_CONSOLE_AUTH_DIR)
978 AC_DEFINE_UNQUOTED(DBUS_CONSOLE_AUTH_DIR, "$DBUS_CONSOLE_AUTH_DIR", [Directory to check for console ownerhip])
979
980 #### File to check for console ownership
981 if test x$have_console_owner_file = xyes; then
982    if ! test -z "$with_console_owner_file"; then
983       DBUS_CONSOLE_OWNER_FILE=$with_console_owner_file
984    else
985       DBUS_CONSOLE_OWNER_FILE=/dev/console
986    fi
987 else
988   DBUS_CONSOLE_OWNER_FILE=
989 fi
990
991 AC_SUBST(DBUS_CONSOLE_OWNER_FILE)
992 AC_DEFINE_UNQUOTED(DBUS_CONSOLE_OWNER_FILE, "$DBUS_CONSOLE_OWNER_FILE", [File to check for console ownerhip])
993
994 #### User to start the system bus as
995 if test -z "$with_dbus_user" ; then
996     DBUS_USER=messagebus
997 else
998     DBUS_USER=$with_dbus_user
999 fi
1000 AC_SUBST(DBUS_USER)
1001 AC_DEFINE_UNQUOTED(DBUS_USER,"$DBUS_USER", [User for running the system BUS daemon])
1002
1003 #### Directory to install dbus-daemon
1004 if test -z "$with_dbus_daemondir" ; then
1005     DBUS_DAEMONDIR=$EXPANDED_BINDIR
1006 else
1007     DBUS_DAEMONDIR=$with_dbus_daemondir
1008 fi
1009 AC_SUBST(DBUS_DAEMONDIR)
1010 AC_DEFINE_UNQUOTED(DBUS_DAEMONDIR,"$DBUS_DAEMONDIR", [Directory for installing the DBUS daemon])
1011
1012 #### Tell tests where to find certain stuff in builddir
1013
1014 DBUS_PWD=`pwd`
1015 AC_DEFUN([TEST_PATH], [
1016 TEST_$1=${DBUS_PWD}/test/$2
1017 AC_DEFINE_UNQUOTED(TEST_$1, "$TEST_$1",
1018                    [Full path to test file test/$2 in builddir])
1019 AC_SUBST(TEST_$1)
1020 ])
1021
1022 TEST_PATH(SERVICE_DIR, data/valid-service-files)
1023 TEST_PATH(SERVICE_BINARY, test-service)
1024 TEST_PATH(SHELL_SERVICE_BINARY, test-shell-service)
1025 TEST_PATH(EXIT_BINARY, test-exit)
1026 TEST_PATH(SEGFAULT_BINARY, test-segfault)
1027 TEST_PATH(SLEEP_FOREVER_BINARY, test-sleep-forever)
1028
1029 #### Find socket directories
1030 if ! test -z "$TMPDIR" ; then
1031    DEFAULT_SOCKET_DIR=$TMPDIR
1032 elif ! test -z "$TEMP" ; then
1033    DEFAULT_SOCKET_DIR=$TEMP
1034 elif ! test -z "$TMP" ; then
1035    DEFAULT_SOCKET_DIR=$TMP
1036 else
1037    DEFAULT_SOCKET_DIR=/tmp
1038 fi
1039
1040 if ! test -z "$with_test_socket_dir" ; then
1041    TEST_SOCKET_DIR="$with_test_socket_dir"
1042 else
1043    TEST_SOCKET_DIR=$DEFAULT_SOCKET_DIR
1044 fi
1045 AC_SUBST(TEST_SOCKET_DIR)
1046 AC_DEFINE_UNQUOTED(DBUS_TEST_SOCKET_DIR, "$TEST_SOCKET_DIR", [Where to put test sockets])
1047
1048 if ! test -z "$with_session_socket_dir" ; then
1049    DBUS_SESSION_SOCKET_DIR="$with_session_socket_dir"
1050 else
1051    DBUS_SESSION_SOCKET_DIR=$DEFAULT_SOCKET_DIR
1052 fi
1053 AC_DEFINE_UNQUOTED(DBUS_SESSION_SOCKET_DIR, "$DBUS_SESSION_SOCKET_DIR", [Where per-session bus puts its sockets])
1054 AC_SUBST(DBUS_SESSION_SOCKET_DIR)
1055
1056 AC_OUTPUT([
1057 Doxyfile
1058 dbus/dbus-arch-deps.h
1059 bus/system.conf
1060 bus/session.conf
1061 bus/messagebus
1062 bus/rc.messagebus
1063 bus/dbus-daemon.1
1064 Makefile
1065 dbus/Makefile
1066 bus/Makefile
1067 tools/Makefile
1068 test/Makefile
1069 test/name-test/Makefile
1070 doc/Makefile
1071 dbus-1.pc
1072 test/data/valid-config-files/debug-allow-all.conf
1073 test/data/valid-config-files/debug-allow-all-sha1.conf
1074 test/data/valid-service-files/debug-echo.service
1075 test/data/valid-service-files/debug-segfault.service
1076 test/data/valid-service-files/debug-shell-echo-success.service
1077 test/data/valid-service-files/debug-shell-echo-fail.service
1078 ])
1079
1080 dnl ==========================================================================
1081 echo "
1082                     D-Bus $VERSION
1083                   ==============
1084
1085         prefix:                   ${prefix}
1086         exec_prefix:              ${exec_prefix}
1087         libdir:                   ${EXPANDED_LIBDIR}
1088         bindir:                   ${EXPANDED_BINDIR}
1089         sysconfdir:               ${EXPANDED_SYSCONFDIR}
1090         localstatedir:            ${EXPANDED_LOCALSTATEDIR}
1091         datadir:                  ${EXPANDED_DATADIR}
1092         source code location:     ${srcdir}
1093         compiler:                 ${CC}
1094         cflags:                   ${CFLAGS}
1095         cppflags:                 ${CPPFLAGS}
1096         cxxflags:                 ${CXXFLAGS}
1097         64-bit int:               ${DBUS_INT64_TYPE}
1098         32-bit int:               ${DBUS_INT32_TYPE}
1099         16-bit int:               ${DBUS_INT16_TYPE}
1100         Doxygen:                  ${DOXYGEN}
1101         xmlto:                    ${XMLTO}"
1102
1103 echo "
1104         Maintainer mode:          ${USE_MAINTAINER_MODE}
1105         gcc coverage profiling:   ${enable_gcov}
1106         Building unit tests:      ${enable_tests}
1107         Building verbose mode:    ${enable_verbose_mode}
1108         Building assertions:      ${enable_asserts}
1109         Building checks:          ${enable_checks}
1110         Building SELinux support: ${have_selinux}
1111         Building dnotify support: ${have_dnotify}
1112         Building X11 code:        ${enable_x11}
1113         Building Doxygen docs:    ${enable_doxygen_docs}
1114         Building XML docs:        ${enable_xml_docs}
1115         Gettext libs (empty OK):  ${INTLLIBS}
1116         Using XML parser:         ${with_xml}
1117         Init scripts style:       ${with_init_scripts}
1118         Abstract socket names:    ${have_abstract_sockets}
1119         System bus socket:        ${DBUS_SYSTEM_SOCKET}
1120         System bus address:       ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS}
1121         System bus PID file:      ${DBUS_SYSTEM_PID_FILE}
1122         Session bus socket dir:   ${DBUS_SESSION_SOCKET_DIR}
1123         Console auth dir:         ${DBUS_CONSOLE_AUTH_DIR}
1124         Console owner file:       ${have_console_owner_file}
1125         Console owner file path:  ${DBUS_CONSOLE_OWNER_FILE}
1126         System bus user:          ${DBUS_USER}
1127         Session bus services dir: ${EXPANDED_DATADIR}/dbus-1/services
1128         'make check' socket dir:  ${TEST_SOCKET_DIR}
1129 "
1130
1131 if test x$enable_tests = xyes; then
1132         echo "NOTE: building with unit tests increases the size of the installed library and renders it insecure."
1133 fi
1134 if test x$enable_tests = xyes -a x$enable_asserts = xno; then
1135         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)"
1136 fi
1137 if test x$enable_gcov = xyes; then
1138         echo "NOTE: building with coverage profiling is definitely for developers only."
1139 fi
1140 if test x$enable_verbose_mode = xyes; then
1141         echo "NOTE: building with verbose mode increases library size, may slightly increase security risk, and decreases performance."
1142 fi
1143 if test x$enable_asserts = xyes; then
1144         echo "NOTE: building with assertions increases library size and decreases performance."
1145 fi
1146 if test x$enable_checks = xno; then
1147         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."
1148 fi