install-sh, quote cmd line options

This commit is contained in:
David MacKenzie 1994-09-11 06:20:58 +00:00
parent 8787e877c8
commit fccf840837
14 changed files with 888 additions and 811 deletions

View File

@ -64,7 +64,7 @@ DISTFILES = COPYING ChangeLog ChangeLog.1 INSTALL \
autoconf.sh autoconf.texi install.texi \
autoheader.sh autoreconf.sh autoscan.pl autoupdate.sh ifnames.sh \
config.guess config.sub configure configure.in \
install.sh mkinstalldirs texinfo.tex \
install-sh mkinstalldirs texinfo.tex \
testsuite/Makefile.in testsuite/config/*.exp \
testsuite/lib/*.exp testsuite/autoconf.[gs]/*.exp \
standards.texi make-stds.texi standards.info*

5
NEWS
View File

@ -38,8 +38,9 @@ Major changes in release 2.0:
* AC_OUTPUT automatically substitutes the values of CFLAGS, CXXFLAGS,
CPPFLAGS, and LDFLAGS from the environment.
* AC_PROG_CC and AC_PROG_CXX now set CFLAGS and CXXFLAGS, respectively.
* AC_PROG_INSTALL looks for install.sh in the directory specified by
AC_CONFIG_AUXDIR, or srcdir or srcdir/.. or srcdir/../.. by default.
* AC_PROG_INSTALL looks for install-sh or install.sh in the directory
specified by AC_CONFIG_AUXDIR, or srcdir or srcdir/.. or
srcdir/../.. by default.
* AC_DEFINE, AC_DEFINE_UNQUOTED, and AC_SUBST are more robust and smaller.
* AC_DEFINE no longer prints anything, because of the new result reporting
mechanism (AC_MSG_CHECKING and AC_MSG_RESULT).

View File

@ -24,7 +24,7 @@ dnl
divert(-1)dnl Throw away output until AC_INIT is called.
changequote([, ])
define(AC_ACVERSION, 1.115)
define(AC_ACVERSION, 1.116)
dnl Some old m4's don't support m4exit. But they provide
dnl equivalent functionality by core dumping because of the
@ -136,9 +136,7 @@ ac_help=])
dnl AC_INIT_PARSE_ARGS()
AC_DEFUN(AC_INIT_PARSE_ARGS,
[# Save the original args to write them into config.status later.
configure_args="[$]@"
[
# Omit some internal or obsolete options to make the list less imposing.
changequote(, )dnl
ac_usage="Usage: configure [options] [host]
@ -458,20 +456,20 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
" 1>&AC_FD_CC
ac_configure_temp="$configure_args"
# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing spaces.
configure_args=
for ac_arg in $ac_configure_temp; do
ac_configure_args=
for ac_arg
do
case "$ac_arg" in
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c) ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
changequote(, )dnl
*[" "]*) configure_args="$configure_args '$ac_arg'" ;;
*[" "]*) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
changequote([, ])dnl
*) configure_args="$configure_args $ac_arg" ;;
*) ac_configure_args="$ac_configure_args $ac_arg" ;;
esac
done
@ -642,7 +640,7 @@ AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1])])
dnl ### Canonicalizing the system type
dnl Find install.sh, config.sub, config.guess, and Cygnus configure
dnl Find install-sh, config.sub, config.guess, and Cygnus configure
dnl in directory DIR. These are auxiliary files used in configuration.
dnl DIR can be either absolute or relative to ${srcdir}.
dnl AC_CONFIG_AUX_DIR(DIR)
@ -656,23 +654,28 @@ AC_DEFUN(AC_CONFIG_AUX_DIR_DEFAULT,
dnl Internal subroutine.
dnl Search for the configuration auxiliary files in directory list $1.
dnl We look only for install.sh, so users of AC_PROG_INSTALL
dnl We look only for install-sh, so users of AC_PROG_INSTALL
dnl do not automatically need to distribute the other auxiliary files.
dnl AC_CONFIG_AUX_DIRS(DIR ...)
AC_DEFUN(AC_CONFIG_AUX_DIRS,
[ac_aux_dir=
for ac_dir in $1; do
if test -f $ac_dir/install.sh; then
ac_aux_dir=$ac_dir; break
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="${ac_aux_dir}/install-sh -c"
break
elif test -f $ac_dir/install.sh; then
ac_aux_dir=$ac_dir
ac_install_sh="${ac_aux_dir}/install.sh -c"
break
fi
done
if test -z "$ac_aux_dir"; then
AC_MSG_ERROR([can not find install.sh in $1])
AC_MSG_ERROR([can not find install-sh or install.sh in $1])
fi
ac_config_guess=${ac_aux_dir}/config.guess
ac_config_sub=${ac_aux_dir}/config.sub
ac_configure=${ac_aux_dir}/configure # This should be Cygnus configure.
ac_install_sh="${ac_aux_dir}/install.sh -c"
AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
])
@ -1483,7 +1486,7 @@ dnl hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
dnl so uname gets run too.
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
[#] [$]0 [$]configure_args
[#] [$]0 [$]ac_configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
@ -1495,8 +1498,8 @@ for ac_option
do
case "[\$]ac_option" in
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
echo running [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]configure_args --no-create --no-recursion
exec [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]configure_args --no-create --no-recursion ;;
echo "running [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion"
exec [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "${CONFIG_STATUS} generated by autoconf version AC_ACVERSION"
exit 0 ;;
@ -1804,7 +1807,7 @@ if test "${no_recursion}" != yes; then
# Remove --cache-file and --srcdir arguments so they do not pile up.
ac_sub_configure_args=
ac_prev=
for ac_arg in $configure_args; do
for ac_arg in $ac_configure_args; do
if test -n "$ac_prev"; then
ac_prev=
continue
@ -1884,7 +1887,8 @@ changequote([, ])dnl
esac
echo "[running ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file] --srcdir=${ac_sub_srcdir}"
if ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file --srcdir=${ac_sub_srcdir}
# The eval makes quoting arguments work.
if eval ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file --srcdir=${ac_sub_srcdir}
then :
else
AC_MSG_ERROR(${ac_sub_configure} failed for ${ac_config_dir})

View File

@ -1181,9 +1181,9 @@ fi
])
AC_DEFUN(AC_FUNC_GETMNTENT,
[# getmntent is in -lsun on Irix 4, -lseq on PTX.
AC_CHECK_LIB(sun, getmntent, LIBS="$LIBS -lsun")
AC_CHECK_LIB(seq, getmntent, LIBS="$LIBS -lseq")
[# getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX.
AC_CHECK_LIB(sun, getmntent, LIBS="$LIBS -lsun",
[AC_CHECK_LIB(seq, getmntent, LIBS="$LIBS -lseq")])
AC_CHECK_FUNC(getmntent, [AC_DEFINE(HAVE_GETMNTENT)])])
AC_DEFUN(AC_FUNC_STRFTIME,

File diff suppressed because it is too large Load Diff

View File

@ -25,7 +25,7 @@ eval "exec @PERL@ -S $0 $*"
require "find.pl";
$datadir = "@datadir@";
$datadir = $ENV{"AC_MACRODIR"} || "@datadir@";
$verbose = 0;
&parse_args;

View File

@ -25,7 +25,7 @@ eval "exec @PERL@ -S $0 $*"
require "find.pl";
$datadir = "@datadir@";
$datadir = $ENV{"AC_MACRODIR"} || "@datadir@";
$verbose = 0;
&parse_args;

View File

@ -25,7 +25,7 @@ eval "exec @PERL@ -S $0 $*"
require "find.pl";
$datadir = "@datadir@";
$datadir = $ENV{"AC_MACRODIR"} || "@datadir@";
$verbose = 0;
&parse_args;

View File

@ -64,7 +64,7 @@ DISTFILES = COPYING ChangeLog ChangeLog.1 INSTALL \
autoconf.sh autoconf.texi install.texi \
autoheader.sh autoreconf.sh autoscan.pl autoupdate.sh ifnames.sh \
config.guess config.sub configure configure.in \
install.sh mkinstalldirs texinfo.tex \
install-sh mkinstalldirs texinfo.tex \
testsuite/Makefile.in testsuite/config/*.exp \
testsuite/lib/*.exp testsuite/autoconf.[gs]/*.exp \
standards.texi make-stds.texi standards.info*

File diff suppressed because it is too large Load Diff

View File

@ -70,13 +70,13 @@ the @code{configure} script does not know about. You can give
environment. Using a Bourne-compatible shell, you can do that on the
command line like this:
@example
CC=c89 CFLAGS=-O2 CPPFLAGS=-I/usr/local/include LDFLAGS=-s LIBS=-lposix ./configure
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 CC=c89 CFLAGS=-O2 CPPFLAGS=-I/usr/local/include LDFLAGS=-s LIBS=-lposix ./configure
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
@end example
@node Build Directory

View File

@ -70,13 +70,13 @@ the @code{configure} script does not know about. You can give
environment. Using a Bourne-compatible shell, you can do that on the
command line like this:
@example
CC=c89 CFLAGS=-O2 CPPFLAGS=-I/usr/local/include LDFLAGS=-s LIBS=-lposix ./configure
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 CC=c89 CFLAGS=-O2 CPPFLAGS=-I/usr/local/include LDFLAGS=-s LIBS=-lposix ./configure
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
@end example
@node Build Directory

View File

@ -24,7 +24,7 @@ dnl
divert(-1)dnl Throw away output until AC_INIT is called.
changequote([, ])
define(AC_ACVERSION, 1.115)
define(AC_ACVERSION, 1.116)
dnl Some old m4's don't support m4exit. But they provide
dnl equivalent functionality by core dumping because of the
@ -136,9 +136,7 @@ ac_help=])
dnl AC_INIT_PARSE_ARGS()
AC_DEFUN(AC_INIT_PARSE_ARGS,
[# Save the original args to write them into config.status later.
configure_args="[$]@"
[
# Omit some internal or obsolete options to make the list less imposing.
changequote(, )dnl
ac_usage="Usage: configure [options] [host]
@ -458,20 +456,20 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
" 1>&AC_FD_CC
ac_configure_temp="$configure_args"
# Strip out --no-create and --no-recursion so they do not pile up.
# Also quote any args containing spaces.
configure_args=
for ac_arg in $ac_configure_temp; do
ac_configure_args=
for ac_arg
do
case "$ac_arg" in
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c) ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
changequote(, )dnl
*[" "]*) configure_args="$configure_args '$ac_arg'" ;;
*[" "]*) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
changequote([, ])dnl
*) configure_args="$configure_args $ac_arg" ;;
*) ac_configure_args="$ac_configure_args $ac_arg" ;;
esac
done
@ -642,7 +640,7 @@ AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1])])
dnl ### Canonicalizing the system type
dnl Find install.sh, config.sub, config.guess, and Cygnus configure
dnl Find install-sh, config.sub, config.guess, and Cygnus configure
dnl in directory DIR. These are auxiliary files used in configuration.
dnl DIR can be either absolute or relative to ${srcdir}.
dnl AC_CONFIG_AUX_DIR(DIR)
@ -656,23 +654,28 @@ AC_DEFUN(AC_CONFIG_AUX_DIR_DEFAULT,
dnl Internal subroutine.
dnl Search for the configuration auxiliary files in directory list $1.
dnl We look only for install.sh, so users of AC_PROG_INSTALL
dnl We look only for install-sh, so users of AC_PROG_INSTALL
dnl do not automatically need to distribute the other auxiliary files.
dnl AC_CONFIG_AUX_DIRS(DIR ...)
AC_DEFUN(AC_CONFIG_AUX_DIRS,
[ac_aux_dir=
for ac_dir in $1; do
if test -f $ac_dir/install.sh; then
ac_aux_dir=$ac_dir; break
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="${ac_aux_dir}/install-sh -c"
break
elif test -f $ac_dir/install.sh; then
ac_aux_dir=$ac_dir
ac_install_sh="${ac_aux_dir}/install.sh -c"
break
fi
done
if test -z "$ac_aux_dir"; then
AC_MSG_ERROR([can not find install.sh in $1])
AC_MSG_ERROR([can not find install-sh or install.sh in $1])
fi
ac_config_guess=${ac_aux_dir}/config.guess
ac_config_sub=${ac_aux_dir}/config.sub
ac_configure=${ac_aux_dir}/configure # This should be Cygnus configure.
ac_install_sh="${ac_aux_dir}/install.sh -c"
AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
])
@ -1483,7 +1486,7 @@ dnl hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
dnl so uname gets run too.
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
[#] [$]0 [$]configure_args
[#] [$]0 [$]ac_configure_args
#
# Compiler output produced by configure, useful for debugging
# configure, is in ./config.log if it exists.
@ -1495,8 +1498,8 @@ for ac_option
do
case "[\$]ac_option" in
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
echo running [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]configure_args --no-create --no-recursion
exec [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]configure_args --no-create --no-recursion ;;
echo "running [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion"
exec [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "${CONFIG_STATUS} generated by autoconf version AC_ACVERSION"
exit 0 ;;
@ -1804,7 +1807,7 @@ if test "${no_recursion}" != yes; then
# Remove --cache-file and --srcdir arguments so they do not pile up.
ac_sub_configure_args=
ac_prev=
for ac_arg in $configure_args; do
for ac_arg in $ac_configure_args; do
if test -n "$ac_prev"; then
ac_prev=
continue
@ -1884,7 +1887,8 @@ changequote([, ])dnl
esac
echo "[running ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file] --srcdir=${ac_sub_srcdir}"
if ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file --srcdir=${ac_sub_srcdir}
# The eval makes quoting arguments work.
if eval ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file --srcdir=${ac_sub_srcdir}
then :
else
AC_MSG_ERROR(${ac_sub_configure} failed for ${ac_config_dir})

View File

@ -1181,9 +1181,9 @@ fi
])
AC_DEFUN(AC_FUNC_GETMNTENT,
[# getmntent is in -lsun on Irix 4, -lseq on PTX.
AC_CHECK_LIB(sun, getmntent, LIBS="$LIBS -lsun")
AC_CHECK_LIB(seq, getmntent, LIBS="$LIBS -lseq")
[# getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX.
AC_CHECK_LIB(sun, getmntent, LIBS="$LIBS -lsun",
[AC_CHECK_LIB(seq, getmntent, LIBS="$LIBS -lseq")])
AC_CHECK_FUNC(getmntent, [AC_DEFINE(HAVE_GETMNTENT)])])
AC_DEFUN(AC_FUNC_STRFTIME,