zsh-workers
 help / color / mirror / code / Atom feed
* zsh-2.6-beta15, AC_CHECK_LIB for termcap/curses/ncurses
       [not found] <Pine.LNX.3.93.960426184815.26666A-100000@shadow.banki.hu>
@ 1996-04-29 17:28 ` Janos Farkas
  0 siblings, 0 replies; only message in thread
From: Janos Farkas @ 1996-04-29 17:28 UTC (permalink / raw)
  To: zsh-workers


Hi!

I still had some problems compiling the latesh zsh, not just that
nameddirtab caused problems.. :)

While searching for termcap/curses/ncurses, configure.in uses the
following code:

 AC_CHECK_LIB($lib, tgetent....

For mysterious reasons, AC_CHECK_LIB does not correctly support shell
variables in the LIBRARY parameter (Report sent to the appropriate
autoconf maintainers.)

$lib is used unquoted by autoconf, and is used in expressions like:
  $lib_tgetent
which is clearly wrong, as it is another variable.  If it doesn't find
termcap (which is not a common case, but is true for at least my linux
box), it continues to search for curses, but it uses a bogus cache
variable, initialized by a similar value than above, and thus it doesn't
find any curses library at all.

For now, a simple workaround is to use
  AC_CHECK_LIB(${lib}, tgetent...
instead of
  AC_CHECK_LIB($lib, tgetent...
(patch follows), which should work even if autoconf is fixed to
quote/escape shell variables more `correctly'.

I was not really sure, if this is a really portable solution, but Zoli
assured me that it's portable, although it's not clear from the
`configure.in' file, that the variable need to be used this way.

Janos

[PS. The patch is for beta 14, but applies without a hitch to beta15 too.]

diff -c2rN zsh-2.6-beta14.orig/configure zsh-2.6-beta14/configure
*** zsh-2.6-beta14.orig/configure	Mon Apr 15 07:33:08 1996
--- zsh-2.6-beta14/configure	Fri Apr 26 03:56:31 1996
***************
*** 1811,1821 ****
  
  for lib in termcap curses ncurses; do
!   echo $ac_n "checking for -l$lib""... $ac_c" 1>&6
! ac_lib_var=`echo $lib_tgetent | tr '.-/+' '___p'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
! LIBS="-l$lib  $LIBS"
  cat > conftest.$ac_ext <<EOF
  #line 1822 "configure"
--- 1811,1821 ----
  
  for lib in termcap curses ncurses; do
!   echo $ac_n "checking for -l${lib}""... $ac_c" 1>&6
! ac_lib_var=`echo ${lib}_tgetent | tr '.-/+' '___p'`
  if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    ac_save_LIBS="$LIBS"
! LIBS="-l${lib}  $LIBS"
  cat > conftest.$ac_ext <<EOF
  #line 1822 "configure"
diff -c2rN zsh-2.6-beta14.orig/configure.in zsh-2.6-beta14/configure.in
*** zsh-2.6-beta14.orig/configure.in	Mon Apr 15 07:32:58 1996
--- zsh-2.6-beta14/configure.in	Fri Apr 26 03:56:21 1996
***************
*** 220,224 ****
  dnl Prefer BSD termcap library to SysV curses library.
  for lib in termcap curses ncurses; do
!   AC_CHECK_LIB($lib, tgetent, [LIBS="$LIBS -l$lib"; break])
  done
  
--- 220,224 ----
  dnl Prefer BSD termcap library to SysV curses library.
  for lib in termcap curses ncurses; do
!   AC_CHECK_LIB(${lib}, tgetent, [LIBS="$LIBS -l$lib"; break])
  done
  





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-04-29 17:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <Pine.LNX.3.93.960426184815.26666A-100000@shadow.banki.hu>
1996-04-29 17:28 ` zsh-2.6-beta15, AC_CHECK_LIB for termcap/curses/ncurses Janos Farkas

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).