From: David MacKenzie Date: Fri, 11 Oct 1996 02:30:20 +0000 (+0000) Subject: support dashes in os from config.sub X-Git-Tag: fsf-origin~100 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2158de50231e5db15047049097635267a5ef26cb;p=thirdparty%2Fautoconf.git support dashes in os from config.sub --- diff --git a/ChangeLog b/ChangeLog index 3a467e45..7e394dcd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Oct 10 22:29:37 1996 David J MacKenzie + + * acgeneral.m4 (AC_CANONICAL_HOST, AC_CANONICAL_TARGET, + AC_CANONICAL_BUILD): Allow the os part of the string returned by + config.sub to contain dashes, as in "linux-gnu". + Fri Jul 19 16:59:00 1996 Roland McGrath * acgeneral.m4 (AC_CHECK_TYPE): Add dnl so regexp doesn't have a diff --git a/acgeneral.m4 b/acgeneral.m4 index b02ec6c3..0834862f 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -917,10 +917,12 @@ NONE) esac dnl Set the other host vars. +changequote(<<, >>)dnl host=`$ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +changequote([, ])dnl AC_MSG_RESULT($host) AC_SUBST(host)dnl AC_SUBST(host_alias)dnl @@ -945,10 +947,12 @@ NONE) esac dnl Set the other target vars. +changequote(<<, >>)dnl target=`$ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` +target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +changequote([, ])dnl AC_MSG_RESULT($target) AC_SUBST(target)dnl AC_SUBST(target_alias)dnl @@ -973,10 +977,12 @@ NONE) esac dnl Set the other build vars. +changequote(<<, >>)dnl build=`$ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` +build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +changequote([, ])dnl AC_MSG_RESULT($build) AC_SUBST(build)dnl AC_SUBST(build_alias)dnl diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index b02ec6c3..0834862f 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -917,10 +917,12 @@ NONE) esac dnl Set the other host vars. +changequote(<<, >>)dnl host=`$ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +changequote([, ])dnl AC_MSG_RESULT($host) AC_SUBST(host)dnl AC_SUBST(host_alias)dnl @@ -945,10 +947,12 @@ NONE) esac dnl Set the other target vars. +changequote(<<, >>)dnl target=`$ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` +target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +changequote([, ])dnl AC_MSG_RESULT($target) AC_SUBST(target)dnl AC_SUBST(target_alias)dnl @@ -973,10 +977,12 @@ NONE) esac dnl Set the other build vars. +changequote(<<, >>)dnl build=`$ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` +build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +changequote([, ])dnl AC_MSG_RESULT($build) AC_SUBST(build)dnl AC_SUBST(build_alias)dnl