]> 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>
Mon, 29 May 2017 07:37:12 +0000 (10:37 +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 162284b9065f1651827e05a1db0b72192ee67284..7b22877c0b7c97ff33fec6cbcca93d3246cbfb8d 100644 (file)
@@ -977,7 +977,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 ],
@@ -996,7 +996,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=""