This chapter explains the procedure of compiling PowerShell from the source code. If you do not want to do this, feel free to grab a precompiled RPM or Debian package of PowerShell.
Note: This follows the same procedure as most GNU software, so if you are familiar with the configure/make/make install procedure, you may skip this section.
PowerShell uses GNU autoconf, like most GNU software, and has a pretty standard build procedure. In the simplest case, configuring PowerShell consists of the following (you must be in the directory where you unpacked the source.)
./configure
This will check your system for some standard libraries as well as make sure that you have the proper version of GTK+ and gnome-libs. If all is well, it will create the Makefile for the program. Since you did not specify otherwise, it will install it under /usr/local.
PowerShell's configure script currently does not have many useful arguments. The only one which is really of any use is the --prefix option. It works like this:
./configure --prefix=/usr
This tells configure that you want to install PowerShell in /usr rather than /usr/local. The binary will be installed in /usr/bin rather than /usr/local/bin.
If all goes well, you should see output such as the following:
creating cache ./config.cache checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking for a BSD compatible install... /usr/bin/install -c checking for GTK+ 1.2 or greater... yes checking for Gnome 1.0.13 or greater... yes checking for gdk_imlib_init in -lgdk_imlib... yes checking for login_tty in -lutil... yes checking for zvt_term_match_add in -lzvt... yes checking for zvt_term_match_check in -lzvt... yes checking how to run the C preprocessor... gcc -E checking for ANSI C header files... no checking for fcntl.h... yes checking for sys/time.h... yes checking for unistd.h... yes checking for strstr... no updating cache ./config.cache creating ./config.status creating Makefile creating config.h
One difference you may notice is that configure may not be able to find zvt_term_match_add or zvt_term_match_check. This means your version of gnome-libs is relatively old and doesn't support URL matching in ZvtTerm (which is what PowerShell uses to draw the terminal itself). This will not prevent you from compiling and running PowerShell successfully, but it will not be compiled with support for URL matching.
If all is not well, you may need to examine config.log and see exactly what happened. In most cases, this happens when either your library versions are too old or configure is finding the wrong version of gtk-config or gnome-config. Check your PATH variable to make sure the correct one (the one from the newest version you have installed) comes before the older versions in your path. Or even better, delete the older versions.
This is the first program I've written that uses a configure script, and because of this there may be bugs in it. One has been reported to be when running under Solaris, but there may be others.