views:

95

answers:

2

It always seems to pick up the version from /usr/lib and there doesn't seem to be a ./configure parameter to override it.

./configure --prefix=$PREFIX --with-quantum-depth=8 --disable-installed --without-x --without-perl --enable-static --disable-shared --with-jpeg --with-tiff CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS" --disable-openmp --disable-openmp-slow

Thanks, Rui

A: 

Can you just manually edit the Makefile that's generated by ./configure?

EDIT: alternatively, there's an XML2_CONFIG environment variable you can set, to point to the xml2-config script for your custom install.

echo
+1  A: 

Generally, an installation of libxml2 includes a configuration script xml2-config that users of the library use to find the correct paths to its components and other build info. The Apple-supplied version of libxml2 has xml2-config in /usr/bin. If you've installed another version of libxml2, make sure your $PATH is set such that its xml2-config will be found first by the ImageMagick configure script: so ensuring most likely one of /usr/local/bin, /opt/local/bin (MacPorts), or /sw/bin (Fink) comes before /usr/bin on $PATH.

A simpler solution might be to just let MacPorts install it all for you:

$ sudo port install ImageMagick
Ned Deily
Well, I found out the hard way that MacPorts doesn't cross compile (there's a feature request for this). Because I wanted to compile my app for both 10.5 and 10.6 I ended up having to compile all dependency libraries manual like libpng, libtiff, ... BTW, got the libxml2 to work. Thanks!
ruibm