Next: Site Defaults, Previous: Option Checking, Up: Adding options to a configure script [Contents][Index]
The GNU Build System provides means to automatically rename
executables and manpages before they are installed (see Man Pages).
This is especially convenient
when installing a GNU package on a system that already has a
proprietary implementation you do not want to overwrite. For instance,
you may want to install GNU tar
as gtar
so you can
distinguish it from your vendor’s tar
.
This can be done using one of these three configure
options.
Prepend prefix to installed program names.
Append suffix to installed program names.
Run sed program
on installed program names.
The following commands would install hello as /usr/local/bin/test-hello, for instance.
~/amhello-1.0 % ./configure --program-prefix test- … ~/amhello-1.0 % make … ~/amhello-1.0 % sudo make install …
Autoconf supports changing the names of programs when installing them.
In order to use these transformations, configure.ac must call the
macro AC_ARG_PROGRAM
.
Place in output variable program_transform_name
a sequence of
sed
commands for changing the names of installed programs.
If any of the options described below are given to configure
,
program names are transformed accordingly. Otherwise, if
AC_CANONICAL_TARGET
has been called and a --target value
is given, the target type followed by a dash is used as a prefix.
Otherwise, no program name transformation is done.
• Transformation Options | configure options to transform names
| |
• Transformation Examples | Sample uses of transforming names | |
• Transformation Rules | Makefile uses of transforming names |
Next: Site Defaults, Previous: Option Checking, Up: Adding options to a configure script [Contents][Index]