bfe50d6b3ad08afb1a3d641f6fbe5c6b5bc2282c
[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.94)
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=5
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=2
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 case $host_os in
347         darwin*)
348                 # check at compile-time, so that it is possible to build universal
349                 # (with multiple architectures at once on the compile line)
350                 AH_VERBATIM([WORDS_BIGENDIAN_DARWIN], [
351                         /* Use the compiler-provided endianness defines to allow universal compiling. */
352                         #if defined(__BIG_ENDIAN__)
353                         #define WORDS_BIGENDIAN 1
354                         #endif
355                 ])
356                 ;;
357         *)
358                 AC_C_BIGENDIAN
359                 ;;
360 esac
361
362 dnl **********************************
363 dnl *** va_copy checks (from GLib) ***
364 dnl **********************************
365 dnl we currently check for all three va_copy possibilities, so we get
366 dnl all results in config.log for bug reports.
367 AC_CACHE_CHECK([for an implementation of va_copy()],dbus_cv_va_copy,[
368         AC_LINK_IFELSE([#include <stdarg.h>
369         void f (int i, ...) {
370         va_list args1, args2;
371         va_start (args1, i);
372         va_copy (args2, args1);
373         if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
374           exit (1);
375         va_end (args1); va_end (args2);
376         }
377         int main() {
378           f (0, 42);
379           return 0;
380         }],
381         [dbus_cv_va_copy=yes],
382         [dbus_cv_va_copy=no])
383 ])
384 AC_CACHE_CHECK([for an implementation of __va_copy()],dbus_cv___va_copy,[
385         AC_LINK_IFELSE([#include <stdarg.h>
386         void f (int i, ...) {
387         va_list args1, args2;
388         va_start (args1, i);
389         __va_copy (args2, args1);
390         if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
391           exit (1);
392         va_end (args1); va_end (args2);
393         }
394         int main() {
395           f (0, 42);
396           return 0;
397         }],
398         [dbus_cv___va_copy=yes],
399         [dbus_cv___va_copy=no])
400 ])
401
402 if test "x$dbus_cv_va_copy" = "xyes"; then
403   dbus_va_copy_func=va_copy
404 else if test "x$dbus_cv___va_copy" = "xyes"; then
405   dbus_va_copy_func=__va_copy
406 fi
407 fi
408
409 if test -n "$dbus_va_copy_func"; then
410   AC_DEFINE_UNQUOTED(DBUS_VA_COPY,$dbus_va_copy_func,[A 'va_copy' style function])
411 fi
412
413 AC_CACHE_CHECK([whether va_lists can be copied by value],dbus_cv_va_val_copy,[
414         AC_TRY_RUN([#include <stdarg.h>
415         void f (int i, ...) {
416         va_list args1, args2;
417         va_start (args1, i);
418         args2 = args1;
419         if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
420           exit (1);
421         va_end (args1); va_end (args2);
422         }
423         int main() {
424           f (0, 42);
425           return 0;
426         }],
427         [dbus_cv_va_val_copy=yes],
428         [dbus_cv_va_val_copy=no],
429         [dbus_cv_va_val_copy=yes])
430 ])
431
432 if test "x$dbus_cv_va_val_copy" = "xno"; then
433   AC_DEFINE(DBUS_VA_COPY_AS_ARRAY,1, ['va_lists' cannot be copies as values])
434 fi
435
436
437 #### Atomic integers (checks by Sebastian Wilhelmi for GLib)
438 AC_MSG_CHECKING([whether to use inline assembler routines for atomic integers])
439 have_atomic_inc=no
440 if test x"$GCC" = xyes; then
441   if test "x$enable_ansi" = "xyes"; then
442     AC_MSG_RESULT([no])
443   else
444     case $host_cpu in
445       i386)
446         AC_MSG_RESULT([no])
447         ;;
448       i?86)
449         case $host_os in
450           darwin*)
451             AC_MSG_RESULT([darwin])
452             # check at compile-time, so that it is possible to build universal
453             # (with multiple architectures at once on the compile line)
454             AH_VERBATIM([DBUS_USE_ATOMIC_INT_486_DARWIN], [
455               #if (defined(__i386__) || defined(__x86_64__))
456               # define DBUS_USE_ATOMIC_INT_486 1
457               #endif
458             ])
459             ;;
460           *)
461             AC_MSG_RESULT([i486])
462             AC_DEFINE_UNQUOTED(DBUS_USE_ATOMIC_INT_486, 1, [Use atomic integer implementation for 486])
463             ;;
464         esac
465         have_atomic_inc=yes
466         ;;
467       *)
468         AC_MSG_RESULT([no])
469         ;;
470     esac
471   fi
472 fi
473 if test x$have_atomic_inc = xyes ; then
474   case $host_os in
475     darwin*)
476       AH_VERBATIM([DBUS_HAVE_ATOMIC_INT_DARWIN], [
477         #if (defined(__i386__) || defined(__x86_64__))
478         # define DBUS_HAVE_ATOMIC_INT 1
479         #endif
480       ])
481       ;;
482     *)
483       AC_DEFINE_UNQUOTED(DBUS_HAVE_ATOMIC_INT, 1, [Some atomic integer implementation present])
484       ;;
485   esac
486 fi
487
488 #### Various functions
489 AC_CHECK_LIB(socket,socket)
490 AC_CHECK_LIB(nsl,gethostbyname)
491
492 AC_CHECK_FUNCS(vsnprintf vasprintf nanosleep usleep poll setenv unsetenv socketpair getgrouplist fpathconf dirfd)
493
494 AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
495
496 AC_CHECK_HEADERS(errno.h)
497
498 AC_CACHE_CHECK([for posix getpwnam_r],
499                 ac_cv_func_posix_getpwnam_r,
500                 [AC_TRY_RUN([
501 #include <errno.h>
502 #include <pwd.h>
503 int main () { 
504     char buffer[10000];
505     struct passwd pwd, *pwptr = &pwd;
506     int error;
507     errno = 0;
508     error = getpwnam_r ("", &pwd, buffer, 
509                         sizeof (buffer), &pwptr);
510    return (error < 0 && errno == ENOSYS) 
511            || error == ENOSYS; 
512 }               ],
513         [ac_cv_func_posix_getpwnam_r=yes],
514         [ac_cv_func_posix_getpwnam_r=no])])
515 if test "$ac_cv_func_posix_getpwnam_r" = yes; then
516         AC_DEFINE(HAVE_POSIX_GETPWNAM_R,1,
517                 [Have POSIX function getpwnam_r])
518 else
519         AC_CACHE_CHECK([for nonposix getpwnam_r],
520                 ac_cv_func_nonposix_getpwnam_r,
521                 [AC_TRY_LINK([#include <pwd.h>],
522                         [char buffer[10000];
523                         struct passwd pwd;
524                         getpwnam_r ("", &pwd, buffer, 
525                                         sizeof (buffer));],
526                         [ac_cv_func_nonposix_getpwnam_r=yes],
527                         [ac_cv_func_nonposix_getpwnam_r=no])])
528                 if test "$ac_cv_func_nonposix_getpwnam_r" = yes; then
529                 AC_DEFINE(HAVE_NONPOSIX_GETPWNAM_R,1,
530                         [Have non-POSIX function getpwnam_r])
531         fi
532 fi
533
534 dnl check for socklen_t
535 AC_MSG_CHECKING(whether socklen_t is defined)
536 AC_TRY_COMPILE([
537 #include <sys/types.h>
538 #include <sys/socket.h>
539 #include <netdb.h>
540 ],[
541 socklen_t foo;
542 foo = 1;
543 ],dbus_have_socklen_t=yes,dbus_have_socklen_t=no)
544 AC_MSG_RESULT($dbus_have_socklen_t)
545
546 if test "x$dbus_have_socklen_t" = "xyes"; then
547     AC_DEFINE(HAVE_SOCKLEN_T,1,[Have socklen_t type])
548 fi
549
550 dnl check for writev header and writev function so we're 
551 dnl good to go if HAVE_WRITEV gets defined.
552 AC_CHECK_HEADERS(sys/uio.h, [AC_CHECK_FUNCS(writev)])
553
554 dnl needed on darwin for NAME_MAX
555 AC_CHECK_HEADERS(sys/syslimits.h)
556
557 dnl check for flavours of varargs macros (test from GLib)
558 AC_MSG_CHECKING(for ISO C99 varargs macros in C)
559 AC_TRY_COMPILE([],[
560 int a(int p1, int p2, int p3);
561 #define call_a(...) a(1,__VA_ARGS__)
562 call_a(2,3);
563 ],dbus_have_iso_c_varargs=yes,dbus_have_iso_c_varargs=no)
564 AC_MSG_RESULT($dbus_have_iso_c_varargs)
565
566 AC_MSG_CHECKING(for GNUC varargs macros)
567 AC_TRY_COMPILE([],[
568 int a(int p1, int p2, int p3);
569 #define call_a(params...) a(1,params)
570 call_a(2,3);
571 ],dbus_have_gnuc_varargs=yes,dbus_have_gnuc_varargs=no)
572 AC_MSG_RESULT($dbus_have_gnuc_varargs)
573
574 dnl Output varargs tests
575 if test x$dbus_have_iso_c_varargs = xyes; then
576     AC_DEFINE(HAVE_ISO_VARARGS,1,[Have ISO C99 varargs macros])
577 fi
578 if test x$dbus_have_gnuc_varargs = xyes; then
579     AC_DEFINE(HAVE_GNUC_VARARGS,1,[Have GNU-style varargs macros])
580 fi
581
582 dnl Check for various credentials.
583 AC_MSG_CHECKING(for struct cmsgcred)
584 AC_TRY_COMPILE([
585 #include <sys/types.h>
586 #include <sys/socket.h>
587 ],[
588 struct cmsgcred cred;
589
590 cred.cmcred_pid = 0;
591 ],dbus_have_struct_cmsgcred=yes,dbus_have_struct_cmsgcred=no)
592 AC_MSG_RESULT($dbus_have_struct_cmsgcred)
593
594 if test x$dbus_have_struct_cmsgcred = xyes; then
595     AC_DEFINE(HAVE_CMSGCRED,1,[Have cmsgcred structure])
596 fi
597
598 AC_CHECK_FUNCS(getpeerucred getpeereid)
599
600 #### Abstract sockets
601
602 AC_MSG_CHECKING(abstract socket namespace)
603 AC_LANG_PUSH(C)
604 AC_RUN_IFELSE([AC_LANG_PROGRAM(
605 [[
606 #include <sys/types.h>
607 #include <stdlib.h>
608 #include <string.h>
609 #include <stdio.h>
610 #include <sys/socket.h>
611 #include <sys/un.h>
612 #include <errno.h>
613 ]],
614 [[
615   int listen_fd;
616   struct sockaddr_un addr;
617   
618   listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
619   
620   if (listen_fd < 0)
621     {
622       fprintf (stderr, "socket() failed: %s\n", strerror (errno));
623       exit (1);
624     }
625
626   memset (&addr, '\0', sizeof (addr));
627   addr.sun_family = AF_UNIX;
628   strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test");
629   addr.sun_path[0] = '\0'; /* this is what makes it abstract */
630   
631   if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
632     {
633        fprintf (stderr, "Abstract socket namespace bind() failed: %s\n", 
634                 strerror (errno));
635        exit (1);
636     }
637   else 
638     exit (0);
639 ]])],
640               [have_abstract_sockets=yes],
641               [have_abstract_sockets=no])
642 AC_LANG_POP(C)
643 AC_MSG_RESULT($have_abstract_sockets)
644
645 if test x$enable_abstract_sockets = xyes; then
646     if test x$have_abstract_sockets = xno; then
647         AC_MSG_ERROR([Abstract sockets explicitly required, and support not detected.])
648     fi
649 fi
650
651 if test x$enable_abstract_sockets = xno; then
652    have_abstract_sockets=no;
653 fi
654
655 if test x$have_abstract_sockets = xyes ; then
656    DBUS_PATH_OR_ABSTRACT=abstract
657    AC_DEFINE(HAVE_ABSTRACT_SOCKETS,1,[Have abstract socket namespace])
658 else
659    DBUS_PATH_OR_ABSTRACT=path
660 fi
661
662 # this is used in addresses to prefer abstract, e.g. 
663 # unix:path=/foo or unix:abstract=/foo 
664 AC_SUBST(DBUS_PATH_OR_ABSTRACT)
665
666 #### Sort out XML library
667
668 # see what we have
669 AC_CHECK_LIB(expat, XML_ParserCreate_MM,
670              [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ],
671              have_expat=false)
672
673 PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.6.0, have_libxml=true, have_libxml=false)
674
675 # see what we want to use
676 dbus_use_libxml=false
677 dbus_use_expat=false
678 if test x$with_xml = xexpat; then
679         dbus_use_expat=true
680         if ! $have_expat ; then
681            AC_MSG_ERROR([Explicitly requested expat but expat not found])
682         fi
683 elif test x$with_xml = xlibxml; then
684         dbus_use_libxml=true
685         if ! $have_libxml ; then
686            AC_MSG_ERROR([Explicitly requested libxml but libxml not found])
687         fi
688 else
689         ### expat is the default because libxml can't currently survive 
690         ### our brutal OOM-handling unit test setup.
691         ### http://bugzilla.gnome.org/show_bug.cgi?id=109368
692         if $have_expat ; then
693                 with_xml=expat
694                 dbus_use_expat=true
695         elif $have_libxml ; then
696                 with_xml=libxml
697                 dbus_use_libxml=true
698         else
699                 AC_MSG_ERROR([No XML library found, check config.log for failed attempts])
700         fi
701 fi
702
703 AM_CONDITIONAL(DBUS_USE_EXPAT, $dbus_use_expat)
704 AM_CONDITIONAL(DBUS_USE_LIBXML, $dbus_use_libxml)
705
706 if $dbus_use_expat; then
707    XML_LIBS=-lexpat
708    XML_CFLAGS=
709 fi
710 if $dbus_use_libxml; then
711    XML_LIBS=$LIBXML_LIBS
712    XML_CFLAGS=$LIBXML_CFLAGS
713 fi
714
715 # SELinux detection
716 if test x$enable_selinux = xno ; then
717     have_selinux=no;
718 else
719     # See if we have SELinux library
720     AC_CHECK_LIB(selinux, is_selinux_enabled, 
721                  have_selinux=yes, have_selinux=no)
722
723     # see if we have the SELinux header with the new D-Bus stuff in it
724     if test x$have_selinux = xyes ; then
725         AC_MSG_CHECKING([for DBUS Flask permissions in selinux/av_permissions.h])
726         AC_TRY_COMPILE([#include <selinux/av_permissions.h>],
727                         [#ifdef DBUS__ACQUIRE_SVC return 0;
728                          #else
729                          #error DBUS__ACQUIRE_SVC not defined
730                          #endif],
731                         have_selinux=yes, have_selinux=no)
732         AC_MSG_RESULT($have_selinux)
733     fi
734
735     if test x$enable_selinux = xauto ; then
736         if test x$have_selinux = xno ; then
737                 AC_MSG_WARN([Sufficiently new SELinux library not found])
738         fi
739     else 
740         if test x$have_selinux = xno ; then
741                 AC_MSG_ERROR([SElinux explicitly required, and SELinux library not found])
742         fi
743     fi
744 fi
745
746 AM_CONDITIONAL(HAVE_SELINUX, test x$have_selinux = xyes)
747
748 if test x$have_selinux = xyes ; then
749     SELINUX_LIBS="-lselinux -lpthread"
750     AC_DEFINE(HAVE_SELINUX,1,[SELinux support])
751 else
752     SELINUX_LIBS=
753 fi
754
755 # dnotify checks
756 if test x$enable_dnotify = xno ; then
757     have_dnotify=no;
758 else
759     if test x$target_os = xlinux-gnu -o x$target_os = xlinux; then
760         have_dnotify=yes;       
761     else
762         have_dnotify=no;
763     fi
764 fi
765
766 dnl check if dnotify backend is enabled
767 if test x$have_dnotify = xyes; then
768    AC_DEFINE(DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX,1,[Use dnotify on Linux])
769 fi
770
771 AM_CONDITIONAL(DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX, test x$have_dnotify = xyes)
772
773 # kqueue checks
774 if test x$enable_kqueue = xno ; then
775     have_kqueue=no
776 else
777     have_kqueue=yes
778     AC_CHECK_HEADER(sys/event.h, , have_kqueue=no)
779     AC_CHECK_FUNC(kqueue, , have_kqueue=no)
780
781     if test x$enable_kqueue = xyes -a x$have_kqueue = xno; then
782         AC_MSG_ERROR(kqueue support explicitly enabled but not available)
783     fi
784 fi
785
786 dnl check if kqueue backend is enabled
787 if test x$have_kqueue = xyes; then
788    AC_DEFINE(DBUS_BUS_ENABLE_KQUEUE,1,[Use kqueue])
789 fi
790
791 AM_CONDITIONAL(DBUS_BUS_ENABLE_KQUEUE, test x$have_kqueue = xyes) 
792
793 dnl console owner file
794 if test x$enable_console_owner_file = xno ; then
795     have_console_owner_file=no;
796 else
797     case $target_os in
798     solaris*)
799         have_console_owner_file=yes;
800         AC_DEFINE(HAVE_CONSOLE_OWNER_FILE,1,[Have console owner file])
801         ;;
802     *)
803         have_console_owner_file=no;;
804     esac
805 fi
806
807 AM_CONDITIONAL(HAVE_CONSOLE_OWNER_FILE, test x$have_console_owner_file = xyes)
808
809 #### Set up final flags
810 DBUS_CLIENT_CFLAGS=
811 DBUS_CLIENT_LIBS=
812 AC_SUBST(DBUS_CLIENT_CFLAGS)
813 AC_SUBST(DBUS_CLIENT_LIBS)
814
815 DBUS_BUS_CFLAGS=$XML_CFLAGS
816 DBUS_BUS_LIBS="$XML_LIBS $SELINUX_LIBS $INTLLIBS"
817 AC_SUBST(DBUS_BUS_CFLAGS)
818 AC_SUBST(DBUS_BUS_LIBS)
819
820 DBUS_TEST_CFLAGS=
821 DBUS_TEST_LIBS=
822 AC_SUBST(DBUS_TEST_CFLAGS)
823 AC_SUBST(DBUS_TEST_LIBS)
824
825 ### X11 detection
826 AC_PATH_XTRA
827
828 ## for now enable_x11 just tracks have_x11, 
829 ## there's no --enable-x11
830 if test x$no_x = xyes ; then
831    have_x11=no
832    enable_x11=no
833 else
834    have_x11=yes
835    enable_x11=yes
836 fi
837
838 if test x$enable_x11 = xyes ; then
839    AC_DEFINE(DBUS_BUILD_X11,1,[Build X11-dependent code])
840    DBUS_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
841    DBUS_X_CFLAGS="$X_CFLAGS"
842 else
843    DBUS_X_LIBS=
844    DBUS_X_CFLAGS=
845 fi
846
847 AC_SUBST(DBUS_X_CFLAGS)
848 AC_SUBST(DBUS_X_LIBS)
849
850 ### Doxygen Documentation
851
852 AC_PATH_PROG(DOXYGEN, doxygen, no)
853
854 AC_MSG_CHECKING([whether to build Doxygen documentation])
855
856 if test x$DOXYGEN = xno ; then
857     have_doxygen=no
858 else
859     have_doxygen=yes
860 fi
861
862 if test x$enable_doxygen_docs = xauto ; then
863     if test x$have_doxygen = xno ; then
864         enable_doxygen_docs=no
865     else
866         enable_doxygen_docs=yes
867     fi
868 fi
869
870 if test x$enable_doxygen_docs = xyes; then
871     if test x$have_doxygen = xno; then
872         AC_MSG_ERROR([Building Doxygen docs explicitly required, but Doxygen not found])
873     fi
874 fi
875
876 AM_CONDITIONAL(DBUS_DOXYGEN_DOCS_ENABLED, test x$enable_doxygen_docs = xyes)
877 AC_MSG_RESULT(yes)
878
879 ### XML Documentation
880
881 AC_PATH_PROG(XMLTO, xmlto, no)
882
883 AC_MSG_CHECKING([whether to build XML documentation])
884
885 if test x$XMLTO = xno ; then
886     have_xmlto=no
887 else
888     have_xmlto=yes
889 fi
890
891 if test x$enable_xml_docs = xauto ; then
892     if test x$have_xmlto = xno ; then
893         enable_xml_docs=no
894     else
895         enable_xml_docs=yes
896     fi
897 fi
898
899 if test x$enable_xml_docs = xyes; then
900     if test x$have_xmlto = xno; then
901         AC_MSG_ERROR([Building XML docs explicitly required, but xmlto not found])
902     fi
903 fi
904
905 AM_CONDITIONAL(DBUS_XML_DOCS_ENABLED, test x$enable_xml_docs = xyes)
906 AC_MSG_RESULT(yes)
907
908 #### Have to go $localstatedir->$prefix/var->/usr/local/var   
909 #### someone please fix this a better way...
910
911 #### find the actual value for $prefix that we'll end up with
912 ##   (I know this is broken and should be done in the Makefile, but
913 ##    that's a major pain and almost nobody actually seems to care)
914 REAL_PREFIX=
915 if test "x$prefix" = "xNONE"; then
916   REAL_PREFIX=$ac_default_prefix
917 else
918   REAL_PREFIX=$prefix
919 fi
920
921 ## temporarily change prefix and exec_prefix
922 old_prefix=$prefix
923 prefix=$REAL_PREFIX
924
925 if test "x$exec_prefix" = xNONE ; then
926    REAL_EXEC_PREFIX=$REAL_PREFIX
927 else
928    REAL_EXEC_PREFIX=$exec_prefix
929 fi
930 old_exec_prefix=$exec_prefix
931 exec_prefix=$REAL_EXEC_PREFIX
932
933 ## eval everything
934 LOCALSTATEDIR_TMP="$localstatedir"
935 EXPANDED_LOCALSTATEDIR=`eval echo $LOCALSTATEDIR_TMP`
936 AC_SUBST(EXPANDED_LOCALSTATEDIR)
937
938 SYSCONFDIR_TMP="$sysconfdir"
939 EXPANDED_SYSCONFDIR=`eval echo $SYSCONFDIR_TMP`
940 AC_SUBST(EXPANDED_SYSCONFDIR)
941
942 BINDIR_TMP="$bindir"
943 EXPANDED_BINDIR=`eval echo $BINDIR_TMP`
944 AC_SUBST(EXPANDED_BINDIR)
945
946 LIBDIR_TMP="$libdir"
947 EXPANDED_LIBDIR=`eval echo $LIBDIR_TMP`
948 AC_SUBST(EXPANDED_LIBDIR)
949
950 DATADIR_TMP="$datadir"
951 EXPANDED_DATADIR=`eval echo $DATADIR_TMP`
952 AC_SUBST(EXPANDED_DATADIR)
953
954 ## put prefix and exec_prefix back
955 prefix=$old_prefix
956 exec_prefix=$old_exec_prefix
957
958 #### Check our operating system
959 operating_system=unknown
960 if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then
961    operating_system=redhat
962 fi
963
964 if test -f /etc/slackware-version || test -f $EXPANDED_SYSCONFDIR/slackware-version ; then
965    operating_system=slackware
966 fi
967
968 #### Sort out init scripts
969
970 if test x$with_init_scripts = x; then
971     if test xredhat = x$operating_system ; then
972         with_init_scripts=redhat
973     else
974         if test xslackware = x$operating_system ; then
975                 with_init_scripts=slackware
976             else
977                 with_init_scripts=none
978         fi
979     fi
980 fi
981
982 AM_CONDITIONAL(DBUS_INIT_SCRIPTS_RED_HAT, test x$with_init_scripts = xredhat)
983
984 AM_CONDITIONAL(DBUS_INIT_SCRIPTS_SLACKWARE, test x$with_init_scripts = xslackware)
985
986 ##### Set up location for system bus socket
987 if ! test -z "$with_system_socket"; then
988    DBUS_SYSTEM_SOCKET=$with_system_socket
989 else
990    DBUS_SYSTEM_SOCKET=${EXPANDED_LOCALSTATEDIR}/run/dbus/system_bus_socket
991 fi
992
993 AC_SUBST(DBUS_SYSTEM_SOCKET)
994 AC_DEFINE_UNQUOTED(DBUS_SYSTEM_SOCKET,"$DBUS_SYSTEM_SOCKET",[The name of the socket the system bus listens on by default])
995
996 ## system bus only listens on local domain sockets, and never 
997 ## on an abstract socket (so only root can create the socket)
998 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="unix:path=$DBUS_SYSTEM_SOCKET"
999 AC_SUBST(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS)
1000 AC_DEFINE_UNQUOTED(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS, "$DBUS_SYSTEM_BUS_DEFAULT_ADDRESS",[The default D-Bus address of the system bus])
1001
1002 #### Set up the pid file
1003 if ! test -z "$with_system_pid_file"; then
1004    DBUS_SYSTEM_PID_FILE=$with_system_pid_file
1005 elif test x$with_init_scripts = xredhat ; then
1006    DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/messagebus.pid
1007 else
1008    DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/dbus/pid
1009 fi
1010
1011 AC_SUBST(DBUS_SYSTEM_PID_FILE)
1012
1013 #### Directory to check for console ownership
1014 if ! test -z "$with_console_auth_dir"; then
1015    DBUS_CONSOLE_AUTH_DIR=$with_console_auth_dir
1016 else
1017    DBUS_CONSOLE_AUTH_DIR=/var/run/console/
1018 fi
1019
1020 AC_SUBST(DBUS_CONSOLE_AUTH_DIR)
1021 AC_DEFINE_UNQUOTED(DBUS_CONSOLE_AUTH_DIR, "$DBUS_CONSOLE_AUTH_DIR", [Directory to check for console ownerhip])
1022
1023 #### File to check for console ownership
1024 if test x$have_console_owner_file = xyes; then
1025    if ! test -z "$with_console_owner_file"; then
1026       DBUS_CONSOLE_OWNER_FILE=$with_console_owner_file
1027    else
1028       DBUS_CONSOLE_OWNER_FILE=/dev/console
1029    fi
1030 else
1031   DBUS_CONSOLE_OWNER_FILE=
1032 fi
1033
1034 AC_SUBST(DBUS_CONSOLE_OWNER_FILE)
1035 AC_DEFINE_UNQUOTED(DBUS_CONSOLE_OWNER_FILE, "$DBUS_CONSOLE_OWNER_FILE", [File to check for console ownerhip])
1036
1037 #### User to start the system bus as
1038 if test -z "$with_dbus_user" ; then
1039     DBUS_USER=messagebus
1040 else
1041     DBUS_USER=$with_dbus_user
1042 fi
1043 AC_SUBST(DBUS_USER)
1044 AC_DEFINE_UNQUOTED(DBUS_USER,"$DBUS_USER", [User for running the system BUS daemon])
1045
1046 #### Directory to install dbus-daemon
1047 if test -z "$with_dbus_daemondir" ; then
1048     DBUS_DAEMONDIR=$EXPANDED_BINDIR
1049 else
1050     DBUS_DAEMONDIR=$with_dbus_daemondir
1051 fi
1052 AC_SUBST(DBUS_DAEMONDIR)
1053 AC_DEFINE_UNQUOTED(DBUS_DAEMONDIR,"$DBUS_DAEMONDIR", [Directory for installing the DBUS daemon])
1054
1055 #### Directory to install the other binaries
1056 DBUS_BINDIR=$EXPANDED_BINDIR
1057 AC_SUBST(DBUS_BINDIR)
1058 AC_DEFINE_UNQUOTED(DBUS_BINDIR,"$DBUS_BINDIR", [Directory for installing the binaries])
1059
1060 #### Tell tests where to find certain stuff in builddir
1061
1062 DBUS_PWD=`pwd`
1063 AC_DEFUN([TEST_PATH], [
1064 TEST_$1=${DBUS_PWD}/test/$2
1065 AC_DEFINE_UNQUOTED(TEST_$1, "$TEST_$1",
1066                    [Full path to test file test/$2 in builddir])
1067 AC_SUBST(TEST_$1)
1068 ])
1069
1070 TEST_PATH(SERVICE_DIR, data/valid-service-files)
1071 TEST_PATH(SERVICE_BINARY, test-service)
1072 TEST_PATH(SHELL_SERVICE_BINARY, test-shell-service)
1073 TEST_PATH(EXIT_BINARY, test-exit)
1074 TEST_PATH(SEGFAULT_BINARY, test-segfault)
1075 TEST_PATH(SLEEP_FOREVER_BINARY, test-sleep-forever)
1076
1077 #### Find socket directories
1078 if ! test -z "$TMPDIR" ; then
1079    DEFAULT_SOCKET_DIR=$TMPDIR
1080 elif ! test -z "$TEMP" ; then
1081    DEFAULT_SOCKET_DIR=$TEMP
1082 elif ! test -z "$TMP" ; then
1083    DEFAULT_SOCKET_DIR=$TMP
1084 else
1085    DEFAULT_SOCKET_DIR=/tmp
1086 fi
1087
1088 if ! test -z "$with_test_socket_dir" ; then
1089    TEST_SOCKET_DIR="$with_test_socket_dir"
1090 else
1091    TEST_SOCKET_DIR=$DEFAULT_SOCKET_DIR
1092 fi
1093 AC_SUBST(TEST_SOCKET_DIR)
1094 AC_DEFINE_UNQUOTED(DBUS_TEST_SOCKET_DIR, "$TEST_SOCKET_DIR", [Where to put test sockets])
1095
1096 if ! test -z "$with_session_socket_dir" ; then
1097    DBUS_SESSION_SOCKET_DIR="$with_session_socket_dir"
1098 else
1099    DBUS_SESSION_SOCKET_DIR=$DEFAULT_SOCKET_DIR
1100 fi
1101 AC_DEFINE_UNQUOTED(DBUS_SESSION_SOCKET_DIR, "$DBUS_SESSION_SOCKET_DIR", [Where per-session bus puts its sockets])
1102 AC_SUBST(DBUS_SESSION_SOCKET_DIR)
1103
1104 AC_OUTPUT([
1105 Doxyfile
1106 dbus/dbus-arch-deps.h
1107 bus/system.conf
1108 bus/session.conf
1109 bus/messagebus
1110 bus/rc.messagebus
1111 bus/dbus-daemon.1
1112 Makefile
1113 dbus/Makefile
1114 bus/Makefile
1115 tools/Makefile
1116 test/Makefile
1117 test/name-test/Makefile
1118 doc/Makefile
1119 dbus-1.pc
1120 test/data/valid-config-files/debug-allow-all.conf
1121 test/data/valid-config-files/debug-allow-all-sha1.conf
1122 test/data/valid-service-files/debug-echo.service
1123 test/data/valid-service-files/debug-segfault.service
1124 test/data/valid-service-files/debug-shell-echo-success.service
1125 test/data/valid-service-files/debug-shell-echo-fail.service
1126 ])
1127
1128 dnl ==========================================================================
1129 echo "
1130                     D-Bus $VERSION
1131                   ==============
1132
1133         prefix:                   ${prefix}
1134         exec_prefix:              ${exec_prefix}
1135         libdir:                   ${EXPANDED_LIBDIR}
1136         bindir:                   ${EXPANDED_BINDIR}
1137         sysconfdir:               ${EXPANDED_SYSCONFDIR}
1138         localstatedir:            ${EXPANDED_LOCALSTATEDIR}
1139         datadir:                  ${EXPANDED_DATADIR}
1140         source code location:     ${srcdir}
1141         compiler:                 ${CC}
1142         cflags:                   ${CFLAGS}
1143         cppflags:                 ${CPPFLAGS}
1144         cxxflags:                 ${CXXFLAGS}
1145         64-bit int:               ${DBUS_INT64_TYPE}
1146         32-bit int:               ${DBUS_INT32_TYPE}
1147         16-bit int:               ${DBUS_INT16_TYPE}
1148         Doxygen:                  ${DOXYGEN}
1149         xmlto:                    ${XMLTO}"
1150
1151 echo "
1152         Maintainer mode:          ${USE_MAINTAINER_MODE}
1153         gcc coverage profiling:   ${enable_gcov}
1154         Building unit tests:      ${enable_tests}
1155         Building verbose mode:    ${enable_verbose_mode}
1156         Building assertions:      ${enable_asserts}
1157         Building checks:          ${enable_checks}
1158         Building SELinux support: ${have_selinux}
1159         Building dnotify support: ${have_dnotify}
1160         Building X11 code:        ${enable_x11}
1161         Building Doxygen docs:    ${enable_doxygen_docs}
1162         Building XML docs:        ${enable_xml_docs}
1163         Gettext libs (empty OK):  ${INTLLIBS}
1164         Using XML parser:         ${with_xml}
1165         Init scripts style:       ${with_init_scripts}
1166         Abstract socket names:    ${have_abstract_sockets}
1167         System bus socket:        ${DBUS_SYSTEM_SOCKET}
1168         System bus address:       ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS}
1169         System bus PID file:      ${DBUS_SYSTEM_PID_FILE}
1170         Session bus socket dir:   ${DBUS_SESSION_SOCKET_DIR}
1171         Console auth dir:         ${DBUS_CONSOLE_AUTH_DIR}
1172         Console owner file:       ${have_console_owner_file}
1173         Console owner file path:  ${DBUS_CONSOLE_OWNER_FILE}
1174         System bus user:          ${DBUS_USER}
1175         Session bus services dir: ${EXPANDED_DATADIR}/dbus-1/services
1176         'make check' socket dir:  ${TEST_SOCKET_DIR}
1177 "
1178
1179 if test x$enable_tests = xyes; then
1180         echo "NOTE: building with unit tests increases the size of the installed library and renders it insecure."
1181 fi
1182 if test x$enable_tests = xyes -a x$enable_asserts = xno; then
1183         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)"
1184 fi
1185 if test x$enable_gcov = xyes; then
1186         echo "NOTE: building with coverage profiling is definitely for developers only."
1187 fi
1188 if test x$enable_verbose_mode = xyes; then
1189         echo "NOTE: building with verbose mode increases library size, may slightly increase security risk, and decreases performance."
1190 fi
1191 if test x$enable_asserts = xyes; then
1192         echo "NOTE: building with assertions increases library size and decreases performance."
1193 fi
1194 if test x$enable_checks = xno; then
1195         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."
1196 fi