diff --git a/bdw-gc.pc.in b/bdw-gc.pc.in index ef4c23410..a32e7598c 100644 --- a/bdw-gc.pc.in +++ b/bdw-gc.pc.in @@ -6,5 +6,5 @@ includedir=@includedir@ Name: Boehm-Demers-Weiser Conservative Garbage Collector Description: A garbage collector for C and C++ Version: @PACKAGE_VERSION@ -Libs: -L${libdir} -lgc +Libs: -L${libdir} @ATOMIC_OPS_LIBS@ -lgc Cflags: -I${includedir} diff --git a/configure.ac b/configure.ac index 31c3be858..4040d3537 100644 --- a/configure.ac +++ b/configure.ac @@ -1074,7 +1074,9 @@ AS_IF([test x"$with_libatomic_ops" = xno \ AC_MSG_CHECKING([which libatomic_ops to use]) AS_IF([test x"$with_libatomic_ops" != xno], [ AS_IF([test x"$with_libatomic_ops" != xnone -a x"$THREADS" != xnone], - [ AC_MSG_RESULT([external]) ], + [ AC_MSG_RESULT([external]) + ATOMIC_OPS_LIBS="-latomic_ops" + AC_SUBST([ATOMIC_OPS_LIBS]) ], [ AC_MSG_RESULT([none]) AS_IF([test x"$THREADS" != xnone], [ AC_DEFINE([GC_BUILTIN_ATOMIC], [1],