lldpd: consolidate CONFIGURE_VARS
[openwrt/openwrt.git] / package / network / services / lldpd / Makefile
index 3605ed25f9232e3166205453c876eabfbacc3dd1..801a772e023f9753d930300d7d73a320cfab53a9 100644 (file)
@@ -85,10 +85,6 @@ define Package/lldpd/conffiles
 /etc/config/lldpd
 endef
 
 /etc/config/lldpd
 endef
 
-CONFIGURE_VARS += \
-       $(if $(CONFIG_USE_GLIBC),,libbsd_CFLAGS=-ldo-not-link-bsd) \
-       $(if $(CONFIG_USE_GLIBC),,libbsd_LDFLAGS=-ldo-not-link-bsd)
-
 CONFIGURE_ARGS += \
        $(if $(CONFIG_LLDPD_WITH_PRIVSEP), \
        --with-privsep-user=lldp \
 CONFIGURE_ARGS += \
        $(if $(CONFIG_LLDPD_WITH_PRIVSEP), \
        --with-privsep-user=lldp \
@@ -111,5 +107,10 @@ CONFIGURE_ARGS += \
        $(if $(CONFIG_LLDPD_WITH_JSON),--with-json=json-c,--with-json=no) \
        $(if $(CONFIG_LLDPD_WITH_SNMP),--with-snmp,)
 
        $(if $(CONFIG_LLDPD_WITH_JSON),--with-json=json-c,--with-json=no) \
        $(if $(CONFIG_LLDPD_WITH_SNMP),--with-snmp,)
 
+# there is no flag to disable libbsd
+CONFIGURE_VARS += \
+       $(if $(CONFIG_USE_GLIBC),,libbsd_CFLAGS=-ldo-not-link-bsd) \
+       $(if $(CONFIG_USE_GLIBC),,libbsd_LDFLAGS=-ldo-not-link-bsd) \
+       $(if $(CONFIG_USE_GLIBC),,libbsd_LIBS="-lNONexistent")
 
 $(eval $(call BuildPackage,lldpd))
 
 $(eval $(call BuildPackage,lldpd))