Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] build: modifing behavior of systemdunitdir switch
@ 2012-01-29 20:54 Paul Seidler
  2012-02-03 20:28 ` Vinicius Costa Gomes
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Seidler @ 2012-01-29 20:54 UTC (permalink / raw)
  To: linux-bluetooth

Currently it's not possible to disable the installation of the systemd
service file. If you use --without the file get installed into /no/.

Changes with this patch:
--without-systemdunitdir disables the installation of the service file
--with-systemdunitdir installs the file in the directory reported by
pkg-config
--with-systemdunitdir=/foo installs the file to /foo

Without giving the systemdunitdir switch, pkg-config checks for systemd and
installs the file if available.

Signed-off-by: Paul Seidler <pl.seidler@googlemail.com>
---
 configure.ac |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5b81f28..b96dc5d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,14 +62,18 @@ if (test "${enable_capng}" = "yes"); then
 	AC_DEFINE(HAVE_CAPNG, 1, [Define to 1 if you have capabilities library.])
 fi
 
-AC_ARG_WITH([systemdunitdir], AC_HELP_STRING([--with-systemdunitdir=DIR],
-	[path to systemd system service directory]), [path_systemdunit=${withval}],
-		[path_systemdunit="`$PKG_CONFIG --variable=systemdsystemunitdir systemd`"])
-if (test -n "${path_systemdunit}"); then
-	SYSTEMD_UNITDIR="${path_systemdunit}"
-	AC_SUBST(SYSTEMD_UNITDIR)
-fi
-AM_CONDITIONAL(SYSTEMD, test -n "${path_systemdunit}")
+AC_ARG_WITH([systemdunitdir],
+	AC_HELP_STRING([--with-systemdunitdir@<:@=DIR@:>@],
+		[Installing systemd service file (auto)
+		@<:@path to systemd system service directory@:>@]),
+	[path_systemdunit="${withval}"],
+	[PKG_CHECK_MODULES(SYSTEMD, systemd,
+		path_systemdunit=yes, path_systemdunit=no)])
+AS_IF([test "${path_systemdunit}" = yes],
+	[path_systemdunit="`$PKG_CONFIG --variable=systemdsystemunitdir systemd`"])
+AS_IF([test "${path_systemdunit}" != no],
+	[AC_SUBST(SYSTEMD_UNITDIR,["${path_systemdunit}"])])
+AM_CONDITIONAL(SYSTEMD, test "${path_systemdunit}" != no)
 
 AC_OUTPUT(Makefile scripts/bluetooth.rules doc/version.xml
 			src/bluetoothd.8 src/bluetooth.service bluez.pc)
-- 
1.7.8.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] build: modifing behavior of systemdunitdir switch
  2012-01-29 20:54 [PATCH] build: modifing behavior of systemdunitdir switch Paul Seidler
@ 2012-02-03 20:28 ` Vinicius Costa Gomes
  2012-02-13 16:50   ` Paul Seidler
  0 siblings, 1 reply; 3+ messages in thread
From: Vinicius Costa Gomes @ 2012-02-03 20:28 UTC (permalink / raw)
  To: Paul Seidler; +Cc: linux-bluetooth

Hi,

On 21:54 Sun 29 Jan, Paul Seidler wrote:
> Currently it's not possible to disable the installation of the systemd
> service file. If you use --without the file get installed into /no/.
> 
> Changes with this patch:
> --without-systemdunitdir disables the installation of the service file
> --with-systemdunitdir installs the file in the directory reported by
> pkg-config
> --with-systemdunitdir=/foo installs the file to /foo
> 
> Without giving the systemdunitdir switch, pkg-config checks for systemd and
> installs the file if available.
> 
> Signed-off-by: Paul Seidler <pl.seidler@googlemail.com>

Patch looks good. Just a minor nitpick, we don't use the Signed-off-by:
line on userspace code.

> ---
>  configure.ac |   20 ++++++++++++--------
>  1 files changed, 12 insertions(+), 8 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 5b81f28..b96dc5d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -62,14 +62,18 @@ if (test "${enable_capng}" = "yes"); then
>  	AC_DEFINE(HAVE_CAPNG, 1, [Define to 1 if you have capabilities library.])
>  fi
>  
> -AC_ARG_WITH([systemdunitdir], AC_HELP_STRING([--with-systemdunitdir=DIR],
> -	[path to systemd system service directory]), [path_systemdunit=${withval}],
> -		[path_systemdunit="`$PKG_CONFIG --variable=systemdsystemunitdir systemd`"])
> -if (test -n "${path_systemdunit}"); then
> -	SYSTEMD_UNITDIR="${path_systemdunit}"
> -	AC_SUBST(SYSTEMD_UNITDIR)
> -fi
> -AM_CONDITIONAL(SYSTEMD, test -n "${path_systemdunit}")
> +AC_ARG_WITH([systemdunitdir],
> +	AC_HELP_STRING([--with-systemdunitdir@<:@=DIR@:>@],
> +		[Installing systemd service file (auto)
> +		@<:@path to systemd system service directory@:>@]),
> +	[path_systemdunit="${withval}"],
> +	[PKG_CHECK_MODULES(SYSTEMD, systemd,
> +		path_systemdunit=yes, path_systemdunit=no)])
> +AS_IF([test "${path_systemdunit}" = yes],
> +	[path_systemdunit="`$PKG_CONFIG --variable=systemdsystemunitdir systemd`"])
> +AS_IF([test "${path_systemdunit}" != no],
> +	[AC_SUBST(SYSTEMD_UNITDIR,["${path_systemdunit}"])])
> +AM_CONDITIONAL(SYSTEMD, test "${path_systemdunit}" != no)
>  
>  AC_OUTPUT(Makefile scripts/bluetooth.rules doc/version.xml
>  			src/bluetoothd.8 src/bluetooth.service bluez.pc)
> -- 
> 1.7.8.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


Cheers,
-- 
Vinicius

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] build: modifing behavior of systemdunitdir switch
  2012-02-03 20:28 ` Vinicius Costa Gomes
