Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
MONGOOSE_LICENSE = MIT
MONGOOSE_LICENSE_FILES = COPYING
-MONGOOSE_CFLAGS = $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -DNO_SSL
+MONGOOSE_CFLAGS = $(TARGET_CFLAGS) $(TARGET_LDFLAGS)
+
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+MONGOOSE_DEPENDENCIES += openssl
+# directly linked
+MONGOOSE_CFLAGS += -DNO_SSL_DL -lssl -lcrypto -lz
+else
+MONGOOSE_CFLAGS += -DNO_SSL
+endif
define MONGOOSE_BUILD_CMDS
$(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) \