--- orig/m4/boost.m4 2008-01-22 18:46:39.000000000 -0500 +++ new/m4/boost.m4 2008-01-26 01:53:00.000000000 -0500 @@ -227,10 +227,15 @@ mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X$2" : 'Xmt-*\(.*\)'`;; #( *) boost_mt=; boost_rtopt=$2;; esac - # If the PREFERRED-RT-OPT are not empty, prepend a `-'. + # Find the proper debug variant depending on what we've been asked to find. case $boost_rtopt in #( - *[[a-z0-9A-Z]]*) boost_rtopt="-$boost_rtopt";; + *d*) boost_rt_d="-$boost_rtopt";; #( + *[[sgpn]]*) # Insert the `d' at the right place (in between `sg' and `pn') + boost_rt_d=`echo "$boost_rtopt" | sed 's/\(s*g*\)\(p*n*\)/-\1d\2/'`;; #( + *) boost_rt_d='-d';; esac + # If the PREFERRED-RT-OPT are not empty, prepend a `-'. + test -n "$boost_rtopt" && boost_rtopt="-$boost_rtopt" $boost_guess_use_mt && boost_mt=-mt # Look for the abs path the static archive. # $libext is computed by Libtool but let's make sure it's non empty. @@ -266,12 +271,11 @@ for boost_tag_ in -$boost_cv_lib_tag ''; do for boost_ver_ in -$boost_cv_lib_version ''; do for boost_mt_ in $boost_mt -mt ''; do -for boost_rtopt_ in $boost_rtopt '' -d; do +for boost_rtopt_ in $boost_rtopt $boost_rt_d; do for boost_lib in \ boost_$1$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \ - boost_$1$boost_tag_$boost_mt_$boost_ver_ \ boost_$1$boost_tag_$boost_rtopt_$boost_ver_ \ - boost_$1$boost_tag_$boost_mt_ \ + boost_$1$boost_tag_$boost_mt_$boost_ver_ \ boost_$1$boost_tag_$boost_ver_ do # Avoid testing twice the same lib