summaryrefslogtreecommitdiff
blob: 077a1f5e5105a37eaf57ed774d441fda3d93e682 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
https://src.fedoraproject.org/rpms/barcode/c/80372a75c7ee2a448913350f19f9e3f7c8495b8c?branch=rawhide

Include <term.h> during the terminal library check for function
prototypes.  Otherwise this configure check always fails if the
compiler does not accept implicit function declarations.

Submitted upstream:

  <https://lists.gnu.org/archive/html/bug-gcal/2022-12/msg00000.html>

--- a/configure.ac
+++ b/configure.ac
@@ -319,7 +319,7 @@ if test "$gcal_cv_use_term" = yes; then
   AC_MSG_CHECKING(for working terminal libraries)
   SAVE_LIBS=$LIBS
   LIBS="$LIBS $TTYLIBS"
-  AC_TRY_LINK(,
+  AC_TRY_LINK([#include <term.h>],
     [tgetent(0); tgetflag(0); tgetnum(0); tgetstr(0);],
     [gcal_ttylibs_ok=yes])
   if test "$gcal_ttylibs_ok" = yes; then
@@ -334,7 +334,7 @@ if test "$gcal_cv_use_term" = yes; then
         [TTYLIBS="-ltermcap"])
       AC_MSG_CHECKING(for working terminal libraries again)
       LIBS="$LIBS $TTYLIBS"
-      AC_TRY_LINK(,
+      AC_TRY_LINK([#include <term.h>],
         [tgetent(0); tgetflag(0); tgetnum(0); tgetstr(0);],
         [gcal_ttylibs_ok=yes])
       if test "$gcal_ttylibs_ok" = yes; then