Re: Revise config.m4 scripts in general (Was: Re: [PHP-DEV] Problem with Configure..)

From: Date: Wed, 14 Nov 2001 01:03:33 +0000
Subject: Re: Revise config.m4 scripts in general (Was: Re: [PHP-DEV] Problem with Configure..)
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-70390@lists.php.net to get a copy of this message
On Wed, 14 Nov 2001, Markus Fischer wrote: >I think it doesn't make sense to detect >libraries in the following way: > > > for i in /usr /usr/local/ $PHP_PNG_DIR; do .... > >*IF* there are libraries already installed in /usr/ or /usr/local >and the use provides a $PHP_PNG_DIR , the custom directory will >not be detected. > >This is a great mistake. Same with the order in general. It >really should be: > > for i in $PHP_PNG_DIR /usr/local /usr; do ... > >First, what the user specified, than for additional installed >libraries (/usr/local/) and then the system defaults. >On the other hand, I may be completely wrong and there is a valid >reason (would make sense because most m4 scripts I quickly looked >at have the ordering of the directories like the first example I >gave) but then I just don't see it. You're totally wrong here. :) for i in /usr /usr/local $PHP_JPEG_DIR; do test -f $i/lib/libjpeg.$SHLIB_SUFFIX_NAME -o -f $i/lib/libjpeg.a && GD_JPEG_DIR=$i done If libjpeg.[a|so] is found in /usr and also in $PHP_PNG_DIR, the last one counts. The for loop doesn't end with first match. --Jani

« previous php.dev (#70390) next »