Skip to content

Commit eaa3489

Browse files
committed
Now, that's a super ugly way of linking ws2_32, psapi and iphlpapi.
1 parent 8d0d9ae commit eaa3489

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

configure.ac

+8-4
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,15 @@ AC_SEARCH_LIBS(clock_gettime, [rt],
235235
AC_SEARCH_LIBS(backtrace, [execinfo],
236236
[AC_DEFINE(HAVE_BACKTRACE,,[define if you have backtrace()])])
237237

238-
AC_SEARCH_LIBS(gethostbyname, [resolv nsl ws2_32])
239-
AC_SEARCH_LIBS(recvfrom, [socket ws2_32])
238+
AC_SEARCH_LIBS(gethostbyname, [resolv nsl])
239+
AC_SEARCH_LIBS(recvfrom, [socket])
240240
AC_SEARCH_LIBS(kvm_open, [kvm])
241-
AC_SEARCH_LIBS(GetProcessMemoryInfo, [psapi])
242-
AC_SEARCH_LIBS(GetAdaptersAddresses, [iphlpapi])
241+
242+
AS_IF([echo `(uname -s) 2>/dev/null` | $GREP "CYGWIN" > /dev/null], [
243+
AC_CHECK_LIB([ws2_32], [printf])
244+
AC_CHECK_LIB([psapi], [printf])
245+
AC_CHECK_LIB([iphlpapi], [printf])
246+
], [ ])
243247

244248
AC_CHECK_HEADER([CoreServices/CoreServices.h],
245249
[LIBS="$LIBS -framework CoreFoundation -framework CoreServices"])

0 commit comments

Comments
 (0)