Samba 2.0.7pre2 readline patch
Michael Ju. Tokarev
mjt at tls.msk.ru
Wed Mar 29 13:49:51 GMT 2000
Just one correction/suggestion.
If you add -lncurses or -ltermcap or something to LIBS and add -lreadline
also, _all_ executables will depend on it and will load all this on startup.
I already suggested to create another variable, e.g. "TERMLIBS",
and add all this to here, not to LIBS/LDFLAGS.
So, patch to makefile should look as (I already posted this several times):
bin/smbwrapper:
> - @$(LD) @LDSHFLAGS@ -o $@ $(PICOBJS) $(LIBS)
> + @$(LD) @LDSHFLAGS@ -o $@ $(PICOBJS) $(LDFLAGS) $(TERMLIBS) $(LIBS)
bin/smbwrapper.32:
> - @$(LD) -32 @LDSHFLAGS@ -o $@ $(PICOBJS32) $(LIBS)
> + @$(LD) -32 @LDSHFLAGS@ -o $@ $(PICOBJS32) $(LDFLAGS) $(TERMLIBS) $(LIBS)
And add TERMLIBS = @TERMLIBS@ near LIBS = @LIBS@ on top of makefile.
And, ofcouse, add checks to configure so that it will place "-lreadline -lncurses"
(or something) to TERMLIBS (instead of LIBS) and calls AC_SUBST on it.
samba-technical at thewrittenword.com wrote:
>
> Under Solaris, readline won't work without terminal libraries. And, on
> IRIX, smbwrapper has readline support so it needs LDFLAGS if readline
> lives outside of the usual locations.
>
> --
> albert chin (china at thewrittenword.com)
>
> -- snip snip
> --- source/Makefile.in.orig Fri Mar 24 15:43:36 2000
> +++ source/Makefile.in Fri Mar 24 15:44:12 2000
> @@ -449,11 +449,11 @@
>
> bin/smbwrapper. at SHLIBEXT@: $(PICOBJS)
> @echo Linking shared library $@
> - @$(LD) @LDSHFLAGS@ -o $@ $(PICOBJS) $(LIBS)
> + @$(LD) @LDSHFLAGS@ -o $@ $(PICOBJS) $(LDFLAGS) $(LIBS)
>
> bin/smbwrapper.32. at SHLIBEXT@: $(PICOBJS32)
> @echo Linking shared library $@
> - @$(LD) -32 @LDSHFLAGS@ -o $@ $(PICOBJS32) $(LIBS)
> + @$(LD) -32 @LDSHFLAGS@ -o $@ $(PICOBJS32) $(LDFLAGS) $(LIBS)
>
> bin/smbsh: $(SMBSH_OBJ) bin/.dummy
> @echo Linking $@
> --- source/configure.in.orig Fri Mar 24 15:44:21 2000
> +++ source/configure.in Fri Mar 24 15:44:43 2000
> @@ -305,6 +305,10 @@
> # test for where we get readline() from
> if test "$ac_cv_header_readline_h" = "yes" ||
> test "$ac_cv_header_readline_readline_h" = "yes"; then
> + for termlib in ncurses curses termcap terminfo termlib; do
> + AC_CHECK_LIB(${termlib}, tgetent,
> + [LIBS="-l${termlib} $LIBS"; break])
> + done
> AC_CHECK_LIB(readline,readline)
> fi
>
More information about the samba-technical
mailing list