elf: Ignore LD_LIBRARY_PATH and debug env var for setuid for static
[glibc.git] / sysdeps / sparc / sparc32 / configure
blobb6603ba2f91308cd65a1a4f0aa6ccb6d6f4f58ed
1 # This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
2  # Local configure fragment for sysdeps/sparc/sparc32
4 # Test if compiler targets at least sparcv8.
7 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
8 printf %s "checking for grep that handles long lines and -e... " >&6; }
9 if test ${ac_cv_path_GREP+y}
10 then :
11   printf %s "(cached) " >&6
12 else $as_nop
13   if test -z "$GREP"; then
14   ac_path_GREP_found=false
15   # Loop through the user's path and test for each of PROGNAME-LIST
16   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
19   IFS=$as_save_IFS
20   case $as_dir in #(((
21     '') as_dir=./ ;;
22     */) ;;
23     *) as_dir=$as_dir/ ;;
24   esac
25     for ac_prog in grep ggrep
26    do
27     for ac_exec_ext in '' $ac_executable_extensions; do
28       ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
29       as_fn_executable_p "$ac_path_GREP" || continue
30 # Check for GNU ac_path_GREP and select it if it is found.
31   # Check for GNU $ac_path_GREP
32 case `"$ac_path_GREP" --version 2>&1` in
33 *GNU*)
34   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
36   ac_count=0
37   printf %s 0123456789 >"conftest.in"
38   while :
39   do
40     cat "conftest.in" "conftest.in" >"conftest.tmp"
41     mv "conftest.tmp" "conftest.in"
42     cp "conftest.in" "conftest.nl"
43     printf "%s\n" 'GREP' >> "conftest.nl"
44     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
45     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
46     as_fn_arith $ac_count + 1 && ac_count=$as_val
47     if test $ac_count -gt ${ac_path_GREP_max-0}; then
48       # Best one so far, save it but keep looking for a better one
49       ac_cv_path_GREP="$ac_path_GREP"
50       ac_path_GREP_max=$ac_count
51     fi
52     # 10*(2^10) chars as input seems more than enough
53     test $ac_count -gt 10 && break
54   done
55   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
56 esac
58       $ac_path_GREP_found && break 3
59     done
60   done
61   done
62 IFS=$as_save_IFS
63   if test -z "$ac_cv_path_GREP"; then
64     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
65   fi
66 else
67   ac_cv_path_GREP=$GREP
71 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
72 printf "%s\n" "$ac_cv_path_GREP" >&6; }
73  GREP="$ac_cv_path_GREP"
76 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
77 printf %s "checking for egrep... " >&6; }
78 if test ${ac_cv_path_EGREP+y}
79 then :
80   printf %s "(cached) " >&6
81 else $as_nop
82   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
83    then ac_cv_path_EGREP="$GREP -E"
84    else
85      if test -z "$EGREP"; then
86   ac_path_EGREP_found=false
87   # Loop through the user's path and test for each of PROGNAME-LIST
88   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
89 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
91   IFS=$as_save_IFS
92   case $as_dir in #(((
93     '') as_dir=./ ;;
94     */) ;;
95     *) as_dir=$as_dir/ ;;
96   esac
97     for ac_prog in egrep
98    do
99     for ac_exec_ext in '' $ac_executable_extensions; do
100       ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
101       as_fn_executable_p "$ac_path_EGREP" || continue
102 # Check for GNU ac_path_EGREP and select it if it is found.
103   # Check for GNU $ac_path_EGREP
104 case `"$ac_path_EGREP" --version 2>&1` in
105 *GNU*)
106   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
108   ac_count=0
109   printf %s 0123456789 >"conftest.in"
110   while :
111   do
112     cat "conftest.in" "conftest.in" >"conftest.tmp"
113     mv "conftest.tmp" "conftest.in"
114     cp "conftest.in" "conftest.nl"
115     printf "%s\n" 'EGREP' >> "conftest.nl"
116     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
117     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
118     as_fn_arith $ac_count + 1 && ac_count=$as_val
119     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
120       # Best one so far, save it but keep looking for a better one
121       ac_cv_path_EGREP="$ac_path_EGREP"
122       ac_path_EGREP_max=$ac_count
123     fi
124     # 10*(2^10) chars as input seems more than enough
125     test $ac_count -gt 10 && break
126   done
127   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
128 esac
130       $ac_path_EGREP_found && break 3
131     done
132   done
133   done
134 IFS=$as_save_IFS
135   if test -z "$ac_cv_path_EGREP"; then
136     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
137   fi
138 else
139   ac_cv_path_EGREP=$EGREP
142    fi
144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
145 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
146  EGREP="$ac_cv_path_EGREP"
149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for at least sparcv8 support" >&5
150 printf %s "checking for at least sparcv8 support... " >&6; }
151 if test ${libc_cv_sparcv8+y}
152 then :
153   printf %s "(cached) " >&6
154 else $as_nop
155   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
156 /* end confdefs.h.  */
157 #if defined (__sparc_v8__) || defined (__sparc_v9__)
158                       yes
159                      #endif
161 _ACEOF
162 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
163   $EGREP "yes" >/dev/null 2>&1
164 then :
165   libc_cv_sparcv8=yes
166 else $as_nop
167   libc_cv_sparcv8=no
169 rm -rf conftest*
172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_sparcv8" >&5
173 printf "%s\n" "$libc_cv_sparcv8" >&6; }
174 if test $libc_cv_sparcv8 = no; then
175   as_fn_error $? "no support for pre-v8 sparc" "$LINENO" 5
178 # Test if compiler generates external calls to libatomic for CAS operation.
179 # It is suffice to check for int only and the test is similar of C11
180 # atomic_compare_exchange_strong using GCC builtins.
181 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for external libatomic calls" >&5
182 printf %s "checking for external libatomic calls... " >&6; }
183 if test ${libc_cv_cas_uses_libatomic+y}
184 then :
185   printf %s "(cached) " >&6
186 else $as_nop
187   cat > conftest.c <<EOF
188                _Bool foo (int *ptr, int *expected, int desired)
189                {
190                  return __atomic_compare_exchange_n (ptr, expected, desired, 0,
191                                                      __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
192                }
194                libc_cv_cas_uses_libatomic=no
195                if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5'
196   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
197   (eval $ac_try) 2>&5
198   ac_status=$?
199   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
200   test $ac_status = 0; }; }; then
201                  if grep '__atomic_compare_exchange_4' conftest.s >/dev/null; then
202                    libc_cv_cas_uses_libatomic=yes
203                  fi
204                fi
205                rm -f conftest.c conftest.s
208 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cas_uses_libatomic" >&5
209 printf "%s\n" "$libc_cv_cas_uses_libatomic" >&6; }
210 if test $libc_cv_cas_uses_libatomic = yes; then
211   as_fn_error $? "external dependency of libatomic is not supported" "$LINENO" 5