[vtkusers] vtkConfigure.h and machine byte ordering: do I worry too much?

Bill Hoffman bill.hoffman at kitware.com
Mon Apr 9 11:37:57 EDT 2001


Since different architectures have different vtkConfigure.h files, if you want
to build from a single source tree, you have to have different -I paths for
each system supported.    The alternative, is to create a .h file with a bunch
of #ifdef directives which will not work on as many machines as the autoconf/configure
generated .h files.   In the past, many of these flags were passed on the command
line to VTK, which was even worst for users, because to use a vtk build out side
of the vtk build system, the user had to match the compile flags that configure picked
for VTK, or things like endian could be wrong.   

At 05:01 PM 4/9/2001 +0200, Robert Belleman wrote:
>On Mon, Apr 09, 2001 at 09:46:50AM -0400, William A. Hoffman wrote:
>> You should be building, or at least configuring VTK out of the source directory.
>> For example:
>> 
>> vtk/...
>> vtk-Solaris
>> vtk-linux
>> vtk-irix
>> 
>> To configure for one of those:
>> 
>> cd vtk-Solaris
>> ../vtk/configure
>> 
>> All the generated .h files will be in vtk-Solaris.
>
>Why would I want to do a thing like that?
>
>Sure; this give me the generated .h files in a special directory, but I
>might as well just copy these to a different directory after I had run
>configure from within the vtk source tree itself.
>
>Are you suggesting that, as a next step, I then change my user Makefiles
>so that vtkConfigure.h and vtkToolkits.h are included from these
>"architecture specific" directories? Sounds like a second rate solution
>to me.

Yes, exactly, there is no safe way around this.



>Or are you suggesting that I should maintain an architecture specific
>"include" directory (next to "bin" and "lib")? Suboptimal, in my opinion,
>since only two files would be different for the different architectures
>(but don't have to be). But then I feel that the "install" target in the
>main Makefile should do this for us.
>
>
>The point I'm trying to make here, is that currently "naive" users can
>infer incorrect definitions from these two include files (the byte
>ordering in particular) which should either (1) have been guarded or (2)
>determined at run-time.
>
>
>Best,
>-- Rob
>
>[] Robert Belleman         X  Section Computational Science            []
>[] robbel at science.uva.nl  |X| University of Amsterdam, the Netherlands []
>[] tel: (+31) 20 525 7510  X  http://www.science.uva.nl/~robbel/       [] 





More information about the vtkusers mailing list