From d1b8d14d18c4fa93c3b731dfcf87017e27f096b3 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Thu, 9 Jun 2022 12:10:12 +0000 Subject: [PATCH] tools/nut-scanner/Makefile.am: link net-snmp statically on (MinGW) WIN32 builds --- tools/nut-scanner/Makefile.am | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/nut-scanner/Makefile.am b/tools/nut-scanner/Makefile.am index 5f0c3a5d89..8f0fe71705 100644 --- a/tools/nut-scanner/Makefile.am +++ b/tools/nut-scanner/Makefile.am @@ -32,9 +32,14 @@ endif if WITH_USB libnutscan_la_CFLAGS += $(LIBUSB_CFLAGS) endif +# Note: do not indent automake "if" lines if WITH_SNMP libnutscan_la_CFLAGS += $(LIBNETSNMP_CFLAGS) -endif +if HAVE_WINDOWS + # MinGW builds of libnetsnmp are static-only, so we link it in: + libnutscan_la_LIBADD += $(LIBNETSNMP_LIBS) +endif HAVE_WINDOWS +endif WITH_SNMP if WITH_NEON libnutscan_la_CFLAGS += $(LIBNEON_CFLAGS) endif