]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Allow libnl-3.0 include path be specified
authorRomain Naour <romain.naour@openwide.fr>
Mon, 29 Dec 2014 20:54:02 +0000 (21:54 +0100)
committerJouni Malinen <j@w1.fi>
Sat, 21 Feb 2015 09:36:53 +0000 (11:36 +0200)
The '/usr/include/libnl3' header path is unsafe for cross-compilation.
Use pkg-config to find libnl-3.0 headers by default and alternatively,
allow LIBNL_INC=<path> to be used in .config to override.

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
src/drivers/drivers.mak

index ab392bcaf2e45a4683286d92cf55b16373fcbfab..94340787570180a246b4a66796c40e2fcca84966 100644 (file)
@@ -39,7 +39,13 @@ NEED_RFKILL=y
 ifdef CONFIG_LIBNL32
   DRV_LIBS += -lnl-3
   DRV_LIBS += -lnl-genl-3
-  DRV_CFLAGS += -DCONFIG_LIBNL20 -I/usr/include/libnl3
+  DRV_CFLAGS += -DCONFIG_LIBNL20
+  ifdef LIBNL_INC
+    DRV_CFLAGS += -I$(LIBNL_INC)
+  else
+    PKG_CONFIG ?= pkg-config
+    DRV_CFLAGS += $(shell $(PKG_CONFIG) --cflags libnl-3.0)
+  endif
 ifdef CONFIG_LIBNL3_ROUTE
   DRV_LIBS += -lnl-route-3
   DRV_CFLAGS += -DCONFIG_LIBNL3_ROUTE