VAR=value.
* autoconf.texi, install.texi: Document it.
* configure: Rebuilt.
+1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ * acgeneral.m4 (Configuration): Accept --env-VAR=VALUE and
+ VAR=value.
+ * autoconf.texi, install.texi: Document it.
+ * configure: Rebuilt.
+
1999-09-14 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (AC_HELP_STRING): Rewrite in m4. Have m4 work, and
esac
eval "enable_${ac_feature}='$ac_optarg'" ;;
+ -env-* | --env-*)
+ ac_envvar=`echo $ac_option|sed -e 's/^-*env-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+changequote(, )dnl
+ if test -n "`echo $ac_envvar| sed 's/[_a-zA-Z0-9]//g'`"; then
+changequote([, ])dnl
+ AC_MSG_ERROR($ac_envvar: invalid variable name)
+ fi
+ case "$ac_option" in
+ *=*) ;;
+ *) AC_MSG_ERROR($ac_envvar: missing value) ;;
+ esac
+ eval "${ac_envvar}='$ac_optarg'"
+ export $ac_envvar ;;
+
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
| --exec | --exe | --ex)
Options: [defaults in brackets after descriptions]
Configuration:
--cache-file=FILE cache test results in FILE
+ [--env-]VAR=VALUE set environment variable VAR to VALUE
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
-*) AC_MSG_ERROR([$ac_option: invalid option; use --help to show usage])
;;
+ *=*)
+ ac_envvar=`echo $ac_option|sed -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+changequote(, )dnl
+ if test -n "`echo $ac_envvar| sed 's/[_a-zA-Z0-9]//g'`"; then
+changequote([, ])dnl
+ AC_MSG_ERROR($ac_envvar: invalid variable name)
+ fi
+ eval "${ac_envvar}='$ac_optarg'"
+ export $ac_envvar ;;
+
*)
changequote(, )dnl
if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
* Optional Features:: Selecting optional features
* System Type:: Specifying the system type
* Sharing Defaults:: Setting site-wide defaults for @code{configure}
+* Environment Variables:: Defining environment variables.
* Operation Controls:: Changing how @code{configure} runs
Questions About Autoconf
* Optional Features:: Selecting optional features
* System Type:: Specifying the system type
* Sharing Defaults:: Setting site-wide defaults for @code{configure}
+* Environment Variables:: Defining environment variables.
* Operation Controls:: Changing how @code{configure} runs
@end menu
esac
eval "enable_${ac_feature}='$ac_optarg'" ;;
+ -env-* | --env-*)
+ ac_envvar=`echo $ac_option|sed -e 's/^-*env-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_envvar| sed 's/[_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_envvar: invalid variable name" 1>&2; exit 1; }
+ fi
+ case "$ac_option" in
+ *=*) ;;
+ *) { echo "configure: error: $ac_envvar: missing value" 1>&2; exit 1; } ;;
+ esac
+ eval "${ac_envvar}='$ac_optarg'"
+ export $ac_envvar ;;
+
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
| --exec | --exe | --ex)
Options: [defaults in brackets after descriptions]
Configuration:
--cache-file=FILE cache test results in FILE
+ [--env-]VAR=VALUE set environment variable VAR to VALUE
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
-*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
;;
+ *=*)
+ ac_envvar=`echo $ac_option|sed -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+ if test -n "`echo $ac_envvar| sed 's/[_a-zA-Z0-9]//g'`"; then
+ { echo "configure: error: $ac_envvar: invalid variable name" 1>&2; exit 1; }
+ fi
+ eval "${ac_envvar}='$ac_optarg'"
+ export $ac_envvar ;;
+
*)
if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
echo "configure: warning: $ac_option: invalid host type" 1>&2
# Allow concurrent executions
conftest=cft\$\$
-: \${CONFIG_FILES="Makefile
-testsuite/Makefile"}
+: \${CONFIG_FILES="Makefile testsuite/Makefile"}
rm -fr \`echo "\$CONFIG_FILES " | sed "s/:@BKL@^ @BKR@*//g"\`
trap 'rm -fr \$conftest*; exit 1' 1 2 15
* Optional Features:: Selecting optional features
* System Type:: Specifying the system type
* Sharing Defaults:: Setting site-wide defaults for @code{configure}
+* Environment Variables:: Defining environment variables.
* Operation Controls:: Changing how @code{configure} runs
Questions About Autoconf
* Optional Features:: Selecting optional features
* System Type:: Specifying the system type
* Sharing Defaults:: Setting site-wide defaults for @code{configure}
+* Environment Variables:: Defining environment variables.
* Operation Controls:: Changing how @code{configure} runs
@end menu
environment. Using a Bourne-compatible shell, you can do that on the
command line like this:
@example
-CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
-@end example
-
-@noindent
-Or on systems that have the @code{env} program, you can do it like this:
-@example
-env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
@end example
@node Multiple Architectures
the @code{CONFIG_SITE} environment variable to the location of the site
script. A warning: not all @code{configure} scripts look for a site script.
+@node Environment Variables
+@section Environment Variables
+
+Variables not defined in a site shell script can be set in the
+environment passed to configure. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you can set them
+in the @code{configure} command line, using @samp{--env-VAR=value} or
+@samp{VAR=value}. For example, the switch
+@samp{--env-CC=/usr/local2/bin/gcc} will cause the specified gcc to be
+used as the C compiler (unless it is overridden in the site shell
+script).
+
@node Operation Controls
@section Operation Controls
environment. Using a Bourne-compatible shell, you can do that on the
command line like this:
@example
-CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
-@end example
-
-@noindent
-Or on systems that have the @code{env} program, you can do it like this:
-@example
-env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
@end example
@node Multiple Architectures
the @code{CONFIG_SITE} environment variable to the location of the site
script. A warning: not all @code{configure} scripts look for a site script.
+@node Environment Variables
+@section Environment Variables
+
+Variables not defined in a site shell script can be set in the
+environment passed to configure. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you can set them
+in the @code{configure} command line, using @samp{--env-VAR=value} or
+@samp{VAR=value}. For example, the switch
+@samp{--env-CC=/usr/local2/bin/gcc} will cause the specified gcc to be
+used as the C compiler (unless it is overridden in the site shell
+script).
+
@node Operation Controls
@section Operation Controls
esac
eval "enable_${ac_feature}='$ac_optarg'" ;;
+ -env-* | --env-*)
+ ac_envvar=`echo $ac_option|sed -e 's/^-*env-//' -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+changequote(, )dnl
+ if test -n "`echo $ac_envvar| sed 's/[_a-zA-Z0-9]//g'`"; then
+changequote([, ])dnl
+ AC_MSG_ERROR($ac_envvar: invalid variable name)
+ fi
+ case "$ac_option" in
+ *=*) ;;
+ *) AC_MSG_ERROR($ac_envvar: missing value) ;;
+ esac
+ eval "${ac_envvar}='$ac_optarg'"
+ export $ac_envvar ;;
+
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
| --exec | --exe | --ex)
Options: [defaults in brackets after descriptions]
Configuration:
--cache-file=FILE cache test results in FILE
+ [--env-]VAR=VALUE set environment variable VAR to VALUE
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
-*) AC_MSG_ERROR([$ac_option: invalid option; use --help to show usage])
;;
+ *=*)
+ ac_envvar=`echo $ac_option|sed -e 's/=.*//'`
+ # Reject names that are not valid shell variable names.
+changequote(, )dnl
+ if test -n "`echo $ac_envvar| sed 's/[_a-zA-Z0-9]//g'`"; then
+changequote([, ])dnl
+ AC_MSG_ERROR($ac_envvar: invalid variable name)
+ fi
+ eval "${ac_envvar}='$ac_optarg'"
+ export $ac_envvar ;;
+
*)
changequote(, )dnl
if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then