Ticket #40044: patch-m4-ax_boost_system.m4.diff

File patch-m4-ax_boost_system.m4.diff, 1.6 KB (added by ryandesign (Ryan Carsten Schmidt), 11 years ago)
  • m4/ax_boost_system.m4

    From 2ec785001bc685dafcd792e49765dcbd2ae9bd38 Mon Sep 17 00:00:00 2001
    From: Peter Johansson <trojkan@gmail.com>
    Date: Sun, 30 Sep 2012 05:59:33 +0000
    Subject: Use 'ls -r' rather than non-portable tool 'tac'. Simplify filepattern in ls expression so dylib (on OSX) are also detected.
    
    ---
    old new AC_DEFUN([AX_BOOST_SYSTEM], 
    8383
    8484                        LDFLAGS_SAVE=$LDFLAGS
    8585            if test "x$ax_boost_user_system_lib" = "x"; then
    86                 for libextension in `ls $BOOSTLIBDIR/libboost_system*.a* $BOOSTLIBDIR/libboost_system*.so* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_system.*\)\.\(so\|a\).*$;\1;' | tac` ; do
     86                for libextension in `ls -r $BOOSTLIBDIR/libboost_system* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do
    8787                     ax_lib=${libextension}
    8888                                    AC_CHECK_LIB($ax_lib, exit,
    8989                                 [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],
    9090                                 [link_system="no"])
    9191                                done
    9292                if test "x$link_system" != "xyes"; then
    93                 for libextension in `ls $BOOSTLIBDIR/boost_system*.{dll,a}* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_system.*\)\.\(dll\|a\).*$;\1;' | tac` ; do
     93                for libextension in `ls -r $BOOSTLIBDIR/boost_system* 2>/dev/null | sed 's,.*/,,' | sed -e 's,\..*,,'` ; do
    9494                     ax_lib=${libextension}
    9595                                    AC_CHECK_LIB($ax_lib, exit,
    9696                                 [BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break],