]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Improve --help documentation of important environment variables.
authorAkim Demaille <akim@epita.fr>
Mon, 10 Jul 2000 10:37:19 +0000 (10:37 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 10 Jul 2000 10:37:19 +0000 (10:37 +0000)
* acgeneral.m4 (_AC_INIT_HELP): Direct reader to descriptions
of useful variables at the end of the --help.
(AC_ARG_VAR): Emphasize use of environment variables to override
and/or help the configure script.  Ensure that a given variable
is only documented once in the --help.
(AC_CHECK_LIB): Call AC_ARG_VAR to document and register the
LDFLAGS variable, and...
(AC_CHECK_HEADER): do the same for the CPPFLAGS variable.
* aclang.m4 (AC_PROG_CC): Call AC_ARG_VAR to document and register
the CC and CFLAGS variables, and do the same for...
(AC_PROG_CXX): CXX and CXXFLAGS, and...
(AC_PROG_F77): F77 and FFLAGS.

ChangeLog
acgeneral.m4
aclang.m4
lib/autoconf/c.m4
lib/autoconf/fortran.m4
lib/autoconf/general.m4
lib/autoconf/lang.m4

index 95c5698f37a8ea2feee18ebb4aa0c56cb239f650..d384cfdc47c892fd4895d939789921496849f901 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2000-07-10  Steven G. Johnson  <stevenj@alum.mit.edu>
+
+       Improve --help documentation of important environment variables.
+
+       * acgeneral.m4 (_AC_INIT_HELP): Direct reader to descriptions
+       of useful variables at the end of the --help.
+       (AC_ARG_VAR): Emphasize use of environment variables to override
+       and/or help the configure script.  Ensure that a given variable
+       is only documented once in the --help.
+       (AC_CHECK_LIB): Call AC_ARG_VAR to document and register the
+       LDFLAGS variable, and...
+       (AC_CHECK_HEADER): do the same for the CPPFLAGS variable.
+       * aclang.m4 (AC_PROG_CC): Call AC_ARG_VAR to document and register
+       the CC and CFLAGS variables, and do the same for...
+       (AC_PROG_CXX): CXX and CXXFLAGS, and...
+       (AC_PROG_F77): F77 and FFLAGS.
+
 2000-07-10  Akim Demaille  <akim@epita.fr>
 
        * Makefile.am (wget-update): New target.
index ef1def44214f6c988b85cdfd1a4386ddb3e288b7..b0b928d5c9ec8c26350759edac5d3cdf8909df59 100644 (file)
@@ -1642,7 +1642,7 @@ if test "$ac_init_help" = "long"; then
 Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
 
 [To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.
+VAR=VALUE.  See below for descriptions of useful variables.
 
 Defaults for the options are specified in brackets.
 
@@ -2040,13 +2040,16 @@ AU_DEFUN([AC_WITH],
 # AC_ARG_VAR(VARNAME, DOCUMENTATION)
 # ----------------------------------
 # Register VARNAME as a variable configure should remember, and
-# document it in `configure --help'.
+# document it in `configure --help' (but only once).
 AC_DEFUN([AC_ARG_VAR],
 [AC_DIVERT_PUSH([HELP_VAR])dnl
 AC_EXPAND_ONCE([
-Some influent environment variables:
+Some relevant environment variables, which you can use to override the
+choices made by the configure script or to help it to find libraries and
+programs with nonstandard names/locations:
 ])[]dnl
-AC_HELP_STRING([$1], [$2], [              ])
+ifdef([AC_ARG_VAR_$1],,[AC_HELP_STRING([$1], [$2], [              ])
+define([AC_ARG_VAR_$1])])dnl
 AC_DIVERT_POP()dnl
 dnl Register if set and not yet registered.
 dnl If there are envvars given as arguments, they are already set,
@@ -3098,6 +3101,7 @@ AC_SHELL_IFELSE([test "$ac_cv_search_$1" != no],
 AC_DEFUN([AC_CHECK_LIB],
 [AH_CHECK_LIB([$1])dnl
 AC_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])dnl
+AC_ARG_VAR([LDFLAGS], [linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir>])
 AC_CACHE_CHECK([for $2 in -l$1], ac_Lib,
 [ac_check_lib_save_LIBS=$LIBS
 LIBS="-l$1 $5 $LIBS"
@@ -3346,6 +3350,7 @@ fi
 # ----------------------------------------------------------------------
 AC_DEFUN([AC_CHECK_HEADER],
 [AC_VAR_PUSHDEF([ac_Header], [ac_cv_header_$1])dnl
+AC_ARG_VAR([CPPFLAGS], [C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir>])
 AC_CACHE_CHECK([for $1], ac_Header,
 [AC_TRY_CPP([#include <$1>
 ],
index 46183f289de4d66cf06472eca1b64de7dc2cc698..ac0d8c21d1bf7d775b64937ce2b8d5cbadee0f32 100644 (file)
--- a/aclang.m4
+++ b/aclang.m4
@@ -544,7 +544,8 @@ AC_SUBST(CPP)dnl
 AC_DEFUN([AC_PROG_CC],
 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
 AC_LANG_PUSH(C)
-AC_ARG_VAR([CFLAGS], [Extra flags for the C compiler])
+AC_ARG_VAR([CC], [C compiler command])
+AC_ARG_VAR([CFLAGS], [C compiler flags])
 ifval([$1],
       [AC_CHECK_TOOLS(CC, [$1])],
 [
@@ -743,6 +744,8 @@ AC_SUBST(CXXCPP)dnl
 AC_DEFUN([AC_PROG_CXX],
 [AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
 AC_LANG_PUSH(C++)
+AC_ARG_VAR([CXX], [C++ compiler command])
+AC_ARG_VAR([CXXFLAGS], [C++ compiler flags])
 AC_CHECK_TOOLS(CXX,
                [$CCC m4_default([$1],
                           [g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC])],
@@ -842,6 +845,8 @@ fi[]dnl
 AC_DEFUN([AC_PROG_F77],
 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
 AC_LANG_PUSH(Fortran 77)
+AC_ARG_VAR([F77], [Fortran 77 compiler command])
+AC_ARG_VAR([FFLAGS], [Fortran 77 compiler flags])
 AC_CHECK_TOOLS(F77,
       [m4_default([$1],
                   [g77 f77 xlf cf77 pgf77 fl32 fort77 f90 xlf90 f95 lf95 fc])])
index 46183f289de4d66cf06472eca1b64de7dc2cc698..ac0d8c21d1bf7d775b64937ce2b8d5cbadee0f32 100644 (file)
@@ -544,7 +544,8 @@ AC_SUBST(CPP)dnl
 AC_DEFUN([AC_PROG_CC],
 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
 AC_LANG_PUSH(C)
-AC_ARG_VAR([CFLAGS], [Extra flags for the C compiler])
+AC_ARG_VAR([CC], [C compiler command])
+AC_ARG_VAR([CFLAGS], [C compiler flags])
 ifval([$1],
       [AC_CHECK_TOOLS(CC, [$1])],
 [
@@ -743,6 +744,8 @@ AC_SUBST(CXXCPP)dnl
 AC_DEFUN([AC_PROG_CXX],
 [AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
 AC_LANG_PUSH(C++)
+AC_ARG_VAR([CXX], [C++ compiler command])
+AC_ARG_VAR([CXXFLAGS], [C++ compiler flags])
 AC_CHECK_TOOLS(CXX,
                [$CCC m4_default([$1],
                           [g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC])],
@@ -842,6 +845,8 @@ fi[]dnl
 AC_DEFUN([AC_PROG_F77],
 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
 AC_LANG_PUSH(Fortran 77)
+AC_ARG_VAR([F77], [Fortran 77 compiler command])
+AC_ARG_VAR([FFLAGS], [Fortran 77 compiler flags])
 AC_CHECK_TOOLS(F77,
       [m4_default([$1],
                   [g77 f77 xlf cf77 pgf77 fl32 fort77 f90 xlf90 f95 lf95 fc])])
index 46183f289de4d66cf06472eca1b64de7dc2cc698..ac0d8c21d1bf7d775b64937ce2b8d5cbadee0f32 100644 (file)
@@ -544,7 +544,8 @@ AC_SUBST(CPP)dnl
 AC_DEFUN([AC_PROG_CC],
 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
 AC_LANG_PUSH(C)
-AC_ARG_VAR([CFLAGS], [Extra flags for the C compiler])
+AC_ARG_VAR([CC], [C compiler command])
+AC_ARG_VAR([CFLAGS], [C compiler flags])
 ifval([$1],
       [AC_CHECK_TOOLS(CC, [$1])],
 [
@@ -743,6 +744,8 @@ AC_SUBST(CXXCPP)dnl
 AC_DEFUN([AC_PROG_CXX],
 [AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
 AC_LANG_PUSH(C++)
+AC_ARG_VAR([CXX], [C++ compiler command])
+AC_ARG_VAR([CXXFLAGS], [C++ compiler flags])
 AC_CHECK_TOOLS(CXX,
                [$CCC m4_default([$1],
                           [g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC])],
@@ -842,6 +845,8 @@ fi[]dnl
 AC_DEFUN([AC_PROG_F77],
 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
 AC_LANG_PUSH(Fortran 77)
+AC_ARG_VAR([F77], [Fortran 77 compiler command])
+AC_ARG_VAR([FFLAGS], [Fortran 77 compiler flags])
 AC_CHECK_TOOLS(F77,
       [m4_default([$1],
                   [g77 f77 xlf cf77 pgf77 fl32 fort77 f90 xlf90 f95 lf95 fc])])
index ef1def44214f6c988b85cdfd1a4386ddb3e288b7..b0b928d5c9ec8c26350759edac5d3cdf8909df59 100644 (file)
@@ -1642,7 +1642,7 @@ if test "$ac_init_help" = "long"; then
 Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
 
 [To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.
+VAR=VALUE.  See below for descriptions of useful variables.
 
 Defaults for the options are specified in brackets.
 
@@ -2040,13 +2040,16 @@ AU_DEFUN([AC_WITH],
 # AC_ARG_VAR(VARNAME, DOCUMENTATION)
 # ----------------------------------
 # Register VARNAME as a variable configure should remember, and
-# document it in `configure --help'.
+# document it in `configure --help' (but only once).
 AC_DEFUN([AC_ARG_VAR],
 [AC_DIVERT_PUSH([HELP_VAR])dnl
 AC_EXPAND_ONCE([
-Some influent environment variables:
+Some relevant environment variables, which you can use to override the
+choices made by the configure script or to help it to find libraries and
+programs with nonstandard names/locations:
 ])[]dnl
-AC_HELP_STRING([$1], [$2], [              ])
+ifdef([AC_ARG_VAR_$1],,[AC_HELP_STRING([$1], [$2], [              ])
+define([AC_ARG_VAR_$1])])dnl
 AC_DIVERT_POP()dnl
 dnl Register if set and not yet registered.
 dnl If there are envvars given as arguments, they are already set,
@@ -3098,6 +3101,7 @@ AC_SHELL_IFELSE([test "$ac_cv_search_$1" != no],
 AC_DEFUN([AC_CHECK_LIB],
 [AH_CHECK_LIB([$1])dnl
 AC_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])dnl
+AC_ARG_VAR([LDFLAGS], [linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir>])
 AC_CACHE_CHECK([for $2 in -l$1], ac_Lib,
 [ac_check_lib_save_LIBS=$LIBS
 LIBS="-l$1 $5 $LIBS"
@@ -3346,6 +3350,7 @@ fi
 # ----------------------------------------------------------------------
 AC_DEFUN([AC_CHECK_HEADER],
 [AC_VAR_PUSHDEF([ac_Header], [ac_cv_header_$1])dnl
+AC_ARG_VAR([CPPFLAGS], [C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir>])
 AC_CACHE_CHECK([for $1], ac_Header,
 [AC_TRY_CPP([#include <$1>
 ],
index 46183f289de4d66cf06472eca1b64de7dc2cc698..ac0d8c21d1bf7d775b64937ce2b8d5cbadee0f32 100644 (file)
@@ -544,7 +544,8 @@ AC_SUBST(CPP)dnl
 AC_DEFUN([AC_PROG_CC],
 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
 AC_LANG_PUSH(C)
-AC_ARG_VAR([CFLAGS], [Extra flags for the C compiler])
+AC_ARG_VAR([CC], [C compiler command])
+AC_ARG_VAR([CFLAGS], [C compiler flags])
 ifval([$1],
       [AC_CHECK_TOOLS(CC, [$1])],
 [
@@ -743,6 +744,8 @@ AC_SUBST(CXXCPP)dnl
 AC_DEFUN([AC_PROG_CXX],
 [AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
 AC_LANG_PUSH(C++)
+AC_ARG_VAR([CXX], [C++ compiler command])
+AC_ARG_VAR([CXXFLAGS], [C++ compiler flags])
 AC_CHECK_TOOLS(CXX,
                [$CCC m4_default([$1],
                           [g++ c++ gpp aCC CC cxx cc++ cl KCC RCC xlC_r xlC])],
@@ -842,6 +845,8 @@ fi[]dnl
 AC_DEFUN([AC_PROG_F77],
 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
 AC_LANG_PUSH(Fortran 77)
+AC_ARG_VAR([F77], [Fortran 77 compiler command])
+AC_ARG_VAR([FFLAGS], [Fortran 77 compiler flags])
 AC_CHECK_TOOLS(F77,
       [m4_default([$1],
                   [g77 f77 xlf cf77 pgf77 fl32 fort77 f90 xlf90 f95 lf95 fc])])