If you're using a GNU (or something compatible such as GNU/Linux) then
just type "make" in the right place (this directory, as it happens).
Sit back, relax and watch the flashing lights.  (Squeak wizards might
be interested in typing "make headless" instead.)  The executable VM
is called "squeak", and will be left in a subdirectory named according
to your platform (e.g. "i686-pc-linux-gnu/squeak").  Run it with the
options "-help" for further information.

If you're using a native compiler or linker on a "supported" system
(DEC Alpha OSF/1, Irix, HPUX) then the above might just still work.[*]

NOTE: to use the plugins (for 3D graphics, etc.) you will need to put
the ".so" files (or symbolic links to them) in a place where the VM
can find them: either the current working directory, or in a standard
place (for example one of the directories listed in /etc/ld.so.conf).


Otherwise you'll have to do it the hard way.

  1) Type "make mkdir" to create the build directory for your platform.

  2) "cd" into the newly-created directory.

  3) Type "../src/configure".  If you're using GNU cc then add the option
     "--with-gnu-cc".  If you're using GNU ld then add the option
     "--with-gnu-ld".  If you want to omit X11 display support (to make
     a "headless" Squeak for running a server) then add the option
     "--without-x".  (You can set the environment variables "CC" and
     "LD" before running "configure" if you need to persuade it to find
     a particular non-default compiler or linker.)

     If the configuration step explodes then you're on your own.  It
     probably means you're using a native compiler or linker that has
     weirdo flags that the configuration script doesn't know about.
     It's pointless trying to go any further unless you're willing to
     hack the autoconf template. [**]

  4) Type "make" (and wait for the error messages ;).

Minor deities might want to consult conf/configure.in and src/Makefile.in
to see what the rest of us are blissfully unware of.


[*] Shared libraries probably won't work for you on Alpha/OSF.
Symptom: dlopen() complains that "__eprintf" is undefined.
Cure: build a version of libgcc.so with the "-taso" flag turned
on (hahaha!!! ;-) and place it somewhere in ld.so's search path.
Left as an exercise for the determined GNU hacker.


[**] Hacking configure.in is easier than you might think.  Provided the
configuration didn't explode because of a missing "cc" or "ld", then
all you have to do is add a branch to the "case" in the section
entitled "selection of compiler and linker flags".  You already know
what the "canonical" name of your system is (your build directory has
the same name).  If you know what flags you need to pass to "cc" and
"ld" to compile and link normal programs and shared libraries, then
the necessary modifications will take a couple of minutes.  Here's an
example...

	Canonical system name:			pdp11-dec-rt11
	Compile flags for programs:		-Os
	Link flags for programs:		-demand
	Compile flags for shared libraries:	-pcrel
	Link flags for shared libraries:	-dynamic -readonly

"cd" to the "conf" directory.  Modify "configure.in" as follows (the
"[...]"s are existing bits of "configure.in" which you'll not be
changing):

	[...]

	# selection of compiler and linker flags

	case "$host" in
	  [...]
	  pdp11-*-rt11)		CFLAGS="-Os"
				LDFLAGS="-demand"
				SHCFLAGS="-pcrel"
				SHLDFLAGS="-dynamic -readonly"
				;;
	esac

	[...]

(The "canonical name" is of the form "cpu-vendor-os", and usually you
only care about the cpu and os.  That's why the pattern is
"pdp11-*-rt11", with a wildcard for the vendor.  Who knows, maybe
Amdahl will start manufacturing PDP11s again one day?)

If your system doesn't support shared libraries then simply don't
define SH{C,LD}FLAGS, and the configure script will automatically
disable the generation of the Squeak plugins.

Still in the "conf" directory, run "autoconf" (without arguments) to
rebuild "configure".  "cd" back to your build directory and type
"../src/configure".  Rinse and repeat until the configuration step
works.

If the build fails because of compiler or linker errors (missing
headers, definitions, libraries, etc.) then things are a little more
complicated.  This is actually a BUG in the configuration process
and/or Squeak sources (as opposed to unknown compiler/linker flags --
which is an omission, not a bug).  The best plan is to start up Emacs,
type "C-h i", and read the section on "autoconf" to find out how to
test for the features that you need.

The final thing you need to do, once the configuration and build are
working correctly, is to email your "configure.in" file to
"ian.piumarta@inria.fr" (who will buy you a beer in return).
