summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@sudo.ws>2022-03-30 11:21:44 -0600
committerTodd C. Miller <Todd.Miller@sudo.ws>2022-03-30 11:21:44 -0600
commit3e9cf6a792ea8edb67f26ed396635fe3fbc44aef (patch)
tree46d208ec0da9e7affe3f518b14aa7f963fa4466f /configure.ac
parent9a4f4560bfa3ed777e2c35c0886304abf5b72fef (diff)
downloadsudo-3e9cf6a792ea8edb67f26ed396635fe3fbc44aef.tar.gz
--enable-openssl: don't add non-existent directories to PKG_CONFIG_LIBDIR
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 11 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index c80b8dd9f..7146a0d0a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2996,8 +2996,16 @@ openssl_missing=no
if test "${enable_openssl-no}" != no; then
# Use pkg-config to find the openssl cflags and libs if possible.
if test "$enable_openssl" != "yes" -a "$enable_openssl" != "maybe"; then
- PKG_CONFIG_LIBDIR="${enable_openssl}/lib/pkgconfig:${enable_openssl}/lib64/pkgconfig:${enable_openssl}/share/pkgconfig"
- export PKG_CONFIG_LIBDIR
+ PKG_CONFIG_LIBDIR=
+ for d in ${enable_openssl}/*/pkgconfig; do
+ if test -d "$d"; then
+ PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR:$d"
+ fi
+ done
+ if test -n "$PKG_CONFIG_LIBDIR"; then
+ PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR#:}
+ export PKG_CONFIG_LIBDIR
+ fi
elif test "$cross_compiling" = "yes" -a -z "$PKG_CONFIG"; then
# Cannot use pkg-config when cross-compiling
PKG_CONFIG=false
@@ -3111,7 +3119,7 @@ if test "${enable_openssl-no}" != no; then
LDFLAGS="$O_LDFLAGS"
fi
if test "$enable_openssl" != "yes" -a "$enable_openssl" != "maybe"; then
- unset PKG_CONFIG_LIBDIRS
+ unset PKG_CONFIG_LIBDIR
fi
fi
dnl