libmicrohttpd: make https support optional
authorPeter Korsgaard <jacmet@sunsite.dk>
Sat, 19 Feb 2011 22:37:40 +0000 (23:37 +0100)
committerPeter Korsgaard <jacmet@sunsite.dk>
Sat, 19 Feb 2011 22:48:48 +0000 (23:48 +0100)
Libmicrohttpd works nicely without https support, so make it optional.
Also ensure the cross-libgcrypt-config is found, rather than whatever
is installed on the host.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
package/libmicrohttpd/Config.in
package/libmicrohttpd/libmicrohttpd.mk

index de656ad386ff2494aa6c3b3d0a22ccebfd531cb7..cfedc8fa9552a5379edea83bcfb2c30b3f1e8e72 100644 (file)
@@ -1,8 +1,14 @@
 config BR2_PACKAGE_LIBMICROHTTPD
        bool "libmicrohttpd"
-       select BR2_PACKAGE_LIBGCRYPT
        help
          GNU libmicrohttpd is a small C library that makes it easy to
          run an HTTP server as part of another application.
 
          http://www.gnu.org/software/libmicrohttpd/
+
+config BR2_PACKAGE_LIBMICROHTTPD_SSL
+       bool "https support"
+       depends on BR2_PACKAGE_LIBMICROHTTPD
+       select BR2_PACKAGE_LIBGCRYPT
+       help
+         Enable HTTPS (SSL) support.
index 8273d90e196a669a959e46cdb08b532be2c2ffda..626c0469f48585fd5b71399dff349927f40faf2a 100644 (file)
@@ -8,6 +8,12 @@ LIBMICROHTTPD_SOURCE:=libmicrohttpd-$(LIBMICROHTTPD_VERSION).tar.gz
 LIBMICROHTTPD_SITE:=$(BR2_GNU_MIRROR)/libmicrohttpd
 LIBMICROHTTPD_INSTALL_STAGING = YES
 
-LIBMICROHTTPD_DEPENDENCIES = libgcrypt
+ifeq ($(BR2_PACKAGE_LIBMICROHTTPD_SSL),y)
+LIBMICROHTTPD_DEPENDENCIES += libgcrypt
+LIBMICROHTTPD_CONF_OPT += --enable-https \
+                         --with-libgcrypt-prefix=$(STAGING_DIR)/usr
+else
+LIBMICROHTTPD_CONF_OPT += --disable-https
+endif
 
 $(eval $(call AUTOTARGETS,package,libmicrohttpd))