From: Pieter Lexis Date: Fri, 11 Aug 2017 12:37:01 +0000 (+0200) Subject: Fix libatomic detection on ppc64 X-Git-Tag: rec-4.0.7~2^2~5^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3f7c65fff632eb4e3198b6edd9f5fa641f7c54d8;p=pdns Fix libatomic detection on ppc64 Thanks @tjikkun! Closes #5456 (cherry picked from commit b16f46605d86a62e4f37bc1e2caab0c52fa9f75c) --- diff --git a/m4/pdns_check_os.m4 b/m4/pdns_check_os.m4 index 2afdbb6bd..ba6546dfa 100644 --- a/m4/pdns_check_os.m4 +++ b/m4/pdns_check_os.m4 @@ -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