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
26 AC_ARG_ENABLE(qt, [ --enable-qt enable Qt-friendly client library],enable_qt=$enableval,enable_qt=auto)
27 AC_ARG_ENABLE(glib, [ --enable-glib enable GLib-friendly client library],enable_glib=$enableval,enable_glib=auto)
28 AC_ARG_ENABLE(tests, [ --enable-tests enable unit test code],enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE)
29 AC_ARG_ENABLE(ansi, [ --enable-ansi enable -ansi -pedantic gcc flags],enable_ansi=$enableval,enable_ansi=no)
30 AC_ARG_ENABLE(verbose-mode, [ --enable-verbose-mode support verbose debug mode],enable_verbose_mode=$enableval,enable_verbose_mode=$USE_MAINTAINER_MODE)
31 AC_ARG_ENABLE(asserts, [ --enable-asserts include assertion checks],enable_asserts=$enableval,enable_asserts=$USE_MAINTAINER_MODE)
32 AC_ARG_ENABLE(checks, [ --enable-checks include sanity checks on public API],enable_checks=$enableval,enable_checks=yes)
33 AC_ARG_ENABLE(docs, [ --enable-docs build documentation (requires Doxygen and jade)],enable_docs=$enableval,enable_docs=auto)
34 AC_ARG_ENABLE(gcov, [ --enable-gcov compile with coverage profiling instrumentation (gcc only)],enable_gcov=$enableval,enable_gcov=no)
35 AC_ARG_ENABLE(abstract-sockets, [ --enable-abstract-sockets use abstract socket namespace (linux only)],enable_abstract_sockets=$enableval,enable_abstract_sockets=auto)
36 AC_ARG_ENABLE(gcj, [ --enable-gcj build gcj bindings],enable_gcj=$enableval,enable_gcj=no)
37 AC_ARG_ENABLE(mono, [ --enable-mono build mono bindings],enable_mono=$enableval,enable_mono=no)
39 AC_ARG_WITH(xml, [ --with-xml=[libxml/expat] XML library to use])
40 AC_ARG_WITH(init-scripts, [ --with-init-scripts=[redhat] Style of init scripts to install])
41 AC_ARG_WITH(session-socket-dir, [ --with-session-socket-dir=[dirname] Where to put sockets for the per-login-session message bus])
42 AC_ARG_WITH(test-socket-dir, [ --with-test-socket-dir=[dirname] Where to put sockets for make check])
43 AC_ARG_WITH(system-pid-file, [ --with-system-pid-file=[pidfile] PID file for systemwide daemon])
44 AC_ARG_WITH(system-socket, [ --with-system-socket=[filename] UNIX domain socket for systemwide daemon])
46 dnl DBUS_BUILD_TESTS controls unit tests built in to .c files
47 dnl and also some stuff in the test/ subdir
48 AM_CONDITIONAL(DBUS_BUILD_TESTS, test x$enable_tests = xyes)
49 if test x$enable_tests = xyes; then
50 AC_DEFINE(DBUS_BUILD_TESTS,1,[Build test code])
53 if test x$enable_verbose_mode = xyes; then
54 AC_DEFINE(DBUS_ENABLE_VERBOSE_MODE,1,[Support a verbose mode])
56 if test x$enable_asserts = xno; then
57 AC_DEFINE(DBUS_DISABLE_ASSERT,1,[Disable assertion checking])
59 if test x$enable_checks = xno; then
60 AC_DEFINE(DBUS_DISABLE_CHECKS,1,[Disable public API sanity checking])
63 #### gcc warning flags
65 if test "x$GCC" = "xyes"; then
68 *[\ \ ]-Wall[\ \ ]*) ;;
69 *) CFLAGS="$CFLAGS -Wall" ;;
73 *[\ \ ]-Wchar-subscripts[\ \ ]*) ;;
74 *) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
78 *[\ \ ]-Wmissing-declarations[\ \ ]*) ;;
79 *) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
83 *[\ \ ]-Wmissing-prototypes[\ \ ]*) ;;
84 *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
88 *[\ \ ]-Wnested-externs[\ \ ]*) ;;
89 *) CFLAGS="$CFLAGS -Wnested-externs" ;;
93 *[\ \ ]-Wpointer-arith[\ \ ]*) ;;
94 *) CFLAGS="$CFLAGS -Wpointer-arith" ;;
98 *[\ \ ]-Wcast-align[\ \ ]*) ;;
99 *) CFLAGS="$CFLAGS -Wcast-align" ;;
103 *[\ \ ]-Wsign-compare[\ \ ]*) ;;
104 *) CFLAGS="$CFLAGS -Wsign-compare" ;;
107 if test "x$enable_ansi" = "xyes"; then
109 *[\ \ ]-ansi[\ \ ]*) ;;
110 *) CFLAGS="$CFLAGS -ansi" ;;
114 *[\ \ ]-pedantic[\ \ ]*) ;;
115 *) CFLAGS="$CFLAGS -pedantic" ;;
118 if test x$enable_gcov = xyes; then
120 *[\ \ ]-fprofile-arcs[\ \ ]*) ;;
121 *) CFLAGS="$CFLAGS -fprofile-arcs" ;;
124 *[\ \ ]-ftest-coverage[\ \ ]*) ;;
125 *) CFLAGS="$CFLAGS -ftest-coverage" ;;
128 ## remove optimization
129 CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*//g'`
133 if test x$enable_gcov = xyes; then
134 AC_MSG_ERROR([--enable-gcov can only be used with gcc])
138 #### can't use AM_PROG_GCJ since it fails fatally if no gcj found
139 AC_CHECK_PROGS(GCJ, gcj, gcj)
140 if test -z "$GCJ" ; then
144 if test "x${GCJFLAGS-unset}" = xunset; then
145 GCJFLAGS="-g -O2 -Wall"
148 _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES(GCJ)])
151 if test x$enable_gcj = xauto ; then
152 if test x$have_gcj = xno ; then
159 if test x$enable_gcj = xyes; then
160 if test x$have_gcj = xno ; then
161 AC_MSG_ERROR([Building gcj explicitly required, but gcj not found])
165 AM_CONDITIONAL(DBUS_USE_GCJ, test x$enable_gcj = xyes)
168 AC_CHECK_TOOL(MCS, mcs, mcs)
169 if test -z "$MCS" ; then
173 if test "x${MCSFLAGS-unset}" = xunset; then
174 MCSFLAGS="" ### put default MCSFLAGS here
179 if test x$enable_mono = xauto ; then
180 if test x$have_mcs = xno ; then
187 if test x$enable_mono = xyes; then
188 if test x$have_mcs = xno ; then
189 AC_MSG_ERROR([Building Mono bindings explicitly required, but mcs compiler not found])
193 AM_CONDITIONAL(DBUS_USE_MCS, test x$enable_mono = xyes)
196 # let ourselves use our own unstable API
197 CPPFLAGS="-DDBUS_API_SUBJECT_TO_CHANGE=1 $CPPFLAGS"
198 # compress spaces in flags
199 CFLAGS=`echo "$CFLAGS" | sed -e 's/ +/ /g'`
200 CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/ +/ /g'`
201 CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/ +/ /g'`
204 if test x$enable_gcov = xyes; then
205 ## so that config.h changes when you toggle gcov support
206 AC_DEFINE_UNQUOTED(DBUS_GCOV_ENABLED, 1, [Defined if gcov is enabled to force a rebuild due to config.h changing])
208 AM_CONDITIONAL(DBUS_GCOV_ENABLED, test x$enable_gcov = xyes)
212 AC_CHECK_SIZEOF(char)
213 AC_CHECK_SIZEOF(short)
214 AC_CHECK_SIZEOF(long)
216 AC_CHECK_SIZEOF(void *)
217 AC_CHECK_SIZEOF(long long)
218 AC_CHECK_SIZEOF(__int64)
220 ### See what our 64 bit type is called
221 AC_MSG_CHECKING([64-bit integer type])
226 dbusint64_constant='(val)'
227 dbusuint64_constant='(val)'
231 dbusint64_constant='(val##L)'
232 dbusuint64_constant='(val##UL)'
234 $ac_cv_sizeof_long_long)
235 dbusint64='long long'
236 dbusint64_constant='(val##LL)'
237 dbusuint64_constant='(val##ULL)'
239 $ac_cv_sizeof___int64)
241 dbusint64_constant='(val##i64)'
242 dbusuint64_constant='(val##ui64)'
246 if test -z "$dbusint64" ; then
247 DBUS_INT64_TYPE="no_int64_type_detected"
250 DBUS_UINT64_CONSTANT=
251 AC_MSG_RESULT([none found])
253 DBUS_INT64_TYPE="$dbusint64"
255 DBUS_INT64_CONSTANT="$dbusint64_constant"
256 DBUS_UINT64_CONSTANT="$dbusuint64_constant"
257 AC_MSG_RESULT($DBUS_INT64_TYPE)
260 AC_SUBST(DBUS_INT64_TYPE)
261 AC_SUBST(DBUS_INT64_CONSTANT)
262 AC_SUBST(DBUS_UINT64_CONSTANT)
263 AC_SUBST(DBUS_HAVE_INT64)
268 #### Atomic integers (checks by Sebastian Wilhelmi for GLib)
269 AC_MSG_CHECKING([whether to use inline assembler routines for atomic integers])
271 if test x"$GCC" = xyes; then
277 AC_MSG_RESULT([i486])
278 AC_DEFINE_UNQUOTED(DBUS_USE_ATOMIC_INT_486, 1, [Use atomic integer implementation for 486])
286 if test x$have_atomic_inc = xyes ; then
287 AC_DEFINE_UNQUOTED(DBUS_HAVE_ATOMIC_INT, 1, [Some atomic integer implementation present])
290 #### Various functions
291 AC_CHECK_LIB(socket,socket)
292 AC_CHECK_LIB(nsl,gethostbyname)
294 AC_CHECK_FUNCS(vsnprintf vasprintf nanosleep usleep poll setenv unsetenv socketpair getgrouplist)
296 AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
298 AC_CACHE_CHECK([for posix getpwnam_r],
299 ac_cv_func_posix_getpwnam_r,
305 struct passwd pwd, *pwptr = &pwd;
308 error = getpwnam_r ("", &pwd, buffer,
309 sizeof (buffer), &pwptr);
310 return (error < 0 && errno == ENOSYS)
313 [ac_cv_func_posix_getpwnam_r=yes],
314 [ac_cv_func_posix_getpwnam_r=no])])
315 if test "$ac_cv_func_posix_getpwnam_r" = yes; then
316 AC_DEFINE(HAVE_POSIX_GETPWNAM_R,1,
317 [Have POSIX function getpwnam_r])
319 AC_CACHE_CHECK([for nonposix getpwnam_r],
320 ac_cv_func_nonposix_getpwnam_r,
321 [AC_TRY_LINK([#include <pwd.h>],
324 getpwnam_r ("", &pwd, buffer,
326 [ac_cv_func_nonposix_getpwnam_r=yes],
327 [ac_cv_func_nonposix_getpwnam_r=no])])
328 if test "$ac_cv_func_nonposix_getpwnam_r" = yes; then
329 AC_DEFINE(HAVE_NONPOSIX_GETPWNAM_R,1,
330 [Have non-POSIX function getpwnam_r])
334 dnl check for socklen_t
335 AC_MSG_CHECKING(whether socklen_t is defined)
337 #include <sys/types.h>
338 #include <sys/socket.h>
343 ],dbus_have_socklen_t=yes,dbus_have_socklen_t=no)
344 AC_MSG_RESULT($dbus_have_socklen_t)
346 if test "x$dbus_have_socklen_t" = "xyes"; then
347 AC_DEFINE(HAVE_SOCKLEN_T,1,[Have socklen_t type])
350 dnl check for writev header and writev function so we're
351 dnl good to go if HAVE_WRITEV gets defined.
352 AC_CHECK_HEADERS(sys/uio.h, [AC_CHECK_FUNCS(writev)])
354 dnl check for flavours of varargs macros (test from GLib)
355 AC_MSG_CHECKING(for ISO C99 varargs macros in C)
357 int a(int p1, int p2, int p3);
358 #define call_a(...) a(1,__VA_ARGS__)
360 ],dbus_have_iso_c_varargs=yes,dbus_have_iso_c_varargs=no)
361 AC_MSG_RESULT($dbus_have_iso_c_varargs)
363 AC_MSG_CHECKING(for GNUC varargs macros)
365 int a(int p1, int p2, int p3);
366 #define call_a(params...) a(1,params)
368 ],dbus_have_gnuc_varargs=yes,dbus_have_gnuc_varargs=no)
369 AC_MSG_RESULT($dbus_have_gnuc_varargs)
371 dnl Output varargs tests
372 if test x$dbus_have_iso_c_varargs = xyes; then
373 AC_DEFINE(HAVE_ISO_VARARGS,1,[Have ISO C99 varargs macros])
375 if test x$dbus_have_gnuc_varargs = xyes; then
376 AC_DEFINE(HAVE_GNUC_VARARGS,1,[Have GNU-style varargs macros])
379 dnl Check for various credentials.
380 AC_MSG_CHECKING(for struct cmsgcred)
382 #include <sys/types.h>
383 #include <sys/socket.h>
385 struct cmsgcred cred;
388 ],dbus_have_struct_cmsgcred=yes,dbus_have_struct_cmsgcred=no)
389 AC_MSG_RESULT($dbus_have_struct_cmsgcred)
391 if test x$dbus_have_struct_cmsgcred = xyes; then
392 AC_DEFINE(HAVE_CMSGCRED,1,[Have cmsgcred structure])
396 #### Abstract sockets
398 AC_MSG_CHECKING(abstract socket namespace)
400 AC_RUN_IFELSE([AC_LANG_PROGRAM(
402 #include <sys/types.h>
406 #include <sys/socket.h>
412 struct sockaddr_un addr;
414 listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
418 fprintf (stderr, "socket() failed: %s\n", strerror (errno));
422 memset (&addr, '\0', sizeof (addr));
423 addr.sun_family = AF_UNIX;
424 strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test");
425 addr.sun_path[0] = '\0'; /* this is what makes it abstract */
427 if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
429 fprintf (stderr, "Abstract socket namespace bind() failed: %s\n",
436 [have_abstract_sockets=yes],
437 [have_abstract_sockets=no])
439 AC_MSG_RESULT($have_abstract_sockets)
441 if test x$enable_abstract_sockets = xyes; then
442 if test x$have_abstract_sockets = xno; then
443 AC_MSG_ERROR([Abstract sockets explicitly required, and support not detected.])
447 if test x$enable_abstract_sockets = xno; then
448 have_abstract_sockets=no;
451 if test x$have_abstract_sockets = xyes ; then
453 DBUS_PATH_OR_ABSTRACT=abstract
456 DBUS_PATH_OR_ABSTRACT=path
459 AC_DEFINE_UNQUOTED(HAVE_ABSTRACT_SOCKETS, $abstract_sockets, [Have abstract socket namespace])
461 # this is used in addresses to prefer abstract, e.g.
462 # unix:path=/foo or unix:abstract=/foo
463 AC_SUBST(DBUS_PATH_OR_ABSTRACT)
465 #### Sort out XML library
468 AC_CHECK_LIB(expat, XML_ParserCreate_MM,
469 [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ],
472 PKG_CHECK_MODULES(LIBXML, libxml-2.0, have_libxml=true, have_libxml=false)
474 # see what we want to use
475 dbus_use_libxml=false
477 if test x$with_xml = xexpat; then
479 if ! $have_expat ; then
480 AC_MSG_ERROR([Explicitly requested expat but expat not found])
482 elif test x$with_xml = xlibxml; then
484 if ! $have_libxml ; then
485 AC_MSG_ERROR([Explicitly requested libxml but libxml not found])
488 ### expat is the default because libxml can't currently survive
489 ### our brutal OOM-handling unit test setup.
490 ### http://bugzilla.gnome.org/show_bug.cgi?id=109368
491 if $have_expat ; then
494 elif $have_libxml ; then
498 AC_MSG_ERROR([No XML library found, check config.log for failed attempts])
502 AM_CONDITIONAL(DBUS_USE_EXPAT, $dbus_use_expat)
503 AM_CONDITIONAL(DBUS_USE_LIBXML, $dbus_use_libxml)
505 if $dbus_use_expat; then
509 if $dbus_use_libxml; then
510 XML_LIBS=$LIBXML_LIBS
511 XML_CFLAGS=$LIBXML_CFLAGS
514 #### Set up final flags
517 AC_SUBST(DBUS_CLIENT_CFLAGS)
518 AC_SUBST(DBUS_CLIENT_LIBS)
520 DBUS_BUS_CFLAGS=$XML_CFLAGS
521 DBUS_BUS_LIBS=$XML_LIBS
522 AC_SUBST(DBUS_BUS_CFLAGS)
523 AC_SUBST(DBUS_BUS_LIBS)
527 AC_SUBST(DBUS_TEST_CFLAGS)
528 AC_SUBST(DBUS_TEST_LIBS)
531 PKG_CHECK_MODULES(DBUS_GLIB, glib-2.0, have_glib=yes, have_glib=no)
532 PKG_CHECK_MODULES(DBUS_GLIB_THREADS, glib-2.0 gthread-2.0, have_glib_threads=yes, have_glib_threads=no)
534 if test x$have_glib = xno ; then
535 AC_MSG_WARN([GLib development libraries not found])
538 if test x$enable_glib = xyes; then
539 if test x$have_glib = xno; then
540 AC_MSG_ERROR([GLib explicitly required, and GLib development libraries not found])
544 if test x$enable_glib = xno; then
548 AM_CONDITIONAL(HAVE_GLIB, test x$have_glib = xyes)
549 AM_CONDITIONAL(HAVE_GLIB_THREADS, test x$have_glib_threads = xyes)
552 AC_SUBST(DBUS_GLIB_CFLAGS)
553 AC_SUBST(DBUS_GLIB_LIBS)
554 AC_SUBST(DBUS_GLIB_THREADS_LIBS)
558 AC_MSG_CHECKING([for qglobal.h])
559 if test -n "$QTDIR" -a -f "$QTDIR/include/qglobal.h"; then
561 DBUS_QT_CXXFLAGS="-I$QTDIR/include"
563 for dir in "${prefix}/include/qt" "/usr/include/qt-3.1" "/usr/include/qt3" "/usr/include/qt" "/usr/lib/qt/include"; do
564 if test -f "$dir/qglobal.h"; then
566 DBUS_QT_CXXFLAGS="-I$dir"
570 if test x"$have_qt" = x"yes"; then
571 AC_MSG_RESULT([found])
573 AC_MSG_RESULT([not found])
576 dnl linking to kdecore will give us a bit of help from libtool
577 if (! kde-config >& /dev/null); then
580 kdelibs=`kde-config --install lib --expandvars 2>/dev/null`
581 if test -z $kdelibs -o ! -f $kdelibs/libkdecore.la; then
584 DBUS_QT_LIBS="$kdelibs/libkdecore.la"
588 if test x$have_qt = xno ; then
589 AC_MSG_WARN([Qt development libraries not found])
592 if test x$enable_qt = xyes; then
593 if test x$have_qt = xno; then
594 AC_MSG_ERROR([Qt integration explicitly required, and Qt libraries not found])
598 if test x$enable_qt = xno; then
602 AM_CONDITIONAL(HAVE_QT, test x$have_qt = xyes)
605 AC_SUBST(DBUS_QT_CXXFLAGS)
606 AC_SUBST(DBUS_QT_LIBS)
611 ## for now enable_x11 just tracks have_x11,
612 ## there's no --enable-x11
613 if test x$no_x = xyes ; then
621 if test x$enable_x11 = xyes ; then
622 AC_DEFINE(DBUS_BUILD_X11,1,[Build X11-dependent code])
623 DBUS_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
624 DBUS_X_CFLAGS="$X_CFLAGS"
630 AC_SUBST(DBUS_X_CFLAGS)
631 AC_SUBST(DBUS_X_LIBS)
635 AC_PATH_PROG(DOXYGEN, doxygen, no)
636 AC_PATH_PROG(DB2HTML, db2html, no)
638 AC_MSG_CHECKING([whether to build documentation])
640 if test x$DOXYGEN = xno -o x$DB2HTML = xno ; then
646 if test x$enable_docs = xauto ; then
647 if test x$have_docs_tools = xno ; then
654 if test x$enable_docs = xyes; then
655 if test x$have_docs_tools = xno; then
656 AC_MSG_ERROR([Building docs explicitly required, but Doxygen or db2html not found])
660 AM_CONDITIONAL(DBUS_DOCS_ENABLED, test x$enable_docs = xyes)
663 #### find the actual value for $prefix that we'll end up with
664 ## (I know this is broken and should be done in the Makefile, but
665 ## that's a major pain and almost nobody actually seems to care)
667 if test "x$prefix" = "xNONE"; then
668 REAL_PREFIX=$ac_default_prefix
673 #### Have to go $localstatedir->$prefix/var->/usr/local/var
674 #### someone please fix this a better way...
675 LOCALSTATEDIR_TMP="$localstatedir"
678 EXPANDED_LOCALSTATEDIR=`eval echo $LOCALSTATEDIR_TMP`
680 AC_SUBST(EXPANDED_LOCALSTATEDIR)
682 SYSCONFDIR_TMP="$sysconfdir"
685 EXPANDED_SYSCONFDIR=`eval echo $SYSCONFDIR_TMP`
687 AC_SUBST(EXPANDED_SYSCONFDIR)
692 EXPANDED_BINDIR=`eval echo $BINDIR_TMP`
694 AC_SUBST(EXPANDED_BINDIR)
696 old_exec_prefix=${exec_prefix}
697 test "x$exec_prefix" = xNONE && eval exec_prefix=${prefix}
698 eval EXPANDED_LIBDIR=${libdir}
699 exec_prefix=${old_exec_prefix}
700 AC_SUBST(EXPANDED_LIBDIR)
702 #### Check our operating system
703 operating_system=unknown
704 if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then
705 operating_system=redhat
708 #### Sort out init scripts
710 if test x$with_init_scripts = x; then
711 if test xredhat = x$operating_system ; then
712 with_init_scripts=redhat
714 with_init_scripts=none
718 AM_CONDITIONAL(DBUS_INIT_SCRIPTS_RED_HAT, test x$with_init_scripts = xredhat)
721 ##### Set up location for system bus socket
722 if ! test -z "$with_system_socket"; then
723 DBUS_SYSTEM_SOCKET=$with_system_socket
725 DBUS_SYSTEM_SOCKET=${EXPANDED_LOCALSTATEDIR}/run/dbus/system_bus_socket
728 AC_SUBST(DBUS_SYSTEM_SOCKET)
730 #### Set up the pid file
731 if ! test -z "$with_system_pid_file"; then
732 DBUS_SYSTEM_PID_FILE=$with_system_pid_file
733 elif test x$operating_system = xredhat ; then
734 DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/messagebus.pid
736 DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/dbus/pid
739 AC_SUBST(DBUS_SYSTEM_PID_FILE)
741 #### Tell tests where to find certain stuff in builddir
742 ABSOLUTE_TOP_BUILDDIR=`cd ${ac_top_builddir}. && pwd`
744 AC_DEFUN(TEST_PATH, [
745 TEST_$1=${ABSOLUTE_TOP_BUILDDIR}/test/$2
746 AC_DEFINE_UNQUOTED(TEST_$1, "$TEST_$1",
747 [Full path to test file test/$2 in builddir])
751 TEST_PATH(SERVICE_DIR, data/valid-service-files)
752 TEST_PATH(SERVICE_BINARY, test-service)
753 TEST_PATH(EXIT_BINARY, test-exit)
754 TEST_PATH(SEGFAULT_BINARY, test-segfault)
755 TEST_PATH(SLEEP_FOREVER_BINARY, test-sleep-forever)
757 #### Find socket directories
758 if ! test -z "$TMPDIR" ; then
759 DEFAULT_SOCKET_DIR=$TMPDIR
760 elif ! test -z "$TEMP" ; then
761 DEFAULT_SOCKET_DIR=$TEMP
762 elif ! test -z "$TMP" ; then
763 DEFAULT_SOCKET_DIR=$TMP
765 DEFAULT_SOCKET_DIR=/tmp
768 if ! test -z "$with_test_socket_dir" ; then
769 TEST_SOCKET_DIR="$with_test_socket_dir"
771 TEST_SOCKET_DIR=$DEFAULT_SOCKET_DIR
773 AC_SUBST(TEST_SOCKET_DIR)
774 AC_DEFINE_UNQUOTED(DBUS_TEST_SOCKET_DIR, "$TEST_SOCKET_DIR", [Where to put test sockets])
776 if ! test -z "$with_session_socket_dir" ; then
777 DBUS_SESSION_SOCKET_DIR="$with_session_socket_dir"
779 DBUS_SESSION_SOCKET_DIR=$DEFAULT_SOCKET_DIR
781 AC_DEFINE_UNQUOTED(DBUS_SESSION_SOCKET_DIR, "$DBUS_SESSION_SOCKET_DIR", [Where per-session bus puts its sockets])
782 AC_SUBST(DBUS_SESSION_SOCKET_DIR)
788 dbus/dbus-arch-deps.h
805 test/data/valid-config-files/debug-allow-all.conf
806 test/data/valid-config-files/debug-allow-all-sha1.conf
807 test/data/valid-service-files/debug-echo.service
808 test/data/valid-service-files/debug-segfault.service
811 ### FIXME it's bizarre that have_qt and have_glib are used
812 ### instead of enable_ - should fix things so that enable
813 ### is always whether it's enabled, and have is always whether
816 dnl ==========================================================================
822 source code location: ${srcdir}
825 cppflags: ${CPPFLAGS}
826 cxxflags: ${CXXFLAGS}
830 if test x$enable_gcj = xyes ; then
833 gcjflags: ${GCJFLAGS}"
836 " gcj: (not enabled)"
839 if test x$enable_mono = xyes ; then
842 mcsflags: ${MCSFLAGS}
851 Maintainer mode: ${USE_MAINTAINER_MODE}
852 gcc coverage profiling: ${enable_gcov}
853 Building unit tests: ${enable_tests}
854 Building verbose mode: ${enable_verbose_mode}
855 Building assertions: ${enable_asserts}
856 Building checks: ${enable_checks}
857 Building Qt bindings: ${have_qt}
858 Building GLib bindings: ${have_glib}
859 Building X11 code: ${enable_x11}
860 Building documentation: ${enable_docs}
861 Using XML parser: ${with_xml}
862 Init scripts style: ${with_init_scripts}
863 Abstract socket names: ${have_abstract_sockets}
864 System bus socket: ${DBUS_SYSTEM_SOCKET}
865 System bus PID file: ${DBUS_SYSTEM_PID_FILE}
866 Session bus socket dir: ${DBUS_SESSION_SOCKET_DIR}
867 'make check' socket dir: ${TEST_SOCKET_DIR}
870 if test x$enable_tests = xyes; then
871 echo "NOTE: building with unit tests increases the size of the installed library and renders it insecure."
873 if test x$enable_tests = xyes -a x$enable_asserts = xno; then
874 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)"
876 if test x$enable_gcov = xyes; then
877 echo "NOTE: building with coverage profiling is definitely for developers only."
879 if test x$enable_verbose_mode = xyes; then
880 echo "NOTE: building with verbose mode increases library size, may slightly increase security risk, and decreases performance."
882 if test x$enable_asserts = xyes; then
883 echo "NOTE: building with assertions increases library size and decreases performance."
885 if test x$enable_checks = xno; then
886 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."