diff options
author | Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com> | 2014-07-28 12:57:32 +0300 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2014-07-29 16:48:19 +0200 |
commit | 93f295496dc6dc0838c09692b6a3a008b35d461b (patch) | |
tree | 9dd30acc08a16dc7bf6af81a7c92e93ddb1dc9ec | |
parent | 9cb4d19c40dcf14b270e39a503f7c5d0a92ab28f (diff) | |
download | sssd-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>
-rw-r--r-- | src/external/libini_config.m4 | 8 | ||||
-rw-r--r-- | src/external/samba.m4 | 2 |
2 files changed, 7 insertions, 3 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]) diff --git a/src/external/samba.m4 b/src/external/samba.m4 index 62a9fa3fc..e896739fe 100644 --- a/src/external/samba.m4 +++ b/src/external/samba.m4 @@ -20,7 +20,7 @@ without them. In this case, you will need to execute configure script with argument --without-samba ]])) - PKG_CHECK_MODULES(INI_CONFIG, ini_config >= 1.1.0, , + PKG_CHECK_MODULES(INI_CONFIG_V1_1, ini_config >= 1.1.0, , AC_MSG_ERROR([[Please install libini_config development libraries v1.1.0, or newer. libini_config libraries are necessary for building ipa provider, as well as for building gpo-based access control in ad provider. If |