allow package versions in package config dependencies

master
Marc Wäckerlin 10 years ago
parent c4768b4f0c
commit 8676b818d7
  1. 28
      ax_check_qt.m4
  2. 12
      ax_init_standard_project.m4

@ -104,24 +104,14 @@ AC_DEFUN([AX_CHECK_QT], [
MOC_FLAGS+=" -DHAVE_$1=1 ${[$1]5_CFLAGS}" MOC_FLAGS+=" -DHAVE_$1=1 ${[$1]5_CFLAGS}"
AM_CXXFLAGS+=" ${[$1]5_CFLAGS}" AM_CXXFLAGS+=" ${[$1]5_CFLAGS}"
LIBS+=" ${[$1]5_LIBS}" LIBS+=" ${[$1]5_LIBS}"
modules=${qt_modules//Qt/Qt5} PKG_REQUIREMENTS+=" ${qt_modules//Qt/Qt5}"
if test -z "$PKG_REQUIREMENTS"; then
PKG_REQUIREMENTS="${modules// /, }"
else
PKG_REQUIREMENTS="${PKG_REQUIREMENTS}, ${modules// /, }"
fi
if test -n "${qt_modules_optional}"; then if test -n "${qt_modules_optional}"; then
PKG_CHECK_MODULES([$1]5_OPTIONAL, [${qt_modules_optional//Qt/Qt5}], [ PKG_CHECK_MODULES([$1]5_OPTIONAL, [${qt_modules_optional//Qt/Qt5}], [
AM_CPPFLAGS+=" ${[$1]5_OPTIONAL_CFLAGS}" AM_CPPFLAGS+=" ${[$1]5_OPTIONAL_CFLAGS}"
MOC_FLAGS+=" ${[$1]5_OPTIONAL_CFLAGS}" MOC_FLAGS+=" ${[$1]5_OPTIONAL_CFLAGS}"
AM_CXXFLAGS+=" ${[$1]5_OPTIONAL_CFLAGS}" AM_CXXFLAGS+=" ${[$1]5_OPTIONAL_CFLAGS}"
LIBS+=" ${[$1]5_OPTIONAL_LIBS}" LIBS+=" ${[$1]5_OPTIONAL_LIBS}"
modules=${qt_modules_optional//Qt/Qt5} PKG_REQUIREMENTS+=" ${qt_modules_optional//Qt/Qt5}"
if test -z "$PKG_REQUIREMENTS"; then
PKG_REQUIREMENTS="${modules// /, }"
else
PKG_REQUIREMENTS="${PKG_REQUIREMENTS}, ${modules// /, }"
fi
], [ ], [
AC_MSG_NOTICE([Not found: ${qt_modules_optional//Qt/Qt5}]) AC_MSG_NOTICE([Not found: ${qt_modules_optional//Qt/Qt5}])
]) ])
@ -134,24 +124,14 @@ AC_DEFUN([AX_CHECK_QT], [
MOC_FLAGS+=" -DHAVE_$1=1 ${$1_CFLAGS}" MOC_FLAGS+=" -DHAVE_$1=1 ${$1_CFLAGS}"
AM_CXXFLAGS+=" ${$1_CFLAGS}" AM_CXXFLAGS+=" ${$1_CFLAGS}"
LIBS+=" ${$1_LIBS}" LIBS+=" ${$1_LIBS}"
modules=${qt_modules} PKG_REQUIREMENTS+=" ${qt_modules}"
if test -z "$PKG_REQUIREMENTS"; then
PKG_REQUIREMENTS="${modules// /, }"
else
PKG_REQUIREMENTS="${PKG_REQUIREMENTS}, ${modules// /, }"
fi
if test -n "$3"; then if test -n "$3"; then
PKG_CHECK_MODULES($1_OPTIONAL, [${qt_modules_optional}], [ PKG_CHECK_MODULES($1_OPTIONAL, [${qt_modules_optional}], [
AM_CPPFLAGS+=" ${$1_OPTIONAL_CFLAGS}" AM_CPPFLAGS+=" ${$1_OPTIONAL_CFLAGS}"
MOC_FLAGS+=" ${$1_OPTIONAL_CFLAGS}" MOC_FLAGS+=" ${$1_OPTIONAL_CFLAGS}"
AM_CXXFLAGS+=" ${$1_OPTIONAL_CFLAGS}" AM_CXXFLAGS+=" ${$1_OPTIONAL_CFLAGS}"
LIBS+=" ${$1_OPTIONAL_LIBS}" LIBS+=" ${$1_OPTIONAL_LIBS}"
modules=${qt_modules_optional} PKG_REQUIREMENTS+=" ${qt_modules_optional}"
if test -z "$PKG_REQUIREMENTS"; then
PKG_REQUIREMENTS="${modules// /, }"
else
PKG_REQUIREMENTS="${PKG_REQUIREMENTS}, ${modules// /, }"
fi
], [ ], [
AC_MSG_NOTICE([Not found: ${qt_modules_optional}]) AC_MSG_NOTICE([Not found: ${qt_modules_optional}])
]) ])

@ -399,11 +399,7 @@ AC_DEFUN([AX_PKG_REQUIRE], [
AM_CPPFLAGS+=" ${$1_CFLAGS}" AM_CPPFLAGS+=" ${$1_CFLAGS}"
AM_CXXFLAGS+=" ${$1_CFLAGS}" AM_CXXFLAGS+=" ${$1_CFLAGS}"
LIBS+=" ${$1_LIBS}" LIBS+=" ${$1_LIBS}"
if test -z "$PKG_REQUIREMENTS"; then PKG_REQUIREMENTS+=" $2"
PKG_REQUIREMENTS="$2"
else
PKG_REQUIREMENTS="${PKG_REQUIREMENTS}, $2"
fi
], [ ], [
AC_MSG_WARN([Recommended package $2 for feature $1 not installed]) AC_MSG_WARN([Recommended package $2 for feature $1 not installed])
if test -n "$4"; then if test -n "$4"; then
@ -435,11 +431,7 @@ AC_DEFUN([AX_PKG_REQUIRE], [
AM_CPPFLAGS+=" ${$1_CFLAGS}" AM_CPPFLAGS+=" ${$1_CFLAGS}"
AM_CXXFLAGS+=" ${$1_CFLAGS}" AM_CXXFLAGS+=" ${$1_CFLAGS}"
LIBS+=" ${$1_LIBS}" LIBS+=" ${$1_LIBS}"
if test -z "$PKG_REQUIREMENTS"; then PKG_REQUIREMENTS+=" $pkg"
PKG_REQUIREMENTS="$pkg"
else
PKG_REQUIREMENTS="${PKG_REQUIREMENTS}, $pkg"
fi
], [ ], [
AC_MSG_WARN([Recommended package $pkg for feature $1 not installed]) AC_MSG_WARN([Recommended package $pkg for feature $1 not installed])
]) ])

Loading…
Cancel
Save