X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=configure.ac;h=d92acddc1ba9a2d71254b59dd0be4d73d5b72857;hb=04c58b9e5fbdf3acc7565f989e5fcd11f0c23c57;hp=c80fcfcbac3f3beff168ad50636b605c9f9a443e;hpb=134701b758d834eda139843fcb90c144b57a08b0;p=platform%2Fupstream%2Fdbus.git diff --git a/configure.ac b/configure.ac index c80fcfc..d92acdd 100644 --- a/configure.ac +++ b/configure.ac @@ -156,6 +156,7 @@ AC_ARG_ENABLE(console-owner-file, AS_HELP_STRING([--enable-console-owner-file],[ AC_ARG_ENABLE(userdb-cache, AS_HELP_STRING([--enable-userdb-cache],[build with userdb-cache support]),enable_userdb_cache=$enableval,enable_userdb_cache=yes) AC_ARG_ENABLE(launchd, AS_HELP_STRING([--enable-launchd],[build with launchd auto-launch support]),enable_launchd=$enableval,enable_launchd=auto) AC_ARG_ENABLE(systemd, AS_HELP_STRING([--enable-systemd],[build with systemd at_console support]),enable_systemd=$enableval,enable_systemd=auto) +AC_ARG_ENABLE(kdbus-transport, AS_HELP_STRING([--enable-kdbus-transport],[build with kdbus transport support]),enable_kdbus_transport=$enableval,enable_kdbus_transport=no) AC_ARG_WITH(init-scripts, AS_HELP_STRING([--with-init-scripts=[redhat]],[Style of init scripts to install])) AC_ARG_WITH(session-socket-dir, AS_HELP_STRING([--with-session-socket-dir=[dirname]],[Where to put sockets for the per-login-session message bus])) @@ -210,7 +211,8 @@ AC_DEFINE([GLIB_VERSION_MAX_ALLOWED], [GLIB_VERSION_2_32], [Prevent post-2.32 AP with_glib=yes -if test "x$enable_modular_tests" != xno; then +AS_IF([test "x$enable_modular_tests" != xno], + [ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.24, gio-2.0 >= 2.24], [], [if test "x$enable_modular_tests" = xyes; then @@ -219,16 +221,25 @@ if test "x$enable_modular_tests" != xno; then else # assumed to be "auto" with_glib=no fi]) - # If dbus-gmain.[ch] returned to libdbus then we wouldn't need this - PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1], + ], + [with_glib=no]) + +# Not required, because we can use internal APIs (but that makes the +# "installable tests" less useful as integration tests) +AC_ARG_WITH([dbus_glib], + [AS_HELP_STRING([--with-dbus-glib], [Use dbus-glib for regression tests])], + [], + [with_dbus_glib=auto]) +AS_IF([test "x$with_dbus_glib" != xno], + [PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1], [], - [if test "x$enable_modular_tests" = xyes; then - AC_MSG_NOTICE([Full test coverage (--enable-modular-tests=yes or --enable-tests=yes) requires dbus-glib]) - AC_MSG_ERROR([$DBUS_GLIB_ERRORS]) - else # assumed to be "auto" - with_glib=no - fi]) -fi + [AS_IF([test "x$with_dbus_glib" = xyes], + dnl specifically requested, but not found + [AC_MSG_ERROR([$DBUS_GLIB_ERRORS])], + dnl else: assumed to be "auto" + [with_dbus_glib=no])])]) +AM_CONDITIONAL([DBUS_WITH_DBUS_GLIB], [test "x$with_dbus_glib" != xno]) + if test "x$enable_modular_tests" != xno; then AC_DEFINE([DBUS_ENABLE_MODULAR_TESTS], [1], [Define to build independent test binaries]) @@ -273,6 +284,11 @@ if test x$enable_asserts = xno; then AC_DEFINE(DBUS_DISABLE_ASSERT,1,[Disable assertion checking]) DISABLE_UNUSED_WARNINGS="unused-label" R_DYNAMIC_LDFLAG="" + if test x$enable_embedded_tests = xyes; then + DISABLE_UNUSED_WARNINGS="$DISABLE_UNUSED_WARNINGS \ + unused-but-set-variable unused-variable \ + unused-function" + fi else # -rdynamic is needed for glibc's backtrace_symbols to work. # No clue how much overhead this adds, but it's useful @@ -1256,10 +1272,23 @@ AC_DEFINE_UNQUOTED([DBUS_DEFAULT_MESSAGE_UNIX_FDS], [Default for dbus_connection_get_max_message_unix_fds()]) AC_SUBST([DEFAULT_MESSAGE_UNIX_FDS]) +### kdbus support +if test x$enable_kdbus_transport = xyes; then + KDBUS_LIBS= + #"-lcrypto" + #AC_SUBST([KDBUS_LIBS]) + AC_DEFINE(ENABLE_KDBUS_TRANSPORT,1,[Enable kdbus transport support]) +else + KDBUS_LIBS= +fi + +AM_CONDITIONAL([ENABLE_KDBUS_TRANSPORT], [test x$enable_kdbus_transport = xyes]) + #### Set up final flags -LIBDBUS_LIBS="$THREAD_LIBS $NETWORK_libs" +LIBDBUS_LIBS="$THREAD_LIBS $NETWORK_libs $KDBUS_LIBS" AC_SUBST([LIBDBUS_LIBS]) + ### X11 detection DBUS_X_LIBS= DBUS_X_CFLAGS= @@ -1724,6 +1753,9 @@ elif test x$dbus_win = xyes; then # branch of the conditional because the default might conceivably # change (see #38201) DBUS_SESSION_BUS_CONNECT_ADDRESS="autolaunch:" +elif test x$enable_kdbus_transport = xyes; then + # Autolaunching kdbus bus instead of the ordinary socket + DBUS_SESSION_BUS_CONNECT_ADDRESS="autolaunch:scope=kdbus" else # The default on all other Unix platforms (notably Linux) # is to use auto-launching - this works a bit differently on Mac OS X @@ -1834,6 +1866,7 @@ echo " Building embedded tests: ${enable_embedded_tests} Building modular tests: ${enable_modular_tests} - with GLib: ${with_glib} + - with dbus-glib: ${with_dbus_glib} Building verbose mode: ${enable_verbose_mode} Building assertions: ${enable_asserts} Building checks: ${enable_checks} @@ -1847,6 +1880,7 @@ echo " Building XML docs: ${enable_xml_docs} Building cache support: ${enable_userdb_cache} Building launchd support: ${have_launchd} + Building kdbus support: ${enable_kdbus_transport} Init scripts style: ${with_init_scripts} Abstract socket names: ${ac_cv_have_abstract_sockets} System bus socket: ${DBUS_SYSTEM_SOCKET}