如何安装(编译)具有并行PHP设置的Imagemagick php模块


How to install (compile) Imagemagick php module with parallel php setup

我有两个并行的PHP安装。当我为 php 编译 imagick 模块时,它包含错误的目录。

后:

    /usr/local/php-5.3.21/bin/phpize

配置适用于错误的 PHP:

    checking for PHP prefix... /usr
    checking for PHP includes... -I/usr/include/php -I/usr/include/php/main

我需要是:/usr/local/php-5.3.21/include/php

我尝试了 ./配置 --前缀, --包含, --oldincludeir ...但它没有改变包含

更改 Makefile 中的两行后,模块将正确编译:

    -phpincludedir = /usr/include/php
    +phpincludedir = /usr/local/php-5.3.21/include/php
    -INCLUDES = -I/usr/include/php -I/usr/include/php/main ...
    +INCLUDES = -I/usr/local/php-5.3.21/include/php ...

如果我能更多地了解这个自动会议的东西。我基本上不知道在哪里更改配置的行为以更正路径设置。

./configure脚本是在环境的 PATH 变量中查找第一个php-config,并提取 PHP 位置信息以填充生成文件。要强制安装特定的 PHP 版本,请使用 --with-php-config 选项。

./configure --with-php-config=/usr/local/php-5.3.21/bin/php-config