2004-07-24 Havoc Pennington <hp@redhat.com>
[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 AC_ARG_ENABLE(selinux,          [  --enable-selinux      build with SELinux support],enable_selinux=$enableval,enable_selinux=auto)
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.95
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.16
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    DBUS_PATH_OR_ABSTRACT=abstract
629    AC_DEFINE(HAVE_ABSTRACT_SOCKETS,1,[Have abstract socket namespace])
630 else
631    DBUS_PATH_OR_ABSTRACT=path
632 fi
633
634 # this is used in addresses to prefer abstract, e.g. 
635 # unix:path=/foo or unix:abstract=/foo 
636 AC_SUBST(DBUS_PATH_OR_ABSTRACT)
637
638 #### Sort out XML library
639
640 # see what we have
641 AC_CHECK_LIB(expat, XML_ParserCreate_MM, 
642              [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ],
643              have_expat=false)
644
645 PKG_CHECK_MODULES(LIBXML, libxml-2.0, have_libxml=true, have_libxml=false)
646
647 # see what we want to use
648 dbus_use_libxml=false
649 dbus_use_expat=false
650 if test x$with_xml = xexpat; then
651         dbus_use_expat=true
652         if ! $have_expat ; then
653            AC_MSG_ERROR([Explicitly requested expat but expat not found])
654         fi
655 elif test x$with_xml = xlibxml; then
656         dbus_use_libxml=true
657         if ! $have_libxml ; then
658            AC_MSG_ERROR([Explicitly requested libxml but libxml not found])
659         fi
660 else
661         ### expat is the default because libxml can't currently survive 
662         ### our brutal OOM-handling unit test setup.
663         ### http://bugzilla.gnome.org/show_bug.cgi?id=109368
664         if $have_expat ; then
665                 with_xml=expat
666                 dbus_use_expat=true
667         elif $have_libxml ; then
668                 with_xml=libxml
669                 dbus_use_libxml=true
670         else
671                 AC_MSG_ERROR([No XML library found, check config.log for failed attempts])
672         fi
673 fi
674
675 if $dbus_use_libxml ; then
676         dnl libxml OOM handling is a bit broken
677         AC_MSG_WARN([libxml loader is not as robust as the expat one wrt. OOM handling])
678 fi
679
680
681 AM_CONDITIONAL(DBUS_USE_EXPAT, $dbus_use_expat)
682 AM_CONDITIONAL(DBUS_USE_LIBXML, $dbus_use_libxml)
683
684 if $dbus_use_expat; then
685    XML_LIBS=-lexpat
686    XML_CFLAGS=
687 fi
688 if $dbus_use_libxml; then
689    XML_LIBS=$LIBXML_LIBS
690    XML_CFLAGS=$LIBXML_CFLAGS
691 fi
692
693 # SELinux detection
694 if test x$enable_selinux = xno ; then
695     have_selinux=no;
696 else
697     # See if we have SELinux library
698     AC_CHECK_LIB(selinux, is_selinux_enabled, 
699                  have_selinux=yes, have_selinux=no)
700
701     # see if we have the SELinux header with the new D-BUS stuff in it
702     if test x$have_selinux = xyes ; then
703         AC_EGREP_HEADER(DBUS__ACQUIRE_SVC, av_permissions.h,
704                         have_selinux=yes, have_selinux=no)
705     fi
706
707     if test x$enable_selinux = xauto ; then
708         if test x$have_selinux = xno ; then
709                 AC_MSG_WARN([Sufficiently new SELinux library not found])
710         fi
711     else 
712         if test x$have_selinux = xno ; then
713                 AC_MSG_ERROR([SElinux explicitly required, and SELinux library not found])
714         fi
715     fi
716 fi
717
718 AM_CONDITIONAL(HAVE_SELINUX, test x$have_selinux = xyes)
719
720 if test x$have_selinux = xyes ; then
721     SELINUX_LIBS=-lselinux
722     AC_DEFINE(HAVE_SELINUX,1,[SELinux support])
723 else
724     SELINUX_LIBS=
725 fi
726
727 #### Set up final flags
728 DBUS_CLIENT_CFLAGS=
729 DBUS_CLIENT_LIBS=
730 AC_SUBST(DBUS_CLIENT_CFLAGS)
731 AC_SUBST(DBUS_CLIENT_LIBS)
732
733 DBUS_BUS_CFLAGS=$XML_CFLAGS
734 DBUS_BUS_LIBS="$XML_LIBS $SELINUX_LIBS"
735 AC_SUBST(DBUS_BUS_CFLAGS)
736 AC_SUBST(DBUS_BUS_LIBS)
737
738 DBUS_TEST_CFLAGS=
739 DBUS_TEST_LIBS=
740 AC_SUBST(DBUS_TEST_CFLAGS)
741 AC_SUBST(DBUS_TEST_LIBS)
742
743 # Glib detection
744 PKG_CHECK_MODULES(DBUS_GLIB, gobject-2.0, have_glib=yes, have_glib=no)
745 PKG_CHECK_MODULES(DBUS_GLIB_THREADS, glib-2.0 gthread-2.0, have_glib_threads=yes, have_glib_threads=no)
746
747 if test x$have_glib = xno ; then
748     AC_MSG_WARN([GLib development libraries not found])
749 fi
750
751 if test x$enable_glib = xyes; then
752     if test x$have_glib = xno; then
753         AC_MSG_ERROR([GLib explicitly required, and GLib development libraries not found])
754     fi
755 fi
756
757 if test x$enable_glib = xno; then
758    have_glib=no;
759 fi
760
761 AM_CONDITIONAL(HAVE_GLIB, test x$have_glib = xyes)
762 AM_CONDITIONAL(HAVE_GLIB_THREADS, test x$have_glib_threads = xyes)
763
764 dnl GLib flags
765 AC_SUBST(DBUS_GLIB_CFLAGS)
766 AC_SUBST(DBUS_GLIB_LIBS)
767 AC_SUBST(DBUS_GLIB_THREADS_LIBS)
768
769 DBUS_GLIB_TOOL_CFLAGS=$XML_CFLAGS
770 DBUS_GLIB_TOOL_LIBS=$XML_LIBS
771 AC_SUBST(DBUS_GLIB_TOOL_CFLAGS)
772 AC_SUBST(DBUS_GLIB_TOOL_LIBS)
773
774 # GTK detection
775 if test x$have_glib = xno ; then
776     AC_MSG_WARN([Can't use GTK+ since GLib not enabled])
777     have_gtk=no
778 else
779     PKG_CHECK_MODULES(DBUS_GTK, gtk+-2.0, have_gtk=yes, have_gtk=no)
780 fi
781
782 if test x$have_gtk = xno ; then
783     AC_MSG_WARN([GTK+ development libraries not found])
784 fi
785
786 if test x$enable_gtk = xyes; then
787     if test x$have_gtk = xno; then
788         AC_MSG_ERROR([GTK+ explicitly required, and GTK+ development libraries not found])
789     fi
790 fi
791
792 if test x$enable_gtk = xno; then
793    have_gtk=no;
794 fi
795
796 AM_CONDITIONAL(HAVE_GTK, test x$have_gtk = xyes)
797
798 dnl Gtk flags
799 AC_SUBST(DBUS_GTK_CFLAGS)
800 AC_SUBST(DBUS_GTK_LIBS)
801
802 # Qt detection
803 AC_PATH_PROG(QT_MOC, moc, no)
804
805 have_qt=no
806 AC_MSG_CHECKING([for qglobal.h])
807 if test -n "$QTDIR" -a -f "$QTDIR/include/qglobal.h"; then
808     have_qt=yes
809     DBUS_QT_CXXFLAGS="-I$QTDIR/include"
810 else
811     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
812         if test -f "$dir/qglobal.h"; then
813             have_qt=yes
814             DBUS_QT_CXXFLAGS="-I$dir"
815        fi
816     done
817 fi
818 if test x"$have_qt" = x"yes"; then
819    AC_MSG_RESULT([found])
820 else
821    AC_MSG_RESULT([not found])
822 fi
823
824 dnl linking to kdecore will give us a bit of help from libtool
825 if (! kde-config >& /dev/null); then
826     have_qt=no
827 else
828     kdelibs=`kde-config --install lib --expandvars 2>/dev/null`
829     if test -z $kdelibs -o ! -f $kdelibs/libkdecore.la; then
830         have_qt=no
831     else
832         DBUS_QT_LIBS="$kdelibs/libkdecore.la"
833     fi
834 fi
835
836 if test x$have_qt = xno ; then
837     AC_MSG_WARN([Qt development libraries not found])
838 fi
839
840 if test x$enable_qt = xyes; then
841     if test x$have_qt = xno; then
842         AC_MSG_ERROR([Qt integration explicitly required, and Qt libraries not found])
843     fi
844 fi
845
846 if test x$enable_qt = xno; then
847    have_qt=no;
848 fi
849
850 AM_CONDITIONAL(HAVE_QT, test x$have_qt = xyes)
851
852 dnl Qt flags
853 AC_SUBST(DBUS_QT_CXXFLAGS)
854 AC_SUBST(DBUS_QT_LIBS)
855
856 ### X11 detection
857 AC_PATH_XTRA
858
859 ## for now enable_x11 just tracks have_x11, 
860 ## there's no --enable-x11
861 if test x$no_x = xyes ; then
862    have_x11=no
863    enable_x11=no
864 else
865    have_x11=yes
866    enable_x11=yes
867 fi
868
869 if test x$enable_x11 = xyes ; then
870    AC_DEFINE(DBUS_BUILD_X11,1,[Build X11-dependent code])
871    DBUS_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
872    DBUS_X_CFLAGS="$X_CFLAGS"
873 else
874    DBUS_X_LIBS=
875    DBUS_X_CFLAGS=
876 fi
877
878 AC_SUBST(DBUS_X_CFLAGS)
879 AC_SUBST(DBUS_X_LIBS)
880
881 ### Doxygen Documentation
882
883 AC_PATH_PROG(DOXYGEN, doxygen, no)
884
885 AC_MSG_CHECKING([whether to build Doxygen documentation])
886
887 if test x$DOXYGEN = xno ; then
888     have_doxygen=no
889 else
890     have_doxygen=yes
891 fi
892
893 if test x$enable_doxygen_docs = xauto ; then
894     if test x$have_doxygen = xno ; then
895         enable_doxygen_docs=no
896     else
897         enable_doxygen_docs=yes
898     fi
899 fi
900
901 if test x$enable_doxygen_docs = xyes; then
902     if test x$have_doxygen = xno; then
903         AC_MSG_ERROR([Building Doxygen docs explicitly required, but Doxygen not found])
904     fi
905 fi
906
907 AM_CONDITIONAL(DBUS_DOXYGEN_DOCS_ENABLED, test x$enable_doxygen_docs = xyes)
908 AC_MSG_RESULT(yes)
909
910 ### XML Documentation
911
912 AC_PATH_PROG(XMLTO, xmlto, no)
913
914 AC_MSG_CHECKING([whether to build XML documentation])
915
916 if test x$XMLTO = xno ; then
917     have_xmlto=no
918 else
919     have_xmlto=yes
920 fi
921
922 if test x$enable_xml_docs = xauto ; then
923     if test x$have_xmlto = xno ; then
924         enable_xml_docs=no
925     else
926         enable_xml_docs=yes
927     fi
928 fi
929
930 if test x$enable_xml_docs = xyes; then
931     if test x$have_xmlto = xno; then
932         AC_MSG_ERROR([Building XML docs explicitly required, but xmlto not found])
933     fi
934 fi
935
936 AM_CONDITIONAL(DBUS_XML_DOCS_ENABLED, test x$enable_xml_docs = xyes)
937 AC_MSG_RESULT(yes)
938
939 #### Have to go $localstatedir->$prefix/var->/usr/local/var   
940 #### someone please fix this a better way...
941
942 #### find the actual value for $prefix that we'll end up with
943 ##   (I know this is broken and should be done in the Makefile, but
944 ##    that's a major pain and almost nobody actually seems to care)
945 REAL_PREFIX=
946 if test "x$prefix" = "xNONE"; then
947   REAL_PREFIX=$ac_default_prefix
948 else
949   REAL_PREFIX=$prefix
950 fi
951
952 ## temporarily change prefix and exec_prefix
953 old_prefix=$prefix
954 prefix=$REAL_PREFIX
955
956 if test "x$exec_prefix" = xNONE ; then
957    REAL_EXEC_PREFIX=$REAL_PREFIX
958 else
959    REAL_EXEC_PREFIX=$exec_prefix
960 fi
961 old_exec_prefix=$exec_prefix
962 exec_prefix=$REAL_EXEC_PREFIX
963
964 ## eval everything
965 LOCALSTATEDIR_TMP="$localstatedir"
966 EXPANDED_LOCALSTATEDIR=`eval echo $LOCALSTATEDIR_TMP`
967 AC_SUBST(EXPANDED_LOCALSTATEDIR)
968
969 SYSCONFDIR_TMP="$sysconfdir"
970 EXPANDED_SYSCONFDIR=`eval echo $SYSCONFDIR_TMP`
971 AC_SUBST(EXPANDED_SYSCONFDIR)
972
973 BINDIR_TMP="$bindir"
974 EXPANDED_BINDIR=`eval echo $BINDIR_TMP`
975 AC_SUBST(EXPANDED_BINDIR)
976
977 LIBDIR_TMP="$libdir"
978 EXPANDED_LIBDIR=`eval echo $LIBDIR_TMP`
979 AC_SUBST(EXPANDED_LIBDIR)
980
981 ## put prefix and exec_prefix back
982 prefix=$old_prefix
983 exec_prefix=$old_exec_prefix
984
985 #### Check our operating system
986 operating_system=unknown
987 if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then
988    operating_system=redhat
989 fi
990
991 #### Sort out init scripts
992
993 if test x$with_init_scripts = x; then
994     if test xredhat = x$operating_system ; then
995         with_init_scripts=redhat
996     else
997         with_init_scripts=none
998     fi
999 fi
1000
1001 AM_CONDITIONAL(DBUS_INIT_SCRIPTS_RED_HAT, test x$with_init_scripts = xredhat)
1002
1003
1004 ##### Set up location for system bus socket
1005 if ! test -z "$with_system_socket"; then
1006    DBUS_SYSTEM_SOCKET=$with_system_socket
1007 else
1008    DBUS_SYSTEM_SOCKET=${EXPANDED_LOCALSTATEDIR}/run/dbus/system_bus_socket
1009 fi
1010
1011 AC_SUBST(DBUS_SYSTEM_SOCKET)
1012 AC_DEFINE_UNQUOTED(DBUS_SYSTEM_SOCKET,"$DBUS_SYSTEM_SOCKET",[The name of the socket the system bus listens on by default])
1013
1014 ## system bus only listens on local domain sockets, and never 
1015 ## on an abstract socket (so only root can create the socket)
1016 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="unix:path=$DBUS_SYSTEM_SOCKET"
1017 AC_SUBST(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS)
1018 AC_DEFINE_UNQUOTED(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS, "$DBUS_SYSTEM_BUS_DEFAULT_ADDRESS",[The default D-BUS address of the system bus])
1019
1020 #### Set up the pid file
1021 if ! test -z "$with_system_pid_file"; then
1022    DBUS_SYSTEM_PID_FILE=$with_system_pid_file
1023 elif test x$operating_system = xredhat ; then
1024    DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/messagebus.pid
1025 else
1026    DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/dbus/pid
1027 fi
1028
1029 AC_SUBST(DBUS_SYSTEM_PID_FILE)
1030
1031 #### Tell tests where to find certain stuff in builddir
1032 ABSOLUTE_TOP_BUILDDIR=`cd ${ac_top_builddir}. && pwd`
1033
1034 AC_DEFUN(TEST_PATH, [
1035 TEST_$1=${ABSOLUTE_TOP_BUILDDIR}/test/$2
1036 AC_DEFINE_UNQUOTED(TEST_$1, "$TEST_$1",
1037                    [Full path to test file test/$2 in builddir])
1038 AC_SUBST(TEST_$1)
1039 ])
1040
1041 TEST_PATH(SERVICE_DIR, data/valid-service-files)
1042 TEST_PATH(SERVICE_BINARY, test-service)
1043 TEST_PATH(GLIB_SERVICE_BINARY, test-service-glib)
1044 TEST_PATH(EXIT_BINARY, test-exit)
1045 TEST_PATH(SEGFAULT_BINARY, test-segfault)
1046 TEST_PATH(SLEEP_FOREVER_BINARY, test-sleep-forever)
1047 AC_SUBST(ABSOLUTE_TOP_BUILDDIR)
1048
1049 #### Find socket directories
1050 if ! test -z "$TMPDIR" ; then
1051    DEFAULT_SOCKET_DIR=$TMPDIR
1052 elif ! test -z "$TEMP" ; then
1053    DEFAULT_SOCKET_DIR=$TEMP
1054 elif ! test -z "$TMP" ; then
1055    DEFAULT_SOCKET_DIR=$TMP
1056 else
1057    DEFAULT_SOCKET_DIR=/tmp
1058 fi
1059
1060 if ! test -z "$with_test_socket_dir" ; then
1061    TEST_SOCKET_DIR="$with_test_socket_dir"
1062 else
1063    TEST_SOCKET_DIR=$DEFAULT_SOCKET_DIR
1064 fi
1065 AC_SUBST(TEST_SOCKET_DIR)
1066 AC_DEFINE_UNQUOTED(DBUS_TEST_SOCKET_DIR, "$TEST_SOCKET_DIR", [Where to put test sockets])
1067
1068 if ! test -z "$with_session_socket_dir" ; then
1069    DBUS_SESSION_SOCKET_DIR="$with_session_socket_dir"
1070 else
1071    DBUS_SESSION_SOCKET_DIR=$DEFAULT_SOCKET_DIR
1072 fi
1073 AC_DEFINE_UNQUOTED(DBUS_SESSION_SOCKET_DIR, "$DBUS_SESSION_SOCKET_DIR", [Where per-session bus puts its sockets])
1074 AC_SUBST(DBUS_SESSION_SOCKET_DIR)
1075
1076 # Detect if we can build Python bindings (need python, python headers, and pyrex)
1077 if test x$enable_python = xno; then
1078     have_python=no
1079 else
1080     AC_MSG_NOTICE([Checking to see if we can build Python bindings])
1081     have_python=no
1082     AM_PATH_PYTHON(2.2)
1083
1084     if test -z "$PYTHON" ; then
1085         AC_MSG_WARN([Python not found])
1086     else
1087         AC_CHECK_PROGS(PYREX, pyrexc)
1088
1089         if test -z "$PYREX" ; then
1090             have_pyrex=no
1091         else
1092             have_pyrex=yes
1093         fi
1094
1095         AM_CHECK_PYTHON_HEADERS(have_python_headers=yes,have_python_headers=no)
1096
1097         if test x$have_pyrex = xyes -a x$have_python_headers = xyes ; then
1098             have_python=yes
1099         fi
1100     fi
1101
1102     if test x$have_python = xno ; then
1103         if test x$enable_python = xyes ; then
1104             AC_MSG_ERROR([Building python explicitly requested, but can't build python bindings])
1105         else
1106             AC_MSG_WARN([Couldn't find either Pyrex or the Python headers, not building Python bindings])
1107         fi
1108     fi               
1109 fi
1110
1111 AM_CONDITIONAL(HAVE_PYTHON, test x$have_python = xyes)
1112
1113 AC_OUTPUT([
1114 Doxyfile
1115 dbus/dbus-arch-deps.h
1116 bus/system.conf
1117 bus/session.conf
1118 bus/messagebus
1119 bus/dbus-daemon-1.1
1120 Makefile
1121 dbus/Makefile
1122 glib/Makefile
1123 python/Makefile
1124 python/examples/Makefile
1125 qt/Makefile
1126 gcj/Makefile
1127 gcj/org/Makefile
1128 gcj/org/freedesktop/Makefile
1129 gcj/org/freedesktop/dbus/Makefile
1130 mono/Makefile
1131 mono/AssemblyInfo.cs
1132 mono/dbus-sharp.dll.config
1133 mono/example/Makefile
1134 mono/doc/Makefile
1135 bus/Makefile
1136 tools/Makefile
1137 test/Makefile
1138 test/glib/Makefile
1139 doc/Makefile
1140 dbus-1.pc
1141 dbus-glib-1.pc
1142 dbus-sharp.pc
1143 test/data/valid-config-files/debug-allow-all.conf
1144 test/data/valid-config-files/debug-allow-all-sha1.conf
1145 test/data/valid-service-files/debug-echo.service
1146 test/data/valid-service-files/debug-segfault.service
1147 ])
1148
1149 ### FIXME it's bizarre that have_qt and have_glib are used
1150 ### instead of enable_ - should fix things so that enable 
1151 ### is always whether it's enabled, and have is always whether 
1152 ### it was found.
1153
1154 dnl ==========================================================================
1155 echo "
1156                     D-BUS $VERSION
1157                   ==============
1158
1159         prefix:                   ${prefix}
1160         exec_prefix:              ${exec_prefix}
1161         libdir:                   ${EXPANDED_LIBDIR}
1162         bindir:                   ${EXPANDED_BINDIR}
1163         sysconfdir:               ${EXPANDED_SYSCONFDIR}
1164         localstatedir:            ${EXPANDED_LOCALSTATEDIR}
1165         source code location:     ${srcdir}
1166         compiler:                 ${CC}
1167         cflags:                   ${CFLAGS}
1168         cppflags:                 ${CPPFLAGS}
1169         cxxflags:                 ${CXXFLAGS}
1170         64-bit int:               ${DBUS_INT64_TYPE}
1171         Doxygen:                  ${DOXYGEN}
1172         xmlto:                    ${XMLTO}"
1173
1174 if test x$enable_gcj = xyes ; then
1175 echo \
1176 "        gcj:                     ${GCJ}
1177         gcjflags:                 ${GCJFLAGS}"
1178 else
1179 echo \
1180 "        gcj:                      (not enabled)"
1181 fi
1182
1183 if test x$enable_mono = xyes ; then
1184 echo \
1185 "        csc:                     ${CSC}
1186 "
1187 else
1188 echo \
1189 "        csc:                      (not enabled)
1190 "
1191 fi
1192
1193 echo "
1194         Maintainer mode:          ${USE_MAINTAINER_MODE}
1195         gcc coverage profiling:   ${enable_gcov}
1196         Building unit tests:      ${enable_tests}
1197         Building verbose mode:    ${enable_verbose_mode}
1198         Building assertions:      ${enable_asserts}
1199         Building checks:          ${enable_checks}
1200         Building Qt bindings:     ${have_qt}
1201         Building GLib bindings:   ${have_glib}
1202         Building Python bindings: ${have_python}
1203         Building SELinux support: ${have_selinux}
1204         Building Mono bindings:   ${enable_mono}
1205         Building Mono docs:       ${enable_mono_docs}
1206         Building GTK+ tools:      ${have_gtk}
1207         Building X11 code:        ${enable_x11}
1208         Building Doxygen docs:    ${enable_doxygen_docs}
1209         Building XML docs:        ${enable_xml_docs}
1210         Using XML parser:         ${with_xml}
1211         Init scripts style:       ${with_init_scripts}
1212         Abstract socket names:    ${have_abstract_sockets}
1213         System bus socket:        ${DBUS_SYSTEM_SOCKET}
1214         System bus address:       ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS}
1215         System bus PID file:      ${DBUS_SYSTEM_PID_FILE}
1216         Session bus socket dir:   ${DBUS_SESSION_SOCKET_DIR}
1217         'make check' socket dir:  ${TEST_SOCKET_DIR}
1218 "
1219
1220 if test x$enable_tests = xyes; then
1221         echo "NOTE: building with unit tests increases the size of the installed library and renders it insecure."
1222 fi
1223 if test x$enable_tests = xyes -a x$enable_asserts = xno; then
1224         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)"
1225 fi
1226 if test x$enable_gcov = xyes; then
1227         echo "NOTE: building with coverage profiling is definitely for developers only."
1228 fi
1229 if test x$enable_verbose_mode = xyes; then
1230         echo "NOTE: building with verbose mode increases library size, may slightly increase security risk, and decreases performance."
1231 fi
1232 if test x$enable_asserts = xyes; then
1233         echo "NOTE: building with assertions increases library size and decreases performance."
1234 fi
1235 if test x$enable_checks = xno; then
1236         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."
1237 fi