aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJoão Valverde <joao.valverde@tecnico.ulisboa.pt>2016-04-23 01:07:55 +0100
committerJeff Morriss <jeff.morriss.ws@gmail.com>2016-04-25 15:27:52 +0000
commitbbea6a1c9f58d7f87424e0df6f9821d8ef1d3b00 (patch)
tree207a471184be93fc8a054f1431fc7a0f6ffd0118 /configure.ac
parent17e4998a47c72246063de98828599c4fa079a94e (diff)
autotools: use AM_CONDITIONAL for rpm build rule
Change-Id: Ia97966e28cf7d061694336fb00b9a0790f0d57bb Reviewed-on: https://code.wireshark.org/review/15067 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 16 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 56da2c4270..1364962c8f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -779,8 +779,22 @@ fi
AC_SUBST(HAVE_SVR4_PACKAGING)
# RPM
-AC_WIRESHARK_RPM_CHECK
-AC_SUBST(HAVE_RPM)
+#
+# Looks for the rpmbuild program, and checks to see if we can redefine "_topdir".
+#
+AC_CHECK_PROGS(RPMBUILD, [rpmbuild], [false])
+if test "x$RPMBUILD" != "xfalse" ; then
+ AC_MSG_CHECKING([to see if we can redefine _topdir])
+ $RPMBUILD --define '_topdir /tmp' > /dev/null 2>&1
+ if test $? -eq 0 ; then
+ AC_MSG_RESULT(yes)
+ have_rpm=yes
+ else
+ AC_MSG_RESULT([no, you'll have to build packages manually])
+ have_rpm=no
+ fi
+fi
+AM_CONDITIONAL(HAVE_RPM, [test "x$have_rpm" = xyes])
# Debian
AC_CHECK_PROG(HAVE_DPKG_BUILDPACKAGE, dpkg-buildpackage, "yes", "no")