Consolidate definition of USE_WIN32API
[deliverable/binutils-gdb.git] / gdb / configure
index f9aed986990a12d037512cf85a5b1ab51049b722..fe2d887a1ab3b2e84cc44346f291c0c94dc3bf93 100755 (executable)
@@ -688,12 +688,12 @@ TCL_BIN_DIR
 TCL_PATCH_LEVEL
 TCL_VERSION
 WIN32LDAPP
+WIN32LIBS
 GUI_CFLAGS_X
 LIBGUI
 LTLIBLZMA
 LIBLZMA
 HAVE_LIBLZMA
-WIN32LIBS
 SER_HARDWIRE
 WERROR_CFLAGS
 WARN_CFLAGS
@@ -13567,6 +13567,16 @@ _ACEOF
 fi
 
 
+  WIN32APILIBS=
+  case ${host} in
+    *mingw32*)
+
+$as_echo "#define USE_WIN32API 1" >>confdefs.h
+
+      WIN32APILIBS="-lws2_32"
+      ;;
+  esac
+
 
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
@@ -16356,15 +16366,8 @@ if test x"$gdb_cv_os_cygwin" = xyes; then
 fi
 
 # The ser-tcp.c module requires sockets.
-case ${host} in
-  *mingw32*)
-
-$as_echo "#define USE_WIN32API 1" >>confdefs.h
-
-    WIN32LIBS="$WIN32LIBS -lws2_32"
-    ;;
-esac
-
+# Note that WIN32APILIBS is set by GDB_AC_COMMON.
+WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
 
 # Add ELF support to GDB, but only if BFD includes ELF support.
 
This page took 0.025443 seconds and 4 git commands to generate.