aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 9 insertions, 7 deletions
diff --git a/configure b/configure
index 248a2916..cb52d4e9 100755
--- a/configure
+++ b/configure
@@ -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"