diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2021-01-03 11:19:48 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-01-03 11:59:50 -0800 |
commit | 632917461a7c1893a83979a3873b51d4da3b8a42 (patch) | |
tree | 43ea7533e82b7c22cd0c4a0174d578d7de0416e6 /configure.ac | |
parent | ad2567fb1efced752352096f345c69f88e1ff405 (diff) | |
download | emacs-632917461a7c1893a83979a3873b51d4da3b8a42.tar.gz |
Fix broken build on AIX 7.2
Without this fix, the build on AIX 7.2 with xlc fails in the ‘CCLD
temacs’ step with the diagnostic ‘ld: 0711-317 ERROR: Undefined
symbol: BC’. This is because -lcurses does not define BC etc.
* configure.ac: When building terminfo.o, define
TERMINFO_DEFINES_BC if the library defines BC etc.
* src/terminfo.c (UP, BC, PC): Define depending on
TERMINFO_DEFINES_BC, not on TERMINFO.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index bcc0be7de03..66c660696b7 100644 --- a/configure.ac +++ b/configure.ac @@ -4393,6 +4393,18 @@ TERMCAP_OBJ=tparam.o if test $TERMINFO = yes; then AC_DEFINE(TERMINFO, 1, [Define to 1 if you use terminfo instead of termcap.]) TERMCAP_OBJ=terminfo.o + AC_CACHE_CHECK([whether $LIBS_TERMCAP library defines BC], + [emacs_cv_terminfo_defines_BC], + [OLD_LIBS=$LIBS + LIBS="$LIBS $LIBS_TERMCAP" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern char *BC;]], [[return !*BC;]])], + [emacs_cv_terminfo_defines_BC=yes], + [emacs_cv_terminfo_defines_BC=no]) + LIBS=$OLD_LIBS]) + if test "$emacs_cv_terminfo_defines_BC" = yes; then + AC_DEFINE([TERMINFO_DEFINES_BC], 1, [Define to 1 if the + terminfo library defines the variables BC, PC, and UP.]) + fi fi if test "X$LIBS_TERMCAP" = "X-lncurses"; then AC_DEFINE(USE_NCURSES, 1, [Define to 1 if you use ncurses.]) |