Update ax_boost_system.m4 to serial 17

- Use 'ls -r' rather than non-portable tool 'tac'. Simplify filepattern in ls expression so dylib (on OSX) are also detected.
This commit is contained in:
Guillermo Céspedes Tabárez 2013-11-15 03:59:15 -08:00 committed by Wladimir J. van der Laan
parent 2fb65108f3
commit f9374cafa5

View File

@ -31,7 +31,7 @@
# and this notice are preserved. This file is offered as-is, without any # and this notice are preserved. This file is offered as-is, without any
# warranty. # warranty.
#serial 14 #serial 17
AC_DEFUN([AX_BOOST_SYSTEM], AC_DEFUN([AX_BOOST_SYSTEM],
[ [
@ -83,14 +83,14 @@ AC_DEFUN([AX_BOOST_SYSTEM],
LDFLAGS_SAVE=$LDFLAGS LDFLAGS_SAVE=$LDFLAGS
if test "x$ax_boost_user_system_lib" = "x"; then if test "x$ax_boost_user_system_lib" = "x"; then
for libextension in `ls $BOOSTLIBDIR/libboost_system*.so* $BOOSTLIBDIR/libboost_system*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_system.*\)\.so.*$;\1;' -e 's;^lib\(boost_system.*\)\.a*$;\1;'` ; do for libextension in `ls -r $BOOSTLIBDIR/libboost_system* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do
ax_lib=${libextension} ax_lib=${libextension}
AC_CHECK_LIB($ax_lib, exit, AC_CHECK_LIB($ax_lib, exit,
[BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break], [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
[link_system="no"]) [link_system="no"])
done done
if test "x$link_system" != "xyes"; then if test "x$link_system" != "xyes"; then
for libextension in `ls $BOOSTLIBDIR/boost_system*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_system.*\)\.dll.*$;\1;' -e 's;^\(boost_system.*\)\.a*$;\1;'` ; do for libextension in `ls -r $BOOSTLIBDIR/boost_system* 2>/dev/null | sed 's,.*/,,' | sed -e 's,\..*,,'` ; do
ax_lib=${libextension} ax_lib=${libextension}
AC_CHECK_LIB($ax_lib, exit, AC_CHECK_LIB($ax_lib, exit,
[BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break], [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],