mhash 编译参数:
./configure --prefix=/path/to --enable-shared=yes --enable-dependency-tracking
正常通过并且安装
并且在/etc/ld.so.conf中添加了上述两个相关的lib路径,运行ldconfig
mcrypt:
CFLAGS="-I/path...(mhash安装路径)/include -L/path/to/mhash/lib" \
./configure --prefix=/opt/mcrypt-2.6.4 --enable-shared=yes --enable-static=yes \
--enable-dependency-tracking --with-libmcrypt-prefix=/opt/libmcrypt-2.5.7 \
--with-libiconv-prefix=/opt/libiconv-1.9.2
这样编译是可以通过的,也可以安装,但在编译过程中有这样一个警告:
checking mcrypt.h usability... yes
checking mcrypt.h presence... no
configure: WARNING: mcrypt.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: mcrypt.h: proceeding with the preprocessor's result
configure: WARNING: ## ------------------------------------ ##
configure: WARNING: ## Report this to bug-autoconf@gnu.org. ##
configure: WARNING: ## ------------------------------------ ##
checking for mcrypt.h... no
现在问题来了......
1、在编译php是带有--with-gd=/path/to/gd --with-mcrpyt=/path/to/mcrpyt 就提示一下错误:
checking for gdImageString16 in -lgd... no
checking for gdImagePaletteCopy in -lgd... no
checking for gdImageCreateFromPng in -lgd... no
checking for gdImageCreateFromGif in -lgd... no
checking for gdImageGif in -lgd... no
checking for gdImageWBMP in -lgd... no
checking for gdImageCreateFromJpeg in -lgd... no
checking for gdImageCreateFromXpm in -lgd... no
checking for gdImageCreateFromGd2 in -lgd... no
checking for gdImageCreateTrueColor in -lgd... no
checking for gdImageSetTile in -lgd... no
checking for gdImageEllipse in -lgd... no
checking for gdImageSetBrush in -lgd... no
checking for gdImageStringTTF in -lgd... no
checking for gdImageStringFT in -lgd... no
checking for gdImageStringFTEx in -lgd... no
checking for gdImageColorClosestHWB in -lgd... no
checking for gdImageColorResolve in -lgd... no
checking for gdImageGifCtx in -lgd... no
checking for gdCacheCreate in -lgd... no
checking for gdFontCacheShutdown in -lgd... no
checking for gdFreeFontCache in -lgd... no
checking for gdNewDynamicCtxEx in -lgd... no
checking for gdImageCreate in -lgd... no
configure: error: GD build test failed. Please check the config.log for details.
如果不添加--with-mcryp,gd是可以编译通过的。
2,如果不带gd参数,只带--with-mcrpyt=/path/to/mcrpyt ,则提示:
mcrypt.h not found,please reinstall libmcrpt.
结果:
checking for GD support... yes
checking for the location of libjpeg... /opt/jpeg-6b
checking for the location of libpng... /opt/libpng-1.2.12
checking for the location of libXpm... /usr/X11R6/lib
checking for FreeType 1.x support... no
checking for FreeType 2... /opt/freetype-2.1.10
checking for T1lib support... /opt/t1lib-5.1.0
checking whether to enable truetype string function in GD... yes
checking whether to enable JIS-mapped Japanese font support in GD... no
checking for jpeg_read_header in -ljpeg... yes
checking for png_write_image in -lpng... yes
checking for XpmFreeXpmImage in -lXpm... yes
checking for T1_StrError in -lt1... yes
checking for gdImageString16 in -lgd... no
checking for gdImagePaletteCopy in -lgd... no
checking for gdImageCreateFromPng in -lgd... no
checking for gdImageCreateFromGif in -lgd... no
checking for gdImageGif in -lgd... no
checking for gdImageWBMP in -lgd... no
checking for gdImageCreateFromJpeg in -lgd... no
checking for gdImageCreateFromXpm in -lgd... no
checking for gdImageCreateFromGd2 in -lgd... no
checking for gdImageCreateTrueColor in -lgd... no
checking for gdImageSetTile in -lgd... no
checking for gdImageEllipse in -lgd... no
checking for gdImageSetBrush in -lgd... no
checking for gdImageStringTTF in -lgd... no
checking for gdImageStringFT in -lgd... no
checking for gdImageStringFTEx in -lgd... no
checking for gdImageColorClosestHWB in -lgd... no
checking for gdImageColorResolve in -lgd... no
checking for gdImageGifCtx in -lgd... no
checking for gdCacheCreate in -lgd... no
checking for gdFontCacheShutdown in -lgd... no
checking for gdFreeFontCache in -lgd... no
checking for gdNewDynamicCtxEx in -lgd... no
checking for gdImageCreate in -lgd... no
configure: error: GD build test failed. Please check the config.log for details.