mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
Update ax_boost_thread.m4 to serial 27
- Use 'ls -r' in order to try newer version before older ones. Simplify ls pattern so also dylibs are detected.
This commit is contained in:
parent
f9374cafa5
commit
e4235c38ff
@ -30,7 +30,7 @@
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 22
|
||||
#serial 27
|
||||
|
||||
AC_DEFUN([AX_BOOST_THREAD],
|
||||
[
|
||||
@ -68,17 +68,13 @@ AC_DEFUN([AX_BOOST_THREAD],
|
||||
[AC_LANG_PUSH([C++])
|
||||
CXXFLAGS_SAVE=$CXXFLAGS
|
||||
|
||||
# let us handle platform dependent issues in
|
||||
# configure.ac
|
||||
|
||||
# if test "x$build_os" = "xsolaris" ; then
|
||||
# CXXFLAGS="-pthreads $CXXFLAGS"
|
||||
# elif test "x$build_os" = "xming32" ; then
|
||||
# CXXFLAGS="-mthreads $CXXFLAGS"
|
||||
# else
|
||||
# CXXFLAGS="-pthread $CXXFLAGS"
|
||||
# fi
|
||||
|
||||
if test "x$host_os" = "xsolaris" ; then
|
||||
CXXFLAGS="-pthreads $CXXFLAGS"
|
||||
elif test "x$host_os" = "xmingw32" ; then
|
||||
CXXFLAGS="-mthreads $CXXFLAGS"
|
||||
else
|
||||
CXXFLAGS="-pthread $CXXFLAGS"
|
||||
fi
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/thread/thread.hpp>]],
|
||||
[[boost::thread_group thrds;
|
||||
return 0;]])],
|
||||
@ -87,13 +83,13 @@ AC_DEFUN([AX_BOOST_THREAD],
|
||||
AC_LANG_POP([C++])
|
||||
])
|
||||
if test "x$ax_cv_boost_thread" = "xyes"; then
|
||||
# if test "x$build_os" = "xsolaris" ; then
|
||||
# BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS"
|
||||
# elif test "x$build_os" = "xming32" ; then
|
||||
# BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS"
|
||||
# else
|
||||
# BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS"
|
||||
# fi
|
||||
if test "x$host_os" = "xsolaris" ; then
|
||||
BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS"
|
||||
elif test "x$host_os" = "xmingw32" ; then
|
||||
BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS"
|
||||
else
|
||||
BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS"
|
||||
fi
|
||||
|
||||
AC_SUBST(BOOST_CPPFLAGS)
|
||||
|
||||
@ -101,21 +97,21 @@ AC_DEFUN([AX_BOOST_THREAD],
|
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||
|
||||
LDFLAGS_SAVE=$LDFLAGS
|
||||
# case "x$build_os" in
|
||||
# *bsd* )
|
||||
# LDFLAGS="-pthread $LDFLAGS"
|
||||
# break;
|
||||
# ;;
|
||||
# esac
|
||||
case "x$host_os" in
|
||||
*bsd* )
|
||||
LDFLAGS="-pthread $LDFLAGS"
|
||||
break;
|
||||
;;
|
||||
esac
|
||||
if test "x$ax_boost_user_thread_lib" = "x"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/libboost_thread*.so* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_thread.*\)\.so.*$;\1;'` `ls $BOOSTLIBDIR/libboost_thread*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_thread.*\)\.a*$;\1;'`; do
|
||||
for libextension in `ls -r $BOOSTLIBDIR/libboost_thread* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'`; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
|
||||
[link_thread="no"])
|
||||
done
|
||||
if test "x$link_thread" != "xyes"; then
|
||||
for libextension in `ls $BOOSTLIBDIR/boost_thread*.dll* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_thread.*\)\.dll.*$;\1;'` `ls $BOOSTLIBDIR/boost_thread*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_thread.*\)\.a*$;\1;'` ; do
|
||||
for libextension in `ls -r $BOOSTLIBDIR/boost_thread* 2>/dev/null | sed 's,.*/,,' | sed 's,\..*,,'`; do
|
||||
ax_lib=${libextension}
|
||||
AC_CHECK_LIB($ax_lib, exit,
|
||||
[BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
|
||||
@ -134,17 +130,17 @@ AC_DEFUN([AX_BOOST_THREAD],
|
||||
if test "x$ax_lib" = "x"; then
|
||||
AC_MSG_ERROR(Could not find a version of the library!)
|
||||
fi
|
||||
# if test "x$link_thread" = "xno"; then
|
||||
# AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
# else
|
||||
# case "x$build_os" in
|
||||
# *bsd* )
|
||||
# BOOST_LDFLAGS="-pthread $BOOST_LDFLAGS"
|
||||
# break;
|
||||
# ;;
|
||||
# esac
|
||||
if test "x$link_thread" = "xno"; then
|
||||
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||
else
|
||||
case "x$host_os" in
|
||||
*bsd* )
|
||||
BOOST_LDFLAGS="-pthread $BOOST_LDFLAGS"
|
||||
break;
|
||||
;;
|
||||
esac
|
||||
|
||||
# fi
|
||||
fi
|
||||
fi
|
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||
|
Loading…
Reference in New Issue
Block a user