我有两个并行的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
我试过./configure with --prefix, - includeir, - oldincludedir ...但它没有改变包含
一旦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 ...
如果只是我会更多地了解这个autoconf的东西。我基本上不知道在哪里更改configure的行为以更正路径设置。
答案 0 :(得分:0)
./configure
脚本在您环境的PATH变量中找到第一个php-config
,并提取PHP位置信息以填充makefile。要强制安装特定的PHP版本,请使用--with-php-config
选项。
./configure --with-php-config=/usr/local/php-5.3.21/bin/php-config