]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[src/erc32] Use ncurses instead of termcap on Cygwin too
authorJoel Sherrill <joel@rtems.org>
Tue, 30 Oct 2018 16:41:12 +0000 (16:41 +0000)
committerPedro Alves <palves@redhat.com>
Tue, 30 Oct 2018 16:41:12 +0000 (16:41 +0000)
This removes a Cygwin-specific libtermcap hack that was dependent on
the presence of one of the multiple alternative libraries.  The one it
was hard-coded to pick isn't included with Cygwin anymore.

According to Corinna, libtermcap was removed from Cygwin a long time
ago, and libncurses is used in Cygwin for a long time too.

The fix is to make Cygwin use the same autoconf code to figure out the
correct lib as any other target.

sim/erc32/Changelog:
2018-10-30  Joel Sherrill <joel@rtems.org>

* configure.ac: Remove the Cygwin-specific libtermcap.a hack
and use the standard logic to determine which library to use.
* configure: Regenerate.

sim/erc32/ChangeLog
sim/erc32/configure
sim/erc32/configure.ac

index e2b0232a3624d4e63b0c10de22a54f0b9b5f5443..088a2a4b459df733b4199dba6639cd728e557069 100644 (file)
@@ -1,3 +1,9 @@
+2018-10-30  Joel Sherrill <joel@rtems.org>
+
+       * configure.ac: Remove the Cygwin-specific libtermcap.a hack
+       and use the standard logic to determine which library to use.
+       * configure: Regenerate.
+
 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
 
        * configure: Regenerate.
index 1f9a962c4788c5be18f4f5cbab60ef05806ed9c9..4efb9b6fbcdb58aefda6260b8eb4c592c565b7ff 100755 (executable)
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sim_cv_os_cygwin" >&5
 $as_echo "$sim_cv_os_cygwin" >&6; }
 
-if test x$sim_cv_os_cygwin = xyes; then
-  TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32'
-else
-  # Keep in sync with gdb's configure.ac list.
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
+
+# Keep in sync with gdb's configure.ac list.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
 $as_echo_n "checking for library containing tgetent... " >&6; }
 if ${ac_cv_search_tgetent+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -13610,6 +13608,8 @@ else
   TERMCAP=""
 fi
 
+if test x$sim_cv_os_cygwin = xyes; then
+  TERMCAP="${TERMCAP} -luser32"
 fi
 
 
index 3135dc55ec8707e931bb4d93833e87ac0fb3e0f3..e4df81989cb9d13e338c8ee8916a4c1ac6ab38e8 100644 (file)
@@ -26,12 +26,11 @@ AC_CACHE_CHECK([for cygwin], sim_cv_os_cygwin,
 lose
 #endif],[sim_cv_os_cygwin=yes],[sim_cv_os_cygwin=no])])
 
+# Keep in sync with gdb's configure.ac list.
+AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncurses],
+  [TERMCAP=$ac_cv_search_tgetent], [TERMCAP=""])
 if test x$sim_cv_os_cygwin = xyes; then
-  TERMCAP='`if test -r ../../libtermcap/libtermcap.a; then echo ../../libtermcap/libtermcap.a; else echo -ltermcap; fi` -luser32'
-else
-  # Keep in sync with gdb's configure.ac list.
-  AC_SEARCH_LIBS(tgetent, [termcap tinfo curses ncurses],
-    [TERMCAP=$ac_cv_search_tgetent], [TERMCAP=""])
+  TERMCAP="${TERMCAP} -luser32"
 fi
 AC_SUBST(TERMCAP)