Discussion:
[PATCH 0/2] Build system patches
Jonas Bonn
2018-10-17 13:52:23 UTC
Permalink
I posted these two patches half a year ago and was told that they
required review by Marcel. Since Marcel made an appearance on the
mailing list today, I'll take the opportunity to resend these in the
hopes that they get the required review this time around.

/Jonas

Jonas Bonn (2):
build: Install DBus policy in /usr/share/dbus-1/system.d
configure.ac: simplify usage of PKG_CHECK_MODULES

configure.ac | 32 ++++++++------------------------
1 file changed, 8 insertions(+), 24 deletions(-)
--
2.17.1
Jonas Bonn
2018-10-17 13:52:24 UTC
Permalink
The default location for DBus policy files should be
/usr/share/dbus-1/system.d and the corresponding directory under /etc
should be reserved for administrative changes to default/packaged
settings. This removes a dependency of ofono on a populated /etc.
---
configure.ac | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5a8fb6f5..5680d65b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,9 +72,9 @@ AC_SUBST(DBUS_LIBS)

AC_ARG_WITH(dbusconfdir, AC_HELP_STRING([--with-dbusconfdir=PATH],
[path to D-Bus config directory]), [path_dbusconf=${withval}],
- [path_dbusconf="`$PKG_CONFIG --variable=sysconfdir dbus-1`"])
+ [path_dbusconf="`$PKG_CONFIG --variable=datadir dbus-1`"])
if (test -z "${path_dbusconf}"); then
- DBUS_CONFDIR="${sysconfdir}/dbus-1/system.d"
+ DBUS_CONFDIR="${datadir}/dbus-1/system.d"
else
DBUS_CONFDIR="${path_dbusconf}/dbus-1/system.d"
fi
--
2.17.1
Jonas Bonn
2018-10-17 13:52:25 UTC
Permalink
These days pkg-config does the right thing pretty much automatically so
the usage of the autoconf macros can be simplified a bit. This
functionality exists from pkg-config 0.24, which is already pretty old,
so we specify that as a minimum version for that utility.
---
configure.ac | 28 ++++++----------------------
1 file changed, 6 insertions(+), 22 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5680d65b..044700b6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,7 +10,7 @@ AM_MAINTAINER_MODE

AC_PREFIX_DEFAULT(/usr/local)

-PKG_PROG_PKG_CONFIG
+PKG_PROG_PKG_CONFIG([0.24])

COMPILER_FLAGS

@@ -60,15 +60,8 @@ AC_CHECK_FUNC(signalfd, dummy=yes,
AC_CHECK_LIB(dl, dlopen, dummy=yes,
AC_MSG_ERROR(dynamic linking loader is required))

-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32, dummy=yes,
- AC_MSG_ERROR(GLib >= 2.32 is required))
-AC_SUBST(GLIB_CFLAGS)
-AC_SUBST(GLIB_LIBS)
-
-PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.4, dummy=yes,
- AC_MSG_ERROR(D-Bus >= 1.4 is required))
-AC_SUBST(DBUS_CFLAGS)
-AC_SUBST(DBUS_LIBS)
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.32)
+PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.4)

AC_ARG_WITH(dbusconfdir, AC_HELP_STRING([--with-dbusconfdir=PATH],
[path to D-Bus config directory]), [path_dbusconf=${withval}],
@@ -115,8 +108,7 @@ AC_ARG_ENABLE(udev, AC_HELP_STRING([--disable-udev],
[disable udev modem detection support]),
[enable_udev=${enableval}])
if (test "${enable_udev}" != "no"); then
- PKG_CHECK_MODULES(UDEV, libudev >= 143, [enable_udev="yes"],
- AC_MSG_ERROR(libudev >= 143 is required))
+ PKG_CHECK_MODULES(UDEV, libudev >= 143, [enable_udev="yes"])
UDEV_DATADIR="`$PKG_CONFIG --variable=udevdir udev`"
if (test -z "${UDEV_DATADIR}"); then
UDEV_DATADIR="${sysconfdir}/udev/rules.d"
@@ -125,8 +117,6 @@ if (test "${enable_udev}" != "no"); then
fi
AC_SUBST(UDEV_DATADIR)
fi
-AC_SUBST(UDEV_CFLAGS)
-AC_SUBST(UDEV_LIBS)
AM_CONDITIONAL(UDEV, test "${enable_udev}" = "yes")

AC_ARG_ENABLE(atmodem, AC_HELP_STRING([--disable-atmodem],
@@ -169,10 +159,7 @@ AC_ARG_ENABLE(bluez4, AC_HELP_STRING([--enable-bluez4],
[enable_bluez4=${enableval}])

if (test "${enable_bluez4}" = "yes"); then
- PKG_CHECK_MODULES(BLUEZ, bluez >= 4.99 bluez < 5, dummy=yes,
- AC_MSG_ERROR(Bluetooth library >= 4.99 and < 5 is required))
- AC_SUBST(BLUEZ_CFLAGS)
- AC_SUBST(BLUEZ_LIBS)
+ PKG_CHECK_MODULES(BLUEZ, bluez >= 4.99 bluez < 5)
fi

AM_CONDITIONAL(BLUEZ4, test "${enable_bluetooth}" != "no" && test "${enable_bluez4}" = "yes")
@@ -217,10 +204,7 @@ AC_ARG_ENABLE(ell, AC_HELP_STRING([--enable-ell],

if (test "${enable_ell}" = "yes"); then
AC_DEFINE(HAVE_ELL, 1, [Defined if Ell is enabled])
- PKG_CHECK_MODULES(ELL, ell >= 0.2, dummy=yes,
- AC_MSG_ERROR(ell library >= 0.2 is required))
- AC_SUBST(ELL_CFLAGS)
- AC_SUBST(ELL_LIBS)
+ PKG_CHECK_MODULES(ELL, ell >= 0.2)
fi

AM_CONDITIONAL(MBIMMODEM, test "${enable_ell}" != "no" && test "${enable_mbimmodem}" = "yes")
--
2.17.1
Loading...