All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Seiderer <ps.report@gmx.net>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v1] motion: fix sdl-config detection
Date: Tue, 18 Oct 2016 21:01:10 +0200	[thread overview]
Message-ID: <20161018210110.0192f549@gmx.net> (raw)
In-Reply-To: <20161018120252.2e27edf2@free-electrons.com>

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

      reply	other threads:[~2016-10-18 19:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161018210110.0192f549@gmx.net \
    --to=ps.report@gmx.net \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.