File: libtool.info, Node: Install mode, Next: Finish mode, Prev: Execute mode, Up: Invoking libtool 4.4 Install mode ================ In “install” mode, libtool interprets most of the elements of MODE-ARGS as an installation command beginning with ‘cp’, or a BSD-compatible ‘install’ program. The following components of MODE-ARGS are treated specially: ‘-inst-prefix-dir INST-PREFIX-DIR’ When installing into a temporary staging area, rather than the final ‘prefix’, this argument is used to reflect the temporary path, in much the same way ‘automake’ uses ‘DESTDIR’. For instance, if ‘prefix’ is ‘/usr/local’, but INST-PREFIX-DIR is ‘/tmp’, then the object will be installed under ‘/tmp/usr/local/’. If the installed object is a libtool library, then the internal fields of that library will reflect only ‘prefix’, not INST-PREFIX-DIR: # Directory that this library needs to be installed in: libdir='/usr/local/lib' not # Directory that this library needs to be installed in: libdir='/tmp/usr/local/lib' ‘inst-prefix’ is also used to ensure that if the installed object must be relinked upon installation, that it is relinked against the libraries in INST-PREFIX-DIR/‘prefix’, not ‘prefix’. In truth, this option is not really intended for use when calling libtool directly; it is automatically used when ‘libtool --mode=install’ calls ‘libtool --mode=relink’. Libtool does this by analyzing the destination path given in the original ‘libtool --mode=install’ command and comparing it to the expected installation path established during ‘libtool --mode=link’. Thus, end-users need change nothing, and ‘automake’-style ‘make install DESTDIR=/tmp’ will Just Work(tm) most of the time. For systems where fast installation cannot be turned on, relinking may be needed. In this case, a ‘DESTDIR’ install will fail. Currently it is not generally possible to install into a temporary staging area that contains needed third-party libraries that are not yet visible at their final location. The rest of the MODE-ARGS are interpreted as arguments to the ‘cp’ or ‘install’ command. The command is run, and any necessary unprivileged post-installation commands are also completed.