zsh-workers
 help / color / mirror / code / Atom feed
* Zsh broken after the latest build patches
@ 2001-04-21  8:37 Andrej Borsenkow
  2001-04-21 10:51 ` Andrej Borsenkow
  0 siblings, 1 reply; 14+ messages in thread
From: Andrej Borsenkow @ 2001-04-21  8:37 UTC (permalink / raw)
  To: ZSH Workers Mailing List

I do not know, which one exactly is responsible; but, I asked to hold off
these patches, there is nothing so important in any one of them ...

bor@itsrm2% print lsld.so: zsh: symbol not found: tgoto
zsh: killed     zsh

bor@itsrm2% nm /tools/lib/zsh/4.0.1-pre-3/zsh/zle.so | grep tgoto
[757]   |     49100|       0|  U  |GLOB |0    |UNDEF  |tgoto
bor@itsrm2% nm =zsh | grep tgoto
nothing

To remind - I have static libtermcap (a.k.a. libcurses a.k.a. libterminfo).
So, both main zsh modules *and* any module that is using them (zle, termcap,
terminfo, etc) must be linked with these modules. Before, both zsh main and
every module was linked with all libraries. Now what happens is:

Src/Zle/Makefile:

...
LIBS            = -ldl -lg -lc
...
zle.$(DL_EXT): $(MODDOBJS_zle) zle.export  $(dir_top)/Src/zsh.export
$(NOLINKMODS_zle)
        rm -f $@
        $(DLLINK) $(NXPIMP_zle) $(NNTRYOPT) $(MODDOBJS_zle) $(NOLINKMODS_zle)
$(LIBS)

Folks, the issue of dynamic linking is too complicated to be solved with one
patch. libtool was created for a reason. And definitely such changes should
not be done just before release. Please, backout these changes. I do not have
time currently to debug this (sorry), and I do not want zsh remain broken
here.

-andrej

Have a nice DOS!
B >>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: Zsh broken after the latest build patches
  2001-04-21  8:37 Zsh broken after the latest build patches Andrej Borsenkow
@ 2001-04-21 10:51 ` Andrej Borsenkow
  2001-04-23  4:53   ` What about this? (was: RE: Zsh broken after the latest build patches) Andrej Borsenkow
  0 siblings, 1 reply; 14+ messages in thread
From: Andrej Borsenkow @ 2001-04-21 10:51 UTC (permalink / raw)
  To: ZSH Workers Mailing List

> 
> I do not know, which one exactly is responsible

I backed out the following and now zsh works again.

2001-04-19  Clint Adams  <schizo@debian.org>

        * unposted: configure.in: make sure all the libraries are
        in for the function check.

        * 14041: configure.in, Config/defs.mk.in, Src/Makefile.in,
        Src/Modules/cap.mdd, Src/Modules/termcap.mdd,
        Src/Modules/terminfo.mdd, Src/Modules/zftp.mdd:
        only link modules against needed libraries.

        * 14039: configure.in, Config/defs.mk.in, Src/zsh.mdd,
        Src/Modules/cap.mdd, Src/Modules/termcap.mdd,
        Src/Modules/terminfo.mdd, Src/Modules/zftp.mdd:
        simulate old linking behavior.

        * 14033: acconfig.h, aczsh.m4, configure.in, Config/defs.mk.in,
        Src/Makefile.in, Src/mkmakemod.sh, Src/zsh.mdd,
        Src/Modules/cap.mdd, Src/Modules/termcap.mdd,
        Src/Modules/terminfo.mdd: only link modules and main binary
        against needed libraries.

-andrej


^ permalink raw reply	[flat|nested] 14+ messages in thread

* What about this? (was: RE: Zsh broken after the latest build patches)
  2001-04-21 10:51 ` Andrej Borsenkow
@ 2001-04-23  4:53   ` Andrej Borsenkow
  2001-04-23 16:24     ` Bart Schaefer
  0 siblings, 1 reply; 14+ messages in thread
From: Andrej Borsenkow @ 2001-04-23  4:53 UTC (permalink / raw)
  To: ZSH Workers Mailing List

> >
> > I do not know, which one exactly is responsible
>
> I backed out the following and now zsh works again.
>
> 2001-04-19  Clint Adams  <schizo@debian.org>
>

I meant, in my local version, not in CVS of course. The problem is, I
currently cannot even update cvs ...

-andrej


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: What about this? (was: RE: Zsh broken after the latest build patches)
  2001-04-23  4:53   ` What about this? (was: RE: Zsh broken after the latest build patches) Andrej Borsenkow
@ 2001-04-23 16:24     ` Bart Schaefer
  2001-04-23 16:44       ` Peter Stephenson
  2001-04-23 18:00       ` Andrej Borsenkow
  0 siblings, 2 replies; 14+ messages in thread
From: Bart Schaefer @ 2001-04-23 16:24 UTC (permalink / raw)
  To: ZSH Workers Mailing List

On Apr 23,  8:53am, Andrej Borsenkow wrote:
} Subject: What about this? (was: RE: Zsh broken after the latest build patc
}
} > I backed out the following and now zsh works again.
} >
} > 2001-04-19  Clint Adams  <schizo@debian.org>
} 
} I meant, in my local version, not in CVS of course. The problem is, I
} currently cannot even update cvs ...

I agree that we should either back this out entirely, or branch for
the 4.0.1 release and back it out on the branch.

Andrej, is is possible to back those patches out simply by returning to
an earlier CVS revision of the files, or have some of the other termcap
or terminfo config changes gotten mised in so the shared linking changes
have to be backed out separately?  If returning to an earlier revision
is sufficient, we can simply create the branch off those revisions, else
we'll have to branch from the current state and then back them out.

If the consensus is to branch, the recommended procedure is to first tag
(without -b) the pre-branch revisions as the "branch point" and then do
the actual branch tag (with -b).  This makes it easier to identify the
common ancestor should code have to be merged onto or from the branch.

I can deal with this if necessary.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: What about this? (was: RE: Zsh broken after the latest build patches)
  2001-04-23 16:24     ` Bart Schaefer
@ 2001-04-23 16:44       ` Peter Stephenson
  2001-04-23 17:41         ` Bart Schaefer
  2001-04-23 23:08         ` PATCH: " Clint Adams
  2001-04-23 18:00       ` Andrej Borsenkow
  1 sibling, 2 replies; 14+ messages in thread
From: Peter Stephenson @ 2001-04-23 16:44 UTC (permalink / raw)
  To: Zsh hackers list

> I agree that we should either back this out entirely, or branch for
> the 4.0.1 release and back it out on the branch.

I'd prefer, if possible, to back them off everywhere and apply them back
later.  The only good reason for using a branch would be to do simultaneous
development.  I don't think that's necessary so near to the 4.0.1 release.

Once this is dealt with, unless anyone still has remaining tweaks they
think are necessary, I shall make a final pre-release with a view to
releasing it as 4.0.1.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: What about this? (was: RE: Zsh broken after the latest build patches)
  2001-04-23 16:44       ` Peter Stephenson
