1GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
2# Local configure fragment for sysdeps/unix/sysv/linux/powerpc/powerpc64/.
3
4LIBC_SLIBDIR_RTLDDIR([lib64], [lib64])
5
6# Define default-abi according to compiler flags.
7AC_CACHE_CHECK([whether the compiler is using the PowerPC64 ELFv2 ABI],
8  [libc_cv_ppc64_elfv2_abi],
9  [AC_EGREP_CPP(yes,[#if _CALL_ELF == 2
10                      yes
11                     #endif
12  ], libc_cv_ppc64_elfv2_abi=yes, libc_cv_ppc64_elfv2_abi=no)])
13if test $libc_cv_ppc64_elfv2_abi = yes; then
14  LIBC_CONFIG_VAR([default-abi], [64-v2])
15  # For shlib-versions.
16  AC_DEFINE(HAVE_ELFV2_ABI)
17else
18  LIBC_CONFIG_VAR([default-abi], [64-v1])
19  # Compiler that do not support ELFv2 ABI does not define _CALL_ELF
20  AC_CACHE_CHECK([whether the compiler defines _CALL_ELF],
21    [libc_cv_ppc64_def_call_elf],
22    [AC_EGREP_CPP(yes,[#ifdef _CALL_ELF
23                         yes
24                       #endif
25    ], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)])
26  if test $libc_cv_ppc64_def_call_elf = no; then
27    libc_extra_cppflags="$libc_extra_cppflags -D_CALL_ELF=1"
28  fi
29fi
30# Set minimum kernel version for ppc64le.
31AC_CACHE_CHECK([the machine type to set minimum kernel version],
32  [libc_cv_ppc64_le],
33  [AC_EGREP_CPP(yes,[#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
34                      yes
35                     #endif
36  ], arch_minimum_kernel=3.10.0, libc_cv_ppc64_le=no)])
37