diff -ur jpeg-6b.orig/ltconfig jpeg-6b/ltconfig --- jpeg-6b.orig/ltconfig 1998-03-25 17:25:39.000000000 +0200 +++ jpeg-6b/ltconfig 2009-10-09 12:28:17.000000000 +0300 @@ -716,7 +716,7 @@ # See if GNU ld supports shared libraries. if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared ${wl}-soname $wl$soname -o $lib$libobjs' + archive_cmds='$CC $LDFLAGS -shared ${wl}-soname $wl$soname -o $lib$libobjs' runpath_var=LD_RUN_PATH ld_shlibs=yes else