我已经libmcrypt从源代码编译到/home/mybin/...以下确认为所需文件的位置.
/home/mybin/include/mcrypt.h
/home/mybin/include/mutils/mcrypt.h
/home/mybin/lib/libmcrypt.so ...> 4.4.8
/home/mybin/bin/libmcrypt-config
Run Code Online (Sandbox Code Playgroud)
当我使用以下选项尝试./configure for php7时,我收到一条错误消息 configure: error: mcrypt.h not found. Please reinstall libmcrypt.
我错误地使用什么标志告诉gcc在../include目录中查找mcrypt.h
./configure \
CC=/home/mybin/bin/gcc \
CPPFLAGS="-I/home/mybin/include" \
LDFLAGS="-L/home/mybin/lib" \
LIBS="-lmcrypt" \
--prefix=/home/_cgi/php7 \
--bindir=/home/mybin/bin \
--libdir=/home/mybin/lib \
--includedir=/home/mybin/include \
--with-mcrypt=/home/mybin/lib
Run Code Online (Sandbox Code Playgroud)
从configure --help我得到
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to …Run Code Online (Sandbox Code Playgroud)