tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

builtin detection condition mismatch in mk/termcap.builtin.mk



Hi,

I want to resolve builtin detection condition mismatch in mk/termcap.builtin.mk
(related to PR pkg/42712)

In mk/termcap.builtin.mk:
================================================================================
###
### Determine if there is a built-in implementation of the package and
### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
###
.if !defined(IS_BUILTIN.termcap)
IS_BUILTIN.termcap=     no
.  if !empty(BUILTIN_LIB_FOUND.terminfo:M[yY][eE][sS]) || \
      !empty(BUILTIN_LIB_FOUND.curses:M[yY][eE][sS]) || \
      !empty(BUILTIN_LIB_FOUND.termcap:M[yY][eE][sS]) || \
      !empty(BUILTIN_LIB_FOUND.termlib:M[yY][eE][sS]) || \
      !empty(BUILTIN_LIB_FOUND.tinfo:M[yY][eE][sS])
IS_BUILTIN.termcap=     yes
.  endif
.endif
================================================================================

builtin termcap will be detected just using existence of libraries.

But, it will continue as:
================================================================================
# Define BUILTIN_LIBNAME.termcap to be the base name of the built-in
# termcap library.
#
# The way this is determined is:
#
# (1) If <term.h> exists and libtinfo exists, then it's "tinfo".
# (2) If <term.h> exists and libcurses exists, then it's "curses".
# (3) If <term.h> exists and lib{curses,tinfo} don't, then it's "c".
# (4) If <termcap.h> exists and libtermcap exists, then it's "termcap".
# (5) If <termcap.h> exists and libtermcap doesn't, then it's "c".
# (6) If <termlib.h> exists and libtermlib exists, then it's "termlib".
# (7) If <termlib.h> exists and libtermlib doesn't, then it's "c".
# (8) If libtermlib exists by itself, then it's "termlib".
================================================================================

(3),(5) and (7) will not match builtin termcap detection condition,
and except (8), builtin detection should also use existence of header files.

Is it OK to change the first conditions to match the second conditions?

--
OBATA Akio / obache%NetBSD.org@localhost


Home | Main Index | Thread Index | Old Index