]> granicus.if.org Git - gc/commitdiff
Do not require libatomic_ops for single-threaded builds (configure)
authorIvan Maidanski <ivmai@mail.ru>
Mon, 29 May 2017 07:37:12 +0000 (10:37 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 30 May 2017 13:29:52 +0000 (16:29 +0300)
* 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.

configure.ac

index 70ff263efc7af6206b0687475bfaaa8fe40e34b0..7195b9bd1d7b8bb945affd3260d1cb780088d560 100644 (file)
@@ -945,7 +945,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 ],
@@ -964,7 +964,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=""