with-layout=gnu 选项有什么作用?

Aco*_*Aco 2 php php5

我正在编译 PHP 5.3.6,我用作参考的 compile configure 命令使用 --with-layout=GNU 选项。我做了一些研究,但似乎找不到详细的答案。有人可以向我详细解释这个选项以及为什么要使用它吗?谢谢!

fis*_*ion 7

本回答时最新版本的 PHP 的 configure.in 中--with-layout定义为:

PHP_ARG_WITH(layout, layout of installed files,
[  --with-layout=TYPE      Set how installed files will be laid out.  Type can
                          be either PHP or GNU [PHP]], PHP, no)

case $PHP_LAYOUT in
  GNU)
    oldstyleextdir=no
    ;;
  *)
    oldstyleextdir=yes
    ;;
esac
Run Code Online (Sandbox Code Playgroud)

因此,如果您选择GNU,则设置oldstyleextdir=no,否则yes。这帮助我在 2005 年 12 月找到了这封发给 php-dev 的邮件,其中部分内容是:

话虽如此,旧风格是:

$libdir/extensions/$extbasedir

而新风格 [GNU] 是:

$libdir/$extbasedir

本质上,此选项决定了扩展目录 ( EXTENSION_DIR)的位置。不幸的是,正如该邮件的作者所言,没有太多解释为什么实施该选项 - 即使在提交日志条目中- 尽管我推测这是为了使 PHP 与其他“GNU/Linux”标准保持一致.