Re: configure and config.h

Gunnar R|nning writes:
> I'm just in the process of compiling my application for several different
> Unices on the same "computer system". This is however painful with the
> current libwww setup, because the libwww include files that my application
> use needs the config.h file generated by configure. This way I have to
> rerun configure every time I want to compile my application for an
> architecture. Do we really need config.h when compiling the application ?
> Couldn't we have some check to ignore config.h when compiling the
> application ?
> 
> It would be nice if the include files as used by the application where
> architecture independent...

No, you don't - this is one of the beauties of configure. In the 
installation guide which is available as INSTALL in the distribution file 
and online as

	http://www.w3.org/pub/WWW/INSTALL.html

it says

Using a Different Build Directory 

You can compile the package in a directory different from the one containing 
the source code. Doing so allows you to compile it on more than one kind of 
computer at the same time. To do this you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make.' `cd' to the directory 
where you want to object files and library to go and run the `configure' 
script (i.e., go `../src/configure'). `configure' automatically checks for 
source
code in the directory that `configure' is in and in `..' as well.

***

As an example you can do the following for each of your platforms

	cd WWW
	mkdir <your-platform>
	cd <your-platform>
	env CFLAGS='-g -Wall' ../configure

The env part passes the CFLAGS to configure that will then use them when 
generating the make files.


-- 
Henrik Frystyk Nielsen, <frystyk@w3.org>
World Wide Web Consortium, MIT/LCS NE43-356
545 Technology Square, Cambridge MA 02139, USA

Received on Thursday, 18 July 1996 12:24:09 UTC