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