@ 2001-04-23 17:41         ` Bart Schaefer
  2001-04-23 17:58           ` Peter Stephenson
  2001-04-23 23:08         ` PATCH: " Clint Adams
  1 sibling, 1 reply; 14+ messages in thread
From: Bart Schaefer @ 2001-04-23 17:41 UTC (permalink / raw)
  To: Zsh hackers list

On Apr 23,  5:44pm, Peter Stephenson wrote:
} Subject: Re: What about this? (was: RE: Zsh broken after the latest build 
} 
} I'd prefer, if possible, to back them off everywhere and apply them back
} later.  The only good reason for using a branch would be to do simultaneous
} development.  I don't think that's necessary so near to the 4.0.1 release.

The reason to branch for a release is to separate bug fixes from feature
additions.  If there's a serious bug, you can release a 4.0.2 without
including all the developments that have occurred in the meantime.

However, I don't feel strongly that it's necessary.  We can always branch
after the fact as long as the release revisions have a tag.
 
} Once this is dealt with, unless anyone still has remaining tweaks they
} think are necessary, I shall make a final pre-release with a view to
} releasing it as 4.0.1.

I looked briefly at the getindex() double-quote thing I mentioned [try to
eliminate the strchr()] and found that in fact the callers of getindex()
generally are NOT equipped to say whether the call was in double-quotes.
I'd have to add an argument to fetchvalue() as well [or a new PM_ flag]
to propagate `qt' down from paramsubst().  A new PM_ flag might not be a
bad idea ... any thoughts?

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: What about this? (was: RE: Zsh broken after the latest build patches)
  2001-04-23 17:41         ` Bart Schaefer
@ 2001-04-23 17:58           ` Peter Stephenson
  0 siblings, 0 replies; 14+ messages in thread
From: Peter Stephenson @ 2001-04-23 17:58 UTC (permalink / raw)
  To: Zsh hackers list

Bart wrote:
> On Apr 23,  5:44pm, Peter Stephenson wrote:
> } Subject: Re: What about this? (was: RE: Zsh broken after the latest build 
> } 
> } I'd prefer, if possible, to back them off everywhere and apply them back
> } later.  The only good reason for using a branch would be to do simultaneous
> } development.  I don't think that's necessary so near to the 4.0.1 release.
> 
> The reason to branch for a release is to separate bug fixes from feature
> additions.

We will very likely be branching to produce 4.1 (if we can find some excuse
--- probably improved parameter code).  I was hoping to delay that as late
as possible to avoid any immediate fallout from 4.0.1 having to be applied
twice.  But if the termcap stuff gets re-applied soon, and can't be
resolved, we may be back where you suggest.  I would hope it wouldn't be
important enough to hold off until a separate development branch.

It's easy --- probably easier --- to branch after the release if necessary,
so I don't think this is a big worry.

> I looked briefly at the getindex() double-quote thing I mentioned [try to
> eliminate the strchr()] and found that in fact the callers of getindex()
> generally are NOT equipped to say whether the call was in double-quotes.
> I'd have to add an argument to fetchvalue() as well [or a new PM_ flag]
> to propagate `qt' down from paramsubst().  A new PM_ flag might not be a
> bad idea ... any thoughts?

You mean a PM_ flag that doesn't get stored with parameters, just used when
substituting?  It could certainly be useful.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: What about this? (was: RE: Zsh broken after the latest build patches)
  2001-04-23 16:24     ` Bart Schaefer
  2001-04-23 16:44       ` Peter Stephenson
@ 2001-04-23 18:00       ` Andrej Borsenkow
  2001-04-23 18:22         ` Bart Schaefer
  1 sibling, 1 reply; 14+ messages in thread
From: Andrej Borsenkow @ 2001-04-23 18:00 UTC (permalink / raw)
  To: ZSH Workers Mailing List

On Mon, 23 Apr 2001, Bart Schaefer wrote:

> On Apr 23,  8:53am, Andrej Borsenkow wrote:
> } Subject: What about this? (was: RE: Zsh broken after the latest build patc
> }
> } > I backed out the following and now zsh works again.
> } >
> } > 2001-04-19  Clint Adams  <schizo@debian.org>
> }
> } I meant, in my local version, not in CVS of course. The problem is, I
> } currently cannot even update cvs ...
>
> I agree that we should either back this out entirely, or branch for
> the 4.0.1 release and back it out on the branch.
>
> Andrej, is is possible to back those patches out simply by returning to
> an earlier CVS revision of the files, or have some of the other termcap
> or terminfo config changes gotten mised in so the shared linking changes
> have to be backed out separately?  If returning to an earlier revision
> is sufficient, we can simply create the branch off those revisions, else
> we'll have to branch from the current state and then back them out.
>

It should (still) be possible to just reverse-apply four mentioned patches
(actually, there were three, and one unposted, but it was one line change.
Of course, unposted cvs commits make it harder to unapply them). At this
time patch applied cleanly with one line fuzz in termcap.mdd (I believe).
I actually meant, that I cannot just use cvs update currently because it
will reapply the patches again.

With everyone's consent I'll try to backout them again on up-to-date cvs
and commit it.

-andrej


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: What about this? (was: RE: Zsh broken after the latest build patches)
  2001-04-23 18:00       ` Andrej Borsenkow
@ 2001-04-23 18:22         ` Bart Schaefer
  2001-04-23 19:44           ` PATCH: revert Clint's build patches Andrej Borsenkow
  2001-04-24  5:33           ` PATCH: The last, I really hope, subscripting tweak for a long while Bart Schaefer
  0 siblings, 2 replies; 14+ messages in thread
From: Bart Schaefer @ 2001-04-23 18:22 UTC (permalink / raw)
  To: Zsh hackers list

On Apr 23,  6:58pm, Peter Stephenson wrote:
} Subject: Re: What about this? (was: RE: Zsh broken after the latest build 
}
} > I'd have to add an argument to fetchvalue() as well [or a new PM_ flag]
} > to propagate `qt' down from paramsubst().  A new PM_ flag might not be a
} > bad idea ... any thoughts?
} 
} You mean a PM_ flag that doesn't get stored with parameters, just used when
} substituting?  It could certainly be useful.

