From:             [EMAIL PROTECTED]
Operating system: Caldera Linux
PHP version:      4.0.6
PHP Bug Type:     Compile Failure
Bug description:  Configure appends extra -l with libjpeg test

On a clean php-4.0.6 distribution, (untar the file and then cd to the
directory) the following configure command causes problems:

./configure --with-mysql --with-apache=../apache_1.3.12 --enable-track-vars
--with-gd=/usr/local --with-jpeg-dir=/usr/local --with-xpm-dir=/usr/X11R6

checking whether to include GD support... yes
checking whether to enable truetype string function in gd... no
checking for the location of libjpeg... yes
checking for jpeg_read_header in -ljpeg... no
configure: error: libjpeg not found!

Here is the config.log entry:

--------- CUT HERE ------
configure:17964: checking for jpeg_read_header in -ljpeg
configure:17985: gcc -o conftest -g -O2   conftest.c -ljpeg
     -l -lcrypt -lresolv -lm -ldl -lnsl  -lresolv 1>&5
/usr/i386-linux/bin/ld: cannot open -l-lcrypt: No such file or directory
configure: failed program was:
#line 17974 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char jpeg_read_header();

int main() {
; return 0; }

--------- CUT HERE ------

Note the extra -l with no library before -l crypt. This is what is causing
the test to fail, despite the jpeg library having being isntalled
correctly. Compiling the same test program without the extra -l succeeds.



P.S. Are there any workarounds to this problem? I'm still trying to figure
out which part of the configure command is adding the extra -l. 
Edit bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to