Skip to content

Commit 49977c6

Browse files
author
Peter van Dijk
committed
fix bug in boost.m4 where it insists on setting -L, causing useless RPATH in our binaries. Closes #728
1 parent 82ff86f commit 49977c6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

m4/boost.m4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ for boost_rtopt_ in $boost_rtopt '' -d; do
382382
/opt/local/lib* /usr/local/lib* /opt/lib* /usr/lib* \
383383
"$with_boost" C:/Boost/lib /lib*
384384
do
385-
test -e "$boost_ldpath" || continue
385+
test -n "$boost_ldpath" -a ! -e "$boost_ldpath" && continue
386386
boost_save_LDFLAGS=$LDFLAGS
387387
# Are we looking for a static library?
388388
case $boost_ldpath:$boost_rtopt_ in #(
@@ -409,7 +409,7 @@ dnl generated only once above (before we start the for loops).
409409
# https://github.com/tsuna/boost.m4/issues/19
410410
AC_CACHE_VAL([boost_cv_rpath_link_ldflag],
411411
[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"
413413
LIBS="$boost_save_LIBS $Boost_lib_LIBS"
414414
_BOOST_AC_LINK_IFELSE([],
415415
[boost_rpath_link_ldflag_found=yes
@@ -421,7 +421,7 @@ dnl generated only once above (before we start the for loops).
421421
LDFLAGS=$boost_save_LDFLAGS
422422
LIBS=$boost_save_LIBS
423423
])
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"
425425
Boost_lib_LDPATH="$boost_ldpath"
426426
break 6
427427
else

0 commit comments

Comments
 (0)