Yes, like SCANPM_MATCHMANY and friends.

On Apr 23, 10:00pm, Andrej Borsenkow wrote:
} Subject: Re: What about this? (was: RE: Zsh broken after the latest build 
}
} I actually meant, that I cannot just use cvs update currently because it
} will reapply the patches again.

That's not true.  If you've modified your files and then do a "cvs update",
it should leave any changes that you made alone, and simply merge in any
new changes since the previous time you did "cvs update".

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 14+ messages in thread

* PATCH: revert Clint's build patches
  2001-04-23 18:22         ` Bart Schaefer
@ 2001-04-23 19:44           ` Andrej Borsenkow
  2001-04-24  6:40             ` Bart Schaefer
  2001-04-24  5:33           ` PATCH: The last, I really hope, subscripting tweak for a long while Bart Schaefer
  1 sibling, 1 reply; 14+ messages in thread
From: Andrej Borsenkow @ 2001-04-23 19:44 UTC (permalink / raw)
  To: Zsh hackers list

[-- Attachment #1: Type: TEXT/PLAIN, Size: 607 bytes --]

>
> On Apr 23, 10:00pm, Andrej Borsenkow wrote:
> } Subject: Re: What about this? (was: RE: Zsh broken after the latest build
> }
> } I actually meant, that I cannot just use cvs update currently because it
> } will reapply the patches again.
>
> That's not true.  If you've modified your files and then do a "cvs update",
> it should leave any changes that you made alone, and simply merge in any
> new changes since the previous time you did "cvs update".
>

Ehem ... really. O.K., so here is diff against current CVS that reverts
Clint's patches (sorry). I commit it when I have article number.

-andrej

[-- Attachment #2: Type: TEXT/PLAIN, Size: 11273 bytes --]

Index: acconfig.h
===================================================================
RCS file: /cvsroot/zsh/zsh/acconfig.h,v
retrieving revision 1.7
diff -u -r1.7 acconfig.h
--- acconfig.h	2001/04/19 14:45:41	1.7
+++ acconfig.h	2001/04/23 19:41:20
@@ -317,9 +317,3 @@
 
 /* Define if you have the terminfo strnames symbol.  */
 #undef HAVE_STRNAMES
-
-/* Define if you have the cap library.  */
-#undef HAVE_LIBCAP
-
-/* Define if you have the socket library.  */
-#undef HAVE_LIBSOCKET
Index: aczsh.m4
===================================================================
RCS file: /cvsroot/zsh/zsh/aczsh.m4,v
retrieving revision 1.9
diff -u -r1.9 aczsh.m4
--- aczsh.m4	2001/04/19 14:45:41	1.9
+++ aczsh.m4	2001/04/23 19:41:21
@@ -683,27 +683,3 @@
 	then LIBS="$4"
 	else LIBS="$enable_libs"
 	fi)])
-
-dnl zsh_SEARCH_LIBS(FUNCTION, SEARCH-LIBS [, ACTION-IF-FOUND
-dnl            [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]])
-dnl Search for a library defining FUNC, if it's not already available.
-
-AC_DEFUN(zsh_SEARCH_LIBS,
-[AC_PREREQ([2.13])
-AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1],
-[ac_func_search_save_LIBS="$LIBS"
-ac_cv_search_$1="no"
-AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="none required"])
-test "$ac_cv_search_$1" = "no" && for i in $2; do
-LIBS="-l$i $5 $ac_func_search_save_LIBS"
-AC_TRY_LINK_FUNC([$1],
-[ac_cv_search_$1="-l$i"
-break])
-done
-LIBS="$ac_func_search_save_LIBS"])
-if test "$ac_cv_search_$1" != "no"; then
-  test "$ac_cv_search_$1" = "none required" || ZS_LIBS="$ac_cv_search_$1"
-  $3
-else :
-  $4
-fi])
Index: configure.in
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.in,v
retrieving revision 1.47
diff -u -r1.47 configure.in
--- configure.in	2001/04/19 18:35:31	1.47
+++ configure.in	2001/04/23 19:41:21
@@ -504,7 +504,7 @@
 dnl may happen.
 AC_CHECK_LIB(c, printf, [LIBS="$LIBS -lc"])
 
-AC_CHECK_LIB(m, pow, [LIBS_M="-lm"])
+AC_CHECK_LIB(m, pow)
 
 dnl Prefer BSD termcap library to SysV curses library, except on certain
 dnl SYSV-derived systems.
@@ -514,12 +514,7 @@
   *)             termcap_curses_order="termcap curses ncurses" ;;
 esac
 
