Commit 8cdce0ad authored by Mathis Rosenhauer's avatar Mathis Rosenhauer Committed by Thomas Jahns

Use AC_CHECK_DECLS, suggestion by Thomas J.

parent ba12a875
...@@ -30,16 +30,7 @@ AC_TYPE_UINT8_T ...@@ -30,16 +30,7 @@ AC_TYPE_UINT8_T
# Checks for library functions. # Checks for library functions.
AC_CHECK_FUNCS([memset strstr]) AC_CHECK_FUNCS([memset strstr])
AC_MSG_CHECKING(for __builtin_clzll) AC_CHECK_DECLS(__builtin_clzll)
AC_TRY_LINK([],[
__builtin_clzll(1);
],[
AC_DEFINE(AEC_HAVE___BUILTIN_CLZLL, 1, \
[Define to 1 if you have the '__builtin__clzll' function.])
AC_MSG_RESULT(yes)
],[
AC_MSG_RESULT(no)
])
AC_CONFIG_FILES([Makefile \ AC_CONFIG_FILES([Makefile \
src/Makefile \ src/Makefile \
......
...@@ -277,7 +277,7 @@ static inline uint32_t direct_get_fs(struct aec_stream *strm) ...@@ -277,7 +277,7 @@ static inline uint32_t direct_get_fs(struct aec_stream *strm)
if (state->acc == 0) if (state->acc == 0)
fill_acc(strm); fill_acc(strm);
#ifdef AEC_HAVE___BUILTIN_CLZLL #ifdef HAVE_DECL___BUILTIN_CLZLL
fs = __builtin_clzll(state->acc) - (64 - state->bitp); fs = __builtin_clzll(state->acc) - (64 - state->bitp);
state->bitp -= fs + 1; state->bitp -= fs + 1;
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment