Mats Erik Andersson <[email protected]> writes:

> torsdag den  1 december 2011 klockan 13:19 skrev Mats Erik Andersson detta:
>> Dear all,
>> 
>> the patch text below is all that is needed to support NetBSD 5.1.
>> The resulting binaries pass every test, except "ftp-localhost"
>> due to the usual lack of a user "ftp".
>
> This is not accurate, unfortunately. The problem is that "ftp" is
> disabled by the configuration script! This slipped me.
>
> The issue lies in their implementation of readline support.
> Consider a standard test snippet:
>
>   #include <stdio.h>
>   #include <readline/readline.h>
>
>   int main() {
>      readline(NULL);
>      return 0;
>   }
>
> Successful compilation boils down to:
>
>    Glibc, Solaris, FreeBSD:
>
>          gcc test.c -lreadline
>
>    OpenBSD:
>
>          gcc test.c -lreadline -lcurses    (or -lncurses)
>
>    NetBSD:
>
>          gcc test.c -ledit
>
> Observe the different linking library. Presently, our "configure.ac"
> is not able to implement this, since it only tests with "-lreadline",
> which does not even exist in NetBSD 5.1. Therefore I get
>
>    ftp_BUILD =
>
> thus disabling the build of a FTP client.
>
> The good thing is, that when I do the steps manually, finishing off with
>
>     gcc ... -o ftp *.o "libraries" -ledit
>
> then I do get a functional FTP client also in NetBSD 5.1.
>
> Simon, could you refine the testing in "configure.ac" so far as to be
> inserting "-ledit" on NetBSD?

Interesting, InetUtils uses am/readline.m4 to find the right library and
tries some things but maybe it is not enough.  Is the NetBSD libedit
completely compatible with readline?  Does they have a
readline/readline.h header file?  With the add_history function?  I
recall that the BSD folks did a BSD-licensed re-implementation of
libreadline, maybe this is it.  I'm not sure we should support that,
maybe it is better to recommend people to install GNU readline instead,
but it is a judgement call...

/Simon

Reply via email to