From: Ivan Maidanski Date: Mon, 29 May 2017 07:37:12 +0000 (+0300) Subject: Do not require libatomic_ops for single-threaded builds (configure) X-Git-Tag: v7.6.2~152 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7681301cfde53103a226a609a6a55d45995696b8;p=gc Do not require libatomic_ops for single-threaded builds (configure) * configure.ac [with_libatomic_ops!=no]: Do not call PKG_CHECK_MODULES(ATOMIC_OPS) if THREADS = none * configure.ac [with_libatomic_ops!=no] (which libatomic_ops to use): Report "none" if if THREADS = none. --- diff --git a/configure.ac b/configure.ac index 2f6ca3da..e6c06df6 100644 --- a/configure.ac +++ b/configure.ac @@ -980,7 +980,7 @@ AC_ARG_WITH([libatomic-ops], # Note: "syntax error near unexpected token ATOMIC_OPS" reported by configure # means Autotools pkg.m4 file was not found during aclocal.m4 generation. missing_libatomic_ops=false -AS_IF([test x"$with_libatomic_ops" != xno], +AS_IF([test x"$with_libatomic_ops" != xno -a x"$THREADS" != xnone], [ PKG_CHECK_MODULES([ATOMIC_OPS], [atomic_ops], [], [ missing_libatomic_ops=true ]) ]) AS_IF([test x$missing_libatomic_ops = xtrue ], @@ -999,7 +999,8 @@ AS_IF([test x"$with_libatomic_ops" = xno \ # Finally, emit the definitions for bundled or external AO. AC_MSG_CHECKING([which libatomic_ops to use]) AS_IF([test x"$with_libatomic_ops" != xno], - [ AC_MSG_RESULT([external]) ], + [ AS_IF([test x"$THREADS" != xnone], + [ AC_MSG_RESULT([external]) ], [ AC_MSG_RESULT([none]) ]) ], [ AC_MSG_RESULT([internal]) ATOMIC_OPS_CFLAGS='-I$(top_builddir)/libatomic_ops/src -I$(top_srcdir)/libatomic_ops/src' ATOMIC_OPS_LIBS=""