autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Documentation for Environmental Input Variables $CC and family


From: Steven G. Johnson
Subject: Re: Documentation for Environmental Input Variables $CC and family
Date: Fri, 19 Jan 2001 00:47:25 -0500 (EST)

Michael Bletzinger wrote:
> From the CVS autoconf documentation, it appears that you can preset
> certain compiler/linker names and flags before running configure by
> doing the following:
>
> ./configure CC=/usr/local2/bin/gcc
>
> I need to find a comprehensive list of variables that you can set in
> this way.  Does anyone know where such a list exists?

First, you can set any arbitrary environment variable in that way
(./configure FOOBAR=blah).  The advantage of this over 'env CC=cc
./configure', besides the stylistic, is that this way things like
./config.status can know that those environment variables were set at
configure time.

Second, if you are asking whether there is a comprehensive list of all
*useful* environment variables that can be set, it is impossible.  All
sorts of program-specific tests could depend upon new environment
variables, depending upon the program's configure.in; e.g.
AC_CHECK_PROGS(XTETRIS, xtetris tetris) is overridden by an XTETRIS
environment variable.

However, some of the most influential and commonly-used environment
variables are documented in the './configure --help' message (with the new
autoconf).  e.g. the help output might include:

------ begin sample output
Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE.  See below for descriptions of some of the useful
variables.

[...deleted...]

Some influential environment variables:
  CC          C compiler command
  CFLAGS      C compiler flags
  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
              headers in a nonstandard directory <include dir>
  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
              nonstandard directory <lib dir>
  F77         Fortran 77 compiler command
  FFLAGS      Fortran 77 compiler flags

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
------ end sample output

(Only variables actually used in a particular configure script are
listed.  e.g. F77 won't be listed if the configure script does not look
for a Fortran compiler.)

Steven





reply via email to

[Prev in Thread] Current Thread [Next in Thread]