build: AX_BOOST_THREAD serial 33

This commit is contained in:
Igor Cota 2020-08-16 18:43:08 +02:00
parent cf0681133a
commit 366913e307

View File

@ -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 32 #serial 33
AC_DEFUN([AX_BOOST_THREAD], AC_DEFUN([AX_BOOST_THREAD],
[ [
@ -67,13 +67,24 @@ AC_DEFUN([AX_BOOST_THREAD],
[AC_LANG_PUSH([C++]) [AC_LANG_PUSH([C++])
CXXFLAGS_SAVE=$CXXFLAGS CXXFLAGS_SAVE=$CXXFLAGS
if test "x$host_os" = "xsolaris" ; then case "x$host_os" in
CXXFLAGS="-pthreads $CXXFLAGS" xsolaris )
elif test "x$host_os" = "xmingw32" ; then CXXFLAGS="-pthreads $CXXFLAGS"
CXXFLAGS="-mthreads $CXXFLAGS" break;
else ;;
CXXFLAGS="-pthread $CXXFLAGS" xmingw32 )
fi CXXFLAGS="-mthreads $CXXFLAGS"
break;
;;
*android* )
break;
;;
* )
CXXFLAGS="-pthread $CXXFLAGS"
break;
;;
esac
AC_COMPILE_IFELSE([ AC_COMPILE_IFELSE([
AC_LANG_PROGRAM( AC_LANG_PROGRAM(
[[@%:@include <boost/thread/thread.hpp>]], [[@%:@include <boost/thread/thread.hpp>]],
@ -84,13 +95,23 @@ 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$host_os" = "xsolaris" ; then case "x$host_os" in
BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS" xsolaris )
elif test "x$host_os" = "xmingw32" ; then BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS"
BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS" break;
else ;;
BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS" xmingw32 )
fi BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS"
break;
;;
*android* )
break;
;;
* )
BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS"
break;
;;
esac
AC_SUBST(BOOST_CPPFLAGS) AC_SUBST(BOOST_CPPFLAGS)
@ -148,6 +169,9 @@ AC_DEFUN([AX_BOOST_THREAD],
xmingw32 ) xmingw32 )
break; break;
;; ;;
*android* )
break;
;;
* ) * )
BOOST_THREAD_LIB="$BOOST_THREAD_LIB -lpthread" BOOST_THREAD_LIB="$BOOST_THREAD_LIB -lpthread"
break; break;