1dnl -*- mode: m4 -*- 2AC_PREREQ(2.52) 3 4AC_INIT(dbus/dbus.h) 5 6AC_CANONICAL_TARGET 7 8AM_INIT_AUTOMAKE(dbus, 1.0.2) 9 10AM_CONFIG_HEADER(config.h) 11 12# Honor aclocal flags 13ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" 14 15GETTEXT_PACKAGE=dbus-1 16AC_SUBST(GETTEXT_PACKAGE) 17AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The name of the gettext domain]) 18 19 ## must come before we use the $USE_MAINTAINER_MODE variable later 20AM_MAINTAINER_MODE 21 22# libtool versioning - this applies to libdbus 23# 24# See http://sources.redhat.com/autobook/autobook/autobook_91.html#SEC91 for details 25# 26 27## increment if the interface has additions, changes, removals. 28LT_CURRENT=5 29 30## increment any time the source changes; set to 31## 0 if you increment CURRENT 32LT_REVISION=0 33 34## increment if any interfaces have been added; set to 0 35## if any interfaces have been changed or removed. removal has 36## precedence over adding, so set to 0 if both happened. 37LT_AGE=2 38 39AC_SUBST(LT_CURRENT) 40AC_SUBST(LT_REVISION) 41AC_SUBST(LT_AGE) 42 43 44AC_PROG_CC 45AC_PROG_CXX 46AC_ISC_POSIX 47AC_HEADER_STDC 48 49AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests],[enable unit test code]),enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE) 50AC_ARG_ENABLE(ansi, AS_HELP_STRING([--enable-ansi],[enable -ansi -pedantic gcc flags]),enable_ansi=$enableval,enable_ansi=no) 51AC_ARG_ENABLE(verbose-mode, AS_HELP_STRING([--enable-verbose-mode],[support verbose debug mode]),enable_verbose_mode=$enableval,enable_verbose_mode=$USE_MAINTAINER_MODE) 52AC_ARG_ENABLE(asserts, AS_HELP_STRING([--enable-asserts],[include assertion checks]),enable_asserts=$enableval,enable_asserts=$USE_MAINTAINER_MODE) 53AC_ARG_ENABLE(checks, AS_HELP_STRING([--enable-checks],[include sanity checks on public API]),enable_checks=$enableval,enable_checks=yes) 54AC_ARG_ENABLE(xml-docs, AS_HELP_STRING([--enable-xml-docs],[build XML documentation (requires xmlto)]),enable_xml_docs=$enableval,enable_xml_docs=auto) 55AC_ARG_ENABLE(doxygen-docs, AS_HELP_STRING([--enable-doxygen-docs],[build DOXYGEN documentation (requires Doxygen)]),enable_doxygen_docs=$enableval,enable_doxygen_docs=auto) 56AC_ARG_ENABLE(gcov, AS_HELP_STRING([--enable-gcov],[compile with coverage profiling instrumentation (gcc only)]),enable_gcov=$enableval,enable_gcov=no) 57AC_ARG_ENABLE(abstract-sockets, AS_HELP_STRING([--enable-abstract-sockets],[use abstract socket namespace (linux only)]),enable_abstract_sockets=$enableval,enable_abstract_sockets=auto) 58AC_ARG_ENABLE(selinux, AS_HELP_STRING([--enable-selinux],[build with SELinux support]),enable_selinux=$enableval,enable_selinux=auto) 59AC_ARG_ENABLE(dnotify, AS_HELP_STRING([--enable-dnotify],[build with dnotify support (linux only)]),enable_dnotify=$enableval,enable_dnotify=auto) 60AC_ARG_ENABLE(kqueue, AS_HELP_STRING([--enable-kqueue],[build with kqueue support]),enable_kqueue=$enableval,enable_kqueue=auto) 61AC_ARG_ENABLE(console-owner-file, AS_HELP_STRING([--enable-console-owner-file],[enable console owner file]),enable_console_owner_file=$enableval,enable_console_owner_file=auto) 62 63AC_ARG_WITH(xml, AS_HELP_STRING([--with-xml=[libxml/expat]],[XML library to use])) 64AC_ARG_WITH(init-scripts, AS_HELP_STRING([--with-init-scripts=[redhat]],[Style of init scripts to install])) 65AC_ARG_WITH(session-socket-dir, AS_HELP_STRING([--with-session-socket-dir=[dirname]],[Where to put sockets for the per-login-session message bus])) 66AC_ARG_WITH(test-socket-dir, AS_HELP_STRING([--with-test-socket-dir=[dirname]],[Where to put sockets for make check])) 67AC_ARG_WITH(system-pid-file, AS_HELP_STRING([--with-system-pid-file=[pidfile]],[PID file for systemwide daemon])) 68AC_ARG_WITH(system-socket, AS_HELP_STRING([--with-system-socket=[filename]],[UNIX domain socket for systemwide daemon])) 69AC_ARG_WITH(console-auth-dir, AS_HELP_STRING([--with-console-auth-dir=[dirname]],[directory to check for console ownerhip])) 70AC_ARG_WITH(console-owner-file, AS_HELP_STRING([--with-console-owner-file=[filename]],[file whose owner determines current console owner])) 71AC_ARG_WITH(dbus_user, AS_HELP_STRING([--with-dbus-user=<user>],[User for running the DBUS daemon (messagebus)])) 72AC_ARG_WITH(dbus_daemondir, AS_HELP_STRING([--with-dbus-daemondir=[dirname]],[Directory for installing the DBUS daemon])) 73 74 75dnl DBUS_BUILD_TESTS controls unit tests built in to .c files 76dnl and also some stuff in the test/ subdir 77AM_CONDITIONAL(DBUS_BUILD_TESTS, test x$enable_tests = xyes) 78if test x$enable_tests = xyes; then 79 AC_DEFINE(DBUS_BUILD_TESTS,1,[Build test code]) 80fi 81 82if test x$enable_verbose_mode = xyes; then 83 AC_DEFINE(DBUS_ENABLE_VERBOSE_MODE,1,[Support a verbose mode]) 84fi 85 86if test x$enable_asserts = xno; then 87 AC_DEFINE(DBUS_DISABLE_ASSERT,1,[Disable assertion checking]) 88 AC_DEFINE(G_DISABLE_ASSERT,1,[Disable GLib assertion macros]) 89 R_DYNAMIC_LDFLAG="" 90else 91 # -rdynamic is needed for glibc's backtrace_symbols to work. 92 # No clue how much overhead this adds, but it's useful 93 # to do this on any assertion failure, 94 # so for now it's enabled anytime asserts are (currently not 95 # in production builds). 96 97 # To get -rdynamic you pass -export-dynamic to libtool. 98 AC_DEFINE(DBUS_BUILT_R_DYNAMIC,1,[whether -export-dynamic was passed to libtool]) 99 R_DYNAMIC_LDFLAG=-export-dynamic 100fi 101AC_SUBST(R_DYNAMIC_LDFLAG) 102 103if test x$enable_checks = xno; then 104 AC_DEFINE(DBUS_DISABLE_CHECKS,1,[Disable public API sanity checking]) 105 AC_DEFINE(G_DISABLE_CHECKS,1,[Disable GLib public API sanity checking]) 106fi 107 108#### gcc warning flags 109 110cc_supports_flag() { 111 AC_MSG_CHECKING(whether $CC supports "$@") 112 Cfile=/tmp/foo${$} 113 touch ${Cfile}.c 114 $CC -c "$@" ${Cfile}.c -o ${Cfile}.o >/dev/null 2>&1 115 rc=$? 116 rm -f ${Cfile}.c ${Cfile}.o 117 case $rc in 118 0) AC_MSG_RESULT(yes);; 119 *) AC_MSG_RESULT(no);; 120 esac 121 return $rc 122} 123 124if test "x$GCC" = "xyes"; then 125 changequote(,)dnl 126 case " $CFLAGS " in 127 *[\ \ ]-Wall[\ \ ]*) ;; 128 *) CFLAGS="$CFLAGS -Wall" ;; 129 esac 130 131 case " $CFLAGS " in 132 *[\ \ ]-Wchar-subscripts[\ \ ]*) ;; 133 *) CFLAGS="$CFLAGS -Wchar-subscripts" ;; 134 esac 135 136 case " $CFLAGS " in 137 *[\ \ ]-Wmissing-declarations[\ \ ]*) ;; 138 *) CFLAGS="$CFLAGS -Wmissing-declarations" ;; 139 esac 140 141 case " $CFLAGS " in 142 *[\ \ ]-Wmissing-prototypes[\ \ ]*) ;; 143 *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;; 144 esac 145 146 case " $CFLAGS " in 147 *[\ \ ]-Wnested-externs[\ \ ]*) ;; 148 *) CFLAGS="$CFLAGS -Wnested-externs" ;; 149 esac 150 151 case " $CFLAGS " in 152 *[\ \ ]-Wpointer-arith[\ \ ]*) ;; 153 *) CFLAGS="$CFLAGS -Wpointer-arith" ;; 154 esac 155 156 case " $CFLAGS " in 157 *[\ \ ]-Wcast-align[\ \ ]*) ;; 158 *) CFLAGS="$CFLAGS -Wcast-align" ;; 159 esac 160 161 case " $CFLAGS " in 162 *[\ \ ]-Wfloat-equal[\ \ ]*) ;; 163 *) if cc_supports_flag -Wfloat-equals; then 164 CFLAGS="$CFLAGS -Wfloat-equal" 165 fi 166 ;; 167 esac 168 169 case " $CFLAGS " in 170 *[\ \ ]-Wsign-compare[\ \ ]*) ;; 171 *) CFLAGS="$CFLAGS -Wsign-compare" ;; 172 esac 173 174 case " $CFLAGS " in 175 *[\ \ ]-Wdeclaration-after-statement[\ \ ]*) ;; 176 *) if cc_supports_flag -Wdeclaration-after-statement; then 177 CFLAGS="$CFLAGS -Wdeclaration-after-statement" 178 fi 179 ;; 180 esac 181 182 case " $CFLAGS " in 183 *[\ \ ]-fno-common[\ \ ]*) ;; 184 *) if cc_supports_flag -fno-common; then 185 CFLAGS="$CFLAGS -fno-common" 186 fi 187 ;; 188 esac 189 190 case " $CFLAGS " in 191 *[\ \ ]-fPIC[\ \ ]*) ;; 192 *) if cc_supports_flag -fPIC; then 193 CFLAGS="$CFLAGS -fPIC" 194 fi 195 ;; 196 esac 197 198 if test "x$enable_ansi" = "xyes"; then 199 case " $CFLAGS " in 200 *[\ \ ]-ansi[\ \ ]*) ;; 201 *) CFLAGS="$CFLAGS -ansi" ;; 202 esac 203 204 case " $CFLAGS " in 205 *[\ \ ]-D_POSIX_C_SOURCE*) ;; 206 *) CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=199309L" ;; 207 esac 208 209 case " $CFLAGS " in 210 *[\ \ ]-D_BSD_SOURCE[\ \ ]*) ;; 211 *) CFLAGS="$CFLAGS -D_BSD_SOURCE" ;; 212 esac 213 214 case " $CFLAGS " in 215 *[\ \ ]-pedantic[\ \ ]*) ;; 216 *) CFLAGS="$CFLAGS -pedantic" ;; 217 esac 218 fi 219 if test x$enable_gcov = xyes; then 220 case " $CFLAGS " in 221 *[\ \ ]-fprofile-arcs[\ \ ]*) ;; 222 *) CFLAGS="$CFLAGS -fprofile-arcs" ;; 223 esac 224 case " $CFLAGS " in 225 *[\ \ ]-ftest-coverage[\ \ ]*) ;; 226 *) CFLAGS="$CFLAGS -ftest-coverage" ;; 227 esac 228 229 ## remove optimization 230 CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*//g'` 231 fi 232 changequote([,])dnl 233else 234 if test x$enable_gcov = xyes; then 235 AC_MSG_ERROR([--enable-gcov can only be used with gcc]) 236 fi 237fi 238 239# Add -D_POSIX_PTHREAD_SEMANTICS if on Solaris 240# 241case $target_os in 242 solaris*) 243 CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS" ;; 244esac 245 246AM_PROG_LIBTOOL 247 248changequote(,)dnl 249# compress spaces in flags 250CFLAGS=`echo "$CFLAGS" | sed -e 's/ +/ /g'` 251CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/ +/ /g'` 252CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/ +/ /g'` 253changequote([,])dnl 254 255if test x$enable_gcov = xyes; then 256 ## so that config.h changes when you toggle gcov support 257 AC_DEFINE_UNQUOTED(DBUS_GCOV_ENABLED, 1, [Defined if gcov is enabled to force a rebuild due to config.h changing]) 258 259 AC_MSG_CHECKING([for gcc 3.3 version of gcov file format]) 260 have_gcc33_gcov=no 261 AC_RUN_IFELSE( [AC_LANG_PROGRAM( , [[ if (__GNUC__ >=3 && __GNUC_MINOR__ >= 3) exit (0); else exit (1); ]])], 262 have_gcc33_gcov=yes) 263 if test x$have_gcc33_gcov = xyes ; then 264 AC_DEFINE_UNQUOTED(DBUS_HAVE_GCC33_GCOV, 1, [Defined if we have gcc 3.3 and thus the new gcov format]) 265 fi 266 AC_MSG_RESULT($have_gcc33_gcov) 267fi 268AM_CONDITIONAL(DBUS_GCOV_ENABLED, test x$enable_gcov = xyes) 269 270#### Integer sizes 271 272AC_CHECK_SIZEOF(char) 273AC_CHECK_SIZEOF(short) 274AC_CHECK_SIZEOF(long) 275AC_CHECK_SIZEOF(int) 276AC_CHECK_SIZEOF(void *) 277AC_CHECK_SIZEOF(long long) 278AC_CHECK_SIZEOF(__int64) 279 280### See what our 64 bit type is called 281AC_MSG_CHECKING([64-bit integer type]) 282 283case 8 in 284$ac_cv_sizeof_int) 285 dbusint64=int 286 dbusint64_constant='(val)' 287 dbusuint64_constant='(val)' 288 ;; 289$ac_cv_sizeof_long) 290 dbusint64=long 291 dbusint64_constant='(val##L)' 292 dbusuint64_constant='(val##UL)' 293 ;; 294$ac_cv_sizeof_long_long) 295 dbusint64='long long' 296 dbusint64_constant='(val##LL)' 297 dbusuint64_constant='(val##ULL)' 298 ;; 299$ac_cv_sizeof___int64) 300 dbusint64=__int64 301 dbusint64_constant='(val##i64)' 302 dbusuint64_constant='(val##ui64)' 303 ;; 304esac 305 306if test -z "$dbusint64" ; then 307 DBUS_INT64_TYPE="no_int64_type_detected" 308 DBUS_HAVE_INT64=0 309 DBUS_INT64_CONSTANT= 310 DBUS_UINT64_CONSTANT= 311 AC_MSG_RESULT([none found]) 312else 313 DBUS_INT64_TYPE="$dbusint64" 314 DBUS_HAVE_INT64=1 315 DBUS_INT64_CONSTANT="$dbusint64_constant" 316 DBUS_UINT64_CONSTANT="$dbusuint64_constant" 317 AC_MSG_RESULT($DBUS_INT64_TYPE) 318fi 319 320AC_SUBST(DBUS_INT64_TYPE) 321AC_SUBST(DBUS_INT64_CONSTANT) 322AC_SUBST(DBUS_UINT64_CONSTANT) 323AC_SUBST(DBUS_HAVE_INT64) 324 325### see what 32-bit int is called 326AC_MSG_CHECKING([32-bit integer type]) 327 328case 4 in 329$ac_cv_sizeof_short) 330 dbusint32=int 331 ;; 332$ac_cv_sizeof_int) 333 dbusint32=int 334 ;; 335$ac_cv_sizeof_long) 336 dbusint32=long 337 ;; 338esac 339 340if test -z "$dbusint32" ; then 341 DBUS_INT32_TYPE="no_int32_type_detected" 342 AC_MSG_ERROR([No 32-bit integer type found]) 343else 344 DBUS_INT32_TYPE="$dbusint32" 345 AC_MSG_RESULT($DBUS_INT32_TYPE) 346fi 347 348AC_SUBST(DBUS_INT32_TYPE) 349 350### see what 16-bit int is called 351AC_MSG_CHECKING([16-bit integer type]) 352 353case 2 in 354$ac_cv_sizeof_short) 355 dbusint16=short 356 ;; 357$ac_cv_sizeof_int) 358 dbusint16=int 359 ;; 360esac 361 362if test -z "$dbusint16" ; then 363 DBUS_INT16_TYPE="no_int16_type_detected" 364 AC_MSG_ERROR([No 16-bit integer type found]) 365else 366 DBUS_INT16_TYPE="$dbusint16" 367 AC_MSG_RESULT($DBUS_INT16_TYPE) 368fi 369 370AC_SUBST(DBUS_INT16_TYPE) 371 372## byte order 373case $host_os in 374 darwin*) 375 # check at compile-time, so that it is possible to build universal 376 # (with multiple architectures at once on the compile line) 377 AH_VERBATIM([WORDS_BIGENDIAN_DARWIN], [ 378 /* Use the compiler-provided endianness defines to allow universal compiling. */ 379 #if defined(__BIG_ENDIAN__) 380 #define WORDS_BIGENDIAN 1 381 #endif 382 ]) 383 ;; 384 *) 385 AC_C_BIGENDIAN 386 ;; 387esac 388 389dnl ********************************** 390dnl *** va_copy checks (from GLib) *** 391dnl ********************************** 392dnl we currently check for all three va_copy possibilities, so we get 393dnl all results in config.log for bug reports. 394AC_CACHE_CHECK([for an implementation of va_copy()],dbus_cv_va_copy,[ 395 AC_LINK_IFELSE([#include <stdarg.h> 396 void f (int i, ...) { 397 va_list args1, args2; 398 va_start (args1, i); 399 va_copy (args2, args1); 400 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) 401 exit (1); 402 va_end (args1); va_end (args2); 403 } 404 int main() { 405 f (0, 42); 406 return 0; 407 }], 408 [dbus_cv_va_copy=yes], 409 [dbus_cv_va_copy=no]) 410]) 411AC_CACHE_CHECK([for an implementation of __va_copy()],dbus_cv___va_copy,[ 412 AC_LINK_IFELSE([#include <stdarg.h> 413 void f (int i, ...) { 414 va_list args1, args2; 415 va_start (args1, i); 416 __va_copy (args2, args1); 417 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) 418 exit (1); 419 va_end (args1); va_end (args2); 420 } 421 int main() { 422 f (0, 42); 423 return 0; 424 }], 425 [dbus_cv___va_copy=yes], 426 [dbus_cv___va_copy=no]) 427]) 428 429if test "x$dbus_cv_va_copy" = "xyes"; then 430 dbus_va_copy_func=va_copy 431else if test "x$dbus_cv___va_copy" = "xyes"; then 432 dbus_va_copy_func=__va_copy 433fi 434fi 435 436if test -n "$dbus_va_copy_func"; then 437 AC_DEFINE_UNQUOTED(DBUS_VA_COPY,$dbus_va_copy_func,[A 'va_copy' style function]) 438fi 439 440AC_LANG_PUSH(C) 441AC_CACHE_CHECK([whether va_lists can be copied by value], 442 dbus_cv_va_val_copy, 443 [AC_RUN_IFELSE([AC_LANG_PROGRAM( 444[[ 445 #include <stdarg.h> 446]], 447[[ 448 void f (int i, ...) { 449 va_list args1, args2; 450 va_start (args1, i); 451 args2 = args1; 452 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42) 453 exit (1); 454 va_end (args1); va_end (args2); 455 } 456 int main() { 457 f (0, 42); 458 return 0; 459 } 460]])], 461 [dbus_cv_va_val_copy=yes], 462 [dbus_cv_va_val_copy=no], 463 [dbus_cv_va_val_copy=yes]) 464]) 465AC_LANG_POP(C) 466 467if test "x$dbus_cv_va_val_copy" = "xno"; then 468 AC_DEFINE(DBUS_VA_COPY_AS_ARRAY,1, ['va_lists' cannot be copies as values]) 469fi 470 471 472#### Atomic integers (checks by Sebastian Wilhelmi for GLib) 473AC_MSG_CHECKING([whether to use inline assembler routines for atomic integers]) 474have_atomic_inc=no 475if test x"$GCC" = xyes; then 476 if test "x$enable_ansi" = "xyes"; then 477 AC_MSG_RESULT([no]) 478 else 479 case $host_cpu in 480 i386) 481 AC_MSG_RESULT([no]) 482 ;; 483 i?86) 484 case $host_os in 485 darwin*) 486 AC_MSG_RESULT([darwin]) 487 # check at compile-time, so that it is possible to build universal 488 # (with multiple architectures at once on the compile line) 489 AH_VERBATIM([DBUS_USE_ATOMIC_INT_486_DARWIN], [ 490 #if (defined(__i386__) || defined(__x86_64__)) 491 # define DBUS_USE_ATOMIC_INT_486 1 492 #endif 493 ]) 494 ;; 495 *) 496 AC_MSG_RESULT([i486]) 497 AC_DEFINE_UNQUOTED(DBUS_USE_ATOMIC_INT_486, 1, [Use atomic integer implementation for 486]) 498 ;; 499 esac 500 have_atomic_inc=yes 501 ;; 502 *) 503 AC_MSG_RESULT([no]) 504 ;; 505 esac 506 fi 507fi 508if test x$have_atomic_inc = xyes ; then 509 case $host_os in 510 darwin*) 511 AH_VERBATIM([DBUS_HAVE_ATOMIC_INT_DARWIN], [ 512 #if (defined(__i386__) || defined(__x86_64__)) 513 # define DBUS_HAVE_ATOMIC_INT 1 514 #endif 515 ]) 516 ;; 517 *) 518 AC_DEFINE_UNQUOTED(DBUS_HAVE_ATOMIC_INT, 1, [Some atomic integer implementation present]) 519 ;; 520 esac 521fi 522 523#### Various functions 524AC_CHECK_LIB(socket,socket) 525AC_CHECK_FUNC(gethostbyname,,[AC_CHECK_LIB(nsl,gethostbyname)]) 526 527AC_CHECK_FUNCS(vsnprintf vasprintf nanosleep usleep poll setenv unsetenv socketpair getgrouplist fpathconf) 528 529AC_MSG_CHECKING(for dirfd) 530AC_TRY_LINK([ 531#include <sys/types.h> 532#include <dirent.h> 533],[ 534DIR *dirp; 535dirp = opendir("."); 536dirfd(dirp); 537closedir(dirp); 538], 539dbus_have_dirfd=yes, dbus_have_dirfd=no) 540AC_MSG_RESULT($dbus_have_dirfd) 541if test "$dbus_have_dirfd" = yes; then 542 AC_DEFINE(HAVE_DIRFD,1,[Have dirfd function]) 543else 544 AC_MSG_CHECKING(for DIR *dirp->dd_fd) 545 AC_TRY_LINK([ 546#include <sys/types.h> 547#include <dirent.h> 548 ],[ 549DIR *dirp; 550int fd; 551dirp = opendir("."); 552fd = dirp->dd_fd; 553closedir(dirp); 554 ], 555 dbus_have_ddfd=yes, dbus_have_ddfd=no) 556 AC_MSG_RESULT($dbus_have_ddfd) 557 if test "$dbus_have_ddfd" = yes; then 558 AC_DEFINE(HAVE_DDFD,1,[Have the ddfd member of DIR]) 559 fi 560fi 561 562AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)]) 563 564AC_CHECK_HEADERS(errno.h) 565 566# checking for a posix version of getpwnam_r 567# if we are cross compiling and can not run the test 568# assume getpwnam_r is the posix version 569# it is up to the person cross compiling to change 570# this behavior if desired 571AC_LANG_PUSH(C) 572AC_CACHE_CHECK([for posix getpwnam_r], 573 ac_cv_func_posix_getpwnam_r, 574 [AC_RUN_IFELSE([AC_LANG_PROGRAM( 575[[ 576#include <errno.h> 577#include <pwd.h> 578]], 579[[ 580 char buffer[10000]; 581 struct passwd pwd, *pwptr = &pwd; 582 int error; 583 errno = 0; 584 error = getpwnam_r ("", &pwd, buffer, 585 sizeof (buffer), &pwptr); 586 return (error < 0 && errno == ENOSYS) 587 || error == ENOSYS; 588]])], 589 [ac_cv_func_posix_getpwnam_r=yes], 590 [ac_cv_func_posix_getpwnam_r=no], 591 [ac_cv_func_posix_getpwnam_r=yes] 592)]) 593AC_LANG_POP(C) 594 595if test "$ac_cv_func_posix_getpwnam_r" = yes; then 596 AC_DEFINE(HAVE_POSIX_GETPWNAM_R,1, 597 [Have POSIX function getpwnam_r]) 598else 599 AC_CACHE_CHECK([for nonposix getpwnam_r], 600 ac_cv_func_nonposix_getpwnam_r, 601 [AC_TRY_LINK([#include <pwd.h>], 602 [char buffer[10000]; 603 struct passwd pwd; 604 getpwnam_r ("", &pwd, buffer, 605 sizeof (buffer));], 606 [ac_cv_func_nonposix_getpwnam_r=yes], 607 [ac_cv_func_nonposix_getpwnam_r=no])]) 608 if test "$ac_cv_func_nonposix_getpwnam_r" = yes; then 609 AC_DEFINE(HAVE_NONPOSIX_GETPWNAM_R,1, 610 [Have non-POSIX function getpwnam_r]) 611 fi 612fi 613 614dnl check for socklen_t 615AC_MSG_CHECKING(whether socklen_t is defined) 616AC_TRY_COMPILE([ 617#include <sys/types.h> 618#include <sys/socket.h> 619#include <netdb.h> 620],[ 621socklen_t foo; 622foo = 1; 623],dbus_have_socklen_t=yes,dbus_have_socklen_t=no) 624AC_MSG_RESULT($dbus_have_socklen_t) 625 626if test "x$dbus_have_socklen_t" = "xyes"; then 627 AC_DEFINE(HAVE_SOCKLEN_T,1,[Have socklen_t type]) 628fi 629 630dnl check for writev header and writev function so we're 631dnl good to go if HAVE_WRITEV gets defined. 632AC_CHECK_HEADERS(sys/uio.h, [AC_CHECK_FUNCS(writev)]) 633 634dnl needed on darwin for NAME_MAX 635AC_CHECK_HEADERS(sys/syslimits.h) 636 637dnl check for flavours of varargs macros (test from GLib) 638AC_MSG_CHECKING(for ISO C99 varargs macros in C) 639AC_TRY_COMPILE([],[ 640int a(int p1, int p2, int p3); 641#define call_a(...) a(1,__VA_ARGS__) 642call_a(2,3); 643],dbus_have_iso_c_varargs=yes,dbus_have_iso_c_varargs=no) 644AC_MSG_RESULT($dbus_have_iso_c_varargs) 645 646AC_MSG_CHECKING(for GNUC varargs macros) 647AC_TRY_COMPILE([],[ 648int a(int p1, int p2, int p3); 649#define call_a(params...) a(1,params) 650call_a(2,3); 651],dbus_have_gnuc_varargs=yes,dbus_have_gnuc_varargs=no) 652AC_MSG_RESULT($dbus_have_gnuc_varargs) 653 654dnl Output varargs tests 655if test x$dbus_have_iso_c_varargs = xyes; then 656 AC_DEFINE(HAVE_ISO_VARARGS,1,[Have ISO C99 varargs macros]) 657fi 658if test x$dbus_have_gnuc_varargs = xyes; then 659 AC_DEFINE(HAVE_GNUC_VARARGS,1,[Have GNU-style varargs macros]) 660fi 661 662dnl Check for various credentials. 663AC_MSG_CHECKING(for struct cmsgcred) 664AC_TRY_COMPILE([ 665#include <sys/types.h> 666#include <sys/socket.h> 667],[ 668struct cmsgcred cred; 669 670cred.cmcred_pid = 0; 671],dbus_have_struct_cmsgcred=yes,dbus_have_struct_cmsgcred=no) 672AC_MSG_RESULT($dbus_have_struct_cmsgcred) 673 674if test x$dbus_have_struct_cmsgcred = xyes; then 675 AC_DEFINE(HAVE_CMSGCRED,1,[Have cmsgcred structure]) 676fi 677 678AC_CHECK_FUNCS(getpeerucred getpeereid) 679 680#### Abstract sockets 681 682AC_LANG_PUSH(C) 683AC_CACHE_CHECK([abstract socket namespace], 684 ac_cv_have_abstract_sockets, 685 [AC_RUN_IFELSE([AC_LANG_PROGRAM( 686[[ 687#include <sys/types.h> 688#include <stdlib.h> 689#include <string.h> 690#include <stdio.h> 691#include <sys/socket.h> 692#include <sys/un.h> 693#include <errno.h> 694]], 695[[ 696 int listen_fd; 697 struct sockaddr_un addr; 698 699 listen_fd = socket (PF_UNIX, SOCK_STREAM, 0); 700 701 if (listen_fd < 0) 702 { 703 fprintf (stderr, "socket() failed: %s\n", strerror (errno)); 704 exit (1); 705 } 706 707 memset (&addr, '\0', sizeof (addr)); 708 addr.sun_family = AF_UNIX; 709 strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test"); 710 addr.sun_path[0] = '\0'; /* this is what makes it abstract */ 711 712 if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0) 713 { 714 fprintf (stderr, "Abstract socket namespace bind() failed: %s\n", 715 strerror (errno)); 716 exit (1); 717 } 718 else 719 exit (0); 720]])], 721 [ac_cv_have_abstract_sockets=yes], 722 [ac_cv_have_abstract_sockets=no] 723)]) 724AC_LANG_POP(C) 725 726if test x$enable_abstract_sockets = xyes; then 727 if test x$ac_cv_have_abstract_sockets = xno; then 728 AC_MSG_ERROR([Abstract sockets explicitly required, and support not detected.]) 729 fi 730fi 731 732if test x$enable_abstract_sockets = xno; then 733 ac_cv_have_abstract_sockets=no; 734fi 735 736if test x$ac_cv_have_abstract_sockets = xyes ; then 737 DBUS_PATH_OR_ABSTRACT=abstract 738 AC_DEFINE(HAVE_ABSTRACT_SOCKETS,1,[Have abstract socket namespace]) 739else 740 DBUS_PATH_OR_ABSTRACT=path 741fi 742 743# this is used in addresses to prefer abstract, e.g. 744# unix:path=/foo or unix:abstract=/foo 745AC_SUBST(DBUS_PATH_OR_ABSTRACT) 746 747#### Sort out XML library 748 749# see what we have 750AC_CHECK_LIB(expat, XML_ParserCreate_MM, 751 [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ], 752 have_expat=false) 753 754PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.6.0, have_libxml=true, have_libxml=false) 755 756# see what we want to use 757dbus_use_libxml=false 758dbus_use_expat=false 759if test x$with_xml = xexpat; then 760 dbus_use_expat=true 761 if ! $have_expat ; then 762 AC_MSG_ERROR([Explicitly requested expat but expat not found]) 763 fi 764elif test x$with_xml = xlibxml; then 765 dbus_use_libxml=true 766 if ! $have_libxml ; then 767 AC_MSG_ERROR([Explicitly requested libxml but libxml not found]) 768 fi 769else 770 ### expat is the default because libxml can't currently survive 771 ### our brutal OOM-handling unit test setup. 772 ### http://bugzilla.gnome.org/show_bug.cgi?id=109368 773 if $have_expat ; then 774 with_xml=expat 775 dbus_use_expat=true 776 elif $have_libxml ; then 777 with_xml=libxml 778 dbus_use_libxml=true 779 else 780 AC_MSG_ERROR([No XML library found, check config.log for failed attempts]) 781 fi 782fi 783 784AM_CONDITIONAL(DBUS_USE_EXPAT, $dbus_use_expat) 785AM_CONDITIONAL(DBUS_USE_LIBXML, $dbus_use_libxml) 786 787if $dbus_use_expat; then 788 XML_LIBS=-lexpat 789 XML_CFLAGS= 790fi 791if $dbus_use_libxml; then 792 XML_LIBS=$LIBXML_LIBS 793 XML_CFLAGS=$LIBXML_CFLAGS 794fi 795 796# Thread lib detection 797AC_CHECK_FUNC(pthread_cond_timedwait,,[AC_CHECK_LIB(pthread,pthread_cond_timedwait, 798 [THREAD_LIBS="-lpthread"])]) 799 800# SELinux detection 801if test x$enable_selinux = xno ; then 802 have_selinux=no; 803else 804 # See if we have SELinux library 805 AC_CHECK_LIB(selinux, is_selinux_enabled, 806 have_selinux=yes, have_selinux=no) 807 808 # see if we have the SELinux header with the new D-Bus stuff in it 809 if test x$have_selinux = xyes ; then 810 AC_MSG_CHECKING([for DBUS Flask permissions in selinux/av_permissions.h]) 811 AC_TRY_COMPILE([#include <selinux/av_permissions.h>], 812 [#ifdef DBUS__ACQUIRE_SVC return 0; 813 #else 814 #error DBUS__ACQUIRE_SVC not defined 815 #endif], 816 have_selinux=yes, have_selinux=no) 817 AC_MSG_RESULT($have_selinux) 818 fi 819 820 if test x$enable_selinux = xauto ; then 821 if test x$have_selinux = xno ; then 822 AC_MSG_WARN([Sufficiently new SELinux library not found]) 823 fi 824 else 825 if test x$have_selinux = xno ; then 826 AC_MSG_ERROR([SElinux explicitly required, and SELinux library not found]) 827 fi 828 fi 829fi 830 831AM_CONDITIONAL(HAVE_SELINUX, test x$have_selinux = xyes) 832 833if test x$have_selinux = xyes ; then 834 # the selinux code creates threads 835 # which requires libpthread even on linux 836 AC_CHECK_FUNC(pthread_create,,[AC_CHECK_LIB(pthread,pthread_create, 837 [SELINUX_THREAD_LIBS="-lpthread"])]) 838 839 SELINUX_LIBS="-lselinux $SELINUX_THREAD_LIBS" 840 AC_DEFINE(HAVE_SELINUX,1,[SELinux support]) 841else 842 SELINUX_LIBS= 843fi 844 845# dnotify checks 846if test x$enable_dnotify = xno ; then 847 have_dnotify=no; 848else 849 if test x$target_os = xlinux-gnu -o x$target_os = xlinux; then 850 have_dnotify=yes; 851 else 852 have_dnotify=no; 853 fi 854fi 855 856dnl check if dnotify backend is enabled 857if test x$have_dnotify = xyes; then 858 AC_DEFINE(DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX,1,[Use dnotify on Linux]) 859fi 860 861AM_CONDITIONAL(DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX, test x$have_dnotify = xyes) 862 863# kqueue checks 864if test x$enable_kqueue = xno ; then 865 have_kqueue=no 866else 867 have_kqueue=yes 868 AC_CHECK_HEADER(sys/event.h, , have_kqueue=no) 869 AC_CHECK_FUNC(kqueue, , have_kqueue=no) 870 871 if test x$enable_kqueue = xyes -a x$have_kqueue = xno; then 872 AC_MSG_ERROR(kqueue support explicitly enabled but not available) 873 fi 874fi 875 876dnl check if kqueue backend is enabled 877if test x$have_kqueue = xyes; then 878 AC_DEFINE(DBUS_BUS_ENABLE_KQUEUE,1,[Use kqueue]) 879fi 880 881AM_CONDITIONAL(DBUS_BUS_ENABLE_KQUEUE, test x$have_kqueue = xyes) 882 883dnl console owner file 884if test x$enable_console_owner_file = xno ; then 885 have_console_owner_file=no; 886else 887 case $target_os in 888 solaris*) 889 have_console_owner_file=yes; 890 AC_DEFINE(HAVE_CONSOLE_OWNER_FILE,1,[Have console owner file]) 891 ;; 892 *) 893 have_console_owner_file=no;; 894 esac 895fi 896 897AM_CONDITIONAL(HAVE_CONSOLE_OWNER_FILE, test x$have_console_owner_file = xyes) 898 899#### Set up final flags 900DBUS_CLIENT_CFLAGS= 901DBUS_CLIENT_LIBS="$THREAD_LIBS" 902AC_SUBST(DBUS_CLIENT_CFLAGS) 903AC_SUBST(DBUS_CLIENT_LIBS) 904 905DBUS_BUS_CFLAGS=$XML_CFLAGS 906DBUS_BUS_LIBS="$XML_LIBS $SELINUX_LIBS $INTLLIBS $THREAD_LIBS" 907AC_SUBST(DBUS_BUS_CFLAGS) 908AC_SUBST(DBUS_BUS_LIBS) 909 910DBUS_TEST_CFLAGS= 911DBUS_TEST_LIBS="$THREAD_LIBS" 912AC_SUBST(DBUS_TEST_CFLAGS) 913AC_SUBST(DBUS_TEST_LIBS) 914 915### X11 detection 916AC_PATH_XTRA 917 918## for now enable_x11 just tracks have_x11, 919## there's no --enable-x11 920if test x$no_x = xyes ; then 921 have_x11=no 922 enable_x11=no 923else 924 have_x11=yes 925 enable_x11=yes 926fi 927 928if test x$enable_x11 = xyes ; then 929 AC_DEFINE(DBUS_BUILD_X11,1,[Build X11-dependent code]) 930 DBUS_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" 931 DBUS_X_CFLAGS="$X_CFLAGS" 932else 933 DBUS_X_LIBS= 934 DBUS_X_CFLAGS= 935fi 936 937AC_SUBST(DBUS_X_CFLAGS) 938AC_SUBST(DBUS_X_LIBS) 939 940### Doxygen Documentation 941 942AC_PATH_PROG(DOXYGEN, doxygen, no) 943 944AC_MSG_CHECKING([whether to build Doxygen documentation]) 945 946if test x$DOXYGEN = xno ; then 947 have_doxygen=no 948else 949 have_doxygen=yes 950fi 951 952if test x$enable_doxygen_docs = xauto ; then 953 if test x$have_doxygen = xno ; then 954 enable_doxygen_docs=no 955 else 956 enable_doxygen_docs=yes 957 fi 958fi 959 960if test x$enable_doxygen_docs = xyes; then 961 if test x$have_doxygen = xno; then 962 AC_MSG_ERROR([Building Doxygen docs explicitly required, but Doxygen not found]) 963 fi 964fi 965 966AM_CONDITIONAL(DBUS_DOXYGEN_DOCS_ENABLED, test x$enable_doxygen_docs = xyes) 967AC_MSG_RESULT(yes) 968 969### XML Documentation 970 971AC_PATH_PROG(XMLTO, xmlto, no) 972 973AC_MSG_CHECKING([whether to build XML documentation]) 974 975if test x$XMLTO = xno ; then 976 have_xmlto=no 977else 978 have_xmlto=yes 979fi 980 981if test x$enable_xml_docs = xauto ; then 982 if test x$have_xmlto = xno ; then 983 enable_xml_docs=no 984 else 985 enable_xml_docs=yes 986 fi 987fi 988 989if test x$enable_xml_docs = xyes; then 990 if test x$have_xmlto = xno; then 991 AC_MSG_ERROR([Building XML docs explicitly required, but xmlto not found]) 992 fi 993fi 994 995AM_CONDITIONAL(DBUS_XML_DOCS_ENABLED, test x$enable_xml_docs = xyes) 996AC_MSG_RESULT(yes) 997 998#### Have to go $localstatedir->$prefix/var->/usr/local/var 999#### someone please fix this a better way... 1000 1001#### find the actual value for $prefix that we'll end up with 1002## (I know this is broken and should be done in the Makefile, but 1003## that's a major pain and almost nobody actually seems to care) 1004REAL_PREFIX= 1005if test "x$prefix" = "xNONE"; then 1006 REAL_PREFIX=$ac_default_prefix 1007else 1008 REAL_PREFIX=$prefix 1009fi 1010 1011## temporarily change prefix and exec_prefix 1012old_prefix=$prefix 1013prefix=$REAL_PREFIX 1014 1015if test "x$exec_prefix" = xNONE ; then 1016 REAL_EXEC_PREFIX=$REAL_PREFIX 1017else 1018 REAL_EXEC_PREFIX=$exec_prefix 1019fi 1020old_exec_prefix=$exec_prefix 1021exec_prefix=$REAL_EXEC_PREFIX 1022 1023## eval everything 1024LOCALSTATEDIR_TMP="$localstatedir" 1025EXPANDED_LOCALSTATEDIR=`eval echo $LOCALSTATEDIR_TMP` 1026AC_SUBST(EXPANDED_LOCALSTATEDIR) 1027 1028SYSCONFDIR_TMP="$sysconfdir" 1029EXPANDED_SYSCONFDIR=`eval echo $SYSCONFDIR_TMP` 1030AC_SUBST(EXPANDED_SYSCONFDIR) 1031 1032BINDIR_TMP="$bindir" 1033EXPANDED_BINDIR=`eval echo $BINDIR_TMP` 1034AC_SUBST(EXPANDED_BINDIR) 1035 1036LIBDIR_TMP="$libdir" 1037EXPANDED_LIBDIR=`eval echo $LIBDIR_TMP` 1038AC_SUBST(EXPANDED_LIBDIR) 1039 1040DATADIR_TMP="$datadir" 1041EXPANDED_DATADIR=`eval echo $DATADIR_TMP` 1042AC_SUBST(EXPANDED_DATADIR) 1043 1044## put prefix and exec_prefix back 1045prefix=$old_prefix 1046exec_prefix=$old_exec_prefix 1047 1048#### Check our operating system 1049operating_system=unknown 1050if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then 1051 operating_system=redhat 1052fi 1053 1054if test -f /etc/slackware-version || test -f $EXPANDED_SYSCONFDIR/slackware-version ; then 1055 operating_system=slackware 1056fi 1057 1058#### Sort out init scripts 1059 1060if test x$with_init_scripts = x; then 1061 if test xredhat = x$operating_system ; then 1062 with_init_scripts=redhat 1063 else 1064 if test xslackware = x$operating_system ; then 1065 with_init_scripts=slackware 1066 else 1067 with_init_scripts=none 1068 fi 1069 fi 1070fi 1071 1072AM_CONDITIONAL(DBUS_INIT_SCRIPTS_RED_HAT, test x$with_init_scripts = xredhat) 1073 1074AM_CONDITIONAL(DBUS_INIT_SCRIPTS_SLACKWARE, test x$with_init_scripts = xslackware) 1075 1076##### Set up location for system bus socket 1077if ! test -z "$with_system_socket"; then 1078 DBUS_SYSTEM_SOCKET=$with_system_socket 1079else 1080 DBUS_SYSTEM_SOCKET=${EXPANDED_LOCALSTATEDIR}/run/dbus/system_bus_socket 1081fi 1082 1083AC_SUBST(DBUS_SYSTEM_SOCKET) 1084AC_DEFINE_UNQUOTED(DBUS_SYSTEM_SOCKET,"$DBUS_SYSTEM_SOCKET",[The name of the socket the system bus listens on by default]) 1085 1086## system bus only listens on local domain sockets, and never 1087## on an abstract socket (so only root can create the socket) 1088DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="unix:path=$DBUS_SYSTEM_SOCKET" 1089AC_SUBST(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS) 1090AC_DEFINE_UNQUOTED(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS, "$DBUS_SYSTEM_BUS_DEFAULT_ADDRESS",[The default D-Bus address of the system bus]) 1091 1092#### Set up the pid file 1093if ! test -z "$with_system_pid_file"; then 1094 DBUS_SYSTEM_PID_FILE=$with_system_pid_file 1095elif test x$with_init_scripts = xredhat ; then 1096 DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/messagebus.pid 1097else 1098 DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/dbus/pid 1099fi 1100 1101AC_SUBST(DBUS_SYSTEM_PID_FILE) 1102 1103#### Directory to check for console ownership 1104if ! test -z "$with_console_auth_dir"; then 1105 DBUS_CONSOLE_AUTH_DIR=$with_console_auth_dir 1106else 1107 DBUS_CONSOLE_AUTH_DIR=/var/run/console/ 1108fi 1109 1110AC_SUBST(DBUS_CONSOLE_AUTH_DIR) 1111AC_DEFINE_UNQUOTED(DBUS_CONSOLE_AUTH_DIR, "$DBUS_CONSOLE_AUTH_DIR", [Directory to check for console ownerhip]) 1112 1113#### File to check for console ownership 1114if test x$have_console_owner_file = xyes; then 1115 if ! test -z "$with_console_owner_file"; then 1116 DBUS_CONSOLE_OWNER_FILE=$with_console_owner_file 1117 else 1118 DBUS_CONSOLE_OWNER_FILE=/dev/console 1119 fi 1120else 1121 DBUS_CONSOLE_OWNER_FILE= 1122fi 1123 1124AC_SUBST(DBUS_CONSOLE_OWNER_FILE) 1125AC_DEFINE_UNQUOTED(DBUS_CONSOLE_OWNER_FILE, "$DBUS_CONSOLE_OWNER_FILE", [File to check for console ownerhip]) 1126 1127#### User to start the system bus as 1128if test -z "$with_dbus_user" ; then 1129 DBUS_USER=messagebus 1130else 1131 DBUS_USER=$with_dbus_user 1132fi 1133AC_SUBST(DBUS_USER) 1134AC_DEFINE_UNQUOTED(DBUS_USER,"$DBUS_USER", [User for running the system BUS daemon]) 1135 1136#### Direcotry to install data files into 1137DBUS_DATADIR=$EXPANDED_DATADIR 1138AC_SUBST(DBUS_DATADIR) 1139AC_DEFINE_UNQUOTED(DBUS_DATADIR,"$DBUS_DATADIR", [Directory for installing DBUS data files]) 1140 1141#### Directory to install dbus-daemon 1142if test -z "$with_dbus_daemondir" ; then 1143 DBUS_DAEMONDIR=$EXPANDED_BINDIR 1144else 1145 DBUS_DAEMONDIR=$with_dbus_daemondir 1146fi 1147AC_SUBST(DBUS_DAEMONDIR) 1148AC_DEFINE_UNQUOTED(DBUS_DAEMONDIR,"$DBUS_DAEMONDIR", [Directory for installing the DBUS daemon]) 1149 1150#### Directory to install the other binaries 1151DBUS_BINDIR=$EXPANDED_BINDIR 1152AC_SUBST(DBUS_BINDIR) 1153AC_DEFINE_UNQUOTED(DBUS_BINDIR,"$DBUS_BINDIR", [Directory for installing the binaries]) 1154 1155#### Tell tests where to find certain stuff in builddir 1156 1157DBUS_PWD=`pwd` 1158AC_DEFUN([TEST_PATH], [ 1159TEST_$1=${DBUS_PWD}/test/$2 1160AC_DEFINE_UNQUOTED(TEST_$1, "$TEST_$1", 1161 [Full path to test file test/$2 in builddir]) 1162AC_SUBST(TEST_$1) 1163]) 1164 1165TEST_PATH(SERVICE_DIR, data/valid-service-files) 1166TEST_PATH(SERVICE_BINARY, test-service) 1167TEST_PATH(SHELL_SERVICE_BINARY, test-shell-service) 1168TEST_PATH(EXIT_BINARY, test-exit) 1169TEST_PATH(SEGFAULT_BINARY, test-segfault) 1170TEST_PATH(SLEEP_FOREVER_BINARY, test-sleep-forever) 1171 1172AC_DEFINE_UNQUOTED(TEST_BUS_BINARY, "$DBUS_PWD/bus/dbus-daemon", 1173 [Full path to the daemon in the builddir]) 1174AC_SUBST(TEST_BUS_BINARY) 1175 1176#### Find socket directories 1177if ! test -z "$TMPDIR" ; then 1178 DEFAULT_SOCKET_DIR=$TMPDIR 1179elif ! test -z "$TEMP" ; then 1180 DEFAULT_SOCKET_DIR=$TEMP 1181elif ! test -z "$TMP" ; then 1182 DEFAULT_SOCKET_DIR=$TMP 1183else 1184 DEFAULT_SOCKET_DIR=/tmp 1185fi 1186 1187if ! test -z "$with_test_socket_dir" ; then 1188 TEST_SOCKET_DIR="$with_test_socket_dir" 1189else 1190 TEST_SOCKET_DIR=$DEFAULT_SOCKET_DIR 1191fi 1192AC_SUBST(TEST_SOCKET_DIR) 1193AC_DEFINE_UNQUOTED(DBUS_TEST_SOCKET_DIR, "$TEST_SOCKET_DIR", [Where to put test sockets]) 1194 1195if ! test -z "$with_session_socket_dir" ; then 1196 DBUS_SESSION_SOCKET_DIR="$with_session_socket_dir" 1197else 1198 DBUS_SESSION_SOCKET_DIR=$DEFAULT_SOCKET_DIR 1199fi 1200AC_DEFINE_UNQUOTED(DBUS_SESSION_SOCKET_DIR, "$DBUS_SESSION_SOCKET_DIR", [Where per-session bus puts its sockets]) 1201AC_SUBST(DBUS_SESSION_SOCKET_DIR) 1202 1203AC_OUTPUT([ 1204Doxyfile 1205dbus/dbus-arch-deps.h 1206bus/system.conf 1207bus/session.conf 1208bus/messagebus 1209bus/rc.messagebus 1210bus/dbus-daemon.1 1211Makefile 1212dbus/Makefile 1213bus/Makefile 1214tools/Makefile 1215test/Makefile 1216test/name-test/Makefile 1217doc/Makefile 1218dbus-1.pc 1219test/data/valid-config-files/debug-allow-all.conf 1220test/data/valid-config-files/debug-allow-all-sha1.conf 1221test/data/valid-service-files/debug-echo.service 1222test/data/valid-service-files/debug-segfault.service 1223test/data/valid-service-files/debug-shell-echo-success.service 1224test/data/valid-service-files/debug-shell-echo-fail.service 1225]) 1226 1227dnl ========================================================================== 1228echo " 1229 D-Bus $VERSION 1230 ============== 1231 1232 prefix: ${prefix} 1233 exec_prefix: ${exec_prefix} 1234 libdir: ${EXPANDED_LIBDIR} 1235 bindir: ${EXPANDED_BINDIR} 1236 sysconfdir: ${EXPANDED_SYSCONFDIR} 1237 localstatedir: ${EXPANDED_LOCALSTATEDIR} 1238 datadir: ${EXPANDED_DATADIR} 1239 source code location: ${srcdir} 1240 compiler: ${CC} 1241 cflags: ${CFLAGS} 1242 cppflags: ${CPPFLAGS} 1243 cxxflags: ${CXXFLAGS} 1244 64-bit int: ${DBUS_INT64_TYPE} 1245 32-bit int: ${DBUS_INT32_TYPE} 1246 16-bit int: ${DBUS_INT16_TYPE} 1247 Doxygen: ${DOXYGEN} 1248 xmlto: ${XMLTO}" 1249 1250echo " 1251 Maintainer mode: ${USE_MAINTAINER_MODE} 1252 gcc coverage profiling: ${enable_gcov} 1253 Building unit tests: ${enable_tests} 1254 Building verbose mode: ${enable_verbose_mode} 1255 Building assertions: ${enable_asserts} 1256 Building checks: ${enable_checks} 1257 Building SELinux support: ${have_selinux} 1258 Building dnotify support: ${have_dnotify} 1259 Building X11 code: ${enable_x11} 1260 Building Doxygen docs: ${enable_doxygen_docs} 1261 Building XML docs: ${enable_xml_docs} 1262 Gettext libs (empty OK): ${INTLLIBS} 1263 Using XML parser: ${with_xml} 1264 Init scripts style: ${with_init_scripts} 1265 Abstract socket names: ${ac_cv_have_abstract_sockets} 1266 System bus socket: ${DBUS_SYSTEM_SOCKET} 1267 System bus address: ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS} 1268 System bus PID file: ${DBUS_SYSTEM_PID_FILE} 1269 Session bus socket dir: ${DBUS_SESSION_SOCKET_DIR} 1270 Console auth dir: ${DBUS_CONSOLE_AUTH_DIR} 1271 Console owner file: ${have_console_owner_file} 1272 Console owner file path: ${DBUS_CONSOLE_OWNER_FILE} 1273 System bus user: ${DBUS_USER} 1274 Session bus services dir: ${EXPANDED_DATADIR}/dbus-1/services 1275 'make check' socket dir: ${TEST_SOCKET_DIR} 1276" 1277 1278if test x$enable_tests = xyes; then 1279 echo "NOTE: building with unit tests increases the size of the installed library and renders it insecure." 1280fi 1281if test x$enable_tests = xyes -a x$enable_asserts = xno; then 1282 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)" 1283fi 1284if test x$enable_gcov = xyes; then 1285 echo "NOTE: building with coverage profiling is definitely for developers only." 1286fi 1287if test x$enable_verbose_mode = xyes; then 1288 echo "NOTE: building with verbose mode increases library size, may slightly increase security risk, and decreases performance." 1289fi 1290if test x$enable_asserts = xyes; then 1291 echo "NOTE: building with assertions increases library size and decreases performance." 1292fi 1293if test x$enable_checks = xno; then 1294 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." 1295fi 1296