From 59ecadcab2f3e3067c77d2435efb741500c0d964 Mon Sep 17 00:00:00 2001 From: Hamish Coleman Date: Sun, 2 Jul 2023 16:58:42 +0100 Subject: [PATCH] Move the special windows lib config into the configure script --- Makefile | 1 - configure.ac | 3 +++ scripts/hack_fakeautoconf.sh | 5 ++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2457a43..e1b9b0a 100644 --- a/Makefile +++ b/Makefile @@ -154,7 +154,6 @@ LDLIBS+=$(LDLIBS_EXTRA) ifeq ($(CONFIG_TARGET),mingw) LDLIBS+=$(abspath win32/n2n_win32.a) -LDLIBS+=-lnetapi32 -lws2_32 -liphlpapi N2N_DEPS+=win32/n2n_win32.a SUBDIRS+=win32 endif diff --git a/configure.ac b/configure.ac index f79d154..641fdaf 100644 --- a/configure.ac +++ b/configure.ac @@ -18,6 +18,9 @@ case "$host_os" in # and comment "For OpenSolaris (Solaris too?)" LIBS="-lsocket -lnsl $LIBS" ;; + mingw*) + LIBS="-lnetapi32 -lws2_32 -liphlpapi $LIBS" + ;; esac # This replicates the old config logic from the Makefile. diff --git a/scripts/hack_fakeautoconf.sh b/scripts/hack_fakeautoconf.sh index 414c0c9..c36a933 100755 --- a/scripts/hack_fakeautoconf.sh +++ b/scripts/hack_fakeautoconf.sh @@ -18,12 +18,15 @@ chmod a+x configure cat >config.mak <include/config.h