4Pane requires the wxWidgets toolkit libraries to be installed on your system. Almost all distros will have these in package form: if so, install it and its dependencies.
If you intend to install a 4Pane binary, this is all you'll need. However if you want/need to build the 4Pane tarball you will also need either to have built the wxWidgets tarball as below, or else to have installed the appropriate wxWidgets development package which will probably be called something like wxGTK-devel, plus its dependencies.
If your distro has no wxWidgets package, or if you want a newer wx version, you can download the latest stable wxGTK tarball from the wxWidgets website. Extract this in a directory of your choice; make a subdirectory in the resulting wxWidgets directory and cd into it. Then configure, make and make install.
The current stable build is wxGTK-2.8.12.tar.gz, so in a shell you'd do:
tar -xzf ./wxGTK-2.8.12.tar.gz
su [enter root password]
You will probably need to have installed other packages first, such as the gtk2 development libraries (which should be called something like libgtk2.0-dev or gtk2-devel). If you want to build against gtk1.2, presumably because you are using an antique, slow computer or an ancient distro, the names will be e.g. libgtk1.2-dev, gtk+-devel*
4Pane can also use the X11 version of wxWidgets: this doesn't have the gtk dependencies, so you might want to use it in a tiny distro like DamnSmallLinux. 4Pane will work, but it will look less beautiful and drag-and-drop and tooltips won't function. If you decide you want to try it, download the latest stable wxX11 from the wxWidgets site and proceed much as above. The only difference (apart from calling the subdir build_X11 ;) is the configure line: ../configure --disable-unicode.