should now work fr any ubuntu distributon
This commit is contained in:
@@ -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)
|
||||
])
|
||||
|
@@ -166,13 +166,7 @@ AC_SUBST(BOOST_THREAD_LIB)
|
||||
AM_CONDITIONAL(HAVE_BOOST_THREAD, test -n "$BOOST_THREAD_LIB")
|
||||
|
||||
# special dependencies for specific distros
|
||||
DIST_BUILDDEPENDS=$(
|
||||
case $(lsb_release -cs) in
|
||||
(precise|lucid|wheezy|squeeze);;
|
||||
(*) echo "libiberty-dev, ";;
|
||||
esac
|
||||
)
|
||||
AC_SUBST(DIST_BUILDDEPENDS)
|
||||
AX_DEB_DEPEND_IFEXISTS(libiberty-dev)
|
||||
|
||||
# thread options
|
||||
THREADS="-pthread -D_MT"
|
||||
|
2
debian/control.in
vendored
2
debian/control.in
vendored
@@ -1,7 +1,7 @@
|
||||
Source: @PACKAGE_NAME@
|
||||
Priority: extra
|
||||
Maintainer: @AUTHOR@
|
||||
Build-Depends: debhelper, subversion, pkg-config, automake, libtool, autotools-dev, lsb-release , doxygen, graphviz, mscgen, libcppunit-dev, libz-dev, libiberty-dev | libiberty, binutils-dev
|
||||
Build-Depends: debhelper, subversion, pkg-config, automake, libtool, autotools-dev, lsb-release , doxygen, graphviz, mscgen, libcppunit-dev, libz-dev, binutils-dev @DEB_DEPEND_IFEXISTS@
|
||||
|
||||
Package: @PACKAGE_NAME@
|
||||
Section: libs
|
||||
|
@@ -24,9 +24,17 @@ function install() {
|
||||
fi
|
||||
}
|
||||
|
||||
TO_INSTALL=
|
||||
|
||||
if test -e debian/control.in -a ! -e debian/control; then
|
||||
sed 's,@[^@]*@, dummytext,g' debian/control.in > debian/control
|
||||
for f in $(sed -n 's, *AX_DEB_DEPEND_IFEXISTS(\([^)]*\)).*,\1,p' configure.ac); do
|
||||
if test -n "$(apt-cache policy -q ${f})" && ! dpkg -l "${f}"; then
|
||||
TO_INSTALL+=" ${f}"
|
||||
fi
|
||||
done
|
||||
trap "rm debian/control" INT TERM EXIT
|
||||
sed 's,@DEB_DEPEND_IFEXISTS@,,g' debian/control.in | \
|
||||
sed 's,@[^@]*@, dummytext,g' > debian/control
|
||||
fi
|
||||
|
||||
if test -n "${SCHROOTNAME}"; then
|
||||
@@ -38,7 +46,6 @@ else
|
||||
fi
|
||||
DEPS=$(echo "$DEPS" | sed -n '/Unmet build dependencies/ { s,.*Unmet build dependencies: ,,g; s, ([^)]*),,g; s, *| *,|,g; p}')
|
||||
|
||||
TO_INSTALL=
|
||||
for pa in ${DEPS}; do
|
||||
if test ${pa//|/} = ${pa}; then
|
||||
TO_INSTALL+=" ${pa}"
|
||||
|
Reference in New Issue
Block a user