Fixed build issue when built with --enable-tizen-ext-wifi-mesh option 53/206653/1 accepted/tizen/unified/20190605.215650 submit/tizen/20190604.083831
authorNishant Chaprana <n.chaprana@samsung.com>
Wed, 22 May 2019 16:48:39 +0000 (22:18 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Wed, 22 May 2019 16:53:32 +0000 (22:23 +0530)
Below error comes when compiled with --enable-tizen-ext-wifi-mesh option:-

[  168s] src/mesh-netlink.c:29:31: fatal error: netlink/genl/genl.h: No such file or directory
[  168s]  #include <netlink/genl/genl.h>
[  168s]                                ^
[  168s] compilation terminated.
[  168s] Makefile:4430: recipe for target 'src/src_connmand-mesh-netlink.o' failed
[  168s] make[1]: *** [src/src_connmand-mesh-netlink.o] Error 1
[  168s] make[1]: *** Waiting for unfinished jobs....
[  168s]   CC       gweb/vpn_connman_vpnd-gionotls.o
[  169s] Makefile:1815: recipe for target 'all' failed
[  169s] make: *** [all] Error 2

Change-Id: Ib62a65cc0dbecca86a6ae9d67bfae880fcb30bbd
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
Makefile.am
configure.ac
packaging/connman.spec

index 94c6e9d..ac196e7 100644 (file)
@@ -142,7 +142,7 @@ src_connmand_LDADD = gdbus/libgdbus-internal.la $(builtin_libadd) \
                        -lresolv -ldl -lrt
 
 if TIZEN_EXT_WIFI_MESH
-src_connmand_LDADD += -lnl -lnl-genl
+src_connmand_LDADD += @LIBNL_LIBS@ @LIBNL_GENL_LIBS@
 endif
 
 src_connmand_LDFLAGS = -Wl,--export-dynamic -pie \
@@ -212,7 +212,7 @@ vpn_connman_vpnd_LDADD = gdbus/libgdbus-internal.la $(builtin_vpn_libadd) \
                                -lresolv -ldl
 
 if TIZEN_EXT_WIFI_MESH
-vpn_connman_vpnd_LDADD += -lnl -lnl-genl
+vpn_connman_vpnd_LDADD += @LIBNL_LIBS@ @LIBNL_GENL_LIBS@
 endif
 
 vpn_connman_vpnd_LDFLAGS = -Wl,--export-dynamic \
@@ -314,6 +314,14 @@ AM_CFLAGS += @NFTABLES_CFLAGS@
 src_connmand_CFLAGS += @NFTABLES_CFLAGS@
 endif
 
+if TIZEN_EXT_WIFI_MESH
+AM_CFLAGS += @LIBNL_CFLAGS@ @LIBNL_GENL_CFLAGS@
+src_connmand_CFLAGS += @LIBNL_CFLAGS@ @LIBNL_GENL_CFLAGS@
+if VPN
+vpn_connman_vpnd_CFLAGS += @LIBNL_CFLAGS@ @LIBNL_GENL_CFLAGS@
+endif
+endif
+
 EXTRA_DIST += vpn/vpn-dbus.conf vpn/vpn-polkit.conf
 
 script_DATA =
index d1b7653..48ea09f 100644 (file)
@@ -270,6 +270,16 @@ PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.28, dummy=yes,
 AC_SUBST(GLIB_CFLAGS)
 AC_SUBST(GLIB_LIBS)
 
+PKG_CHECK_MODULES(LIBNL, libnl-3.0, dummy=yes,
+                               AC_MSG_ERROR(libnl-3.0 is required))
+AC_SUBST(LIBNL_CFLAGS)
+AC_SUBST(LIBNL_LIBS)
+
+PKG_CHECK_MODULES(LIBNL_GENL, libnl-genl-3.0, dummy=yes,
+                               AC_MSG_ERROR(libnl-genl-3.0 is required))
+AC_SUBST(LIBNL_GENL_CFLAGS)
+AC_SUBST(LIBNL_GENL_LIBS)
+
 PKG_CHECK_MODULES(LIBSYSTEMD, libsystemd-daemon, dummy=yes,
                                AC_MSG_ERROR(libsystemd-daemon library is required))
 AC_SUBST(LIBSYSTEMD_CFLAGS)
index 5b7b5ff..080b465 100644 (file)
@@ -19,6 +19,7 @@ BuildRequires:  pkgconfig(libiptc)
 BuildRequires:  pkgconfig(xtables)
 BuildRequires:  pkgconfig(libsmack)
 BuildRequires:  pkgconfig(libnl-3.0)
+BuildRequires:  pkgconfig(libnl-genl-3.0)
 BuildRequires:  pkgconfig(libsystemd-daemon)
 %if %{with connman_openconnect}
 BuildRequires:  openconnect