diff options
author | Eric Blake <ebb9@byu.net> | 2008-10-21 10:28:19 -0600 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2008-10-21 15:03:45 -0600 |
commit | 6ae40b3dae7b6c05b1b2750fc90b1eb00c56d611 (patch) | |
tree | f83f3756da8236fa3d297cee0258675fd0b24f72 | |
parent | 86ce15b622cdde04ec0569b22905c67168936407 (diff) | |
download | autoconf-6ae40b3dae7b6c05b1b2750fc90b1eb00c56d611.tar.gz |
Use AS_VAR_APPEND.
* lib/autoconf/functions.m4 (AC_CHECK_FUNCS_ONCE): Use new macro.
* lib/autoconf/general.m4 (_AC_INIT_PREPARE)
(_AC_LIBOBJS_NORMALIZE): Likewise.
* lib/autoconf/headers.m4 (AC_CHECK_HEADERS_ONCE): Likewise.
* lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS)
(_AC_OUTPUT_CONFIG_STATUS, _AC_OUTPUT_MAIN_LOOP): Likewise.
* lib/autotest/general.m4 (AT_INIT): Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | lib/autoconf/functions.m4 | 6 | ||||
-rw-r--r-- | lib/autoconf/general.m4 | 12 | ||||
-rw-r--r-- | lib/autoconf/headers.m4 | 6 | ||||
-rw-r--r-- | lib/autoconf/status.m4 | 10 | ||||
-rw-r--r-- | lib/autotest/general.m4 | 24 |
6 files changed, 38 insertions, 29 deletions
@@ -1,5 +1,14 @@ 2008-10-21 Eric Blake <ebb9@byu.net> + Use AS_VAR_APPEND. + * lib/autoconf/functions.m4 (AC_CHECK_FUNCS_ONCE): Use new macro. + * lib/autoconf/general.m4 (_AC_INIT_PREPARE) + (_AC_LIBOBJS_NORMALIZE): Likewise. + * lib/autoconf/headers.m4 (AC_CHECK_HEADERS_ONCE): Likewise. + * lib/autoconf/status.m4 (_AC_OUTPUT_SUBDIRS) + (_AC_OUTPUT_CONFIG_STATUS, _AC_OUTPUT_MAIN_LOOP): Likewise. + * lib/autotest/general.m4 (AT_INIT): Likewise. + Add AS_VAR_APPEND. * lib/m4sugar/m4sh.m4 (_AS_VAR_APPEND_PREPARE) (_AS_VAR_APPEND_WORKS, AS_VAR_APPEND): New macros. diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4 index c325f304..47881390 100644 --- a/lib/autoconf/functions.m4 +++ b/lib/autoconf/functions.m4 @@ -1,7 +1,7 @@ # This file is part of Autoconf. -*- Autoconf -*- # Checking for functions. -# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software -# Foundation, Inc. +# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -104,7 +104,7 @@ AC_DEFUN([AC_CHECK_FUNCS_ONCE], m4_foreach_w([AC_Func], [$1], [AC_DEFUN([_AC_Func_]m4_defn([AC_Func]), [m4_divert_text([INIT_PREPARE], - [ac_func_list="$ac_func_list AC_Func"]) + [AS_VAR_APPEND([ac_func_list], [" AC_Func"])]) _AC_FUNCS_EXPANSION]) AC_REQUIRE([_AC_Func_]m4_defn([AC_Func]))]) ]) diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index b5c720d8..ed32e241 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -1226,9 +1226,9 @@ do ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 1) AS_VAR_APPEND([ac_configure_args0], [" '$ac_arg'"]) ;; 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" + AS_VAR_APPEND([ac_configure_args1], [" '$ac_arg'"]) dnl If trying to remove duplicates, be sure to (i) keep the *last* dnl value (e.g. --prefix=1 --prefix=2 --prefix=1 might keep 2 only), dnl and (ii) not to strip long options (--prefix foo --prefix bar might @@ -1250,7 +1250,7 @@ dnl exit don't matter. -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + AS_VAR_APPEND([ac_configure_args], [" '$ac_arg'"]) ;; esac done @@ -1594,7 +1594,7 @@ for ac_var in $ac_precious_vars; do esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) AS_VAR_APPEND([ac_configure_args], [" '$ac_arg'"]) ;; esac fi done @@ -2784,8 +2784,8 @@ for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue ac_i=`AS_ECHO(["$ac_i"]) | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + AS_VAR_APPEND([ac_libobjs], [" \${LIBOBJDIR}$ac_i\$U.$ac_objext"]) + AS_VAR_APPEND([ac_ltlibobjs], [" \${LIBOBJDIR}$ac_i"'$U.lo']) done AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4 index 16b2737b..cb9f6531 100644 --- a/lib/autoconf/headers.m4 +++ b/lib/autoconf/headers.m4 @@ -1,8 +1,8 @@ # This file is part of Autoconf. -*- Autoconf -*- # Checking for headers. # -# Copyright (C) 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software -# Foundation, Inc. +# Copyright (C) 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2008 +# Free Software Foundation, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -212,7 +212,7 @@ AC_DEFUN([AC_CHECK_HEADERS_ONCE], m4_foreach_w([AC_Header], [$1], [AC_DEFUN([_AC_Header_]m4_quote(m4_translit(AC_Header, [./-], [___])), [m4_divert_text([INIT_PREPARE], - [ac_header_list="$ac_header_list AC_Header"]) + [AS_VAR_APPEND([ac_header_list], [" AC_Header"])]) _AC_HEADERS_EXPANSION]) AC_REQUIRE([_AC_Header_]m4_quote(m4_translit(AC_Header, [./-], [___])))]) ]) diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4 index 26fa2cff..3cbf618e 100644 --- a/lib/autoconf/status.m4 +++ b/lib/autoconf/status.m4 @@ -1151,7 +1151,7 @@ if test "$no_recursion" != yes; then case $ac_arg in *\'*) ac_arg=`AS_ECHO(["$ac_arg"]) | sed "s/'/'\\\\\\\\''/g"` ;; esac - ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;; + AS_VAR_APPEND([ac_sub_configure_args], [" '$ac_arg'"]) ;; esac done @@ -1485,7 +1485,7 @@ m4_ifdef([_AC_SEEN_CONFIG(FILES)], [dnl case $ac_optarg in *\'*) ac_optarg=`AS_ECHO(["$ac_optarg"]) | sed "s/'/'\\\\\\\\''/g"` ;; esac - CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" + AS_VAR_APPEND([CONFIG_FILES], [" '$ac_optarg'"]) ac_need_defaults=false;; ])dnl m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [dnl @@ -1494,7 +1494,7 @@ m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [dnl case $ac_optarg in *\'*) ac_optarg=`AS_ECHO(["$ac_optarg"]) | sed "s/'/'\\\\\\\\''/g"` ;; esac - CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" + AS_VAR_APPEND([CONFIG_HEADERS], [" '$ac_optarg'"]) ac_need_defaults=false;; --he | --h) # Conflict between --help and --header @@ -1511,7 +1511,7 @@ Try `$[0] --help' for more information.]);; -*) AC_MSG_ERROR([unrecognized option: $[1] Try `$[0] --help' for more information.]) ;; - *) ac_config_targets="$ac_config_targets $[1]" + *) AS_VAR_APPEND([ac_config_targets], [" $[1]"]) ac_need_defaults=false ;; esac @@ -1671,7 +1671,7 @@ do AC_MSG_ERROR([cannot find input file: $ac_f]);; esac case $ac_f in *\'*) ac_f=`AS_ECHO(["$ac_f"]) | sed "s/'/'\\\\\\\\''/g"`;; esac - ac_file_inputs="$ac_file_inputs '$ac_f'" + AS_VAR_APPEND([ac_file_inputs], [" '$ac_f'"]) done # Let's still pretend it is `configure' which instantiates (i.e., don't diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 index 8df9395f..149fff14 100644 --- a/lib/autotest/general.m4 +++ b/lib/autotest/general.m4 @@ -510,7 +510,7 @@ do [[0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9]]) at_func_validate_ranges at_option - at_groups="$at_groups$at_option " + AS_VAR_APPEND([at_groups], ["$at_option "]) ;; # Ranges @@ -519,7 +519,7 @@ do at_func_validate_ranges at_range_start at_range=`AS_ECHO([" $at_groups_all "]) | \ sed -e 's/^.* \('$at_range_start' \)/\1/'` - at_groups="$at_groups$at_range " + AS_VAR_APPEND([at_groups], ["$at_range "]) ;; [-[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9]]) @@ -527,7 +527,7 @@ do at_func_validate_ranges at_range_end at_range=`AS_ECHO([" $at_groups_all "]) | \ sed -e 's/\( '$at_range_end'\) .*$/\1/'` - at_groups="$at_groups$at_range " + AS_VAR_APPEND([at_groups], ["$at_range "]) ;; [[0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9]] | \ @@ -547,7 +547,7 @@ do at_range=`AS_ECHO([" $at_groups_all "]) | \ sed -e 's/^.*\( '$at_range_start' \)/\1/' \ -e 's/\( '$at_range_end'\) .*$/\1/'` - at_groups="$at_groups$at_range " + AS_VAR_APPEND([at_groups], ["$at_range "]) ;; # Directory selection. @@ -603,7 +603,7 @@ do at_groups_selected=`AS_ECHO(["$at_groups_selected"]) | sed 's/;.*//' | tr "$as_nl" ' ' ` - at_groups="$at_groups$at_groups_selected " + AS_VAR_APPEND([at_groups], ["$at_groups_selected "]) ;; m4_divert_pop([PARSE_ARGS])dnl dnl Process *=* last to allow for user specified --option=* type arguments. @@ -619,7 +619,7 @@ m4_divert_push([PARSE_ARGS_END])dnl at_value=`AS_ECHO(["$at_optarg"]) | sed "s/'/'\\\\\\\\''/g"` # Export now, but save eval for later and for debug scripts. export $at_envvar - at_debug_args="$at_debug_args $at_envvar='$at_value'" + AS_VAR_APPEND([at_debug_args], [" $at_envvar='$at_value'"]) ;; *) AS_ECHO(["$as_me: invalid option: $at_option"]) >&2 @@ -840,19 +840,19 @@ fi AUTOTEST_PATH=`AS_ECHO(["$AUTOTEST_PATH"]) | sed "s|:|$PATH_SEPARATOR|g"` at_path= _AS_PATH_WALK([$AUTOTEST_PATH $PATH], -[test -n "$at_path" && at_path=$at_path$PATH_SEPARATOR +[test -n "$at_path" && AS_VAR_APPEND([at_path], [$PATH_SEPARATOR]) case $as_dir in [[\\/]]* | ?:[[\\/]]* ) - at_path=$at_path$as_dir + AS_VAR_APPEND([at_path], ["$as_dir"]) ;; * ) if test -z "$at_top_build_prefix"; then # Stand-alone test suite. - at_path=$at_path$as_dir + AS_VAR_APPEND([at_path], ["$as_dir"]) else # Embedded test suite. - at_path=$at_path$at_top_build_prefix$as_dir$PATH_SEPARATOR - at_path=$at_path$at_top_srcdir/$as_dir + AS_VAR_APPEND([at_path], ["$at_top_build_prefix$as_dir$PATH_SEPARATOR"]) + AS_VAR_APPEND([at_path], ["$at_top_srcdir/$as_dir"]) fi ;; esac]) @@ -871,7 +871,7 @@ esac case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;; $PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;; - *) at_new_path=$at_new_path$PATH_SEPARATOR$as_dir ;; + *) AS_VAR_APPEND([at_new_path], ["$PATH_SEPARATOR$as_dir"]) ;; esac]) PATH=$at_new_path export PATH |