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