motion: fix sdl-config detection
PATCH 1/1 motion: fix sdl-config detection
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
--- package/motion/motion.mk | 3 +++ 1 file changed, 3 insertions(+)
package/motion/motion.mk +3 -0
@@ -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
Signature · 1 line
2.8.1
PATCH 1/1 motion: fix sdl-config detection
Hello,
Quoted 10 lines · Peter Seiderer
Overwrite
ac_cv_path_CONFIG_SDLin 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 <[email protected]>
I've applied to master, however, one question below.
Quoted 3 lines
ifeq ($(BR2_PACKAGE_SDL),y)
MOTION_DEPENDENCIES+= sdlMOTION_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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 1/1 motion: fix sdl-config detection
Hello Thomas,
Quoted 21 lines · Thomas Petazzoni
Hello,
Quoted 10 lines · Peter Seiderer
Overwrite
ac_cv_path_CONFIG_SDLin 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 <[email protected]>I've applied to master, however, one question below.
Quoted 3 lines
ifeq ($(BR2_PACKAGE_SDL),y)
MOTION_DEPENDENCIES+= sdlMOTION_CONF_OPTS+= --with-sdl=$(STAGING_DIR)/usr
Quoted 6 lines
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
Quoted 3 lines
Thanks,
Thomas