LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: Takeshi Abe Date: Thu Jun 12 00:59:44 2008 Subject: ./configure failed to treat libpng's '--libs'
Hi, I have found the recent FreeBSD port of libpng has libpng12-config, which works well, but in fact is a symlink of libpng-config; > $ libpng12-config --libs > -lpng -lz -lm Thus ./configure come from configure.ac in CVS head fails to treat the expected option '-lpng12', like that; > $ ./configure --with-png=/usr/local > checking build system type... i386-unknown-freebsd6.3 > checking host system type... i386-unknown-freebsd6.3 > checking target system type... i386-unknown-freebsd6.3 > checking for a BSD-compatible install... /usr/bin/install -c > checking whether build environment is sane... yes > checking for a thread-safe mkdir -p... config/install-sh -c -d > (snip) > checking for sin... no > checking for sin in -lm... yes > checking for deflate in -lz... yes > checking png.h usability... yes > checking png.h presence... yes > checking for png.h... yes > checking for png_create_read_struct in -lpng12... no > configure: WARNING: libpng is required - see http://www.libpng.org/pub/png/ > checking for freetype-config... /usr/local/bin/freetype-config > checking for FT_Init_FreeType in -lfreetype... yes > checking ft2build.h usability... yes > checking ft2build.h presence... yes > checking for ft2build.h... yes > checking for FcInit in -lfontconfig... yes > checking for jpeg_set_defaults in -ljpeg... yes > checking for XpmReadFileToXpmImage in -lXpm... yes > checking for the pthreads library -lpthreads... no > checking whether pthreads work without any flags... no > checking whether pthreads work with -Kthread... no > checking whether pthreads work with -kthread... no > checking for the pthreads library -llthread... no > checking whether pthreads work with -pthread... yes > checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE > checking if more special flags are required for pthreads... -D_THREAD_SAFE > ** Configuration summary for gd 2.1.0: > Support for PNG library: > Support for JPEG library: yes > Support for Freetype 2.x library: yes > Support for Fontconfig library: yes > Support for Xpm library: yes > Support for pthreads: yes The attached patch is a workaround for the behavior, and any suggestion? Thanks, -- Takeshi Abe Index: libgd/src/configure.ac =================================================================== RCS file: /repository/gd/libgd/src/configure.ac,v retrieving revision 1.36 diff -u -r1.36 configure.ac --- libgd/src/configure.ac 30 Jan 2008 11:21:15 -0000 1.36 +++ libgd/src/configure.ac 12 Jun 2008 06:30:49 -0000 @@ -424,33 +424,26 @@ [LIBS="-lpng12 $LIBS" FEATURES="GD_PNG $FEATURES" AC_DEFINE(HAVE_LIBPNG, 1, [ Define if you have the png library. ])], - [LDFLAGS="$_ldflags" - AC_MSG_WARN([libpng is required - see http://www.libpng.org/pub/png/])]) - elif test -n "$LIBPNG_CONFIG"; then - AC_CHECK_LIB(png,png_create_read_struct, - [LIBS="-lpng $LIBS" - FEATURES="GD_PNG $FEATURES" - AC_DEFINE(HAVE_LIBPNG, 1, [ Define if you have the png library. ])], - [LDFLAGS="$_ldflags" - AC_MSG_WARN([libpng is required - see http://www.libpng.org/pub/png/])]) + [LDFLAGS="$_ldflags"]) + fi + #TBB: png12's png_create_read_struct is just as good + #2.0.23: should be = not == + if test "$ac_cv_lib_png12_png_create_read_struct" = yes; then + ac_cv_lib_png_png_create_read_struct=yes else AC_CHECK_LIB(png,png_create_read_struct, [LIBS="-lpng $LIBS" FEATURES="GD_PNG $FEATURES" AC_DEFINE(HAVE_LIBPNG, 1, [ Define if you have the png library. ])], - [LDFLAGS="$_ldflags" - AC_MSG_WARN([libpng is required - see http://www.libpng.org/pub/png/])]) + [LDFLAGS="$_ldflags"]) fi else ac_cv_lib_png_png_create_read_struct=no - AC_MSG_WARN([libpng is required - see http://www.libpng.org/pub/png/]) fi -#TBB: png12's png_create_read_struct is just as good -#2.0.23: should be = not == -if test "$ac_cv_lib_png12_png_create_read_struct" = yes; then - ac_cv_lib_png_png_create_read_struct=yes -fi +if test "$ac_cv_lib_png_png_create_read_struct" != yes; then + AC_MSG_WARN([libpng is required - see http://www.libpng.org/pub/png/]) +fi dnl FreeType configure tests snarfed from libwmf .. AC_ARG_WITH(freetype,dnl
| Navigate in group php.gd.devel at sever news.php.net | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by PHP Developer
Powered By PHP Consultants |