Building tmux 1.7 on CentOS 5.8Edit

My initial naïve attempt at this didn’t work, nor did the tip provided in this gist. Finally, I (mostly) followed the recipe found here, which installs static versions of both the libevent and ncurses libraries:

$ wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
$ tar xzvf libevent-2.0.21-stable.tar.gz
$ cd libevent-2.0.21-stable
$ ./configure --disable-shared --enable-static --prefix=$HOME
$ make && make install
$ cd ..
$ wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz
$ tar xzvf ncurses-5.9.tar.gz
$ cd ncurses-5.9
$ ./configure --disable-shared --enable-static --prefix=$HOME
$ make && make install
$ cd ..
$ wget http://downloads.sourceforge.net/tmux/tmux-1.7.tar.gz
$ tar xzf tmux-1.7.tar.gz
$ cd tmux-1.7
$ PKG_CONFIG_PATH=$HOME/lib/pkgconfig CFLAGS="-I$HOME/include -I$HOME/include/ncurses" LDFLAGS="-L$HOME/lib" ./configure --enable-static --prefix=$HOME
$ make && make install

See also