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