[fix] Autogen config fix for abstract socket.
[platform/upstream/dbus.git] / configure.ac
index ab7b1e1..eacf640 100644 (file)
@@ -156,6 +156,8 @@ 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_ENABLE(kdbus-for-sbb, AS_HELP_STRING([--enable-kdbus-for-sbb],[build with kdbus sbb support]),enable_kdbus_for_sbb=$enableval,enable_kdbus_for_sbb=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]))
@@ -844,7 +846,7 @@ AC_CHECK_FUNCS(pipe2 accept4)
 
 #### Abstract sockets
 
-if test x$enable_abstract_sockets = xauto; then
+if test x$enable_abstract_sockets != xno; then
 AC_LANG_PUSH(C)
 warn_on_xcompile=no
 AC_CACHE_CHECK([abstract socket namespace],
@@ -1271,10 +1273,35 @@ 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])
+
+### sbb support
+if test x$enable_kdbus_for_sbb = xyes; then
+    KDBUS_LIBS=
+    #"-lcrypto"
+    #AC_SUBST([KDBUS_LIBS])
+    AC_DEFINE(KDBUS_FOR_SBB,1,[Enable SBB support])
+else
+    KDBUS_LIBS=
+fi
+
+AM_CONDITIONAL([ENABLE_KDBUS_FOR_SBB], [test x$enable_kdbus_for_sbb = 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=
@@ -1863,6 +1890,8 @@ echo "
         Building XML docs:        ${enable_xml_docs}
         Building cache support:   ${enable_userdb_cache}
         Building launchd support: ${have_launchd}
+        Building kdbus support:   ${enable_kdbus_transport}
+        Building kdbus for sbb:   ${enable_kdbus_for_sbb}
         Init scripts style:       ${with_init_scripts}
         Abstract socket names:    ${ac_cv_have_abstract_sockets}
         System bus socket:        ${DBUS_SYSTEM_SOCKET}
@@ -1873,8 +1902,8 @@ echo "
         Console auth dir:         ${DBUS_CONSOLE_AUTH_DIR}
         Console owner file:       ${have_console_owner_file}
         Console owner file path:  ${DBUS_CONSOLE_OWNER_FILE}
-       System bus user:          ${DBUS_USER}
-       Session bus services dir: ${EXPANDED_DATADIR}/dbus-1/services
+        System bus user:          ${DBUS_USER}
+        Session bus services dir: ${EXPANDED_DATADIR}/dbus-1/services
         'make check' socket dir:  ${TEST_SOCKET_DIR}
 "
 if test x$have_launchd = xyes; then