diff options
author | Petr Spacek <pspacek@redhat.com> | 2016-10-12 10:57:57 +0200 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2016-10-18 10:47:59 +0200 |
commit | 651f1acac8212346fb579ff8911b43a3faf3867b (patch) | |
tree | 6bcb12d7257d610a077494d3ed5bb7645e375f89 | |
parent | 152ed75ff6e55489e27c201b27ee6eb5c4db0480 (diff) | |
download | freeipa-651f1acac8212346fb579ff8911b43a3faf3867b.tar.gz freeipa-651f1acac8212346fb579ff8911b43a3faf3867b.tar.xz freeipa-651f1acac8212346fb579ff8911b43a3faf3867b.zip |
Build: modernize Kerberos 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.
libkrad does not have package config file so we keep the old way here.
Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
-rw-r--r-- | daemons/configure.ac | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/daemons/configure.ac b/daemons/configure.ac index 5c5a10463..1d0209d51 100644 --- a/daemons/configure.ac +++ b/daemons/configure.ac @@ -54,15 +54,11 @@ dnl --------------------------------------------------------------------------- dnl - Check for KRB5 dnl --------------------------------------------------------------------------- -AC_CHECK_HEADER(krb5.h, [], [AC_MSG_ERROR([krb5.h not found])]) +PKG_CHECK_MODULES([KRB5], [krb5], [], [AC_MSG_ERROR([libkrb5 not found])]) AC_CHECK_HEADER(krad.h, [], [AC_MSG_ERROR([krad.h not found])]) -AC_CHECK_LIB(krb5, main, [], [AC_MSG_ERROR([libkrb5 not found])]) -AC_CHECK_LIB(k5crypto, main, [krb5crypto=k5crypto], [krb5crypto=crypto]) AC_CHECK_LIB(krad, main, [], [AC_MSG_ERROR([libkrad not found])]) -KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err" KRAD_LIBS="-lkrad" krb5rundir="${localstatedir}/run/krb5kdc" -AC_SUBST(KRB5_LIBS) AC_SUBST(KRAD_LIBS) AC_SUBST(krb5rundir) |