Tweak winsock test

This commit is contained in:
Kurt Zeilenga 2009-01-17 01:15:30 +00:00
parent f8fdd57276
commit 2ee95af19c
2 changed files with 17 additions and 7 deletions

13
configure vendored
View file

@ -1,5 +1,5 @@
#! /bin/sh #! /bin/sh
# From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.683 2009/01/16 23:51:06 kurt Exp . # From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.684 2009/01/17 00:05:34 kurt Exp .
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61. # Generated by GNU Autoconf 2.61.
# #
@ -15335,6 +15335,10 @@ fi
fi fi
if test $ol_cv_msvc ; then
ol_cv_winsock=yes
fi
if test "$ac_cv_header_winsock_h" = yes; then if test "$ac_cv_header_winsock_h" = yes; then
{ echo "$as_me:$LINENO: checking for winsock" >&5 { echo "$as_me:$LINENO: checking for winsock" >&5
echo $ECHO_N "checking for winsock... $ECHO_C" >&6; } echo $ECHO_N "checking for winsock... $ECHO_C" >&6; }
@ -15397,13 +15401,14 @@ fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext conftest$ac_exeext conftest.$ac_ext
test $ol_cv_winsock != no && break test "$ol_cv_winsock" != no && break
done done
LIBS="$save_LIBS" LIBS="$save_LIBS"
fi fi
{ echo "$as_me:$LINENO: result: $ol_cv_winsock" >&5 { echo "$as_me:$LINENO: result: $ol_cv_winsock" >&5
echo "${ECHO_T}$ol_cv_winsock" >&6; } echo "${ECHO_T}$ol_cv_winsock" >&6; }
if test $ol_cv_winsock != no ; then if test $ol_cv_winsock != no ; then
cat >>confdefs.h <<\_ACEOF cat >>confdefs.h <<\_ACEOF
@ -15415,11 +15420,11 @@ _ACEOF
ac_cv_func_closesocket=yes ac_cv_func_closesocket=yes
ac_cv_func_gethostname=yes ac_cv_func_gethostname=yes
if test $ol_cv_winsock != none ; then if test $ol_cv_winsock != none -a $ol_cv_winsock != yes; then
LIBS="$LIBS -l$ol_cv_winsock" LIBS="$LIBS -l$ol_cv_winsock"
fi fi
if test $ol_cv_winsock = ws2_32 ; then if test $ol_cv_winsock = ws2_32 -o $ol_cv_winsock = yes ; then
cat >>confdefs.h <<\_ACEOF cat >>confdefs.h <<\_ACEOF
#define HAVE_WINSOCK2 1 #define HAVE_WINSOCK2 1

View file

@ -876,6 +876,10 @@ if test $ac_cv_func_sigaction = no && test $ac_cv_func_sigaction = no ; then
AC_CHECK_LIB(V3, sigset) AC_CHECK_LIB(V3, sigset)
fi fi
if test $ol_cv_msvc ; then
ol_cv_winsock=yes
fi
dnl The following is INTENTIONALLY scripted out because shell does not dnl The following is INTENTIONALLY scripted out because shell does not
dnl support variable names with the '@' character, which is what dnl support variable names with the '@' character, which is what
dnl autoconf would try to generate if one merely used AC_SEARCH_LIBS dnl autoconf would try to generate if one merely used AC_SEARCH_LIBS
@ -894,10 +898,11 @@ for curlib in none ws2_32 wsock32; do
gethostname(NULL,0); gethostname(NULL,0);
]])],[ol_cv_winsock=$curlib],[ol_cv_winsock=no]) ]])],[ol_cv_winsock=$curlib],[ol_cv_winsock=no])
test $ol_cv_winsock != no && break test "$ol_cv_winsock" != no && break
done done
LIBS="$save_LIBS" LIBS="$save_LIBS"
]) ])
if test $ol_cv_winsock != no ; then if test $ol_cv_winsock != no ; then
AC_DEFINE(HAVE_WINSOCK, 1, [define if you have winsock]) AC_DEFINE(HAVE_WINSOCK, 1, [define if you have winsock])
ac_cv_func_socket=yes ac_cv_func_socket=yes
@ -905,11 +910,11 @@ if test $ol_cv_winsock != no ; then
ac_cv_func_closesocket=yes ac_cv_func_closesocket=yes
ac_cv_func_gethostname=yes ac_cv_func_gethostname=yes
if test $ol_cv_winsock != none ; then if test $ol_cv_winsock != none -a $ol_cv_winsock != yes; then
LIBS="$LIBS -l$ol_cv_winsock" LIBS="$LIBS -l$ol_cv_winsock"
fi fi
if test $ol_cv_winsock = ws2_32 ; then if test $ol_cv_winsock = ws2_32 -o $ol_cv_winsock = yes ; then
AC_DEFINE(HAVE_WINSOCK2, 1, [define if you have winsock2]) AC_DEFINE(HAVE_WINSOCK2, 1, [define if you have winsock2])
fi fi
fi fi