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 *[\ \ ]-pedantic[\ \ ]*) ;;
114 *) CFLAGS="$CFLAGS -pedantic" ;;
117 if test x$enable_gcov = xyes; then
119 *[\ \ ]-fprofile-arcs[\ \ ]*) ;;
120 *) CFLAGS="$CFLAGS -fprofile-arcs" ;;
123 *[\ \ ]-ftest-coverage[\ \ ]*) ;;
124 *) CFLAGS="$CFLAGS -ftest-coverage" ;;
127 ## remove optimization
128 CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*//g'`
132 if test x$enable_gcov = xyes; then
133 AC_MSG_ERROR([--enable-gcov can only be used with gcc])
137 #### can't use AM_PROG_GCJ since it fails fatally if no gcj found
138 AC_CHECK_PROGS(GCJ, gcj, gcj)
139 if test -z "$GCJ" ; then
142 # Needs to be here so libtool wont get confused
146 if test "x${GCJFLAGS-unset}" = xunset; then
147 GCJFLAGS="-g -O2 -Wall"
152 if test x$enable_gcj = xauto ; then
153 if test x$have_gcj = xno ; then
160 if test x$enable_gcj = xyes; then
161 if test x$have_gcj = xno ; then
162 AC_MSG_ERROR([Building gcj explicitly required, but gcj not found])
166 AM_CONDITIONAL(DBUS_USE_GCJ, test x$enable_gcj = xyes)
171 AC_CHECK_TOOL(MCS, mcs, mcs)
172 if test -z "$MCS" ; then
176 if test "x${MCSFLAGS-unset}" = xunset; then
177 MCSFLAGS="" ### put default MCSFLAGS here
182 if test x$enable_mono = xauto ; then
183 if test x$have_mcs = xno ; then
190 if test x$enable_mono = xyes; then
191 if test x$have_mcs = xno ; then
192 AC_MSG_ERROR([Building Mono bindings explicitly required, but mcs compiler not found])
196 AM_CONDITIONAL(DBUS_USE_MCS, test x$enable_mono = xyes)
199 # let ourselves use our own unstable API
200 CPPFLAGS="-DDBUS_API_SUBJECT_TO_CHANGE=1 $CPPFLAGS"
201 # compress spaces in flags
202 CFLAGS=`echo "$CFLAGS" | sed -e 's/ +/ /g'`
203 CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/ +/ /g'`
204 CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/ +/ /g'`
207 if test x$enable_gcov = xyes; then
208 ## so that config.h changes when you toggle gcov support
209 AC_DEFINE_UNQUOTED(DBUS_GCOV_ENABLED, 1, [Defined if gcov is enabled to force a rebuild due to config.h changing])
211 AM_CONDITIONAL(DBUS_GCOV_ENABLED, test x$enable_gcov = xyes)
215 AC_CHECK_SIZEOF(char)
216 AC_CHECK_SIZEOF(short)
217 AC_CHECK_SIZEOF(long)
219 AC_CHECK_SIZEOF(void *)
220 AC_CHECK_SIZEOF(long long)
221 AC_CHECK_SIZEOF(__int64)
223 ### See what our 64 bit type is called
224 AC_MSG_CHECKING([64-bit integer type])
229 dbusint64_constant='(val)'
230 dbusuint64_constant='(val)'
234 dbusint64_constant='(val##L)'
235 dbusuint64_constant='(val##UL)'
237 $ac_cv_sizeof_long_long)
238 dbusint64='long long'
239 dbusint64_constant='(val##LL)'
240 dbusuint64_constant='(val##ULL)'
242 $ac_cv_sizeof___int64)
244 dbusint64_constant='(val##i64)'
245 dbusuint64_constant='(val##ui64)'
249 if test -z "$dbusint64" ; then
250 DBUS_INT64_TYPE="no_int64_type_detected"
253 DBUS_UINT64_CONSTANT=
254 AC_MSG_RESULT([none found])
256 DBUS_INT64_TYPE="$dbusint64"
258 DBUS_INT64_CONSTANT="$dbusint64_constant"
259 DBUS_UINT64_CONSTANT="$dbusuint64_constant"
260 AC_MSG_RESULT($DBUS_INT64_TYPE)
263 AC_SUBST(DBUS_INT64_TYPE)
264 AC_SUBST(DBUS_INT64_CONSTANT)
265 AC_SUBST(DBUS_UINT64_CONSTANT)
266 AC_SUBST(DBUS_HAVE_INT64)
271 #### Atomic integers (checks by Sebastian Wilhelmi for GLib)
272 AC_MSG_CHECKING([whether to use inline assembler routines for atomic integers])
274 if test x"$GCC" = xyes; then
280 AC_MSG_RESULT([i486])
281 AC_DEFINE_UNQUOTED(DBUS_USE_ATOMIC_INT_486, 1, [Use atomic integer implementation for 486])
289 if test x$have_atomic_inc = xyes ; then
290 AC_DEFINE_UNQUOTED(DBUS_HAVE_ATOMIC_INT, 1, [Some atomic integer implementation present])
293 #### Various functions
294 AC_CHECK_LIB(socket,socket)
295 AC_CHECK_LIB(nsl,gethostbyname)
297 AC_CHECK_FUNCS(vsnprintf vasprintf nanosleep usleep poll setenv unsetenv socketpair getgrouplist)
299 AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
301 AC_CACHE_CHECK([for posix getpwnam_r],
302 ac_cv_func_posix_getpwnam_r,
308 struct passwd pwd, *pwptr = &pwd;
311 error = getpwnam_r ("", &pwd, buffer,
312 sizeof (buffer), &pwptr);
313 return (error < 0 && errno == ENOSYS)
316 [ac_cv_func_posix_getpwnam_r=yes],
317 [ac_cv_func_posix_getpwnam_r=no])])
318 if test "$ac_cv_func_posix_getpwnam_r" = yes; then
319 AC_DEFINE(HAVE_POSIX_GETPWNAM_R,1,
320 [Have POSIX function getpwnam_r])
322 AC_CACHE_CHECK([for nonposix getpwnam_r],
323 ac_cv_func_nonposix_getpwnam_r,
324 [AC_TRY_LINK([#include <pwd.h>],
327 getpwnam_r ("", &pwd, buffer,
329 [ac_cv_func_nonposix_getpwnam_r=yes],
330 [ac_cv_func_nonposix_getpwnam_r=no])])
331 if test "$ac_cv_func_nonposix_getpwnam_r" = yes; then
332 AC_DEFINE(HAVE_NONPOSIX_GETPWNAM_R,1,
333 [Have non-POSIX function getpwnam_r])
337 dnl check for socklen_t
338 AC_MSG_CHECKING(whether socklen_t is defined)
340 #include <sys/types.h>
341 #include <sys/socket.h>
346 ],dbus_have_socklen_t=yes,dbus_have_socklen_t=no)
347 AC_MSG_RESULT($dbus_have_socklen_t)
349 if test "x$dbus_have_socklen_t" = "xyes"; then
350 AC_DEFINE(HAVE_SOCKLEN_T,1,[Have socklen_t type])
353 dnl check for writev header and writev function so we're
354 dnl good to go if HAVE_WRITEV gets defined.
355 AC_CHECK_HEADERS(sys/uio.h, [AC_CHECK_FUNCS(writev)])
357 dnl check for flavours of varargs macros (test from GLib)
358 AC_MSG_CHECKING(for ISO C99 varargs macros in C)
360 int a(int p1, int p2, int p3);
361 #define call_a(...) a(1,__VA_ARGS__)
363 ],dbus_have_iso_c_varargs=yes,dbus_have_iso_c_varargs=no)
364 AC_MSG_RESULT($dbus_have_iso_c_varargs)
366 AC_MSG_CHECKING(for GNUC varargs macros)
368 int a(int p1, int p2, int p3);
369 #define call_a(params...) a(1,params)
371 ],dbus_have_gnuc_varargs=yes,dbus_have_gnuc_varargs=no)
372 AC_MSG_RESULT($dbus_have_gnuc_varargs)
374 dnl Output varargs tests
375 if test x$dbus_have_iso_c_varargs = xyes; then
376 AC_DEFINE(HAVE_ISO_VARARGS,1,[Have ISO C99 varargs macros])
378 if test x$dbus_have_gnuc_varargs = xyes; then
379 AC_DEFINE(HAVE_GNUC_VARARGS,1,[Have GNU-style varargs macros])
382 dnl Check for various credentials.
383 AC_MSG_CHECKING(for struct cmsgcred)
385 #include <sys/types.h>
386 #include <sys/socket.h>
388 struct cmsgcred cred;
391 ],dbus_have_struct_cmsgcred=yes,dbus_have_struct_cmsgcred=no)
392 AC_MSG_RESULT($dbus_have_struct_cmsgcred)
394 if test x$dbus_have_struct_cmsgcred = xyes; then
395 AC_DEFINE(HAVE_CMSGCRED,1,[Have cmsgcred structure])
399 #### Abstract sockets
401 AC_MSG_CHECKING(abstract socket namespace)
403 AC_RUN_IFELSE([AC_LANG_PROGRAM(
405 #include <sys/types.h>
409 #include <sys/socket.h>
415 struct sockaddr_un addr;
417 listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
421 fprintf (stderr, "socket() failed: %s\n", strerror (errno));
425 memset (&addr, '\0', sizeof (addr));
426 addr.sun_family = AF_UNIX;
427 strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test");
428 addr.sun_path[0] = '\0'; /* this is what makes it abstract */
430 if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
432 fprintf (stderr, "Abstract socket namespace bind() failed: %s\n",
439 [have_abstract_sockets=yes],
440 [have_abstract_sockets=no])
442 AC_MSG_RESULT($have_abstract_sockets)
444 if test x$enable_abstract_sockets = xyes; then
445 if test x$have_abstract_sockets = xno; then
446 AC_MSG_ERROR([Abstract sockets explicitly required, and support not detected.])
450 if test x$enable_abstract_sockets = xno; then
451 have_abstract_sockets=no;
454 if test x$have_abstract_sockets = xyes ; then
456 DBUS_PATH_OR_ABSTRACT=abstract
459 DBUS_PATH_OR_ABSTRACT=path
462 AC_DEFINE_UNQUOTED(HAVE_ABSTRACT_SOCKETS, $abstract_sockets, [Have abstract socket namespace])
464 # this is used in addresses to prefer abstract, e.g.
465 # unix:path=/foo or unix:abstract=/foo
466 AC_SUBST(DBUS_PATH_OR_ABSTRACT)
468 #### Sort out XML library
471 AC_CHECK_LIB(expat, XML_ParserCreate_MM,
472 [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ],
475 PKG_CHECK_MODULES(LIBXML, libxml-2.0, have_libxml=true, have_libxml=false)
477 # see what we want to use
478 dbus_use_libxml=false
480 if test x$with_xml = xexpat; then
482 if ! $have_expat ; then
483 AC_MSG_ERROR([Explicitly requested expat but expat not found])
485 elif test x$with_xml = xlibxml; then
487 if ! $have_libxml ; then
488 AC_MSG_ERROR([Explicitly requested libxml but libxml not found])
491 ### expat is the default because libxml can't currently survive
492 ### our brutal OOM-handling unit test setup.
493 ### http://bugzilla.gnome.org/show_bug.cgi?id=109368
494 if $have_expat ; then
497 elif $have_libxml ; then
501 AC_MSG_ERROR([No XML library found, check config.log for failed attempts])
505 AM_CONDITIONAL(DBUS_USE_EXPAT, $dbus_use_expat)
506 AM_CONDITIONAL(DBUS_USE_LIBXML, $dbus_use_libxml)
508 if $dbus_use_expat; then
512 if $dbus_use_libxml; then
513 XML_LIBS=$LIBXML_LIBS
514 XML_CFLAGS=$LIBXML_CFLAGS
517 #### Set up final flags
520 AC_SUBST(DBUS_CLIENT_CFLAGS)
521 AC_SUBST(DBUS_CLIENT_LIBS)
523 DBUS_BUS_CFLAGS=$XML_CFLAGS
524 DBUS_BUS_LIBS=$XML_LIBS
525 AC_SUBST(DBUS_BUS_CFLAGS)
526 AC_SUBST(DBUS_BUS_LIBS)
530 AC_SUBST(DBUS_TEST_CFLAGS)
531 AC_SUBST(DBUS_TEST_LIBS)
534 PKG_CHECK_MODULES(DBUS_GLIB, glib-2.0, have_glib=yes, have_glib=no)
535 PKG_CHECK_MODULES(DBUS_GLIB_THREADS, glib-2.0 gthread-2.0, have_glib_threads=yes, have_glib_threads=no)
537 if test x$have_glib = xno ; then
538 AC_MSG_WARN([GLib development libraries not found])
541 if test x$enable_glib = xyes; then
542 if test x$have_glib = xno; then
543 AC_MSG_ERROR([GLib explicitly required, and GLib development libraries not found])
547 if test x$enable_glib = xno; then
551 AM_CONDITIONAL(HAVE_GLIB, test x$have_glib = xyes)
552 AM_CONDITIONAL(HAVE_GLIB_THREADS, test x$have_glib_threads = xyes)
555 AC_SUBST(DBUS_GLIB_CFLAGS)
556 AC_SUBST(DBUS_GLIB_LIBS)
557 AC_SUBST(DBUS_GLIB_THREADS_LIBS)
561 AC_MSG_CHECKING([for qglobal.h])
562 if test -n "$QTDIR" -a -f "$QTDIR/include/qglobal.h"; then
564 DBUS_QT_CXXFLAGS="-I$QTDIR/include"
566 for dir in "${prefix}/include/qt" "/usr/include/qt-3.1" "/usr/include/qt3" "/usr/include/qt" "/usr/lib/qt/include"; do
567 if test -f "$dir/qglobal.h"; then
569 DBUS_QT_CXXFLAGS="-I$dir"
573 if test x"$have_qt" = x"yes"; then
574 AC_MSG_RESULT([found])
576 AC_MSG_RESULT([not found])
579 dnl linking to kdecore will give us a bit of help from libtool
580 if (! kde-config >& /dev/null); then
583 kdelibs=`kde-config --install lib --expandvars 2>/dev/null`
584 if test -z $kdelibs -o ! -f $kdelibs/libkdecore.la; then
587 DBUS_QT_LIBS="$kdelibs/libkdecore.la"
591 if test x$have_qt = xno ; then
592 AC_MSG_WARN([Qt development libraries not found])
595 if test x$enable_qt = xyes; then
596 if test x$have_qt = xno; then
597 AC_MSG_ERROR([Qt integration explicitly required, and Qt libraries not found])
601 if test x$enable_qt = xno; then
605 AM_CONDITIONAL(HAVE_QT, test x$have_qt = xyes)
608 AC_SUBST(DBUS_QT_CXXFLAGS)
609 AC_SUBST(DBUS_QT_LIBS)
614 ## for now enable_x11 just tracks have_x11,
615 ## there's no --enable-x11
616 if test x$no_x = xyes ; then
624 if test x$enable_x11 = xyes ; then
625 AC_DEFINE(DBUS_BUILD_X11,1,[Build X11-dependent code])
626 DBUS_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
627 DBUS_X_CFLAGS="$X_CFLAGS"
633 AC_SUBST(DBUS_X_CFLAGS)
634 AC_SUBST(DBUS_X_LIBS)
638 AC_PATH_PROG(DOXYGEN, doxygen, no)
639 AC_PATH_PROG(DB2HTML, db2html, no)
641 AC_MSG_CHECKING([whether to build documentation])
643 if test x$DOXYGEN = xno -o x$DB2HTML = xno ; then
649 if test x$enable_docs = xauto ; then
650 if test x$have_docs_tools = xno ; then
657 if test x$enable_docs = xyes; then
658 if test x$have_docs_tools = xno; then
659 AC_MSG_ERROR([Building docs explicitly required, but Doxygen or db2html not found])
663 AM_CONDITIONAL(DBUS_DOCS_ENABLED, test x$enable_docs = xyes)
666 #### find the actual value for $prefix that we'll end up with
667 ## (I know this is broken and should be done in the Makefile, but
668 ## that's a major pain and almost nobody actually seems to care)
670 if test "x$prefix" = "xNONE"; then
671 REAL_PREFIX=$ac_default_prefix
676 #### Have to go $localstatedir->$prefix/var->/usr/local/var
677 #### someone please fix this a better way...
678 LOCALSTATEDIR_TMP="$localstatedir"
681 EXPANDED_LOCALSTATEDIR=`eval echo $LOCALSTATEDIR_TMP`
683 AC_SUBST(EXPANDED_LOCALSTATEDIR)
685 SYSCONFDIR_TMP="$sysconfdir"
688 EXPANDED_SYSCONFDIR=`eval echo $SYSCONFDIR_TMP`
690 AC_SUBST(EXPANDED_SYSCONFDIR)
695 EXPANDED_BINDIR=`eval echo $BINDIR_TMP`
697 AC_SUBST(EXPANDED_BINDIR)
699 old_exec_prefix=${exec_prefix}
700 test "x$exec_prefix" = xNONE && eval exec_prefix=${prefix}
701 eval EXPANDED_LIBDIR=${libdir}
702 exec_prefix=${old_exec_prefix}
703 AC_SUBST(EXPANDED_LIBDIR)
705 #### Check our operating system
706 operating_system=unknown
707 if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then
708 operating_system=redhat
711 #### Sort out init scripts
713 if test x$with_init_scripts = x; then
714 if test xredhat = x$operating_system ; then
715 with_init_scripts=redhat
717 with_init_scripts=none
721 AM_CONDITIONAL(DBUS_INIT_SCRIPTS_RED_HAT, test x$with_init_scripts = xredhat)
724 ##### Set up location for system bus socket
725 if ! test -z "$with_system_socket"; then
726 DBUS_SYSTEM_SOCKET=$with_system_socket
728 DBUS_SYSTEM_SOCKET=${EXPANDED_LOCALSTATEDIR}/run/dbus/system_bus_socket
731 AC_SUBST(DBUS_SYSTEM_SOCKET)
733 #### Set up the pid file
734 if ! test -z "$with_system_pid_file"; then
735 DBUS_SYSTEM_PID_FILE=$with_system_pid_file
736 elif test x$operating_system = xredhat ; then
737 DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/messagebus.pid
739 DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/dbus/pid
742 AC_SUBST(DBUS_SYSTEM_PID_FILE)
744 #### Tell tests where to find certain stuff in builddir
745 ABSOLUTE_TOP_BUILDDIR=`cd ${ac_top_builddir}. && pwd`
747 AC_DEFUN(TEST_PATH, [
748 TEST_$1=${ABSOLUTE_TOP_BUILDDIR}/test/$2
749 AC_DEFINE_UNQUOTED(TEST_$1, "$TEST_$1",
750 [Full path to test file test/$2 in builddir])
754 TEST_PATH(SERVICE_DIR, data/valid-service-files)
755 TEST_PATH(SERVICE_BINARY, test-service)
756 TEST_PATH(EXIT_BINARY, test-exit)
757 TEST_PATH(SEGFAULT_BINARY, test-segfault)
758 TEST_PATH(SLEEP_FOREVER_BINARY, test-sleep-forever)
760 #### Find socket directories
761 if ! test -z "$TMPDIR" ; then
762 DEFAULT_SOCKET_DIR=$TMPDIR
763 elif ! test -z "$TEMP" ; then
764 DEFAULT_SOCKET_DIR=$TEMP
765 elif ! test -z "$TMP" ; then
766 DEFAULT_SOCKET_DIR=$TMP
768 DEFAULT_SOCKET_DIR=/tmp
771 if ! test -z "$with_test_socket_dir" ; then
772 TEST_SOCKET_DIR="$with_test_socket_dir"
774 TEST_SOCKET_DIR=$DEFAULT_SOCKET_DIR
776 AC_SUBST(TEST_SOCKET_DIR)
777 AC_DEFINE_UNQUOTED(DBUS_TEST_SOCKET_DIR, "$TEST_SOCKET_DIR", [Where to put test sockets])
779 if ! test -z "$with_session_socket_dir" ; then
780 DBUS_SESSION_SOCKET_DIR="$with_session_socket_dir"
782 DBUS_SESSION_SOCKET_DIR=$DEFAULT_SOCKET_DIR
784 AC_DEFINE_UNQUOTED(DBUS_SESSION_SOCKET_DIR, "$DBUS_SESSION_SOCKET_DIR", [Where per-session bus puts its sockets])
785 AC_SUBST(DBUS_SESSION_SOCKET_DIR)
791 dbus/dbus-arch-deps.h
808 test/data/valid-config-files/debug-allow-all.conf
809 test/data/valid-config-files/debug-allow-all-sha1.conf
810 test/data/valid-service-files/debug-echo.service
811 test/data/valid-service-files/debug-segfault.service
814 ### FIXME it's bizarre that have_qt and have_glib are used
815 ### instead of enable_ - should fix things so that enable
816 ### is always whether it's enabled, and have is always whether
819 dnl ==========================================================================
825 source code location: ${srcdir}
828 cppflags: ${CPPFLAGS}
829 cxxflags: ${CXXFLAGS}
833 if test x$enable_gcj = xyes ; then
836 gcjflags: ${GCJFLAGS}"
839 " gcj: (not enabled)"
842 if test x$enable_mono = xyes ; then
845 mcsflags: ${MCSFLAGS}
854 Maintainer mode: ${USE_MAINTAINER_MODE}
855 gcc coverage profiling: ${enable_gcov}
856 Building unit tests: ${enable_tests}
857 Building verbose mode: ${enable_verbose_mode}
858 Building assertions: ${enable_asserts}
859 Building checks: ${enable_checks}
860 Building Qt bindings: ${have_qt}
861 Building GLib bindings: ${have_glib}
862 Building X11 code: ${enable_x11}
863 Building documentation: ${enable_docs}
864 Using XML parser: ${with_xml}
865 Init scripts style: ${with_init_scripts}
866 Abstract socket names: ${have_abstract_sockets}
867 System bus socket: ${DBUS_SYSTEM_SOCKET}
868 System bus PID file: ${DBUS_SYSTEM_PID_FILE}
869 Session bus socket dir: ${DBUS_SESSION_SOCKET_DIR}
870 'make check' socket dir: ${TEST_SOCKET_DIR}
873 if test x$enable_tests = xyes; then
874 echo "NOTE: building with unit tests increases the size of the installed library and renders it insecure."
876 if test x$enable_tests = xyes -a x$enable_asserts = xno; then
877 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)"
879 if test x$enable_gcov = xyes; then
880 echo "NOTE: building with coverage profiling is definitely for developers only."
882 if test x$enable_verbose_mode = xyes; then
883 echo "NOTE: building with verbose mode increases library size, may slightly increase security risk, and decreases performance."
885 if test x$enable_asserts = xyes; then
886 echo "NOTE: building with assertions increases library size and decreases performance."
888 if test x$enable_checks = xno; then
889 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."