-zsh_SEARCH_LIBS(tgetent, [$termcap_curses_order])
-LIBS_TERMCAP=$ZS_LIBS
-
-zsh_SEARCH_LIBS(tigetstr, [$termcap_curses_order])
-LIBS_TERMINFO=$ZS_LIBS
-
+AC_SEARCH_LIBS(tgetent, [$termcap_curses_order])
 AC_MSG_CHECKING(if boolcodes is available)
 AC_TRY_COMPILE([#include <curses.h>
 #include <term.h>], [char **test = boolcodes;],
@@ -554,8 +549,7 @@
 dnl Some systems (Solaris 2.x, Linux Redhat 5.x) require
 dnl libnsl (Network Services Library) to find yp_all
 
-zsh_SEARCH_LIBS(yp_all, nsl)
-LIBS_YP=$ZS_LIBS
+AC_SEARCH_LIBS(yp_all, nsl)
 
 dnl I am told that told that unicos reqire these for nis_list
 if test `echo $host_os | sed 's/^\(unicos\).*/\1/'` = unicos; then
@@ -566,11 +560,9 @@
   AC_CHECK_LIB(dl, dlopen)
 fi
 
-AC_CHECK_LIB(cap, cap_get_proc, [LIBS_CAP="-lcap"
-AC_DEFINE(HAVE_LIBCAP)])
+AC_CHECK_LIB(cap, cap_get_proc)
 
-AC_CHECK_LIB(socket, socket, [LIBS_SOCKET="-lsocket"
-AC_DEFINE(HAVE_LIBSOCKET)])
+AC_CHECK_LIB(socket, socket)
 
 dnl ---------------------
 dnl CHECK TERMCAP LIBRARY
@@ -839,9 +831,6 @@
 dnl need to integrate this function
 dnl AC_FUNC_STRFTIME
 
-SAVELIBS=$LIBS
-LIBS="$LIBS_CAP $LIBS_YP $LIBS_M $LIBS_TERMCAP $LIBS_TERMINFO $LIBS"
-
 AC_CHECK_FUNCS(strftime difftime gettimeofday \
 	       select poll \
 	       readlink lstat lchown faccessx fchdir ftruncate \
@@ -898,9 +887,6 @@
   AC_DEFINE(TGETENT_ACCEPTS_NULL)
 fi
 
-MAINLIBS="$LIBS_CAP $LIBS_SOCKET $LIBS_M $LIBS_TERMCAP $LIBS_TERMINFO $LIBS_YP $SAVELIBS"
-LIBS=$SAVELIBS
-
 AC_FUNC_MMAP
 if test x$ac_cv_func_mmap_fixed_mapped = xyes; then
   AC_CHECK_FUNCS(munmap msync)
@@ -1689,16 +1675,10 @@
   test "$zsh_cv_shared_environ" = yes || dynamic=no
 dnl  test "$zsh_cv_sys_dynamic_broken" = no || dynamic=no
   if test "$ac_cv_func_tgetent" = yes; then
-    SAVELIBS=$LIBS
-    LIBS="$LIBS_TERMCAP $LIBS"
     zsh_SHARED_FUNCTION([tgetent])
-    LIBS=$SAVELIBS
   fi
   if test "$ac_cv_func_tigetstr" = yes; then
-    SAVELIBS=$LIBS
-    LIBS="$LIBS_TERMINFO $LIBS"
     zsh_SHARED_FUNCTION([tigetstr])
-    LIBS=$SAVELIBS
   fi
 fi
 
@@ -1772,13 +1752,6 @@
 AC_SUBST(MOD_IMPORT_VARIABLE)dnl
 AC_SUBST(MOD_IMPORT_FUNCTION)dnl
 AC_SUBST(EXTRAZSHOBJS)dnl
-AC_SUBST(MAINLIBS)dnl
-AC_SUBST(LIBS_M)dnl
-AC_SUBST(LIBS_CAP)dnl
-AC_SUBST(LIBS_SOCKET)dnl
-AC_SUBST(LIBS_TERMCAP)dnl
-AC_SUBST(LIBS_TERMINFO)dnl
-AC_SUBST(LIBS_YP)dnl
 
 # Generate config.modules.  We look for *.mdd files in first and second
 # level subdirectories.  Any existing line not containing 'auto=y' will be
@@ -1929,8 +1902,7 @@
 module linker flags       : ${LDFLAGS} ${LIBLDFLAGS} ${DLLDFLAGS}"
 fi
 echo "\
-main library flags        : ${MAINLIBS}
-base library flags        : ${LIBS}
+library flags             : ${LIBS}
 installation basename     : ${tzsh_name}
 binary install path       : ${zshbin2}
 man page install path     : ${zshman}
Index: Config/defs.mk.in
===================================================================
RCS file: /cvsroot/zsh/zsh/Config/defs.mk.in,v
retrieving revision 1.6
diff -u -r1.6 defs.mk.in
--- Config/defs.mk.in	2001/04/19 17:55:02	1.6
+++ Config/defs.mk.in	2001/04/23 19:41:21
@@ -63,15 +63,6 @@
 EXPOPT          = @EXPOPT@
 IMPOPT          = @IMPOPT@
 
-# extra libraries
-MAINLIBS        = @MAINLIBS@
-LIBS_M          = @LIBS_M@
-LIBS_CAP        = @LIBS_CAP@
-LIBS_SOCKET     = @LIBS_SOCKET@
-LIBS_TERMCAP    = @LIBS_TERMCAP@
-LIBS_TERMINFO   = @LIBS_TERMINFO@
-LIBS_YP         = @LIBS_YP@
-
 # utilities
 AWK             = @AWK@
 YODL            = @YODL@
Index: Src/Makefile.in
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Makefile.in,v
retrieving revision 1.9
diff -u -r1.9 Makefile.in
--- Src/Makefile.in	2001/04/19 17:55:02	1.9
+++ Src/Makefile.in	2001/04/23 19:41:22
@@ -82,11 +82,11 @@
 
 zsh$(EXEEXT): $(@L@IBZSH) $(@L@STMP) $(MAIN_OBJS) zsh.export $(EXTRAZSHOBJS)
 	rm -f $@
-	$(@L@DRUNPATH) $(LINK) $(MAIN_OBJS) $(EXTRAZSHOBJS) $(@L@LIST) $(ZSH_@E@XPORT) $(@L@IBZSH) $(MAINLIBS)
+	$(@L@DRUNPATH) $(LINK) $(MAIN_OBJS) $(EXTRAZSHOBJS) $(@L@LIST) $(ZSH_@E@XPORT) $(@L@IBZSH) $(LIBS)
 
 $(LIBZSH): $(LIBOBJS) $(NSTMP)
 	rm -f $@
-	$(DLLINK) $(LIBOBJS) $(NLIST) $(MAINLIBS)
+	$(DLLINK) $(LIBOBJS) $(NLIST) $(LIBS)
 
 zsh.res.o: $(sdir)/zsh.rc $(sdir)/zsh.ico
 	windres -O coff --include-dir $(sdir) -i $(sdir)/zsh.rc -o zsh.res.o
Index: Src/mkmakemod.sh
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/mkmakemod.sh,v
retrieving revision 1.9
diff -u -r1.9 mkmakemod.sh
--- Src/mkmakemod.sh	2001/04/19 14:45:41	1.9
+++ Src/mkmakemod.sh	2001/04/23 19:41:22
@@ -27,7 +27,6 @@
 #   autoprefixconds like autoinfixconds, but for prefix condition codes
 #   autoparams      parameters defined by the module, for autoloading
 #   automathfuncs   math functions defined by the module, for autoloading
-#   extralibs       libraries specific to this module (default none)
 #   objects         .o files making up this module (*must* be defined)
 #   proto           .syms files for this module (default generated from $objects)
 #   headers         extra headers for this module (default none)
@@ -191,8 +190,7 @@
 
 	unset name moddeps nozshdep alwayslink hasexport
 	unset autobins autoinfixconds autoprefixconds autoparams automathfuncs
-	unset extralibs objects proto headers hdrdeps otherincs
-	unset EXTRALIBS
+	unset objects proto headers hdrdeps otherincs
 	. $top_srcdir/$the_subdir/${mddname}.mdd
 	q_name=`echo $name | sed 's,Q,Qq,g;s,_,Qu,g;s,/,Qs,g'`
 	test -n "${moddeps+set}" || moddeps=
@@ -201,24 +199,6 @@
 	    proto=`echo $objects '' | sed 's,\.o ,.syms ,g'`
 
 	dobjects=`echo $objects '' | sed 's,\.o ,..o ,g'`
-
-	for lib in $extralibs; do
-	case $lib in
-	m) EXTRALIBS="$EXTRALIBS \$(LIBS_M)"
-	;;
-	cap) EXTRALIBS="$EXTRALIBS \$(LIBS_CAP)"
-	;;
-	socket) EXTRALIBS="$EXTRALIBS \$(LIBS_SOCKET)"
-	;;
-	termcap) EXTRALIBS="$EXTRALIBS \$(LIBS_TERMCAP)"
-	;;
-	terminfo) EXTRALIBS="$EXTRALIBS \$(LIBS_TERMINFO)"
-	;;
-	yp) EXTRALIBS="$EXTRALIBS \$(LIBS_YP)"
-	;;
-	esac
-	done
-
 	modhdeps=
 	mododeps=
 	exportdeps=
