should now work fr any ubuntu distributon

This commit is contained in:
Marc Wäckerlin
2015-11-03 13:36:24 +00:00
parent 5b5111201a
commit 33e1959d3f
4 changed files with 23 additions and 10 deletions

View File

@@ -696,3 +696,15 @@ AC_DEFUN([AX_CHECK_VALID_LD_FLAG], [
AC_SUBST(LDFLAGS)
AC_MSG_RESULT([$newflag in $LDFLAGS])
])
# Check if a package exists in the current distribution, if yes, require it
# in debian/control.in append @DEB_DEPEND_IFEXISTS@ to Build-Depends
# - parameter:
# $1 = package name
AC_DEFUN([AX_DEB_DEPEND_IFEXISTS], [
pkg=$1
if test -n "$(apt-cache policy -q ${pkg} 2> /dev/null)"; then
DEB_DEPEND_IFEXISTS+=", ${pkg}"
fi
AC_SUBST(DEB_DEPEND_IFEXISTS)
])