Merge elementsproject/secp256k1-zkp#175: configure: Check compile+link when checking existence of functions

79472c7ee556a7a3d2abc2e1ab077cfe120c78ff configure: Check compile+link when checking existence of functions (Tim Ruffing)

Pull request description:

ACKs for top commit:
  jonasnick:
    ACK 79472c7ee556a7a3d2abc2e1ab077cfe120c78ff

Tree-SHA512: 947f794138636390d74366d9d06eb18f315f038a8555d1057c407f5592f1bd432a74c94ab758a85a5d8324908f46656518ebce30124f56a9d9c3936d144789ae
This commit is contained in:
Jonas Nick 2022-03-31 20:46:25 +00:00
commit 3deaa006a0
No known key found for this signature in database
GPG Key ID: 4861DBF262123605

View File

@ -261,13 +261,13 @@ else
fi
AC_MSG_CHECKING([for __builtin_popcount])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[void myfunc() {__builtin_popcount(0);}]])],
AC_LINK_IFELSE([AC_LANG_SOURCE([[void myfunc() {__builtin_popcount(0);}]])],
[ AC_MSG_RESULT([yes]);AC_DEFINE(HAVE_BUILTIN_POPCOUNT,1,[Define this symbol if __builtin_popcount is available]) ],
[ AC_MSG_RESULT([no])
])
AC_MSG_CHECKING([for __builtin_clzll])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[void myfunc() { __builtin_clzll(1);}]])],
AC_LINK_IFELSE([AC_LANG_SOURCE([[void myfunc() { __builtin_clzll(1);}]])],
[ AC_MSG_RESULT([yes]);AC_DEFINE(HAVE_BUILTIN_CLZLL,1,[Define this symbol if __builtin_clzll is available]) ],
[ AC_MSG_RESULT([no])
])