You probably need to pass CFLAGS='-arch x86_64'
on the configure command line to set the architecture correctly:
./configure CFLAGS='-arch x86_64'
Update:
Adding CFLAGS
doesn't change how configure detects the system, it just changes what gets passed to gcc
. But it will build as a 64-bit executable:
$ file lib/.libs/libconfig.*.dylib
lib/.libs/libconfig.9.dylib: Mach-O 64-bit dynamically linked shared library x86_64
If you really want the configure
output to be correct, then you need to pass in a --build
parameter:
$ ./configure --build=x86_64-apple-darwin10.8.0
checking build system type... x86_64-apple-darwin10.8.0
checking host system type... x86_64-apple-darwin10.8.0
checking target system type... x86_64-apple-darwin10.8.0
...
The resultant library is also 64-bit:
$ file lib/.libs/libconfig.*.dylib
lib/.libs/libconfig.9.dylib: Mach-O 64-bit dynamically linked shared library x86_64
Admittedly, using the --build
option is the better choice here. However, since gcc on Mac OS X can build "fat" binaries, it kind of blurs the line a little about what machine you're building for, since it can build for both i386 and x86_64.