I sincerely applaud the effort to move Open CASCADE away from custom scripts and to an autoconf/automake setup. However, I've had a very tough time building the Open CASCADE 4.0 release on IRIX 6.5. I am using the vendor compilers (CC and cc) rather than gcc, since our application needs to link with some other libraries that are compiled with CC.
I'm no autoconf guru, my experience consists simply of having downloaded and installed a lot of packages that use it, and for most packages "configure" followed by "gmake" perform flawlessly. When I tried to do the same with Open CASCADE, I encountered several problems.
1) The configure script ensures that the generated Makefiles all use the "libtool" script that gets generated with the ltmain.sh and ltconfig.sh that are supplied with the distribution. However, that generated libtool, which identifies itself as 1.4c, failed to work for me. It: a) Failed to pass along libraries that were specified on the command-line, e.g. "../../libtool [...] ../TKernel/TKernel.la -lm -lmalloc" expanded to a call to the linker, ld, that lacked the -lm and -lmalloc flags and the TKernel library. b) Failed to specify the -shared flag c) Failed to add -lc to link with the C library So linking always failed with many unresolved symbols. I found that the latest standard libtool (1.4.2, which I downloaded from freeware.sgi.com) worked much better, in fact it worked fine except that it failed on extremely long command-lines, which left me unable to compile several of the directories. I see that Open CASCADE's libtool directly addresses the line-too-long problem, but it failed for reasons (a) though (c) above.
At this point #1 is the only remaining problem, I have compiled all of the source files and have generated all but about half a dozen libraries, for which the standard libtool fails due to the size of the command-line and the supplied libtool fails to resolve symbols. Any ideas would be greatly appreciated!
P.S. Here are other comments, and problems that I was able to work around, in case anyone's interested:
2) General comment: after untarring the headers and source and running ./configure, as soon as I typed "gmake" the Makefiles attemped to run aclocal and autoconf to regenerate the configure script and rerun it. From a practical point of view, this process generally failed because the Makefile.in files do not have write permissions, yet it clobbered the ./configure script and left my directories in an uncompilable state. From a user, or even developer, perspective, normally the downloaded library already contains the configure script and Makefile.in files and congfigure generates the config.h and Makefiles needed to build the library; normally someone who has downloaded the library to compile it does *not* need to rerun autoconf to regenerate the configure script or the Makefile.in files. That part of the Makefile should probably be relegated to an explicit make target, e.g. "gmake autoconf", and should never fire off implicitly.
3) The Makefile.in files specifically adds the "-Wp,-MD,.libs/$(f)" arguments to four different command lines to cause makefile dependency files to be generated by the proprocessor during compilation. The IRIX preprocessor doesn't understnad the "-MD" flag, it uses "-MDtarget" instead, but unfortunately instead of politely indicating that it doesn't understand, the stupid IRIX preprocessor gives a cryptic compilation error without ever reading the input files: " cc-1574 CC: ERROR The definition of macro %sq is not valid." I had to run a little sed script to change "-MD" to "-MDtarget" in all the Makefiles after running configure but before running gmake.
4) The TKViewerTest directory doesn't include the tcl/tk include directories when compiling, somehow "$(CSF_TclLibs_INCLUDES) $(CSF_TclTkLibs_INCLUDES)" needs to be added to the end of the "INCLUDES =" line of its Makefile. I added this to Makefile manually.