6 AM_INIT_AUTOMAKE(dbus, 0.11)
8 AM_CONFIG_HEADER(config.h)
11 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
13 GETTEXT_PACKAGE=dbus-1
14 AC_SUBST(GETTEXT_PACKAGE)
15 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The name of the gettext domain])
17 ## must come before we use the $USE_MAINTAINER_MODE variable later
25 AC_ARG_ENABLE(qt, [ --enable-qt enable Qt-friendly client library],enable_qt=$enableval,enable_qt=auto)
26 AC_ARG_ENABLE(glib, [ --enable-glib enable GLib-friendly client library],enable_glib=$enableval,enable_glib=auto)
27 AC_ARG_ENABLE(tests, [ --enable-tests enable unit test code],enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE)
28 AC_ARG_ENABLE(ansi, [ --enable-ansi enable -ansi -pedantic gcc flags],enable_ansi=$enableval,enable_ansi=no)
29 AC_ARG_ENABLE(verbose-mode, [ --enable-verbose-mode support verbose debug mode],enable_verbose_mode=$enableval,enable_verbose_mode=$USE_MAINTAINER_MODE)
30 AC_ARG_ENABLE(asserts, [ --enable-asserts include assertion checks],enable_asserts=$enableval,enable_asserts=$USE_MAINTAINER_MODE)
31 AC_ARG_ENABLE(checks, [ --enable-checks include sanity checks on public API],enable_checks=$enableval,enable_checks=yes)
32 AC_ARG_ENABLE(docs, [ --enable-docs build documentation (requires Doxygen and jade)],enable_docs=$enableval,enable_docs=auto)
33 AC_ARG_ENABLE(gcov, [ --enable-gcov compile with coverage profiling instrumentation (gcc only)],enable_gcov=$enableval,enable_gcov=no)
34 AC_ARG_ENABLE(abstract-sockets, [ --enable-abstract-sockets use abstract socket namespace (linux only)],enable_abstract_sockets=$enableval,enable_abstract_sockets=auto)
35 AC_ARG_ENABLE(gcj, [ --enable-gcj build gcj bindings],enable_gcj=$enableval,enable_gcj=no)
36 AC_ARG_ENABLE(mono, [ --enable-mono build mono bindings],enable_mono=$enableval,enable_mono=no)
38 AC_ARG_WITH(xml, [ --with-xml=[libxml/expat] XML library to use])
39 AC_ARG_WITH(init-scripts, [ --with-init-scripts=[redhat] Style of init scripts to install])
40 AC_ARG_WITH(session-socket-dir, [ --with-session-socket-dir=[dirname] Where to put sockets for the per-login-session message bus])
41 AC_ARG_WITH(test-socket-dir, [ --with-test-socket-dir=[dirname] Where to put sockets for make check])
42 AC_ARG_WITH(system-pid-file, [ --with-system-pid-file=[pidfile] PID file for systemwide daemon])
43 AC_ARG_WITH(system-socket, [ --with-system-socket=[filename] UNIX domain socket for systemwide daemon])
45 dnl DBUS_BUILD_TESTS controls unit tests built in to .c files
46 dnl and also some stuff in the test/ subdir
47 AM_CONDITIONAL(DBUS_BUILD_TESTS, test x$enable_tests = xyes)
48 if test x$enable_tests = xyes; then
49 AC_DEFINE(DBUS_BUILD_TESTS,1,[Build test code])
52 if test x$enable_verbose_mode = xyes; then
53 AC_DEFINE(DBUS_ENABLE_VERBOSE_MODE,1,[Support a verbose mode])
55 if test x$enable_asserts = xno; then
56 AC_DEFINE(DBUS_DISABLE_ASSERT,1,[Disable assertion checking])
58 if test x$enable_checks = xno; then
59 AC_DEFINE(DBUS_DISABLE_CHECKS,1,[Disable public API sanity checking])
62 #### gcc warning flags
64 if test "x$GCC" = "xyes"; then
67 *[\ \ ]-Wall[\ \ ]*) ;;
68 *) CFLAGS="$CFLAGS -Wall" ;;
72 *[\ \ ]-Wchar-subscripts[\ \ ]*) ;;
73 *) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
77 *[\ \ ]-Wmissing-declarations[\ \ ]*) ;;
78 *) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
82 *[\ \ ]-Wmissing-prototypes[\ \ ]*) ;;
83 *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
87 *[\ \ ]-Wnested-externs[\ \ ]*) ;;
88 *) CFLAGS="$CFLAGS -Wnested-externs" ;;
92 *[\ \ ]-Wpointer-arith[\ \ ]*) ;;
93 *) CFLAGS="$CFLAGS -Wpointer-arith" ;;
97 *[\ \ ]-Wcast-align[\ \ ]*) ;;
98 *) CFLAGS="$CFLAGS -Wcast-align" ;;
102 *[\ \ ]-Wsign-compare[\ \ ]*) ;;
103 *) CFLAGS="$CFLAGS -Wsign-compare" ;;
106 if test "x$enable_ansi" = "xyes"; then
108 *[\ \ ]-ansi[\ \ ]*) ;;
109 *) CFLAGS="$CFLAGS -ansi" ;;
113 *[\ \ ]-D_POSIX_C_SOURCE*) ;;
114 *) CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=199309L" ;;
118 *[\ \ ]-D_BSD_SOURCE[\ \ ]*) ;;
119 *) CFLAGS="$CFLAGS -D_BSD_SOURCE" ;;
123 *[\ \ ]-pedantic[\ \ ]*) ;;
124 *) CFLAGS="$CFLAGS -pedantic" ;;
127 if test x$enable_gcov = xyes; then
129 *[\ \ ]-fprofile-arcs[\ \ ]*) ;;
130 *) CFLAGS="$CFLAGS -fprofile-arcs" ;;
133 *[\ \ ]-ftest-coverage[\ \ ]*) ;;
134 *) CFLAGS="$CFLAGS -ftest-coverage" ;;
137 ## remove optimization
138 CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*//g'`
142 if test x$enable_gcov = xyes; then
143 AC_MSG_ERROR([--enable-gcov can only be used with gcc])
147 #### can't use AM_PROG_GCJ since it fails fatally if no gcj found
148 AC_CHECK_PROGS(GCJ, gcj, gcj)
149 if test -z "$GCJ" ; then
152 # Needs to be here so libtool wont get confused
156 if test "x${GCJFLAGS-unset}" = xunset; then
157 GCJFLAGS="-g -O2 -Wall"
162 if test x$enable_gcj = xauto ; then
163 if test x$have_gcj = xno ; then
170 if test x$enable_gcj = xyes; then
171 if test x$have_gcj = xno ; then
172 AC_MSG_ERROR([Building gcj explicitly required, but gcj not found])
176 AM_CONDITIONAL(DBUS_USE_GCJ, test x$enable_gcj = xyes)
181 AC_CHECK_TOOL(MCS, mcs, mcs)
182 if test -z "$MCS" ; then
186 if test "x${MCSFLAGS-unset}" = xunset; then
187 MCSFLAGS="" ### put default MCSFLAGS here
192 if test x$enable_mono = xauto ; then
193 if test x$have_mcs = xno ; then
200 if test x$enable_mono = xyes; then
201 if test x$have_mcs = xno ; then
202 AC_MSG_ERROR([Building Mono bindings explicitly required, but mcs compiler not found])
206 AM_CONDITIONAL(DBUS_USE_MCS, test x$enable_mono = xyes)
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'`
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])
221 AM_CONDITIONAL(DBUS_GCOV_ENABLED, test x$enable_gcov = xyes)
225 AC_CHECK_SIZEOF(char)
226 AC_CHECK_SIZEOF(short)
227 AC_CHECK_SIZEOF(long)
229 AC_CHECK_SIZEOF(void *)
230 AC_CHECK_SIZEOF(long long)
231 AC_CHECK_SIZEOF(__int64)
233 ### See what our 64 bit type is called
234 AC_MSG_CHECKING([64-bit integer type])
239 dbusint64_constant='(val)'
240 dbusuint64_constant='(val)'
244 dbusint64_constant='(val##L)'
245 dbusuint64_constant='(val##UL)'
247 $ac_cv_sizeof_long_long)
248 dbusint64='long long'
249 dbusint64_constant='(val##LL)'
250 dbusuint64_constant='(val##ULL)'
252 $ac_cv_sizeof___int64)
254 dbusint64_constant='(val##i64)'
255 dbusuint64_constant='(val##ui64)'
259 if test -z "$dbusint64" ; then
260 DBUS_INT64_TYPE="no_int64_type_detected"
263 DBUS_UINT64_CONSTANT=
264 AC_MSG_RESULT([none found])
266 DBUS_INT64_TYPE="$dbusint64"
268 DBUS_INT64_CONSTANT="$dbusint64_constant"
269 DBUS_UINT64_CONSTANT="$dbusuint64_constant"
270 AC_MSG_RESULT($DBUS_INT64_TYPE)
273 AC_SUBST(DBUS_INT64_TYPE)
274 AC_SUBST(DBUS_INT64_CONSTANT)
275 AC_SUBST(DBUS_UINT64_CONSTANT)
276 AC_SUBST(DBUS_HAVE_INT64)
281 #### Atomic integers (checks by Sebastian Wilhelmi for GLib)
282 AC_MSG_CHECKING([whether to use inline assembler routines for atomic integers])
284 if test x"$GCC" = xyes; then
285 if test "x$enable_ansi" = "xyes"; then
293 AC_MSG_RESULT([i486])
294 AC_DEFINE_UNQUOTED(DBUS_USE_ATOMIC_INT_486, 1, [Use atomic integer implementation for 486])
303 if test x$have_atomic_inc = xyes ; then
304 AC_DEFINE_UNQUOTED(DBUS_HAVE_ATOMIC_INT, 1, [Some atomic integer implementation present])
307 #### Various functions
308 AC_CHECK_LIB(socket,socket)
309 AC_CHECK_LIB(nsl,gethostbyname)
311 AC_CHECK_FUNCS(vsnprintf vasprintf nanosleep usleep poll setenv unsetenv socketpair getgrouplist)
313 AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
315 AC_CACHE_CHECK([for posix getpwnam_r],
316 ac_cv_func_posix_getpwnam_r,
322 struct passwd pwd, *pwptr = &pwd;
325 error = getpwnam_r ("", &pwd, buffer,
326 sizeof (buffer), &pwptr);
327 return (error < 0 && errno == ENOSYS)
330 [ac_cv_func_posix_getpwnam_r=yes],
331 [ac_cv_func_posix_getpwnam_r=no])])
332 if test "$ac_cv_func_posix_getpwnam_r" = yes; then
333 AC_DEFINE(HAVE_POSIX_GETPWNAM_R,1,
334 [Have POSIX function getpwnam_r])
336 AC_CACHE_CHECK([for nonposix getpwnam_r],
337 ac_cv_func_nonposix_getpwnam_r,
338 [AC_TRY_LINK([#include <pwd.h>],
341 getpwnam_r ("", &pwd, buffer,
343 [ac_cv_func_nonposix_getpwnam_r=yes],
344 [ac_cv_func_nonposix_getpwnam_r=no])])
345 if test "$ac_cv_func_nonposix_getpwnam_r" = yes; then
346 AC_DEFINE(HAVE_NONPOSIX_GETPWNAM_R,1,
347 [Have non-POSIX function getpwnam_r])
351 dnl check for socklen_t
352 AC_MSG_CHECKING(whether socklen_t is defined)
354 #include <sys/types.h>
355 #include <sys/socket.h>
360 ],dbus_have_socklen_t=yes,dbus_have_socklen_t=no)
361 AC_MSG_RESULT($dbus_have_socklen_t)
363 if test "x$dbus_have_socklen_t" = "xyes"; then
364 AC_DEFINE(HAVE_SOCKLEN_T,1,[Have socklen_t type])
367 dnl check for writev header and writev function so we're
368 dnl good to go if HAVE_WRITEV gets defined.
369 AC_CHECK_HEADERS(sys/uio.h, [AC_CHECK_FUNCS(writev)])
371 dnl check for flavours of varargs macros (test from GLib)
372 AC_MSG_CHECKING(for ISO C99 varargs macros in C)
374 int a(int p1, int p2, int p3);
375 #define call_a(...) a(1,__VA_ARGS__)
377 ],dbus_have_iso_c_varargs=yes,dbus_have_iso_c_varargs=no)
378 AC_MSG_RESULT($dbus_have_iso_c_varargs)
380 AC_MSG_CHECKING(for GNUC varargs macros)
382 int a(int p1, int p2, int p3);
383 #define call_a(params...) a(1,params)
385 ],dbus_have_gnuc_varargs=yes,dbus_have_gnuc_varargs=no)
386 AC_MSG_RESULT($dbus_have_gnuc_varargs)
388 dnl Output varargs tests
389 if test x$dbus_have_iso_c_varargs = xyes; then
390 AC_DEFINE(HAVE_ISO_VARARGS,1,[Have ISO C99 varargs macros])
392 if test x$dbus_have_gnuc_varargs = xyes; then
393 AC_DEFINE(HAVE_GNUC_VARARGS,1,[Have GNU-style varargs macros])
396 dnl Check for various credentials.
397 AC_MSG_CHECKING(for struct cmsgcred)
399 #include <sys/types.h>
400 #include <sys/socket.h>
402 struct cmsgcred cred;
405 ],dbus_have_struct_cmsgcred=yes,dbus_have_struct_cmsgcred=no)
406 AC_MSG_RESULT($dbus_have_struct_cmsgcred)
408 if test x$dbus_have_struct_cmsgcred = xyes; then
409 AC_DEFINE(HAVE_CMSGCRED,1,[Have cmsgcred structure])
413 #### Abstract sockets
415 AC_MSG_CHECKING(abstract socket namespace)
417 AC_RUN_IFELSE([AC_LANG_PROGRAM(
419 #include <sys/types.h>
423 #include <sys/socket.h>
429 struct sockaddr_un addr;
431 listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
435 fprintf (stderr, "socket() failed: %s\n", strerror (errno));
439 memset (&addr, '\0', sizeof (addr));
440 addr.sun_family = AF_UNIX;
441 strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test");
442 addr.sun_path[0] = '\0'; /* this is what makes it abstract */
444 if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
446 fprintf (stderr, "Abstract socket namespace bind() failed: %s\n",
453 [have_abstract_sockets=yes],
454 [have_abstract_sockets=no])
456 AC_MSG_RESULT($have_abstract_sockets)
458 if test x$enable_abstract_sockets = xyes; then
459 if test x$have_abstract_sockets = xno; then
460 AC_MSG_ERROR([Abstract sockets explicitly required, and support not detected.])
464 if test x$enable_abstract_sockets = xno; then
465 have_abstract_sockets=no;
468 if test x$have_abstract_sockets = xyes ; then
470 DBUS_PATH_OR_ABSTRACT=abstract
473 DBUS_PATH_OR_ABSTRACT=path
476 AC_DEFINE_UNQUOTED(HAVE_ABSTRACT_SOCKETS, $abstract_sockets, [Have abstract socket namespace])
478 # this is used in addresses to prefer abstract, e.g.
479 # unix:path=/foo or unix:abstract=/foo
480 AC_SUBST(DBUS_PATH_OR_ABSTRACT)
482 #### Sort out XML library
485 AC_CHECK_LIB(expat, XML_ParserCreate_MM,
486 [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ],
489 PKG_CHECK_MODULES(LIBXML, libxml-2.0, have_libxml=true, have_libxml=false)
491 # see what we want to use
492 dbus_use_libxml=false
494 if test x$with_xml = xexpat; then
496 if ! $have_expat ; then
497 AC_MSG_ERROR([Explicitly requested expat but expat not found])
499 elif test x$with_xml = xlibxml; then
501 if ! $have_libxml ; then
502 AC_MSG_ERROR([Explicitly requested libxml but libxml not found])
505 ### expat is the default because libxml can't currently survive
506 ### our brutal OOM-handling unit test setup.
507 ### http://bugzilla.gnome.org/show_bug.cgi?id=109368
508 if $have_expat ; then
511 elif $have_libxml ; then
515 AC_MSG_ERROR([No XML library found, check config.log for failed attempts])
519 AM_CONDITIONAL(DBUS_USE_EXPAT, $dbus_use_expat)
520 AM_CONDITIONAL(DBUS_USE_LIBXML, $dbus_use_libxml)
522 if $dbus_use_expat; then
526 if $dbus_use_libxml; then
527 XML_LIBS=$LIBXML_LIBS
528 XML_CFLAGS=$LIBXML_CFLAGS
531 #### Set up final flags
534 AC_SUBST(DBUS_CLIENT_CFLAGS)
535 AC_SUBST(DBUS_CLIENT_LIBS)
537 DBUS_BUS_CFLAGS=$XML_CFLAGS
538 DBUS_BUS_LIBS=$XML_LIBS
539 AC_SUBST(DBUS_BUS_CFLAGS)
540 AC_SUBST(DBUS_BUS_LIBS)
544 AC_SUBST(DBUS_TEST_CFLAGS)
545 AC_SUBST(DBUS_TEST_LIBS)
548 PKG_CHECK_MODULES(DBUS_GLIB, glib-2.0, have_glib=yes, have_glib=no)
549 PKG_CHECK_MODULES(DBUS_GLIB_THREADS, glib-2.0 gthread-2.0, have_glib_threads=yes, have_glib_threads=no)
551 if test x$have_glib = xno ; then
552 AC_MSG_WARN([GLib development libraries not found])
555 if test x$enable_glib = xyes; then
556 if test x$have_glib = xno; then
557 AC_MSG_ERROR([GLib explicitly required, and GLib development libraries not found])
561 if test x$enable_glib = xno; then
565 AM_CONDITIONAL(HAVE_GLIB, test x$have_glib = xyes)
566 AM_CONDITIONAL(HAVE_GLIB_THREADS, test x$have_glib_threads = xyes)
569 AC_SUBST(DBUS_GLIB_CFLAGS)
570 AC_SUBST(DBUS_GLIB_LIBS)
571 AC_SUBST(DBUS_GLIB_THREADS_LIBS)
575 AC_MSG_CHECKING([for qglobal.h])
576 if test -n "$QTDIR" -a -f "$QTDIR/include/qglobal.h"; then
578 DBUS_QT_CXXFLAGS="-I$QTDIR/include"
580 for dir in "${prefix}/include/qt" "/usr/include/qt-3.1" "/usr/include/qt3" "/usr/include/qt" "/usr/lib/qt/include"; do
581 if test -f "$dir/qglobal.h"; then
583 DBUS_QT_CXXFLAGS="-I$dir"
587 if test x"$have_qt" = x"yes"; then
588 AC_MSG_RESULT([found])
590 AC_MSG_RESULT([not found])
593 dnl linking to kdecore will give us a bit of help from libtool
594 if (! kde-config >& /dev/null); then
597 kdelibs=`kde-config --install lib --expandvars 2>/dev/null`
598 if test -z $kdelibs -o ! -f $kdelibs/libkdecore.la; then
601 DBUS_QT_LIBS="$kdelibs/libkdecore.la"
605 if test x$have_qt = xno ; then
606 AC_MSG_WARN([Qt development libraries not found])
609 if test x$enable_qt = xyes; then
610 if test x$have_qt = xno; then
611 AC_MSG_ERROR([Qt integration explicitly required, and Qt libraries not found])
615 if test x$enable_qt = xno; then
619 AM_CONDITIONAL(HAVE_QT, test x$have_qt = xyes)
622 AC_SUBST(DBUS_QT_CXXFLAGS)
623 AC_SUBST(DBUS_QT_LIBS)
628 ## for now enable_x11 just tracks have_x11,
629 ## there's no --enable-x11
630 if test x$no_x = xyes ; then
638 if test x$enable_x11 = xyes ; then
639 AC_DEFINE(DBUS_BUILD_X11,1,[Build X11-dependent code])
640 DBUS_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
641 DBUS_X_CFLAGS="$X_CFLAGS"
647 AC_SUBST(DBUS_X_CFLAGS)
648 AC_SUBST(DBUS_X_LIBS)
652 AC_PATH_PROG(DOXYGEN, doxygen, no)
653 AC_PATH_PROG(DB2HTML, db2html, no)
655 AC_MSG_CHECKING([whether to build documentation])
657 if test x$DOXYGEN = xno -o x$DB2HTML = xno ; then
663 if test x$enable_docs = xauto ; then
664 if test x$have_docs_tools = xno ; then
671 if test x$enable_docs = xyes; then
672 if test x$have_docs_tools = xno; then
673 AC_MSG_ERROR([Building docs explicitly required, but Doxygen or db2html not found])
677 AM_CONDITIONAL(DBUS_DOCS_ENABLED, test x$enable_docs = xyes)
680 #### find the actual value for $prefix that we'll end up with
681 ## (I know this is broken and should be done in the Makefile, but
682 ## that's a major pain and almost nobody actually seems to care)
684 if test "x$prefix" = "xNONE"; then
685 REAL_PREFIX=$ac_default_prefix
690 #### Have to go $localstatedir->$prefix/var->/usr/local/var
691 #### someone please fix this a better way...
692 LOCALSTATEDIR_TMP="$localstatedir"
695 EXPANDED_LOCALSTATEDIR=`eval echo $LOCALSTATEDIR_TMP`
697 AC_SUBST(EXPANDED_LOCALSTATEDIR)
699 SYSCONFDIR_TMP="$sysconfdir"
702 EXPANDED_SYSCONFDIR=`eval echo $SYSCONFDIR_TMP`
704 AC_SUBST(EXPANDED_SYSCONFDIR)
709 EXPANDED_BINDIR=`eval echo $BINDIR_TMP`
711 AC_SUBST(EXPANDED_BINDIR)
713 old_exec_prefix=${exec_prefix}
714 test "x$exec_prefix" = xNONE && eval exec_prefix=${prefix}
715 eval EXPANDED_LIBDIR=${libdir}
716 exec_prefix=${old_exec_prefix}
717 AC_SUBST(EXPANDED_LIBDIR)
719 #### Check our operating system
720 operating_system=unknown
721 if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then
722 operating_system=redhat
725 #### Sort out init scripts
727 if test x$with_init_scripts = x; then
728 if test xredhat = x$operating_system ; then
729 with_init_scripts=redhat
731 with_init_scripts=none
735 AM_CONDITIONAL(DBUS_INIT_SCRIPTS_RED_HAT, test x$with_init_scripts = xredhat)
738 ##### Set up location for system bus socket
739 if ! test -z "$with_system_socket"; then
740 DBUS_SYSTEM_SOCKET=$with_system_socket
742 DBUS_SYSTEM_SOCKET=${EXPANDED_LOCALSTATEDIR}/run/dbus/system_bus_socket
745 AC_SUBST(DBUS_SYSTEM_SOCKET)
747 #### Set up the pid file
748 if ! test -z "$with_system_pid_file"; then
749 DBUS_SYSTEM_PID_FILE=$with_system_pid_file
750 elif test x$operating_system = xredhat ; then
751 DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/messagebus.pid
753 DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/dbus/pid
756 AC_SUBST(DBUS_SYSTEM_PID_FILE)
758 #### Tell tests where to find certain stuff in builddir
759 ABSOLUTE_TOP_BUILDDIR=`cd ${ac_top_builddir}. && pwd`
761 AC_DEFUN(TEST_PATH, [
762 TEST_$1=${ABSOLUTE_TOP_BUILDDIR}/test/$2
763 AC_DEFINE_UNQUOTED(TEST_$1, "$TEST_$1",
764 [Full path to test file test/$2 in builddir])
768 TEST_PATH(SERVICE_DIR, data/valid-service-files)
769 TEST_PATH(SERVICE_BINARY, test-service)
770 TEST_PATH(EXIT_BINARY, test-exit)
771 TEST_PATH(SEGFAULT_BINARY, test-segfault)
772 TEST_PATH(SLEEP_FOREVER_BINARY, test-sleep-forever)
774 #### Find socket directories
775 if ! test -z "$TMPDIR" ; then
776 DEFAULT_SOCKET_DIR=$TMPDIR
777 elif ! test -z "$TEMP" ; then
778 DEFAULT_SOCKET_DIR=$TEMP
779 elif ! test -z "$TMP" ; then
780 DEFAULT_SOCKET_DIR=$TMP
782 DEFAULT_SOCKET_DIR=/tmp
785 if ! test -z "$with_test_socket_dir" ; then
786 TEST_SOCKET_DIR="$with_test_socket_dir"
788 TEST_SOCKET_DIR=$DEFAULT_SOCKET_DIR
790 AC_SUBST(TEST_SOCKET_DIR)
791 AC_DEFINE_UNQUOTED(DBUS_TEST_SOCKET_DIR, "$TEST_SOCKET_DIR", [Where to put test sockets])
793 if ! test -z "$with_session_socket_dir" ; then
794 DBUS_SESSION_SOCKET_DIR="$with_session_socket_dir"
796 DBUS_SESSION_SOCKET_DIR=$DEFAULT_SOCKET_DIR
798 AC_DEFINE_UNQUOTED(DBUS_SESSION_SOCKET_DIR, "$DBUS_SESSION_SOCKET_DIR", [Where per-session bus puts its sockets])
799 AC_SUBST(DBUS_SESSION_SOCKET_DIR)
805 dbus/dbus-arch-deps.h
816 gcj/org/freedesktop/Makefile
817 gcj/org/freedesktop/dbus/Makefile
825 test/data/valid-config-files/debug-allow-all.conf
826 test/data/valid-config-files/debug-allow-all-sha1.conf
827 test/data/valid-service-files/debug-echo.service
828 test/data/valid-service-files/debug-segfault.service
831 ### FIXME it's bizarre that have_qt and have_glib are used
832 ### instead of enable_ - should fix things so that enable
833 ### is always whether it's enabled, and have is always whether
836 dnl ==========================================================================
842 source code location: ${srcdir}
845 cppflags: ${CPPFLAGS}
846 cxxflags: ${CXXFLAGS}
850 if test x$enable_gcj = xyes ; then
853 gcjflags: ${GCJFLAGS}"
856 " gcj: (not enabled)"
859 if test x$enable_mono = xyes ; then
862 mcsflags: ${MCSFLAGS}
871 Maintainer mode: ${USE_MAINTAINER_MODE}
872 gcc coverage profiling: ${enable_gcov}
873 Building unit tests: ${enable_tests}
874 Building verbose mode: ${enable_verbose_mode}
875 Building assertions: ${enable_asserts}
876 Building checks: ${enable_checks}
877 Building Qt bindings: ${have_qt}
878 Building GLib bindings: ${have_glib}
879 Building X11 code: ${enable_x11}
880 Building documentation: ${enable_docs}
881 Using XML parser: ${with_xml}
882 Init scripts style: ${with_init_scripts}
883 Abstract socket names: ${have_abstract_sockets}
884 System bus socket: ${DBUS_SYSTEM_SOCKET}
885 System bus PID file: ${DBUS_SYSTEM_PID_FILE}
886 Session bus socket dir: ${DBUS_SESSION_SOCKET_DIR}
887 'make check' socket dir: ${TEST_SOCKET_DIR}
890 if test x$enable_tests = xyes; then
891 echo "NOTE: building with unit tests increases the size of the installed library and renders it insecure."
893 if test x$enable_tests = xyes -a x$enable_asserts = xno; then
894 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)"
896 if test x$enable_gcov = xyes; then
897 echo "NOTE: building with coverage profiling is definitely for developers only."
899 if test x$enable_verbose_mode = xyes; then
900 echo "NOTE: building with verbose mode increases library size, may slightly increase security risk, and decreases performance."
902 if test x$enable_asserts = xyes; then
903 echo "NOTE: building with assertions increases library size and decreases performance."
905 if test x$enable_checks = xno; then
906 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."