|
25.5 Package Installation
Having successfully built a GNU Autotools managed package, a Systems
Administrator will typically want to install the binaries, libraries and
headers of the package. The GNU standards dictate that this be
done with the command make install , and indeed Automake always
generates `Makefile's which work in this way.
Unfortunately, this make install command is often thwarted by
the peculiarities of Window's file system, and after an apparently
successful installation, often the Windows installation conventions are
not always satisfied, so the installed package may not work, even though
the uninstalled build is fully operational.
There are a couple of issues which are worthy of discussion:
Prior to release 1.1.0, the Cygwin install program did not
understand the .exe file extension. Fixing it was only a
matter of writing a shell script wrapper for the install
binary. Even though the current release is well behaved
in this respect, .exe handling is still the cause of some
complications. See section 25.3.3 Executable Filename Extensions.
If a package builds any DLLs with libtool , they are
installed to $prefix/lib by default, since this is where shared
libraries would be installed on Unix. Windows searches for DLLs at
runtime using the user's executable search path ($PATH ), which
generally doesn't contain library paths. The first evidence you will
see of this problem is when DLLs you have installed are not found
by executables which depend on them, and there are two ways to fix it:
The installed DLLs can be moved by hand from their installation
directory into the equivalent executable destination, say from
`/usr/local/lib' to `/usr/local/bin'; or better, you can
extend your binary search path to include library directories. Adding
the following to your `.profile' would be a good start:
| PATH=$PATH:/usr/local/lib:/usr/lib:/lib
|
Once you are comfortable with setting your packages up like this, they
will be relatively well behaved on Windows and Unix. Of course, you
must also write portable code, see Writing Portable C with GNU Autotools.
|