@@ -322,7 +302,6 @@
 	echo "NXPIMP_${mddname} ="
 	echo "LINKMODS_${mddname} = $mododeps"
 	echo "NOLINKMODS_${mddname} = "
-	echo "EXTRALIBS_${mddname} = $EXTRALIBS"
 	echo
 	echo "proto.${mddname}: \$(EPRO_${mddname})"
 	echo "\$(SYMS_${mddname}): \$(PROTODEPS)"
@@ -349,7 +328,7 @@
 	    echo
 	    echo "${mddname}.\$(DL_EXT): \$(MODDOBJS_${mddname}) ${mddname}.export $exportdeps \$(@LINKMODS@_${mddname})"
 	    echo '	rm -f $@'
-	    echo "	\$(DLLINK) \$(@E@XPIMP_$mddname) \$(@E@NTRYOPT) \$(MODDOBJS_${mddname}) \$(@LINKMODS@_${mddname}) $EXTRALIBS \$(LIBS)"
+	    echo "	\$(DLLINK) \$(@E@XPIMP_$mddname) \$(@E@NTRYOPT) \$(MODDOBJS_${mddname}) \$(@LINKMODS@_${mddname}) \$(LIBS) "
 	    echo
 	fi
 	echo "${mddname}.mdhi: ${mddname}.mdhs \$(INCS_${mddname})"
Index: Src/zsh.mdd
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/zsh.mdd,v
retrieving revision 1.9
diff -u -r1.9 zsh.mdd
--- Src/zsh.mdd	2001/04/19 17:00:53	1.9
+++ Src/zsh.mdd	2001/04/23 19:41:22
@@ -17,8 +17,6 @@
 headers="../config.h system.h zsh.h sigcount.h signals.h \
 prototypes.h hashtable.h ztype.h"
 
-#extralibs="m termcap yp"
-
 :<<\Make
 @CONFIG_MK@
 
Index: Src/Modules/cap.mdd
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/cap.mdd,v
retrieving revision 1.5
diff -u -r1.5 cap.mdd
--- Src/Modules/cap.mdd	2001/04/19 17:55:02	1.5
+++ Src/Modules/cap.mdd	2001/04/23 19:41:22
@@ -5,5 +5,3 @@
 autobins="cap getcap setcap"
 
 objects="cap.o"
-
-extralibs="cap"
Index: Src/Modules/termcap.mdd
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/termcap.mdd,v
retrieving revision 1.8
diff -u -r1.8 termcap.mdd
--- Src/Modules/termcap.mdd	2001/04/20 13:31:26	1.8
+++ Src/Modules/termcap.mdd	2001/04/23 19:41:22
@@ -16,5 +16,3 @@
 autoparams="termcap"
 
 objects="termcap.o"
-
-extralibs="termcap"
Index: Src/Modules/terminfo.mdd
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/terminfo.mdd,v
retrieving revision 1.9
diff -u -r1.9 terminfo.mdd
--- Src/Modules/terminfo.mdd	2001/04/19 17:55:02	1.9
+++ Src/Modules/terminfo.mdd	2001/04/23 19:41:22
@@ -16,5 +16,3 @@
 autoparams="terminfo"
 
 objects="terminfo.o"
-
-extralibs="terminfo"
Index: Src/Modules/zftp.mdd
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/zftp.mdd,v
retrieving revision 1.5
diff -u -r1.5 zftp.mdd
--- Src/Modules/zftp.mdd	2001/04/19 17:55:02	1.5
+++ Src/Modules/zftp.mdd	2001/04/23 19:41:22
@@ -6,5 +6,3 @@
 autobins="zftp"
 
 objects="zftp.o"
-
-extralibs="socket"

^ permalink raw reply	[flat|nested] 14+ messages in thread

* PATCH: Re: What about this? (was: RE: Zsh broken after the latest build patches)
  2001-04-23 16:44       ` Peter Stephenson
  2001-04-23 17:41         ` Bart Schaefer
@ 2001-04-23 23:08         ` Clint Adams
  1 sibling, 0 replies; 14+ messages in thread
From: Clint Adams @ 2001-04-23 23:08 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh hackers list

> I'd prefer, if possible, to back them off everywhere and apply them back
> later.  The only good reason for using a branch would be to do simultaneous
> development.  I don't think that's necessary so near to the 4.0.1 release.

I agree with holding off until 4.0.1 is released and 4.1 is branched.

> Once this is dealt with, unless anyone still has remaining tweaks they
> think are necessary, I shall make a final pre-release with a view to
> releasing it as 4.0.1.

Here's one such tweak.

Index: Doc/Zsh/mod_termcap.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/mod_termcap.yo,v
retrieving revision 1.1
diff -u -r1.1 mod_termcap.yo
--- Doc/Zsh/mod_termcap.yo	2000/12/03 23:32:12	1.1
+++ Doc/Zsh/mod_termcap.yo	2001/04/23 23:05:21
@@ -5,9 +5,19 @@
 
 startitem()
 findex(echotc)
-cindex(termcap string, printing)
+cindex(termcap value, printing)
 item(tt(echotc) var(cap) [ var(arg) ... ])(
-Output the termcap string corresponding to the capability
+Output the termcap value corresponding to the capability
 var(cap), with optional arguments.
+)
+enditem()
+
+The tt(zsh/termcap) module makes available one parameter:
+
+startitem()
+vindex(termcap)
+item(tt(termcap))(
+An associative array that maps termcap capability codes to
+their values.
 )
 enditem()
Index: Doc/Zsh/mod_terminfo.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/mod_terminfo.yo,v
retrieving revision 1.1
diff -u -r1.1 mod_terminfo.yo
--- Doc/Zsh/mod_terminfo.yo	2000/12/03 23:32:12	1.1
+++ Doc/Zsh/mod_terminfo.yo	2001/04/23 23:05:32
@@ -5,9 +5,9 @@
 
 startitem()
 findex(echoti)
-cindex(terminfo string, printing)
+cindex(terminfo value, printing)
 item(tt(echoti) var(cap))(
-Output the terminfo string corresponding to the capability
+Output the terminfo value corresponding to the capability
 var(cap).
 )
 enditem()


^ permalink raw reply	[flat|nested] 14+ messages in thread

* PATCH:  The last, I really hope, subscripting tweak for a long while
  2001-04-23 18:22         ` Bart Schaefer
  2001-04-23 19:44           ` PATCH: revert Clint's build patches Andrej Borsenkow
@ 2001-04-24  5:33           ` Bart Schaefer
  1 sibling, 0 replies; 14+ messages in thread
