diff options
author | Petr Spacek <pspacek@redhat.com> | 2016-10-12 11:01:02 +0200 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2016-10-18 10:47:59 +0200 |
commit | 01072fc8f2833e9316f534875c75714803384377 (patch) | |
tree | c8273ced7717a03012a9a6b534696fd6f745618b | |
parent | 7b801682a64b2ba132ba9892831f8c3f5a51caf8 (diff) | |
download | freeipa-01072fc8f2833e9316f534875c75714803384377.tar.gz freeipa-01072fc8f2833e9316f534875c75714803384377.tar.xz freeipa-01072fc8f2833e9316f534875c75714803384377.zip |
Build: modernize crypto library detection
Use package config instead of checking headers.
Package config is faster because it does not invoke compiler
and guarantees proper linking flags because these are provided
by package maintainer instead of hardcoded into build system.
Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
-rw-r--r-- | daemons/configure.ac | 9 | ||||
-rw-r--r-- | daemons/ipa-sam/Makefile.am | 3 | ||||
-rw-r--r-- | daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am | 4 |
3 files changed, 6 insertions, 10 deletions
diff --git a/daemons/configure.ac b/daemons/configure.ac index 34773f93a..958f01c96 100644 --- a/daemons/configure.ac +++ b/daemons/configure.ac @@ -125,12 +125,7 @@ AC_SUBST(LDAP_LIBS) dnl --------------------------------------------------------------------------- dnl - Check for OpenSSL Crypto library dnl --------------------------------------------------------------------------- -dnl This is a very simple check, we should probably check also for MD4_Init and -dnl probably also the version we are using is recent enough -SSL_LIBS= -AC_CHECK_HEADER(openssl/md4.h, [], [AC_MSG_ERROR([openssl/md4.h not found])]) -AC_CHECK_LIB(crypto, MD4_Init, [SSL_LIBS="-lcrypto"]) -AC_SUBST(SSL_LIBS) +PKG_CHECK_MODULES([CRYPTO], [libcrypto], [], [AC_MSG_ERROR([libcrypto not found])]) dnl --------------------------------------------------------------------------- dnl - Check for UUID library @@ -381,6 +376,6 @@ echo " LDAP libs: ${LDAP_LIBS} KRB5 libs: ${KRB5_LIBS} KRAD libs: ${KRAD_LIBS} - OpenSSL libs: ${SSL_LIBS} + OpenSSL crypto libs: ${CRYPTO_LIBS} Maintainer mode: ${USE_MAINTAINER_MODE} " diff --git a/daemons/ipa-sam/Makefile.am b/daemons/ipa-sam/Makefile.am index ea14661b6..c32149341 100644 --- a/daemons/ipa-sam/Makefile.am +++ b/daemons/ipa-sam/Makefile.am @@ -23,6 +23,7 @@ AM_CPPFLAGS = \ -DLDAPIDIR=\""$(localstatedir)/run"\" \ -DHAVE_LDAP \ -I $(KRB5_UTIL_DIR) \ + $(CRYPTO_CFLAGS) \ $(LDAP_CFLAGS) \ $(KRB5_CFLAGS) \ $(WARN_CFLAGS) \ @@ -48,10 +49,10 @@ ipasam_la_LDFLAGS = \ $(NULL) ipasam_la_LIBADD = \ + $(CRYPTO_LIBS) \ $(LDAP_LIBS) \ $(KRB5_LIBS) \ $(TALLOC_LIBS) \ - $(SSL_LIBS) \ $(SAMBAUTIL_LIBS) \ $(NDR_LIBS) \ $(SAMBA40EXTRA_LIBS) \ diff --git a/daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am b/daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am index 46a649187..048e8bd85 100644 --- a/daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am +++ b/daemons/ipa-slapi-plugins/ipa-pwd-extop/Makefile.am @@ -19,16 +19,16 @@ AM_CPPFLAGS = \ -DLIBDIR=\""$(libdir)"\" \ -DLIBEXECDIR=\""$(libexecdir)"\" \ -DDATADIR=\""$(datadir)"\" \ + $(CRYPTO_CFLAGS) \ $(LDAP_CFLAGS) \ $(KRB5_CFLAGS) \ - $(SSL_CFLAGS) \ $(NSS_CFLAGS) \ $(WARN_CFLAGS) \ $(NULL) AM_LDFLAGS = \ + $(CRYPTO_LIBS) \ $(KRB5_LIBS) \ - $(SSL_LIBS) \ $(LDAP_LIBS) \ $(NSPR_LIBS) \ $(NSS_LIBS) \ |