aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/configure.in')
-rw-r--r--gdb/configure.in32
1 files changed, 24 insertions, 8 deletions
diff --git a/gdb/configure.in b/gdb/configure.in
index d17a640..d9fe00a 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -280,14 +280,25 @@ case "$host" in
esac
])
-case "${target}" in
-*-cygwin32)
- configdir="win"
- ;;
-*)
- configdir="unix"
- ;;
-esac
+# In the cygwin32 environment, we need some additional flags.
+AC_CACHE_CHECK([for cygwin32], gdb_cv_os_cygwin32,
+[AC_EGREP_CPP(lose, [
+#ifdef __CYGWIN32__
+lose
+#endif],[gdb_cv_os_cygwin32=yes],[gdb_cv_os_cygwin32=no])])
+
+WIN32LIBS=
+WIN32LDAPP=
+AC_SUBST(WIN32LIBS)
+AC_SUBST(WIN32LDAPP)
+
+if test x$gdb_cv_os_cygwin32 = xyes; then
+ if test x$enable_ide = xyes; then
+ WIN32LIBS="-ladvapi32"
+ fi
+fi
+
+configdir="unix"
if test "${enable_gdbtk}" = "yes"; then
@@ -335,6 +346,11 @@ if test "${enable_gdbtk}" = "yes"; then
# after Tcl/Tk.
LIBS="${LIBS} ${TCL_LIBS} ${TK_LIBS}"
CONFIG_OBS="${CONFIG_OBS} gdbtk.o"
+
+ if test x$gdb_cv_os_cygwin32 = xyes; then
+ WIN32LIBS="${WIN32LIBS} -luser32"
+ WIN32LDAPP="-Wl,--subsystem,windows"
+ fi
fi
fi
fi