summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1c69a0f)
raw | patch | inline | side by side (parent: 1c69a0f)
author | Avuton Olrich <avuton@gmail.com> | |
Thu, 3 Nov 2011 02:13:21 +0000 (19:13 -0700) | ||
committer | Avuton Olrich <avuton@gmail.com> | |
Thu, 3 Nov 2011 02:33:50 +0000 (19:33 -0700) |
configure.ac | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index 34a3c371243a63d31f9b886577e32bffc5944681..efb6e22bc2944a7627f5cb237a5fdaa0adb142d2 100644 (file)
--- a/configure.ac
+++ b/configure.ac
ncurses=auto
fi
-
-dnl
-dnl Check for libraries
-dnl
-
-dnl Try to find the socket functions
-AC_CHECK_FUNC([socket],
- [],
- [AC_CHECK_LIB([socket],[socket],[LIBS="$LIBS -lsocket"],
- [AC_MSG_ERROR(No UNIX socket API found)])
- ])
-
-dnl Try to find the gethostbyname functions
-AC_CHECK_FUNC([gethostbyname],
- [],
- [AC_CHECK_LIB([nsl],[gethostbyname],[LIBS="$LIBS -lnsl"],
- [AC_MSG_ERROR(No UNIX gethostbyname API found)])
- ])
+AC_CANONICAL_HOST
+
+case "$host_os" in
+mingw32* | windows*)
+ LIBS="$LIBS -lws2_32"
+ ;;
+*)
+ AC_CHECK_FUNC([socket],
+ [],
+ [AC_CHECK_LIB([socket],[socket],[LIBS="$LIBS -lsocket"],
+ [AC_MSG_ERROR(No UNIX socket API found)])
+ ])
+
+ AC_CHECK_FUNC([gethostbyname],
+ [],
+ [AC_CHECK_LIB([nsl],[gethostbyname],[LIBS="$LIBS -lnsl"],
+ [AC_MSG_ERROR(No UNIX gethostbyname API found)])
+ ])
+esac
dnl wide character support