Hello,
On Tue, Aug 23, 2005 at 10:20:57AM -0700, Paul Eggert wrote:
> set x $ac_cv_$1
> shift
I wanted to avoid this workaround. I thought it might be nicer to
reject all eveil values first, and then have some nice code to handle
nice values. But it doesn't matter.
What about the following patch?
Stepan
2005-08-24 Stepan Kasal <[EMAIL PROTECTED]>
* lib/autoconf/general.m4 (_AC_CANONICAL_SPLIT): Simplify; rejecting
some evil values and relying on the fact that $* concatenates the
parameters by the first character from IFS.
Index: lib/autoconf/general.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v
retrieving revision 1.882
diff -u -c -r1.882 general.m4
*** lib/autoconf/general.m4 23 Aug 2005 09:22:14 -0000 1.882
--- lib/autoconf/general.m4 24 Aug 2005 05:57:14 -0000
***************
*** 1650,1672 ****
# --------------------------
# Generate the variables THING, THING_{alias cpu vendor os}.
m4_define([_AC_CANONICAL_SPLIT],
! [AC_SUBST([$1], [$ac_cv_$1])dnl
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_$1
shift
- IFS=$ac_save_IFS
-
AC_SUBST([$1_cpu], [$[1]])dnl
AC_SUBST([$1_vendor], [$[2]])dnl
! AC_SUBST([$1_os], [$[3]])dnl
! case $[#] in
! 0|1|2) ;;
! *)
! shift; shift; shift
! for ac_arg
! do $1_os=[$]$1_os-$ac_arg
! done;;
! esac
])# _AC_CANONICAL_SPLIT
--- 1650,1668 ----
# --------------------------
# Generate the variables THING, THING_{alias cpu vendor os}.
m4_define([_AC_CANONICAL_SPLIT],
! [case $ac_cv_$1 in
! *-*-*) ;;
! *) AC_MSG_ERROR([invalid value of canonical $1]);;
! esac
! AC_SUBST([$1], [$ac_cv_$1])dnl
ac_save_IFS=$IFS; IFS='-'
set x $ac_cv_$1
shift
AC_SUBST([$1_cpu], [$[1]])dnl
AC_SUBST([$1_vendor], [$[2]])dnl
! shift; shift
! AC_SUBST([$1_os], [$[*]])dnl
! IFS=$ac_save_IFS
])# _AC_CANONICAL_SPLIT