summaryrefslogtreecommitdiffstats
path: root/m4macros/ax_find_library.m4
diff options
context:
space:
mode:
authorAndrei Pavel <andrei@isc.org>2021-09-18 08:35:14 +0200
committerAndrei Pavel <andrei@isc.org>2021-10-22 13:11:49 +0200
commitf6215c24edf66a678bd3d200267f1003d1058c52 (patch)
tree7d25dd0b778faed42f2403a4e410f28e9f9f4244 /m4macros/ax_find_library.m4
parent[#2132] Even more text edits after review (diff)
downloadkea-f6215c24edf66a678bd3d200267f1003d1058c52.tar.xz
kea-f6215c24edf66a678bd3d200267f1003d1058c52.zip
[#2049] prevent empty location appended to rpath
Diffstat (limited to 'm4macros/ax_find_library.m4')
-rw-r--r--m4macros/ax_find_library.m44
1 files changed, 3 insertions, 1 deletions
diff --git a/m4macros/ax_find_library.m4 b/m4macros/ax_find_library.m4
index 26ce851929..8fdb00c5b9 100644
--- a/m4macros/ax_find_library.m4
+++ b/m4macros/ax_find_library.m4
@@ -146,7 +146,9 @@ AC_DEFUN([AX_FIND_LIBRARY], [
# Add to the runtime search path if the flag is not already added.
if test -n "${ISC_RPATH_FLAG}" && test "$(printf '%s\n' "${LIBRARY_LIBS}" | grep -Fc -e "${ISC_RPATH_FLAG}")" = 0; then
library_location=$(printf '%s\n' "${LIBRARY_LIBS}" | grep -Eo '\-L.*\b' | sed 's/-L//g')
- LIBRARY_LIBS="${LIBRARY_LIBS} ${ISC_RPATH_FLAG}${library_location}"
+ if test -n "${library_location}"; then
+ LIBRARY_LIBS="${LIBRARY_LIBS} ${ISC_RPATH_FLAG}${library_location}"
+ fi
fi
fi
])