用CPPFLAGS指定目录时,。/ configure无法找到头文件 [英] ./configure cannot locate header file when the directory is specified with CPPFLAGS

查看:160
本文介绍了用CPPFLAGS指定目录时,。/ configure无法找到头文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Mac OS X Mavericks上构建php gettext模块。

I'm trying to build php gettext module on Mac OS X Mavericks.

已安装带有 brew install gettext 的gettext,并且已检查的头文件位于 / usr / local / opt / gettext

Installed gettext with brew install gettext, and checked header files are available at /usr/local/opt/gettext.

$ ls /usr/local/opt/gettext/include/
autosprintf.h   gettext-po.h    libintl.h

在运行configure时如何覆盖环境变量?,我执行了。/configure LDFLAGS =' -L / usr / local / opt / gettext / lib /'CPPFLAGS ='-I / usr / local / opt / gettext / include /'来获取此错误消息。

With a help in the post of How to override environment variables when running configure?, I executed ./configure LDFLAGS='-L/usr/local/opt/gettext/lib/' CPPFLAGS='-I/usr/local/opt/gettext/include/' to get this error message.

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找不到头文件?

What's wrong with this? Why configure cannot find the header file when I specified the directory?

推荐答案

在查看./configure脚本时,我发现该脚本没有考虑我给出的环境变量。我刚刚修改了脚本(第4067行)以使其工作。

Looking into the ./configure script, I noticed the script doesn't look into the environmental variable that I give. I just modified the script (Line 4067) to get it work.

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

这篇关于用CPPFLAGS指定目录时,。/ configure无法找到头文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