From: Bart Schaefer @ 2001-04-24  5:33 UTC (permalink / raw)
  To: Zsh hackers list

On Apr 23,  6:22pm, Bart Schaefer wrote:
}
} On Apr 23,  6:58pm, Peter Stephenson wrote:
} }
} } You mean a PM_ flag that doesn't get stored with parameters, just used when
} } substituting?  It could certainly be useful.
} 
} Yes, like SCANPM_MATCHMANY and friends.

OK, here's that patch.  It eliminates the extra strchr() at the top of
getindex(), which is very nice.

I fixed a couple of comments and a couple of error messages, and also
figured out why `typeset -A A; A[*]=star' failed silently (and made it
fail noisily instead).  And I added a test of ${(P)...} combined with
wacky associative array quoting.

I really want to stop working on this now.

diff -ru -x CVS zsh-forge/current/Src/glob.c zsh-4.0/Src/glob.c
--- zsh-forge/current/Src/glob.c	Tue Jan 16 05:44:20 2001
+++ zsh-4.0/Src/glob.c	Mon Apr 23 08:57:14 2001
@@ -1344,7 +1344,7 @@
 			    v.pm = NULL;
 			    v.end = -1;
 			    v.inv = 0;
-			    if (getindex(&s, &v) || s == os) {
+			    if (getindex(&s, &v, 0) || s == os) {
 				zerr("invalid subscript", NULL, 0);
 				restore_globstate(saved);
 				return;
diff -ru -x CVS zsh-forge/current/Src/params.c zsh-4.0/Src/params.c
--- zsh-forge/current/Src/params.c	Mon Apr 23 08:20:23 2001
+++ zsh-4.0/Src/params.c	Mon Apr 23 22:09:21 2001
@@ -845,7 +845,8 @@
 		sep = "\n";
 		break;
 	    case 'e':
-		/* obsolate compatibility flag without any real effect */
+		/* Compatibility flag with no effect except to prevent *
+		 * special interpretation by getindex() of `*' or `@'. */
 		break;
 	    case 'n':
 		t = get_strarg(++s);
