lavv17 / lftp

sophisticated command line file transfer program (ftp, http, sftp, fish, torrent)
http://lftp.yar.ru
GNU General Public License v3.0
1.11k stars 162 forks source link

Simplify options to compile against non-system readline? #534

Open rhugonnet opened 5 years ago

rhugonnet commented 5 years ago

With lftp4.8.4, readline 7.0: After compiling readline locally on a server with no admin rights to the system, using --prefix=$HOME, I try to compile lftp with ./configure --prefix=$HOME --with-readline=$HOME and it fails with error: "checking for Readline headers in $HOME/include/readline... not found checking for Readline... no configure: error: cannot find readline library, install readline-devel package" while the readline.h is located in the $HOME/include.

After tweaking options and checking environment variables for quite a bit, I found out that it required to export manually this specific environment variable: CPPFLAGS=-I$HOME/include

I don't know if this is supposed to be obvious, but as an end-user knowing not much more than the basics of C/C++ and Unix systems, I found it to be a long process in order to just compile locally lftp with readline just compiled and located in an obvious directory.

I wonder if some steps could maybe be simplified for the basic end-user: 1/ looking in --prefix for readline when one does not use --with-readline but only --prefix (it is a non-optional dependency after all?), 2/ updating automatically C/C++ environments variables with the content of --with-readline or --prefix if the C compile check fails within the configure? or at least print the message to the console for the user to try to do so

I hope this feedback helps. I also want to say that lftp is a wonderful command line transfer program, many thanks and bravo!