From d7aaa63fb70422f8e603e584f36d3ad95a8f9597 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Tue, 19 Jul 2022 03:27:00 +0000 Subject: [PATCH] changed AC_COMPILE_IFELSE to AC_TRY_LINK in checking __builtin_memXXX functions --- configure | 20 ++++++++++++-------- configure.ac | 20 ++++++++++++-------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/configure b/configure index 24670b2..c59d89a 100755 --- a/configure +++ b/configure @@ -14058,7 +14058,7 @@ __builtin_memset ((void*)1, ' ', 10); return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -14069,7 +14069,8 @@ else $as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking __builtin_memcpy" >&5 $as_echo_n "checking __builtin_memcpy... " >&6; } @@ -14084,7 +14085,7 @@ __builtin_memcpy ((void*)1, (void*)2, 10); return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -14095,7 +14096,8 @@ else $as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking __builtin_memmove" >&5 $as_echo_n "checking __builtin_memmove... " >&6; } @@ -14110,7 +14112,7 @@ __builtin_memmove ((void*)1, (void*)2, 10); return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -14121,7 +14123,8 @@ else $as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking __builtin_memcmp" >&5 $as_echo_n "checking __builtin_memcmp... " >&6; } @@ -14136,7 +14139,7 @@ int a = __builtin_memcmp ((void*)1, (void*)2, 10); return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -14147,7 +14150,8 @@ else $as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } diff --git a/configure.ac b/configure.ac index 0b6eeb4..0e4ee78 100644 --- a/configure.ac +++ b/configure.ac @@ -73,32 +73,36 @@ AX_PTHREAD() dnl check some compiler builtins AC_MSG_CHECKING([__builtin_memset]) -AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([], [__builtin_memset ((void*)1, ' ', 10);])], +AC_TRY_LINK( + [], + [__builtin_memset ((void*)1, ' ', 10);], [AC_MSG_RESULT(yes) AC_DEFINE([HAVE___BUILTIN_MEMSET], [1], [__builtin_memset])], [AC_MSG_RESULT(no)] ) AC_MSG_CHECKING([__builtin_memcpy]) -AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([], [__builtin_memcpy ((void*)1, (void*)2, 10);])], +AC_TRY_LINK( + [], + [__builtin_memcpy ((void*)1, (void*)2, 10);], [AC_MSG_RESULT(yes) AC_DEFINE([HAVE___BUILTIN_MEMCPY], [1], [__builtin_memcpy])], [AC_MSG_RESULT(no)] ) AC_MSG_CHECKING([__builtin_memmove]) -AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([], [__builtin_memmove ((void*)1, (void*)2, 10);])], +AC_TRY_LINK( + [], + [__builtin_memmove ((void*)1, (void*)2, 10);], [AC_MSG_RESULT(yes) AC_DEFINE([HAVE___BUILTIN_MEMMOVE], [1], [__builtin_memmove])], [AC_MSG_RESULT(no)] ) AC_MSG_CHECKING([__builtin_memcmp]) -AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([], [int a = __builtin_memcmp ((void*)1, (void*)2, 10);])], +AC_TRY_LINK( + [], + [int a = __builtin_memcmp ((void*)1, (void*)2, 10);], [AC_MSG_RESULT(yes) AC_DEFINE([HAVE___BUILTIN_MEMCMP], [1], [__builtin_memcmp])], [AC_MSG_RESULT(no)]