summaryrefslogtreecommitdiffstats
path: root/src/external/libini_config.m4
diff options
context:
space:
mode:
authorNikolai Kondrashov <Nikolai.Kondrashov@redhat.com>2014-07-28 12:57:32 +0300
committerJakub Hrozek <jhrozek@redhat.com>2014-07-29 16:48:19 +0200
commit93f295496dc6dc0838c09692b6a3a008b35d461b (patch)
tree9dd30acc08a16dc7bf6af81a7c92e93ddb1dc9ec /src/external/libini_config.m4
parent9cb4d19c40dcf14b270e39a503f7c5d0a92ab28f (diff)
downloadsssd-93f295496dc6dc0838c09692b6a3a008b35d461b.tar.gz
sssd-93f295496dc6dc0838c09692b6a3a008b35d461b.tar.xz
sssd-93f295496dc6dc0838c09692b6a3a008b35d461b.zip
build: Distinguish libini_config version checks
Use separate shell variable name prefixes for checks of separate libini_config versions, as repeated invocations of PKG_CHECK_MODULES with the same prefix are not generally supposed to have an effect. Otherwise only the checks before and including the first one defining both *_CFLAGS and *_LIBS variables will be done and all that follow will assume success. This happens on RHEL6.5, where both "pkg-config --cflags" and "pkg-config --libs" for ini_config produce non-empty output and successful check for v0.6.1 results in incorrectly successful check for v1.1.0. Resolves: https://fedorahosted.org/sssd/ticket/2388 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Diffstat (limited to 'src/external/libini_config.m4')
-rw-r--r--src/external/libini_config.m48
1 files changed, 6 insertions, 2 deletions
diff --git a/src/external/libini_config.m4 b/src/external/libini_config.m4
index b9fefcc30..13be9c2f4 100644
--- a/src/external/libini_config.m4
+++ b/src/external/libini_config.m4
@@ -1,12 +1,16 @@
-PKG_CHECK_MODULES(INI_CONFIG, [
+PKG_CHECK_MODULES(INI_CONFIG_V1, [
ini_config >= 1.0.0], [
+ INI_CONFIG_CFLAGS="$INI_CONFIG_V1_CFLAGS"
+ INI_CONFIG_LIBS="$INI_CONFIG_V1_LIBS"
AC_DEFINE_UNQUOTED(HAVE_LIBINI_CONFIG_V1, 1, [libini_config version greater than 1.0.0])
], [
AC_MSG_WARN([libini_config-devel >= 1.0.0 not available, trying older version])
- PKG_CHECK_MODULES(INI_CONFIG, [
+ PKG_CHECK_MODULES(INI_CONFIG_V0, [
ini_config >= 0.6.1], [
+ INI_CONFIG_CFLAGS="$INI_CONFIG_V0_CFLAGS"
+ INI_CONFIG_LIBS="$INI_CONFIG_V0_LIBS"
AC_DEFINE_UNQUOTED(HAVE_LIBINI_CONFIG_V0, 1, [libini_config version lesser than 1.0.0])
], [
AC_MSG_ERROR([Please install libini_config-devel])