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