I ran into the same problem and I believe that this is because jpeg-6b is built with a very old version of autotools (the jpeg-6b version dates back to 1998 if the sourceforge page is correct).
In particular, the problem is how it checks to see if gcc supports the -fPIC flag:
checking for gcc option to produce pic ... -fpic
checking if gcc pic flag -fpic works ... no
And this is how they check from config.log:
ltconfig: 547: checking if gcc pic flag -fPIC works
ltconfig: 548: gcc -c -fPIC -DPIC -I / local / include conftest.c 1> & 5
conftest.c: 1: 0: warning: -fPIC ignored for target (all code is position independent)
^
Note that gcc returns a warning; it probably returns exit code 1, which is why the check fails. And position-independent code is needed for shared libraries, so this makes him think that he cannot make them, and then outputs:
checking whether to build shared libraries ... no
Compare this with libjpeg9, which I assume uses a more modern version of autotools:
checking for gcc -std = gnu99 option to produce PIC ... -DDLL_EXPORT -DPIC
checking if gcc -std = gnu99 PIC flag -DDLL_EXPORT -DPIC works ... yes
And from config.log:
configure: 10108: checking for gcc -std = gnu99 option to produce pic
configure: 10115: result: -DDLL_EXPORT -DPIC
configure: 10123: checking if gcc -std = gnu99 PIC flag -DDLL_EXPORT -DPIC works
configure: 10141: gcc -std = gnu99 -c -g -O2 -I / local / include -DDLL_EXPORT -DPIC -DPIC conftest.c> & 5
configure: 10145: $? = 0
configure: 10158: result: yes
I ended up compiling libjpeg9, but I think libjpeg6 can also be compiled if you can recreate. / configure script using the newer version of autotools.
source share