mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 10:08:05 +02:00
build: work around pkg-config bug #29801
PKG_CHECK_MODULES() succeeds even if the module's dependencies are not satisfied, leading to empty CFLAGS and LIBS.
This commit is contained in:
parent
68e4d31629
commit
846d92c737
1 changed files with 12 additions and 0 deletions
12
configure.ac
12
configure.ac
|
|
@ -281,6 +281,18 @@ with_nss=no
|
||||||
with_gnutls=no
|
with_gnutls=no
|
||||||
if test x"$ac_crypto" = xnss; then
|
if test x"$ac_crypto" = xnss; then
|
||||||
PKG_CHECK_MODULES(NSS, [nss >= 3.11])
|
PKG_CHECK_MODULES(NSS, [nss >= 3.11])
|
||||||
|
|
||||||
|
# Work around a pkg-config bug (fdo #29801) where exists != usable
|
||||||
|
AC_PATH_PROG(PKGCONFIG_PATH, pkg-config, no)
|
||||||
|
if test x"$PKGCONFIG_PATH" = xno; then
|
||||||
|
AC_MSG_ERROR([pkgconfig required but not found])
|
||||||
|
else
|
||||||
|
`$PKGCONFIG_PATH --cflags --libs nss`
|
||||||
|
if test x"$?" != "x0"; then
|
||||||
|
AC_MSG_ERROR([No usable NSS found])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
AC_SUBST(NSS_CFLAGS)
|
AC_SUBST(NSS_CFLAGS)
|
||||||
AC_SUBST(NSS_LIBS)
|
AC_SUBST(NSS_LIBS)
|
||||||
AC_DEFINE(HAVE_NSS, 1, [Define if you have NSS])
|
AC_DEFINE(HAVE_NSS, 1, [Define if you have NSS])
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue