1 # This file is generated from configure.ac by Autoconf. DO NOT EDIT!
2 # Local configure fragment for sysdeps/unix/sysv/linux/loongarch.
4 arch_minimum_kernel=5.19.0
6 libc_cv_loongarch_int_abi=no
9 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10 printf %s "checking for grep that handles long lines and -e... " >&6; }
11 if test ${ac_cv_path_GREP+y}
13 printf %s "(cached) " >&6
15 if test -z "$GREP"; then
16 ac_path_GREP_found=false
17 # Loop through the user's path and test for each of PROGNAME-LIST
18 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
27 for ac_prog in grep ggrep
29 for ac_exec_ext in '' $ac_executable_extensions; do
30 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
31 as_fn_executable_p "$ac_path_GREP" || continue
32 # Check for GNU ac_path_GREP and select it if it is found.
33 # Check for GNU $ac_path_GREP
34 case `"$ac_path_GREP" --version 2>&1` in
36 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
39 printf %s 0123456789 >"conftest.in"
42 cat "conftest.in" "conftest.in" >"conftest.tmp"
43 mv "conftest.tmp" "conftest.in"
44 cp "conftest.in" "conftest.nl"
45 printf "%s\n" 'GREP' >> "conftest.nl"
46 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
47 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
48 as_fn_arith $ac_count + 1 && ac_count=$as_val
49 if test $ac_count -gt ${ac_path_GREP_max-0}; then
50 # Best one so far, save it but keep looking for a better one
51 ac_cv_path_GREP="$ac_path_GREP"
52 ac_path_GREP_max=$ac_count
54 # 10*(2^10) chars as input seems more than enough
55 test $ac_count -gt 10 && break
57 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
60 $ac_path_GREP_found && break 3
65 if test -z "$ac_cv_path_GREP"; then
66 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
73 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
74 printf "%s\n" "$ac_cv_path_GREP" >&6; }
75 GREP="$ac_cv_path_GREP"
78 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
79 printf %s "checking for egrep... " >&6; }
80 if test ${ac_cv_path_EGREP+y}
82 printf %s "(cached) " >&6
84 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
85 then ac_cv_path_EGREP="$GREP -E"
87 if test -z "$EGREP"; then
88 ac_path_EGREP_found=false
89 # Loop through the user's path and test for each of PROGNAME-LIST
90 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
91 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
101 for ac_exec_ext in '' $ac_executable_extensions; do
102 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
103 as_fn_executable_p "$ac_path_EGREP" || continue
104 # Check for GNU ac_path_EGREP and select it if it is found.
105 # Check for GNU $ac_path_EGREP
106 case `"$ac_path_EGREP" --version 2>&1` in
108 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
111 printf %s 0123456789 >"conftest.in"
114 cat "conftest.in" "conftest.in" >"conftest.tmp"
115 mv "conftest.tmp" "conftest.in"
116 cp "conftest.in" "conftest.nl"
117 printf "%s\n" 'EGREP' >> "conftest.nl"
118 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
119 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
120 as_fn_arith $ac_count + 1 && ac_count=$as_val
121 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
122 # Best one so far, save it but keep looking for a better one
123 ac_cv_path_EGREP="$ac_path_EGREP"
124 ac_path_EGREP_max=$ac_count
126 # 10*(2^10) chars as input seems more than enough
127 test $ac_count -gt 10 && break
129 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
132 $ac_path_EGREP_found && break 3
137 if test -z "$ac_cv_path_EGREP"; then
138 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
141 ac_cv_path_EGREP=$EGREP
146 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
147 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
148 EGREP="$ac_cv_path_EGREP"
151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
152 /* end confdefs.h. */
153 __SIZEOF_INT__ __SIZEOF_LONG__ __SIZEOF_POINTER__
156 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
157 $EGREP "4 8 8" >/dev/null 2>&1
159 libc_cv_loongarch_int_abi=lp64
163 if test $libc_cv_loongarch_int_abi = no; then
164 as_fn_error $? "Unable to determine integer ABI" "$LINENO" 5
167 libc_cv_loongarch_float_abi=no
168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
169 /* end confdefs.h. */
170 #ifdef __loongarch_double_float
175 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
176 $EGREP "yes" >/dev/null 2>&1
178 libc_cv_loongarch_float_abi=d
182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
183 /* end confdefs.h. */
184 #ifdef __loongarch_soft_float
189 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
190 $EGREP "yes" >/dev/null 2>&1
192 libc_cv_loongarch_float_abi=s
196 if test "$libc_cv_loongarch_float_abi" = no; then
197 as_fn_error $? "Unable to determine floating-point ABI" "$LINENO" 5
200 config_vars="$config_vars
201 default-abi = $libc_cv_loongarch_int_abi$libc_cv_loongarch_float_abi"
203 case $libc_cv_loongarch_int_abi$libc_cv_loongarch_float_abi in
205 test -n "$libc_cv_slibdir" ||
208 libc_cv_slibdir='/lib64/sf'
209 libc_cv_rtlddir='/lib64'
210 if test "$libdir" = '${exec_prefix}/lib'; then
211 libdir='${exec_prefix}/lib64/sf';
212 # Locale data can be shared between 32-bit and 64-bit libraries.
213 libc_cv_complocaledir='${exec_prefix}/lib/locale'
219 test -n "$libc_cv_slibdir" ||
222 libc_cv_slibdir='/lib64'
223 libc_cv_rtlddir='/lib64'
224 if test "$libdir" = '${exec_prefix}/lib'; then
225 libdir='${exec_prefix}/lib64';
226 # Locale data can be shared between 32-bit and 64-bit libraries.
227 libc_cv_complocaledir='${exec_prefix}/lib/locale'
234 ldd_rewrite_script=sysdeps/unix/sysv/linux/loongarch/ldd-rewrite.sed