All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v1] motion: fix sdl-config detection
@ 2016-10-17 20:44 Peter Seiderer
  2016-10-18 10:02 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Seiderer @ 2016-10-17 20:44 UTC (permalink / raw)
  To: buildroot

Overwrite ac_cv_path_CONFIG_SDL in case sdl development is
installed on the host.

Fixes [1]:

  ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include/SDL'

[1] http://autobuild.buildroot.net/results/459/4592eb83efa393f77f5ee014f93a271f2313bee6

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 package/motion/motion.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/motion/motion.mk b/package/motion/motion.mk
index de29a2a..cf9be76 100644
--- a/package/motion/motion.mk
+++ b/package/motion/motion.mk
@@ -54,6 +54,9 @@ endif
 ifeq ($(BR2_PACKAGE_SDL),y)
 MOTION_DEPENDENCIES += sdl
 MOTION_CONF_OPTS += --with-sdl=$(STAGING_DIR)/usr
+# overwrite ac_cv_path_CONFIG_SDL in case sdl development is
+# installed on the host
+MOTION_CONF_ENV += ac_cv_path_CONFIG_SDL=$(STAGING_DIR)/usr/bin/sdl-config
 else
 MOTION_CONF_OPTS += --without-sdl
 endif
-- 
2.8.1

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

* [Buildroot] [PATCH v1] motion: fix sdl-config detection
  2016-10-17 20:44 [Buildroot] [PATCH v1] motion: fix sdl-config detection Peter Seiderer
@ 2016-10-18 10:02 ` Thomas Petazzoni
  2016-10-18 19:01   ` Peter Seiderer
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2016-10-18 10:02 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 17 Oct 2016 22:44:48 +0200, Peter Seiderer wrote:
> Overwrite ac_cv_path_CONFIG_SDL in case sdl development is
> installed on the host.
> 
> Fixes [1]:
> 
>   ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include/SDL'
> 
> [1] http://autobuild.buildroot.net/results/459/4592eb83efa393f77f5ee014f93a271f2313bee6
> 
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>

I've applied to master, however, one question below.


>  ifeq ($(BR2_PACKAGE_SDL),y)
>  MOTION_DEPENDENCIES += sdl
>  MOTION_CONF_OPTS += --with-sdl=$(STAGING_DIR)/usr

With the ac_cv_path_CONFIG_SDL, is this --with-sdl still really
necessary?

If it uses the sdl-config script to get the SDL path, then it should
theoretically no longer be needed.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v1] motion: fix sdl-config detection
  2016-10-18 10:02 ` Thomas Petazzoni
@ 2016-10-18 19:01   ` Peter Seiderer
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Seiderer @ 2016-10-18 19:01 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

On Tue, 18 Oct 2016 12:02:52 +0200, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:

> Hello,
> 
> On Mon, 17 Oct 2016 22:44:48 +0200, Peter Seiderer wrote:
> > Overwrite ac_cv_path_CONFIG_SDL in case sdl development is
> > installed on the host.
> > 
> > Fixes [1]:
> > 
> >   ERROR: unsafe header/library path used in cross-compilation: '-I/usr/include/SDL'
> > 
> > [1] http://autobuild.buildroot.net/results/459/4592eb83efa393f77f5ee014f93a271f2313bee6
> > 
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> 
> I've applied to master, however, one question below.
> 
> 
> >  ifeq ($(BR2_PACKAGE_SDL),y)
> >  MOTION_DEPENDENCIES += sdl
> >  MOTION_CONF_OPTS += --with-sdl=$(STAGING_DIR)/usr
> 
> With the ac_cv_path_CONFIG_SDL, is this --with-sdl still really
> necessary?
> 
> If it uses the sdl-config script to get the SDL path, then it should
> theoretically no longer be needed.
> 

If I read the code from configure.ac right '--with-sdl' is needed, but the
given path could be omitted (as it is ignored in case a local/host
version of sdl-config is found first, therefore ac_cv_path_CONFIG_SDL is
needed):

 211 #
 212 # Check for sdl library
 213 #
 214 SDL_SUPPORT="no"
 215 AC_ARG_WITH(sdl,
 216 [  --with-sdl[=DIR]          Specify the prefix for the install path for
 217                           sdl-config to get stream in SDL window (optional).
 218 ],
 219 [],
 220 [withval="no"])
 221 if test "x$withval" = "xno"; then
 222         AC_MSG_CHECKING(for sdl)
 223         AC_MSG_RESULT(skipped)

...sdl skipped without '--with-sdl' option...

 224 else
 225         AC_PATH_PROG([CONFIG_SDL], [sdl-config], [], [${PATH}:${withval}:${withval}/bin])

...sdl-config from local path taken before the one from given path...

 226         if test -z "`($CONFIG_SDL --version) 2>/dev/null`" ;then
 227                 echo ""
 228                 echo "****************************************************"
 229                 echo "* sdl-config could not be found. Please install it *"
 230                 echo "* and remove the --with-sdl configure argument.    *"
 231                 echo "* libSDL can be found at http://www.libsdl.org     *"
 232                 echo "****************************************************"
 233                 echo ""
 234         else
 235                 SDL_SUPPORT="yes"
 236                 TEMP_LIBS="$TEMP_LIBS `${CONFIG_SDL} --libs`"
 237                 TEMP_CFLAGS="${TEMP_CFLAGS} `${CONFIG_SDL} --cflags`"
 238                 AC_DEFINE([HAVE_SDL],1,[Define to 1 if you have SDL support])
 239                 SDL_OBJ="sdl.o"
 240                 AC_SUBST(SDL_OBJ)
 241         fi
 242 fi


Regards,
Peter

> Thanks,
> 
> Thomas

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

end of thread, other threads:[~2016-10-18 19:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-17 20:44 [Buildroot] [PATCH v1] motion: fix sdl-config detection Peter Seiderer
2016-10-18 10:02 ` Thomas Petazzoni
2016-10-18 19:01   ` Peter Seiderer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.