diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2014-04-15 19:40:45 -0700 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2014-04-15 19:40:45 -0700 |
commit | 75542e77b565c2af968e48c1b12b32f343d913ae (patch) | |
tree | c89d2d811f65d2b752d684f97c1436412e626979 | |
parent | 37a13a99617dfd1c9995a41ff2734acd0957de79 (diff) | |
download | build-75542e77b565c2af968e48c1b12b32f343d913ae.tar.gz |
Fix binutils-2.24 detection
Starting from binutils-2.24, version is contained in AC_INIT
instead of M_INIT_AUTOMAKE
Change-Id: I447affb61d73069593aacc3cae3a0b99186e506f
-rwxr-xr-x | configure | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -2301,7 +2301,14 @@ fi binutils_version_file="${srcdir}/../binutils/binutils-${BINUTILS_VERSION}/bfd/configure.in" if test -f "${binutils_version_file}"; then binutils_version_num=`grep AM_INIT_AUTOMAKE ${binutils_version_file} | \ - sed -n "s/AM_INIT_AUTOMAKE[^,]*,*\([^)]*\))/\1/p"` + sed -n "s/AM_INIT_AUTOMAKE[^,]*,*\([^)]*\))/\1/p" | \ + tr -d "[ ]"` + # Starting from binutils-2.24 AC_INIT contain version info + if test -z "${binutils_version_num}"; then + binutils_version_num=`grep AC_INIT ${binutils_version_file} | \ + sed -n "s/AC_INIT[^,]*,*\([^)]*\))/\1/p" | \ + tr -d "[ ]"` + fi BINUTILS_MAJOR=`echo $binutils_version_num | sed -e "s/[^0-9].*//"` BINUTILS_MINOR=`echo $binutils_version_num | \ sed -e "s/^[0-9]*\.//" -e "s/[^0-9].*//"` |