[xmlsec] fix PK_CONFIG



commit 361f8ef176f9f6920f8846f1d9b5361f7b0849c4
Author: Aleksey Sanin <aleksey aleksey com>
Date:   Sat Apr 24 18:59:55 2010 -0700

    fix PK_CONFIG

 configure.in             |   35 +++++++++++++----------------------
 include/xmlsec/version.h |   10 +++++-----
 2 files changed, 18 insertions(+), 27 deletions(-)
---
diff --git a/configure.in b/configure.in
index 038e8cc..898f128 100644
--- a/configure.in
+++ b/configure.in
@@ -163,27 +163,18 @@ if test "$ac_cv_sizeof_size_t" -ne "4" ; then
     XMLSEC_DEFINES="$XMLSEC_DEFINES -DXMLSEC_NO_SIZE_T"
 fi
 
-
-dnl autoconf 2.59 fail
-dnl configure.in:137: error: possibly undefined macro: PKG_CONFIG_ENABLED
-dnl       If this token and others are legitimate, please use m4_pattern_allow.
-dnl       See the Autoconf documentation.
-dnl Also note that pkg.m4 (pkgconfig>=0.16 ?)
-dnl allow [^PKG_CONFIG(_PATH)?$] !
-m4_pattern_allow([PKG_CONFIG_ENABLED])
-
 dnl ==========================================================================
 dnl Check if pkg-config enabled and installed
 dnl ==========================================================================
+PKG_CONFIG="pkg-config"
+PKGCONFIG_FOUND="no"
 AC_ARG_ENABLE(pkgconfig,   [  --enable-pkgconfig      enable pkgconfig for configuration (yes)])
-if test "z$enable_pkgconfig" = "zno" ; then
-    PKG_CONFIG_ENABLED=no
-else
-    AC_CHECK_PROG(PKG_CONFIG_ENABLED, pkg-config, yes, no)
-    if test "z$PKG_CONFIG_ENABLED" = "zyes" ; then
-	if ! pkg-config --atleast-pkgconfig-version 0.9 ; then
-	    PKG_CONFIG_ENABLED=no
-	fi
+if test "z$enable_pkgconfig" != "zno" ; then
+    AC_CHECK_PROG(PKGCONFIG_PRESENT, $PKG_CONFIG, yes, no)
+    if test "z$PKGCONFIG_PRESENT" = "zyes" ; then
+        if $PKG_CONFIG --atleast-pkgconfig-version 0.9 ; then
+            PKGCONFIG_FOUND="yes"
+        fi
     fi
 fi
 
@@ -219,7 +210,7 @@ elif test "z$with_libxml_src" != "z" ; then
     else 
 	AC_MSG_ERROR([libxml source dir not found (${with_libxml_src}), typo?])
     fi 	
-elif test "z$with_libxml" = "z" -a "z$PKG_CONFIG_ENABLED" = "zyes" ; then
+elif test "z$with_libxml" = "z" -a "z$PKGCONFIG_FOUND" = "zyes" ; then
     PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_MIN_VERSION,
 	[LIBXML_FOUND=yes],
 	[LIBXML_FOUND=no])
@@ -283,7 +274,7 @@ elif test "z$with_libxslt_src" != "z" ; then
     else 
 	AC_MSG_ERROR([libxslt source dir not found (${with_libxslt_src}), typo?])
     fi 	
-elif test "z$with_libxslt" = "z" -a  "z$PKG_CONFIG_ENABLED" = "zyes" ; then
+elif test "z$with_libxslt" = "z" -a  "z$PKGCONFIG_FOUND" = "zyes" ; then
     PKG_CHECK_MODULES(LIBXSLT, libxslt >= $LIBXSLT_MIN_VERSION,
 	[LIBXSLT_FOUND=yes],
 	[LIBXSLT_FOUND=no])
@@ -372,7 +363,7 @@ elif test "z$with_openssl" != "z" ; then
 	OPENSSL_LIBS="$with_openssl/lib/libcrypto.a $openssl_exlibs"
     fi
     OPENSSL_FOUND="yes"
-elif test "z$PKG_CONFIG_ENABLED" = "zyes" ; then
+elif test "z$PKGCONFIG_FOUND" = "zyes" ; then
     if test "z$OPENSSL_VERSION" = "z" ; then
         PKG_CHECK_MODULES(OPENSSL, openssl >= 0.9.8,
     	    [OPENSSL_VERSION="0.9.8"],
@@ -576,7 +567,7 @@ if test "z$with_nss" = "zno" -o "z$with_nspr" = "zno" ; then
     AC_MSG_CHECKING(for NSS libraries) 
     AC_MSG_RESULT(no)
     NSS_FOUND="without"
-elif test "z$with_nss" = "z" -a "z$with_nspr" = "z" -a "z$with_mozilla_ver" = "z" -a "z$PKG_CONFIG_ENABLED" = "zyes" ; then
+elif test "z$with_nss" = "z" -a "z$with_nspr" = "z" -a "z$with_mozilla_ver" = "z" -a "z$PKGCONFIG_FOUND" = "zyes" ; then
     dnl
     dnl Mozilla's NSS/NSPR are distributed under different names
     dnl in different distribution:
@@ -812,7 +803,7 @@ if test "z$with_gnutls" = "zno" ; then
     AC_MSG_CHECKING(for gnutls libraries >= $GNUTLS_MIN_VERSION) 
     AC_MSG_RESULT(no)
     GNUTLS_FOUND="without"
-elif test "z$with_gnutls" = "z" -a "z$PKG_CONFIG_ENABLED" = "zyes" ; then
+elif test "z$with_gnutls" = "z" -a "z$PKGCONFIG_FOUND" = "zyes" ; then
     PKG_CHECK_MODULES(GNUTLS, gnutls >= $GNUTLS_NEW_MIN_VERSION,
 	[GNUTLS_FOUND=yes],
 	[GNUTLS_FOUND=no])
diff --git a/include/xmlsec/version.h b/include/xmlsec/version.h
index 8c120d4..e005ae1 100644
--- a/include/xmlsec/version.h
+++ b/include/xmlsec/version.h
@@ -21,28 +21,28 @@ extern "C" {
  * The library version string in the format
  * "<major-number>.<minor-number>.<sub-minor-number>".
  */
-#define XMLSEC_VERSION                  "1.2.14"
+#define XMLSEC_VERSION			"1.2.14"
 
 /**
  * XMLSEC_VERSION_MAJOR:
  *
  * The library major version number.
  */
-#define XMLSEC_VERSION_MAJOR            1
+#define XMLSEC_VERSION_MAJOR		1
 
 /**
  * XMLSEC_VERSION_MINOR:
  *
  * The library minor version number.
  */
-#define XMLSEC_VERSION_MINOR            2
+#define XMLSEC_VERSION_MINOR		2
 
 /**
  * XMLSEC_VERSION_SUBMINOR:
  *
  * The library sub-minor version number.
  */
-#define XMLSEC_VERSION_SUBMINOR         14
+#define XMLSEC_VERSION_SUBMINOR		14
 
 /**
  * XMLSEC_VERSION_INFO:
@@ -50,7 +50,7 @@ extern "C" {
  * The library version info string in the format
  * "<major-number>+<minor-number>:<sub-minor-number>:<minor-number>".
  */
-#define XMLSEC_VERSION_INFO             "3:14:2"
+#define XMLSEC_VERSION_INFO		"3:14:2"
 
 
 #ifdef __cplusplus



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]