title: How to compile and install a 32Bit library on a 64 Bit (Ubuntu 12.04LTS) Linux using autotools, make and gcc?
body: <p>I'm trying to compile a 32Bit version of a linux library on a 64Bit Ubuntu 12.04LTS running inside a VM (VirtualBox).</p>
  
  <p>So far I've downloaded the source, unzipped it and performed the following steps to build the lib:</p>
  
  <pre><code>libtoolize --force
  automake --add-missing
  ./configure --build=i686-pc-linux-gnu "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"
  make
  sudo make install
  </code></pre>
  
  <p>With this I've been able to build an compile the library but, once I run "readelf -h" on the compiled lib I get the following output:</p>
  
  <pre><code>  ELF Header:
    Magic:   7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 
    Class:                             ELF64
    Data:                              2's complement, little endian
    Version:                           1 (current)
    OS/ABI:                            UNIX - System V
    ABI Version:                       0
    Type:                              DYN (Shared object file)
    Machine:                           Advanced Micro Devices X86-64
    Version:                           0x1
    Entry point address:               0x1ac0
    Start of program headers:          64 (bytes into file)
    Start of section headers:          53904 (bytes into file)
    Flags:                             0x0
    Size of this header:               64 (bytes)
    Size of program headers:           56 (bytes)
    Number of program headers:         7
    Size of section headers:           64 (bytes)
    Number of section headers:         35
    Section header string table index: 32
  </code></pre>
  
  <p>So I'm stuck with a 64Bit Version of the library and have not yet found a way to force the build and installation of a 32Bit Version. I'd be grateful for hints on how to solve this problem.</p>