Re: NetCDF library in Universal Binary for Mac OS X

Johan Kool <johankool@xxxxxxxxx> writes:

> William Kyngesburye of did provide me with
> this solution to the compilation of netcdf as an universal library. I
> post it here for reference for others who might want to do a similar
> thing:
> Most packages I build ppc/intel separately, then merge with lipo, to
> deal with endian issues, and libtool quirks.  I usually do a bit of
> patching to make it go smoothly.
> netcdf is one such split build.  Assuming you're using a PPC Mac,
> configure and build the PPC version.  Duplicate the source folder to
> retain the same configuration.  make clean the copy.
> Edit libsrc/ncconfig.h and find where it defines WORDS_BIGENDIAN -
> delete that line.  Edit macros.make: add $(CCFLAGS) to both the
> CFLAGS and CXXFLAGS lines.
> In the Terminal:
> $ export SDKROOT=/Developer/SDKs/MacOSX10.4u.sdk
> $ export CCFLAGS="-arch i386 -isysroot $SDKROOT"
> and make your intel copy.  Then use lipo to merge the two together.

If I knew what the heck you were talking about, I could perhaps make
this easier for you in future builds.

The next version of netCDF, 3.6.1, due to be released this month, is
the last version of netCDF which does *not* use libtool and
automake. Starting with netCDF 4.0, we have a full autotools build.

Consequently, I have been doing a lot of work on the configuration for
netCDF 4.0, and now would be a good time to include whatever might
help with this compile problem.

But I am at a bit of a loss as to what might be helpful for me to

Are there any other libtool-using freeware packages which handle this
situation well? If so, what do they do that helps?


Ed Hartnett  -- ed@xxxxxxxxxxxxxxxx