Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ] build: Fix requiring ell
@ 2018-05-16 18:39 Luiz Augusto von Dentz
  2018-05-17  7:19 ` Szymon Janc
  0 siblings, 1 reply; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2018-05-16 18:39 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Make sure libshared-ell is only build if ell is available.
---
 Makefile.am  | 6 ++++--
 configure.ac | 3 ++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 322706fad..27b6027d5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -95,8 +95,7 @@ gdbus_libgdbus_internal_la_SOURCES = gdbus/gdbus.h \
 				gdbus/mainloop.c gdbus/watch.c \
 				gdbus/object.c gdbus/client.c gdbus/polkit.c
 
-noinst_LTLIBRARIES += src/libshared-glib.la src/libshared-mainloop.la \
-				src/libshared-ell.la
+noinst_LTLIBRARIES += src/libshared-glib.la src/libshared-mainloop.la
 
 shared_sources = src/shared/io.h src/shared/timeout.h \
 			src/shared/queue.h src/shared/queue.c \
@@ -136,8 +135,11 @@ src_libshared_mainloop_la_SOURCES = $(shared_sources) \
 				src/shared/timeout-mainloop.c \
 				src/shared/mainloop.h src/shared/mainloop.c
 
+if ELL
 src_libshared_ell_la_SOURCES = $(shared_sources) \
 				src/shared/io-ell.c
+noinst_LTLIBRARIES += src/libshared-ell.la
+endif
 
 attrib_sources = attrib/att.h attrib/att-database.h attrib/att.c \
 		attrib/gatt.h attrib/gatt.c \
diff --git a/configure.ac b/configure.ac
index 5132131f2..a5c102df9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -249,11 +249,12 @@ AC_ARG_ENABLE(btpclient, AC_HELP_STRING([--enable-btpclient],
 AM_CONDITIONAL(BTPCLIENT, test "${enable_btpclient}" = "yes")
 
 if (test "${enable_btpclient}" = "yes"); then
-	PKG_CHECK_MODULES(ELL, ell >= 0.3, dummy=yes,
+	PKG_CHECK_MODULES(ELL, ell >= 0.3, enable_ell=yes,
 			  AC_MSG_ERROR(ell library >= 0.3 is required))
 	AC_SUBST(ELL_CFLAGS)
 	AC_SUBST(ELL_LIBS)
 fi
+AM_CONDITIONAL(ELL, test "${enable_ell}" != "no")
 
 AC_ARG_ENABLE(client, AC_HELP_STRING([--disable-client],
 		[disable command line client]), [enable_client=${enableval}])
-- 
2.14.3


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

* Re: [PATCH BlueZ] build: Fix requiring ell
  2018-05-16 18:39 [PATCH BlueZ] build: Fix requiring ell Luiz Augusto von Dentz
@ 2018-05-17  7:19 ` Szymon Janc
  2018-05-17  8:22   ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 3+ messages in thread
From: Szymon Janc @ 2018-05-17  7:19 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hi Luiz,

