mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +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
|
# and this notice are preserved. This file is offered as-is, without any
|
||||||
# warranty.
|
# warranty.
|
||||||
|
|
||||||
#serial 22
|
#serial 27
|
||||||
|
|
||||||
AC_DEFUN([AX_BOOST_THREAD],
|
AC_DEFUN([AX_BOOST_THREAD],
|
||||||
[
|
[
|
||||||
@ -68,17 +68,13 @@ AC_DEFUN([AX_BOOST_THREAD],
|
|||||||
[AC_LANG_PUSH([C++])
|
[AC_LANG_PUSH([C++])
|
||||||
CXXFLAGS_SAVE=$CXXFLAGS
|
CXXFLAGS_SAVE=$CXXFLAGS
|
||||||
|
|
||||||
# let us handle platform dependent issues in
|
if test "x$host_os" = "xsolaris" ; then
|
||||||
# configure.ac
|
CXXFLAGS="-pthreads $CXXFLAGS"
|
||||||
|
elif test "x$host_os" = "xmingw32" ; then
|
||||||
# if test "x$build_os" = "xsolaris" ; then
|
CXXFLAGS="-mthreads $CXXFLAGS"
|
||||||
# CXXFLAGS="-pthreads $CXXFLAGS"
|
else
|
||||||
# elif test "x$build_os" = "xming32" ; then
|
CXXFLAGS="-pthread $CXXFLAGS"
|
||||||
# CXXFLAGS="-mthreads $CXXFLAGS"
|
fi
|
||||||
# else
|
|
||||||
# CXXFLAGS="-pthread $CXXFLAGS"
|
|
||||||
# fi
|
|
||||||
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/thread/thread.hpp>]],
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/thread/thread.hpp>]],
|
||||||
[[boost::thread_group thrds;
|
[[boost::thread_group thrds;
|
||||||
return 0;]])],
|
return 0;]])],
|
||||||
@ -87,13 +83,13 @@ AC_DEFUN([AX_BOOST_THREAD],
|
|||||||
AC_LANG_POP([C++])
|
AC_LANG_POP([C++])
|
||||||
])
|
])
|
||||||
if test "x$ax_cv_boost_thread" = "xyes"; then
|
if test "x$ax_cv_boost_thread" = "xyes"; then
|
||||||
# if test "x$build_os" = "xsolaris" ; then
|
if test "x$host_os" = "xsolaris" ; then
|
||||||
# BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS"
|
BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS"
|
||||||
# elif test "x$build_os" = "xming32" ; then
|
elif test "x$host_os" = "xmingw32" ; then
|
||||||
# BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS"
|
BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS"
|
||||||
# else
|
else
|
||||||
# BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS"
|
BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS"
|
||||||
# fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(BOOST_CPPFLAGS)
|
AC_SUBST(BOOST_CPPFLAGS)
|
||||||
|
|
||||||
@ -101,21 +97,21 @@ AC_DEFUN([AX_BOOST_THREAD],
|
|||||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
|
||||||
|
|
||||||
LDFLAGS_SAVE=$LDFLAGS
|
LDFLAGS_SAVE=$LDFLAGS
|
||||||
# case "x$build_os" in
|
case "x$host_os" in
|
||||||
# *bsd* )
|
*bsd* )
|
||||||
# LDFLAGS="-pthread $LDFLAGS"
|
LDFLAGS="-pthread $LDFLAGS"
|
||||||
# break;
|
break;
|
||||||
# ;;
|
;;
|
||||||
# esac
|
esac
|
||||||
if test "x$ax_boost_user_thread_lib" = "x"; then
|
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}
|
ax_lib=${libextension}
|
||||||
AC_CHECK_LIB($ax_lib, exit,
|
AC_CHECK_LIB($ax_lib, exit,
|
||||||
[BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
|
[BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
|
||||||
[link_thread="no"])
|
[link_thread="no"])
|
||||||
done
|
done
|
||||||
if test "x$link_thread" != "xyes"; then
|
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}
|
ax_lib=${libextension}
|
||||||
AC_CHECK_LIB($ax_lib, exit,
|
AC_CHECK_LIB($ax_lib, exit,
|
||||||
[BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
|
[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
|
if test "x$ax_lib" = "x"; then
|
||||||
AC_MSG_ERROR(Could not find a version of the library!)
|
AC_MSG_ERROR(Could not find a version of the library!)
|
||||||
fi
|
fi
|
||||||
# if test "x$link_thread" = "xno"; then
|
if test "x$link_thread" = "xno"; then
|
||||||
# AC_MSG_ERROR(Could not link against $ax_lib !)
|
AC_MSG_ERROR(Could not link against $ax_lib !)
|
||||||
# else
|
else
|
||||||
# case "x$build_os" in
|
case "x$host_os" in
|
||||||
# *bsd* )
|
*bsd* )
|
||||||
# BOOST_LDFLAGS="-pthread $BOOST_LDFLAGS"
|
BOOST_LDFLAGS="-pthread $BOOST_LDFLAGS"
|
||||||
# break;
|
break;
|
||||||
# ;;
|
;;
|
||||||
# esac
|
esac
|
||||||
|
|
||||||
# fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CPPFLAGS="$CPPFLAGS_SAVED"
|
CPPFLAGS="$CPPFLAGS_SAVED"
|
||||||
|
Loading…
Reference in New Issue
Block a user