In order to make the MNI_AutoReg package:
perl -V
that it is version 5.003 or later)
Getopt::Tabular
module for Perl.
configure
'
script that will automatically determine various system-
dependent values and generate Makefiles needed to
build the package.
In the directory where you unpacked the MNI_AutoReg tar file,
type
./configure
`configure
' works by poking around your system to determine all
the system-specific values needed to build and install
MNI_AutoReg. Once it has done that, it creates Makefile.include
,
which is the granddaddy Makefile
used by all the programs in the
package. If `configure
' runs successfully, skip to step 7 below.
If `configure
' complains about not being able to find certain
things, though, you may have to give it some hints. In
particular, this be necessary if you have installed netCDF, MINC,
Volume_IO, or Perl 5 in weird places. The easiest way to do that
is with the --prefix
option; for instance, at the MNI, we keep
home-grown software under /usr/local/mni
, so here we run
`configure
' like this:
./configure --prefix=/usr/local/mni
/usr/local/mni
. (netCDF is not
home-grown, so we keep it under /usr/local
. Luckily,
`configure
' is smart enough to look there if all else fails.)
If you simply can't get `configure
' to find some files, you
can set various environment variables, e.g. NETCDF_INCLUDE
to
specify the directory where netcdf.h
lives. For instance, if
you installed netCDF to /tmp
, its include file would be in
/tmp/include
, and you could say:
env NETCDF_INCLUDE=/tmp/include ./configure
NETCDF_INCLUDE |
where to find netCDF header (netcdf.h ) |
NETCDF_LIB |
where to find netCDF library (libnetcdf.a
on most Unix-like systems) |
MINC_INCLUDE |
where to find MINC header (minc.h ) |
MINC_LIB |
where to find MINC library (libminc.a ) |
VOLUMEIO_INCLUDE |
where to find Volume_io headers
(volume_io.h , volumes.h , etc.) |
VOLUMEIO_LIB |
where to find Volume_io library
(libvolume_io.a ) |
PERL |
where to find Perl binary (must be Perl 5.003) |
Note that these are all inputs required to build MNI_AutoReg.
There are also a number of output directories that determine where
various files are installed to; these are explained below.
If you have built shared-library versions of netCDF, MINC, or
Volume_io, configure should be able to find these. It looks for
libraries first with a ".a
" extension, then with
".so
"; this appears to be a quite common convention under
various Unices, and is known to work under IRIX and Linux. If
your system has a different scheme for naming shared libraries,
you might need to set the LIBEXT
variable; e.g. to only look for
".so
" files,
env LIBEXT=".so" ./configure
LIBEXT
is just a space-separated list of extensions, including
the dot on each one.)
configure
'. MNI_AutoReg installs many
files in various directories, and expects to find other files in
certain directories, so it's important to know where you want
stuff to go. By default, it all gets put under /usr/local
, unless
you specify a different base directory with `--prefix
'). In
particular:
binary executables: | /usr/local/bin |
scripts: | /usr/local/bin |
Perl libraries: | (see "Important point #2", below) |
configuration files: | /usr/local/etc/mni_autoreg |
man pages: | /usr/local/man/man1 |
stereotaxic brain model: | /usr/local/lib/model |
/usr/local/share
.) All of these
directories can be customized, either by setting an environment
variable before running `configure
' or by editing
Makefile.include after `configure
' has run. If you wish to use
environment variables, set them as follows:
BINDIR |
directory for binary executables |
SCRIPTDIR |
directory for scripts (machine-independent executables) |
PERLLIBDIR |
Perl library files |
CONFIGDIR |
configuration files |
MAN1DIR |
man pages |
MODELDIR |
stereotaxic brain model files |
Note that if you feel like setting ALL of these (e.g., to install
MNI_AutoReg to /tmp
or your home directory), you're probably
better off to use `--prefix
'. If you want to impose a more
centralized structure (eg. with all MNI_AutoReg-related files
under /usr/local/lib/mni_autoreg
), you'll have to override most of
the defaults with environment variables.
If you prefer to edit Makefile.include
, just read the instructions
there - but be warned that any changes you make will be lost if
you re-reun `configure
'!
Important point #1: MNI_AutoReg doesn't actually install anything
to MODELDIR; that is done by another package, the MNI Average
Brain Stereotaxic Registration Model (which you should have
downloaded as mni_autoreg_model-1.0.tar.gz
). However, MNI_AutoReg
produces a custom version of the mritotal program (the main driver
for stereotaxic registration) with MODELDIR hard-coded into it.
Be sure to use the same MODELDIR when configuring and installing
the two packages, or you will always need to use mritotal's
`-modeldir'
option to override the (incorrect) built-in default.
Important point #2: the directory where Perl library files are
installed is determined, logically enough, by asking Perl. (In
particular, the "installsitelib
" configuration variable is checked.)
For Perl 5.002 and later, this is enough; if Perl was installed using
all the default directories, the Perl library files will end up in
/usr/local/lib/perl5/site_perl
.
However, if you're still running Perl 5.001, "installsitelib
" is
not set. In this case, `configure' will use a default directory
of lib/perl5/site_perl
under your prefix directory, which (if
prefix is /usr/local), will be the same as you would have got
using Perl 5.002's default installation directories. In this
case, though, the directory is most likely not on Perl's default
search path. You will be warned if this is the case when you do
"make install
"; if you get this warning, you should set the
PERLLIB
variable with
setenv PERLLIB /usr/local/mni/lib/perl5
~/.cshrc
or the global
/etc/cshrc
file. (Or, if you're a Bourne-shell, ksh, zsh, or bash
type of person, put
PERLLIB=/usr/local/mni/lib/perl5/site_perl ; export PERLLIB
~/.profile
or /etc/profile
.)
Just remember: when you upgrade to Perl 5.002 or later, this setting of
PERLLIBDIR
might be redundant, so you'll probably want to remove
it at that time.
make build
make test
make install
make installman
and you're ready to build the model files needed to perform
full-blown MRI->Talairach fitting with perl script mritotal.
Note that you may need to set the environment variable TMPDIR
to some more appropriate place than /usr/tmp
on systems where
/usr/tmp
has little available space.
mni_autoreg_model-1.0.tar.gz
somewhere, and follow the
instructions in the README there. When editing the Makefile, be
sure to set MODELDIR to the directory used for MODELDIR above!
When you have done "make build
" and "make install
", then the
model will be ready to go; and, as long as you set MODELDIR
correctly in both packages, mritotal will be ready to run with
that model.