我正在尝试在 Mac OS X Mavericks 上构建 php gettext 模块。
安装了 gettextbrew install gettext
,并且已检查的头文件可在/usr/local/opt/gettext
.
$ ls /usr/local/opt/gettext/include/
autosprintf.h gettext-po.h libintl.h
在帖子的帮助下运行configure时如何覆盖环境变量? https://stackoverflow.com/questions/2717623/how-to-override-environment-variables-when-running-configure,我执行了./configure LDFLAGS='-L/usr/local/opt/gettext/lib/' CPPFLAGS='-I/usr/local/opt/gettext/include/'
以获得此错误消息。
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.6 (ok)
checking for gawk... gawk
checking for GNU gettext support... yes, shared
configure: error: Cannot locate header file libintl.h <--
这有什么问题吗?为什么configure指定目录时找不到头文件?
查看 ./configure 脚本,我注意到该脚本没有查看我提供的环境变量。我刚刚修改了脚本(第 4067 行)以使其正常工作。
if test "$PHP_GETTEXT" != "no"; then
for i in $PHP_GETTEXT /usr/local /usr /usr/local/opt/gettext; do
test -r $i/include/libintl.h && GETTEXT_DIR=$i && break
done
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)