]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix libatomic detection on ppc64
authorPieter Lexis <pieter.lexis@powerdns.com>
Fri, 11 Aug 2017 12:37:01 +0000 (14:37 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 13 Nov 2017 15:18:54 +0000 (16:18 +0100)
Thanks @tjikkun!

Closes #5456

(cherry picked from commit b16f46605d86a62e4f37bc1e2caab0c52fa9f75c)

m4/pdns_check_os.m4

index 2afdbb6bd4c5badc77edeca04aa52844008ba3fd..ba6546dfac2ea1bcfafefec52f7a289087c882f3 100644 (file)
@@ -36,12 +36,13 @@ AC_DEFUN([PDNS_CHECK_OS],[
   AM_CONDITIONAL([HAVE_SOLARIS], [test "x$have_solaris" = "xyes"])
 
   case "$host" in
-  mips* | powerpc* )
-    AX_CHECK_LINK_FLAG([-latomic],
-      [ : ],
-      [ AC_MSG_ERROR([Unable to link against libatomic, cannot continue]) ]
-    )
+  mips* | powerpc-* )
+    AC_MSG_CHECKING([whether the linker accepts -latomic])
     LDFLAGS="-latomic $LDFLAGS"
+    AC_LINK_IFELSE([m4_default([],[AC_LANG_PROGRAM()])],
+      [AC_MSG_RESULT([yes])],
+      [AC_MSG_ERROR([Unable to link against libatomic, cannot continue])]
+    )
     ;;
   esac