@c -*- texinfo -*-

@chapter Installation

@ifset TEXT-ONLY
@include version.texi
@end ifset

@section Installing @samp{GDL} version @value{GDL-VERSION}

To compile and install @samp{GDL}:

@enumerate

@item
Determine what Foundation library you have installed on your system.
This package was tested with NeXT's Foundation, libFoundation, and the
GNUstep Base Library.

The configure script will try to determine the Foundation libraries
installed on your system, but if it's unable to determine the library or
if you have more than one Foundation library installed; then you need to
specify which Foundation library to use.

To do this, you should set the FOUNDATION shell variable to the
Foundation library name; this example selects the NeXT Foundation:
@smallexample
FOUNDATION=foundation ./configure
@end smallexample

Use @samp{gnustep-base} for the GNUstep Base Library and
@samp{libFoundation} for the libFoundation library.

@item
Determine if you need the FoundationExtensions library; the following
scenarios require this library:

@itemize @bullet

@item NEXTSTEP 3.3 and NeXT's Foundation library.

@item GNUstep Base Library on any platform.

@end itemize

@item
Determine which database adaptors to compile.  The header files and
libraries for your database will be required in order to compile the
source code for the adaptor.  If these header files and libraries are
not in the standard include and library paths for GCC, then use the
@samp{CFLAGS} and @samp{LDFLAGS} make variables to specify the
directories.

Pass the parameter @samp{--with-sqlserver} to compile the Microsoft
SQLServer database adaptor, @samp{--with-postgres95} to compile the
PostgreSQL database adaptor, and @samp{--with-sybase} to compile the
Sybase database adaptor.  The following example specifies that the
PostgreSQL database adaptor be compiled:
@smallexample
./configure --with-postgres95
@end smallexample

Use --with-Oracle7 and/or --with-Oracle8 to compile the Oracle 
adaptors. Please refer to eoadaptors/Oracle[78]/INSTALL for 
additionnal information about compiling and installing these
adaptors.

Type @samp{./configure --help} to list what other parameters
@samp{configure} accepts, and what other database adaptors can be
compiled.

@item
Configure the package for your system.  In the directory that this file
is in, type @samp{./configure}.  If you're using @samp{csh} on an old
version of System V, you might need to type @samp{sh configure} instead
to prevent @samp{csh} from trying to execute @samp{configure} itself.

If your system requires unusual options for compilation or linking that
@samp{configure} doesn't know about, you can give @samp{configure}
initial values for some variables by setting them in the environment.
In Bourne-compatible shells, you can do that on the command line like
this:
@smallexample
CC='gcc -traditional' DEFS=-D_POSIX_SOURCE ./configure
@end smallexample

If you need to do unusual things to compile the package, we encourage
you to figure out how @samp{configure} could check whether to do them, and
mail diffs or instructions to the address given in the @samp{README} so we
can include them in the next release.

@item
Type @samp{make} to compile the package; @samp{GDL} requires that you
use GNU make.  If you want, you can override the @samp{make} variables
@samp{CFLAGS} and @samp{LDFLAGS} like this:
@smallexample
make CFLAGS=-O2 LDFLAGS=-s
@end smallexample

@item
Type @samp{make check} to run the tests.  The tests are written for a
specific database adaptor; read the file @file{tests/README} regarding
how to prepare your database.

All the tests are written using the DejaGnu testing framework, so if you
don't have it installed then you will need to do so before trying out
these tests.

@item
Type @samp{make install} to install programs, data files, and
documentation.

@item
You can remove the program binaries and object files from the source
directory by typing @samp{make clean}.  To also remove the Makefile(s),
and @samp{config.status} (all the files that @samp{configure} created),
type @samp{make distclean}.

The file @samp{configure.in} is used as a template to create
@samp{configure} by a program called @samp{autoconf}.  You will only
need it if you want to regenerate @samp{configure} using a newer version
of @samp{autoconf}.

@end enumerate
