urg: make sdl support optional
authorSamuel Martin <s.martin49@gmail.com>
Sat, 18 Jan 2014 19:23:46 +0000 (20:23 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Sun, 19 Jan 2014 20:31:02 +0000 (21:31 +0100)
Only enable SDL support if SDL and SDL_net are already enabled in the
configuration.

[Peter: drop SDL comment]
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/urg/Config.in
package/urg/urg.mk

index ded82044064a7243c96f4c6836a3ecade435dbe4..9d57645d62c6cb783f0d18bc37739e66c2c6d50c 100644 (file)
@@ -1,11 +1,8 @@
 config BR2_PACKAGE_URG
        bool "urg"
        depends on BR2_INSTALL_LIBSTDCPP
-       select BR2_PACKAGE_SDL
-       select BR2_PACKAGE_SDL_NET
        help
          Library to control Hokuyo's URG series sensors.
-         Requires SDL & SDL_net.
 
          http://www.hokuyo-aut.jp/02sensor/07scanner/download/urg_programs_en/
 
index e16393a5f9af75be0c9aed1db7e82a587d4e8fad..075a0b367611bb3874444a598af8b9159e1df49c 100644 (file)
@@ -12,10 +12,14 @@ URG_LICENSE_FILES = COPYING
 
 URG_INSTALL_STAGING = YES
 
-URG_DEPENDENCIES = sdl sdl_net
-
-URG_CONF_OPT = --with-sdl-prefix=$(STAGING_DIR)/usr \
+ifeq ($(BR2_PACKAGE_SDL)$(BR2_PACKAGE_SDL_NET),yy)
+URG_DEPENDENCIES += sdl sdl_net
+URG_CONF_OPT += --with-sdl-prefix=$(STAGING_DIR)/usr \
                --with-sdl-exec-prefix=$(STAGING_DIR)/usr
+else
+URG_CONF_OPT = --without-sdl
+URG_CONF_ENV += ac_cv_path_SDL_CONFIG=""
+endif
 
 URG_CONFIG_SCRIPTS = c_urg-config urg-config