AC_PREREQ(2.52)
m4_define([dbus_major_version], [1])
-m4_define([dbus_minor_version], [3])
-m4_define([dbus_micro_version], [2])
+m4_define([dbus_minor_version], [4])
+m4_define([dbus_micro_version], [3])
m4_define([dbus_version],
[dbus_major_version.dbus_minor_version.dbus_micro_version])
AC_INIT(dbus, [dbus_version])
AC_LIBTOOL_WIN32_DLL
AC_LIBTOOL_RC
-AM_INIT_AUTOMAKE([1.9 tar-ustar])
+AC_CONFIG_MACRO_DIR([m4])
+
+AM_INIT_AUTOMAKE([1.9 tar-ustar -Wno-portability])
AM_CONFIG_HEADER(config.h)
# Honor aclocal flags
## increment any time the source changes; set to
## 0 if you increment CURRENT
-LT_REVISION=1
+LT_REVISION=3
## increment if any interfaces have been added; set to 0
## if any interfaces have been changed or removed. removal has
else
AC_DEFINE(DBUS_UNIX,1,[Defined if we run on a Unix-based system])
fi
+if test "$dbus_cygwin" = yes; then
+ AC_DEFINE(DBUS_CYGWIN,1,[Defined if we run on a cygwin API based system])
+fi
AM_CONDITIONAL(DBUS_WIN, test "$dbus_win" = yes)
AM_CONDITIONAL(DBUS_WINCE, test "$dbus_wince" = yes)
AM_CONDITIONAL(DBUS_UNIX, test "$dbus_unix" = yes)
+AM_CONDITIONAL(DBUS_CYGWIN, test "$dbus_cygwin" = yes)
AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests],[enable unit test code]),enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE)
AC_ARG_ENABLE(ansi, AS_HELP_STRING([--enable-ansi],[enable -ansi -pedantic gcc flags]),enable_ansi=$enableval,enable_ansi=no)
AC_ARG_ENABLE(kqueue, AS_HELP_STRING([--enable-kqueue],[build with kqueue support]),enable_kqueue=$enableval,enable_kqueue=auto)
AC_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)
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_WITH(xml, AS_HELP_STRING([--with-xml=[libxml/expat]],[XML library to use]))
+AC_ARG_WITH(xml, AS_HELP_STRING([--with-xml=[libxml/expat]],[XML library to use (libxml may be named libxml2 on some systems)]))
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]))
AC_ARG_WITH(test-socket-dir, AS_HELP_STRING([--with-test-socket-dir=[dirname]],[Where to put sockets for make check]))
AC_ARG_WITH(system-socket, AS_HELP_STRING([--with-system-socket=[filename]],[UNIX domain socket for systemwide daemon]))
AC_ARG_WITH(console-auth-dir, AS_HELP_STRING([--with-console-auth-dir=[dirname]],[directory to check for console ownerhip]))
AC_ARG_WITH(console-owner-file, AS_HELP_STRING([--with-console-owner-file=[filename]],[file whose owner determines current console owner]))
+AC_ARG_WITH(launchd-agent-dir, AS_HELP_STRING([--with-launchd-agent-dir=[dirname]],[directory to put the launchd agent (default: /Library/LaunchAgents)]))
AC_ARG_WITH(dbus_user, AS_HELP_STRING([--with-dbus-user=<user>],[User for running the DBUS daemon (messagebus)]))
AC_ARG_WITH(dbus_daemondir, AS_HELP_STRING([--with-dbus-daemondir=[dirname]],[Directory for installing the DBUS daemon]))
case 4 in
$ac_cv_sizeof_short)
- dbusint32=int
+ dbusint32=short
;;
$ac_cv_sizeof_int)
dbusint32=int
fi
fi
+AC_CHECK_HEADERS(sys/resource.h)
+
AC_CHECK_HEADERS(dirent.h)
AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
#include <errno.h>
]],
[[
+ size_t slen;
int listen_fd;
struct sockaddr_un addr;
memset (&addr, '\0', sizeof (addr));
addr.sun_family = AF_UNIX;
strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test");
+ /* SUN_LEN uses strlen() so need to calculate it before adding \0 at the
+ * beginning.
+ */
+ slen = SUN_LEN(&addr);
addr.sun_path[0] = '\0'; /* this is what makes it abstract */
- if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
+ if (bind (listen_fd, (struct sockaddr*) &addr, slen) < 0)
{
fprintf (stderr, "Abstract socket namespace bind() failed: %s\n",
strerror (errno));
AM_CONDITIONAL(DBUS_BUS_ENABLE_KQUEUE, test x$have_kqueue = xyes)
+# launchd checks
+if test x$enable_launchd = xno ; then
+ have_launchd=no
+else
+ have_launchd=yes
+ AC_CHECK_HEADER([launch.h], , have_launchd=no)
+ AC_PATH_PROG([LAUNCHCTL], [launchctl])
+ if test "x$LAUNCHCTL" = "x"; then
+ have_launchd=no
+ fi
+
+ if test x$enable_launchd = xyes && test x$have_launchd = xno ; then
+ AC_MSG_ERROR([launchd support explicitly enabled but not available])
+ fi
+fi
+
+dnl check if launchd is enabled
+if test x$have_launchd = xyes; then
+ AC_DEFINE(DBUS_ENABLE_LAUNCHD,1,[Use launchd autolaunch])
+fi
+
+AM_CONDITIONAL(DBUS_ENABLE_LAUNCHD, test x$have_launchd = xyes)
+
+#### Directory to place launchd agent file
+if test "x$with_launchd_agent_dir" = "x"; then
+ LAUNCHD_AGENT_DIR="/Library/LaunchAgents"
+else
+ LAUNCHD_AGENT_DIR="$with_launchd_agent_dir"
+fi
+
+AC_SUBST(LAUNCHD_AGENT_DIR)
+
dnl console owner file
if test x$enable_console_owner_file = xno ; then
have_console_owner_file=no;
AC_SUBST(DBUS_CLIENT_LIBS)
DBUS_BUS_CFLAGS="$XML_CFLAGS"
-DBUS_BUS_LIBS="$XML_LIBS $SELINUX_LIBS $INTLLIBS $THREAD_LIBS $ADT_LIBS $NETWORK_libs"
+DBUS_BUS_LIBS="$XML_LIBS $SELINUX_LIBS $THREAD_LIBS $ADT_LIBS $NETWORK_libs"
AC_SUBST(DBUS_BUS_CFLAGS)
AC_SUBST(DBUS_BUS_LIBS)
#### gcc warning flags
cc_supports_flag() {
- AC_MSG_CHECKING(whether $CC supports "$@")
- Cfile=/tmp/foo${$}
- touch ${Cfile}.c
- $CC -c "$@" ${Cfile}.c -o ${Cfile}.o >/dev/null 2>&1
- rc=$?
- rm -f ${Cfile}.c ${Cfile}.o
- case $rc in
- 0) AC_MSG_RESULT(yes);;
- *) AC_MSG_RESULT(no);;
- esac
- return $rc
+ AC_MSG_CHECKING(whether $CC supports "$*")
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$*"
+ AC_TRY_COMPILE([], [], [rc=yes], [rc=no])
+ CFLAGS="$save_CFLAGS"
+ AC_MSG_RESULT([$rc])
+ test "x$rc" = xyes
}
ld_supports_flag() {
case " $CFLAGS " in
*[\ \ ]-Wfloat-equal[\ \ ]*) ;;
- *) if cc_supports_flag -Wfloat-equals; then
+ *) if cc_supports_flag -Wfloat-equal; then
CFLAGS="$CFLAGS -Wfloat-equal"
fi
;;
AC_SUBST(SECTION_LDFLAGS)
AC_MSG_RESULT($ac_gcsections)
-# Add -D_POSIX_PTHREAD_SEMANTICS if on Solaris
-#
case $host_os in
solaris*)
- CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS" ;;
+ # Solaris' C library apparently needs these runes to be threadsafe...
+ CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT"
esac
changequote(,)dnl
fi
AM_CONDITIONAL(DBUS_DOXYGEN_DOCS_ENABLED, test x$enable_doxygen_docs = xyes)
-AC_MSG_RESULT(yes)
+AC_MSG_RESULT($enable_doxygen_docs)
### XML Documentation
fi
AM_CONDITIONAL(DBUS_XML_DOCS_ENABLED, test x$enable_xml_docs = xyes)
-AC_MSG_RESULT(yes)
+AC_MSG_RESULT($enable_xml_docs)
+
+AC_PATH_PROG([MAN2HTML], [man2html])
+AC_ARG_VAR([MAN2HTML], [Path to man2html (optional)])
+AM_CONDITIONAL(DBUS_HAVE_MAN2HTML, test x$MAN2HTML != x)
+
+AM_CONDITIONAL(DBUS_CAN_UPLOAD_DOCS,
+ test x$enable_doxygen_docs = xyes -a x$enable_xml_docs = xyes -a \
+ x$MAN2HTML != x)
#### Have to go $localstatedir->$prefix/var->/usr/local/var
AC_ARG_WITH([systemdsystemunitdir],
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
[], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
-AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
-AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir"])
+if test "x$with_systemdsystemunitdir" != xno; then
+ AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
+fi
+AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ])
##### Set up location for system bus socket
if ! test -z "$with_system_socket"; then
DEFAULT_SOCKET_DIR=/tmp
fi
+DEFAULT_SOCKET_DIR=`echo $DEFAULT_SOCKET_DIR | sed 's/+/%2B/g'`
+
if ! test -z "$with_test_socket_dir" ; then
TEST_SOCKET_DIR="$with_test_socket_dir"
else
if test x$dbus_win = xyes; then
DBUS_SESSION_BUS_DEFAULT_ADDRESS="nonce-tcp:"
+elif test x$have_launchd = xyes; then
+ DBUS_SESSION_BUS_DEFAULT_ADDRESS="launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET"
else
DBUS_SESSION_BUS_DEFAULT_ADDRESS="unix:tmpdir=$DBUS_SESSION_SOCKET_DIR"
fi
bus/system.conf
bus/session.conf
bus/messagebus
+bus/messagebus-config
+bus/org.freedesktop.dbus-session.plist
bus/rc.messagebus
-bus/dbus-daemon.1
bus/dbus.service
bus/dbus.socket
Makefile
test/Makefile
test/name-test/Makefile
doc/Makefile
+doc/dbus-daemon.1
dbus-1.pc
test/data/valid-config-files/debug-allow-all.conf
test/data/valid-config-files/debug-allow-all-sha1.conf
64-bit int: ${DBUS_INT64_TYPE}
32-bit int: ${DBUS_INT32_TYPE}
16-bit int: ${DBUS_INT16_TYPE}
- Doxygen: ${DOXYGEN}
- xmlto: ${XMLTO}"
+ Doxygen: ${DOXYGEN:-not found}
+ xmlto: ${XMLTO:-not found}
+ man2html: ${MAN2HTML:-not found}"
echo "
Maintainer mode: ${USE_MAINTAINER_MODE}
Building Doxygen docs: ${enable_doxygen_docs}
Building XML docs: ${enable_xml_docs}
Building cache support: ${enable_userdb_cache}
- Gettext libs (empty OK): ${INTLLIBS}
+ Building launchd support: ${have_launchd}
Using XML parser: ${with_xml}
Init scripts style: ${with_init_scripts}
Abstract socket names: ${ac_cv_have_abstract_sockets}
Session bus services dir: ${EXPANDED_DATADIR}/dbus-1/services
'make check' socket dir: ${TEST_SOCKET_DIR}
"
+if test x$have_launchd = xyes; then
+ echo " launchd agent dir: ${LAUNCHD_AGENT_DIR}"
+fi
+echo
if test x$enable_tests = xyes; then
echo "NOTE: building with unit tests increases the size of the installed library and renders it insecure."