zsh-workers
 help / color / mirror / code / Atom feed
From: Janos Farkas <chexum@shadow.banki.hu>
To: zsh-workers@math.gatech.edu
Subject: zsh-2.6-beta15, AC_CHECK_LIB for termcap/curses/ncurses
Date: Mon, 29 Apr 1996 19:28:32 +0200 (MET DST)	[thread overview]
Message-ID: <Pine.LNX.3.93.960429191620.24856A-100000@shadow.banki.hu> (raw)
In-Reply-To: <Pine.LNX.3.93.960426184815.26666A-100000@shadow.banki.hu>


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
  





           reply	other threads:[~1996-04-29 17:39 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <Pine.LNX.3.93.960426184815.26666A-100000@shadow.banki.hu>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.3.93.960429191620.24856A-100000@shadow.banki.hu \
    --to=chexum@shadow.banki.hu \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).