douxi5940 2017-03-23 08:37
浏览 1489
已采纳

关于PHP配置: - with-zlib = DIR和--with-zlib-dir = DIR

from ./configure --help:

--with-zlib=DIR    Include ZLIB support (requires zlib >= 1.0.9)

--with-zlib-dir=<DIR>   Define the location of zlib install directory

first one: Why "--with-zlib" need a DIR ?

second one: does "Define the location of zlib install directory " mean "Define the location of directory of zlib which you have already installed in system" ?

what's the difference between "--with-zlib" and "--with-zlib-dir" ?

  • 写回答

1条回答 默认 最新

  • dongyonglie5132 2017-03-23 14:15
    关注

    Well, first I think that you only have browsed the first part of ./confiure --help , because you may wonder when you figure out that:

    hassan@hassan:/php/php-src$ ./configure --help | grep "zlib"
      --with-zlib=DIR         Include ZLIB support (requires zlib >= 1.0.9)
      --with-zlib-dir=<DIR>   Define the location of zlib install directory
      --with-zlib-dir=DIR     GD: Set the path to libz install prefix
      --with-zlib-dir=DIR     PDO_MySQL: Set the path to libz install prefix
      --with-zlib-dir=DIR     ZIP: Set the path to libz install prefix
      --with-zlib-dir=DIR     mysqlnd: Set the path to libz install prefix
    

    so, --with-zlib[=DIR] is coming when you are willing to compile the zlib extension :

    Zlib support in PHP is not enabled by default. You will need to configure PHP --with-zlib[=DIR]

    otherwise --with-zlib-dir is used when you want to compile another extension which is need zlib , for example, when are you trying to compile PDO Mysql Driver from source :

    Optionally, the --with-zlib-dir[=DIR] is used to set the path to the libz install prefix.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 用三极管设计一个单管共射放大电路
  • ¥20 fluent无法启动
  • ¥15 孟德尔随机化r语言运行问题
  • ¥15 pyinstaller编译的时候出现No module named 'imp'
  • ¥15 nirs_kit中打码怎么看(打码文件是csv格式)
  • ¥15 怎么把多于硬盘空间放到根目录下
  • ¥15 Matlab问题解答有两个问题
  • ¥15 LCD12864中文显示
  • ¥15 在使用CH341SER.EXE时不小心把所有驱动文件删除了怎么解决
  • ¥15 gsoap生成onvif框架