Ethereal-dev: Re: [Ethereal-dev] autoconf patches to 0.8.16

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Thu, 8 Mar 2001 00:19:43 -0800
On Thu, Mar 08, 2001 at 02:13:11AM -0600, ethereal-dev@xxxxxxxxxxxxxxxxxx wrote:
> I just looked at configure and if --prefix is not specified, the
> default is /usr/local. I know that /usr/local/lib is not checked in
> the new PCAP and ZLIB macros. How about we force /usr/local/include
> and /usr/local/lib *only* if $prefix = "/usr/local"?

Or should it force "${prefix}/include" and "${prefix}/lib" regardless of
the setting of "${prefix}"?  Under "Setting Site Defaults", the
autoconfig documentation says:

	Setting Site Defaults
	=====================

	   Autoconf-generated `configure' scripts allow your site to provide 
	default values for some configuration values.  You do this by creating
	site- and system-wide initialization files.

	   If the environment variable `CONFIG_SITE' is set, `configure' uses
	its value as the name of a shell script to read.  Otherwise, it reads 
	the shell script `PREFIX/share/config.site' if it exists, then
	`PREFIX/etc/config.site' if it exists.  Thus, settings in
	machine-specific files override those in machine-independent ones in 
	case of conflict.

	   Site files can be arbitrary shell scripts, but only certain kinds of
	code are really appropriate to be in them.  Because `configure' reads
	any cache file after it has read any site files, a site file can define
	a default cache file to be shared between all Autoconf-generated
	`configure' scripts run on that system.  If you set a default cache
	file in a site file, it is a good idea to also set the output variable
	`CC' in that site file, because the cache file is only valid for a
	particular compiler, but many systems have several available.

	   You can examine or override the value set by a command line option to
	`configure' in a site file; options set shell variables that have the
	same names as the options, with any dashes turned into underscores.
	The exceptions are that `--without-' and `--disable-' options are like
	giving the corresponding `--with-' or `--enable-' option and the value
	`no'.  Thus, `--cache-file=localcache' sets the variable `cache_file'
	to the value `localcache'; `--enable-warnings=no' or
	`--disable-warnings' sets the variable `enable_warnings' to the value
	`no'; `--prefix=/usr' sets the variable `prefix' to the value `/usr';
	etc.

so that if some site decides that it will use "/usr/extra" rather than
"/usr/local", for example, and sets up such a configure script,
"configure" for Ethereal will not only arrange that Ethereal will be
installed under "/usr/local", it'll also arrange that it look under
"/usr/local" for various libraries that might not come with the OS.