在Autoconf生成的配置脚本中添加自定义安装目录选项 [英] Adding a custom installation directory option to Autoconf-generated configure scripts

查看:155
本文介绍了在Autoconf生成的配置脚本中添加自定义安装目录选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

configure脚本始终在帮助消息中包含以下内容:

configure scripts always include something like the following in the help message:


...
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc.  You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
  --bindir=DIR            user executables [EPREFIX/bin]
  --sbindir=DIR           system admin executables [EPREFIX/sbin]
  --libexecdir=DIR        program executables [EPREFIX/libexec]
  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
  --libdir=DIR            object code libraries [EPREFIX/lib]
  --includedir=DIR        C header files [PREFIX/include]
  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
  --infodir=DIR           info documentation [DATAROOTDIR/info]
  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR            man documentation [DATAROOTDIR/man]
  --docdir=DIR            documentation root
                          [DATAROOTDIR/doc/gedit-line-ending-style-plugin]
  --htmldir=DIR           html documentation [DOCDIR]
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]

Program names:
  --program-prefix=PREFIX            prepend PREFIX to installed program names
...

我想在此部分添加"plugindir",如下所示:

What I would like to do is add "plugindir", to this section, as in:


...
  --dvidir=DIR            dvi documentation [DOCDIR]
  --pdfdir=DIR            pdf documentation [DOCDIR]
  --psdir=DIR             ps documentation [DOCDIR]
  --plugindir=DIR         Gedit plugin files [LIBDIR/gedit-2/plugins]
...

,以便用户可以将--plugindir=...传递到配置脚本.

so that users would be able to pass in --plugindir=... to the configure script.

我该怎么做?

推荐答案

如果我正确的话,这些路径已在share/autoconf/autoconf/general.m4文件中设置.该列表是硬编码的,因此很难在列表中插入内容.您可以使用宏 AS_HELP_STRING添加其他帮助信息. . 有一些添加插件目录的示例,例如 gstreamer gimp ,但那些没有可配置的插件目录.

If I'm correct those paths are set in the share/autoconf/autoconf/general.m4 file. The list is hardcoded so it is difficult to insert things in the list. You can add extra help information using the macro AS_HELP_STRING. There are some examples that add a plugindir, for example in gstreamer, gimp, but those don't have a configurable plugin directory.

这篇关于在Autoconf生成的配置脚本中添加自定义安装目录选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