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 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]