diff options
author | Rob Savoye <rob.savoye@linaro.org> | 2015-09-23 15:24:49 -0600 |
---|---|---|
committer | Ryan S. Arnold <ryan.arnold@linaro.org> | 2015-10-07 09:04:13 -0500 |
commit | 219159870e10577edb4ffff0f1a8c3931bb33a35 (patch) | |
tree | dd0b136f86c961e55bc38a6548e472c38ff5c852 /configure | |
parent | 0bbafec041aa97e195be8de9f3689c55e38b7cff (diff) |
Improve the determination of rpm or deb based distribution.
Change-Id: I6bc8695ca92da4dfec77b697871c50104ead33b6
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -3739,13 +3739,17 @@ fi # AC_MSG_WARN([Make 4.0 is missing, which is required]) #fi +# Figure out which packaging system is in use. Since it's possible to +# install both on a system. +rpm="`uname -a | grep -ic '\.fc[0-9].\.'`" +deb="`uname -a | grep -ic 'ubuntu'`" +deb=$(($deb + `uname -a | grep -ic 'debian'`)) + #packages="git-svn bzr-fastimport svn-all-fast-exp libncurses5-dev texinfo" packages="texinfo gawk" ### Debian packages ### -dpkg="`which dpkg 2> /dev/null`" -result=$? -if test ${result} -eq 0; then +if test ${deb} -ge 1; then # add Ubuntu specific packages if test x"${BUILD_ARCH}" != xaarch64; then packages="${packages} gcc-multilib g++-multilib libncurses5-dev libpython2.7-dev" @@ -3767,9 +3771,7 @@ $as_echo "yes" >&6; } ### RPM Packages ### else -yum="`which yum 2> /dev/null`" -result=$? -if test ${result} -eq 0; then +if test ${rpm} -eq 1; then packages="${packages} ncurses-devel python-devel" for i in ${packages}; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $i is installed" >&5 @@ -3778,7 +3780,7 @@ $as_echo_n "checking if $i is installed... " >&6; } # can't be searched on meta-package name, so strip off any trailing # information when searching the rpm database. exists="`rpm -q -a ${i//.*/}| grep -c ${i//.*/}`" - if test ${exists} -eq 0; then + if test ${exists:-0} -eq 0; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, install $i" >&5 $as_echo "no, install $i" >&6; } missing="${missing} $i" |