Compiling expat on AIX PowerPC

michael.maggio@effem.com michael.maggio@effem.com
Mon Oct 1 12:38:10 2001


Hello,

I had a few problems compiling Expat 1.95.2 on AIX 4.3 (PowerPC platform) with
the xlC compiler and other assorted non-GNU tools.  The first problem was that
configure was unable to identify the endian-ness of the machine.  Each time I
ran configure, it would complain that the byte order was "unknown".  I took a
look at the configure script and found the following on line 2087:

     if ${CC-cc} conftest.c -o conftest.o && test -f conftest.o ; then

This command should create an executable with the name "conftest.o".  It seems
that xlC does not like this in a very strange way.  The compiler does not
generate an output file, nor does it complain!  When I use the following line in
its place:

     if ${CC-cc} -g -c conftest.c && test -f conftest.o ; then

This produces an unlinked object file "conftest.o", which the script can then
grep for "BIGenDianSyS" or "LiTTleEnDian" as needed.  I believe this is what you
intended to use anyway since it is also the command that is used elsewhere in
the configure script to compile conftest.c for other system tests.

After configure ran successfully, I then ran "make", which exited saying that
"default" was up-to-date, which it was not.  Ditto for "make all".  It looks
like it's not descending to the subdirectories.  I'm not as fluent in make, so I
wasn't sure how fix the script, but manually running make for each subdirectory,
then running "make install" in the root had the desired effect.

- Michael C. Maggio
 ISI-Mars, Mt Olive, NJ
 Work: 973-448-3182
 Cell: 908-310-8403
 Pager: 800-759-8888 #1083559