|
|
@ -13,12 +13,12 @@ m4_define(x_least, m4_ifdef([x_least_fix], [x_least_fix], |
|
|
|
mrw_esyscmd_s([ |
|
|
|
mrw_esyscmd_s([ |
|
|
|
VCS_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-checkout" |
|
|
|
VCS_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-checkout" |
|
|
|
for path in . .. ../.. ../../..; do |
|
|
|
for path in . .. ../.. ../../..; do |
|
|
|
if test -d .svn; then |
|
|
|
if test -d ${path}/.svn; then |
|
|
|
svn upgrade 1>&2 > /dev/null || true |
|
|
|
(cd $path; svn upgrade 1>&2 > /dev/null || true) |
|
|
|
VCS_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p') |
|
|
|
VCS_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p') |
|
|
|
if test -n "${VCS_REVISION}"; then break; fi |
|
|
|
if test -n "${VCS_REVISION}"; then break; fi |
|
|
|
elif test -d .git; then |
|
|
|
elif test -d ${path}/.git; then |
|
|
|
VCS_REVISION=$(git rev-list --all --count) |
|
|
|
VCS_REVISION=$(cd ${path} > /dev/null 2/dev/null; git rev-list --all --count) |
|
|
|
if test -n "${VCS_REVISION}"; then break; fi |
|
|
|
if test -n "${VCS_REVISION}"; then break; fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
done |
|
|
|
done |
|
|
@ -26,12 +26,12 @@ m4_define(x_least, m4_ifdef([x_least_fix], [x_least_fix], |
|
|
|
]), mrw_esyscmd_s([ |
|
|
|
]), mrw_esyscmd_s([ |
|
|
|
VCS_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-checkout" |
|
|
|
VCS_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-checkout" |
|
|
|
for path in . .. ../.. ../../..; do |
|
|
|
for path in . .. ../.. ../../..; do |
|
|
|
if test -d .svn; then |
|
|
|
if test -d ${path}/.svn; then |
|
|
|
svn upgrade 1>&2 > /dev/null || true |
|
|
|
(cd $path; svn upgrade 1>&2 > /dev/null || true) |
|
|
|
VCS_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p') |
|
|
|
VCS_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p') |
|
|
|
if test -n "${VCS_REVISION}"; then break; fi |
|
|
|
if test -n "${VCS_REVISION}"; then break; fi |
|
|
|
elif test -d .git; then |
|
|
|
elif test -d ${path}/.git; then |
|
|
|
VCS_REVISION=$(git rev-list --all --count) |
|
|
|
VCS_REVISION=$(cd ${path} > /dev/null 2/dev/null; git rev-list --all --count) |
|
|
|
if test -n "${VCS_REVISION}"; then break; fi |
|
|
|
if test -n "${VCS_REVISION}"; then break; fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
done |
|
|
|
done |
|
|
@ -44,12 +44,12 @@ m4_define(x_least, m4_ifdef([x_least_fix], [x_least_fix], |
|
|
|
m4_define(x_minor_diff, m4_ifdef([x_least_fix], 0, mrw_esyscmd_s([ |
|
|
|
m4_define(x_minor_diff, m4_ifdef([x_least_fix], 0, mrw_esyscmd_s([ |
|
|
|
VCS_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-checkout" |
|
|
|
VCS_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-checkout" |
|
|
|
for path in . .. ../.. ../../..; do |
|
|
|
for path in . .. ../.. ../../..; do |
|
|
|
if test -d .svn; then |
|
|
|
if test -d ${path}/.svn; then |
|
|
|
svn upgrade 1>&2 > /dev/null || true |
|
|
|
(cd $path; svn upgrade 1>&2 > /dev/null || true) |
|
|
|
VCS_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p') |
|
|
|
VCS_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p') |
|
|
|
if test -n "${VCS_REVISION}"; then break; fi |
|
|
|
if test -n "${VCS_REVISION}"; then break; fi |
|
|
|
elif test -d .git; then |
|
|
|
elif test -d ${path}/.git; then |
|
|
|
VCS_REVISION=$(git rev-list --all --count) |
|
|
|
VCS_REVISION=$(cd ${path} > /dev/null 2/dev/null; git rev-list --all --count) |
|
|
|
if test -n "${VCS_REVISION}"; then break; fi |
|
|
|
if test -n "${VCS_REVISION}"; then break; fi |
|
|
|
fi; |
|
|
|
fi; |
|
|
|
done |
|
|
|
done |
|
|
@ -802,6 +802,120 @@ AC_DEFUN([AX_PKG_REQUIRE], [ |
|
|
|
AC_MSG_ERROR([Feature $1 not found please install module $secondpar]) |
|
|
|
AC_MSG_ERROR([Feature $1 not found please install module $secondpar]) |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
AX_DEB_DEPEND([${$1_found}]) |
|
|
|
|
|
|
|
AX_RPM_DEPEND([${$1_found}]) |
|
|
|
|
|
|
|
[$1]_CPPFLAGS="${$1_CFLAGS}" |
|
|
|
|
|
|
|
[$1]_CXXFLAGS="${$1_CFLAGS}" |
|
|
|
|
|
|
|
AC_SUBST([$1]_CPPFLAGS) |
|
|
|
|
|
|
|
AC_SUBST([$1]_CXXFLAGS) |
|
|
|
|
|
|
|
if test "${optional_flags/manualflags/}" = "${optional_flags}"; then |
|
|
|
|
|
|
|
CPPFLAGS+=" ${$1_CPPFLAGS}" |
|
|
|
|
|
|
|
CXXFLAGS+=" ${$1_CXXFLAGS}" |
|
|
|
|
|
|
|
LIBS+=" ${$1_LIBS}" |
|
|
|
|
|
|
|
AC_MSG_NOTICE([Adding flags for $1]) |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
AC_MSG_NOTICE([To enable $1, add $1_CPPFLAGS, $1_CXXFLAGS and $1_LIBS]) |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# require a specific development package, with fallback: test for a header |
|
|
|
|
|
|
|
# - parameter: |
|
|
|
|
|
|
|
# $1 = unique id (no special characters) |
|
|
|
|
|
|
|
# $2 = module name (optional, if different from id) |
|
|
|
|
|
|
|
# $3 = a header file to find (optional) |
|
|
|
|
|
|
|
# $4 = alternative module names (space separated, optional) |
|
|
|
|
|
|
|
# $5 = optional flags: |
|
|
|
|
|
|
|
# manualflags if CXXFLAGS, CPPFLAGS, LIBS should remain unchanged |
|
|
|
|
|
|
|
# |
|
|
|
|
|
|
|
# uses PKG_CHECK_MODULES to test for a module |
|
|
|
|
|
|
|
# then, if given, looks for the header file |
|
|
|
|
|
|
|
# if header file is not found, searches in alternative modules |
|
|
|
|
|
|
|
# sets all flags, so that the module can be used everywhere |
|
|
|
|
|
|
|
# fails if not found |
|
|
|
|
|
|
|
AC_DEFUN([AX_PKG_REQUIRE_DEV], [ |
|
|
|
|
|
|
|
PKG_PROG_PKG_CONFIG |
|
|
|
|
|
|
|
optional_flags="$5" |
|
|
|
|
|
|
|
$1_found=no |
|
|
|
|
|
|
|
secondpar="m4_default([$2], [$1])" |
|
|
|
|
|
|
|
PKG_CHECK_MODULES([$1], [m4_default([$2], [$1])], [ |
|
|
|
|
|
|
|
$1_found=$secondpar |
|
|
|
|
|
|
|
PKG_REQUIREMENTS+=" $secondpar" |
|
|
|
|
|
|
|
], [ |
|
|
|
|
|
|
|
if test -n "$4"; then |
|
|
|
|
|
|
|
AC_MSG_WARN([Recommended package $secondpar for feature $1 not installed, trying $4]) |
|
|
|
|
|
|
|
for pkg in $4; do |
|
|
|
|
|
|
|
PKG_CHECK_MODULES([$1], [$pkg], [ |
|
|
|
|
|
|
|
PKG_REQUIREMENTS+=" $pkg" |
|
|
|
|
|
|
|
$1_found=$pkg |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
], [ |
|
|
|
|
|
|
|
AC_MSG_WARN([Recommended package $pkg for feature $1 not installed]) |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
done |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
AC_SUBST(CPPFLAGS) |
|
|
|
|
|
|
|
AC_SUBST(CXXFLAGS) |
|
|
|
|
|
|
|
AC_SUBST(PKG_REQUIREMENTS) |
|
|
|
|
|
|
|
if test -n "$3"; then |
|
|
|
|
|
|
|
if test "${$1_found}" = "no"; then |
|
|
|
|
|
|
|
tmp_package="yes" |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
tmp_package=${$1_found} |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
$1_found=no |
|
|
|
|
|
|
|
old_CPPFLAGS=${CPPFLAGS} |
|
|
|
|
|
|
|
CPPFLAGS=" ${$1_CFLAGS} ${CPPFLAGS}" |
|
|
|
|
|
|
|
AC_CHECK_HEADER([$3], [ |
|
|
|
|
|
|
|
$1_found=${tmp_package} |
|
|
|
|
|
|
|
], [ |
|
|
|
|
|
|
|
for x in ${$1_CFLAGS}; do |
|
|
|
|
|
|
|
AC_MSG_NOTICE([search for $3 in ${x[#]-I}]) |
|
|
|
|
|
|
|
for f in $(find ${x[#]-I} -name "$3" 2> /dev/null); do |
|
|
|
|
|
|
|
if test -f "$f"; then |
|
|
|
|
|
|
|
$1_found=${tmp_package} |
|
|
|
|
|
|
|
$1_CFLAGS+=" -I${f%/*}" |
|
|
|
|
|
|
|
AC_MSG_NOTICE([added path ${f%/*}]) |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
done |
|
|
|
|
|
|
|
if test "${$1_found}" != "no"; then |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
done |
|
|
|
|
|
|
|
if test "${$1_found}" = "no"; then |
|
|
|
|
|
|
|
tmp_includedir=$(${PKG_CONFIG} --variable=includedir $tmp_package) |
|
|
|
|
|
|
|
for x in ${tmp_includedir}; do |
|
|
|
|
|
|
|
AC_MSG_NOTICE([search for $3 in $x]) |
|
|
|
|
|
|
|
for f in $(find ${x} -name "$3" 2> /dev/null); do |
|
|
|
|
|
|
|
if test -f "$f"; then |
|
|
|
|
|
|
|
$1_found=${tmp_package} |
|
|
|
|
|
|
|
$1_CFLAGS+=" -I${f%/*}" |
|
|
|
|
|
|
|
AC_MSG_NOTICE([added path ${f%/*}]) |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
done |
|
|
|
|
|
|
|
if test "${$1_found}" != "no"; then |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
done |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
CPPFLAGS=${old_CPPFLAGS} |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
if test "${$1_found}" = "no"; then |
|
|
|
|
|
|
|
if test -n "$3"; then |
|
|
|
|
|
|
|
if test -n "$4"; then |
|
|
|
|
|
|
|
AC_MSG_ERROR([Feature $1 not found, need header $3 in modules $secondpar or $4]) |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
AC_MSG_ERROR([Feature $1 not found, need header $3 in module $secondpar]) |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
AC_MSG_ERROR([Feature $1 not found please install module $secondpar]) |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
AX_DEB_BUILD_DEPEND([${$1_found}-dev]) |
|
|
|
|
|
|
|
AX_RPM_BUILD_DEPEND([${$1_found}-devel]) |
|
|
|
[$1]_CPPFLAGS="${$1_CFLAGS}" |
|
|
|
[$1]_CPPFLAGS="${$1_CFLAGS}" |
|
|
|
[$1]_CXXFLAGS="${$1_CFLAGS}" |
|
|
|
[$1]_CXXFLAGS="${$1_CFLAGS}" |
|
|
|
AC_SUBST([$1]_CPPFLAGS) |
|
|
|
AC_SUBST([$1]_CPPFLAGS) |
|
|
@ -851,6 +965,52 @@ AC_DEFUN([AX_PKG_CHECK], [ |
|
|
|
], [ |
|
|
|
], [ |
|
|
|
HAVE_$1=0 |
|
|
|
HAVE_$1=0 |
|
|
|
]) |
|
|
|
]) |
|
|
|
|
|
|
|
AX_DEB_BUILD_DEPEND(m4_default([$2], [$1])) |
|
|
|
|
|
|
|
AX_RPM_BUILD_DEPEND(m4_default([$2], [$1])) |
|
|
|
|
|
|
|
AM_CONDITIONAL(HAVE_$1, test $HAVE_[$1] -eq 1) |
|
|
|
|
|
|
|
AC_SUBST(HAVE_$1) |
|
|
|
|
|
|
|
AC_SUBST(CPPFLAGS) |
|
|
|
|
|
|
|
AC_SUBST(CXXFLAGS) |
|
|
|
|
|
|
|
AC_SUBST(PKG_REQUIREMENTS) |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# check if a specific development package exists |
|
|
|
|
|
|
|
# - parameter: |
|
|
|
|
|
|
|
# $1 = unique id (no special characters) |
|
|
|
|
|
|
|
# $2 = module name (optional, if different from id) |
|
|
|
|
|
|
|
# $3 = optional flags: |
|
|
|
|
|
|
|
# manualflags if CXXFLAGS, CPPFLAGS, LIBS should remain unchanged |
|
|
|
|
|
|
|
# |
|
|
|
|
|
|
|
# uses PKG_CHECK_MODULES to test for a module |
|
|
|
|
|
|
|
# sets automake conditional HAVE_$1 to 0 (not found) or 1 (found) |
|
|
|
|
|
|
|
# sets all flags, so that the module can be used everywhere |
|
|
|
|
|
|
|
AC_DEFUN([AX_PKG_CHECK_DEV], [ |
|
|
|
|
|
|
|
optional_flags="$3" |
|
|
|
|
|
|
|
PKG_PROG_PKG_CONFIG |
|
|
|
|
|
|
|
PKG_CHECK_MODULES([$1], [m4_default([$2], [$1])], [ |
|
|
|
|
|
|
|
HAVE_$1=1 |
|
|
|
|
|
|
|
[$1]_CPPFLAGS="${$1_CFLAGS}" |
|
|
|
|
|
|
|
[$1]_CXXFLAGS="${$1_CFLAGS}" |
|
|
|
|
|
|
|
AC_SUBST([$1]_CPPFLAGS) |
|
|
|
|
|
|
|
AC_SUBST([$1]_CXXFLAGS) |
|
|
|
|
|
|
|
if test "${optional_flags/manualflags/}" = "${optional_flags}"; then |
|
|
|
|
|
|
|
CPPFLAGS+=" ${$1_CPPFLAGS}" |
|
|
|
|
|
|
|
CXXFLAGS+=" ${$1_CXXFLAGS}" |
|
|
|
|
|
|
|
LIBS+=" ${$1_LIBS}" |
|
|
|
|
|
|
|
AC_MSG_NOTICE([Adding flags for $1]) |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
AC_MSG_NOTICE([To enable $1, add $1_CPPFLAGS, $1_CXXFLAGS and $1_LIBS]) |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
if test -z "$PKG_REQUIREMENTS"; then |
|
|
|
|
|
|
|
PKG_REQUIREMENTS="m4_default([$2], [$1])" |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
PKG_REQUIREMENTS="${PKG_REQUIREMENTS}, m4_default([$2], [$1])" |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
], [ |
|
|
|
|
|
|
|
HAVE_$1=0 |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
AX_DEB_BUILD_DEPEND(m4_default([$2], [$1])-dev) |
|
|
|
|
|
|
|
AX_RPM_BUILD_DEPEND(m4_default([$2], [$1])-devel) |
|
|
|
AM_CONDITIONAL(HAVE_$1, test $HAVE_[$1] -eq 1) |
|
|
|
AM_CONDITIONAL(HAVE_$1, test $HAVE_[$1] -eq 1) |
|
|
|
AC_SUBST(HAVE_$1) |
|
|
|
AC_SUBST(HAVE_$1) |
|
|
|
AC_SUBST(CPPFLAGS) |
|
|
|
AC_SUBST(CPPFLAGS) |
|
|
@ -1019,7 +1179,124 @@ AC_DEFUN([AX_DEB_RESOLVE], [ |
|
|
|
AC_SUBST(DEB_DEPEND_IFEXISTS) |
|
|
|
AC_SUBST(DEB_DEPEND_IFEXISTS) |
|
|
|
]) |
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Check if a package exists in the current distribution, if yes, require it |
|
|
|
|
|
|
|
# in .spec.in append @RPM_DEPEND_IFEXISTS@ to Build-Depends |
|
|
|
|
|
|
|
# - parameter: |
|
|
|
|
|
|
|
# $1 = package name |
|
|
|
|
|
|
|
AC_DEFUN([AX_RPM_DEPEND_IFEXISTS], [ |
|
|
|
|
|
|
|
pkg="$1" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (test -x /usr/bin/zypper && zypper search -x "$pkg" 1>&2 > /dev/null) || \ |
|
|
|
|
|
|
|
(test -x /usr/bin/dnf && dnf list -q "$pkg" 1>&2 > /dev/null) || \ |
|
|
|
|
|
|
|
(test -x /usr/bin/yum && yum list -q "$pkg" 1>&2 > /dev/null) || \ |
|
|
|
|
|
|
|
(test -x /usr/sbin/urpmq && urpmq "$pkg" 1>&2 > /dev/null); then |
|
|
|
|
|
|
|
RPM_DEPEND_IFEXISTS="${RPM_DEPEND_IFEXISTS}, ${pkg}" |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# require package in .spec.in append @RPM_BUILD_DEPEND@ to Build-Depends |
|
|
|
|
|
|
|
# - parameter: |
|
|
|
|
|
|
|
# $1 = package name |
|
|
|
|
|
|
|
AC_DEFUN([AX_RPM_BUILD_DEPEND], [ |
|
|
|
|
|
|
|
pkg="$1" |
|
|
|
|
|
|
|
RPM_BUILD_DEPEND="${RPM_BUILD_DEPEND}, ${pkg}" |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# require package in .spec.in append @RPM_DEPEND@ to Depends |
|
|
|
|
|
|
|
# - parameter: |
|
|
|
|
|
|
|
# $1 = package name |
|
|
|
|
|
|
|
AC_DEFUN([AX_RPM_DEPEND], [ |
|
|
|
|
|
|
|
pkg="$1" |
|
|
|
|
|
|
|
if test -z "${RPM_DEPEND}"; then |
|
|
|
|
|
|
|
RPM_DEPEND="${pkg}" |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
RPM_DEPEND="${RPM_DEPEND}, ${pkg}" |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# require package in debian/control.in append @DEB_DEPEND@ to Depends |
|
|
|
|
|
|
|
# - parameter: |
|
|
|
|
|
|
|
# $1 = package name |
|
|
|
|
|
|
|
AC_DEFUN([AX_RPM_GROUP], [ |
|
|
|
|
|
|
|
pkg="$1" |
|
|
|
|
|
|
|
RPM_GROUP="${pkg}" |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# call after setting rpmian dependencies |
|
|
|
|
|
|
|
AC_DEFUN([AX_RPM_RESOLVE], [ |
|
|
|
|
|
|
|
AC_SUBST(RPM_BUILD_DEPEND) |
|
|
|
|
|
|
|
AC_SUBST(RPM_DEPEND) |
|
|
|
|
|
|
|
AC_SUBST(RPM_GROUP) |
|
|
|
|
|
|
|
AC_SUBST(RPM_DEPEND_IFEXISTS) |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Check if a package exists in the current distribution, if yes, require it |
|
|
|
|
|
|
|
# in .spec.in append @ALL_DEPEND_IFEXISTS@ to Build-Depends |
|
|
|
|
|
|
|
# - parameter: |
|
|
|
|
|
|
|
# $1 = package name |
|
|
|
|
|
|
|
AC_DEFUN([AX_ALL_DEPEND_IFEXISTS], [ |
|
|
|
|
|
|
|
pkg="$1" |
|
|
|
|
|
|
|
if test -n "$(apt-cache policy -q ${pkg} 2> /dev/null)"; then |
|
|
|
|
|
|
|
DEB_DEPEND_IFEXISTS="${DEB_DEPEND_IFEXISTS}, ${pkg}" |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
if (test -x /usr/bin/zypper && zypper search -x "$pkg" 1>&2 > /dev/null) || \ |
|
|
|
|
|
|
|
(test -x /usr/bin/dnf && dnf list -q "$pkg" 1>&2 > /dev/null) || \ |
|
|
|
|
|
|
|
(test -x /usr/bin/yum && yum list -q "$pkg" 1>&2 > /dev/null) || \ |
|
|
|
|
|
|
|
(test -x /usr/sbin/urpmq && urpmq "$pkg" 1>&2 > /dev/null); then |
|
|
|
|
|
|
|
RPM_DEPEND_IFEXISTS="${RPM_DEPEND_IFEXISTS}, ${pkg}" |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Check if a package exists in the current distribution, if yes, require it |
|
|
|
|
|
|
|
# in .spec.in append @ALL_DEPEND_IFEXISTS@ to Build-Depends |
|
|
|
|
|
|
|
# - parameter: |
|
|
|
|
|
|
|
# $1 = package name |
|
|
|
|
|
|
|
AC_DEFUN([AX_ALL_DEPEND_IFEXISTS_DEV], [ |
|
|
|
|
|
|
|
pkg="$1" |
|
|
|
|
|
|
|
if test -n "$(apt-cache policy -q ${pkg}-dev 2> /dev/null)"; then |
|
|
|
|
|
|
|
DEB_DEPEND_IFEXISTS="${DEB_DEPEND_IFEXISTS}, ${pkg}-dev" |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
if (test -x /usr/bin/zypper && zypper search -x "$pkg"-devel 1>&2 > /dev/null) || \ |
|
|
|
|
|
|
|
(test -x /usr/bin/dnf && dnf list -q "$pkg"-devel 1>&2 > /dev/null) || \ |
|
|
|
|
|
|
|
(test -x /usr/bin/yum && yum list -q "$pkg"-devel 1>&2 > /dev/null) || \ |
|
|
|
|
|
|
|
(test -x /usr/sbin/urpmq && urpmq "$pkg"-devel 1>&2 > /dev/null); then |
|
|
|
|
|
|
|
RPM_DEPEND_IFEXISTS="${RPM_DEPEND_IFEXISTS}, ${pkg}-devel" |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# require package in .spec.in append @ALL_BUILD_DEPEND@ to Build-Depends |
|
|
|
|
|
|
|
# - parameter: |
|
|
|
|
|
|
|
# $1 = package name |
|
|
|
|
|
|
|
AC_DEFUN([AX_ALL_BUILD_DEPEND], [ |
|
|
|
|
|
|
|
pkg="$1" |
|
|
|
|
|
|
|
DEB_BUILD_DEPEND="${DEB_BUILD_DEPEND}, ${pkg}" |
|
|
|
|
|
|
|
RPM_BUILD_DEPEND="${RPM_BUILD_DEPEND}, ${pkg}" |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# require package in .spec.in append @ALL_BUILD_DEPEND@ to Build-Depends |
|
|
|
|
|
|
|
# - parameter: |
|
|
|
|
|
|
|
# $1 = package name |
|
|
|
|
|
|
|
AC_DEFUN([AX_ALL_BUILD_DEPEND_DEV], [ |
|
|
|
|
|
|
|
pkg="$1" |
|
|
|
|
|
|
|
DEB_BUILD_DEPEND="${DEB_BUILD_DEPEND}, ${pkg}-dev" |
|
|
|
|
|
|
|
RPM_BUILD_DEPEND="${RPM_BUILD_DEPEND}, ${pkg}-devel" |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# require package in .spec.in append @ALL_DEPEND@ to Depends |
|
|
|
|
|
|
|
# - parameter: |
|
|
|
|
|
|
|
# $1 = package name |
|
|
|
|
|
|
|
AC_DEFUN([AX_ALL_DEPEND], [ |
|
|
|
|
|
|
|
pkg="$1" |
|
|
|
|
|
|
|
DEB_DEPEND="${DEB_DEPEND}, ${pkg}" |
|
|
|
|
|
|
|
if test -z "${RPM_DEPEND}"; then |
|
|
|
|
|
|
|
RPM_DEPEND="${pkg}" |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
RPM_DEPEND="${RPM_DEPEND}, ${pkg}" |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
AC_DEFUN([AX_OUTPUT], [ |
|
|
|
AC_DEFUN([AX_OUTPUT], [ |
|
|
|
AX_DEB_RESOLVE |
|
|
|
AX_DEB_RESOLVE |
|
|
|
|
|
|
|
AX_RPM_RESOLVE |
|
|
|
AC_OUTPUT |
|
|
|
AC_OUTPUT |
|
|
|
]) |
|
|
|
]) |
|
|
|