|
|
ac7d03 |
From 03750b1c1ba8ed670691e4e464d110b9329d85be Mon Sep 17 00:00:00 2001
|
|
|
ac7d03 |
From: Jan Cholasta <jcholast@redhat.com>
|
|
|
ac7d03 |
Date: Wed, 5 Apr 2017 10:24:17 +0000
|
|
|
ac7d03 |
Subject: [PATCH] configure: fix AC_CHECK_LIB usage
|
|
|
ac7d03 |
|
|
|
ac7d03 |
Replace empty string with a single space in the third argument of
|
|
|
ac7d03 |
`AC_CHECK_LIB` (`action-if-found`) where applicable.
|
|
|
ac7d03 |
|
|
|
ac7d03 |
Empty string in the argument causes `AC_CHECK_LIB` to use the default
|
|
|
ac7d03 |
action when a library is found which includes adding the library to `LIBS`,
|
|
|
ac7d03 |
which specifies libraries to be linked in every binary and library in the
|
|
|
ac7d03 |
project.
|
|
|
ac7d03 |
|
|
|
ac7d03 |
This fixes libkrad, liblber, libldap_r and libsss_nss_idmap being linked to
|
|
|
ac7d03 |
every binary and library in IPA, even where unused.
|
|
|
ac7d03 |
|
|
|
ac7d03 |
https://pagure.io/freeipa/issue/6846
|
|
|
ac7d03 |
|
|
|
ac7d03 |
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
|
|
|
ac7d03 |
---
|
|
|
ac7d03 |
configure.ac | 4 ++--
|
|
|
ac7d03 |
server.m4 | 4 ++--
|
|
|
ac7d03 |
2 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
ac7d03 |
|
|
|
ac7d03 |
diff --git a/configure.ac b/configure.ac
|
|
|
ac7d03 |
index ded1d71fd079a5f6947ef0627fb699783c8cc109..e31a9849c4c0556833f5cd47104381d006c96eef 100644
|
|
|
ac7d03 |
--- a/configure.ac
|
|
|
ac7d03 |
+++ b/configure.ac
|
|
|
ac7d03 |
@@ -86,8 +86,8 @@ dnl ---------------------------------------------------------------------------
|
|
|
ac7d03 |
|
|
|
ac7d03 |
SAVE_CPPFLAGS=$CPPFLAGS
|
|
|
ac7d03 |
CPPFLAGS="$NSPR_CFLAGS $NSS_CFLAGS"
|
|
|
ac7d03 |
-AC_CHECK_LIB([ldap_r], [ldap_search], [], AC_MSG_ERROR([libldap_r not found]))
|
|
|
ac7d03 |
-AC_CHECK_LIB([lber], [ber_peek_tag], [], AC_MSG_ERROR([liblber not found]))
|
|
|
ac7d03 |
+AC_CHECK_LIB([ldap_r], [ldap_search], [ ], AC_MSG_ERROR([libldap_r not found]))
|
|
|
ac7d03 |
+AC_CHECK_LIB([lber], [ber_peek_tag], [ ], AC_MSG_ERROR([liblber not found]))
|
|
|
ac7d03 |
LDAP_LIBS="-lldap_r -llber"
|
|
|
ac7d03 |
LDAP_CFLAGS=""
|
|
|
ac7d03 |
AC_SUBST(LDAP_LIBS)
|
|
|
ac7d03 |
diff --git a/server.m4 b/server.m4
|
|
|
ac7d03 |
index 346d73e906c5d0499e46fcc4da070007b2ff5973..aa784e096299d5a6cc599a0d6a0652168f9bafbc 100644
|
|
|
ac7d03 |
--- a/server.m4
|
|
|
ac7d03 |
+++ b/server.m4
|
|
|
ac7d03 |
@@ -31,7 +31,7 @@ PKG_CHECK_MODULES([SSSIDMAP], [sss_idmap])
|
|
|
ac7d03 |
PKG_CHECK_MODULES([SSSNSSIDMAP], [sss_nss_idmap >= 1.15.2])
|
|
|
ac7d03 |
AC_CHECK_LIB([sss_nss_idmap],
|
|
|
ac7d03 |
[sss_nss_getlistbycert],
|
|
|
ac7d03 |
- [],
|
|
|
ac7d03 |
+ [ ],
|
|
|
ac7d03 |
[AC_MSG_ERROR([Required sss_nss_getlistbycert symbol in sss_nss_idmap not found])],
|
|
|
ac7d03 |
[])
|
|
|
ac7d03 |
|
|
|
ac7d03 |
@@ -48,7 +48,7 @@ dnl - Check for KRB5 krad
|
|
|
ac7d03 |
dnl ---------------------------------------------------------------------------
|
|
|
ac7d03 |
|
|
|
ac7d03 |
AC_CHECK_HEADER(krad.h, [], [AC_MSG_ERROR([krad.h not found])])
|
|
|
ac7d03 |
-AC_CHECK_LIB(krad, main, [], [AC_MSG_ERROR([libkrad not found])])
|
|
|
ac7d03 |
+AC_CHECK_LIB(krad, main, [ ], [AC_MSG_ERROR([libkrad not found])])
|
|
|
ac7d03 |
KRAD_LIBS="-lkrad"
|
|
|
ac7d03 |
krb5rundir="${localstatedir}/run/krb5kdc"
|
|
|
ac7d03 |
AC_SUBST(KRAD_LIBS)
|
|
|
ac7d03 |
--
|
|
|
ac7d03 |
2.12.2
|
|
|
ac7d03 |
|