]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
autoconf: Complain if libatomic-ops is not found.
authorTommi Virtanen <tommi.virtanen@dreamhost.com>
Fri, 11 Mar 2011 21:07:31 +0000 (13:07 -0800)
committerTommi Virtanen <tommi.virtanen@dreamhost.com>
Fri, 11 Mar 2011 21:09:13 +0000 (13:09 -0800)
Use --without-libatomic-ops if you don't want it.

Fixes part of #826.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
configure.ac

index 6a68af69e4d1725b892b64ea899d0b1426941b14..9206ad60d17bab27b7d7359a3182ccf6bf4decf5 100644 (file)
@@ -130,18 +130,16 @@ PKG_CHECK_MODULES([LIBEDIT], [libedit >= 2.11],
 
 #libatomic-ops? You want it!
 AC_ARG_WITH([libatomic-ops],
-            [AS_HELP_STRING([--with-libatomic-ops],
-           [use libatomic-ops to build Ceph's atomic_t type])],
+            [AS_HELP_STRING([--without-libatomic-ops],
+           [disable libatomic-ops for the atomic_t type])],
             [],
-            [with_libatomic_ops=check])
+            [with_libatomic_ops=yes])
 AS_IF([test "x$with_libatomic_ops" != xno],
            [AC_CHECK_HEADER([atomic_ops.h],
              [HAVE_ATOMIC_OPS=1],
-             [if test "x$with_libatomic_ops" != xcheck; then
-                 AC_MSG_FAILURE(
-                   [--with-libatomic-ops was given but atomic_ops.h not found])
-               fi
-             ])])
+             [AC_MSG_FAILURE(
+                   [no libatomic-ops found (use --without-libatomic-ops to disable)])
+              ])])
 AS_IF([test "$HAVE_ATOMIC_OPS" = "1"],
        [],
        AC_DEFINE([NO_ATOMIC_OPS], [1], [Defined if you don't have atomic_ops]))