]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
drivers: Set CONFIG_LIBNL32=y automatically based on pkg-config
authorJouni Malinen <j@w1.fi>
Tue, 8 Jan 2019 11:31:55 +0000 (13:31 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 8 Jan 2019 11:31:55 +0000 (13:31 +0200)
If the libnl version is not specified explicitly with CONFIG_LIBNL*, try
to check for the most likely case today with pkg-config.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/drivers/drivers.mak

index 56af048d1a25bb478f700fce5bb63849bf0a45f9..442c59cf4a5f6e510b1bac7aae48e527de79a890 100644 (file)
@@ -160,6 +160,18 @@ endif
 endif
 
 ifdef NEED_LIBNL
+ifndef CONFIG_LIBNL32
+ifndef CONFIG_LIBNL20
+ifndef CONFIG_LIBNL_TINY
+PKG_CONFIG ?= pkg-config
+HAVE_LIBNL3 := $(shell $(PKG_CONFIG) --exists libnl-3.0; echo $$?)
+ifeq ($(HAVE_LIBNL3),0)
+CONFIG_LIBNL32=y
+endif
+endif
+endif
+endif
+
 ifdef CONFIG_LIBNL32
   DRV_LIBS += -lnl-3
   DRV_LIBS += -lnl-genl-3