From ff04d7397a5cdfb41c8963d8f0d080529a6b1689 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 24 Feb 2011 15:43:24 +0000 Subject: [PATCH 01/15] Rename configure.in to configure.ac Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245 --- HACKING | 4 ++-- configure.in => configure.ac | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename configure.in => configure.ac (100%) diff --git a/HACKING b/HACKING index 4a561f2b..7a5a792c 100644 --- a/HACKING +++ b/HACKING @@ -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 diff --git a/configure.in b/configure.ac similarity index 100% rename from configure.in rename to configure.ac From cc2c19c1643d08258141c7dfd47c814f68b3d3ce Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 24 Feb 2011 15:45:31 +0000 Subject: [PATCH 02/15] Modernize checks for dirfd/dd_fd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of a patch by Javier Jardón. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245 Reviewed-by: Simon McVittie --- configure.ac | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index b043018f..d895c3b4 100644 --- a/configure.ac +++ b/configure.ac @@ -491,32 +491,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 #include -],[ +]], [[ 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 #include - ],[ + ]], [[ 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]) From 1704a7d48330cc0d8320896054dee3ee34ddb69a Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 24 Feb 2011 15:45:48 +0000 Subject: [PATCH 03/15] Modernize checks for non-POSIX getpwnam_r MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of a patch by Javier Jardón. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245 Reviewed-by: Simon McVittie --- configure.ac | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index d895c3b4..fadb0c31 100644 --- a/configure.ac +++ b/configure.ac @@ -587,11 +587,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 ], - [char buffer[10000]; + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[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 From 07a54bb2f18adc2121e7b55689e5d4e54331d65d Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 24 Feb 2011 15:46:00 +0000 Subject: [PATCH 04/15] Modernize checks for socklen_t MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of a patch by Javier Jardón. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245 Reviewed-by: Simon McVittie --- configure.ac | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index fadb0c31..aea975a6 100644 --- a/configure.ac +++ b/configure.ac @@ -601,14 +601,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 #include #include -],[ +]], [[ 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 From 5906c072da69c084a3286e152aa64c0448e71865 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 24 Feb 2011 15:46:21 +0000 Subject: [PATCH 05/15] Modernize checks for ISO/GNU varargs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of a patch by Javier Jardón. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245 Reviewed-by: Simon McVittie --- configure.ac | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index aea975a6..86e486ab 100644 --- a/configure.ac +++ b/configure.ac @@ -629,19 +629,23 @@ AC_CHECK_DECLS([MSG_NOSIGNAL], [], [], [[ #include ]]) 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 From dac0a716ad969ef3a4d179f50697d8cb0e7b15ac Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 24 Feb 2011 15:46:34 +0000 Subject: [PATCH 06/15] Modernize checks for cmsgcred MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of a patch by Javier Jardón. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245 Reviewed-by: Simon McVittie --- configure.ac | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 86e486ab..8440c2ce 100644 --- a/configure.ac +++ b/configure.ac @@ -658,14 +658,16 @@ fi dnl Check for various credentials. AC_MSG_CHECKING(for struct cmsgcred) -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include -],[ +]], [[ 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 From 9bedcb071720dd506384ece87df06417e8ed3c49 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 24 Feb 2011 15:46:52 +0000 Subject: [PATCH 07/15] Modernize checks for monotonic clock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of a patch by Javier Jardón. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245 Reviewed-by: Simon McVittie --- configure.ac | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 8440c2ce..4ab8b4a1 100644 --- a/configure.ac +++ b/configure.ac @@ -817,15 +817,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 + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #include -], [ +]], [[ 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]) From 7fe24aacd23a1e2bf4b8f89457f4c18baceef198 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 24 Feb 2011 15:47:28 +0000 Subject: [PATCH 08/15] Modernize checks for DBUS__ACQUIRE_SVC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of a patch by Javier Jardón. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245 Reviewed-by: Simon McVittie --- configure.ac | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 4ab8b4a1..23d4f2c0 100644 --- a/configure.ac +++ b/configure.ac @@ -848,12 +848,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 ], - [#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 ]], + [[#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 From dbc7637f13fa4bdff8873f213466fe170f6eaaf2 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 24 Feb 2011 15:48:14 +0000 Subject: [PATCH 09/15] Modernize checks in ld_supports_flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of a patch by Javier Jardón. (This will conflict with changes from my gc-sections branch -smcv) Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245 Reviewed-by: Simon McVittie --- configure.ac | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 23d4f2c0..5e330308 100644 --- a/configure.ac +++ b/configure.ac @@ -1106,10 +1106,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 From 54af6bee3e87bfeb207a4d54283078d694949db9 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 24 Feb 2011 15:48:29 +0000 Subject: [PATCH 10/15] Modernize AC_OUTPUT usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of a patch by Javier Jardón. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245 Reviewed-by: Simon McVittie --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 5e330308..cd4ece5e 100644 --- a/configure.ac +++ b/configure.ac @@ -1611,7 +1611,7 @@ AH_VERBATIM(_DARWIN_ENVIRON, #endif ]) -AC_OUTPUT([ +AC_CONFIG_FILES([ Doxyfile dbus/versioninfo.rc dbus/dbus-arch-deps.h @@ -1650,6 +1650,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 " From 3346c8679843510a5b4a35f7a961e8fb2c1c2e4b Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 24 Feb 2011 15:51:39 +0000 Subject: [PATCH 11/15] Require a somewhat modern version of autoconf and automake MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of a patch by Javier Jardón. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245 Reviewed-by: Simon McVittie --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index cd4ece5e..7f5b38a6 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ dnl -*- mode: m4 -*- -AC_PREREQ(2.52) +AC_PREREQ([2.63]) m4_define([dbus_major_version], [1]) m4_define([dbus_minor_version], [4]) @@ -14,7 +14,7 @@ AC_LIBTOOL_RC AC_CONFIG_MACRO_DIR([m4]) -AM_INIT_AUTOMAKE([1.9 tar-ustar -Wno-portability]) +AM_INIT_AUTOMAKE([1.10 tar-ustar -Wno-portability]) AM_CONFIG_HEADER(config.h) # Honor aclocal flags From 5595182b65324f3183a92e9315069295156b96c9 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 24 Feb 2011 15:52:21 +0000 Subject: [PATCH 12/15] Modernize AC_INIT usage, with a bug report URL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of a patch by Javier Jardón. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245 Reviewed-by: Simon McVittie --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 7f5b38a6..253496b9 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ 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 From 9af8013cc950d1de0423d96e02de2054b64cabca Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 24 Feb 2011 15:53:08 +0000 Subject: [PATCH 13/15] Use AC_CONFIG_HEADERS, not AM_CONFIG_HEADER MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of a patch by Javier Jardón. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245 Reviewed-by: Simon McVittie --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 253496b9..1b414292 100644 --- a/configure.ac +++ b/configure.ac @@ -12,10 +12,10 @@ AC_CANONICAL_HOST AC_LIBTOOL_WIN32_DLL AC_LIBTOOL_RC +AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([1.10 tar-ustar -Wno-portability]) -AM_CONFIG_HEADER(config.h) # Honor aclocal flags ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" From 260f70e0afacabcda74a713d81b98f47e2d9060c Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 24 Feb 2011 15:56:58 +0000 Subject: [PATCH 14/15] Modernize setup of libtool for Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of a patch by Javier Jardón. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245 Reviewed-by: Simon McVittie --- configure.ac | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 1b414292..e8ac2aa2 100644 --- a/configure.ac +++ b/configure.ac @@ -9,8 +9,6 @@ m4_define([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]) @@ -74,6 +72,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 From fb06b43956355619a2513bfda41a32185be8a9c8 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 24 Feb 2011 15:58:01 +0000 Subject: [PATCH 15/15] Honour aclocal flags in Makefile.am, rather than gluing them onto ACLOCAL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Part of a patch by Javier Jardón. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245 Reviewed-by: Simon McVittie --- Makefile.am | 2 +- configure.ac | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index ac7dcb15..52b40e9f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/configure.ac b/configure.ac index e8ac2aa2..42ec552b 100644 --- a/configure.ac +++ b/configure.ac @@ -15,9 +15,6 @@ AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([1.10 tar-ustar -Wno-portability]) -# Honor aclocal flags -ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" - GETTEXT_PACKAGE=dbus-1 AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The name of the gettext domain])