@@ -382,7 +382,7 @@ for boost_rtopt_ in $boost_rtopt '' -d; do
382
382
/opt/local/lib* /usr/local/lib* /opt/lib* /usr/lib* \
383
383
"$with_boost" C:/Boost/lib /lib*
384
384
do
385
- test -e "$boost_ldpath" || continue
385
+ test -n "$boost_ldpath" -a ! - e "$boost_ldpath" && continue
386
386
boost_save_LDFLAGS=$LDFLAGS
387
387
# Are we looking for a static library?
388
388
case $boost_ldpath:$boost_rtopt_ in #(
@@ -409,7 +409,7 @@ dnl generated only once above (before we start the for loops).
409
409
# https://github.com/tsuna/boost.m4/issues/19
410
410
AC_CACHE_VAL ( [ boost_cv_rpath_link_ldflag] ,
411
411
[ for boost_cv_rpath_link_ldflag in -Wl,-R, -Wl,-rpath,; do
412
- LDFLAGS="$boost_save_LDFLAGS -L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath"
412
+ test x"$boost_ldpath" != x && LDFLAGS="$boost_save_LDFLAGS -L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath"
413
413
LIBS="$boost_save_LIBS $Boost_lib_LIBS"
414
414
_BOOST_AC_LINK_IFELSE([ ] ,
415
415
[ boost_rpath_link_ldflag_found=yes
@@ -421,7 +421,7 @@ dnl generated only once above (before we start the for loops).
421
421
LDFLAGS=$boost_save_LDFLAGS
422
422
LIBS=$boost_save_LIBS
423
423
] )
424
- Boost_lib_LDFLAGS="-L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath"
424
+ test x"$boost_ldpath" != x && Boost_lib_LDFLAGS="-L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath"
425
425
Boost_lib_LDPATH="$boost_ldpath"
426
426
break 6
427
427
else
0 commit comments