Refactor handling of /lib64 etc. cases, move out of sysdeps/gnu/configure.ac.
[glibc.git] / sysdeps / unix / sysv / linux / powerpc / powerpc64 / configure.ac
blobde04689536a7bad7d326307334acee17bdb0dbaf
1 GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
2 # Local configure fragment for sysdeps/unix/sysv/linux/powerpc/powerpc64/.
4 LIBC_SLIBDIR_RTLDDIR([lib64], [lib64])
6 # Define default-abi according to compiler flags.
7 AC_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)])
13 if test $libc_cv_ppc64_elfv2_abi = yes; then
14   LIBC_CONFIG_VAR([default-abi], [64-v2])
15 else
16   LIBC_CONFIG_VAR([default-abi], [64-v1])
17   # Compiler that do not support ELFv2 ABI does not define _CALL_ELF
18   AC_CACHE_CHECK([whether the compiler defines _CALL_ELF],
19     [libc_cv_ppc64_def_call_elf],
20     [AC_EGREP_CPP(yes,[#ifdef _CALL_ELF
21                          yes
22                        #endif
23     ], libc_cv_ppc64_def_call_elf=yes, libc_cv_ppc64_def_call_elf=no)])
24   if test $libc_cv_ppc64_def_call_elf = no; then
25     libc_extra_cppflags="$libc_extra_cppflags -D_CALL_ELF=1"
26   fi