@ 2012-02-13 16:50   ` Paul Seidler
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Seidler @ 2012-02-13 16:50 UTC (permalink / raw)
  To: linux-bluetooth

Currently it's not possible to disable the installation of the systemd
service file. If you use --without the file get installed into /no/.

Changes with this patch:
--without-systemdunitdir disables the installation of the service file
--with-systemdunitdir installs the file in the directory reported by
pkg-config
--with-systemdunitdir=/foo installs the file to /foo

Without giving the systemdunitdir switch, pkg-config checks for systemd and
installs the file if available.
---
 configure.ac |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5b81f28..b96dc5d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,14 +62,18 @@ if (test "${enable_capng}" = "yes"); then
 	AC_DEFINE(HAVE_CAPNG, 1, [Define to 1 if you have capabilities library.])
 fi
 
-AC_ARG_WITH([systemdunitdir], AC_HELP_STRING([--with-systemdunitdir=DIR],
-	[path to systemd system service directory]), [path_systemdunit=${withval}],
-		[path_systemdunit="`$PKG_CONFIG --variable=systemdsystemunitdir systemd`"])
-if (test -n "${path_systemdunit}"); then
-	SYSTEMD_UNITDIR="${path_systemdunit}"
-	AC_SUBST(SYSTEMD_UNITDIR)
-fi
-AM_CONDITIONAL(SYSTEMD, test -n "${path_systemdunit}")
+AC_ARG_WITH([systemdunitdir],
+	AC_HELP_STRING([--with-systemdunitdir@<:@=DIR@:>@],
+		[Installing systemd service file (auto)
+		@<:@path to systemd system service directory@:>@]),
+	[path_systemdunit="${withval}"],
+	[PKG_CHECK_MODULES(SYSTEMD, systemd,
+		path_systemdunit=yes, path_systemdunit=no)])
+AS_IF([test "${path_systemdunit}" = yes],
+	[path_systemdunit="`$PKG_CONFIG --variable=systemdsystemunitdir systemd`"])
+AS_IF([test "${path_systemdunit}" != no],
+	[AC_SUBST(SYSTEMD_UNITDIR,["${path_systemdunit}"])])
+AM_CONDITIONAL(SYSTEMD, test "${path_systemdunit}" != no)
 
 AC_OUTPUT(Makefile scripts/bluetooth.rules doc/version.xml
 			src/bluetoothd.8 src/bluetooth.service bluez.pc)
-- 
1.7.8.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-13 16:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-29 20:54 [PATCH] build: modifing behavior of systemdunitdir switch Paul Seidler
2012-02-03 20:28 ` Vinicius Costa Gomes
2012-02-13 16:50   ` Paul Seidler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox