duanji9378 2014-01-16 14:50
浏览 1605
已采纳

使用CPPFLAGS指定目录时,。/ configure无法找到头文件

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

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

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 <--

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

  • 写回答

2条回答 默认 最新

  • drba1172 2014-01-16 15:18
    关注

    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
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 ansys fluent计算闪退
  • ¥15 有关wireshark抓包的问题
  • ¥15 需要写计算过程,不要写代码,求解答,数据都在图上
  • ¥15 向数据表用newid方式插入GUID问题
  • ¥15 multisim电路设计
  • ¥20 用keil,写代码解决两个问题,用库函数
  • ¥50 ID中开关量采样信号通道、以及程序流程的设计
  • ¥15 U-Mamba/nnunetv2固定随机数种子
  • ¥15 vba使用jmail发送邮件正文里面怎么加图片
  • ¥15 vb6.0如何向数据库中添加自动生成的字段数据。