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])
57 AC_DEFINE(G_DISABLE_ASSERT,1,[Disable GLib assertion macros])
59 if test x$enable_checks = xno; then
60 AC_DEFINE(DBUS_DISABLE_CHECKS,1,[Disable public API sanity checking])
61 AC_DEFINE(G_DISABLE_CHECKS,1,[Disable GLib public API sanity checking])
64 #### gcc warning flags
66 if test "x$GCC" = "xyes"; then
69 *[\ \ ]-Wall[\ \ ]*) ;;
70 *) CFLAGS="$CFLAGS -Wall" ;;
74 *[\ \ ]-Wchar-subscripts[\ \ ]*) ;;
75 *) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
79 *[\ \ ]-Wmissing-declarations[\ \ ]*) ;;
80 *) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
84 *[\ \ ]-Wmissing-prototypes[\ \ ]*) ;;
85 *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
89 *[\ \ ]-Wnested-externs[\ \ ]*) ;;
90 *) CFLAGS="$CFLAGS -Wnested-externs" ;;
94 *[\ \ ]-Wpointer-arith[\ \ ]*) ;;
95 *) CFLAGS="$CFLAGS -Wpointer-arith" ;;
99 *[\ \ ]-Wcast-align[\ \ ]*) ;;
100 *) CFLAGS="$CFLAGS -Wcast-align" ;;
104 *[\ \ ]-Wsign-compare[\ \ ]*) ;;
105 *) CFLAGS="$CFLAGS -Wsign-compare" ;;
108 if test "x$enable_ansi" = "xyes"; then
110 *[\ \ ]-ansi[\ \ ]*) ;;
111 *) CFLAGS="$CFLAGS -ansi" ;;
115 *[\ \ ]-D_POSIX_C_SOURCE*) ;;
116 *) CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=199309L" ;;
120 *[\ \ ]-D_BSD_SOURCE[\ \ ]*) ;;
121 *) CFLAGS="$CFLAGS -D_BSD_SOURCE" ;;
125 *[\ \ ]-pedantic[\ \ ]*) ;;
126 *) CFLAGS="$CFLAGS -pedantic" ;;
129 if test x$enable_gcov = xyes; then
131 *[\ \ ]-fprofile-arcs[\ \ ]*) ;;
132 *) CFLAGS="$CFLAGS -fprofile-arcs" ;;
135 *[\ \ ]-ftest-coverage[\ \ ]*) ;;
136 *) CFLAGS="$CFLAGS -ftest-coverage" ;;
139 ## remove optimization
140 CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*//g'`
144 if test x$enable_gcov = xyes; then
145 AC_MSG_ERROR([--enable-gcov can only be used with gcc])
149 #### can't use AM_PROG_GCJ since it fails fatally if no gcj found
150 AC_CHECK_PROGS(GCJ, gcj, gcj)
151 if test -z "$GCJ" ; then
154 # Needs to be here so libtool wont get confused
158 if test "x${GCJFLAGS-unset}" = xunset; then
159 GCJFLAGS="-g -O2 -Wall"
164 if test x$enable_gcj = xauto ; then
165 if test x$have_gcj = xno ; then
172 if test x$enable_gcj = xyes; then
173 if test x$have_gcj = xno ; then
174 AC_MSG_ERROR([Building gcj explicitly required, but gcj not found])
178 AM_CONDITIONAL(DBUS_USE_GCJ, test x$enable_gcj = xyes)
183 AC_CHECK_TOOL(MCS, mcs, mcs)
184 if test -z "$MCS" ; then
188 if test "x${MCSFLAGS-unset}" = xunset; then
189 MCSFLAGS="" ### put default MCSFLAGS here
194 if test x$enable_mono = xauto ; then
195 if test x$have_mcs = xno ; then
202 if test x$enable_mono = xyes; then
203 if test x$have_mcs = xno ; then
204 AC_MSG_ERROR([Building Mono bindings explicitly required, but mcs compiler not found])
208 AM_CONDITIONAL(DBUS_USE_MCS, test x$enable_mono = xyes)
211 # let ourselves use our own unstable API
212 CPPFLAGS="-DDBUS_API_SUBJECT_TO_CHANGE=1 $CPPFLAGS"
213 # compress spaces in flags
214 CFLAGS=`echo "$CFLAGS" | sed -e 's/ +/ /g'`
215 CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/ +/ /g'`
216 CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/ +/ /g'`
219 if test x$enable_gcov = xyes; then
220 ## so that config.h changes when you toggle gcov support
221 AC_DEFINE_UNQUOTED(DBUS_GCOV_ENABLED, 1, [Defined if gcov is enabled to force a rebuild due to config.h changing])
223 AM_CONDITIONAL(DBUS_GCOV_ENABLED, test x$enable_gcov = xyes)
227 AC_CHECK_SIZEOF(char)
228 AC_CHECK_SIZEOF(short)
229 AC_CHECK_SIZEOF(long)
231 AC_CHECK_SIZEOF(void *)
232 AC_CHECK_SIZEOF(long long)
233 AC_CHECK_SIZEOF(__int64)
235 ### See what our 64 bit type is called
236 AC_MSG_CHECKING([64-bit integer type])
241 dbusint64_constant='(val)'
242 dbusuint64_constant='(val)'
246 dbusint64_constant='(val##L)'
247 dbusuint64_constant='(val##UL)'
249 $ac_cv_sizeof_long_long)
250 dbusint64='long long'
251 dbusint64_constant='(val##LL)'
252 dbusuint64_constant='(val##ULL)'
254 $ac_cv_sizeof___int64)
256 dbusint64_constant='(val##i64)'
257 dbusuint64_constant='(val##ui64)'
261 if test -z "$dbusint64" ; then
262 DBUS_INT64_TYPE="no_int64_type_detected"
265 DBUS_UINT64_CONSTANT=
266 AC_MSG_RESULT([none found])
268 DBUS_INT64_TYPE="$dbusint64"
270 DBUS_INT64_CONSTANT="$dbusint64_constant"
271 DBUS_UINT64_CONSTANT="$dbusuint64_constant"
272 AC_MSG_RESULT($DBUS_INT64_TYPE)
275 AC_SUBST(DBUS_INT64_TYPE)
276 AC_SUBST(DBUS_INT64_CONSTANT)
277 AC_SUBST(DBUS_UINT64_CONSTANT)
278 AC_SUBST(DBUS_HAVE_INT64)
283 #### Atomic integers (checks by Sebastian Wilhelmi for GLib)
284 AC_MSG_CHECKING([whether to use inline assembler routines for atomic integers])
286 if test x"$GCC" = xyes; then
287 if test "x$enable_ansi" = "xyes"; then
295 AC_MSG_RESULT([i486])
296 AC_DEFINE_UNQUOTED(DBUS_USE_ATOMIC_INT_486, 1, [Use atomic integer implementation for 486])
305 if test x$have_atomic_inc = xyes ; then
306 AC_DEFINE_UNQUOTED(DBUS_HAVE_ATOMIC_INT, 1, [Some atomic integer implementation present])
309 #### Various functions
310 AC_CHECK_LIB(socket,socket)
311 AC_CHECK_LIB(nsl,gethostbyname)
313 AC_CHECK_FUNCS(vsnprintf vasprintf nanosleep usleep poll setenv unsetenv socketpair getgrouplist)
315 AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
317 AC_CACHE_CHECK([for posix getpwnam_r],
318 ac_cv_func_posix_getpwnam_r,
324 struct passwd pwd, *pwptr = &pwd;
327 error = getpwnam_r ("", &pwd, buffer,
328 sizeof (buffer), &pwptr);
329 return (error < 0 && errno == ENOSYS)
332 [ac_cv_func_posix_getpwnam_r=yes],
333 [ac_cv_func_posix_getpwnam_r=no])])
334 if test "$ac_cv_func_posix_getpwnam_r" = yes; then
335 AC_DEFINE(HAVE_POSIX_GETPWNAM_R,1,
336 [Have POSIX function getpwnam_r])
338 AC_CACHE_CHECK([for nonposix getpwnam_r],
339 ac_cv_func_nonposix_getpwnam_r,
340 [AC_TRY_LINK([#include <pwd.h>],
343 getpwnam_r ("", &pwd, buffer,
345 [ac_cv_func_nonposix_getpwnam_r=yes],
346 [ac_cv_func_nonposix_getpwnam_r=no])])
347 if test "$ac_cv_func_nonposix_getpwnam_r" = yes; then
348 AC_DEFINE(HAVE_NONPOSIX_GETPWNAM_R,1,
349 [Have non-POSIX function getpwnam_r])
353 dnl check for socklen_t
354 AC_MSG_CHECKING(whether socklen_t is defined)
356 #include <sys/types.h>
357 #include <sys/socket.h>
362 ],dbus_have_socklen_t=yes,dbus_have_socklen_t=no)
363 AC_MSG_RESULT($dbus_have_socklen_t)
365 if test "x$dbus_have_socklen_t" = "xyes"; then
366 AC_DEFINE(HAVE_SOCKLEN_T,1,[Have socklen_t type])
369 dnl check for writev header and writev function so we're
370 dnl good to go if HAVE_WRITEV gets defined.
371 AC_CHECK_HEADERS(sys/uio.h, [AC_CHECK_FUNCS(writev)])
373 dnl check for flavours of varargs macros (test from GLib)
374 AC_MSG_CHECKING(for ISO C99 varargs macros in C)
376 int a(int p1, int p2, int p3);
377 #define call_a(...) a(1,__VA_ARGS__)
379 ],dbus_have_iso_c_varargs=yes,dbus_have_iso_c_varargs=no)
380 AC_MSG_RESULT($dbus_have_iso_c_varargs)
382 AC_MSG_CHECKING(for GNUC varargs macros)
384 int a(int p1, int p2, int p3);
385 #define call_a(params...) a(1,params)
387 ],dbus_have_gnuc_varargs=yes,dbus_have_gnuc_varargs=no)
388 AC_MSG_RESULT($dbus_have_gnuc_varargs)
390 dnl Output varargs tests
391 if test x$dbus_have_iso_c_varargs = xyes; then
392 AC_DEFINE(HAVE_ISO_VARARGS,1,[Have ISO C99 varargs macros])
394 if test x$dbus_have_gnuc_varargs = xyes; then
395 AC_DEFINE(HAVE_GNUC_VARARGS,1,[Have GNU-style varargs macros])
398 dnl Check for various credentials.
399 AC_MSG_CHECKING(for struct cmsgcred)
401 #include <sys/types.h>
402 #include <sys/socket.h>
404 struct cmsgcred cred;
407 ],dbus_have_struct_cmsgcred=yes,dbus_have_struct_cmsgcred=no)
408 AC_MSG_RESULT($dbus_have_struct_cmsgcred)
410 if test x$dbus_have_struct_cmsgcred = xyes; then
411 AC_DEFINE(HAVE_CMSGCRED,1,[Have cmsgcred structure])
415 #### Abstract sockets
417 AC_MSG_CHECKING(abstract socket namespace)
419 AC_RUN_IFELSE([AC_LANG_PROGRAM(
421 #include <sys/types.h>
425 #include <sys/socket.h>
431 struct sockaddr_un addr;
433 listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
437 fprintf (stderr, "socket() failed: %s\n", strerror (errno));
441 memset (&addr, '\0', sizeof (addr));
442 addr.sun_family = AF_UNIX;
443 strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test");
444 addr.sun_path[0] = '\0'; /* this is what makes it abstract */
446 if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
448 fprintf (stderr, "Abstract socket namespace bind() failed: %s\n",
455 [have_abstract_sockets=yes],
456 [have_abstract_sockets=no])
458 AC_MSG_RESULT($have_abstract_sockets)
460 if test x$enable_abstract_sockets = xyes; then
461 if test x$have_abstract_sockets = xno; then
462 AC_MSG_ERROR([Abstract sockets explicitly required, and support not detected.])
466 if test x$enable_abstract_sockets = xno; then
467 have_abstract_sockets=no;
470 if test x$have_abstract_sockets = xyes ; then
472 DBUS_PATH_OR_ABSTRACT=abstract
475 DBUS_PATH_OR_ABSTRACT=path
478 AC_DEFINE_UNQUOTED(HAVE_ABSTRACT_SOCKETS, $abstract_sockets, [Have abstract socket namespace])
480 # this is used in addresses to prefer abstract, e.g.
481 # unix:path=/foo or unix:abstract=/foo
482 AC_SUBST(DBUS_PATH_OR_ABSTRACT)
484 #### Sort out XML library
487 AC_CHECK_LIB(expat, XML_ParserCreate_MM,
488 [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ],
491 PKG_CHECK_MODULES(LIBXML, libxml-2.0, have_libxml=true, have_libxml=false)
493 # see what we want to use
494 dbus_use_libxml=false
496 if test x$with_xml = xexpat; then
498 if ! $have_expat ; then
499 AC_MSG_ERROR([Explicitly requested expat but expat not found])
501 elif test x$with_xml = xlibxml; then
503 if ! $have_libxml ; then
504 AC_MSG_ERROR([Explicitly requested libxml but libxml not found])
507 ### expat is the default because libxml can't currently survive
508 ### our brutal OOM-handling unit test setup.
509 ### http://bugzilla.gnome.org/show_bug.cgi?id=109368
510 if $have_expat ; then
513 elif $have_libxml ; then
517 AC_MSG_ERROR([No XML library found, check config.log for failed attempts])
521 AM_CONDITIONAL(DBUS_USE_EXPAT, $dbus_use_expat)
522 AM_CONDITIONAL(DBUS_USE_LIBXML, $dbus_use_libxml)
524 if $dbus_use_expat; then
528 if $dbus_use_libxml; then
529 XML_LIBS=$LIBXML_LIBS
530 XML_CFLAGS=$LIBXML_CFLAGS
533 #### Set up final flags
536 AC_SUBST(DBUS_CLIENT_CFLAGS)
537 AC_SUBST(DBUS_CLIENT_LIBS)
539 DBUS_BUS_CFLAGS=$XML_CFLAGS
540 DBUS_BUS_LIBS=$XML_LIBS
541 AC_SUBST(DBUS_BUS_CFLAGS)
542 AC_SUBST(DBUS_BUS_LIBS)
546 AC_SUBST(DBUS_TEST_CFLAGS)
547 AC_SUBST(DBUS_TEST_LIBS)
550 PKG_CHECK_MODULES(DBUS_GLIB, gobject-2.0, have_glib=yes, have_glib=no)
551 PKG_CHECK_MODULES(DBUS_GLIB_THREADS, glib-2.0 gthread-2.0, have_glib_threads=yes, have_glib_threads=no)
553 if test x$have_glib = xno ; then
554 AC_MSG_WARN([GLib development libraries not found])
557 if test x$enable_glib = xyes; then
558 if test x$have_glib = xno; then
559 AC_MSG_ERROR([GLib explicitly required, and GLib development libraries not found])
563 if test x$enable_glib = xno; then
567 AM_CONDITIONAL(HAVE_GLIB, test x$have_glib = xyes)
568 AM_CONDITIONAL(HAVE_GLIB_THREADS, test x$have_glib_threads = xyes)
571 AC_SUBST(DBUS_GLIB_CFLAGS)
572 AC_SUBST(DBUS_GLIB_LIBS)
573 AC_SUBST(DBUS_GLIB_THREADS_LIBS)
575 DBUS_GLIB_TOOL_CFLAGS=$XML_CFLAGS
576 DBUS_GLIB_TOOL_LIBS=$XML_LIBS
577 AC_SUBST(DBUS_GLIB_TOOL_CFLAGS)
578 AC_SUBST(DBUS_GLIB_TOOL_LIBS)
582 AC_MSG_CHECKING([for qglobal.h])
583 if test -n "$QTDIR" -a -f "$QTDIR/include/qglobal.h"; then
585 DBUS_QT_CXXFLAGS="-I$QTDIR/include"
587 for dir in "${prefix}/include/qt" "/usr/include/qt-3.1" "/usr/include/qt3" "/usr/include/qt" "/usr/lib/qt/include"; do
588 if test -f "$dir/qglobal.h"; then
590 DBUS_QT_CXXFLAGS="-I$dir"
594 if test x"$have_qt" = x"yes"; then
595 AC_MSG_RESULT([found])
597 AC_MSG_RESULT([not found])
600 dnl linking to kdecore will give us a bit of help from libtool
601 if (! kde-config >& /dev/null); then
604 kdelibs=`kde-config --install lib --expandvars 2>/dev/null`
605 if test -z $kdelibs -o ! -f $kdelibs/libkdecore.la; then
608 DBUS_QT_LIBS="$kdelibs/libkdecore.la"
612 if test x$have_qt = xno ; then
613 AC_MSG_WARN([Qt development libraries not found])
616 if test x$enable_qt = xyes; then
617 if test x$have_qt = xno; then
618 AC_MSG_ERROR([Qt integration explicitly required, and Qt libraries not found])
622 if test x$enable_qt = xno; then
626 AM_CONDITIONAL(HAVE_QT, test x$have_qt = xyes)
629 AC_SUBST(DBUS_QT_CXXFLAGS)
630 AC_SUBST(DBUS_QT_LIBS)
635 ## for now enable_x11 just tracks have_x11,
636 ## there's no --enable-x11
637 if test x$no_x = xyes ; then
645 if test x$enable_x11 = xyes ; then
646 AC_DEFINE(DBUS_BUILD_X11,1,[Build X11-dependent code])
647 DBUS_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
648 DBUS_X_CFLAGS="$X_CFLAGS"
654 AC_SUBST(DBUS_X_CFLAGS)
655 AC_SUBST(DBUS_X_LIBS)
659 AC_PATH_PROG(DOXYGEN, doxygen, no)
660 AC_PATH_PROG(DB2HTML, db2html, no)
662 AC_MSG_CHECKING([whether to build documentation])
664 if test x$DOXYGEN = xno -o x$DB2HTML = xno ; then
670 if test x$enable_docs = xauto ; then
671 if test x$have_docs_tools = xno ; then
678 if test x$enable_docs = xyes; then
679 if test x$have_docs_tools = xno; then
680 AC_MSG_ERROR([Building docs explicitly required, but Doxygen or db2html not found])
684 AM_CONDITIONAL(DBUS_DOCS_ENABLED, test x$enable_docs = xyes)
687 #### find the actual value for $prefix that we'll end up with
688 ## (I know this is broken and should be done in the Makefile, but
689 ## that's a major pain and almost nobody actually seems to care)
691 if test "x$prefix" = "xNONE"; then
692 REAL_PREFIX=$ac_default_prefix
697 #### Have to go $localstatedir->$prefix/var->/usr/local/var
698 #### someone please fix this a better way...
699 LOCALSTATEDIR_TMP="$localstatedir"
702 EXPANDED_LOCALSTATEDIR=`eval echo $LOCALSTATEDIR_TMP`
704 AC_SUBST(EXPANDED_LOCALSTATEDIR)
706 SYSCONFDIR_TMP="$sysconfdir"
709 EXPANDED_SYSCONFDIR=`eval echo $SYSCONFDIR_TMP`
711 AC_SUBST(EXPANDED_SYSCONFDIR)
716 EXPANDED_BINDIR=`eval echo $BINDIR_TMP`
718 AC_SUBST(EXPANDED_BINDIR)
720 old_exec_prefix=${exec_prefix}
721 test "x$exec_prefix" = xNONE && eval exec_prefix=${prefix}
722 eval EXPANDED_LIBDIR=${libdir}
723 exec_prefix=${old_exec_prefix}
724 AC_SUBST(EXPANDED_LIBDIR)
726 #### Check our operating system
727 operating_system=unknown
728 if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then
729 operating_system=redhat
732 #### Sort out init scripts
734 if test x$with_init_scripts = x; then
735 if test xredhat = x$operating_system ; then
736 with_init_scripts=redhat
738 with_init_scripts=none
742 AM_CONDITIONAL(DBUS_INIT_SCRIPTS_RED_HAT, test x$with_init_scripts = xredhat)
745 ##### Set up location for system bus socket
746 if ! test -z "$with_system_socket"; then
747 DBUS_SYSTEM_SOCKET=$with_system_socket
749 DBUS_SYSTEM_SOCKET=${EXPANDED_LOCALSTATEDIR}/run/dbus/system_bus_socket
752 AC_SUBST(DBUS_SYSTEM_SOCKET)
754 #### Set up the pid file
755 if ! test -z "$with_system_pid_file"; then
756 DBUS_SYSTEM_PID_FILE=$with_system_pid_file
757 elif test x$operating_system = xredhat ; then
758 DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/messagebus.pid
760 DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/dbus/pid
763 AC_SUBST(DBUS_SYSTEM_PID_FILE)
765 #### Tell tests where to find certain stuff in builddir
766 ABSOLUTE_TOP_BUILDDIR=`cd ${ac_top_builddir}. && pwd`
768 AC_DEFUN(TEST_PATH, [
769 TEST_$1=${ABSOLUTE_TOP_BUILDDIR}/test/$2
770 AC_DEFINE_UNQUOTED(TEST_$1, "$TEST_$1",
771 [Full path to test file test/$2 in builddir])
775 TEST_PATH(SERVICE_DIR, data/valid-service-files)
776 TEST_PATH(SERVICE_BINARY, test-service)
777 TEST_PATH(EXIT_BINARY, test-exit)
778 TEST_PATH(SEGFAULT_BINARY, test-segfault)
779 TEST_PATH(SLEEP_FOREVER_BINARY, test-sleep-forever)
781 #### Find socket directories
782 if ! test -z "$TMPDIR" ; then
783 DEFAULT_SOCKET_DIR=$TMPDIR
784 elif ! test -z "$TEMP" ; then
785 DEFAULT_SOCKET_DIR=$TEMP
786 elif ! test -z "$TMP" ; then
787 DEFAULT_SOCKET_DIR=$TMP
789 DEFAULT_SOCKET_DIR=/tmp
792 if ! test -z "$with_test_socket_dir" ; then
793 TEST_SOCKET_DIR="$with_test_socket_dir"
795 TEST_SOCKET_DIR=$DEFAULT_SOCKET_DIR
797 AC_SUBST(TEST_SOCKET_DIR)
798 AC_DEFINE_UNQUOTED(DBUS_TEST_SOCKET_DIR, "$TEST_SOCKET_DIR", [Where to put test sockets])
800 if ! test -z "$with_session_socket_dir" ; then
801 DBUS_SESSION_SOCKET_DIR="$with_session_socket_dir"
803 DBUS_SESSION_SOCKET_DIR=$DEFAULT_SOCKET_DIR
805 AC_DEFINE_UNQUOTED(DBUS_SESSION_SOCKET_DIR, "$DBUS_SESSION_SOCKET_DIR", [Where per-session bus puts its sockets])
806 AC_SUBST(DBUS_SESSION_SOCKET_DIR)
812 dbus/dbus-arch-deps.h
823 gcj/org/freedesktop/Makefile
824 gcj/org/freedesktop/dbus/Makefile
833 test/data/valid-config-files/debug-allow-all.conf
834 test/data/valid-config-files/debug-allow-all-sha1.conf
835 test/data/valid-service-files/debug-echo.service
836 test/data/valid-service-files/debug-segfault.service
839 ### FIXME it's bizarre that have_qt and have_glib are used
840 ### instead of enable_ - should fix things so that enable
841 ### is always whether it's enabled, and have is always whether
844 dnl ==========================================================================
850 source code location: ${srcdir}
853 cppflags: ${CPPFLAGS}
854 cxxflags: ${CXXFLAGS}
855 64-bit int: ${DBUS_INT64_TYPE}
859 if test x$enable_gcj = xyes ; then
862 gcjflags: ${GCJFLAGS}"
865 " gcj: (not enabled)"
868 if test x$enable_mono = xyes ; then
871 mcsflags: ${MCSFLAGS}
880 Maintainer mode: ${USE_MAINTAINER_MODE}
881 gcc coverage profiling: ${enable_gcov}
882 Building unit tests: ${enable_tests}
883 Building verbose mode: ${enable_verbose_mode}
884 Building assertions: ${enable_asserts}
885 Building checks: ${enable_checks}
886 Building Qt bindings: ${have_qt}
887 Building GLib bindings: ${have_glib}
888 Building X11 code: ${enable_x11}
889 Building documentation: ${enable_docs}
890 Using XML parser: ${with_xml}
891 Init scripts style: ${with_init_scripts}
892 Abstract socket names: ${have_abstract_sockets}
893 System bus socket: ${DBUS_SYSTEM_SOCKET}
894 System bus PID file: ${DBUS_SYSTEM_PID_FILE}
895 Session bus socket dir: ${DBUS_SESSION_SOCKET_DIR}
896 'make check' socket dir: ${TEST_SOCKET_DIR}
899 if test x$enable_tests = xyes; then
900 echo "NOTE: building with unit tests increases the size of the installed library and renders it insecure."
902 if test x$enable_tests = xyes -a x$enable_asserts = xno; then
903 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)"
905 if test x$enable_gcov = xyes; then
906 echo "NOTE: building with coverage profiling is definitely for developers only."
908 if test x$enable_verbose_mode = xyes; then
909 echo "NOTE: building with verbose mode increases library size, may slightly increase security risk, and decreases performance."
911 if test x$enable_asserts = xyes; then
912 echo "NOTE: building with assertions increases library size and decreases performance."
914 if test x$enable_checks = xno; then
915 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."