I’ve recently been missing a few pieces of software from my linux days most recently, lftp. It wasn’t as simple as I had hoped it would be so I thought I’d record how I did it here.
123456789101112131415161718192021222324
# Download and install readline$ wget ftp://ftp.cwru.edu/pub/bash/readline-6.0.tar.gz # (or latest stable version)...
$ tar zxvf readline-6.0.tar.gz
$ cd readline-6.0
$ ./configure --prefix=/usr/local
...
$ make
...
$ sudo make install
# Download lftp$ wget http://ftp.yars.free.net/pub/source/lftp/lftp-3.7.15.tar.gz # (or latest stable version)...
$ tar zxvf lftp-3.7.15.tar.gz
# Here comes the magic$ CXXFLAGS="-O0 -Wall -fno-exceptions -fno-rtti -fno-implement-inlines"\LDFLAGS="-Xlinker -search_paths_first -L/usr/local/lib"\CPPFLAGS="-I/usr/local/include"\ ./configure --with-openssl --disable-shared --disable-nls --prefix=/usr/local
...
$ make
...
$ make install
.. and that should be it. As I understand it, the ‘magic’ part tells the compiler to look in the right place for the readline library.
UPDATE: I suggest you now ignore this and use Homebrew where I have contributed an lftp recipe.