@@ -876,7 +877,7 @@
 		break;
 	    case 's':
 		/* This gives the string that separates words *
-		 * (for use with the `w' flag.                */
+		 * (for use with the `w' flag).               */
 		t = get_strarg(++s);
 		if (!*t)
 		    goto flagerr;
@@ -1177,11 +1178,10 @@
 
 /**/
 int
-getindex(char **pptr, Value v)
+getindex(char **pptr, Value v, int dq)
 {
     int start, end, inv = 0;
     char *s = *pptr, *tbrack;
-    int dq = !!strchr(s, Dnull);
 
     *s++ = '[';
     s = parse_subscript(s, dq);	/* Error handled after untokenizing */
@@ -1358,7 +1358,7 @@
 	v->start = 0;
 	v->end = -1;
 	if (bracks > 0 && (*s == '[' || *s == Inbrack)) {
-	    if (getindex(&s, v)) {
+	    if (getindex(&s, v, (flags & SCANPM_DQUOTED))) {
 		*pptr = s;
 		return v;
 	    }
@@ -1409,7 +1409,7 @@
 	/* (!v->isarr) should be impossible unless emulating ksh */
 	if (!v->isarr && emulation == EMULATE_KSH) {
 	    s = dupstring("[0]");
-	    if (getindex(&s, v) == 0)
+	    if (getindex(&s, v, 0) == 0)
 		s = getstrvalue(v);
 	    return s;
 	} /* else fall through */
@@ -1575,6 +1575,10 @@
 	zsfree(val);
 	return;
     }
+    if (v->pm->flags & PM_HASHED) {
+	zerr("%s: attempt to set slice of associative array", v->pm->nam, 0);
+	return;
+    }
     v->pm->flags &= ~PM_UNSET;
     switch (PM_TYPE(v->pm->flags)) {
     case PM_SCALAR:
@@ -1698,7 +1702,8 @@
     }
     if (!(PM_TYPE(v->pm->flags) & (PM_ARRAY|PM_HASHED))) {
 	freearray(val);
-	zerr("attempt to assign array value to non-array", NULL, 0);
+	zerr("%s: attempt to assign array value to non-array",
+	     v->pm->nam, 0);
 	return;
     }
     if (v->start == 0 && v->end == -1) {
@@ -1712,7 +1717,8 @@
 
 	if ((PM_TYPE(v->pm->flags) == PM_HASHED)) {
 	    freearray(val);
-	    zerr("attempt to set slice of associative array", NULL, 0);
+	    zerr("%s: attempt to set slice of associative array",
+		 v->pm->nam, 0);
 	    return;
 	}
 	if (v->inv && unset(KSHARRAYS))
@@ -1906,7 +1912,8 @@
 	*ss = '[';
 	if (v && PM_TYPE(v->pm->flags) == PM_HASHED) {
 	    unqueue_signals();
-	    zerr("attempt to set slice of associative array", NULL, 0);
+	    zerr("%s: attempt to set slice of associative array",
+		 v->pm->nam, 0);
 	    freearray(val);
 	    errflag = 1;
 	    return NULL;
diff -ru -x CVS zsh-forge/current/Src/subst.c zsh-4.0/Src/subst.c
--- zsh-forge/current/Src/subst.c	Fri Feb 16 09:16:14 2001
+++ zsh-4.0/Src/subst.c	Mon Apr 23 20:20:42 2001
@@ -1068,7 +1068,7 @@
 	    s++;
 	v = (Value) NULL;
     } else if (aspar) {
-	if ((v = getvalue(&vbuf, &s, 1))) {
+	if ((v = fetchvalue(&vbuf, &s, 1, (qt ? SCANPM_DQUOTED : 0)))) {
 	    val = idbeg = getstrvalue(v);
 	    subexp = 1;
 	} else
@@ -1080,7 +1080,9 @@
 	if (!(v = fetchvalue(&vbuf, (subexp ? &ov : &s),
 			     (wantt ? -1 :
 			      ((unset(KSHARRAYS) || inbrace) ? 1 : -1)),
-			     hkeys|hvals|(arrasg ? SCANPM_ASSIGNING : 0))) ||
+			     hkeys|hvals|
+			     (arrasg ? SCANPM_ASSIGNING : 0)|
+			     (qt ? SCANPM_DQUOTED : 0))) ||
 	    (v->pm && (v->pm->flags & PM_UNSET)))
 	    vunset = 1;
 
@@ -1151,7 +1153,7 @@
 	    v->isarr = isarr;
 	    v->pm = pm;
 	    v->end = -1;
-	    if (getindex(&s, v) || s == os)
+	    if (getindex(&s, v, qt) || s == os)
 		break;
 	}
 	if ((isarr = v->isarr)) {
diff -ru -x CVS zsh-forge/current/Src/zsh.h zsh-4.0/Src/zsh.h
--- zsh-forge/current/Src/zsh.h	Tue Mar 13 07:32:43 2001
+++ zsh-4.0/Src/zsh.h	Mon Apr 23 20:11:24 2001
@@ -1148,6 +1148,7 @@
 #define SCANPM_MATCHMANY  (1<<5)
 #define SCANPM_ASSIGNING  (1<<6)
 #define SCANPM_KEYMATCH   (1<<7)
+#define SCANPM_DQUOTED    (1<<8)
 #define SCANPM_ISVAR_AT   ((-1)<<15)	/* Only sign bit is significant */
 
 /*
diff -ru -x CVS zsh-forge/current/Test/D06subscript.ztst zsh-4.0/Test/D06subscript.ztst
--- zsh-forge/current/Test/D06subscript.ztst	Mon Apr 23 08:20:23 2001
+++ zsh-4.0/Test/D06subscript.ztst	Mon Apr 23 22:20:13 2001
@@ -93,14 +93,15 @@
 >\? \2 \? \?
 >\\]
 
+  eval 'A[*]=star'
+1:Illegal associative array assignment
+?ZTST_execchunk:2: A: attempt to set slice of associative array
+
   x='*'
   A[$x]=xstar
   A[${(q)x}]=qxstar
   print -R ${(k)A[(r)xstar]} $A[$x]
   print -R ${(k)A[(r)qxstar]} $A[${(q)x}]
-  # A[*] is interpreted specially, assignment to it fails silently (oops)
-  A[*]=star
-  print -R ${(k)A[(r)star]} $A[$x]
   A[(e)*]=star
   A[\*]=backstar
   print -R ${(k)A[(r)star]} $A[(e)*]
@@ -108,7 +109,6 @@
 0:Associative array assignment
 >* xstar
 >\* qxstar
->xstar
 >* star
 >\* backstar
 
@@ -160,3 +160,21 @@
 >QqQq
 >qqq
 >QQQ
+
+  print ${x::=$A[$A[(i)one\"two\"three\"quotes]]}
+  print $x
+  print ${x::="$A[$A[(i)one\"two\"three\"quotes]]"}
+  print $x
+0:More keys with double quotes, used in assignment-expansion
+>qqq
+>qqq
+>QQQ
+>QQQ
+
+  qqq=lower
+  QQQ=upper
+  print ${(P)A[one\"two\"three\"quotes]}
+  print "${(P)A[$A[(i)one\"two\"three\"quotes]]}"
+0:Keys with double quotes and the (P) expansion flag
+>lower
+>upper

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: PATCH: revert Clint's build patches
  2001-04-23 19:44           ` PATCH: revert Clint's build patches Andrej Borsenkow
@ 2001-04-24  6:40             ` Bart Schaefer
  2001-04-24  8:50               ` Andrej Borsenkow
  0 siblings, 1 reply; 14+ messages in thread
From: Bart Schaefer @ 2001-04-24  6:40 UTC (permalink / raw)
  To: Zsh hackers list

On Apr 23, 11:44pm, Andrej Borsenkow wrote:
}
} O.K., so here is diff against current CVS that reverts
} Clint's patches (sorry). I commit it when I have article number.

Unfortunately, I'm now able to compile zsh but not link it:

Modules/termcap.o: In function `scantermcap':
/usr/src/local/zsh/zsh-4.0-build/Src/Modules/../../../zsh-4.0/Src/Modules/termcap.c:320:
undefined reference to `boolcodes'
/usr/src/local/zsh/zsh-4.0-build/Src/Modules/../../../zsh-4.0/Src/Modules/termcap.c:329:
undefined reference to `numcodes'
/usr/src/local/zsh/zsh-4.0-build/Src/Modules/../../../zsh-4.0/Src/Modules/termcap.c:338:
undefined reference to `strcodes'
Modules/termcap.o: In function `boot_zshQstermcap':
/usr/src/local/zsh/zsh-4.0-build/Src/Modules/../../../zsh-4.0/Src/Modules/termcap.c:366:
undefined reference to `setupterm'


This appears to happen because the checks to add the library containing
boolcodes, et al. to LIBS were removed, but the checks for whether those
variables are defined and which headers define them were NOT removed.

In any case AC_TRY_COMPILE is the wrong way to detect boolcodes, etc.
AC_TRY_LINK is better; that way even if the header happens to be there,
but the library is not, they won't be marked as available.

The following patch gets my compile and link going, but of course does
not enable $terminfo or echoti on my system, and uses the fallback lists
of capcodes for $termcap.  However, I don't know whether to add

AC_SEARCH_LIBS(setupterm, ...)

or

AC_SEARCH_LIBS(tigetstr, ...)

or both.

