]> git.ipfire.org Git - people/ms/network.git/blobdiff - configure.ac
configure: Tidy up dbus path detection
[people/ms/network.git] / configure.ac
index e612ff829fe45630635569796538c64e71691c47..ba5967dd1dfa68fc1eacc1cc3240584147bd6064 100644 (file)
@@ -147,17 +147,16 @@ AC_ARG_WITH(
 )
 AC_SUBST(dbuspolicydir)
 
-AC_ARG_WITH([dbussystembusdir], AS_HELP_STRING([--with-dbussystembusdir=DIR],
-               [path to D-Bus system bus services directory]), [with_dbussystembusdir=${withval}])
-if test -z "${with_dbussystembusdir}"; then
-       AC_MSG_CHECKING([D-Bus system bus services dir])
-       with_dbussystembusdir="$($PKG_CONFIG --variable=system_bus_services_dir dbus-1)"
-       if test -z "${with_dbussystembusdir}"; then
-               AC_MSG_ERROR([D-Bus system bus services directory is required])
-       fi
-       AC_MSG_RESULT([${with_dbussystembusdir}])
-fi
-AC_SUBST(dbussystembusdir, [${with_dbussystembusdir}])
+AC_ARG_WITH(
+       [dbussystembusdir],
+       AS_HELP_STRING(
+               [--with-dbussystembusdir=arg],
+               [path to D-Bus system bus services directory]
+       ),
+       [dbussystembusdir="$withval"],
+       [PKG_CHECK_VAR([dbussystembusdir], [dbus-1], [system_bus_services_dir],, [dbussystembusdir="${datarootdir}"])]
+)
+AC_SUBST(dbuspolicydir)
 
 # ------------------------------------------------------------------------------
 AC_ARG_WITH([systemdsystemunitdir],
@@ -202,6 +201,7 @@ AC_MSG_RESULT([
 
        prefix:               $prefix
 
+       dbuspolicydir:        ${dbuspolicydir}
        dbussystembusdir:     ${dbussystembusdir}
        systemdsystemunitdir: $systemdsystemunitdir
        udevdir:              $udevdir