Skip to content

Commit e7565e6

Browse files
committed
don't check for a library's existence if the tested ldpath = ''
If the tested ldpath = '', using it to create an absolute path to a library leads to a path in the root directory, which isn't what's intended. So don't. Additionally if ldpath = '', it's equivalent to letting the linker use only the system default paths, and there's no way of knowing in which directory the linker might find the library.
1 parent bd7cf99 commit e7565e6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

build-aux/boost.m4

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,9 @@ for boost_rtopt_ in $boost_rtopt '' -d; do
512512
Boost_lib_LIBS="-l$boost_lib";;
513513
esac
514514
# Don't waste time with libraries that don't exist
515-
test -e "$Boost_lib_abs_path" || continue
515+
if test x"$boost_ldpath" != x && test ! -e "$boost_lib_abs_path"; then
516+
continue
517+
fi
516518
boost_save_LIBS=$LIBS
517519
LIBS="$Boost_lib_LIBS $LIBS"
518520
test x"$boost_ldpath" != x && LDFLAGS=" -L$boost_ldpath $LDFLAGS"

0 commit comments

Comments
 (0)