On Wed, 2007-05-23 at 10:03 -0400, Martin-Gilles Lavoie wrote: > Greetings > > First, I'd like to apologize upfront for the sheer autoconf noob-ness > this post might impose on vets possibly on this list. But as luck > would have it, I seem to be stuck with the job of dealing with an > autoconf.ac script of ours wich doesn't seem to want to play nice > with the task at hand. > > Full source code relating to the issue is available online at: > > http://www.oracle.com/technology/software/products/berkeley-db/ > index.html > > To resume the problem, I need to build a Universal Binary (aka, PPC + > i386) library of BerkeleyDB. Now, normally, this is a simple task but > it seems Autoconfig is working against me. > > At the strict minimum, I need to have the following flags set in the > generated makefile: > > CFLAGS= -c $(CPPFLAGS) -O3 -isysroot /Developer/SDKs/ > MacOSX10.4u.sdk -arch i386 -arch ppc > LDFLAGS= -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk > > The problem is, whatever I set for LDFLAGS or CFLAGS in the .ac file > passed to autoconf, the output Makefile is invariably stripped down > to an empty LDFLAGS declaration and a CFLAGS devoid of the -isysroot > and -arch parameters. > > Now being new to autoconf, I suspected I was doing something really > stupid until I stumbled onto this: > > http://www.nabble.com/Configure-Support-for-Mac-Universal-Builds- > t3635358.html GNU libtool will pass -isysroot to the linker, I don't know if db uses CFLAGS for linking, it should, if it does not, LDFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk" will work providing that you are using the latest GNU libtool. The "linker" as far as GNU libtool is concerned on Mac OS X is gcc, and gcc will translate -isysroot to -syslibroot when calling ld. Out of curiosity did you first compare config.h when doing a ./configure on a ppc machine and an x86 machine without fat flags? Are they the same? Are the assignments in the Makefiles the same? If you ever plan to build 4-way fat, you will have to be more careful, pointer sizes are the same on i386 and ppc, but things get more interesting when x86_64 and ppc64 are added to the mix. Peter
Attachment:
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf