changeset 27458:ebf36d827c08

Implement check for closesocket(), needed by libavformat, fixes Bugzilla #1257.
author diego
date Fri, 29 Aug 2008 16:20:35 +0000
parents 16a2329e8776
children 11c1f98df84c
files configure
diffstat 1 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Wed Aug 27 11:31:53 2008 +0000
+++ b/configure	Fri Aug 29 16:20:35 2008 +0000
@@ -2894,6 +2894,23 @@
 echores "$_socklen_t"
 
 
+echocheck "closesocket()"
+_closesocket=no
+for header in "arpa/inet.h" "winsock2.h" ; do
+  cat > $TMPC << EOF
+#include <$header>
+int main(void) { closesocket(); return 0; }
+EOF
+  cc_check && _closesocket=yes && break
+done
+if test "$_closesocket" = yes ; then
+  _def_closesocket='#define HAVE_CLOSESOCKET 1'
+else
+  _def_closesocket='#undef HAVE_CLOSESOCKET'
+fi
+echores "$_closesocket"
+
+
 echocheck "network"
 # FIXME network check
 if test "$_network" = yes ; then
@@ -8625,6 +8642,9 @@
 typedef int socklen_t;
 #endif
 
+/* closesocket() support */
+$_def_closesocket
+
 /* enables / disables cdparanoia support */
 $_def_cdparanoia
 $_def_cddb