From: Maurice L. <mj...@ga...> - 2002-12-28 05:17:59
|
To follow up on this discussion of yesterday: - Tried autoscan. Contained some interesting info, some of which might be handy in rooting out additional non-portabilities. But most of it had to do with non-ANSI C constructs and are therefore false positives AFAIAC. Didn't help out with any of my current problems, which are: - Using autoconf's built-in support of KCC to fix the build under Solaris, and improve it elsewhere. So I added: # List of C++ compilers to look for, in order. The default (autconf 2.57) is: # g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC AC_PROG_CXX(KCC g++ c++ gpp aCC CC cxx cc++ cl FCC RCC xlC_r xlC) to configure.ac, chopping out the previous part. Didn't do a thing that I could tell except automatically get the compiler right, which *is* nice. So I'll replace the manual check by this, but still handle options as I mentioned previously. Back to Solaris.. the KCC shared lib build is still busted, as mentioned because of this: /bin/bash ../../libtool --mode=compile KCC -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -I../../libltdl -g -c -o plstream.lo `test -f 'plstream.cc' || echo './'`plstream.cc mkdir .libs KCC -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -I../../libltdl -g -c plstream.cc -fPIC -DPIC -o .libs/plstream.lo KCC: Option -fPIC not recognized. cc: illegal suffix of output filename (the -fPIC warning is harmless). So I took your advice and tried using cc instead of gcc by inserting the following line in configure.ac: AC_PROG_CC(cc cl egcs gcc) which overrides the default search order, like AC_PROG_CXX. Then the build went: ... cc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../libltdl -g -c plcont.c -KPIC -DPIC -o plcont.o mv -f plcont.o .libs/plcont.lo ... So you see, there is logic in there to build the object then move it, use it in the new location, and clean up appropriately. The question is, how can I trigger this behavior for KCC? -- Maurice LeBrun mj...@ga... Research Organization for Information Science and Technology of Japan (RIST) |