From: David Sommerseth <dav...@redhat.com>

Signed-off-by: David Sommerseth <dav...@redhat.com>
---
 m4/pkg.m4 | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/m4/pkg.m4 b/m4/pkg.m4
index 9a71878..f82496b 100644
--- a/m4/pkg.m4
+++ b/m4/pkg.m4
@@ -107,16 +107,18 @@ AC_DEFUN([PKG_CHECK_MODULES],
 [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
 AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_MODVERSION], [module version])dnl

 pkg_failed=no
 AC_MSG_CHECKING([for $1])

 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
+_PKG_CONFIG([$1][_MODVERSION], [modversion], [$2])

 m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables 
$1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
+and $1[]_LIBS to avoid the need to call pkg-config.  The $1[]_MODVERSION 
provides version
+information.  See the pkg-config man page for more details.])

 if test $pkg_failed = yes; then
        AC_MSG_RESULT([no])
@@ -153,6 +155,7 @@ To get pkg-config, see 
<http://pkg-config.freedesktop.org/>.])[]dnl
 else
        $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
        $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+       $1[]_MODVERSION=$pkg_cv_[]$1[]_MODVERSION
         AC_MSG_RESULT([yes])
        $3
 fi[]dnl
-- 
1.8.3.1


Reply via email to