diff options
-rw-r--r-- | m4macros/ax_find_library.m4 | 4 |
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 ]) |