diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2021-09-24 18:04:39 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2021-09-27 18:56:13 +0200 |
commit | ff788ef19c498967ba83fb54c14700de7d4c274a (patch) | |
tree | cdd5d58d7c49b86d12fcedfc2692033eba74d20f /configure | |
parent | 27eef1b96402abaadbd328d8912f3ccce96df5e2 (diff) | |
download | lvm2-ff788ef19c498967ba83fb54c14700de7d4c274a.tar.gz |
configure: check ffs __builtin_ffs versionsort
Check for presence of ffs(), __builtin_ffs() and versionsort().
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 65 |
1 files changed, 57 insertions, 8 deletions
@@ -6701,6 +6701,46 @@ fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_ffs" >&5 +printf %s "checking for __builtin_ffs... " >&6; } +if test ${ax_cv_have___builtin_ffs+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + __builtin_ffs(0) + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ax_cv_have___builtin_ffs=yes +else $as_nop + ax_cv_have___builtin_ffs=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have___builtin_ffs" >&5 +printf "%s\n" "$ax_cv_have___builtin_ffs" >&6; } + + if test yes = $ax_cv_have___builtin_ffs +then : + +printf "%s\n" "#define HAVE___BUILTIN_FFS 1" >>confdefs.h + +fi + $as_echo "#define _GNU_SOURCE 1" >>confdefs.h @@ -6726,16 +6766,25 @@ else fi done -for ac_func in prlimit -do : - ac_fn_c_check_func "$LINENO" "prlimit" "ac_cv_func_prlimit" -if test "x$ac_cv_func_prlimit" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PRLIMIT 1 -_ACEOF +ac_fn_c_check_func "$LINENO" "ffs" "ac_cv_func_ffs" +if test "x$ac_cv_func_ffs" = xyes +then : + printf "%s\n" "#define HAVE_FFS 1" >>confdefs.h fi -done +ac_fn_c_check_func "$LINENO" "prlimit" "ac_cv_func_prlimit" +if test "x$ac_cv_func_prlimit" = xyes +then : + printf "%s\n" "#define HAVE_PRLIMIT 1" >>confdefs.h + +fi +ac_fn_c_check_func "$LINENO" "versionsort" "ac_cv_func_versionsort" +if test "x$ac_cv_func_versionsort" = xyes +then : + printf "%s\n" "#define HAVE_VERSIONSORT 1" >>confdefs.h + +fi + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! |