|
|
|
@ -594,7 +594,7 @@ AC_DEFUN([AX_USE_DOXYGEN], [ |
|
|
|
|
AC_CHECK_PROG(have_doxygen, doxygen, yes, no) |
|
|
|
|
AC_CHECK_PROG(have_dot, dot, yes, no) |
|
|
|
|
AC_CHECK_PROG(have_mscgen, mscgen, yes, no) |
|
|
|
|
AM_CONDITIONAL(NEED_PLANTUML, test "$have_doxygen" = "yes" -a "1.8.11" != $((echo "1.8.11"; doxygen -v) | sort -V | head -1)) |
|
|
|
|
AM_CONDITIONAL(NEED_PLANTUML, test "$have_doxygen" = "yes" -a "1.8.11" != $((echo "1.8.11"; doxygen -v 2>/dev/null) | sort -V | head -1)) |
|
|
|
|
PDF_DOC=${PACKAGE_NAME}-${PACKAGE_VERSION}.pdf |
|
|
|
|
AC_SUBST(PDF_DOC) |
|
|
|
|
if test "$have_doxygen" = "no"; then |
|
|
|
@ -714,6 +714,15 @@ EOF |
|
|
|
|
# $4 = alternative module names (space separated, optional) |
|
|
|
|
# $5 = optional flags: |
|
|
|
|
# manualflags if CXXFLAGS, CPPFLAGS, LIBS should remain unchanged |
|
|
|
|
# $6 = optional parameters, allowed are (evaluated in this order): |
|
|
|
|
# - RPM_DIST_PKG=<name> |
|
|
|
|
# special name for the RPM package |
|
|
|
|
# - DEB_DIST_PKG=<name> |
|
|
|
|
# special name for the debian package |
|
|
|
|
# - DIST_PKG=<name> |
|
|
|
|
# if the name of the package is different |
|
|
|
|
# - DEV_DIST_PKG=<name> |
|
|
|
|
# if the name of the development package is different |
|
|
|
|
# |
|
|
|
|
# uses PKG_CHECK_MODULES to test for a module |
|
|
|
|
# then, if given, looks for the header file |
|
|
|
@ -723,118 +732,11 @@ EOF |
|
|
|
|
AC_DEFUN([AX_PKG_REQUIRE], [ |
|
|
|
|
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 |
|
|
|
|
$6 |
|
|
|
|
if test -n "$DEV_DIST_PKG"; then |
|
|
|
|
DEV_DEB_DIST_PKG=${DEV_DIST_PKG}-dev |
|
|
|
|
DEV_RPM_DIST_PKG=${DEV_DIST_PKG}-devel |
|
|
|
|
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])], [ |
|
|
|
@ -914,8 +816,10 @@ AC_DEFUN([AX_PKG_REQUIRE_DEV], [ |
|
|
|
|
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]) |
|
|
|
|
AX_DEB_BUILD_DEPEND([${DEV_DEB_DIST_PKG:-${DEB_DIST_PKG:-${DIST_PKG:-${$1_found}-dev}}}]) |
|
|
|
|
AX_RPM_BUILD_DEPEND([${DEV_RPM_DIST_PKG:-${RPM_DIST_PKG:-${DIST_PKG:-${$1_found}-devel}}}]) |
|
|
|
|
AX_DEB_DEPEND([${DEB_DIST_PKG:-${DIST_PKG:-${$1_found}}}]) |
|
|
|
|
AX_RPM_DEPEND([${RPM_DIST_PKG:-${DIST_PKG:-${$1_found}}}]) |
|
|
|
|
[$1]_CPPFLAGS="${$1_CFLAGS}" |
|
|
|
|
[$1]_CXXFLAGS="${$1_CFLAGS}" |
|
|
|
|
AC_SUBST([$1]_CPPFLAGS) |
|
|
|
@ -936,12 +840,26 @@ AC_DEFUN([AX_PKG_REQUIRE_DEV], [ |
|
|
|
|
# $2 = module name (optional, if different from id) |
|
|
|
|
# $3 = optional flags: |
|
|
|
|
# manualflags if CXXFLAGS, CPPFLAGS, LIBS should remain unchanged |
|
|
|
|
# $4 = optional parameters, allowed are (evaluated in this order): |
|
|
|
|
# - RPM_DIST_PKG=<name> |
|
|
|
|
# special name for the RPM package |
|
|
|
|
# - DEB_DIST_PKG=<name> |
|
|
|
|
# special name for the debian package |
|
|
|
|
# - DIST_PKG=<name> |
|
|
|
|
# if the name of the package is different |
|
|
|
|
# - DEV_DIST_PKG=<name> |
|
|
|
|
# if the name of the development package is different |
|
|
|
|
# |
|
|
|
|
# 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], [ |
|
|
|
|
optional_flags="$3" |
|
|
|
|
$4 |
|
|
|
|
if test -n "$DEV_DIST_PKG"; then |
|
|
|
|
DEV_DEB_DIST_PKG=${DEV_DIST_PKG}-dev |
|
|
|
|
DEV_RPM_DIST_PKG=${DEV_DIST_PKG}-devel |
|
|
|
|
fi |
|
|
|
|
PKG_PROG_PKG_CONFIG |
|
|
|
|
PKG_CHECK_MODULES([$1], [m4_default([$2], [$1])], [ |
|
|
|
|
HAVE_$1=1 |
|
|
|
@ -965,52 +883,10 @@ AC_DEFUN([AX_PKG_CHECK], [ |
|
|
|
|
], [ |
|
|
|
|
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) |
|
|
|
|
AX_DEB_BUILD_DEPEND([${DEV_DEB_DIST_PKG:-${DEB_DIST_PKG:-${DIST_PKG:-m4_default([$2], [$1])-dev}}}]) |
|
|
|
|
AX_RPM_BUILD_DEPEND([${DEV_RPM_DIST_PKG:-${RPM_DIST_PKG:-${DIST_PKG:-m4_default([$2], [$1])-devel}}}]) |
|
|
|
|
AX_DEB_DEPEND([${DEB_DIST_PKG:-${DIST_PKG:-m4_default([$2], [$1])}}]) |
|
|
|
|
AX_RPM_DEPEND([${RPM_DIST_PKG:-${DIST_PKG:-m4_default([$2], [$1])}}]) |
|
|
|
|
AM_CONDITIONAL(HAVE_$1, test $HAVE_[$1] -eq 1) |
|
|
|
|
AC_SUBST(HAVE_$1) |
|
|
|
|
AC_SUBST(CPPFLAGS) |
|
|
|
@ -1278,8 +1154,8 @@ AC_DEFUN([AX_ALL_BUILD_DEPEND], [ |
|
|
|
|
# $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" |
|
|
|
|
DEB_BUILD_DEPEND="${DEB_BUILD_DEPEND}, ${pkg// /-dev}-dev" |
|
|
|
|
RPM_BUILD_DEPEND="${RPM_BUILD_DEPEND}, ${pkg// /-devel}-devel" |
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
# require package in .spec.in append @ALL_DEPEND@ to Depends |
|
|
|
@ -1295,6 +1171,7 @@ AC_DEFUN([AX_ALL_DEPEND], [ |
|
|
|
|
fi |
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
# finish configuration - to be called instead of AC_OUTPUT |
|
|
|
|
AC_DEFUN([AX_OUTPUT], [ |
|
|
|
|
AX_DEB_RESOLVE |
|
|
|
|
AX_RPM_RESOLVE |
|
|
|
|