b26a87e0d6e20f4d6f68ddf7103bfd076be4a5c9
[platform/upstream/dbus.git] / configure.in
1 dnl -*- mode: m4 -*-
2 AC_PREREQ(2.52)
3
4 AC_INIT(dbus/dbus.h)
5
6 AM_INIT_AUTOMAKE(dbus, 0.10)
7
8 AM_CONFIG_HEADER(config.h)
9
10 # Honor aclocal flags
11 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
12
13 GETTEXT_PACKAGE=dbus-1
14 AC_SUBST(GETTEXT_PACKAGE)
15 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The name of the gettext domain])
16
17  ## must come before we use the $USE_MAINTAINER_MODE variable later
18 AM_MAINTAINER_MODE
19
20 AC_PROG_CC
21 AC_PROG_CXX
22 AC_ISC_POSIX
23 AC_HEADER_STDC
24 AM_PROG_LIBTOOL
25
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
36 AC_ARG_WITH(xml,                [  --with-xml=[libxml/expat]           XML library to use])
37 AC_ARG_WITH(init-scripts,       [  --with-init-scripts=[redhat]        Style of init scripts to install])
38 AC_ARG_WITH(session-socket-dir, [  --with-session-socket-dir=[dirname] Where to put sockets for the per-login-session message bus])
39 AC_ARG_WITH(test-socket-dir,    [  --with-test-socket-dir=[dirname]    Where to put sockets for make check])
40 AC_ARG_WITH(system-pid-file,    [  --with-system-pid-file=[pidfile]    PID file for systemwide daemon])
41 AC_ARG_WITH(system-socket,      [  --with-system-socket=[filename]     UNIX domain socket for systemwide daemon])
42
43 dnl DBUS_BUILD_TESTS controls unit tests built in to .c files 
44 dnl and also some stuff in the test/ subdir
45 AM_CONDITIONAL(DBUS_BUILD_TESTS, test x$enable_tests = xyes)
46 if test x$enable_tests = xyes; then
47     AC_DEFINE(DBUS_BUILD_TESTS,1,[Build test code])
48 fi
49
50 if test x$enable_verbose_mode = xyes; then
51     AC_DEFINE(DBUS_ENABLE_VERBOSE_MODE,1,[Support a verbose mode])
52 fi
53 if test x$enable_asserts = xno; then
54     AC_DEFINE(DBUS_DISABLE_ASSERT,1,[Disable assertion checking])
55 fi
56 if test x$enable_checks = xno; then
57     AC_DEFINE(DBUS_DISABLE_CHECKS,1,[Disable public API sanity checking])
58 fi
59
60 #### gcc warning flags
61
62 if test "x$GCC" = "xyes"; then
63   changequote(,)dnl
64   case " $CFLAGS " in
65   *[\ \ ]-Wall[\ \      ]*) ;;
66   *) CFLAGS="$CFLAGS -Wall" ;;
67   esac
68
69   case " $CFLAGS " in
70   *[\ \ ]-Wchar-subscripts[\ \  ]*) ;;
71   *) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
72   esac
73
74   case " $CFLAGS " in
75   *[\ \ ]-Wmissing-declarations[\ \     ]*) ;;
76   *) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
77   esac
78
79   case " $CFLAGS " in
80   *[\ \ ]-Wmissing-prototypes[\ \       ]*) ;;
81   *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
82   esac
83
84   case " $CFLAGS " in
85   *[\ \ ]-Wnested-externs[\ \   ]*) ;;
86   *) CFLAGS="$CFLAGS -Wnested-externs" ;;
87   esac
88
89   case " $CFLAGS " in
90   *[\ \ ]-Wpointer-arith[\ \    ]*) ;;
91   *) CFLAGS="$CFLAGS -Wpointer-arith" ;;
92   esac
93
94   case " $CFLAGS " in
95   *[\ \ ]-Wcast-align[\ \       ]*) ;;
96   *) CFLAGS="$CFLAGS -Wcast-align" ;;
97   esac
98
99   case " $CFLAGS " in
100   *[\ \ ]-Wsign-compare[\ \     ]*) ;;
101   *) CFLAGS="$CFLAGS -Wsign-compare" ;;
102   esac
103
104   if test "x$enable_ansi" = "xyes"; then
105     case " $CFLAGS " in
106     *[\ \       ]-ansi[\ \      ]*) ;;
107     *) CFLAGS="$CFLAGS -ansi" ;;
108     esac
109
110     case " $CFLAGS " in
111     *[\ \       ]-pedantic[\ \  ]*) ;;
112     *) CFLAGS="$CFLAGS -pedantic" ;;
113     esac
114   fi
115   if test x$enable_gcov = xyes; then
116     case " $CFLAGS " in
117     *[\ \       ]-fprofile-arcs[\ \     ]*) ;;
118     *) CFLAGS="$CFLAGS -fprofile-arcs" ;;
119     esac
120     case " $CFLAGS " in
121     *[\ \       ]-ftest-coverage[\ \    ]*) ;;
122     *) CFLAGS="$CFLAGS -ftest-coverage" ;;
123     esac
124
125     ## remove optimization
126     CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*//g'`
127   fi
128   changequote([,])dnl
129 else
130   if test x$enable_gcov = xyes; then
131     AC_MSG_ERROR([--enable-gcov can only be used with gcc])
132   fi
133 fi
134
135 changequote(,)dnl
136 # let ourselves use our own unstable API
137 CPPFLAGS="-DDBUS_API_SUBJECT_TO_CHANGE=1 $CPPFLAGS"
138 # compress spaces in flags
139 CFLAGS=`echo "$CFLAGS" | sed -e 's/ +/ /g'`
140 CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/ +/ /g'`
141 CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/ +/ /g'`
142 changequote([,])dnl
143
144 if test x$enable_gcov = xyes; then
145      ## so that config.h changes when you toggle gcov support
146      AC_DEFINE_UNQUOTED(DBUS_GCOV_ENABLED, 1, [Defined if gcov is enabled to force a rebuild due to config.h changing])
147 fi
148 AM_CONDITIONAL(DBUS_GCOV_ENABLED, test x$enable_gcov = xyes)
149
150 #### Integer sizes 
151
152 AC_CHECK_SIZEOF(char)
153 AC_CHECK_SIZEOF(short)
154 AC_CHECK_SIZEOF(long)
155 AC_CHECK_SIZEOF(int)
156 AC_CHECK_SIZEOF(void *)
157 AC_CHECK_SIZEOF(long long)
158 AC_CHECK_SIZEOF(__int64)
159
160 ### See what our 64 bit type is called
161 AC_MSG_CHECKING([64-bit integer type])
162
163 case 8 in
164 $ac_cv_sizeof_int)
165   dbusint64=int
166   dbusint64_constant='(val)'
167   dbusuint64_constant='(val)'
168   ;;
169 $ac_cv_sizeof_long)
170   dbusint64=long
171   dbusint64_constant='(val##L)'
172   dbusuint64_constant='(val##UL)'
173   ;;
174 $ac_cv_sizeof_long_long)
175   dbusint64='long long'
176   dbusint64_constant='(val##LL)'
177   dbusuint64_constant='(val##ULL)'
178   ;;
179 $ac_cv_sizeof___int64)
180   dbusint64=__int64
181   dbusint64_constant='(val##i64)'
182   dbusuint64_constant='(val##ui64)'
183   ;;
184 esac
185
186 if test -z "$dbusint64" ; then
187         DBUS_INT64_TYPE="no_int64_type_detected"
188         DBUS_HAVE_INT64=0
189         DBUS_INT64_CONSTANT=
190         DBUS_UINT64_CONSTANT=
191         AC_MSG_RESULT([none found])
192 else
193         DBUS_INT64_TYPE="$dbusint64"
194         DBUS_HAVE_INT64=1
195         DBUS_INT64_CONSTANT="$dbusint64_constant"
196         DBUS_UINT64_CONSTANT="$dbusuint64_constant"
197         AC_MSG_RESULT($DBUS_INT64_TYPE)
198 fi
199
200 AC_SUBST(DBUS_INT64_TYPE)
201 AC_SUBST(DBUS_INT64_CONSTANT)
202 AC_SUBST(DBUS_UINT64_CONSTANT)
203 AC_SUBST(DBUS_HAVE_INT64)
204
205 ## byte order
206 AC_C_BIGENDIAN
207
208 #### Various functions
209 AC_CHECK_LIB(socket,socket)
210 AC_CHECK_LIB(nsl,gethostbyname)
211
212 AC_CHECK_FUNCS(vsnprintf vasprintf nanosleep usleep poll setenv unsetenv socketpair getgrouplist)
213
214 AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
215
216 AC_CACHE_CHECK([for posix getpwnam_r],
217                 ac_cv_func_posix_getpwnam_r,
218                 [AC_TRY_RUN([
219 #include <errno.h>
220 #include <pwd.h>
221 int main () { 
222     char buffer[10000];
223     struct passwd pwd, *pwptr = &pwd;
224     int error;
225     errno = 0;
226     error = getpwnam_r ("", &pwd, buffer, 
227                         sizeof (buffer), &pwptr);
228    return (error < 0 && errno == ENOSYS) 
229            || error == ENOSYS; 
230 }               ],
231         [ac_cv_func_posix_getpwnam_r=yes],
232         [ac_cv_func_posix_getpwnam_r=no])])
233 if test "$ac_cv_func_posix_getpwnam_r" = yes; then
234         AC_DEFINE(HAVE_POSIX_GETPWNAM_R,1,
235                 [Have POSIX function getpwnam_r])
236 else
237         AC_CACHE_CHECK([for nonposix getpwnam_r],
238                 ac_cv_func_nonposix_getpwnam_r,
239                 [AC_TRY_LINK([#include <pwd.h>],
240                         [char buffer[10000];
241                         struct passwd pwd;
242                         getpwnam_r ("", &pwd, buffer, 
243                                         sizeof (buffer));],
244                         [ac_cv_func_nonposix_getpwnam_r=yes],
245                         [ac_cv_func_nonposix_getpwnam_r=no])])
246                 if test "$ac_cv_func_nonposix_getpwnam_r" = yes; then
247                 AC_DEFINE(HAVE_NONPOSIX_GETPWNAM_R,1,
248                         [Have non-POSIX function getpwnam_r])
249         fi
250 fi
251
252 dnl check for writev header and writev function so we're 
253 dnl good to go if HAVE_WRITEV gets defined.
254 AC_CHECK_HEADERS(sys/uio.h, [AC_CHECK_FUNCS(writev)])
255
256 dnl check for flavours of varargs macros (test from GLib)
257 AC_MSG_CHECKING(for ISO C99 varargs macros in C)
258 AC_TRY_COMPILE([],[
259 int a(int p1, int p2, int p3);
260 #define call_a(...) a(1,__VA_ARGS__)
261 call_a(2,3);
262 ],dbus_have_iso_c_varargs=yes,dbus_have_iso_c_varargs=no)
263 AC_MSG_RESULT($dbus_have_iso_c_varargs)
264
265 AC_MSG_CHECKING(for GNUC varargs macros)
266 AC_TRY_COMPILE([],[
267 int a(int p1, int p2, int p3);
268 #define call_a(params...) a(1,params)
269 call_a(2,3);
270 ],dbus_have_gnuc_varargs=yes,dbus_have_gnuc_varargs=no)
271 AC_MSG_RESULT($dbus_have_gnuc_varargs)
272
273 dnl Output varargs tests
274 if test x$dbus_have_iso_c_varargs = xyes; then
275     AC_DEFINE(HAVE_ISO_VARARGS,1,[Have ISO C99 varargs macros])
276 fi
277 if test x$dbus_have_gnuc_varargs = xyes; then
278     AC_DEFINE(HAVE_GNUC_VARARGS,1,[Have GNU-style varargs macros])
279 fi
280
281 dnl Check for various credentials.
282 AC_MSG_CHECKING(for struct cmsgcred)
283 AC_TRY_COMPILE([
284 #include <sys/types.h>
285 #include <sys/socket.h>
286 ],[
287 struct cmsgcred cred;
288
289 cred.cmcred_pid = 0;
290 ],dbus_have_struct_cmsgcred=yes,dbus_have_struct_cmsgcred=no)
291 AC_MSG_RESULT($dbus_have_struct_cmsgcred)
292
293 if test x$dbus_have_struct_cmsgcred = xyes; then
294     AC_DEFINE(HAVE_CMSGCRED,1,[Have cmsgcred structure])
295 fi
296
297
298 #### Sort out XML library
299
300 # see what we have
301 AC_CHECK_LIB(expat, XML_ParserCreate_MM, 
302              [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ],
303              have_expat=false)
304
305 PKG_CHECK_MODULES(LIBXML, libxml-2.0, have_libxml=true, have_libxml=false)
306
307 # see what we want to use
308 dbus_use_libxml=false
309 dbus_use_expat=false
310 if test x$with_xml = xexpat; then
311         dbus_use_expat=true
312         if ! $have_expat ; then
313            AC_MSG_ERROR([Explicitly requested expat but expat not found])
314         fi
315 elif test x$with_xml = xlibxml; then
316         dbus_use_libxml=true
317         if ! $have_libxml ; then
318            AC_MSG_ERROR([Explicitly requested libxml but libxml not found])
319         fi
320 else
321         ### expat is the default because libxml can't currently survive 
322         ### our brutal OOM-handling unit test setup.
323         ### http://bugzilla.gnome.org/show_bug.cgi?id=109368
324         if $have_expat ; then
325                 with_xml=expat
326                 dbus_use_expat=true
327         elif $have_libxml ; then
328                 with_xml=libxml
329                 dbus_use_libxml=true
330         else
331                 AC_MSG_ERROR([No XML library found, check config.log for failed attempts])
332         fi
333 fi
334
335 AM_CONDITIONAL(DBUS_USE_EXPAT, $dbus_use_expat)
336 AM_CONDITIONAL(DBUS_USE_LIBXML, $dbus_use_libxml)
337
338 if $dbus_use_expat; then
339    XML_LIBS=-lexpat
340    XML_CFLAGS=
341 fi
342 if $dbus_use_libxml; then
343    XML_LIBS=$LIBXML_LIBS
344    XML_CFLAGS=$LIBXML_CFLAGS
345 fi
346
347 #### Set up final flags
348 DBUS_CLIENT_CFLAGS=
349 DBUS_CLIENT_LIBS=
350 AC_SUBST(DBUS_CLIENT_CFLAGS)
351 AC_SUBST(DBUS_CLIENT_LIBS)
352
353 DBUS_BUS_CFLAGS=$XML_CFLAGS
354 DBUS_BUS_LIBS=$XML_LIBS
355 AC_SUBST(DBUS_BUS_CFLAGS)
356 AC_SUBST(DBUS_BUS_LIBS)
357
358 DBUS_TEST_CFLAGS=
359 DBUS_TEST_LIBS=
360 AC_SUBST(DBUS_TEST_CFLAGS)
361 AC_SUBST(DBUS_TEST_LIBS)
362
363 # Glib detection
364 PKG_CHECK_MODULES(DBUS_GLIB, glib-2.0, have_glib=yes, have_glib=no)
365 PKG_CHECK_MODULES(DBUS_GLIB_THREADS, glib-2.0 gthread-2.0, have_glib_threads=yes, have_glib_threads=no)
366
367 if test x$have_glib = xno ; then
368     AC_MSG_WARN([GLib development libraries not found])
369 fi
370
371 if test x$enable_glib = xyes; then
372     if test x$have_glib = xno; then
373         AC_MSG_ERROR([GLib explicitly required, and GLib development libraries not found])
374     fi
375 fi
376
377 if test x$enable_glib = xno; then
378    have_glib=no;
379 fi
380
381 AM_CONDITIONAL(HAVE_GLIB, test x$have_glib = xyes)
382 AM_CONDITIONAL(HAVE_GLIB_THREADS, test x$have_glib_threads = xyes)
383
384 dnl GLib flags
385 AC_SUBST(DBUS_GLIB_CFLAGS)
386 AC_SUBST(DBUS_GLIB_LIBS)
387 AC_SUBST(DBUS_GLIB_THREADS_LIBS)
388
389 # Qt detection
390 have_qt=no
391 AC_MSG_CHECKING([for qglobal.h])
392 if test -n "$QTDIR" -a -f "$QTDIR/include/qglobal.h"; then
393     have_qt=yes
394     DBUS_QT_CXXFLAGS="-I$QTDIR/include"
395 else
396     for dir in "${prefix}/include/qt" "/usr/include/qt-3.1" "/usr/include/qt3" "/usr/include/qt" "/usr/lib/qt/include"; do
397         if test -f "$dir/qglobal.h"; then
398             have_qt=yes
399             DBUS_QT_CXXFLAGS="-I$dir"
400        fi
401     done
402 fi
403 if test x"$have_qt" = x"yes"; then
404    AC_MSG_RESULT([found])
405 else
406    AC_MSG_RESULT([not found])
407 fi
408
409 dnl linking to kdecore will give us a bit of help from libtool
410 if (! kde-config >& /dev/null); then
411     have_qt=no
412 else
413     kdelibs=`kde-config --install lib --expandvars 2>/dev/null`
414     if test -z $kdelibs -o ! -f $kdelibs/libkdecore.la; then
415         have_qt=no
416     else
417         DBUS_QT_LIBS="$kdelibs/libkdecore.la"
418     fi
419 fi
420
421 if test x$have_qt = xno ; then
422     AC_MSG_WARN([Qt development libraries not found])
423 fi
424
425 if test x$enable_qt = xyes; then
426     if test x$have_qt = xno; then
427         AC_MSG_ERROR([Qt integration explicitly required, and Qt libraries not found])
428     fi
429 fi
430
431 if test x$enable_qt = xno; then
432    have_qt=no;
433 fi
434
435 AM_CONDITIONAL(HAVE_QT, test x$have_qt = xyes)
436
437 dnl Qt flags
438 AC_SUBST(DBUS_QT_CXXFLAGS)
439 AC_SUBST(DBUS_QT_LIBS)
440
441 ### Documentation
442
443 AC_PATH_PROG(DOXYGEN, doxygen, no)
444 AC_PATH_PROG(DB2HTML, db2html, no)
445
446 AC_MSG_CHECKING([whether to build documentation])
447
448 if test x$DOXYGEN = xno -o x$DB2HTML = xno ; then
449     have_docs_tools=no
450 else
451     have_docs_tools=yes
452 fi
453
454 if test x$enable_docs = xauto ; then
455     if test x$have_docs_tools = xno ; then
456         enable_docs=no
457     else
458         enable_docs=yes
459     fi
460 fi
461
462 if test x$enable_docs = xyes; then
463     if test x$have_docs_tools = xno; then
464         AC_MSG_ERROR([Building docs explicitly required, but Doxygen or db2html not found])
465     fi
466 fi
467
468 AM_CONDITIONAL(DBUS_DOCS_ENABLED, test x$enable_docs = xyes)
469 AC_MSG_RESULT(yes)
470
471 #### find the actual value for $prefix that we'll end up with
472 ##   (I know this is broken and should be done in the Makefile, but
473 ##    that's a major pain and almost nobody actually seems to care)
474 REAL_PREFIX=
475 if test "x$prefix" = "xNONE"; then
476   REAL_PREFIX=$ac_default_prefix
477 else
478   REAL_PREFIX=$prefix
479 fi
480
481 #### Have to go $localstatedir->$prefix/var->/usr/local/var   
482 #### someone please fix this a better way...
483 LOCALSTATEDIR_TMP="$localstatedir"
484 old_prefix=$prefix
485 prefix=$REAL_PREFIX
486 EXPANDED_LOCALSTATEDIR=`eval echo $LOCALSTATEDIR_TMP`
487 prefix=$old_prefix
488 AC_SUBST(EXPANDED_LOCALSTATEDIR)
489
490 SYSCONFDIR_TMP="$sysconfdir"
491 old_prefix=$prefix
492 prefix=$REAL_PREFIX
493 EXPANDED_SYSCONFDIR=`eval echo $SYSCONFDIR_TMP`
494 prefix=$old_prefix
495 AC_SUBST(EXPANDED_SYSCONFDIR)
496
497 BINDIR_TMP="$bindir"
498 old_prefix=$prefix
499 prefix=$REAL_PREFIX
500 EXPANDED_BINDIR=`eval echo $BINDIR_TMP`
501 prefix=$old_prefix
502 AC_SUBST(EXPANDED_BINDIR)
503
504 #### Check our operating system
505 operating_system=unknown
506 if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then
507    operating_system=redhat
508 fi
509
510 #### Sort out init scripts
511
512 if test x$with_init_scripts = x; then
513     if test xredhat = x$operating_system ; then
514         with_init_scripts=redhat
515     else
516         with_init_scripts=none
517     fi
518 fi
519
520 AM_CONDITIONAL(DBUS_INIT_SCRIPTS_RED_HAT, test x$with_init_scripts = xredhat)
521
522
523 ##### Set up location for system bus socket
524 if ! test -z "$with_system_socket"; then
525    DBUS_SYSTEM_SOCKET=$with_system_socket
526 else
527    DBUS_SYSTEM_SOCKET=${EXPANDED_LOCALSTATEDIR}/run/dbus/system_bus_socket
528 fi
529
530 AC_SUBST(DBUS_SYSTEM_SOCKET)
531
532 #### Set up the pid file
533 if ! test -z "$with_system_pid_file"; then
534    DBUS_SYSTEM_PID_FILE=$with_system_pid_file
535 elif test x$operating_system = xredhat ; then
536    DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/messagebus.pid
537 else
538    DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/dbus/pid
539 fi
540
541 AC_SUBST(DBUS_SYSTEM_PID_FILE)
542
543 #### Tell tests where to find certain stuff in builddir
544 ABSOLUTE_TOP_BUILDDIR=`cd ${ac_top_builddir}. && pwd`
545
546 AC_DEFUN(TEST_PATH, [
547 TEST_$1=${ABSOLUTE_TOP_BUILDDIR}/test/$2
548 AC_DEFINE_UNQUOTED(TEST_$1, "$TEST_$1",
549                    [Full path to test file test/$2 in builddir])
550 AC_SUBST(TEST_$1)
551 ])
552
553 TEST_PATH(SERVICE_DIR, data/valid-service-files)
554 TEST_PATH(SERVICE_BINARY, test-service)
555 TEST_PATH(EXIT_BINARY, test-exit)
556 TEST_PATH(SEGFAULT_BINARY, test-segfault)
557 TEST_PATH(SLEEP_FOREVER_BINARY, test-sleep-forever)
558
559 #### Find socket directories
560 if ! test -z "$TMPDIR" ; then
561    DEFAULT_SOCKET_DIR=$TMPDIR
562 elif ! test -z "$TEMP" ; then
563    DEFAULT_SOCKET_DIR=$TEMP
564 elif ! test -z "$TMP" ; then
565    DEFAULT_SOCKET_DIR=$TMP
566 else
567    DEFAULT_SOCKET_DIR=/tmp
568 fi
569
570 if ! test -z "$with_test_socket_dir" ; then
571    TEST_SOCKET_DIR="$with_test_socket_dir"
572 else
573    TEST_SOCKET_DIR=$DEFAULT_SOCKET_DIR
574 fi
575 AC_SUBST(TEST_SOCKET_DIR)
576
577 if ! test -z "$with_session_socket_dir" ; then
578    DBUS_SESSION_SOCKET_DIR="$with_session_socket_dir"
579 else
580    DBUS_SESSION_SOCKET_DIR=$DEFAULT_SOCKET_DIR
581 fi
582 AC_SUBST(DBUS_SESSION_SOCKET_DIR)
583
584
585 AC_OUTPUT([
586 Doxyfile
587 dbus/dbus-arch-deps.h
588 bus/system.conf
589 bus/session.conf
590 bus/messagebus
591 bus/dbus-daemon-1.1
592 Makefile
593 dbus/Makefile
594 glib/Makefile
595 qt/Makefile
596 bus/Makefile
597 tools/Makefile
598 test/Makefile
599 doc/Makefile
600 dbus-1.pc
601 dbus-glib-1.pc
602 test/data/valid-config-files/debug-allow-all.conf
603 test/data/valid-config-files/debug-allow-all-sha1.conf
604 test/data/valid-service-files/debug-echo.service
605 test/data/valid-service-files/debug-segfault.service
606 ])
607
608 dnl ==========================================================================
609 echo "
610                     D-BUS $VERSION
611                   ==============
612
613         prefix:                   ${prefix}
614         source code location:     ${srcdir}
615         compiler:                 ${CC}
616         cflags:                   ${CFLAGS}
617         cppflags:                 ${CPPFLAGS}
618         cxxflags:                 ${CXXFLAGS}
619         Doxygen:                  ${DOXYGEN}
620         db2html:                  ${DB2HTML}
621
622         Maintainer mode:          ${USE_MAINTAINER_MODE}
623         gcc coverage profiling:   ${enable_gcov}
624         Building unit tests:      ${enable_tests}
625         Building verbose mode:    ${enable_verbose_mode}
626         Building assertions:      ${enable_asserts}
627         Building checks:          ${enable_checks}
628         Building Qt bindings:     ${have_qt}
629         Building GLib bindings:   ${have_glib}
630         Building documentation:   ${enable_docs}
631         Using XML parser:         ${with_xml}
632         Init scripts style:       ${with_init_scripts}
633         System bus socket:        ${DBUS_SYSTEM_SOCKET}
634         System bus PID file:      ${DBUS_SYSTEM_PID_FILE}
635         Session bus socket dir:   ${DBUS_SESSION_SOCKET_DIR}
636         'make check' socket dir:  ${TEST_SOCKET_DIR}
637 "
638
639 if test x$enable_tests = xyes; then
640         echo "NOTE: building with unit tests increases the size of the installed library and renders it insecure."
641 fi
642 if test x$enable_tests = xyes -a x$enable_asserts = xno; then
643         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)"
644 fi
645 if test x$enable_gcov = xyes; then
646         echo "NOTE: building with coverage profiling is definitely for developers only."
647 fi
648 if test x$enable_verbose_mode = xyes; then
649         echo "NOTE: building with verbose mode increases library size, may slightly increase security risk, and decreases performance."
650 fi
651 if test x$enable_asserts = xyes; then
652         echo "NOTE: building with assertions increases library size and decreases performance."
653 fi
654 if test x$enable_checks = xno; then
655         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."
656 fi