+2020-01-14 Tom Tromey <tom@tromey.com>
+
+ * gdbsupport/common.m4 (GDB_AC_COMMON): Define WIN32APILIBS and
+ USE_WIN32API when needed.
+ * configure.ac (USE_WIN32API): Don't define.
+ (WIN32LIBS): Use WIN32APILIBS.
+ * configure: Rebuild.
+
2020-01-14 Tom Tromey <tom@tromey.com>
* configure: Rebuild.
TCL_PATCH_LEVEL
TCL_VERSION
WIN32LDAPP
+WIN32LIBS
GUI_CFLAGS_X
LIBGUI
LTLIBLZMA
LIBLZMA
HAVE_LIBLZMA
-WIN32LIBS
SER_HARDWIRE
WERROR_CFLAGS
WARN_CFLAGS
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; }
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.
fi
# The ser-tcp.c module requires sockets.
-case ${host} in
- *mingw32*)
- AC_DEFINE(USE_WIN32API, 1,
- [Define if we should use the Windows API, instead of the
- POSIX API. On Windows, we use the Windows API when
- building for MinGW, but the POSIX API when building
- for Cygwin.])
- WIN32LIBS="$WIN32LIBS -lws2_32"
- ;;
-esac
-AC_SUBST(WIN32LIBS)
+# Note that WIN32APILIBS is set by GDB_AC_COMMON.
+WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
# Add ELF support to GDB, but only if BFD includes ELF support.
GDB_AC_CHECK_BFD([for ELF support in BFD], gdb_cv_var_elf,
+2020-01-14 Tom Tromey <tom@tromey.com>
+
+ * configure.ac (LIBS): Use WIN32APILIBS.
+ (USE_WIN32API): Don't define.
+ * configure: Rebuild.
+
2020-01-14 Tom Tromey <tom@tromey.com>
* configure: Rebuild.
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; }
if test "${srv_mingwce}" = "yes"; then
LIBS="$LIBS -lws2"
elif test "${srv_mingw}" = "yes"; then
- LIBS="$LIBS -lws2_32"
+ # WIN32APILIBS is set by GDB_AC_COMMON.
+ LIBS="$LIBS $WIN32APILIBS"
elif test "${srv_qnx}" = "yes"; then
LIBS="$LIBS -lsocket"
elif test "${srv_lynxos}" = "yes"; then
LIBS="$LIBS -lnetinet"
fi
-if test "${srv_mingw}" = "yes"; then
-
-$as_echo "#define USE_WIN32API 1" >>confdefs.h
-
-fi
-
if test "${srv_linux_usrregs}" = "yes"; then
$as_echo "#define HAVE_LINUX_USRREGS 1" >>confdefs.h
if test "${srv_mingwce}" = "yes"; then
LIBS="$LIBS -lws2"
elif test "${srv_mingw}" = "yes"; then
- LIBS="$LIBS -lws2_32"
+ # WIN32APILIBS is set by GDB_AC_COMMON.
+ LIBS="$LIBS $WIN32APILIBS"
elif test "${srv_qnx}" = "yes"; then
LIBS="$LIBS -lsocket"
elif test "${srv_lynxos}" = "yes"; then
LIBS="$LIBS -lnetinet"
fi
-if test "${srv_mingw}" = "yes"; then
- AC_DEFINE(USE_WIN32API, 1,
- [Define if we should use the Windows API, instead of the
- POSIX API. On Windows, we use the Windows API when
- building for MinGW, but the POSIX API when building
- for Cygwin.])
-fi
-
if test "${srv_linux_usrregs}" = "yes"; then
AC_DEFINE(HAVE_LINUX_USRREGS, 1,
[Define if the target supports PTRACE_PEEKUSR for register ]
AC_HEADER_STDC
AC_FUNC_ALLOCA
+ WIN32APILIBS=
+ case ${host} in
+ *mingw32*)
+ AC_DEFINE(USE_WIN32API, 1,
+ [Define if we should use the Windows API, instead of the
+ POSIX API. On Windows, we use the Windows API when
+ building for MinGW, but the POSIX API when building
+ for Cygwin.])
+ WIN32APILIBS="-lws2_32"
+ ;;
+ esac
+
dnl Note that this requires codeset.m4, which is included
dnl by the users of common.m4.
AM_LANGINFO_CODESET