The following sequence of commands will compile the package and install files in several directories under /usr/local such as bin, include, lib and share. You will need write permission on those directories.
./configure make make install |
If everything goes well, you can proceed to the Post-installation section.
Note that these instructions are over-simplified. By default, all configuration options, except the bigball option, are turned on. However, some components of the package might not be built by this simple installation method, if the configuration script doesn't find appropriate resources. If this is the case, proceed to the Configuration section for the available configuration options. Also you can disable building unwanted components using the configuration options.
The configuration script collects system information and determines, based on that information, what components to build and how. However the information is never complete: the configuration script doesn't and can't search the whole disks for a specific header file; therefore, sometimes the information is incorrect.
Using configuration options, you can modify the configuration information to change the behavior of the configuration script.
Before we start, it might be useful to know about the AGLIB components and the required external software packages (see Components of AGLIB and required third-party packages).
Note: the following command will print a short description of the available configuration options:
./configure --help |
General options
ex | ./configure --prefix=/home/haepal/pkg/aglib-2.0 |
By default the package is installed in /usr/local. This options is used to change the installation directory
The option value <DIR> is an absolute path to a directory. If the directory doesn't exist at installation time, it will be created automatically. The following is a directory layout created on top of <DIR> at installation time. You have to make sure that you have write permission on those directories.
Note: ag/python and ag/tcl won't be created unless --disable-python-pkgdir and --disable-tcl-pkgdir are used.
It is also possible to specify the installation prefix at installation time (see Build and install).
ex | ./configure CPPFLAGS="\ -I/home/haepal/pkg/xercesc-2.0.0/include \ -I/home/haepal/pkg/iodbc-3.0.6/include" |
Sometimes header files that are needed to build AGLIB package are located in non-standard directories, and these cannot be found by the configure program. If the required headers are not found at the configuration time, the corresponding components of the package won't be built. Using the CPPFLAGS option, you can add any header locations to the search list of your compiler.
The option value <DIRS> is a string of directory items seperated by white spaces, where each item should be prefixed by `-I'. If there is more than one item, the string should be quoted.
Note that the earlier the directory appears in the value string, the higher its priority is. Also the directories in the value string have higher priorities than the other header directories that are recognized by preprocessor by default.
ex | ./configure LDFLAGS="\ -L/home/haepal/pkg/xercesc-2.0.0/lib \ -L/home/haepal/pkg/iodbc-3.0.6/lib" |
Same as CPPFLAGS except that it helps linker to find libraries, and that each directory is prefixed by `-L'.
agdb options
If the iODBC headers and library are found at the configuration time, the AG ODBC interface will be built into the package automatically. If the iODBC headers and library are installed but not detected by the configuration script, consider using CPPFLAGS and LDFLAGS.
Prevent agdb from being built even if the iODBC headers and library are found.
AG wrapper options
AG wrappers depend on the libag shered object (.so file --- UNIX) or dynamic linking library (.dll file --- Windows) at runtime by default. This option removes that dependency by including libag in each AG wrapper.
If jni.h and jni_md.h are found at configuration, a Java AG wrapper is built automatically. This option prevents that.
ex | ./configure --with-python=/home/haepal/pkg/Python-2.2.1/bin/python2.2 |
The configuration script uses a python interpreter found first in your PATH. This interpreter is used to determine the location of Python headers and an installation directory of the Python AG wrapper. You can force the configuration script to use <PRO>.
If python is found in your PATH and the installation is okay, the Python AG wrapper is built automatically. This option prevents that.
The AG Python wrapper is installed in the standard Python package directory (site-packages) by default. If this option is specified the wrapper will be installed in <PREFIX>/lib/ag/python. <PREFIX> is the installation prefix.
ex | ./configure --with-tclsh=/home/haepal/pkg/tcl-8.4.1/bin/tclsh8.4 |
The configuration script uses the tclsh binary found first in your PATH by default. This binary is used to determine the location of Tcl headers and an installation directory of the TCL AG wrapper. You can force the configuration script to use <PRO> as the tclsh.
If tclsh is found in your PATH and the installation is okay, Tcl AG wrapper is built automatically. This option prevents that.
The Tcl Python wrapper is installed in the standard Tcl package directory by default. If this option is specified the wrapper will be installed in <PREFIX>/lib/ag/tcl. <PREFIX> is the installation prefix.
Misc.
Among the file I/O plugins, the AG and ATLAS format plugins require Xerces-C++, and the CAG format plugin requires zlib (see Components of AGLIB and required third-party packages for download information). The header and library locations should be specified using CPPFLAGS and LDFLAGS if they are not detected automatically. The configuration summary will show you whether they are detected or not.
Once the configuration is complete, it is straightforward to build and install the package. Just issue the following two commands. Building the package will take a while.
make make install |
Uninstallation is also simple:
make uninstall |
If you forgot to specify the installation prefix at the configuration time, it can be specified at the installation time as follows:
make prefix=/home/haepal/pkg/aglib-2.0 install |
A corresponding uninstallation command is:
make prefix=/home/haepal/pkg/aglib-2.0 uninstall |
Now you have built and installed your AGLIB package. Before you can use the package, there are a few environment variables to be set. These can be specified in the user's shell start-up files (.cshsh, .profile, etc.), or in shell scripts that start applications.
Let <PREFIX> be your installation prefix. The following table shows environment variables and appropriate values for them:
Variable | Value |
---|---|
PATH | <PREFIX>/bin:$PATH |
LD_LIBRARY_PATH | <PREFIX>/lib:<PREFIX>/lib/ag:<PREFIX>/lib/ag/java(1):$LD_LIBRARY_PATH |
CLASSPATH(1) | <PREFIX>/lib/ag/java:$CLASSPATH |
PYTHONPATH(2) | <PREFIX>/lib/ag/python:$PYTHONPATH |
TCLLIBPATH(3) | <PREFIX>/lib/ag/tcl:$TCLLIBPATH |
(1) This is for the Java AG wrapper.
(2) This is for the Python AG wrapper that is configured with the --disable-python-pkgdir option.
(3) This is for the Tcl AG wrapper that is configured with the --disable-tcl-pkgdir option.