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