This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=c03aeaa372a1507ec6835c8613388f84c56228d1

commit c03aeaa372a1507ec6835c8613388f84c56228d1
Author: Guillem Jover <guil...@debian.org>
AuthorDate: Sat Nov 4 03:22:20 2023 +0100

    build: Check whether we need to linkg against libtinfo explicitly
    
    Depending on the system, linking against the curses shared library
    will automatically expose the tinfo symbols (either via a linker script
    or similar). On some other system we need to explicitly link against
    tinfo.
---
 m4/dpkg-libs.m4 | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/m4/dpkg-libs.m4 b/m4/dpkg-libs.m4
index 274f22665..bb154d77d 100644
--- a/m4/dpkg-libs.m4
+++ b/m4/dpkg-libs.m4
@@ -192,6 +192,14 @@ AC_DEFUN([DPKG_LIB_CURSES], [
   ], [
     _DPKG_CHECK_LIB_CURSES_NARROW()
   ])
+  dnl Check whether linking against the curses library also exposes the tinfo
+  dnl symbols, otherwise explicitly link against it.
+  dpkg_save_curses_LIBS=$LIBS
+  LIBS="$CURSES_LIBS"
+  AC_SEARCH_LIBS([tigetstr], [tinfo], [
+    CURSES_LIBS="${CURSES_LIBS:+$CURSES_LIBS }-ltinfo"
+  ])
+  LIBS=$dpkg_save_curses_LIBS
   AS_IF([test "x$have_curses_header" != "xyes"], [
     AC_MSG_FAILURE([curses header not found])
   ])

-- 
Dpkg.Org's dpkg

Reply via email to