Re: GD/JPEG support in PHP4
| From: | rasmus@php.net | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: GD/JPEG support in PHP4 | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-17008@lists.php.net to get a copy of this message | ||
> I was looking at the JPEG support in PHP4 (CVS), and I noticed the following
> code in config.m4:
> old_LIBS=$LIBS
> LIBS="$LIBS -L$withval/lib"
> AC_CHECK_LIB(jpeg,jpeg_read_header,
> [LIBS="$LIBS -L$withval/lib -ljpeg"],[AC_MSG_RESULT(no)],)
> LIBS=$old_LIBS
> AC_ADD_LIBRARY_WITH_PATH(jpeg, $withval/lib)
> LIBS="$LIBS -L$withval/lib -ljpeg"
>
> Is it me, or is this code a little odd?
What is odd about it? I don't see how else this check could be done
correctly.
> Another thing:
> It only checks for JPEG support happen in the case that $withval=yes. When a
> path is supplied, AC_DEFINE(HAVE_GD_JPG, 1, [ ]) can never happen...
You are right, I missed copying the above block down into the *) case of
that check. Feel free to do that.
-Rasmus