diff -ru -x CVS zsh-forge/current/Src/Modules/termcap.c zsh-4.0/Src/Modules/termcap.c
--- zsh-forge/current/Src/Modules/termcap.c	Sun Apr 22 09:35:16 2001
+++ zsh-4.0/Src/Modules/termcap.c	Mon Apr 23 23:28:56 2001
@@ -362,7 +362,7 @@
 boot_(Module m)
 {
 #ifdef HAVE_TGETENT
-# if defined(HAVE_CURSES_H) && defined(HAVE_TERM_H)
+# ifdef HAVE_SETUPTERM
     setupterm((char *)0, 1, (int *)0);
 # endif
 
diff -ru -x CVS zsh-forge/current/Src/Modules/terminfo.c zsh-4.0/Src/Modules/terminfo.c
--- zsh-forge/current/Src/Modules/terminfo.c	Sun Apr 22 09:35:16 2001
+++ zsh-4.0/Src/Modules/terminfo.c	Mon Apr 23 23:29:19 2001
@@ -347,7 +347,9 @@
 boot_(Module m)
 {
 #ifdef HAVE_TIGETSTR
+# ifdef HAVE_SETUPTERM
     setupterm((char *)0, 1, (int *)0);
+# endif
 
     if (!createtihash())
     	return 1;
diff -ru -x CVS zsh-forge/current/configure.in zsh-4.0/configure.in
--- zsh-forge/current/configure.in	Mon Apr 23 22:33:56 2001
+++ zsh-4.0/configure.in	Mon Apr 23 23:28:42 2001
@@ -516,32 +516,32 @@
 
 AC_SEARCH_LIBS(tgetent, [$termcap_curses_order])
 AC_MSG_CHECKING(if boolcodes is available)
-AC_TRY_COMPILE([#include <curses.h>
+AC_TRY_LINK([#include <curses.h>
 #include <term.h>], [char **test = boolcodes;],
 AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes, boolcodes=no)
 AC_MSG_RESULT($boolcodes)
 AC_MSG_CHECKING(if numcodes is available)
-AC_TRY_COMPILE([#include <curses.h>
+AC_TRY_LINK([#include <curses.h>
 #include <term.h>], [char **test = numcodes;],
 AC_DEFINE(HAVE_NUMCODES) numcodes=yes, numcodes=no)
 AC_MSG_RESULT($numcodes)
 AC_MSG_CHECKING(if strcodes is available)
-AC_TRY_COMPILE([#include <curses.h>
+AC_TRY_LINK([#include <curses.h>
 #include <term.h>], [char **test = strcodes;],
 AC_DEFINE(HAVE_STRCODES) strcodes=yes, strcodes=no)
 AC_MSG_RESULT($strcodes)
 AC_MSG_CHECKING(if boolnames is available)
-AC_TRY_COMPILE([#include <curses.h>
+AC_TRY_LINK([#include <curses.h>
 #include <term.h>], [char **test = boolnames;],
 AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes, boolnames=no)
 AC_MSG_RESULT($boolnames)
 AC_MSG_CHECKING(if numnames is available)
-AC_TRY_COMPILE([#include <curses.h>
+AC_TRY_LINK([#include <curses.h>
 #include <term.h>], [char **test = numnames;],
 AC_DEFINE(HAVE_NUMNAMES) numnames=yes, numnames=no)
 AC_MSG_RESULT($numnames)
 AC_MSG_CHECKING(if strnames is available)
-AC_TRY_COMPILE([#include <curses.h>
+AC_TRY_LINK([#include <curses.h>
 #include <term.h>], [char **test = strnames;],
 AC_DEFINE(HAVE_STRNAMES) strnames=yes, strnames=no)
 AC_MSG_RESULT($strnames)
@@ -853,7 +853,7 @@
 	       putenv getenv \
 	       brk sbrk \
 	       pathconf sysconf \
-	       tgetent tigetflag tigetnum tigetstr)
+	       tgetent tigetflag tigetnum tigetstr setupterm)
 AC_FUNC_STRCOLL
 
 dnl  Check if tgetent accepts NULL (and will allocate its own termcap buffer)


-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


^ permalink raw reply	[flat|nested] 14+ messages in thread

* RE: PATCH: revert Clint's build patches
  2001-04-24  6:40             ` Bart Schaefer
@ 2001-04-24  8:50               ` Andrej Borsenkow
  0 siblings, 0 replies; 14+ messages in thread
From: Andrej Borsenkow @ 2001-04-24  8:50 UTC (permalink / raw)
  To: Zsh hackers list

>
> On Apr 23, 11:44pm, Andrej Borsenkow wrote:
> }
> } O.K., so here is diff against current CVS that reverts
> } Clint's patches (sorry). I commit it when I have article number.
>
> Unfortunately, I'm now able to compile zsh but not link it:
>

Sorry for that. It did compile here but I have termcap==curses.

> The following patch gets my compile and link going, but of course does
> not enable $terminfo or echoti on my system, and uses the fallback lists
> of capcodes for $termcap.  However, I don't know whether to add
>

Just tested on cygwin and it compiles and runs O.K., termcap is there and
terminfo is missing just as expected. It should be possible to link against
ncurses on cygwin that should give us both - any takers? (Actually, ncurses is
now part of "official" cygwin - whatever it is - so it may make sense to
prefer it).

> AC_SEARCH_LIBS(setupterm, ...)
>
> or
>
> AC_SEARCH_LIBS(tigetstr, ...)
>
> or both.
>

The main problem is that if termcap and terminfo are different, we should not
probably allow both libraries be linked in zsh. And even if we link them to
corr. modules only, there is an issue of tracing TERM changes etc. Let's leave
it for now.

-andrej


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2001-04-24  8:51 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-21  8:37 Zsh broken after the latest build patches Andrej Borsenkow
2001-04-21 10:51 ` Andrej Borsenkow
2001-04-23  4:53   ` What about this? (was: RE: Zsh broken after the latest build patches) Andrej Borsenkow
2001-04-23 16:24     ` Bart Schaefer
2001-04-23 16:44       ` Peter Stephenson
2001-04-23 17:41         ` Bart Schaefer
2001-04-23 17:58           ` Peter Stephenson
2001-04-23 23:08         ` PATCH: " Clint Adams
2001-04-23 18:00       ` Andrej Borsenkow
2001-04-23 18:22         ` Bart Schaefer
2001-04-23 19:44           ` PATCH: revert Clint's build patches Andrej Borsenkow
2001-04-24  6:40             ` Bart Schaefer
2001-04-24  8:50               ` Andrej Borsenkow
2001-04-24  5:33           ` PATCH: The last, I really hope, subscripting tweak for a long while Bart Schaefer

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).