From: Stepan Kasal Date: Thu, 25 Aug 2005 08:49:01 +0000 (+0000) Subject: Simplify _AC_CANONICAL_SPLIT X-Git-Tag: AUTOCONF-2.59c~258 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f5083c932226837b87cab9de576e22256239ebc;p=thirdparty%2Fautoconf.git Simplify _AC_CANONICAL_SPLIT --- diff --git a/ChangeLog b/ChangeLog index 2d87d4f1e..d153d545e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-08-24 Stepan Kasal + + * 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. + 2005-08-23 Ralf Wildenhues , Stepan Kasal diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index d7d8cdfbf..770313fc9 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -1650,23 +1650,19 @@ m4_define([AC_REQUIRE_AUX_FILE], # -------------------------- # Generate the variables THING, THING_{alias cpu vendor os}. m4_define([_AC_CANONICAL_SPLIT], -[AC_SUBST([$1], [$ac_cv_$1])dnl +[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 -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 +shift; shift +AC_SUBST([$1_os], [$[*]])dnl +IFS=$ac_save_IFS ])# _AC_CANONICAL_SPLIT