如何使用并行php设置安装(编译)Imagemagick php模块
我有两个并行的PHP安装。当我为php编译imagick模块时,它包含了错误的目录 之后:如何使用并行php设置安装(编译)Imagemagick php模块,php,imagemagick,Php,Imagemagick,我有两个并行的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 我尝试
/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
我尝试了。/配置为--prefix,-includedir,-oldcludedir。。。但它并没有改变这一点
更改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的行为来更正路径设置。
/configure
脚本在环境的path变量中查找第一个php config
,并提取php位置信息来填充makefile。要强制安装特定版本的PHP,请使用--with PHP config
选项
./configure --with-php-config=/usr/local/php-5.3.21/bin/php-config
谢谢如果我能找到时间,我会在phpize代码中摸索。