Error in configuration of a 32 bit build on a 64 bit machine

When configuring a 32 bit build on a 64 bit machine (ArchLinux) like this:

./configure linux

many 32 bit libraries are not found if they are in a folder like /usr/lib32/ which is becoming quite common behaviour in modern linux distributions. Looking at the configure script for e.g. libX11 I see:

check_library "libX11" "yes" "$x11libdir" \
    ${finkdir:+$finkdir/lib} \
    /usr/lib /usr/X11R6/lib /usr/lib/X11 /usr/openwin/lib \
    /usr/local/lib /usr/local/lib/X11 /usr/local/X11R6/lib \
    /usr/X11/lib /usr/lib/X11R5

i.e. the /usr/lib32/ folder seems to be not considered by the script, so the libX11 library is not found. For some components like libX11 there is a command line option to set the lib folder (–with–x11-libdir=/usr/lib32) but for some others (libpng, libjpeg, …) it is not possible so these libraries are not found.

My question is: am I doing something wrong in configuring the 32 bit build or is this really a bug of the configuration system? Thanks

I wrote a small patch for configure to make the script search in 32 bit lib folder (in attachment, btw why is the .patch extension not allowed for attached files??). Configuration works with it, I’m still waiting to see if build is successful. If it works I’ll propose the patch on Jira.
configure_linux32_on_linux64.txt (770 Bytes)

The builds were successful, it seems that the patch works. The configuration feels a bit slower than before on my 32 bit system but at least it works. I posted the patch on Jira.

The patch has been accepted, so the fix will appear in 5.34/36 and 6.06/00.