Commit 07d2ca2b authored by Simon McVittie's avatar Simon McVittie

Merge branch 'dbus-1.4'

Conflicts:
	NEWS
parents 31a1b24c f1ba5206
......@@ -133,7 +133,7 @@ MAN_LINKS = YES
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
GENERATE_XML = YES
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
......
......@@ -172,14 +172,14 @@ To make a release of D-Bus, do the following:
then simply created an unsigned annotated tag:
"git tag -a -m 'Released X.Y.Z' dbus-X.Y.Z".
- bump the version number up in configure.in (so the micro version is odd),
- bump the version number up in configure.ac (so the micro version is odd),
and commit it. Make sure you do this *after* tagging the previous
release! The idea is that git has a newer version number
than anything released.
- merge the branch you've released to the chronologically-later
branch (usually "master"). You'll probably have to fix a merge
conflict in configure.in (the version number).
conflict in configure.ac (the version number).
- push your changes and the tag to the central repository with
git push origin master dbus-X.Y dbus-X.Y.Z
......
......@@ -29,6 +29,6 @@ update-authors:
DISTCHECK_CONFIGURE_FLAGS = \
--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
ACLOCAL_AMFLAGS = -I m4
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
include tools/lcov.am
......@@ -5,8 +5,19 @@ D-Bus 1.5.0 (UNRELEASED)
Simon McVittie)
• Optimize _dbus_string_replace_len to reduce waste (fd.o #21261,
Roberto Guido)
D-Bus 1.4.8 (UNRELEASED)
==
• Include _dbus_path_is_absolute in libdbus on Windows, fixing compilation
(fd.o #32805, Mark Brand)
• Rename configure.in to configure.ac, and update it to modern conventions
(fd.o #32245; Javier Jardón, Simon McVittie)
• Correctly give XDG_DATA_HOME priority over XDG_DATA_DIRS (fd.o #34496,
Anders Kaseorg)
• Prevent X11 autolaunching if $DISPLAY is unset or empty, and add
--disable-x11-autolaunch configure option to prevent it altogether
in embedded environments (fd.o #19997, NB#219964; Simon McVittie)
D-Bus 1.4.6 (2010-02-17)
==
......
......@@ -105,7 +105,7 @@ to the cmake program are these (use -D<key>=<value> on command line)
CMAKE_BUILD_TYPE set dbus build mode - one of Debug|Release|RelWithDebInfo|MinSizeRel
DBUS_BUILD_TESTS enable unit test code default=ON
DBUS_BUILD_X11 Build X11-dependent code default=ON
DBUS_BUILD_X11 Build with X11 autolaunch support default=ON
HAVE_CONSOLE_OWNER_FILE enable console owner file (solaris only) ) default=ON
DBUS_DISABLE_ASSERTS Disable assertion checking default=OFF
DBUS_DISABLE_CHECKS Disable public API sanity checking default=OFF
......
......@@ -345,7 +345,7 @@ OPTION(DBUS_HAVE_ATOMIC_INT "Some atomic integer implementation present" ${at
OPTION(DBUS_USE_ATOMIC_INT_486 "Use atomic integer implementation for 486" ${atomic_int_486})
if(X11_FOUND)
OPTION(DBUS_BUILD_X11 "Build X11-dependent code " ON)
OPTION(DBUS_BUILD_X11 "Build with X11 autolaunch support " ON)
endif(X11_FOUND)
# test binary names
......
dnl -*- mode: m4 -*-
AC_PREREQ(2.52)
AC_PREREQ([2.63])
m4_define([dbus_major_version], [1])
m4_define([dbus_minor_version], [4])
m4_define([dbus_micro_version], [7])
m4_define([dbus_version],
[dbus_major_version.dbus_minor_version.dbus_micro_version])
AC_INIT(dbus, [dbus_version])
AC_INIT([dbus],[dbus_version],[https://bugs.freedesktop.org/enter_bug.cgi?product=dbus],[dbus])
AC_CANONICAL_HOST
AC_LIBTOOL_WIN32_DLL
AC_LIBTOOL_RC
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.9 tar-ustar -Wno-portability])
AM_CONFIG_HEADER(config.h)
# Honor aclocal flags
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
AM_INIT_AUTOMAKE([1.10 tar-ustar -Wno-portability])
GETTEXT_PACKAGE=dbus-1
AC_SUBST(GETTEXT_PACKAGE)
......@@ -74,6 +69,10 @@ AC_PROG_MKDIR_P
COMPILER_COVERAGE
COMPILER_OPTIMISATIONS
# Initialize libtool
LT_INIT([win32-dll])
LT_LANG([Windows Resource])
# Set some internal variables depending on the platform for later use.
dbus_win=no
dbus_cygwin=no
......@@ -491,32 +490,34 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
AC_MSG_RESULT($broken_poll)
AC_MSG_CHECKING(for dirfd)
AC_TRY_LINK([
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <dirent.h>
],[
]], [[
DIR *dirp;
dirp = opendir(".");
dirfd(dirp);
closedir(dirp);
],
dbus_have_dirfd=yes, dbus_have_dirfd=no)
]])],
[dbus_have_dirfd=yes],
[dbus_have_dirfd=no])
AC_MSG_RESULT($dbus_have_dirfd)
if test "$dbus_have_dirfd" = yes; then
AC_DEFINE(HAVE_DIRFD,1,[Have dirfd function])
else
AC_MSG_CHECKING(for DIR *dirp->dd_fd)
AC_TRY_LINK([
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <dirent.h>
],[
]], [[
DIR *dirp;
int fd;
dirp = opendir(".");
fd = dirp->dd_fd;
closedir(dirp);
],
dbus_have_ddfd=yes, dbus_have_ddfd=no)
]])],
[dbus_have_ddfd=yes],
[dbus_have_ddfd=no])
AC_MSG_RESULT($dbus_have_ddfd)
if test "$dbus_have_ddfd" = yes; then
AC_DEFINE(HAVE_DDFD,1,[Have the ddfd member of DIR])
......@@ -585,11 +586,10 @@ if test "$ac_cv_func_posix_getpwnam_r" = yes; then
else
AC_CACHE_CHECK([for nonposix getpwnam_r],
ac_cv_func_nonposix_getpwnam_r,
[AC_TRY_LINK([#include <pwd.h>],
[char buffer[10000];
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pwd.h>]], [[char buffer[10000];
struct passwd pwd;
getpwnam_r ("", &pwd, buffer,
sizeof (buffer));],
sizeof (buffer));]])],
[ac_cv_func_nonposix_getpwnam_r=yes],
[ac_cv_func_nonposix_getpwnam_r=no])])
if test "$ac_cv_func_nonposix_getpwnam_r" = yes; then
......@@ -600,14 +600,16 @@ fi
dnl check for socklen_t
AC_MSG_CHECKING(whether socklen_t is defined)
AC_TRY_COMPILE([
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
],[
]], [[
socklen_t foo;
foo = 1;
],dbus_have_socklen_t=yes,dbus_have_socklen_t=no)
]])],
[dbus_have_socklen_t=yes],
[dbus_have_socklen_t=no])
AC_MSG_RESULT($dbus_have_socklen_t)
if test "x$dbus_have_socklen_t" = "xyes"; then
......@@ -626,19 +628,23 @@ AC_CHECK_DECLS([MSG_NOSIGNAL], [], [], [[ #include <sys/socket.h> ]])
dnl check for flavours of varargs macros (test from GLib)
AC_MSG_CHECKING(for ISO C99 varargs macros in C)
AC_TRY_COMPILE([],[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
int a(int p1, int p2, int p3);
#define call_a(...) a(1,__VA_ARGS__)
call_a(2,3);
],dbus_have_iso_c_varargs=yes,dbus_have_iso_c_varargs=no)
]])],
[dbus_have_iso_c_varargs=yes],
[dbus_have_iso_c_varargs=no])
AC_MSG_RESULT($dbus_have_iso_c_varargs)
AC_MSG_CHECKING(for GNUC varargs macros)
AC_TRY_COMPILE([],[
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[
int a(int p1, int p2, int p3);
#define call_a(params...) a(1,params)
call_a(2,3);
],dbus_have_gnuc_varargs=yes,dbus_have_gnuc_varargs=no)
]])],
[dbus_have_gnuc_varargs=yes],
[dbus_have_gnuc_varargs=no])
AC_MSG_RESULT($dbus_have_gnuc_varargs)
dnl Output varargs tests
......@@ -651,14 +657,16 @@ fi
dnl Check for various credentials.
AC_MSG_CHECKING(for struct cmsgcred)
AC_TRY_COMPILE([
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <sys/socket.h>
],[
]], [[
struct cmsgcred cred;
cred.cmcred_pid = 0;
],dbus_have_struct_cmsgcred=yes,dbus_have_struct_cmsgcred=no)
]])],
[dbus_have_struct_cmsgcred=yes],
[dbus_have_struct_cmsgcred=no])
AC_MSG_RESULT($dbus_have_struct_cmsgcred)
if test x$dbus_have_struct_cmsgcred = xyes; then
......@@ -808,15 +816,17 @@ AC_CHECK_FUNC(pthread_condattr_setclock,have_pthread_condattr_setclock=true,have
if test x$have_pthread_condattr_setclock = xtrue; then
AC_SEARCH_LIBS([clock_getres],[rt],[THREAD_LIBS="$THREAD_LIBS -lrt"])
AC_MSG_CHECKING([for CLOCK_MONOTONIC])
AC_TRY_COMPILE([#include <time.h>
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <time.h>
#include <pthread.h>
], [
]], [[
struct timespec monotonic_timer;
pthread_condattr_t attr;
pthread_condattr_init (&attr);
pthread_condattr_setclock (&attr, CLOCK_MONOTONIC);
clock_getres (CLOCK_MONOTONIC,&monotonic_timer);
], have_clock_monotonic=true, have_clock_monotonic=false)
]])],
[have_clock_monotonic=true],
[have_clock_monotonic=false])
if test x$have_clock_monotonic = xtrue; then
AC_MSG_RESULT([found])
AC_DEFINE(HAVE_MONOTONIC_CLOCK, 1, [Define if we have CLOCK_MONOTONIC])
......@@ -837,12 +847,13 @@ else
# see if we have the SELinux header with the new D-Bus stuff in it
if test x$have_selinux = xyes ; then
AC_MSG_CHECKING([for DBUS Flask permissions in selinux/av_permissions.h])
AC_TRY_COMPILE([#include <selinux/av_permissions.h>],
[#ifdef DBUS__ACQUIRE_SVC return 0;
#else
#error DBUS__ACQUIRE_SVC not defined
#endif],
have_selinux=yes, have_selinux=no)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <selinux/av_permissions.h>]],
[[#ifdef DBUS__ACQUIRE_SVC return 0;
#else
#error DBUS__ACQUIRE_SVC not defined
#endif]])],
[have_selinux=yes],
[have_selinux=no])
AC_MSG_RESULT($have_selinux)
fi
......@@ -1051,34 +1062,48 @@ AC_SUBST(DBUS_TEST_CFLAGS)
AC_SUBST(DBUS_TEST_LIBS)
### X11 detection
if test x$dbus_win = xyes ; then
enable_x11=no
else
AC_PATH_XTRA
DBUS_X_LIBS=
DBUS_X_CFLAGS=
## for now enable_x11 just tracks have_x11,
## there's no --enable-x11
if test x$no_x = xyes ; then
have_x11=no
enable_x11=no
AC_ARG_ENABLE([x11-autolaunch],
AS_HELP_STRING([--enable-x11-autolaunch], [build with X11 auto-launch support]),
[], [enable_x11_autolaunch=auto])
if test "x$dbus_win" = xyes; then
if test "x$enable_x11_autolaunch" = xyes; then
AC_MSG_ERROR([X11 auto-launch is not supported on Windows])
fi
enable_x11_autolaunch=no
fi
if test "x$enable_x11_autolaunch" = xno; then
have_x11=no
else
have_x11=yes
enable_x11=yes
AC_PATH_XTRA
if test "x$no_x" = xyes; then
have_x11=no
else
have_x11=yes
DBUS_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
DBUS_X_CFLAGS="$X_CFLAGS"
fi
fi
if test x$enable_x11 = xyes ; then
AC_DEFINE(DBUS_BUILD_X11,1,[Build X11-dependent code])
DBUS_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
DBUS_X_CFLAGS="$X_CFLAGS"
if test "x$enable_x11_autolaunch,$have_x11" = xyes,no; then
AC_MSG_ERROR([X11 auto-launch requires X headers/libraries])
else
DBUS_X_LIBS=
DBUS_X_CFLAGS=
# move from "auto" to "yes" or "no" if necessary
enable_x11_autolaunch="$have_x11"
fi
AC_SUBST(DBUS_X_CFLAGS)
AC_SUBST(DBUS_X_LIBS)
if test "x$enable_x11_autolaunch" = xyes ; then
AC_DEFINE([DBUS_BUILD_X11], [1], [Define to enable X11 auto-launch])
fi
AC_SUBST([DBUS_X_CFLAGS])
AC_SUBST([DBUS_X_LIBS])
#### gcc warning flags
......@@ -1094,10 +1119,12 @@ cc_supports_flag() {
ld_supports_flag() {
AC_MSG_CHECKING([whether $LD supports "$@"])
AC_TRY_LINK([
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
int one(void) { return 1; }
int two(void) { return 2; }
], [ two(); ] , [_ac_ld_flag_supported=yes], [_ac_ld_flag_supported=no])
]], [[ two(); ]])],
[_ac_ld_flag_supported=yes],
[_ac_ld_flag_supported=no])
if test "$_ac_ld_flag_supported" = "yes"; then
rm -f conftest.c
......@@ -1129,8 +1156,10 @@ if test x$dbus_win != xyes -a x$dbus_cygwin != xyes -a x$USE_MAINTAINER_MODE = x
fi
fi
if test "x$GCC" = "xyes"; then
changequote(,)dnl
dnl This whole "if" block is in m4 quotes ([]) because it uses them
dnl for character ranges internally. m4 macros cannot be used inside this
dnl block.
[if test "x$GCC" = "xyes"; then
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
*) CFLAGS="$CFLAGS -Wall" ;;
......@@ -1272,8 +1301,7 @@ if test "x$GCC" = "xyes"; then
*) CFLAGS="$CFLAGS -pedantic" ;;
esac
fi
changequote([,])dnl
fi
fi]
AC_SUBST(PIC_CFLAGS)
AC_SUBST(PIC_LDFLAGS)
......@@ -1294,13 +1322,6 @@ case $host_os in
CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT"
esac
changequote(,)dnl
# compress spaces in flags
CFLAGS=`echo "$CFLAGS" | sed -e 's/ +/ /g'`
CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/ +/ /g'`
CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/ +/ /g'`
changequote([,])dnl
### Doxygen Documentation
AC_PATH_PROG(DOXYGEN, doxygen, no)
......@@ -1330,6 +1351,10 @@ fi
AM_CONDITIONAL(DBUS_DOXYGEN_DOCS_ENABLED, test x$enable_doxygen_docs = xyes)
AC_MSG_RESULT($enable_doxygen_docs)
XSLTPROC=false
AC_CHECK_PROGS([XSLTPROC], [xsltproc])
AM_CONDITIONAL(DBUS_HAVE_XSLTPROC, test "$XSLTPROC" != false)
### XML Documentation
AC_PATH_PROG(XMLTO, xmlto, no)
......@@ -1597,7 +1622,7 @@ AH_VERBATIM(_DARWIN_ENVIRON,
#endif
])
AC_OUTPUT([
AC_CONFIG_FILES([
Doxyfile
dbus/versioninfo.rc
dbus/dbus-arch-deps.h
......@@ -1636,6 +1661,7 @@ test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoExec.serv
test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service
test/data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service
])
AC_OUTPUT
dnl ==========================================================================
echo "
......
......@@ -3257,6 +3257,11 @@ _dbus_get_autolaunch_address (const char *scope,
DBusString *address,
DBusError *error)
{
#ifdef DBUS_BUILD_X11
/* Perform X11-based autolaunch. (We also support launchd-based autolaunch,
* but that's done elsewhere, and if it worked, this function wouldn't
* be called.) */
const char *display;
static char *argv[6];
int i;
DBusString uuid;
......@@ -3265,6 +3270,18 @@ _dbus_get_autolaunch_address (const char *scope,
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
retval = FALSE;
/* fd.o #19997: if $DISPLAY isn't set to something useful, then
* dbus-launch-x11 is just going to fail. Rather than trying to
* run it, we might as well bail out early with a nice error. */
display = _dbus_getenv ("DISPLAY");
if (display == NULL || display[0] == '\0')
{
dbus_set_error_const (error, DBUS_ERROR_NOT_SUPPORTED,
"Unable to autolaunch a dbus-daemon without a $DISPLAY for X11");
return FALSE;
}
if (!_dbus_string_init (&uuid))
{
_DBUS_SET_OOM (error);
......@@ -3300,6 +3317,12 @@ _dbus_get_autolaunch_address (const char *scope,
out:
_dbus_string_free (&uuid);
return retval;
#else
dbus_set_error_const (error, DBUS_ERROR_NOT_SUPPORTED,
"Using X11 for dbus-daemon autolaunch was disabled at compile time, "
"set your DBUS_SESSION_BUS_ADDRESS instead");
return FALSE;
#endif
}
/**
......
......@@ -7,6 +7,7 @@ Makefile.in
*.la
*.o
api
dbus.devhelp
dbus-specification.html
dbus-test-plan.html
dbus-tutorial.html
......
apidir = @htmldir@/api
# automake normally assumes that man pages are generated files;
# these ones aren't, so we need the dist_ prefix to say that they're
# their own source code
......@@ -40,6 +42,7 @@ STATIC_DOCS = \
EXTRA_DIST = \
file-boilerplate.c \
doxygen_to_devhelp.xsl \
$(STATIC_DOCS) \
$(MAN_IN_FILES)
......@@ -69,13 +72,24 @@ dbus-faq.html: dbus-faq.xml
endif
if DBUS_DOXYGEN_DOCS_ENABLED
# Use the index as a proxy for the entire doc tree.
DOXYGEN_HTML_INDEX = api/html/index.html
all-local:: $(DOXYGEN_HTML_INDEX)
all-local:: doxygen.stamp
$(DOXYGEN_HTML_INDEX): $(wildcard $(top_srcdir)/dbus/*.[ch])
doxygen.stamp: $(wildcard $(top_srcdir)/dbus/*.[ch])
$(AM_V_GEN)cd $(top_builddir) && doxygen Doxyfile
@touch $@
if DBUS_HAVE_XSLTPROC
api_DATA = dbus.devhelp
dbus.devhelp: $(srcdir)/doxygen_to_devhelp.xsl doxygen.stamp
$(XSLTPROC) -o $@ $< api/xml/index.xml
endif
# this assumes CREATE_SUBDIRS isn't set to YES in Doxyfile
# (which it isn't currently)
install-data-local:: doxygen.stamp
$(MKDIR_P) $(DESTDIR)$(apidir)
$(INSTALL_DATA) api/html/* $(DESTDIR)$(apidir)
endif
if DBUS_HAVE_MAN2HTML
......@@ -94,9 +108,9 @@ BONUS_FILES = \
$(top_srcdir)/COPYING \
$(top_srcdir)/ChangeLog
dbus-docs: $(STATIC_DOCS) $(HTML_FILES) $(MAN_HTML_FILES) $(BONUS_FILES) $(DOXYGEN_HTML_INDEX)
dbus-docs: $(STATIC_DOCS) $(HTML_FILES) $(MAN_HTML_FILES) $(BONUS_FILES) doxygen.stamp
$(AM_V_at)rm -rf $@
$(AM_V_GEN)mkdir -p $@/api
$(AM_V_GEN)$(MKDIR_P) $@/api
$(AM_V_at)cp $(STATIC_DOCS) $@
$(AM_V_at)cp $(HTML_FILES) $@
$(AM_V_at)cp $(MAN_HTML_FILES) $@
......
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0">
<xsl:output method="xml" version="1.0" indent="yes"/>
<xsl:param name="prefix"></xsl:param>
<xsl:template match="/">
<book title="D-Bus: A system for interprocess communication"
name="dbus"
link="dbus-tutorial.html">
<chapters>
<sub name="Tutorial" link="{$prefix}dbus-tutorial.html"/>
<sub name="FAQ" link="{$prefix}dbus-faq.html"/>
<sub name="Specification" link="{$prefix}dbus-specification.html"/>
<sub name="API Reference" link="{$prefix}api/index.html"/>
</chapters>
<functions>
<xsl:apply-templates select="doxygenindex/compound[@kind='group']/member[@kind='function']"/>
</functions>
</book>
</xsl:template>
<xsl:template match="member">
<xsl:param name="name"><xsl:value-of select="name"/></xsl:param>
<xsl:param name="refid"><xsl:value-of select="@refid"/></xsl:param>
<xsl:param name="before"><xsl:value-of select="substring-before($refid,'_1')"/></xsl:param>
<xsl:param name="after"><xsl:value-of select="substring-after($refid,'_1')"/></xsl:param>
<xsl:param name="link"><xsl:value-of select="$before"/>.html#<xsl:value-of select="$after"/></xsl:param>
<xsl:if test="starts-with($name,'dbus') or starts-with($name, 'DBus')">
<xsl:if test="starts-with($refid,'group__') and contains($refid, '_1')">
<function name="{$name}" link="{$prefix}api/{$link}"/>
</xsl:if>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment