diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-04-20 08:59:05 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-04-20 08:59:05 +0200 |
commit | 24c25938bda134f324ba2b2df35cc8ce82fec43a (patch) | |
tree | 3d0b6c5248dccb8744143744a5cfc3b2ec47d9f8 /m4/ax_boost_thread.m4 | |
parent | 6f24f042582fb15f437f865b4889aeb229eb1a45 (diff) | |
download | dabmod-24c25938bda134f324ba2b2df35cc8ce82fec43a.tar.gz dabmod-24c25938bda134f324ba2b2df35cc8ce82fec43a.tar.bz2 dabmod-24c25938bda134f324ba2b2df35cc8ce82fec43a.zip |
Update m4 macros
Diffstat (limited to 'm4/ax_boost_thread.m4')
-rw-r--r-- | m4/ax_boost_thread.m4 | 60 |
1 files changed, 42 insertions, 18 deletions
diff --git a/m4/ax_boost_thread.m4 b/m4/ax_boost_thread.m4 index 87f03e3..75e80e6 100644 --- a/m4/ax_boost_thread.m4 +++ b/m4/ax_boost_thread.m4 @@ -30,7 +30,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 30 +#serial 33 AC_DEFUN([AX_BOOST_THREAD], [ @@ -67,13 +67,24 @@ AC_DEFUN([AX_BOOST_THREAD], [AC_LANG_PUSH([C++]) CXXFLAGS_SAVE=$CXXFLAGS - 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 + case "x$host_os" in + xsolaris ) + CXXFLAGS="-pthreads $CXXFLAGS" + break; + ;; + xmingw32 ) + CXXFLAGS="-mthreads $CXXFLAGS" + break; + ;; + *android* ) + break; + ;; + * ) + CXXFLAGS="-pthread $CXXFLAGS" + break; + ;; + esac + AC_COMPILE_IFELSE([ AC_LANG_PROGRAM( [[@%:@include <boost/thread/thread.hpp>]], @@ -84,13 +95,23 @@ AC_DEFUN([AX_BOOST_THREAD], AC_LANG_POP([C++]) ]) if test "x$ax_cv_boost_thread" = "xyes"; then - 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 + case "x$host_os" in + xsolaris ) + BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS" + break; + ;; + xmingw32 ) + BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS" + break; + ;; + *android* ) + break; + ;; + * ) + BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS" + break; + ;; + esac AC_SUBST(BOOST_CPPFLAGS) @@ -130,7 +151,7 @@ AC_DEFUN([AX_BOOST_THREAD], fi 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 Boost::Thread library!) fi if test "x$link_thread" = "xno"; then AC_MSG_ERROR(Could not link against $ax_lib !) @@ -141,11 +162,14 @@ AC_DEFUN([AX_BOOST_THREAD], BOOST_LDFLAGS="-pthread $BOOST_LDFLAGS" break; ;; - solaris ) + xsolaris ) BOOST_THREAD_LIB="$BOOST_THREAD_LIB -lpthread" break; ;; - mingw32 ) + xmingw32 ) + break; + ;; + *android* ) break; ;; * ) |