On Wednesday, 16 May 2018 20:39:11 CEST Luiz Augusto von Dentz wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> Make sure libshared-ell is only build if ell is available.
> ---
>  Makefile.am  | 6 ++++--
>  configure.ac | 3 ++-
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 322706fad..27b6027d5 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -95,8 +95,7 @@ gdbus_libgdbus_internal_la_SOURCES = gdbus/gdbus.h \
>  				gdbus/mainloop.c gdbus/watch.c \
>  				gdbus/object.c gdbus/client.c gdbus/polkit.c
> 
> -noinst_LTLIBRARIES += src/libshared-glib.la src/libshared-mainloop.la \
> -				src/libshared-ell.la
> +noinst_LTLIBRARIES += src/libshared-glib.la src/libshared-mainloop.la
> 
>  shared_sources = src/shared/io.h src/shared/timeout.h \
>  			src/shared/queue.h src/shared/queue.c \
> @@ -136,8 +135,11 @@ src_libshared_mainloop_la_SOURCES = $(shared_sources) \
> src/shared/timeout-mainloop.c \
>  				src/shared/mainloop.h src/shared/mainloop.c
> 
> +if ELL
>  src_libshared_ell_la_SOURCES = $(shared_sources) \
>  				src/shared/io-ell.c
> +noinst_LTLIBRARIES += src/libshared-ell.la
> +endif
> 
>  attrib_sources = attrib/att.h attrib/att-database.h attrib/att.c \
>  		attrib/gatt.h attrib/gatt.c \
> diff --git a/configure.ac b/configure.ac
> index 5132131f2..a5c102df9 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -249,11 +249,12 @@ AC_ARG_ENABLE(btpclient,
> AC_HELP_STRING([--enable-btpclient], AM_CONDITIONAL(BTPCLIENT, test
> "${enable_btpclient}" = "yes")
> 
>  if (test "${enable_btpclient}" = "yes"); then
> -	PKG_CHECK_MODULES(ELL, ell >= 0.3, dummy=yes,
> +	PKG_CHECK_MODULES(ELL, ell >= 0.3, enable_ell=yes,
>  			  AC_MSG_ERROR(ell library >= 0.3 is required))
>  	AC_SUBST(ELL_CFLAGS)
>  	AC_SUBST(ELL_LIBS)
>  fi
> +AM_CONDITIONAL(ELL, test "${enable_ell}" != "no")
> 
>  AC_ARG_ENABLE(client, AC_HELP_STRING([--disable-client],
>  		[disable command line client]), [enable_client=${enableval}])

I think this is not correct as this will make libshared-ell build dependent on 
btpclient. And btpclient doesn't use libshared.


-- 
pozdrawiam
Szymon Janc



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

* Re: [PATCH BlueZ] build: Fix requiring ell
  2018-05-17  7:19 ` Szymon Janc
@ 2018-05-17  8:22   ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2018-05-17  8:22 UTC (permalink / raw)
  To: Szymon Janc; +Cc: linux-bluetooth@vger.kernel.org

Hi Szymon,
On Thu, May 17, 2018 at 10:19 AM Szymon Janc <szymon.janc@codecoup.pl>
wrote:

> Hi Luiz,

> On Wednesday, 16 May 2018 20:39:11 CEST Luiz Augusto von Dentz wrote:
> > From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> >
> > Make sure libshared-ell is only build if ell is available.
> > ---
> >  Makefile.am  | 6 ++++--
> >  configure.ac | 3 ++-
> >  2 files changed, 6 insertions(+), 3 deletions(-)
> >
> > diff --git a/Makefile.am b/Makefile.am
> > index 322706fad..27b6027d5 100644
> > --- a/Makefile.am
> > +++ b/Makefile.am
> > @@ -95,8 +95,7 @@ gdbus_libgdbus_internal_la_SOURCES = gdbus/gdbus.h \
> >                               gdbus/mainloop.c gdbus/watch.c \
> >                               gdbus/object.c gdbus/client.c
gdbus/polkit.c
> >
> > -noinst_LTLIBRARIES += src/libshared-glib.la src/libshared-mainloop.la \
> > -                             src/libshared-ell.la
> > +noinst_LTLIBRARIES += src/libshared-glib.la src/libshared-mainloop.la
> >
> >  shared_sources = src/shared/io.h src/shared/timeout.h \
> >                       src/shared/queue.h src/shared/queue.c \
> > @@ -136,8 +135,11 @@ src_libshared_mainloop_la_SOURCES =
$(shared_sources) \
> > src/shared/timeout-mainloop.c \
> >                               src/shared/mainloop.h
src/shared/mainloop.c
> >
> > +if ELL
> >  src_libshared_ell_la_SOURCES = $(shared_sources) \
> >                               src/shared/io-ell.c
> > +noinst_LTLIBRARIES += src/libshared-ell.la
> > +endif
> >
> >  attrib_sources = attrib/att.h attrib/att-database.h attrib/att.c \
> >               attrib/gatt.h attrib/gatt.c \
> > diff --git a/configure.ac b/configure.ac
> > index 5132131f2..a5c102df9 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -249,11 +249,12 @@ AC_ARG_ENABLE(btpclient,
> > AC_HELP_STRING([--enable-btpclient], AM_CONDITIONAL(BTPCLIENT, test
> > "${enable_btpclient}" = "yes")
> >
> >  if (test "${enable_btpclient}" = "yes"); then
> > -     PKG_CHECK_MODULES(ELL, ell >= 0.3, dummy=yes,
> > +     PKG_CHECK_MODULES(ELL, ell >= 0.3, enable_ell=yes,
> >                         AC_MSG_ERROR(ell library >= 0.3 is required))
> >       AC_SUBST(ELL_CFLAGS)
> >       AC_SUBST(ELL_LIBS)
> >  fi
> > +AM_CONDITIONAL(ELL, test "${enable_ell}" != "no")
> >
> >  AC_ARG_ENABLE(client, AC_HELP_STRING([--disable-client],
> >               [disable command line client]),
[enable_client=${enableval}])

> I think this is not correct as this will make libshared-ell build
dependent on
> btpclient. And btpclient doesn't use libshared.

Yep, but currently that is the only thing using ell, I could perhaps put
enable_mesh there as well since that is what gonna use it.


> --
> pozdrawiam
> Szymon Janc




-- 
Luiz Augusto von Dentz

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

end of thread, other threads:[~2018-05-17  8:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-16 18:39 [PATCH BlueZ] build: Fix requiring ell Luiz Augusto von Dentz
2018-05-17  7:19 ` Szymon Janc
2018-05-17  8:22   ` Luiz Augusto von Dentz

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