Implement C23 <stdbit.h>
[glibc.git] / sysdeps / unix / sysv / linux / powerpc / powerpc64 / configure
blobcf1b70c745fda3d0590991f16a7fe259597bec82
1 # This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
2  # Local configure fragment for sysdeps/unix/sysv/linux/powerpc/powerpc64/.
4 test -n "$libc_cv_slibdir" ||
5 case "$prefix" in
6 /usr | /usr/)
7   libc_cv_slibdir='/lib64'
8   libc_cv_rtlddir='/lib64'
9   if test "$libdir" = '${exec_prefix}/lib'; then
10     libdir='${exec_prefix}/lib64';
11     # Locale data can be shared between 32-bit and 64-bit libraries.
12     libc_cv_complocaledir='${exec_prefix}/lib/locale'
13   fi
14   ;;
15 esac
17 # Define default-abi according to compiler flags.
20 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
21 printf %s "checking for grep that handles long lines and -e... " >&6; }
22 if test ${ac_cv_path_GREP+y}
23 then :
24   printf %s "(cached) " >&6
25 else $as_nop
26   if test -z "$GREP"; then
27   ac_path_GREP_found=false
28   # Loop through the user's path and test for each of PROGNAME-LIST
29   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
32   IFS=$as_save_IFS
33   case $as_dir in #(((
34     '') as_dir=./ ;;
35     */) ;;
36     *) as_dir=$as_dir/ ;;
37   esac
38     for ac_prog in grep ggrep
39    do
40     for ac_exec_ext in '' $ac_executable_extensions; do
41       ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
42       as_fn_executable_p "$ac_path_GREP" || continue
43 # Check for GNU ac_path_GREP and select it if it is found.
44   # Check for GNU $ac_path_GREP
45 case `"$ac_path_GREP" --version 2>&1` in
46 *GNU*)
47   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
49   ac_count=0
50   printf %s 0123456789 >"conftest.in"
51   while :
52   do
53     cat "conftest.in" "conftest.in" >"conftest.tmp"
54     mv "conftest.tmp" "conftest.in"
55     cp "conftest.in" "conftest.nl"
56     printf "%s\n" 'GREP' >> "conftest.nl"
57     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
58     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
59     as_fn_arith $ac_count + 1 && ac_count=$as_val
60     if test $ac_count -gt ${ac_path_GREP_max-0}; then
61       # Best one so far, save it but keep looking for a better one
62       ac_cv_path_GREP="$ac_path_GREP"
63       ac_path_GREP_max=$ac_count
64     fi
65     # 10*(2^10) chars as input seems more than enough
66     test $ac_count -gt 10 && break
67   done
68   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
69 esac
71       $ac_path_GREP_found && break 3
72     done
73   done
74   done
75 IFS=$as_save_IFS
76   if test -z "$ac_cv_path_GREP"; then
77     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
78   fi
79 else
80   ac_cv_path_GREP=$GREP
84 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
85 printf "%s\n" "$ac_cv_path_GREP" >&6; }
86  GREP="$ac_cv_path_GREP"
89 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
90 printf %s "checking for egrep... " >&6; }
91 if test ${ac_cv_path_EGREP+y}
92 then :
93   printf %s "(cached) " >&6
94 else $as_nop
95   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
96    then ac_cv_path_EGREP="$GREP -E"
97    else
98      if test -z "$EGREP"; then
99   ac_path_EGREP_found=false
100   # Loop through the user's path and test for each of PROGNAME-LIST
101   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
104   IFS=$as_save_IFS
105   case $as_dir in #(((
106     '') as_dir=./ ;;
107     */) ;;
108     *) as_dir=$as_dir/ ;;
109   esac
110     for ac_prog in egrep
111    do
112     for ac_exec_ext in '' $ac_executable_extensions; do
113       ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
114       as_fn_executable_p "$ac_path_EGREP" || continue
115 # Check for GNU ac_path_EGREP and select it if it is found.
116   # Check for GNU $ac_path_EGREP
117 case `"$ac_path_EGREP" --version 2>&1` in
118 *GNU*)
119   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
121   ac_count=0
122   printf %s 0123456789 >"conftest.in"
123   while :
124   do
125     cat "conftest.in" "conftest.in" >"conftest.tmp"
126     mv "conftest.tmp" "conftest.in"
127     cp "conftest.in" "conftest.nl"
128     printf "%s\n" 'EGREP' >> "conftest.nl"
129     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
130     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
131     as_fn_arith $ac_count + 1 && ac_count=$as_val
132     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
133       # Best one so far, save it but keep looking for a better one
134       ac_cv_path_EGREP="$ac_path_EGREP"
135       ac_path_EGREP_max=$ac_count
136     fi
137     # 10*(2^10) chars as input seems more than enough
138     test $ac_count -gt 10 && break
139   done
140   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
141 esac
143       $ac_path_EGREP_found && break 3
144     done
145   done
146   done
147 IFS=$as_save_IFS
148   if test -z "$ac_cv_path_EGREP"; then
149     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
150   fi
151 else
152   ac_cv_path_EGREP=$EGREP
155    fi
157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
158 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
159  EGREP="$ac_cv_path_EGREP"
162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler is using the PowerPC64 ELFv2 ABI" >&5
163 printf %s "checking whether the compiler is using the PowerPC64 ELFv2 ABI... " >&6; }
164 if test ${libc_cv_ppc64_elfv2_abi+y}
165 then :
166   printf %s "(cached) " >&6
167 else $as_nop
168   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
169 /* end confdefs.h.  */
170 #if _CALL_ELF == 2
171                       yes
172                      #endif
174 _ACEOF
175 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
176   $EGREP "yes" >/dev/null 2>&1
177 then :
178   libc_cv_ppc64_elfv2_abi=yes
179 else $as_nop
180   libc_cv_ppc64_elfv2_abi=no
182 rm -rf conftest*
185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ppc64_elfv2_abi" >&5
186 printf "%s\n" "$libc_cv_ppc64_elfv2_abi" >&6; }
187 if test $libc_cv_ppc64_elfv2_abi = yes; then
188   config_vars="$config_vars
189 default-abi = 64-v2"
190   # For shlib-versions.
191   printf "%s\n" "#define HAVE_ELFV2_ABI 1" >>confdefs.h
193 else
194   config_vars="$config_vars
195 default-abi = 64-v1"
196   # Compiler that do not support ELFv2 ABI does not define _CALL_ELF
197   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler defines _CALL_ELF" >&5
198 printf %s "checking whether the compiler defines _CALL_ELF... " >&6; }
199 if test ${libc_cv_ppc64_def_call_elf+y}
200 then :
201   printf %s "(cached) " >&6
202 else $as_nop
203   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
204 /* end confdefs.h.  */
205 #ifdef _CALL_ELF
206                          yes
207                        #endif
209 _ACEOF
210 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
211   $EGREP "yes" >/dev/null 2>&1
212 then :
213   libc_cv_ppc64_def_call_elf=yes
214 else $as_nop
215   libc_cv_ppc64_def_call_elf=no
217 rm -rf conftest*
220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ppc64_def_call_elf" >&5
221 printf "%s\n" "$libc_cv_ppc64_def_call_elf" >&6; }
222   if test $libc_cv_ppc64_def_call_elf = no; then
223     libc_extra_cppflags="$libc_extra_cppflags -D_CALL_ELF=1"
224   fi
226 # Set minimum kernel version for ppc64le.
227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the machine type to set minimum kernel version" >&5
228 printf %s "checking the machine type to set minimum kernel version... " >&6; }
229 if test ${libc_cv_ppc64_le+y}
230 then :
231   printf %s "(cached) " >&6
232 else $as_nop
233   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
234 /* end confdefs.h.  */
235 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
236                       yes
237                      #endif
239 _ACEOF
240 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
241   $EGREP "yes" >/dev/null 2>&1
242 then :
243   arch_minimum_kernel=3.10.0
244 else $as_nop
245   libc_cv_ppc64_le=no
247 rm -rf conftest*
250 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ppc64_le" >&5
251 printf "%s\n" "$libc_cv_ppc64_le" >&6; }