Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 1 | #! /bin/sh |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2 | # Guess values for system-dependent variables and create Makefiles. |
Łukasz Langa | 9ab2fb1 | 2019-06-04 22:12:32 +0200 | [diff] [blame] | 3 | # Generated by GNU Autoconf 2.69 for python 3.9. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4 | # |
Benjamin Peterson | c2fcbf4 | 2016-08-03 22:01:32 -0700 | [diff] [blame] | 5 | # Report bugs to <https://bugs.python.org/>. |
Martin v. Löwis | 1d45906 | 2005-03-14 21:23:33 +0000 | [diff] [blame] | 6 | # |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7 | # |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 8 | # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9 | # |
| 10 | # |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 11 | # This configure script is free software; the Free Software Foundation |
| 12 | # gives unlimited permission to copy, distribute and modify it. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13 | ## -------------------- ## |
| 14 | ## M4sh Initialization. ## |
| 15 | ## -------------------- ## |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17 | # Be more Bourne compatible |
| 18 | DUALCASE=1; export DUALCASE # for MKS sh |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 19 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 20 | emulate sh |
| 21 | NULLCMD=: |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 22 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 23 | # is contrary to our usage. Disable this feature. |
| 24 | alias -g '${1+"$@"}'='"$@"' |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 25 | setopt NO_GLOB_SUBST |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 26 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 27 | case `(set -o) 2>/dev/null` in #( |
| 28 | *posix*) : |
| 29 | set -o posix ;; #( |
| 30 | *) : |
| 31 | ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 32 | esac |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 33 | fi |
Thomas Wouters | 89f507f | 2006-12-13 04:49:30 +0000 | [diff] [blame] | 34 | |
| 35 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 36 | as_nl=' |
| 37 | ' |
| 38 | export as_nl |
| 39 | # Printing a long string crashes Solaris 7 /usr/bin/printf. |
| 40 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' |
| 41 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo |
| 42 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo |
| 43 | # Prefer a ksh shell builtin over an external printf program on Solaris, |
| 44 | # but without wasting forks for bash or zsh. |
| 45 | if test -z "$BASH_VERSION$ZSH_VERSION" \ |
| 46 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then |
| 47 | as_echo='print -r --' |
| 48 | as_echo_n='print -rn --' |
| 49 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then |
| 50 | as_echo='printf %s\n' |
| 51 | as_echo_n='printf %s' |
| 52 | else |
| 53 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then |
| 54 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' |
| 55 | as_echo_n='/usr/ucb/echo -n' |
| 56 | else |
| 57 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' |
| 58 | as_echo_n_body='eval |
| 59 | arg=$1; |
| 60 | case $arg in #( |
| 61 | *"$as_nl"*) |
| 62 | expr "X$arg" : "X\\(.*\\)$as_nl"; |
| 63 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; |
| 64 | esac; |
| 65 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" |
| 66 | ' |
| 67 | export as_echo_n_body |
| 68 | as_echo_n='sh -c $as_echo_n_body as_echo' |
| 69 | fi |
| 70 | export as_echo_body |
| 71 | as_echo='sh -c $as_echo_body as_echo' |
| 72 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 73 | |
| 74 | # The user is always right. |
| 75 | if test "${PATH_SEPARATOR+set}" != set; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 76 | PATH_SEPARATOR=: |
| 77 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { |
| 78 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || |
| 79 | PATH_SEPARATOR=';' |
| 80 | } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 81 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 82 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 83 | |
| 84 | # IFS |
| 85 | # We need space, tab and new line, in precisely that order. Quoting is |
| 86 | # there to prevent editors from complaining about space-tab. |
| 87 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word |
| 88 | # splitting by setting IFS to empty value.) |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 89 | IFS=" "" $as_nl" |
| 90 | |
| 91 | # Find who we are. Look in the path if we contain no directory separator. |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 92 | as_myself= |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 93 | case $0 in #(( |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 94 | *[\\/]* ) as_myself=$0 ;; |
| 95 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 96 | for as_dir in $PATH |
| 97 | do |
| 98 | IFS=$as_save_IFS |
| 99 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 100 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break |
| 101 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 102 | IFS=$as_save_IFS |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 103 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 104 | ;; |
| 105 | esac |
| 106 | # We did not find ourselves, most probably we were run as `sh COMMAND' |
| 107 | # in which case we are not to be found in the path. |
| 108 | if test "x$as_myself" = x; then |
| 109 | as_myself=$0 |
| 110 | fi |
| 111 | if test ! -f "$as_myself"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 112 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 |
| 113 | exit 1 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 114 | fi |
| 115 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 116 | # Unset variables that we do not need and which cause bugs (e.g. in |
| 117 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" |
| 118 | # suppresses any "Segmentation fault" message there. '((' could |
| 119 | # trigger a bug in pdksh 5.2.14. |
| 120 | for as_var in BASH_ENV ENV MAIL MAILPATH |
| 121 | do eval test x\${$as_var+set} = xset \ |
| 122 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 123 | done |
| 124 | PS1='$ ' |
| 125 | PS2='> ' |
| 126 | PS4='+ ' |
| 127 | |
| 128 | # NLS nuisances. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 129 | LC_ALL=C |
| 130 | export LC_ALL |
| 131 | LANGUAGE=C |
| 132 | export LANGUAGE |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 133 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 134 | # CDPATH. |
| 135 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH |
| 136 | |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 137 | # Use a proper internal environment variable to ensure we don't fall |
| 138 | # into an infinite loop, continuously re-executing ourselves. |
| 139 | if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then |
| 140 | _as_can_reexec=no; export _as_can_reexec; |
| 141 | # We cannot yet assume a decent shell, so we have to provide a |
| 142 | # neutralization value for shells without unset; and this also |
| 143 | # works around shells that cannot unset nonexistent variables. |
| 144 | # Preserve -v and -x to the replacement shell. |
| 145 | BASH_ENV=/dev/null |
| 146 | ENV=/dev/null |
| 147 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV |
| 148 | case $- in # (((( |
| 149 | *v*x* | *x*v* ) as_opts=-vx ;; |
| 150 | *v* ) as_opts=-v ;; |
| 151 | *x* ) as_opts=-x ;; |
| 152 | * ) as_opts= ;; |
| 153 | esac |
| 154 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} |
| 155 | # Admittedly, this is quite paranoid, since all the known shells bail |
| 156 | # out after a failed `exec'. |
| 157 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 |
| 158 | as_fn_exit 255 |
| 159 | fi |
| 160 | # We don't want this to propagate to other subprocesses. |
| 161 | { _as_can_reexec=; unset _as_can_reexec;} |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 162 | if test "x$CONFIG_SHELL" = x; then |
| 163 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : |
| 164 | emulate sh |
| 165 | NULLCMD=: |
| 166 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which |
| 167 | # is contrary to our usage. Disable this feature. |
| 168 | alias -g '\${1+\"\$@\"}'='\"\$@\"' |
| 169 | setopt NO_GLOB_SUBST |
| 170 | else |
| 171 | case \`(set -o) 2>/dev/null\` in #( |
| 172 | *posix*) : |
| 173 | set -o posix ;; #( |
| 174 | *) : |
| 175 | ;; |
| 176 | esac |
| 177 | fi |
| 178 | " |
| 179 | as_required="as_fn_return () { (exit \$1); } |
| 180 | as_fn_success () { as_fn_return 0; } |
| 181 | as_fn_failure () { as_fn_return 1; } |
| 182 | as_fn_ret_success () { return 0; } |
| 183 | as_fn_ret_failure () { return 1; } |
| 184 | |
| 185 | exitcode=0 |
| 186 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } |
| 187 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } |
| 188 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } |
| 189 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } |
| 190 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : |
| 191 | |
| 192 | else |
| 193 | exitcode=1; echo positional parameters were not saved. |
| 194 | fi |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 195 | test x\$exitcode = x0 || exit 1 |
| 196 | test -x / || exit 1" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 197 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO |
| 198 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO |
| 199 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && |
| 200 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 |
| 201 | test \$(( 1 + 1 )) = 2 || exit 1" |
| 202 | if (eval "$as_required") 2>/dev/null; then : |
| 203 | as_have_required=yes |
| 204 | else |
| 205 | as_have_required=no |
| 206 | fi |
| 207 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : |
| 208 | |
| 209 | else |
| 210 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 211 | as_found=false |
| 212 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH |
| 213 | do |
| 214 | IFS=$as_save_IFS |
| 215 | test -z "$as_dir" && as_dir=. |
| 216 | as_found=: |
| 217 | case $as_dir in #( |
| 218 | /*) |
| 219 | for as_base in sh bash ksh sh5; do |
| 220 | # Try only shells that exist, to save several forks. |
| 221 | as_shell=$as_dir/$as_base |
| 222 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && |
| 223 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : |
| 224 | CONFIG_SHELL=$as_shell as_have_required=yes |
| 225 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : |
| 226 | break 2 |
| 227 | fi |
| 228 | fi |
| 229 | done;; |
| 230 | esac |
| 231 | as_found=false |
| 232 | done |
| 233 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && |
| 234 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : |
| 235 | CONFIG_SHELL=$SHELL as_have_required=yes |
| 236 | fi; } |
| 237 | IFS=$as_save_IFS |
| 238 | |
| 239 | |
| 240 | if test "x$CONFIG_SHELL" != x; then : |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 241 | export CONFIG_SHELL |
| 242 | # We cannot yet assume a decent shell, so we have to provide a |
| 243 | # neutralization value for shells without unset; and this also |
| 244 | # works around shells that cannot unset nonexistent variables. |
| 245 | # Preserve -v and -x to the replacement shell. |
| 246 | BASH_ENV=/dev/null |
| 247 | ENV=/dev/null |
| 248 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV |
| 249 | case $- in # (((( |
| 250 | *v*x* | *x*v* ) as_opts=-vx ;; |
| 251 | *v* ) as_opts=-v ;; |
| 252 | *x* ) as_opts=-x ;; |
| 253 | * ) as_opts= ;; |
| 254 | esac |
| 255 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} |
| 256 | # Admittedly, this is quite paranoid, since all the known shells bail |
| 257 | # out after a failed `exec'. |
| 258 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 |
| 259 | exit 255 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 260 | fi |
| 261 | |
| 262 | if test x$as_have_required = xno; then : |
| 263 | $as_echo "$0: This script requires a shell more modern than all" |
| 264 | $as_echo "$0: the shells that I found on your system." |
| 265 | if test x${ZSH_VERSION+set} = xset ; then |
| 266 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" |
| 267 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." |
| 268 | else |
| 269 | $as_echo "$0: Please tell bug-autoconf@gnu.org and |
Benjamin Peterson | c2fcbf4 | 2016-08-03 22:01:32 -0700 | [diff] [blame] | 270 | $0: https://bugs.python.org/ about your system, including |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 271 | $0: any error possibly output before this message. Then |
| 272 | $0: install a modern shell, or manually run the script |
| 273 | $0: under such a shell if you do have one." |
| 274 | fi |
| 275 | exit 1 |
| 276 | fi |
| 277 | fi |
| 278 | fi |
| 279 | SHELL=${CONFIG_SHELL-/bin/sh} |
| 280 | export SHELL |
| 281 | # Unset more variables known to interfere with behavior of common tools. |
| 282 | CLICOLOR_FORCE= GREP_OPTIONS= |
| 283 | unset CLICOLOR_FORCE GREP_OPTIONS |
| 284 | |
| 285 | ## --------------------- ## |
| 286 | ## M4sh Shell Functions. ## |
| 287 | ## --------------------- ## |
| 288 | # as_fn_unset VAR |
| 289 | # --------------- |
| 290 | # Portably unset VAR. |
| 291 | as_fn_unset () |
| 292 | { |
| 293 | { eval $1=; unset $1;} |
| 294 | } |
| 295 | as_unset=as_fn_unset |
| 296 | |
| 297 | # as_fn_set_status STATUS |
| 298 | # ----------------------- |
| 299 | # Set $? to STATUS, without forking. |
| 300 | as_fn_set_status () |
| 301 | { |
| 302 | return $1 |
| 303 | } # as_fn_set_status |
| 304 | |
| 305 | # as_fn_exit STATUS |
| 306 | # ----------------- |
| 307 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. |
| 308 | as_fn_exit () |
| 309 | { |
| 310 | set +e |
| 311 | as_fn_set_status $1 |
| 312 | exit $1 |
| 313 | } # as_fn_exit |
| 314 | |
| 315 | # as_fn_mkdir_p |
| 316 | # ------------- |
| 317 | # Create "$as_dir" as a directory, including parents if necessary. |
| 318 | as_fn_mkdir_p () |
| 319 | { |
| 320 | |
| 321 | case $as_dir in #( |
| 322 | -*) as_dir=./$as_dir;; |
| 323 | esac |
| 324 | test -d "$as_dir" || eval $as_mkdir_p || { |
| 325 | as_dirs= |
| 326 | while :; do |
| 327 | case $as_dir in #( |
| 328 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( |
| 329 | *) as_qdir=$as_dir;; |
| 330 | esac |
| 331 | as_dirs="'$as_qdir' $as_dirs" |
| 332 | as_dir=`$as_dirname -- "$as_dir" || |
| 333 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
| 334 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
| 335 | X"$as_dir" : 'X\(//\)$' \| \ |
| 336 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || |
| 337 | $as_echo X"$as_dir" | |
| 338 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
| 339 | s//\1/ |
| 340 | q |
| 341 | } |
| 342 | /^X\(\/\/\)[^/].*/{ |
| 343 | s//\1/ |
| 344 | q |
| 345 | } |
| 346 | /^X\(\/\/\)$/{ |
| 347 | s//\1/ |
| 348 | q |
| 349 | } |
| 350 | /^X\(\/\).*/{ |
| 351 | s//\1/ |
| 352 | q |
| 353 | } |
| 354 | s/.*/./; q'` |
| 355 | test -d "$as_dir" && break |
| 356 | done |
| 357 | test -z "$as_dirs" || eval "mkdir $as_dirs" |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 358 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 359 | |
| 360 | |
| 361 | } # as_fn_mkdir_p |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 362 | |
| 363 | # as_fn_executable_p FILE |
| 364 | # ----------------------- |
| 365 | # Test if FILE is an executable regular file. |
| 366 | as_fn_executable_p () |
| 367 | { |
| 368 | test -f "$1" && test -x "$1" |
| 369 | } # as_fn_executable_p |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 370 | # as_fn_append VAR VALUE |
| 371 | # ---------------------- |
| 372 | # Append the text in VALUE to the end of the definition contained in VAR. Take |
| 373 | # advantage of any shell optimizations that allow amortized linear growth over |
| 374 | # repeated appends, instead of the typical quadratic growth present in naive |
| 375 | # implementations. |
| 376 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : |
| 377 | eval 'as_fn_append () |
| 378 | { |
| 379 | eval $1+=\$2 |
| 380 | }' |
| 381 | else |
| 382 | as_fn_append () |
| 383 | { |
| 384 | eval $1=\$$1\$2 |
| 385 | } |
| 386 | fi # as_fn_append |
| 387 | |
| 388 | # as_fn_arith ARG... |
| 389 | # ------------------ |
| 390 | # Perform arithmetic evaluation on the ARGs, and store the result in the |
| 391 | # global $as_val. Take advantage of shells that can avoid forks. The arguments |
| 392 | # must be portable across $(()) and expr. |
| 393 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : |
| 394 | eval 'as_fn_arith () |
| 395 | { |
| 396 | as_val=$(( $* )) |
| 397 | }' |
| 398 | else |
| 399 | as_fn_arith () |
| 400 | { |
| 401 | as_val=`expr "$@" || test $? -eq 1` |
| 402 | } |
| 403 | fi # as_fn_arith |
| 404 | |
| 405 | |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 406 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
| 407 | # ---------------------------------------- |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 408 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
| 409 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 410 | # script with STATUS, using 1 if that was 0. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 411 | as_fn_error () |
| 412 | { |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 413 | as_status=$1; test $as_status -eq 0 && as_status=1 |
| 414 | if test "$4"; then |
| 415 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 416 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 417 | fi |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 418 | $as_echo "$as_me: error: $2" >&2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 419 | as_fn_exit $as_status |
| 420 | } # as_fn_error |
| 421 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 422 | if expr a : '\(a\)' >/dev/null 2>&1 && |
| 423 | test "X`expr 00001 : '.*\(...\)'`" = X001; then |
| 424 | as_expr=expr |
| 425 | else |
| 426 | as_expr=false |
| 427 | fi |
| 428 | |
| 429 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
| 430 | as_basename=basename |
| 431 | else |
| 432 | as_basename=false |
| 433 | fi |
| 434 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 435 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
| 436 | as_dirname=dirname |
| 437 | else |
| 438 | as_dirname=false |
| 439 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 440 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 441 | as_me=`$as_basename -- "$0" || |
| 442 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
| 443 | X"$0" : 'X\(//\)$' \| \ |
| 444 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 445 | $as_echo X/"$0" | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 446 | sed '/^.*\/\([^/][^/]*\)\/*$/{ |
| 447 | s//\1/ |
| 448 | q |
| 449 | } |
| 450 | /^X\/\(\/\/\)$/{ |
| 451 | s//\1/ |
| 452 | q |
| 453 | } |
| 454 | /^X\/\(\/\).*/{ |
| 455 | s//\1/ |
| 456 | q |
| 457 | } |
| 458 | s/.*/./; q'` |
| 459 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 460 | # Avoid depending upon Character Ranges. |
| 461 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' |
| 462 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' |
| 463 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS |
| 464 | as_cr_digits='0123456789' |
| 465 | as_cr_alnum=$as_cr_Letters$as_cr_digits |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 466 | |
| 467 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 468 | as_lineno_1=$LINENO as_lineno_1a=$LINENO |
| 469 | as_lineno_2=$LINENO as_lineno_2a=$LINENO |
| 470 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && |
| 471 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { |
| 472 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 473 | sed -n ' |
| 474 | p |
| 475 | /[$]LINENO/= |
| 476 | ' <$as_myself | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 477 | sed ' |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 478 | s/[$]LINENO.*/&-/ |
| 479 | t lineno |
| 480 | b |
| 481 | :lineno |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 482 | N |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 483 | :loop |
| 484 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 485 | t loop |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 486 | s/-\n.*// |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 487 | ' >$as_me.lineno && |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 488 | chmod +x "$as_me.lineno" || |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 489 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 490 | |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 491 | # If we had to re-execute with $CONFIG_SHELL, we're ensured to have |
| 492 | # already done that, so ensure we don't try to do so again and fall |
| 493 | # in an infinite loop. This has already happened in practice. |
| 494 | _as_can_reexec=no; export _as_can_reexec |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 495 | # Don't try to exec as it changes $[0], causing all sort of problems |
| 496 | # (the dirname of $[0] is not the place where we might find the |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 497 | # original and so on. Autoconf is especially sensitive to this). |
| 498 | . "./$as_me.lineno" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 499 | # Exit status is that of the last command. |
| 500 | exit |
| 501 | } |
| 502 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 503 | ECHO_C= ECHO_N= ECHO_T= |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 504 | case `echo -n x` in #((((( |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 505 | -n*) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 506 | case `echo 'xy\c'` in |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 507 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 508 | xy) ECHO_C='\c';; |
| 509 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null |
| 510 | ECHO_T=' ';; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 511 | esac;; |
| 512 | *) |
| 513 | ECHO_N='-n';; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 514 | esac |
Ronald Oussoren | 74f29b4 | 2009-09-20 20:09:26 +0000 | [diff] [blame] | 515 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 516 | rm -f conf$$ conf$$.exe conf$$.file |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 517 | if test -d conf$$.dir; then |
| 518 | rm -f conf$$.dir/conf$$.file |
| 519 | else |
| 520 | rm -f conf$$.dir |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 521 | mkdir conf$$.dir 2>/dev/null |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 522 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 523 | if (echo >conf$$.file) 2>/dev/null; then |
| 524 | if ln -s conf$$.file conf$$ 2>/dev/null; then |
| 525 | as_ln_s='ln -s' |
| 526 | # ... but there are two gotchas: |
| 527 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. |
| 528 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 529 | # In both cases, we have to default to `cp -pR'. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 530 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 531 | as_ln_s='cp -pR' |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 532 | elif ln conf$$.file conf$$ 2>/dev/null; then |
| 533 | as_ln_s=ln |
| 534 | else |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 535 | as_ln_s='cp -pR' |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 536 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 537 | else |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 538 | as_ln_s='cp -pR' |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 539 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 540 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
| 541 | rmdir conf$$.dir 2>/dev/null |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 542 | |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 543 | if mkdir -p . 2>/dev/null; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 544 | as_mkdir_p='mkdir -p "$as_dir"' |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 545 | else |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 546 | test -d ./-p && rmdir ./-p |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 547 | as_mkdir_p=false |
| 548 | fi |
| 549 | |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 550 | as_test_x='test -x' |
| 551 | as_executable_p=as_fn_executable_p |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 552 | |
| 553 | # Sed expression to map a string onto a valid CPP name. |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 554 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 555 | |
| 556 | # Sed expression to map a string onto a valid variable name. |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 557 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 558 | |
| 559 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 560 | test -n "$DJDIR" || exec 7<&0 </dev/null |
| 561 | exec 6>&1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 562 | |
| 563 | # Name of the host. |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 564 | # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 565 | # so uname gets run too. |
| 566 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` |
| 567 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 568 | # |
| 569 | # Initializations. |
| 570 | # |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 571 | ac_default_prefix=/usr/local |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 572 | ac_clean_files= |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 573 | ac_config_libobj_dir=. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 574 | LIBOBJS= |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 575 | cross_compiling=no |
| 576 | subdirs= |
| 577 | MFLAGS= |
| 578 | MAKEFLAGS= |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 579 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 580 | # Identity of this package. |
Martin v. Löwis | 88afe66 | 2002-10-26 13:47:44 +0000 | [diff] [blame] | 581 | PACKAGE_NAME='python' |
| 582 | PACKAGE_TARNAME='python' |
Łukasz Langa | 9ab2fb1 | 2019-06-04 22:12:32 +0200 | [diff] [blame] | 583 | PACKAGE_VERSION='3.9' |
| 584 | PACKAGE_STRING='python 3.9' |
Benjamin Peterson | c2fcbf4 | 2016-08-03 22:01:32 -0700 | [diff] [blame] | 585 | PACKAGE_BUGREPORT='https://bugs.python.org/' |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 586 | PACKAGE_URL='' |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 587 | |
| 588 | ac_unique_file="Include/object.h" |
| 589 | # Factoring default headers for most tests. |
| 590 | ac_includes_default="\ |
| 591 | #include <stdio.h> |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 592 | #ifdef HAVE_SYS_TYPES_H |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 593 | # include <sys/types.h> |
| 594 | #endif |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 595 | #ifdef HAVE_SYS_STAT_H |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 596 | # include <sys/stat.h> |
| 597 | #endif |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 598 | #ifdef STDC_HEADERS |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 599 | # include <stdlib.h> |
| 600 | # include <stddef.h> |
| 601 | #else |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 602 | # ifdef HAVE_STDLIB_H |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 603 | # include <stdlib.h> |
| 604 | # endif |
| 605 | #endif |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 606 | #ifdef HAVE_STRING_H |
| 607 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 608 | # include <memory.h> |
| 609 | # endif |
| 610 | # include <string.h> |
| 611 | #endif |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 612 | #ifdef HAVE_STRINGS_H |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 613 | # include <strings.h> |
| 614 | #endif |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 615 | #ifdef HAVE_INTTYPES_H |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 616 | # include <inttypes.h> |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 617 | #endif |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 618 | #ifdef HAVE_STDINT_H |
| 619 | # include <stdint.h> |
| 620 | #endif |
| 621 | #ifdef HAVE_UNISTD_H |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 622 | # include <unistd.h> |
| 623 | #endif" |
| 624 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 625 | ac_subst_vars='LTLIBOBJS |
Christian Heimes | ff5be6e | 2018-01-20 13:19:21 +0100 | [diff] [blame] | 626 | OPENSSL_LDFLAGS |
| 627 | OPENSSL_LIBS |
| 628 | OPENSSL_INCLUDES |
Ned Deily | 322f5ba | 2013-11-21 23:01:59 -0800 | [diff] [blame] | 629 | ENSUREPIP |
Ronald Oussoren | 74f29b4 | 2009-09-20 20:09:26 +0000 | [diff] [blame] | 630 | SRCDIRS |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 631 | THREADHEADERS |
doko@python.org | 8742119 | 2013-01-26 11:39:31 +0100 | [diff] [blame] | 632 | LIBPL |
| 633 | PY_ENABLE_SHARED |
xdegaye | 254b309 | 2019-04-29 09:27:40 +0200 | [diff] [blame] | 634 | LIBPYTHON |
doko@ubuntu.com | d5537d0 | 2013-03-21 13:21:49 -0700 | [diff] [blame] | 635 | EXT_SUFFIX |
Victor Stinner | 5422e3c | 2019-04-26 01:40:00 +0200 | [diff] [blame] | 636 | ALT_SOABI |
Barry Warsaw | 35f3a2c | 2010-09-03 18:30:30 +0000 | [diff] [blame] | 637 | SOABI |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 638 | LIBC |
| 639 | LIBM |
| 640 | HAVE_GETHOSTBYNAME |
| 641 | HAVE_GETHOSTBYNAME_R |
| 642 | HAVE_GETHOSTBYNAME_R_3_ARG |
| 643 | HAVE_GETHOSTBYNAME_R_5_ARG |
| 644 | HAVE_GETHOSTBYNAME_R_6_ARG |
| 645 | LIBOBJS |
| 646 | TRUE |
| 647 | MACHDEP_OBJS |
| 648 | DYNLOADFILE |
| 649 | DLINCLDIR |
Łukasz Langa | a785c87 | 2016-09-09 17:37:37 -0700 | [diff] [blame] | 650 | DTRACE_OBJS |
| 651 | DTRACE_HEADERS |
| 652 | DFLAGS |
| 653 | DTRACE |
Ned Deily | d819b93 | 2013-09-06 01:07:05 -0700 | [diff] [blame] | 654 | TCLTK_LIBS |
| 655 | TCLTK_INCLUDES |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 656 | LIBFFI_INCLUDEDIR |
Chih-Hsuan Yen | 03c0d2e | 2018-05-24 14:37:08 +0800 | [diff] [blame] | 657 | PKG_CONFIG_LIBDIR |
| 658 | PKG_CONFIG_PATH |
| 659 | PKG_CONFIG |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 660 | SHLIBS |
| 661 | CFLAGSFORSHARED |
| 662 | LINKFORSHARED |
| 663 | CCSHARED |
| 664 | BLDSHARED |
| 665 | LDCXXSHARED |
| 666 | LDSHARED |
doko@ubuntu.com | d5537d0 | 2013-03-21 13:21:49 -0700 | [diff] [blame] | 667 | SHLIB_SUFFIX |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 668 | LIBTOOL_CRUFT |
| 669 | OTHER_LIBTOOL_OPT |
| 670 | UNIVERSAL_ARCH_FLAGS |
stratakis | cf10a75 | 2018-12-19 18:19:01 +0100 | [diff] [blame] | 671 | LDFLAGS_NODIST |
Benjamin Peterson | acb8c52 | 2014-08-09 20:01:49 -0700 | [diff] [blame] | 672 | CFLAGS_NODIST |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 673 | BASECFLAGS |
Victor Stinner | 826f83f | 2017-04-28 15:07:10 +0200 | [diff] [blame] | 674 | CFLAGS_ALIASING |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 675 | OPT |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 676 | LLVM_PROF_FOUND |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 677 | LLVM_PROFDATA |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 678 | LLVM_PROF_ERR |
| 679 | LLVM_PROF_FILE |
| 680 | LLVM_PROF_MERGER |
| 681 | PGO_PROF_USE_FLAG |
| 682 | PGO_PROF_GEN_FLAG |
serge-sans-paille | 5ad36f9 | 2018-10-25 01:54:22 +0200 | [diff] [blame] | 683 | LLVM_AR_FOUND |
serge-sans-paille | 5ad36f9 | 2018-10-25 01:54:22 +0200 | [diff] [blame] | 684 | LLVM_AR |
Neil Schemenauer | 4e16a4a | 2019-07-22 12:54:25 -0700 | [diff] [blame] | 685 | PROFILE_TASK |
Brett Cannon | 63d98bc | 2016-09-06 17:12:40 -0700 | [diff] [blame] | 686 | DEF_MAKE_RULE |
| 687 | DEF_MAKE_ALL_RULE |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 688 | ABIFLAGS |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 689 | LN |
Matthias Klose | 93a0ef1 | 2012-03-15 18:08:34 +0100 | [diff] [blame] | 690 | MKDIR_P |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 691 | INSTALL_DATA |
| 692 | INSTALL_SCRIPT |
| 693 | INSTALL_PROGRAM |
doko@ubuntu.com | 5884449 | 2012-06-30 18:25:32 +0200 | [diff] [blame] | 694 | ac_ct_READELF |
| 695 | READELF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 696 | ARFLAGS |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 697 | ac_ct_AR |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 698 | AR |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 699 | GNULD |
| 700 | LINKCC |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 701 | LDVERSION |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 702 | RUNSHARED |
| 703 | INSTSONAME |
| 704 | LDLIBRARYDIR |
Martin v. Löwis | d1fc34d | 2010-12-30 14:55:47 +0000 | [diff] [blame] | 705 | PY3LIBRARY |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 706 | BLDLIBRARY |
| 707 | DLLLIBRARY |
| 708 | LDLIBRARY |
| 709 | LIBRARY |
| 710 | BUILDEXEEXT |
| 711 | EGREP |
Martin v. Löwis | 48e14d3 | 2011-05-09 07:37:45 +0200 | [diff] [blame] | 712 | NO_AS_NEEDED |
doko@ubuntu.com | 5553231 | 2016-06-14 08:55:19 +0200 | [diff] [blame] | 713 | MULTIARCH_CPPFLAGS |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 714 | PLATFORM_TRIPLET |
| 715 | MULTIARCH |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 716 | ac_ct_CXX |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 717 | MAINCC |
| 718 | CXX |
Łukasz Langa | a785c87 | 2016-09-09 17:37:37 -0700 | [diff] [blame] | 719 | SED |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 720 | GREP |
| 721 | CPP |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 722 | OBJEXT |
| 723 | EXEEXT |
| 724 | ac_ct_CC |
| 725 | CPPFLAGS |
| 726 | LDFLAGS |
| 727 | CFLAGS |
| 728 | CC |
| 729 | EXPORT_MACOSX_DEPLOYMENT_TARGET |
| 730 | CONFIGURE_MACOSX_DEPLOYMENT_TARGET |
doko@ubuntu.com | 1abe1c5 | 2012-06-30 20:42:45 +0200 | [diff] [blame] | 731 | _PYTHON_HOST_PLATFORM |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 732 | MACHDEP |
Ronald Oussoren | 86b33c8 | 2010-04-30 11:41:56 +0000 | [diff] [blame] | 733 | FRAMEWORKINSTALLAPPSPREFIX |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 734 | FRAMEWORKUNIXTOOLSPREFIX |
Ned Deily | b8f944f | 2013-11-21 22:42:25 -0800 | [diff] [blame] | 735 | FRAMEWORKPYTHONW |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 736 | FRAMEWORKALTINSTALLLAST |
| 737 | FRAMEWORKALTINSTALLFIRST |
| 738 | FRAMEWORKINSTALLLAST |
| 739 | FRAMEWORKINSTALLFIRST |
| 740 | PYTHONFRAMEWORKINSTALLDIR |
| 741 | PYTHONFRAMEWORKPREFIX |
| 742 | PYTHONFRAMEWORKDIR |
| 743 | PYTHONFRAMEWORKIDENTIFIER |
| 744 | PYTHONFRAMEWORK |
| 745 | LIPO_32BIT_FLAGS |
| 746 | ARCH_RUN_32BIT |
| 747 | UNIVERSALSDK |
| 748 | CONFIG_ARGS |
| 749 | SOVERSION |
| 750 | VERSION |
doko@ubuntu.com | 1abe1c5 | 2012-06-30 20:42:45 +0200 | [diff] [blame] | 751 | PYTHON_FOR_BUILD |
Victor Stinner | a5c62a8 | 2017-05-03 18:21:48 +0200 | [diff] [blame] | 752 | PYTHON_FOR_REGEN |
Matthias Klose | ca2f6ec | 2012-03-15 21:30:11 +0100 | [diff] [blame] | 753 | host_os |
| 754 | host_vendor |
| 755 | host_cpu |
| 756 | host |
| 757 | build_os |
| 758 | build_vendor |
| 759 | build_cpu |
| 760 | build |
Ned Deily | 5c4b0d0 | 2017-03-04 00:19:55 -0500 | [diff] [blame] | 761 | HAS_GIT |
| 762 | GITBRANCH |
| 763 | GITTAG |
| 764 | GITVERSION |
Trent Nelson | 4d4ec65 | 2012-10-16 08:51:24 -0400 | [diff] [blame] | 765 | BASECPPFLAGS |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 766 | target_alias |
| 767 | host_alias |
| 768 | build_alias |
| 769 | LIBS |
| 770 | ECHO_T |
| 771 | ECHO_N |
| 772 | ECHO_C |
| 773 | DEFS |
| 774 | mandir |
| 775 | localedir |
| 776 | libdir |
| 777 | psdir |
| 778 | pdfdir |
| 779 | dvidir |
| 780 | htmldir |
| 781 | infodir |
| 782 | docdir |
| 783 | oldincludedir |
| 784 | includedir |
| 785 | localstatedir |
| 786 | sharedstatedir |
| 787 | sysconfdir |
| 788 | datadir |
| 789 | datarootdir |
| 790 | libexecdir |
| 791 | sbindir |
| 792 | bindir |
| 793 | program_transform_name |
| 794 | prefix |
| 795 | exec_prefix |
| 796 | PACKAGE_URL |
| 797 | PACKAGE_BUGREPORT |
| 798 | PACKAGE_STRING |
| 799 | PACKAGE_VERSION |
| 800 | PACKAGE_TARNAME |
| 801 | PACKAGE_NAME |
| 802 | PATH_SEPARATOR |
| 803 | SHELL' |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 804 | ac_subst_files='' |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 805 | ac_user_opts=' |
| 806 | enable_option_checking |
| 807 | enable_universalsdk |
| 808 | with_universal_archs |
| 809 | with_framework_name |
| 810 | enable_framework |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 811 | with_cxx_main |
| 812 | with_suffix |
| 813 | enable_shared |
| 814 | enable_profiling |
| 815 | with_pydebug |
Victor Stinner | f4e4703 | 2019-04-25 00:56:28 +0200 | [diff] [blame] | 816 | with_trace_refs |
T. Wouters | ddbfa2c | 2017-05-23 01:30:49 +0200 | [diff] [blame] | 817 | with_assertions |
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 1016b2f | 2016-11-20 21:07:42 +0000 | [diff] [blame] | 818 | enable_optimizations |
Gregory P. Smith | d82da9f | 2016-04-15 16:57:04 -0700 | [diff] [blame] | 819 | with_lto |
Christian Heimes | 985ecdc | 2013-11-20 11:46:18 +0100 | [diff] [blame] | 820 | with_hash_algorithm |
Charles-François Natali | d30b022 | 2014-05-08 23:08:51 +0100 | [diff] [blame] | 821 | with_address_sanitizer |
Gregory P. Smith | 1584a00 | 2018-11-12 12:07:14 -0800 | [diff] [blame] | 822 | with_memory_sanitizer |
| 823 | with_undefined_behavior_sanitizer |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 824 | with_libs |
| 825 | with_system_expat |
| 826 | with_system_ffi |
Stefan Krah | 60187b5 | 2012-03-23 19:06:27 +0100 | [diff] [blame] | 827 | with_system_libmpdec |
Benjamin Peterson | 076ed00 | 2010-10-31 17:11:02 +0000 | [diff] [blame] | 828 | enable_loadable_sqlite_extensions |
Ned Deily | d819b93 | 2013-09-06 01:07:05 -0700 | [diff] [blame] | 829 | with_tcltk_includes |
| 830 | with_tcltk_libs |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 831 | with_dbmliborder |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 832 | enable_ipv6 |
| 833 | with_doc_strings |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 834 | with_pymalloc |
Nick Coghlan | 6ea4186 | 2017-06-11 13:16:15 +1000 | [diff] [blame] | 835 | with_c_locale_coercion |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 836 | with_valgrind |
Łukasz Langa | a785c87 | 2016-09-09 17:37:37 -0700 | [diff] [blame] | 837 | with_dtrace |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 838 | with_libm |
| 839 | with_libc |
| 840 | enable_big_digits |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 841 | with_computed_gotos |
Ned Deily | 322f5ba | 2013-11-21 23:01:59 -0800 | [diff] [blame] | 842 | with_ensurepip |
Christian Heimes | ff5be6e | 2018-01-20 13:19:21 +0100 | [diff] [blame] | 843 | with_openssl |
Christian Heimes | 892d66e | 2018-01-29 14:10:18 +0100 | [diff] [blame] | 844 | with_ssl_default_suites |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 845 | ' |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 846 | ac_precious_vars='build_alias |
| 847 | host_alias |
| 848 | target_alias |
doko@python.org | eab42bf | 2013-01-26 18:57:19 +0100 | [diff] [blame] | 849 | MACHDEP |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 850 | CC |
| 851 | CFLAGS |
| 852 | LDFLAGS |
| 853 | LIBS |
| 854 | CPPFLAGS |
Chih-Hsuan Yen | 03c0d2e | 2018-05-24 14:37:08 +0800 | [diff] [blame] | 855 | CPP |
Neil Schemenauer | 4e16a4a | 2019-07-22 12:54:25 -0700 | [diff] [blame] | 856 | PROFILE_TASK |
Chih-Hsuan Yen | 03c0d2e | 2018-05-24 14:37:08 +0800 | [diff] [blame] | 857 | PKG_CONFIG |
| 858 | PKG_CONFIG_PATH |
| 859 | PKG_CONFIG_LIBDIR' |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 860 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 861 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 862 | # Initialize some variables set by options. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 863 | ac_init_help= |
| 864 | ac_init_version=false |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 865 | ac_unrecognized_opts= |
| 866 | ac_unrecognized_sep= |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 867 | # The variables have the same names as the options, with |
| 868 | # dashes changed to underlines. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 869 | cache_file=/dev/null |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 870 | exec_prefix=NONE |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 871 | no_create= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 872 | no_recursion= |
| 873 | prefix=NONE |
| 874 | program_prefix=NONE |
| 875 | program_suffix=NONE |
| 876 | program_transform_name=s,x,x, |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 877 | silent= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 878 | site= |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 879 | srcdir= |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 880 | verbose= |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 881 | x_includes=NONE |
| 882 | x_libraries=NONE |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 883 | |
| 884 | # Installation directory options. |
| 885 | # These are left unexpanded so users can "make install exec_prefix=/foo" |
| 886 | # and all the variables that are supposed to be based on exec_prefix |
| 887 | # by default will actually change. |
| 888 | # Use braces instead of parens because sh, perl, etc. also accept them. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 889 | # (The list follows the same order as the GNU Coding Standards.) |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 890 | bindir='${exec_prefix}/bin' |
| 891 | sbindir='${exec_prefix}/sbin' |
| 892 | libexecdir='${exec_prefix}/libexec' |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 893 | datarootdir='${prefix}/share' |
| 894 | datadir='${datarootdir}' |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 895 | sysconfdir='${prefix}/etc' |
| 896 | sharedstatedir='${prefix}/com' |
| 897 | localstatedir='${prefix}/var' |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 898 | includedir='${prefix}/include' |
| 899 | oldincludedir='/usr/include' |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 900 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' |
| 901 | infodir='${datarootdir}/info' |
| 902 | htmldir='${docdir}' |
| 903 | dvidir='${docdir}' |
| 904 | pdfdir='${docdir}' |
| 905 | psdir='${docdir}' |
| 906 | libdir='${exec_prefix}/lib' |
| 907 | localedir='${datarootdir}/locale' |
| 908 | mandir='${datarootdir}/man' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 909 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 910 | ac_prev= |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 911 | ac_dashdash= |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 912 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 913 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 914 | # If the previous option needs an argument, assign it. |
| 915 | if test -n "$ac_prev"; then |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 916 | eval $ac_prev=\$ac_option |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 917 | ac_prev= |
| 918 | continue |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 919 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 920 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 921 | case $ac_option in |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 922 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
| 923 | *=) ac_optarg= ;; |
| 924 | *) ac_optarg=yes ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 925 | esac |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 926 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 927 | # Accept the important Cygnus configure options, so we can diagnose typos. |
| 928 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 929 | case $ac_dashdash$ac_option in |
| 930 | --) |
| 931 | ac_dashdash=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 932 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 933 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
| 934 | ac_prev=bindir ;; |
| 935 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 936 | bindir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 937 | |
| 938 | -build | --build | --buil | --bui | --bu) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 939 | ac_prev=build_alias ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 940 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 941 | build_alias=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 942 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 943 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
| 944 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) |
| 945 | ac_prev=cache_file ;; |
| 946 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ |
| 947 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 948 | cache_file=$ac_optarg ;; |
| 949 | |
| 950 | --config-cache | -C) |
| 951 | cache_file=config.cache ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 952 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 953 | -datadir | --datadir | --datadi | --datad) |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 954 | ac_prev=datadir ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 955 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 956 | datadir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 957 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 958 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
| 959 | | --dataroo | --dataro | --datar) |
| 960 | ac_prev=datarootdir ;; |
| 961 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ |
| 962 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) |
| 963 | datarootdir=$ac_optarg ;; |
| 964 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 965 | -disable-* | --disable-*) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 966 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 967 | # Reject names that are not valid shell variable names. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 968 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 969 | as_fn_error $? "invalid feature name: $ac_useropt" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 970 | ac_useropt_orig=$ac_useropt |
| 971 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` |
| 972 | case $ac_user_opts in |
| 973 | *" |
| 974 | "enable_$ac_useropt" |
| 975 | "*) ;; |
| 976 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" |
| 977 | ac_unrecognized_sep=', ';; |
| 978 | esac |
| 979 | eval enable_$ac_useropt=no ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 980 | |
| 981 | -docdir | --docdir | --docdi | --doc | --do) |
| 982 | ac_prev=docdir ;; |
| 983 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) |
| 984 | docdir=$ac_optarg ;; |
| 985 | |
| 986 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) |
| 987 | ac_prev=dvidir ;; |
| 988 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) |
| 989 | dvidir=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 990 | |
| 991 | -enable-* | --enable-*) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 992 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 993 | # Reject names that are not valid shell variable names. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 994 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 995 | as_fn_error $? "invalid feature name: $ac_useropt" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 996 | ac_useropt_orig=$ac_useropt |
| 997 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` |
| 998 | case $ac_user_opts in |
| 999 | *" |
| 1000 | "enable_$ac_useropt" |
| 1001 | "*) ;; |
| 1002 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" |
| 1003 | ac_unrecognized_sep=', ';; |
| 1004 | esac |
| 1005 | eval enable_$ac_useropt=\$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1006 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1007 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ |
| 1008 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ |
| 1009 | | --exec | --exe | --ex) |
| 1010 | ac_prev=exec_prefix ;; |
| 1011 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ |
| 1012 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ |
| 1013 | | --exec=* | --exe=* | --ex=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1014 | exec_prefix=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1015 | |
| 1016 | -gas | --gas | --ga | --g) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1017 | # Obsolete; use --with-gas. |
| 1018 | with_gas=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1019 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1020 | -help | --help | --hel | --he | -h) |
| 1021 | ac_init_help=long ;; |
| 1022 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) |
| 1023 | ac_init_help=recursive ;; |
| 1024 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) |
| 1025 | ac_init_help=short ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1026 | |
| 1027 | -host | --host | --hos | --ho) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1028 | ac_prev=host_alias ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1029 | -host=* | --host=* | --hos=* | --ho=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1030 | host_alias=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1031 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1032 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
| 1033 | ac_prev=htmldir ;; |
| 1034 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ |
| 1035 | | --ht=*) |
| 1036 | htmldir=$ac_optarg ;; |
| 1037 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1038 | -includedir | --includedir | --includedi | --included | --include \ |
| 1039 | | --includ | --inclu | --incl | --inc) |
| 1040 | ac_prev=includedir ;; |
| 1041 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ |
| 1042 | | --includ=* | --inclu=* | --incl=* | --inc=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1043 | includedir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1044 | |
| 1045 | -infodir | --infodir | --infodi | --infod | --info | --inf) |
| 1046 | ac_prev=infodir ;; |
| 1047 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1048 | infodir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1049 | |
| 1050 | -libdir | --libdir | --libdi | --libd) |
| 1051 | ac_prev=libdir ;; |
| 1052 | -libdir=* | --libdir=* | --libdi=* | --libd=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1053 | libdir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1054 | |
| 1055 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ |
| 1056 | | --libexe | --libex | --libe) |
| 1057 | ac_prev=libexecdir ;; |
| 1058 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ |
| 1059 | | --libexe=* | --libex=* | --libe=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1060 | libexecdir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1061 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1062 | -localedir | --localedir | --localedi | --localed | --locale) |
| 1063 | ac_prev=localedir ;; |
| 1064 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) |
| 1065 | localedir=$ac_optarg ;; |
| 1066 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1067 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1068 | | --localstate | --localstat | --localsta | --localst | --locals) |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1069 | ac_prev=localstatedir ;; |
| 1070 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1071 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1072 | localstatedir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1073 | |
| 1074 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) |
| 1075 | ac_prev=mandir ;; |
| 1076 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1077 | mandir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1078 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1079 | -nfp | --nfp | --nf) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1080 | # Obsolete; use --without-fp. |
| 1081 | with_fp=no ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1082 | |
| 1083 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1084 | | --no-cr | --no-c | -n) |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1085 | no_create=yes ;; |
| 1086 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1087 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| 1088 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) |
| 1089 | no_recursion=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1090 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1091 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
| 1092 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ |
| 1093 | | --oldin | --oldi | --old | --ol | --o) |
| 1094 | ac_prev=oldincludedir ;; |
| 1095 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ |
| 1096 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ |
| 1097 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1098 | oldincludedir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1099 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1100 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
| 1101 | ac_prev=prefix ;; |
| 1102 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1103 | prefix=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1104 | |
| 1105 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ |
| 1106 | | --program-pre | --program-pr | --program-p) |
| 1107 | ac_prev=program_prefix ;; |
| 1108 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ |
| 1109 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1110 | program_prefix=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1111 | |
| 1112 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ |
| 1113 | | --program-suf | --program-su | --program-s) |
| 1114 | ac_prev=program_suffix ;; |
| 1115 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ |
| 1116 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1117 | program_suffix=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1118 | |
| 1119 | -program-transform-name | --program-transform-name \ |
| 1120 | | --program-transform-nam | --program-transform-na \ |
| 1121 | | --program-transform-n | --program-transform- \ |
| 1122 | | --program-transform | --program-transfor \ |
| 1123 | | --program-transfo | --program-transf \ |
| 1124 | | --program-trans | --program-tran \ |
| 1125 | | --progr-tra | --program-tr | --program-t) |
| 1126 | ac_prev=program_transform_name ;; |
| 1127 | -program-transform-name=* | --program-transform-name=* \ |
| 1128 | | --program-transform-nam=* | --program-transform-na=* \ |
| 1129 | | --program-transform-n=* | --program-transform-=* \ |
| 1130 | | --program-transform=* | --program-transfor=* \ |
| 1131 | | --program-transfo=* | --program-transf=* \ |
| 1132 | | --program-trans=* | --program-tran=* \ |
| 1133 | | --progr-tra=* | --program-tr=* | --program-t=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1134 | program_transform_name=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1135 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1136 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
| 1137 | ac_prev=pdfdir ;; |
| 1138 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) |
| 1139 | pdfdir=$ac_optarg ;; |
| 1140 | |
| 1141 | -psdir | --psdir | --psdi | --psd | --ps) |
| 1142 | ac_prev=psdir ;; |
| 1143 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) |
| 1144 | psdir=$ac_optarg ;; |
| 1145 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1146 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| 1147 | | -silent | --silent | --silen | --sile | --sil) |
| 1148 | silent=yes ;; |
| 1149 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1150 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
| 1151 | ac_prev=sbindir ;; |
| 1152 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ |
| 1153 | | --sbi=* | --sb=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1154 | sbindir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1155 | |
| 1156 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ |
| 1157 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ |
| 1158 | | --sharedst | --shareds | --shared | --share | --shar \ |
| 1159 | | --sha | --sh) |
| 1160 | ac_prev=sharedstatedir ;; |
| 1161 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ |
| 1162 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ |
| 1163 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ |
| 1164 | | --sha=* | --sh=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1165 | sharedstatedir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1166 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1167 | -site | --site | --sit) |
| 1168 | ac_prev=site ;; |
| 1169 | -site=* | --site=* | --sit=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1170 | site=$ac_optarg ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1171 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1172 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
| 1173 | ac_prev=srcdir ;; |
| 1174 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1175 | srcdir=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1176 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1177 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
| 1178 | | --syscon | --sysco | --sysc | --sys | --sy) |
| 1179 | ac_prev=sysconfdir ;; |
| 1180 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ |
| 1181 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1182 | sysconfdir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1183 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1184 | -target | --target | --targe | --targ | --tar | --ta | --t) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1185 | ac_prev=target_alias ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1186 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1187 | target_alias=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1188 | |
| 1189 | -v | -verbose | --verbose | --verbos | --verbo | --verb) |
| 1190 | verbose=yes ;; |
| 1191 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1192 | -version | --version | --versio | --versi | --vers | -V) |
| 1193 | ac_init_version=: ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1194 | |
| 1195 | -with-* | --with-*) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1196 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1197 | # Reject names that are not valid shell variable names. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1198 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1199 | as_fn_error $? "invalid package name: $ac_useropt" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1200 | ac_useropt_orig=$ac_useropt |
| 1201 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` |
| 1202 | case $ac_user_opts in |
| 1203 | *" |
| 1204 | "with_$ac_useropt" |
| 1205 | "*) ;; |
| 1206 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" |
| 1207 | ac_unrecognized_sep=', ';; |
| 1208 | esac |
| 1209 | eval with_$ac_useropt=\$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1210 | |
| 1211 | -without-* | --without-*) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1212 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1213 | # Reject names that are not valid shell variable names. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1214 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1215 | as_fn_error $? "invalid package name: $ac_useropt" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1216 | ac_useropt_orig=$ac_useropt |
| 1217 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` |
| 1218 | case $ac_user_opts in |
| 1219 | *" |
| 1220 | "with_$ac_useropt" |
| 1221 | "*) ;; |
| 1222 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" |
| 1223 | ac_unrecognized_sep=', ';; |
| 1224 | esac |
| 1225 | eval with_$ac_useropt=no ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1226 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1227 | --x) |
| 1228 | # Obsolete; use --with-x. |
| 1229 | with_x=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1230 | |
| 1231 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ |
| 1232 | | --x-incl | --x-inc | --x-in | --x-i) |
| 1233 | ac_prev=x_includes ;; |
| 1234 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ |
| 1235 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1236 | x_includes=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1237 | |
| 1238 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ |
| 1239 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) |
| 1240 | ac_prev=x_libraries ;; |
| 1241 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ |
| 1242 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1243 | x_libraries=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1244 | |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1245 | -*) as_fn_error $? "unrecognized option: \`$ac_option' |
| 1246 | Try \`$0 --help' for more information" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1247 | ;; |
| 1248 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1249 | *=*) |
| 1250 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` |
| 1251 | # Reject names that are not valid shell variable names. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1252 | case $ac_envvar in #( |
| 1253 | '' | [0-9]* | *[!_$as_cr_alnum]* ) |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1254 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1255 | esac |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1256 | eval $ac_envvar=\$ac_optarg |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1257 | export $ac_envvar ;; |
| 1258 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1259 | *) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1260 | # FIXME: should be removed in autoconf 3.0. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1261 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1262 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1263 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 1264 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1265 | ;; |
| 1266 | |
| 1267 | esac |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1268 | done |
| 1269 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1270 | if test -n "$ac_prev"; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1271 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1272 | as_fn_error $? "missing argument to $ac_option" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1273 | fi |
| 1274 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1275 | if test -n "$ac_unrecognized_opts"; then |
| 1276 | case $enable_option_checking in |
| 1277 | no) ;; |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1278 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1279 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
| 1280 | esac |
| 1281 | fi |
| 1282 | |
| 1283 | # Check all directory arguments for consistency. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1284 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ |
| 1285 | datadir sysconfdir sharedstatedir localstatedir includedir \ |
| 1286 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ |
Victor Stinner | b477d19 | 2020-01-22 22:48:16 +0100 | [diff] [blame^] | 1287 | libdir localedir mandir |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1288 | do |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1289 | eval ac_val=\$$ac_var |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1290 | # Remove trailing slashes. |
| 1291 | case $ac_val in |
| 1292 | */ ) |
| 1293 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` |
| 1294 | eval $ac_var=\$ac_val;; |
| 1295 | esac |
| 1296 | # Be sure to have absolute directory names. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1297 | case $ac_val in |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1298 | [\\/$]* | ?:[\\/]* ) continue;; |
| 1299 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1300 | esac |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1301 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1302 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1303 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1304 | # There might be people who depend on the old broken behavior: `$host' |
| 1305 | # used to hold the argument of --host etc. |
| 1306 | # FIXME: To remove some day. |
| 1307 | build=$build_alias |
| 1308 | host=$host_alias |
| 1309 | target=$target_alias |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1310 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1311 | # FIXME: To remove some day. |
| 1312 | if test "x$host_alias" != x; then |
| 1313 | if test "x$build_alias" = x; then |
| 1314 | cross_compiling=maybe |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1315 | elif test "x$build_alias" != "x$host_alias"; then |
| 1316 | cross_compiling=yes |
| 1317 | fi |
| 1318 | fi |
| 1319 | |
| 1320 | ac_tool_prefix= |
| 1321 | test -n "$host_alias" && ac_tool_prefix=$host_alias- |
| 1322 | |
| 1323 | test "$silent" = yes && exec 6>/dev/null |
| 1324 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1325 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1326 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
| 1327 | ac_ls_di=`ls -di .` && |
| 1328 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1329 | as_fn_error $? "working directory cannot be determined" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1330 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1331 | as_fn_error $? "pwd does not report name of working directory" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1332 | |
| 1333 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1334 | # Find the source files, if location was not specified. |
| 1335 | if test -z "$srcdir"; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1336 | ac_srcdir_defaulted=yes |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1337 | # Try the directory containing this script, then the parent directory. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1338 | ac_confdir=`$as_dirname -- "$as_myself" || |
| 1339 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
| 1340 | X"$as_myself" : 'X\(//\)[^/]' \| \ |
| 1341 | X"$as_myself" : 'X\(//\)$' \| \ |
| 1342 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || |
| 1343 | $as_echo X"$as_myself" | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1344 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
| 1345 | s//\1/ |
| 1346 | q |
| 1347 | } |
| 1348 | /^X\(\/\/\)[^/].*/{ |
| 1349 | s//\1/ |
| 1350 | q |
| 1351 | } |
| 1352 | /^X\(\/\/\)$/{ |
| 1353 | s//\1/ |
| 1354 | q |
| 1355 | } |
| 1356 | /^X\(\/\).*/{ |
| 1357 | s//\1/ |
| 1358 | q |
| 1359 | } |
| 1360 | s/.*/./; q'` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1361 | srcdir=$ac_confdir |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1362 | if test ! -r "$srcdir/$ac_unique_file"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1363 | srcdir=.. |
| 1364 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1365 | else |
| 1366 | ac_srcdir_defaulted=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1367 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1368 | if test ! -r "$srcdir/$ac_unique_file"; then |
| 1369 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1370 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 1371 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1372 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" |
| 1373 | ac_abs_confdir=`( |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1374 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1375 | pwd)` |
| 1376 | # When building in place, set srcdir=. |
| 1377 | if test "$ac_abs_confdir" = "$ac_pwd"; then |
| 1378 | srcdir=. |
| 1379 | fi |
| 1380 | # Remove unnecessary trailing slashes from srcdir. |
| 1381 | # Double slashes in file names in object file debugging info |
| 1382 | # mess up M-x gdb in Emacs. |
| 1383 | case $srcdir in |
| 1384 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; |
| 1385 | esac |
| 1386 | for ac_var in $ac_precious_vars; do |
| 1387 | eval ac_env_${ac_var}_set=\${${ac_var}+set} |
| 1388 | eval ac_env_${ac_var}_value=\$${ac_var} |
| 1389 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} |
| 1390 | eval ac_cv_env_${ac_var}_value=\$${ac_var} |
| 1391 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1392 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1393 | # |
| 1394 | # Report the --help message. |
| 1395 | # |
| 1396 | if test "$ac_init_help" = "long"; then |
| 1397 | # Omit some internal or obsolete options to make the list less imposing. |
| 1398 | # This message is too long to be a string in the A/UX 3.1 sh. |
| 1399 | cat <<_ACEOF |
Łukasz Langa | 9ab2fb1 | 2019-06-04 22:12:32 +0200 | [diff] [blame] | 1400 | \`configure' configures python 3.9 to adapt to many kinds of systems. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1401 | |
| 1402 | Usage: $0 [OPTION]... [VAR=VALUE]... |
| 1403 | |
| 1404 | To assign environment variables (e.g., CC, CFLAGS...), specify them as |
| 1405 | VAR=VALUE. See below for descriptions of some of the useful variables. |
| 1406 | |
| 1407 | Defaults for the options are specified in brackets. |
| 1408 | |
| 1409 | Configuration: |
| 1410 | -h, --help display this help and exit |
| 1411 | --help=short display options specific to this package |
| 1412 | --help=recursive display the short help of all the included packages |
| 1413 | -V, --version display version information and exit |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1414 | -q, --quiet, --silent do not print \`checking ...' messages |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1415 | --cache-file=FILE cache test results in FILE [disabled] |
| 1416 | -C, --config-cache alias for \`--cache-file=config.cache' |
| 1417 | -n, --no-create do not create output files |
| 1418 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] |
| 1419 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1420 | Installation directories: |
| 1421 | --prefix=PREFIX install architecture-independent files in PREFIX |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1422 | [$ac_default_prefix] |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1423 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1424 | [PREFIX] |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1425 | |
| 1426 | By default, \`make install' will install all the files in |
| 1427 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify |
| 1428 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', |
| 1429 | for instance \`--prefix=\$HOME'. |
| 1430 | |
| 1431 | For better control, use the options below. |
| 1432 | |
| 1433 | Fine tuning of the installation directories: |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1434 | --bindir=DIR user executables [EPREFIX/bin] |
| 1435 | --sbindir=DIR system admin executables [EPREFIX/sbin] |
| 1436 | --libexecdir=DIR program executables [EPREFIX/libexec] |
| 1437 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] |
| 1438 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] |
| 1439 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] |
| 1440 | --libdir=DIR object code libraries [EPREFIX/lib] |
| 1441 | --includedir=DIR C header files [PREFIX/include] |
| 1442 | --oldincludedir=DIR C header files for non-gcc [/usr/include] |
| 1443 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] |
| 1444 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] |
| 1445 | --infodir=DIR info documentation [DATAROOTDIR/info] |
| 1446 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] |
| 1447 | --mandir=DIR man documentation [DATAROOTDIR/man] |
| 1448 | --docdir=DIR documentation root [DATAROOTDIR/doc/python] |
| 1449 | --htmldir=DIR html documentation [DOCDIR] |
| 1450 | --dvidir=DIR dvi documentation [DOCDIR] |
| 1451 | --pdfdir=DIR pdf documentation [DOCDIR] |
| 1452 | --psdir=DIR ps documentation [DOCDIR] |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1453 | _ACEOF |
| 1454 | |
| 1455 | cat <<\_ACEOF |
Matthias Klose | ca2f6ec | 2012-03-15 21:30:11 +0100 | [diff] [blame] | 1456 | |
| 1457 | System types: |
| 1458 | --build=BUILD configure for building on BUILD [guessed] |
| 1459 | --host=HOST cross-compile to build programs to run on HOST [BUILD] |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1460 | _ACEOF |
| 1461 | fi |
| 1462 | |
| 1463 | if test -n "$ac_init_help"; then |
Martin v. Löwis | 88afe66 | 2002-10-26 13:47:44 +0000 | [diff] [blame] | 1464 | case $ac_init_help in |
Łukasz Langa | 9ab2fb1 | 2019-06-04 22:12:32 +0200 | [diff] [blame] | 1465 | short | recursive ) echo "Configuration of python 3.9:";; |
Martin v. Löwis | 88afe66 | 2002-10-26 13:47:44 +0000 | [diff] [blame] | 1466 | esac |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1467 | cat <<\_ACEOF |
| 1468 | |
| 1469 | Optional Features: |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1470 | --disable-option-checking ignore unrecognized --enable/--with options |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1471 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
| 1472 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] |
Christian Heimes | 68f5fbe | 2008-02-14 08:27:37 +0000 | [diff] [blame] | 1473 | --enable-universalsdk[=SDKDIR] |
Anthony Shaw | 2de064e | 2020-01-14 17:40:10 +1100 | [diff] [blame] | 1474 | create a universal binary build. SDKDIR specifies |
| 1475 | which macOS SDK should be used to perform the build, |
| 1476 | see Mac/README.rst. (default is no) |
Martin v. Löwis | 3e2c632 | 2002-10-29 10:07:43 +0000 | [diff] [blame] | 1477 | --enable-framework[=INSTALLDIR] |
Anthony Shaw | 2de064e | 2020-01-14 17:40:10 +1100 | [diff] [blame] | 1478 | create a Python.framework rather than a traditional |
| 1479 | Unix install. optional INSTALLDIR specifies the |
| 1480 | installation path. see Mac/README.rst (default is |
| 1481 | no) |
| 1482 | --enable-shared enable building a shared Python library (default is |
| 1483 | no) |
| 1484 | --enable-profiling enable C-level code profiling with gprof (default is |
| 1485 | no) |
| 1486 | --enable-optimizations enable expensive, stable optimizations (PGO, etc.) |
| 1487 | (default is no) |
Benjamin Peterson | 076ed00 | 2010-10-31 17:11:02 +0000 | [diff] [blame] | 1488 | --enable-loadable-sqlite-extensions |
Anthony Shaw | 2de064e | 2020-01-14 17:40:10 +1100 | [diff] [blame] | 1489 | support loadable extensions in _sqlite module, see |
| 1490 | Doc/library/sqlite3.rst (default is no) |
| 1491 | --enable-ipv6 enable ipv6 (with ipv4) support, see |
| 1492 | Doc/library/socket.rst (default is yes if supported) |
| 1493 | --enable-big-digits[=15|30] |
| 1494 | use big digits (30 or 15 bits) for Python longs |
| 1495 | (default is system-dependent)] |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1496 | |
| 1497 | Optional Packages: |
| 1498 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
| 1499 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
Benjamin Peterson | 14ae959 | 2008-07-16 02:20:15 +0000 | [diff] [blame] | 1500 | --with-universal-archs=ARCH |
Anthony Shaw | 2de064e | 2020-01-14 17:40:10 +1100 | [diff] [blame] | 1501 | specify the kind of universal binary that should be |
| 1502 | created. this option is only valid when |
| 1503 | --enable-universalsdk is set; options are: |
| 1504 | ("32-bit", "64-bit", "3-way", "intel", "intel-32", |
| 1505 | "intel-64", or "all") see Mac/README.rst |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 1506 | --with-framework-name=FRAMEWORK |
Anthony Shaw | 2de064e | 2020-01-14 17:40:10 +1100 | [diff] [blame] | 1507 | specify the name for the python framework on macOS |
| 1508 | only valid when --enable-framework is set. see |
| 1509 | Mac/README.rst (default is 'Python') |
| 1510 | --with-cxx-main[=COMPILER] |
| 1511 | compile main() and link Python executable with C++ |
| 1512 | compiler specified in COMPILER (default is $CXX) |
| 1513 | --with-suffix=SUFFIX set executable suffix to SUFFIX (default is '.exe') |
| 1514 | --with-pydebug build with Py_DEBUG defined (default is no) |
Victor Stinner | f4e4703 | 2019-04-25 00:56:28 +0200 | [diff] [blame] | 1515 | --with-trace-refs enable tracing references for debugging purpose |
Anthony Shaw | 2de064e | 2020-01-14 17:40:10 +1100 | [diff] [blame] | 1516 | (default is no) |
| 1517 | --with-assertions build with C assertions enabled (default is no) |
| 1518 | --with-lto enable Link-Time-Optimization in any build (default |
| 1519 | is no) |
Christian Heimes | 985ecdc | 2013-11-20 11:46:18 +0100 | [diff] [blame] | 1520 | --with-hash-algorithm=[fnv|siphash24] |
Anthony Shaw | 2de064e | 2020-01-14 17:40:10 +1100 | [diff] [blame] | 1521 | select hash algorithm for use in Python/pyhash.c |
| 1522 | (default is SipHash24) |
Charles-François Natali | d30b022 | 2014-05-08 23:08:51 +0100 | [diff] [blame] | 1523 | --with-address-sanitizer |
Anthony Shaw | 2de064e | 2020-01-14 17:40:10 +1100 | [diff] [blame] | 1524 | enable AddressSanitizer memory error detector, |
| 1525 | 'asan' (default is no) |
| 1526 | --with-memory-sanitizer enable MemorySanitizer allocation error detector, |
| 1527 | 'msan' (default is no) |
Gregory P. Smith | 1584a00 | 2018-11-12 12:07:14 -0800 | [diff] [blame] | 1528 | --with-undefined-behavior-sanitizer |
Anthony Shaw | 2de064e | 2020-01-14 17:40:10 +1100 | [diff] [blame] | 1529 | enable UndefinedBehaviorSanitizer undefined |
| 1530 | behaviour detector, 'ubsan' (default is no) |
| 1531 | --with-libs='lib1 ...' link against additional libs (default is no) |
Benjamin Peterson | b2d9046 | 2009-12-31 03:23:10 +0000 | [diff] [blame] | 1532 | --with-system-expat build pyexpat module using an installed expat |
Anthony Shaw | 2de064e | 2020-01-14 17:40:10 +1100 | [diff] [blame] | 1533 | library, see Doc/library/pyexpat.rst (default is no) |
| 1534 | --with-system-ffi build _ctypes module using an installed ffi library, |
| 1535 | see Doc/library/ctypes.rst (default is |
| 1536 | system-dependent) |
Stefan Krah | 60187b5 | 2012-03-23 19:06:27 +0100 | [diff] [blame] | 1537 | --with-system-libmpdec build _decimal module using an installed libmpdec |
Anthony Shaw | 2de064e | 2020-01-14 17:40:10 +1100 | [diff] [blame] | 1538 | library, see Doc/library/decimal.rst (default is no) |
Ned Deily | d819b93 | 2013-09-06 01:07:05 -0700 | [diff] [blame] | 1539 | --with-tcltk-includes='-I...' |
| 1540 | override search for Tcl and Tk include files |
| 1541 | --with-tcltk-libs='-L...' |
| 1542 | override search for Tcl and Tk libs |
Matthias Klose | 55708cc | 2009-04-30 08:06:49 +0000 | [diff] [blame] | 1543 | --with-dbmliborder=db1:db2:... |
Anthony Shaw | 2de064e | 2020-01-14 17:40:10 +1100 | [diff] [blame] | 1544 | override order to check db backends for dbm; a valid |
| 1545 | value is a colon separated string with the backend |
| 1546 | names `ndbm', `gdbm' and `bdb'. |
| 1547 | --with-doc-strings enable documentation strings (default is yes) |
| 1548 | --with-pymalloc enable specialized mallocs (default is yes) |
| 1549 | --with-c-locale-coercion |
| 1550 | enable C locale coercion to a UTF-8 based locale |
| 1551 | (default is yes) |
| 1552 | --with-valgrind enable Valgrind support (default is no) |
| 1553 | --with-dtrace enable DTrace support (default is no) |
| 1554 | --with-libm=STRING override libm math library to STRING (default is |
| 1555 | system-dependent) |
| 1556 | --with-libc=STRING override libc C library to STRING (default is |
| 1557 | system-dependent) |
| 1558 | --with-computed-gotos enable computed gotos in evaluation loop (enabled by |
Antoine Pitrou | 042b128 | 2010-08-13 21:15:58 +0000 | [diff] [blame] | 1559 | default on supported compilers) |
Anthony Shaw | 2de064e | 2020-01-14 17:40:10 +1100 | [diff] [blame] | 1560 | --with-ensurepip[=install|upgrade|no] |
| 1561 | "install" or "upgrade" using bundled pip (default is |
| 1562 | upgrade) |
| 1563 | --with-openssl=DIR override root of the OpenSSL directory to DIR |
Christian Heimes | 892d66e | 2018-01-29 14:10:18 +0100 | [diff] [blame] | 1564 | --with-ssl-default-suites=[python|openssl|STRING] |
Anthony Shaw | 2de064e | 2020-01-14 17:40:10 +1100 | [diff] [blame] | 1565 | override default cipher suites string, python: use |
Christian Heimes | 892d66e | 2018-01-29 14:10:18 +0100 | [diff] [blame] | 1566 | Python's preferred selection (default), openssl: |
| 1567 | leave OpenSSL's defaults untouched, STRING: use a |
Anthony Shaw | 2de064e | 2020-01-14 17:40:10 +1100 | [diff] [blame] | 1568 | custom string, PROTOCOL_SSLv2 ignores the setting, |
| 1569 | see Doc/library/ssl.rst |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1570 | |
| 1571 | Some influential environment variables: |
doko@python.org | eab42bf | 2013-01-26 18:57:19 +0100 | [diff] [blame] | 1572 | MACHDEP name for machine-dependent library files |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1573 | CC C compiler command |
| 1574 | CFLAGS C compiler flags |
| 1575 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a |
| 1576 | nonstandard directory <lib dir> |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1577 | LIBS libraries to pass to the linker, e.g. -l<library> |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1578 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1579 | you have headers in a nonstandard directory <include dir> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1580 | CPP C preprocessor |
Neil Schemenauer | 4e16a4a | 2019-07-22 12:54:25 -0700 | [diff] [blame] | 1581 | PROFILE_TASK |
| 1582 | Python args for PGO generation task |
Chih-Hsuan Yen | 03c0d2e | 2018-05-24 14:37:08 +0800 | [diff] [blame] | 1583 | PKG_CONFIG path to pkg-config utility |
| 1584 | PKG_CONFIG_PATH |
| 1585 | directories to add to pkg-config's search path |
| 1586 | PKG_CONFIG_LIBDIR |
| 1587 | path overriding pkg-config's built-in search path |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1588 | |
| 1589 | Use these variables to override the choices made by `configure' or to help |
| 1590 | it to find libraries and programs with nonstandard names/locations. |
| 1591 | |
Benjamin Peterson | c2fcbf4 | 2016-08-03 22:01:32 -0700 | [diff] [blame] | 1592 | Report bugs to <https://bugs.python.org/>. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1593 | _ACEOF |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1594 | ac_status=$? |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1595 | fi |
| 1596 | |
| 1597 | if test "$ac_init_help" = "recursive"; then |
| 1598 | # If there are subdirs, report their specific --help. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1599 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1600 | test -d "$ac_dir" || |
| 1601 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || |
| 1602 | continue |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1603 | ac_builddir=. |
| 1604 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1605 | case "$ac_dir" in |
| 1606 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; |
| 1607 | *) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1608 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1609 | # A ".." for each directory in $ac_dir_suffix. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1610 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1611 | case $ac_top_builddir_sub in |
| 1612 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; |
| 1613 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; |
| 1614 | esac ;; |
| 1615 | esac |
| 1616 | ac_abs_top_builddir=$ac_pwd |
| 1617 | ac_abs_builddir=$ac_pwd$ac_dir_suffix |
| 1618 | # for backward compatibility: |
| 1619 | ac_top_builddir=$ac_top_build_prefix |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1620 | |
| 1621 | case $srcdir in |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1622 | .) # We are building in place. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1623 | ac_srcdir=. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1624 | ac_top_srcdir=$ac_top_builddir_sub |
| 1625 | ac_abs_top_srcdir=$ac_pwd ;; |
| 1626 | [\\/]* | ?:[\\/]* ) # Absolute name. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1627 | ac_srcdir=$srcdir$ac_dir_suffix; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1628 | ac_top_srcdir=$srcdir |
| 1629 | ac_abs_top_srcdir=$srcdir ;; |
| 1630 | *) # Relative name. |
| 1631 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix |
| 1632 | ac_top_srcdir=$ac_top_build_prefix$srcdir |
| 1633 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1634 | esac |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1635 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 1636 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1637 | cd "$ac_dir" || { ac_status=$?; continue; } |
| 1638 | # Check for guested configure. |
| 1639 | if test -f "$ac_srcdir/configure.gnu"; then |
| 1640 | echo && |
| 1641 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive |
| 1642 | elif test -f "$ac_srcdir/configure"; then |
| 1643 | echo && |
| 1644 | $SHELL "$ac_srcdir/configure" --help=recursive |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1645 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1646 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1647 | fi || ac_status=$? |
| 1648 | cd "$ac_pwd" || { ac_status=$?; break; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1649 | done |
| 1650 | fi |
| 1651 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1652 | test -n "$ac_init_help" && exit $ac_status |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1653 | if $ac_init_version; then |
| 1654 | cat <<\_ACEOF |
Łukasz Langa | 9ab2fb1 | 2019-06-04 22:12:32 +0200 | [diff] [blame] | 1655 | python configure 3.9 |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 1656 | generated by GNU Autoconf 2.69 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1657 | |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 1658 | Copyright (C) 2012 Free Software Foundation, Inc. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1659 | This configure script is free software; the Free Software Foundation |
| 1660 | gives unlimited permission to copy, distribute and modify it. |
| 1661 | _ACEOF |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1662 | exit |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1663 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1664 | |
| 1665 | ## ------------------------ ## |
| 1666 | ## Autoconf initialization. ## |
| 1667 | ## ------------------------ ## |
| 1668 | |
| 1669 | # ac_fn_c_try_compile LINENO |
| 1670 | # -------------------------- |
| 1671 | # Try to compile conftest.$ac_ext, and return whether this succeeded. |
| 1672 | ac_fn_c_try_compile () |
| 1673 | { |
| 1674 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1675 | rm -f conftest.$ac_objext |
| 1676 | if { { ac_try="$ac_compile" |
| 1677 | case "(($ac_try" in |
| 1678 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 1679 | *) ac_try_echo=$ac_try;; |
| 1680 | esac |
| 1681 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 1682 | $as_echo "$ac_try_echo"; } >&5 |
| 1683 | (eval "$ac_compile") 2>conftest.err |
| 1684 | ac_status=$? |
| 1685 | if test -s conftest.err; then |
| 1686 | grep -v '^ *+' conftest.err >conftest.er1 |
| 1687 | cat conftest.er1 >&5 |
| 1688 | mv -f conftest.er1 conftest.err |
| 1689 | fi |
| 1690 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 1691 | test $ac_status = 0; } && { |
| 1692 | test -z "$ac_c_werror_flag" || |
| 1693 | test ! -s conftest.err |
| 1694 | } && test -s conftest.$ac_objext; then : |
| 1695 | ac_retval=0 |
| 1696 | else |
| 1697 | $as_echo "$as_me: failed program was:" >&5 |
| 1698 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 1699 | |
| 1700 | ac_retval=1 |
| 1701 | fi |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 1702 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1703 | as_fn_set_status $ac_retval |
| 1704 | |
| 1705 | } # ac_fn_c_try_compile |
| 1706 | |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 1707 | # ac_fn_c_try_cpp LINENO |
| 1708 | # ---------------------- |
| 1709 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. |
| 1710 | ac_fn_c_try_cpp () |
| 1711 | { |
| 1712 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1713 | if { { ac_try="$ac_cpp conftest.$ac_ext" |
| 1714 | case "(($ac_try" in |
| 1715 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 1716 | *) ac_try_echo=$ac_try;; |
| 1717 | esac |
| 1718 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 1719 | $as_echo "$ac_try_echo"; } >&5 |
| 1720 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err |
| 1721 | ac_status=$? |
| 1722 | if test -s conftest.err; then |
| 1723 | grep -v '^ *+' conftest.err >conftest.er1 |
| 1724 | cat conftest.er1 >&5 |
| 1725 | mv -f conftest.er1 conftest.err |
| 1726 | fi |
| 1727 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 1728 | test $ac_status = 0; } > conftest.i && { |
| 1729 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
| 1730 | test ! -s conftest.err |
| 1731 | }; then : |
| 1732 | ac_retval=0 |
| 1733 | else |
| 1734 | $as_echo "$as_me: failed program was:" >&5 |
| 1735 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 1736 | |
| 1737 | ac_retval=1 |
| 1738 | fi |
| 1739 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 1740 | as_fn_set_status $ac_retval |
| 1741 | |
| 1742 | } # ac_fn_c_try_cpp |
| 1743 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1744 | # ac_fn_c_try_link LINENO |
| 1745 | # ----------------------- |
| 1746 | # Try to link conftest.$ac_ext, and return whether this succeeded. |
| 1747 | ac_fn_c_try_link () |
| 1748 | { |
| 1749 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1750 | rm -f conftest.$ac_objext conftest$ac_exeext |
| 1751 | if { { ac_try="$ac_link" |
| 1752 | case "(($ac_try" in |
| 1753 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 1754 | *) ac_try_echo=$ac_try;; |
| 1755 | esac |
| 1756 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 1757 | $as_echo "$ac_try_echo"; } >&5 |
| 1758 | (eval "$ac_link") 2>conftest.err |
| 1759 | ac_status=$? |
| 1760 | if test -s conftest.err; then |
| 1761 | grep -v '^ *+' conftest.err >conftest.er1 |
| 1762 | cat conftest.er1 >&5 |
| 1763 | mv -f conftest.er1 conftest.err |
| 1764 | fi |
| 1765 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 1766 | test $ac_status = 0; } && { |
| 1767 | test -z "$ac_c_werror_flag" || |
| 1768 | test ! -s conftest.err |
| 1769 | } && test -s conftest$ac_exeext && { |
| 1770 | test "$cross_compiling" = yes || |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 1771 | test -x conftest$ac_exeext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1772 | }; then : |
| 1773 | ac_retval=0 |
| 1774 | else |
| 1775 | $as_echo "$as_me: failed program was:" >&5 |
| 1776 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 1777 | |
| 1778 | ac_retval=1 |
| 1779 | fi |
| 1780 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information |
| 1781 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would |
| 1782 | # interfere with the next link command; also delete a directory that is |
| 1783 | # left behind by Apple's compiler. We do this before executing the actions. |
| 1784 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 1785 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1786 | as_fn_set_status $ac_retval |
| 1787 | |
| 1788 | } # ac_fn_c_try_link |
| 1789 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1790 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
| 1791 | # ------------------------------------------------------- |
| 1792 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using |
| 1793 | # the include files in INCLUDES and setting the cache variable VAR |
| 1794 | # accordingly. |
| 1795 | ac_fn_c_check_header_mongrel () |
| 1796 | { |
| 1797 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 1798 | if eval \${$3+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1799 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
| 1800 | $as_echo_n "checking for $2... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 1801 | if eval \${$3+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1802 | $as_echo_n "(cached) " >&6 |
| 1803 | fi |
| 1804 | eval ac_res=\$$3 |
| 1805 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 1806 | $as_echo "$ac_res" >&6; } |
| 1807 | else |
| 1808 | # Is the header compilable? |
| 1809 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 |
| 1810 | $as_echo_n "checking $2 usability... " >&6; } |
| 1811 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 1812 | /* end confdefs.h. */ |
| 1813 | $4 |
| 1814 | #include <$2> |
| 1815 | _ACEOF |
| 1816 | if ac_fn_c_try_compile "$LINENO"; then : |
| 1817 | ac_header_compiler=yes |
| 1818 | else |
| 1819 | ac_header_compiler=no |
| 1820 | fi |
| 1821 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 1822 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 |
| 1823 | $as_echo "$ac_header_compiler" >&6; } |
| 1824 | |
| 1825 | # Is the header present? |
| 1826 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 |
| 1827 | $as_echo_n "checking $2 presence... " >&6; } |
| 1828 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 1829 | /* end confdefs.h. */ |
| 1830 | #include <$2> |
| 1831 | _ACEOF |
| 1832 | if ac_fn_c_try_cpp "$LINENO"; then : |
| 1833 | ac_header_preproc=yes |
| 1834 | else |
| 1835 | ac_header_preproc=no |
| 1836 | fi |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1837 | rm -f conftest.err conftest.i conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1838 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
| 1839 | $as_echo "$ac_header_preproc" >&6; } |
| 1840 | |
| 1841 | # So? What about this header? |
| 1842 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( |
| 1843 | yes:no: ) |
| 1844 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 |
| 1845 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} |
| 1846 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 |
| 1847 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} |
| 1848 | ;; |
| 1849 | no:yes:* ) |
| 1850 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 |
| 1851 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} |
| 1852 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 |
| 1853 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} |
| 1854 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 |
| 1855 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} |
| 1856 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 |
| 1857 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} |
| 1858 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 |
| 1859 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} |
Benjamin Peterson | c2fcbf4 | 2016-08-03 22:01:32 -0700 | [diff] [blame] | 1860 | ( $as_echo "## --------------------------------------- ## |
| 1861 | ## Report this to https://bugs.python.org/ ## |
| 1862 | ## --------------------------------------- ##" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1863 | ) | sed "s/^/$as_me: WARNING: /" >&2 |
| 1864 | ;; |
| 1865 | esac |
| 1866 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
| 1867 | $as_echo_n "checking for $2... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 1868 | if eval \${$3+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1869 | $as_echo_n "(cached) " >&6 |
| 1870 | else |
| 1871 | eval "$3=\$ac_header_compiler" |
| 1872 | fi |
| 1873 | eval ac_res=\$$3 |
| 1874 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 1875 | $as_echo "$ac_res" >&6; } |
| 1876 | fi |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 1877 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1878 | |
| 1879 | } # ac_fn_c_check_header_mongrel |
| 1880 | |
| 1881 | # ac_fn_c_try_run LINENO |
| 1882 | # ---------------------- |
| 1883 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes |
| 1884 | # that executables *can* be run. |
| 1885 | ac_fn_c_try_run () |
| 1886 | { |
| 1887 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1888 | if { { ac_try="$ac_link" |
| 1889 | case "(($ac_try" in |
| 1890 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 1891 | *) ac_try_echo=$ac_try;; |
| 1892 | esac |
| 1893 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 1894 | $as_echo "$ac_try_echo"; } >&5 |
| 1895 | (eval "$ac_link") 2>&5 |
| 1896 | ac_status=$? |
| 1897 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 1898 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' |
| 1899 | { { case "(($ac_try" in |
| 1900 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 1901 | *) ac_try_echo=$ac_try;; |
| 1902 | esac |
| 1903 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 1904 | $as_echo "$ac_try_echo"; } >&5 |
| 1905 | (eval "$ac_try") 2>&5 |
| 1906 | ac_status=$? |
| 1907 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 1908 | test $ac_status = 0; }; }; then : |
| 1909 | ac_retval=0 |
| 1910 | else |
| 1911 | $as_echo "$as_me: program exited with status $ac_status" >&5 |
| 1912 | $as_echo "$as_me: failed program was:" >&5 |
| 1913 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 1914 | |
| 1915 | ac_retval=$ac_status |
| 1916 | fi |
| 1917 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 1918 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1919 | as_fn_set_status $ac_retval |
| 1920 | |
| 1921 | } # ac_fn_c_try_run |
| 1922 | |
| 1923 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
| 1924 | # ------------------------------------------------------- |
| 1925 | # Tests whether HEADER exists and can be compiled using the include files in |
| 1926 | # INCLUDES, setting the cache variable VAR accordingly. |
| 1927 | ac_fn_c_check_header_compile () |
| 1928 | { |
| 1929 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1930 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
| 1931 | $as_echo_n "checking for $2... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 1932 | if eval \${$3+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1933 | $as_echo_n "(cached) " >&6 |
| 1934 | else |
| 1935 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 1936 | /* end confdefs.h. */ |
| 1937 | $4 |
| 1938 | #include <$2> |
| 1939 | _ACEOF |
| 1940 | if ac_fn_c_try_compile "$LINENO"; then : |
| 1941 | eval "$3=yes" |
| 1942 | else |
| 1943 | eval "$3=no" |
| 1944 | fi |
| 1945 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 1946 | fi |
| 1947 | eval ac_res=\$$3 |
| 1948 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 1949 | $as_echo "$ac_res" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 1950 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1951 | |
| 1952 | } # ac_fn_c_check_header_compile |
| 1953 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1954 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
| 1955 | # ------------------------------------------- |
| 1956 | # Tests whether TYPE exists after having included INCLUDES, setting cache |
| 1957 | # variable VAR accordingly. |
| 1958 | ac_fn_c_check_type () |
| 1959 | { |
| 1960 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1961 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
| 1962 | $as_echo_n "checking for $2... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 1963 | if eval \${$3+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1964 | $as_echo_n "(cached) " >&6 |
| 1965 | else |
| 1966 | eval "$3=no" |
| 1967 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 1968 | /* end confdefs.h. */ |
| 1969 | $4 |
| 1970 | int |
| 1971 | main () |
| 1972 | { |
| 1973 | if (sizeof ($2)) |
| 1974 | return 0; |
| 1975 | ; |
| 1976 | return 0; |
| 1977 | } |
| 1978 | _ACEOF |
| 1979 | if ac_fn_c_try_compile "$LINENO"; then : |
| 1980 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 1981 | /* end confdefs.h. */ |
| 1982 | $4 |
| 1983 | int |
| 1984 | main () |
| 1985 | { |
| 1986 | if (sizeof (($2))) |
| 1987 | return 0; |
| 1988 | ; |
| 1989 | return 0; |
| 1990 | } |
| 1991 | _ACEOF |
| 1992 | if ac_fn_c_try_compile "$LINENO"; then : |
| 1993 | |
| 1994 | else |
| 1995 | eval "$3=yes" |
| 1996 | fi |
| 1997 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 1998 | fi |
| 1999 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2000 | fi |
| 2001 | eval ac_res=\$$3 |
| 2002 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 2003 | $as_echo "$ac_res" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 2004 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2005 | |
| 2006 | } # ac_fn_c_check_type |
| 2007 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2008 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
| 2009 | # -------------------------------------------- |
| 2010 | # Tries to find the compile-time value of EXPR in a program that includes |
| 2011 | # INCLUDES, setting VAR accordingly. Returns whether the value could be |
| 2012 | # computed |
| 2013 | ac_fn_c_compute_int () |
| 2014 | { |
| 2015 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 2016 | if test "$cross_compiling" = yes; then |
| 2017 | # Depending upon the size, compute the lo and hi bounds. |
| 2018 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2019 | /* end confdefs.h. */ |
| 2020 | $4 |
| 2021 | int |
| 2022 | main () |
| 2023 | { |
| 2024 | static int test_array [1 - 2 * !(($2) >= 0)]; |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 2025 | test_array [0] = 0; |
| 2026 | return test_array [0]; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2027 | |
| 2028 | ; |
| 2029 | return 0; |
| 2030 | } |
| 2031 | _ACEOF |
| 2032 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2033 | ac_lo=0 ac_mid=0 |
| 2034 | while :; do |
| 2035 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2036 | /* end confdefs.h. */ |
| 2037 | $4 |
| 2038 | int |
| 2039 | main () |
| 2040 | { |
| 2041 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 2042 | test_array [0] = 0; |
| 2043 | return test_array [0]; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2044 | |
| 2045 | ; |
| 2046 | return 0; |
| 2047 | } |
| 2048 | _ACEOF |
| 2049 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2050 | ac_hi=$ac_mid; break |
| 2051 | else |
| 2052 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val |
| 2053 | if test $ac_lo -le $ac_mid; then |
| 2054 | ac_lo= ac_hi= |
| 2055 | break |
| 2056 | fi |
| 2057 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val |
| 2058 | fi |
| 2059 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2060 | done |
| 2061 | else |
| 2062 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2063 | /* end confdefs.h. */ |
| 2064 | $4 |
| 2065 | int |
| 2066 | main () |
| 2067 | { |
| 2068 | static int test_array [1 - 2 * !(($2) < 0)]; |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 2069 | test_array [0] = 0; |
| 2070 | return test_array [0]; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2071 | |
| 2072 | ; |
| 2073 | return 0; |
| 2074 | } |
| 2075 | _ACEOF |
| 2076 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2077 | ac_hi=-1 ac_mid=-1 |
| 2078 | while :; do |
| 2079 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2080 | /* end confdefs.h. */ |
| 2081 | $4 |
| 2082 | int |
| 2083 | main () |
| 2084 | { |
| 2085 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 2086 | test_array [0] = 0; |
| 2087 | return test_array [0]; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2088 | |
| 2089 | ; |
| 2090 | return 0; |
| 2091 | } |
| 2092 | _ACEOF |
| 2093 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2094 | ac_lo=$ac_mid; break |
| 2095 | else |
| 2096 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val |
| 2097 | if test $ac_mid -le $ac_hi; then |
| 2098 | ac_lo= ac_hi= |
| 2099 | break |
| 2100 | fi |
| 2101 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val |
| 2102 | fi |
| 2103 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2104 | done |
| 2105 | else |
| 2106 | ac_lo= ac_hi= |
| 2107 | fi |
| 2108 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2109 | fi |
| 2110 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2111 | # Binary search between lo and hi bounds. |
| 2112 | while test "x$ac_lo" != "x$ac_hi"; do |
| 2113 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val |
| 2114 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2115 | /* end confdefs.h. */ |
| 2116 | $4 |
| 2117 | int |
| 2118 | main () |
| 2119 | { |
| 2120 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 2121 | test_array [0] = 0; |
| 2122 | return test_array [0]; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2123 | |
| 2124 | ; |
| 2125 | return 0; |
| 2126 | } |
| 2127 | _ACEOF |
| 2128 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2129 | ac_hi=$ac_mid |
| 2130 | else |
| 2131 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val |
| 2132 | fi |
| 2133 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2134 | done |
| 2135 | case $ac_lo in #(( |
| 2136 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; |
| 2137 | '') ac_retval=1 ;; |
| 2138 | esac |
| 2139 | else |
| 2140 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2141 | /* end confdefs.h. */ |
| 2142 | $4 |
| 2143 | static long int longval () { return $2; } |
| 2144 | static unsigned long int ulongval () { return $2; } |
| 2145 | #include <stdio.h> |
| 2146 | #include <stdlib.h> |
| 2147 | int |
| 2148 | main () |
| 2149 | { |
| 2150 | |
| 2151 | FILE *f = fopen ("conftest.val", "w"); |
| 2152 | if (! f) |
| 2153 | return 1; |
| 2154 | if (($2) < 0) |
| 2155 | { |
| 2156 | long int i = longval (); |
| 2157 | if (i != ($2)) |
| 2158 | return 1; |
| 2159 | fprintf (f, "%ld", i); |
| 2160 | } |
| 2161 | else |
| 2162 | { |
| 2163 | unsigned long int i = ulongval (); |
| 2164 | if (i != ($2)) |
| 2165 | return 1; |
| 2166 | fprintf (f, "%lu", i); |
| 2167 | } |
| 2168 | /* Do not output a trailing newline, as this causes \r\n confusion |
| 2169 | on some platforms. */ |
| 2170 | return ferror (f) || fclose (f) != 0; |
| 2171 | |
| 2172 | ; |
| 2173 | return 0; |
| 2174 | } |
| 2175 | _ACEOF |
| 2176 | if ac_fn_c_try_run "$LINENO"; then : |
| 2177 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 |
| 2178 | else |
| 2179 | ac_retval=1 |
| 2180 | fi |
| 2181 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 2182 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 2183 | rm -f conftest.val |
| 2184 | |
| 2185 | fi |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 2186 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2187 | as_fn_set_status $ac_retval |
| 2188 | |
| 2189 | } # ac_fn_c_compute_int |
| 2190 | |
| 2191 | # ac_fn_c_check_func LINENO FUNC VAR |
| 2192 | # ---------------------------------- |
| 2193 | # Tests whether FUNC exists, setting the cache variable VAR accordingly |
| 2194 | ac_fn_c_check_func () |
| 2195 | { |
| 2196 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 2197 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
| 2198 | $as_echo_n "checking for $2... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 2199 | if eval \${$3+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2200 | $as_echo_n "(cached) " >&6 |
| 2201 | else |
| 2202 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2203 | /* end confdefs.h. */ |
| 2204 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
| 2205 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ |
| 2206 | #define $2 innocuous_$2 |
| 2207 | |
| 2208 | /* System header to define __stub macros and hopefully few prototypes, |
| 2209 | which can conflict with char $2 (); below. |
| 2210 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
| 2211 | <limits.h> exists even on freestanding compilers. */ |
| 2212 | |
| 2213 | #ifdef __STDC__ |
| 2214 | # include <limits.h> |
| 2215 | #else |
| 2216 | # include <assert.h> |
| 2217 | #endif |
| 2218 | |
| 2219 | #undef $2 |
| 2220 | |
| 2221 | /* Override any GCC internal prototype to avoid an error. |
| 2222 | Use char because int might match the return type of a GCC |
| 2223 | builtin and then its argument prototype would still apply. */ |
| 2224 | #ifdef __cplusplus |
| 2225 | extern "C" |
| 2226 | #endif |
| 2227 | char $2 (); |
| 2228 | /* The GNU C library defines this for functions which it implements |
| 2229 | to always fail with ENOSYS. Some functions are actually named |
| 2230 | something starting with __ and the normal name is an alias. */ |
| 2231 | #if defined __stub_$2 || defined __stub___$2 |
| 2232 | choke me |
| 2233 | #endif |
| 2234 | |
| 2235 | int |
| 2236 | main () |
| 2237 | { |
| 2238 | return $2 (); |
| 2239 | ; |
| 2240 | return 0; |
| 2241 | } |
| 2242 | _ACEOF |
| 2243 | if ac_fn_c_try_link "$LINENO"; then : |
| 2244 | eval "$3=yes" |
| 2245 | else |
| 2246 | eval "$3=no" |
| 2247 | fi |
| 2248 | rm -f core conftest.err conftest.$ac_objext \ |
| 2249 | conftest$ac_exeext conftest.$ac_ext |
| 2250 | fi |
| 2251 | eval ac_res=\$$3 |
| 2252 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 2253 | $as_echo "$ac_res" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 2254 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2255 | |
| 2256 | } # ac_fn_c_check_func |
| 2257 | |
Gregory P. Smith | df300d5 | 2012-01-21 18:20:15 -0800 | [diff] [blame] | 2258 | # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES |
| 2259 | # --------------------------------------------- |
| 2260 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR |
| 2261 | # accordingly. |
| 2262 | ac_fn_c_check_decl () |
| 2263 | { |
| 2264 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 2265 | as_decl_name=`echo $2|sed 's/ *(.*//'` |
| 2266 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` |
| 2267 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 |
| 2268 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } |
| 2269 | if eval \${$3+:} false; then : |
| 2270 | $as_echo_n "(cached) " >&6 |
| 2271 | else |
| 2272 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2273 | /* end confdefs.h. */ |
| 2274 | $4 |
| 2275 | int |
| 2276 | main () |
| 2277 | { |
| 2278 | #ifndef $as_decl_name |
| 2279 | #ifdef __cplusplus |
| 2280 | (void) $as_decl_use; |
| 2281 | #else |
| 2282 | (void) $as_decl_name; |
| 2283 | #endif |
| 2284 | #endif |
| 2285 | |
| 2286 | ; |
| 2287 | return 0; |
| 2288 | } |
| 2289 | _ACEOF |
| 2290 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2291 | eval "$3=yes" |
| 2292 | else |
| 2293 | eval "$3=no" |
| 2294 | fi |
| 2295 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2296 | fi |
| 2297 | eval ac_res=\$$3 |
| 2298 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 2299 | $as_echo "$ac_res" >&6; } |
| 2300 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 2301 | |
| 2302 | } # ac_fn_c_check_decl |
| 2303 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2304 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
| 2305 | # ---------------------------------------------------- |
| 2306 | # Tries to find if the field MEMBER exists in type AGGR, after including |
| 2307 | # INCLUDES, setting cache variable VAR accordingly. |
| 2308 | ac_fn_c_check_member () |
| 2309 | { |
| 2310 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 2311 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 |
| 2312 | $as_echo_n "checking for $2.$3... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 2313 | if eval \${$4+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2314 | $as_echo_n "(cached) " >&6 |
| 2315 | else |
| 2316 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2317 | /* end confdefs.h. */ |
| 2318 | $5 |
| 2319 | int |
| 2320 | main () |
| 2321 | { |
| 2322 | static $2 ac_aggr; |
| 2323 | if (ac_aggr.$3) |
| 2324 | return 0; |
| 2325 | ; |
| 2326 | return 0; |
| 2327 | } |
| 2328 | _ACEOF |
| 2329 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2330 | eval "$4=yes" |
| 2331 | else |
| 2332 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2333 | /* end confdefs.h. */ |
| 2334 | $5 |
| 2335 | int |
| 2336 | main () |
| 2337 | { |
| 2338 | static $2 ac_aggr; |
| 2339 | if (sizeof ac_aggr.$3) |
| 2340 | return 0; |
| 2341 | ; |
| 2342 | return 0; |
| 2343 | } |
| 2344 | _ACEOF |
| 2345 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2346 | eval "$4=yes" |
| 2347 | else |
| 2348 | eval "$4=no" |
| 2349 | fi |
| 2350 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2351 | fi |
| 2352 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2353 | fi |
| 2354 | eval ac_res=\$$4 |
| 2355 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 2356 | $as_echo "$ac_res" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 2357 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2358 | |
| 2359 | } # ac_fn_c_check_member |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2360 | cat >config.log <<_ACEOF |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2361 | This file contains any messages produced by compilers while |
| 2362 | running configure, to aid debugging if configure makes a mistake. |
| 2363 | |
Łukasz Langa | 9ab2fb1 | 2019-06-04 22:12:32 +0200 | [diff] [blame] | 2364 | It was created by python $as_me 3.9, which was |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 2365 | generated by GNU Autoconf 2.69. Invocation command line was |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2366 | |
| 2367 | $ $0 $@ |
| 2368 | |
| 2369 | _ACEOF |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2370 | exec 5>>config.log |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2371 | { |
| 2372 | cat <<_ASUNAME |
| 2373 | ## --------- ## |
| 2374 | ## Platform. ## |
| 2375 | ## --------- ## |
| 2376 | |
| 2377 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
| 2378 | uname -m = `(uname -m) 2>/dev/null || echo unknown` |
| 2379 | uname -r = `(uname -r) 2>/dev/null || echo unknown` |
| 2380 | uname -s = `(uname -s) 2>/dev/null || echo unknown` |
| 2381 | uname -v = `(uname -v) 2>/dev/null || echo unknown` |
| 2382 | |
| 2383 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
| 2384 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` |
| 2385 | |
| 2386 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
| 2387 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` |
| 2388 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2389 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2390 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` |
| 2391 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` |
| 2392 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` |
| 2393 | |
| 2394 | _ASUNAME |
| 2395 | |
| 2396 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 2397 | for as_dir in $PATH |
| 2398 | do |
| 2399 | IFS=$as_save_IFS |
| 2400 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2401 | $as_echo "PATH: $as_dir" |
| 2402 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2403 | IFS=$as_save_IFS |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2404 | |
| 2405 | } >&5 |
| 2406 | |
| 2407 | cat >&5 <<_ACEOF |
| 2408 | |
| 2409 | |
| 2410 | ## ----------- ## |
| 2411 | ## Core tests. ## |
| 2412 | ## ----------- ## |
| 2413 | |
| 2414 | _ACEOF |
| 2415 | |
| 2416 | |
| 2417 | # Keep a trace of the command line. |
| 2418 | # Strip out --no-create and --no-recursion so they do not pile up. |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2419 | # Strip out --silent because we don't want to record it for future runs. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2420 | # Also quote any args containing shell meta-characters. |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2421 | # Make two passes to allow for proper duplicate-argument suppression. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2422 | ac_configure_args= |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2423 | ac_configure_args0= |
| 2424 | ac_configure_args1= |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2425 | ac_must_keep_next=false |
| 2426 | for ac_pass in 1 2 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2427 | do |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2428 | for ac_arg |
| 2429 | do |
| 2430 | case $ac_arg in |
| 2431 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; |
| 2432 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| 2433 | | -silent | --silent | --silen | --sile | --sil) |
| 2434 | continue ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2435 | *\'*) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2436 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2437 | esac |
| 2438 | case $ac_pass in |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2439 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2440 | 2) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2441 | as_fn_append ac_configure_args1 " '$ac_arg'" |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2442 | if test $ac_must_keep_next = true; then |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 2443 | ac_must_keep_next=false # Got value, back to normal. |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2444 | else |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 2445 | case $ac_arg in |
| 2446 | *=* | --config-cache | -C | -disable-* | --disable-* \ |
| 2447 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ |
| 2448 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ |
| 2449 | | -with-* | --with-* | -without-* | --without-* | --x) |
| 2450 | case "$ac_configure_args0 " in |
| 2451 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; |
| 2452 | esac |
| 2453 | ;; |
| 2454 | -* ) ac_must_keep_next=true ;; |
| 2455 | esac |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2456 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2457 | as_fn_append ac_configure_args " '$ac_arg'" |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2458 | ;; |
| 2459 | esac |
| 2460 | done |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2461 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2462 | { ac_configure_args0=; unset ac_configure_args0;} |
| 2463 | { ac_configure_args1=; unset ac_configure_args1;} |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2464 | |
| 2465 | # When interrupted or exit'd, cleanup temporary files, and complete |
| 2466 | # config.log. We remove comments because anyway the quotes in there |
| 2467 | # would cause problems or look ugly. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2468 | # WARNING: Use '\'' to represent an apostrophe within the trap. |
| 2469 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2470 | trap 'exit_status=$? |
| 2471 | # Save into config.log some information that might help in debugging. |
| 2472 | { |
| 2473 | echo |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2474 | |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 2475 | $as_echo "## ---------------- ## |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2476 | ## Cache variables. ## |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 2477 | ## ---------------- ##" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2478 | echo |
| 2479 | # The following way of writing the cache mishandles newlines in values, |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2480 | ( |
| 2481 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do |
| 2482 | eval ac_val=\$$ac_var |
| 2483 | case $ac_val in #( |
| 2484 | *${as_nl}*) |
| 2485 | case $ac_var in #( |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2486 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 |
| 2487 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2488 | esac |
| 2489 | case $ac_var in #( |
| 2490 | _ | IFS | as_nl) ;; #( |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2491 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( |
| 2492 | *) { eval $ac_var=; unset $ac_var;} ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2493 | esac ;; |
| 2494 | esac |
| 2495 | done |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2496 | (set) 2>&1 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2497 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( |
| 2498 | *${as_nl}ac_space=\ *) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2499 | sed -n \ |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2500 | "s/'\''/'\''\\\\'\'''\''/g; |
| 2501 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" |
| 2502 | ;; #( |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 2503 | *) |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2504 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 2505 | ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2506 | esac | |
| 2507 | sort |
| 2508 | ) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2509 | echo |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2510 | |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 2511 | $as_echo "## ----------------- ## |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2512 | ## Output variables. ## |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 2513 | ## ----------------- ##" |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2514 | echo |
| 2515 | for ac_var in $ac_subst_vars |
| 2516 | do |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2517 | eval ac_val=\$$ac_var |
| 2518 | case $ac_val in |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2519 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2520 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2521 | $as_echo "$ac_var='\''$ac_val'\''" |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2522 | done | sort |
| 2523 | echo |
| 2524 | |
| 2525 | if test -n "$ac_subst_files"; then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 2526 | $as_echo "## ------------------- ## |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2527 | ## File substitutions. ## |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 2528 | ## ------------------- ##" |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2529 | echo |
| 2530 | for ac_var in $ac_subst_files |
| 2531 | do |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2532 | eval ac_val=\$$ac_var |
| 2533 | case $ac_val in |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2534 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2535 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2536 | $as_echo "$ac_var='\''$ac_val'\''" |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2537 | done | sort |
| 2538 | echo |
| 2539 | fi |
| 2540 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2541 | if test -s confdefs.h; then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 2542 | $as_echo "## ----------- ## |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2543 | ## confdefs.h. ## |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 2544 | ## ----------- ##" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2545 | echo |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2546 | cat confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2547 | echo |
| 2548 | fi |
| 2549 | test "$ac_signal" != 0 && |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2550 | $as_echo "$as_me: caught signal $ac_signal" |
| 2551 | $as_echo "$as_me: exit $exit_status" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2552 | } >&5 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2553 | rm -f core *.core core.conftest.* && |
| 2554 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2555 | exit $exit_status |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2556 | ' 0 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2557 | for ac_signal in 1 2 13 15; do |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2558 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2559 | done |
| 2560 | ac_signal=0 |
| 2561 | |
| 2562 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2563 | rm -f -r conftest* confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2564 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2565 | $as_echo "/* confdefs.h */" > confdefs.h |
| 2566 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2567 | # Predefined preprocessor variables. |
| 2568 | |
| 2569 | cat >>confdefs.h <<_ACEOF |
| 2570 | #define PACKAGE_NAME "$PACKAGE_NAME" |
| 2571 | _ACEOF |
| 2572 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2573 | cat >>confdefs.h <<_ACEOF |
| 2574 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" |
| 2575 | _ACEOF |
| 2576 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2577 | cat >>confdefs.h <<_ACEOF |
| 2578 | #define PACKAGE_VERSION "$PACKAGE_VERSION" |
| 2579 | _ACEOF |
| 2580 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2581 | cat >>confdefs.h <<_ACEOF |
| 2582 | #define PACKAGE_STRING "$PACKAGE_STRING" |
| 2583 | _ACEOF |
| 2584 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2585 | cat >>confdefs.h <<_ACEOF |
| 2586 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" |
| 2587 | _ACEOF |
| 2588 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2589 | cat >>confdefs.h <<_ACEOF |
| 2590 | #define PACKAGE_URL "$PACKAGE_URL" |
| 2591 | _ACEOF |
| 2592 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2593 | |
| 2594 | # Let the site file select an alternate cache file if it wants to. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2595 | # Prefer an explicitly selected file to automatically selected ones. |
| 2596 | ac_site_file1=NONE |
| 2597 | ac_site_file2=NONE |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2598 | if test -n "$CONFIG_SITE"; then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 2599 | # We do not want a PATH search for config.site. |
| 2600 | case $CONFIG_SITE in #(( |
| 2601 | -*) ac_site_file1=./$CONFIG_SITE;; |
| 2602 | */*) ac_site_file1=$CONFIG_SITE;; |
| 2603 | *) ac_site_file1=./$CONFIG_SITE;; |
| 2604 | esac |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2605 | elif test "x$prefix" != xNONE; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2606 | ac_site_file1=$prefix/share/config.site |
| 2607 | ac_site_file2=$prefix/etc/config.site |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2608 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2609 | ac_site_file1=$ac_default_prefix/share/config.site |
| 2610 | ac_site_file2=$ac_default_prefix/etc/config.site |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2611 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2612 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2613 | do |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2614 | test "x$ac_site_file" = xNONE && continue |
| 2615 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then |
| 2616 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 |
| 2617 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2618 | sed 's/^/| /' "$ac_site_file" >&5 |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 2619 | . "$ac_site_file" \ |
| 2620 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 2621 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 2622 | as_fn_error $? "failed to load site script $ac_site_file |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 2623 | See \`config.log' for more details" "$LINENO" 5; } |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2624 | fi |
| 2625 | done |
| 2626 | |
| 2627 | if test -r "$cache_file"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2628 | # Some versions of bash will fail to source /dev/null (special files |
| 2629 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. |
| 2630 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then |
| 2631 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 |
| 2632 | $as_echo "$as_me: loading cache $cache_file" >&6;} |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2633 | case $cache_file in |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2634 | [\\/]* | ?:[\\/]* ) . "$cache_file";; |
| 2635 | *) . "./$cache_file";; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2636 | esac |
| 2637 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2638 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2639 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 |
| 2640 | $as_echo "$as_me: creating cache $cache_file" >&6;} |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2641 | >$cache_file |
| 2642 | fi |
| 2643 | |
| 2644 | # Check that the precious variables saved in the cache have kept the same |
| 2645 | # value. |
| 2646 | ac_cache_corrupted=false |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2647 | for ac_var in $ac_precious_vars; do |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2648 | eval ac_old_set=\$ac_cv_env_${ac_var}_set |
| 2649 | eval ac_new_set=\$ac_env_${ac_var}_set |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2650 | eval ac_old_val=\$ac_cv_env_${ac_var}_value |
| 2651 | eval ac_new_val=\$ac_env_${ac_var}_value |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2652 | case $ac_old_set,$ac_new_set in |
| 2653 | set,) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2654 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 |
| 2655 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2656 | ac_cache_corrupted=: ;; |
| 2657 | ,set) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2658 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 |
| 2659 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2660 | ac_cache_corrupted=: ;; |
| 2661 | ,);; |
| 2662 | *) |
| 2663 | if test "x$ac_old_val" != "x$ac_new_val"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2664 | # differences in whitespace do not lead to failure. |
| 2665 | ac_old_val_w=`echo x $ac_old_val` |
| 2666 | ac_new_val_w=`echo x $ac_new_val` |
| 2667 | if test "$ac_old_val_w" != "$ac_new_val_w"; then |
| 2668 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 |
| 2669 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} |
| 2670 | ac_cache_corrupted=: |
| 2671 | else |
| 2672 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 |
| 2673 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} |
| 2674 | eval $ac_var=\$ac_old_val |
| 2675 | fi |
| 2676 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 |
| 2677 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} |
| 2678 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 |
| 2679 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2680 | fi;; |
| 2681 | esac |
| 2682 | # Pass precious variables to config.status. |
| 2683 | if test "$ac_new_set" = set; then |
| 2684 | case $ac_new_val in |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2685 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2686 | *) ac_arg=$ac_var=$ac_new_val ;; |
| 2687 | esac |
| 2688 | case " $ac_configure_args " in |
| 2689 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2690 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2691 | esac |
| 2692 | fi |
| 2693 | done |
| 2694 | if $ac_cache_corrupted; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2695 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 2696 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 2697 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 |
| 2698 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 2699 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2700 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2701 | ## -------------------- ## |
| 2702 | ## Main body of script. ## |
| 2703 | ## -------------------- ## |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2704 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2705 | ac_ext=c |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2706 | ac_cpp='$CPP $CPPFLAGS' |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2707 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 2708 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 2709 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2710 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2711 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2712 | |
Trent Nelson | 4d4ec65 | 2012-10-16 08:51:24 -0400 | [diff] [blame] | 2713 | |
Christian Heimes | ff5be6e | 2018-01-20 13:19:21 +0100 | [diff] [blame] | 2714 | |
| 2715 | |
Martin Panter | c5ee3ca | 2016-09-12 01:32:03 +0000 | [diff] [blame] | 2716 | if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then |
Trent Nelson | 4d4ec65 | 2012-10-16 08:51:24 -0400 | [diff] [blame] | 2717 | # If we're building out-of-tree, we need to make sure the following |
| 2718 | # resources get picked up before their $srcdir counterparts. |
| 2719 | # Objects/ -> typeslots.inc |
| 2720 | # Include/ -> Python-ast.h, graminit.h |
| 2721 | # Python/ -> importlib.h |
| 2722 | # (A side effect of this is that these resources will automatically be |
| 2723 | # regenerated when building out-of-tree, regardless of whether or not |
| 2724 | # the $srcdir counterpart is up-to-date. This is an acceptable trade |
| 2725 | # off.) |
| 2726 | BASECPPFLAGS="-IObjects -IInclude -IPython" |
| 2727 | else |
| 2728 | BASECPPFLAGS="" |
| 2729 | fi |
| 2730 | |
Benjamin Peterson | 8c6f88e | 2011-05-31 20:52:17 -0500 | [diff] [blame] | 2731 | |
| 2732 | |
| 2733 | |
| 2734 | |
Victor Stinner | 9ed34a8 | 2017-05-02 22:35:58 +0200 | [diff] [blame] | 2735 | if test -e $srcdir/.git |
Benjamin Peterson | 8c6f88e | 2011-05-31 20:52:17 -0500 | [diff] [blame] | 2736 | then |
Ned Deily | 5c4b0d0 | 2017-03-04 00:19:55 -0500 | [diff] [blame] | 2737 | # Extract the first word of "git", so it can be a program name with args. |
| 2738 | set dummy git; ac_word=$2 |
Benjamin Peterson | 8c6f88e | 2011-05-31 20:52:17 -0500 | [diff] [blame] | 2739 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 2740 | $as_echo_n "checking for $ac_word... " >&6; } |
Ned Deily | 5c4b0d0 | 2017-03-04 00:19:55 -0500 | [diff] [blame] | 2741 | if ${ac_cv_prog_HAS_GIT+:} false; then : |
Benjamin Peterson | 8c6f88e | 2011-05-31 20:52:17 -0500 | [diff] [blame] | 2742 | $as_echo_n "(cached) " >&6 |
| 2743 | else |
Ned Deily | 5c4b0d0 | 2017-03-04 00:19:55 -0500 | [diff] [blame] | 2744 | if test -n "$HAS_GIT"; then |
| 2745 | ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test. |
Benjamin Peterson | 8c6f88e | 2011-05-31 20:52:17 -0500 | [diff] [blame] | 2746 | else |
| 2747 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 2748 | for as_dir in $PATH |
| 2749 | do |
| 2750 | IFS=$as_save_IFS |
| 2751 | test -z "$as_dir" && as_dir=. |
| 2752 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 646eb1e | 2012-10-29 17:35:57 +0000 | [diff] [blame] | 2753 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
Ned Deily | 5c4b0d0 | 2017-03-04 00:19:55 -0500 | [diff] [blame] | 2754 | ac_cv_prog_HAS_GIT="found" |
Benjamin Peterson | 8c6f88e | 2011-05-31 20:52:17 -0500 | [diff] [blame] | 2755 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 2756 | break 2 |
| 2757 | fi |
| 2758 | done |
| 2759 | done |
| 2760 | IFS=$as_save_IFS |
| 2761 | |
Ned Deily | 5c4b0d0 | 2017-03-04 00:19:55 -0500 | [diff] [blame] | 2762 | test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found" |
Benjamin Peterson | 8c6f88e | 2011-05-31 20:52:17 -0500 | [diff] [blame] | 2763 | fi |
| 2764 | fi |
Ned Deily | 5c4b0d0 | 2017-03-04 00:19:55 -0500 | [diff] [blame] | 2765 | HAS_GIT=$ac_cv_prog_HAS_GIT |
| 2766 | if test -n "$HAS_GIT"; then |
| 2767 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5 |
| 2768 | $as_echo "$HAS_GIT" >&6; } |
Benjamin Peterson | 8c6f88e | 2011-05-31 20:52:17 -0500 | [diff] [blame] | 2769 | else |
| 2770 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 2771 | $as_echo "no" >&6; } |
| 2772 | fi |
| 2773 | |
| 2774 | |
| 2775 | else |
Ned Deily | 5c4b0d0 | 2017-03-04 00:19:55 -0500 | [diff] [blame] | 2776 | HAS_GIT=no-repository |
Benjamin Peterson | 8c6f88e | 2011-05-31 20:52:17 -0500 | [diff] [blame] | 2777 | fi |
Ned Deily | 5c4b0d0 | 2017-03-04 00:19:55 -0500 | [diff] [blame] | 2778 | if test $HAS_GIT = found |
Benjamin Peterson | 8c6f88e | 2011-05-31 20:52:17 -0500 | [diff] [blame] | 2779 | then |
Xiang Zhang | 4c85557 | 2018-08-20 22:36:19 +0800 | [diff] [blame] | 2780 | GITVERSION="git --git-dir \$(srcdir)/.git rev-parse --short HEAD" |
| 2781 | GITTAG="git --git-dir \$(srcdir)/.git describe --all --always --dirty" |
| 2782 | GITBRANCH="git --git-dir \$(srcdir)/.git name-rev --name-only HEAD" |
Benjamin Peterson | 8c6f88e | 2011-05-31 20:52:17 -0500 | [diff] [blame] | 2783 | else |
Ned Deily | 5c4b0d0 | 2017-03-04 00:19:55 -0500 | [diff] [blame] | 2784 | GITVERSION="" |
| 2785 | GITTAG="" |
| 2786 | GITBRANCH="" |
Benjamin Peterson | 8c6f88e | 2011-05-31 20:52:17 -0500 | [diff] [blame] | 2787 | fi |
| 2788 | |
| 2789 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2790 | ac_config_headers="$ac_config_headers pyconfig.h" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2791 | |
| 2792 | |
Matthias Klose | ca2f6ec | 2012-03-15 21:30:11 +0100 | [diff] [blame] | 2793 | ac_aux_dir= |
| 2794 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do |
| 2795 | if test -f "$ac_dir/install-sh"; then |
| 2796 | ac_aux_dir=$ac_dir |
| 2797 | ac_install_sh="$ac_aux_dir/install-sh -c" |
| 2798 | break |
| 2799 | elif test -f "$ac_dir/install.sh"; then |
| 2800 | ac_aux_dir=$ac_dir |
| 2801 | ac_install_sh="$ac_aux_dir/install.sh -c" |
| 2802 | break |
| 2803 | elif test -f "$ac_dir/shtool"; then |
| 2804 | ac_aux_dir=$ac_dir |
| 2805 | ac_install_sh="$ac_aux_dir/shtool install -c" |
| 2806 | break |
| 2807 | fi |
| 2808 | done |
| 2809 | if test -z "$ac_aux_dir"; then |
| 2810 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 |
| 2811 | fi |
| 2812 | |
| 2813 | # These three variables are undocumented and unsupported, |
| 2814 | # and are intended to be withdrawn in a future Autoconf release. |
| 2815 | # They can cause serious problems if a builder's source tree is in a directory |
| 2816 | # whose full name contains unusual characters. |
| 2817 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. |
| 2818 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. |
| 2819 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. |
| 2820 | |
| 2821 | |
| 2822 | # Make sure we can run config.sub. |
| 2823 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || |
| 2824 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
| 2825 | |
| 2826 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 |
| 2827 | $as_echo_n "checking build system type... " >&6; } |
| 2828 | if ${ac_cv_build+:} false; then : |
| 2829 | $as_echo_n "(cached) " >&6 |
| 2830 | else |
| 2831 | ac_build_alias=$build_alias |
| 2832 | test "x$ac_build_alias" = x && |
| 2833 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` |
| 2834 | test "x$ac_build_alias" = x && |
| 2835 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 |
| 2836 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
| 2837 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
| 2838 | |
| 2839 | fi |
| 2840 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
| 2841 | $as_echo "$ac_cv_build" >&6; } |
| 2842 | case $ac_cv_build in |
| 2843 | *-*-*) ;; |
| 2844 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; |
| 2845 | esac |
| 2846 | build=$ac_cv_build |
| 2847 | ac_save_IFS=$IFS; IFS='-' |
| 2848 | set x $ac_cv_build |
| 2849 | shift |
| 2850 | build_cpu=$1 |
| 2851 | build_vendor=$2 |
| 2852 | shift; shift |
| 2853 | # Remember, the first character of IFS is used to create $*, |
| 2854 | # except with old shells: |
| 2855 | build_os=$* |
| 2856 | IFS=$ac_save_IFS |
| 2857 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac |
| 2858 | |
| 2859 | |
| 2860 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
| 2861 | $as_echo_n "checking host system type... " >&6; } |
| 2862 | if ${ac_cv_host+:} false; then : |
| 2863 | $as_echo_n "(cached) " >&6 |
| 2864 | else |
| 2865 | if test "x$host_alias" = x; then |
| 2866 | ac_cv_host=$ac_cv_build |
| 2867 | else |
| 2868 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
| 2869 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
| 2870 | fi |
| 2871 | |
| 2872 | fi |
| 2873 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
| 2874 | $as_echo "$ac_cv_host" >&6; } |
| 2875 | case $ac_cv_host in |
| 2876 | *-*-*) ;; |
| 2877 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; |
| 2878 | esac |
| 2879 | host=$ac_cv_host |
| 2880 | ac_save_IFS=$IFS; IFS='-' |
| 2881 | set x $ac_cv_host |
| 2882 | shift |
| 2883 | host_cpu=$1 |
| 2884 | host_vendor=$2 |
| 2885 | shift; shift |
| 2886 | # Remember, the first character of IFS is used to create $*, |
| 2887 | # except with old shells: |
| 2888 | host_os=$* |
| 2889 | IFS=$ac_save_IFS |
| 2890 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac |
| 2891 | |
| 2892 | |
| 2893 | |
doko@python.org | a10e4a9 | 2013-01-25 18:45:12 +0100 | [diff] [blame] | 2894 | |
| 2895 | |
Ned Deily | fcbc246 | 2014-08-22 13:32:49 -0700 | [diff] [blame] | 2896 | # pybuilddir.txt will be created by --generate-posix-vars in the Makefile |
| 2897 | rm -f pybuilddir.txt |
| 2898 | |
Xavier de Gaye | fd0d593 | 2016-07-26 12:48:08 +0200 | [diff] [blame] | 2899 | for ac_prog in python$PACKAGE_VERSION python3 python |
| 2900 | do |
| 2901 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 2902 | set dummy $ac_prog; ac_word=$2 |
| 2903 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 2904 | $as_echo_n "checking for $ac_word... " >&6; } |
Victor Stinner | a5c62a8 | 2017-05-03 18:21:48 +0200 | [diff] [blame] | 2905 | if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then : |
Xavier de Gaye | fd0d593 | 2016-07-26 12:48:08 +0200 | [diff] [blame] | 2906 | $as_echo_n "(cached) " >&6 |
| 2907 | else |
Victor Stinner | a5c62a8 | 2017-05-03 18:21:48 +0200 | [diff] [blame] | 2908 | if test -n "$PYTHON_FOR_REGEN"; then |
| 2909 | ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test. |
Xavier de Gaye | fd0d593 | 2016-07-26 12:48:08 +0200 | [diff] [blame] | 2910 | else |
| 2911 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 2912 | for as_dir in $PATH |
| 2913 | do |
| 2914 | IFS=$as_save_IFS |
| 2915 | test -z "$as_dir" && as_dir=. |
| 2916 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 2917 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
Victor Stinner | a5c62a8 | 2017-05-03 18:21:48 +0200 | [diff] [blame] | 2918 | ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog" |
Xavier de Gaye | fd0d593 | 2016-07-26 12:48:08 +0200 | [diff] [blame] | 2919 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 2920 | break 2 |
| 2921 | fi |
| 2922 | done |
| 2923 | done |
| 2924 | IFS=$as_save_IFS |
| 2925 | |
| 2926 | fi |
| 2927 | fi |
Victor Stinner | a5c62a8 | 2017-05-03 18:21:48 +0200 | [diff] [blame] | 2928 | PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN |
| 2929 | if test -n "$PYTHON_FOR_REGEN"; then |
| 2930 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5 |
| 2931 | $as_echo "$PYTHON_FOR_REGEN" >&6; } |
Xavier de Gaye | fd0d593 | 2016-07-26 12:48:08 +0200 | [diff] [blame] | 2932 | else |
| 2933 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 2934 | $as_echo "no" >&6; } |
| 2935 | fi |
| 2936 | |
| 2937 | |
Victor Stinner | a5c62a8 | 2017-05-03 18:21:48 +0200 | [diff] [blame] | 2938 | test -n "$PYTHON_FOR_REGEN" && break |
Xavier de Gaye | fd0d593 | 2016-07-26 12:48:08 +0200 | [diff] [blame] | 2939 | done |
Victor Stinner | a5c62a8 | 2017-05-03 18:21:48 +0200 | [diff] [blame] | 2940 | test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3" |
Xavier de Gaye | fd0d593 | 2016-07-26 12:48:08 +0200 | [diff] [blame] | 2941 | |
Xavier de Gaye | fd0d593 | 2016-07-26 12:48:08 +0200 | [diff] [blame] | 2942 | |
| 2943 | |
doko@ubuntu.com | 1abe1c5 | 2012-06-30 20:42:45 +0200 | [diff] [blame] | 2944 | if test "$cross_compiling" = yes; then |
| 2945 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5 |
| 2946 | $as_echo_n "checking for python interpreter for cross build... " >&6; } |
| 2947 | if test -z "$PYTHON_FOR_BUILD"; then |
| 2948 | for interp in python$PACKAGE_VERSION python3 python; do |
| 2949 | which $interp >/dev/null 2>&1 || continue |
Xavier de Gaye | 4afd143 | 2016-07-07 18:00:22 +0200 | [diff] [blame] | 2950 | if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then |
doko@ubuntu.com | 1abe1c5 | 2012-06-30 20:42:45 +0200 | [diff] [blame] | 2951 | break |
| 2952 | fi |
| 2953 | interp= |
| 2954 | done |
| 2955 | if test x$interp = x; then |
| 2956 | as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5 |
| 2957 | fi |
| 2958 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5 |
| 2959 | $as_echo "$interp" >&6; } |
Xavier de Gaye | 92dec54 | 2016-09-11 22:22:24 +0200 | [diff] [blame] | 2960 | PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp |
doko@ubuntu.com | 1abe1c5 | 2012-06-30 20:42:45 +0200 | [diff] [blame] | 2961 | fi |
Christian Heimes | 954ac03 | 2012-12-12 13:10:21 +0100 | [diff] [blame] | 2962 | elif test "$cross_compiling" = maybe; then |
| 2963 | as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5 |
doko@ubuntu.com | 1abe1c5 | 2012-06-30 20:42:45 +0200 | [diff] [blame] | 2964 | else |
| 2965 | PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E' |
| 2966 | fi |
| 2967 | |
| 2968 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2969 | |
Benjamin Peterson | d23f822 | 2009-04-05 19:13:16 +0000 | [diff] [blame] | 2970 | if test "$prefix" != "/"; then |
| 2971 | prefix=`echo "$prefix" | sed -e 's/\/$//g'` |
| 2972 | fi |
| 2973 | |
| 2974 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2975 | |
| 2976 | |
Martin v. Löwis | 8316feb | 2003-06-14 07:48:07 +0000 | [diff] [blame] | 2977 | # We don't use PACKAGE_ variables, and they cause conflicts |
| 2978 | # with other autoconf-based packages that include Python.h |
| 2979 | grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new |
| 2980 | rm confdefs.h |
| 2981 | mv confdefs.h.new confdefs.h |
| 2982 | |
Martin v. Löwis | bddf5a5 | 2002-11-11 13:37:28 +0000 | [diff] [blame] | 2983 | |
Łukasz Langa | 9ab2fb1 | 2019-06-04 22:12:32 +0200 | [diff] [blame] | 2984 | VERSION=3.9 |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 2985 | |
Benjamin Peterson | d7f73e9 | 2010-09-05 00:09:07 +0000 | [diff] [blame] | 2986 | # Version number of Python's own shared library file. |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2987 | |
| 2988 | SOVERSION=1.0 |
| 2989 | |
Martin v. Löwis | 6f18a3c | 2002-07-20 08:51:52 +0000 | [diff] [blame] | 2990 | # The later defininition of _XOPEN_SOURCE disables certain features |
| 2991 | # on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone). |
| 2992 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2993 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
Martin v. Löwis | 6f18a3c | 2002-07-20 08:51:52 +0000 | [diff] [blame] | 2994 | |
| 2995 | |
Martin v. Löwis | bcd9396 | 2003-05-03 10:32:18 +0000 | [diff] [blame] | 2996 | # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables |
| 2997 | # certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable |
| 2998 | # them. |
| 2999 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3000 | $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h |
Martin v. Löwis | bcd9396 | 2003-05-03 10:32:18 +0000 | [diff] [blame] | 3001 | |
| 3002 | |
Andrew MacIntyre | abccf41 | 2003-07-02 13:53:25 +0000 | [diff] [blame] | 3003 | # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables |
| 3004 | # certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable |
| 3005 | # them. |
| 3006 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3007 | $as_echo "#define __BSD_VISIBLE 1" >>confdefs.h |
Andrew MacIntyre | abccf41 | 2003-07-02 13:53:25 +0000 | [diff] [blame] | 3008 | |
| 3009 | |
Martin v. Löwis | d632050 | 2004-08-12 13:45:08 +0000 | [diff] [blame] | 3010 | # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables |
Benjamin Peterson | 14ae959 | 2008-07-16 02:20:15 +0000 | [diff] [blame] | 3011 | # certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable |
| 3012 | # them. |
| 3013 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3014 | $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h |
Benjamin Peterson | 14ae959 | 2008-07-16 02:20:15 +0000 | [diff] [blame] | 3015 | |
| 3016 | |
| 3017 | |
Martin v. Löwis | 35195ad | 2002-11-11 13:26:51 +0000 | [diff] [blame] | 3018 | define_xopen_source=yes |
Martin v. Löwis | 6f18a3c | 2002-07-20 08:51:52 +0000 | [diff] [blame] | 3019 | |
Neil Schemenauer | 4edbc2a | 2001-03-22 00:34:03 +0000 | [diff] [blame] | 3020 | # Arguments passed to configure. |
| 3021 | |
| 3022 | CONFIG_ARGS="$ac_configure_args" |
| 3023 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3024 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5 |
| 3025 | $as_echo_n "checking for --enable-universalsdk... " >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3026 | # Check whether --enable-universalsdk was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3027 | if test "${enable_universalsdk+set}" = set; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3028 | enableval=$enable_universalsdk; |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3029 | case $enableval in |
| 3030 | yes) |
Serhiy Storchaka | 88cc339 | 2018-06-04 08:20:25 +0300 | [diff] [blame] | 3031 | # Locate the best usable SDK, see Mac/README for more |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 3032 | # information |
| 3033 | enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`" |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 3034 | if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null ) |
Ronald Oussoren | 8af24c1 | 2010-02-07 12:03:42 +0000 | [diff] [blame] | 3035 | then |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 3036 | enableval=/Developer/SDKs/MacOSX10.4u.sdk |
| 3037 | if test ! -d "${enableval}" |
| 3038 | then |
| 3039 | enableval=/ |
| 3040 | fi |
Ronald Oussoren | 8af24c1 | 2010-02-07 12:03:42 +0000 | [diff] [blame] | 3041 | fi |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3042 | ;; |
| 3043 | esac |
| 3044 | case $enableval in |
| 3045 | no) |
| 3046 | UNIVERSALSDK= |
| 3047 | enable_universalsdk= |
| 3048 | ;; |
| 3049 | *) |
| 3050 | UNIVERSALSDK=$enableval |
Ronald Oussoren | 8af24c1 | 2010-02-07 12:03:42 +0000 | [diff] [blame] | 3051 | if test ! -d "${UNIVERSALSDK}" |
| 3052 | then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 3053 | as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5 |
Ronald Oussoren | 8af24c1 | 2010-02-07 12:03:42 +0000 | [diff] [blame] | 3054 | fi |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3055 | ;; |
| 3056 | esac |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3057 | |
Ronald Oussoren | 8af24c1 | 2010-02-07 12:03:42 +0000 | [diff] [blame] | 3058 | |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3059 | else |
| 3060 | |
| 3061 | UNIVERSALSDK= |
| 3062 | enable_universalsdk= |
| 3063 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3064 | fi |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3065 | |
Ronald Oussoren | 8af24c1 | 2010-02-07 12:03:42 +0000 | [diff] [blame] | 3066 | if test -n "${UNIVERSALSDK}" |
| 3067 | then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3068 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5 |
| 3069 | $as_echo "${UNIVERSALSDK}" >&6; } |
Ronald Oussoren | 8af24c1 | 2010-02-07 12:03:42 +0000 | [diff] [blame] | 3070 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3071 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3072 | $as_echo "no" >&6; } |
Ronald Oussoren | 8af24c1 | 2010-02-07 12:03:42 +0000 | [diff] [blame] | 3073 | fi |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3074 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3075 | |
Benjamin Peterson | 6794aa3 | 2008-07-16 20:33:37 +0000 | [diff] [blame] | 3076 | |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 3077 | ARCH_RUN_32BIT="" |
Benjamin Peterson | 6794aa3 | 2008-07-16 20:33:37 +0000 | [diff] [blame] | 3078 | |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 3079 | # For backward compatibility reasons we prefer to select '32-bit' if available, |
| 3080 | # otherwise use 'intel' |
Benjamin Peterson | 14ae959 | 2008-07-16 02:20:15 +0000 | [diff] [blame] | 3081 | UNIVERSAL_ARCHS="32-bit" |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 3082 | if test "`uname -s`" = "Darwin" |
| 3083 | then |
| 3084 | if test -n "${UNIVERSALSDK}" |
| 3085 | then |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 3086 | if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`" |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 3087 | then |
| 3088 | UNIVERSAL_ARCHS="intel" |
| 3089 | fi |
| 3090 | fi |
| 3091 | fi |
| 3092 | |
Ronald Oussoren | 6f6c562 | 2009-12-24 14:03:19 +0000 | [diff] [blame] | 3093 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3094 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5 |
| 3095 | $as_echo_n "checking for --with-universal-archs... " >&6; } |
Benjamin Peterson | 14ae959 | 2008-07-16 02:20:15 +0000 | [diff] [blame] | 3096 | |
| 3097 | # Check whether --with-universal-archs was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3098 | if test "${with_universal_archs+set}" = set; then : |
Benjamin Peterson | 14ae959 | 2008-07-16 02:20:15 +0000 | [diff] [blame] | 3099 | withval=$with_universal_archs; |
Benjamin Peterson | 14ae959 | 2008-07-16 02:20:15 +0000 | [diff] [blame] | 3100 | UNIVERSAL_ARCHS="$withval" |
| 3101 | |
Benjamin Peterson | 14ae959 | 2008-07-16 02:20:15 +0000 | [diff] [blame] | 3102 | fi |
| 3103 | |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 3104 | if test -n "${UNIVERSALSDK}" |
| 3105 | then |
| 3106 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5 |
| 3107 | $as_echo "${UNIVERSAL_ARCHS}" >&6; } |
| 3108 | else |
| 3109 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3110 | $as_echo "no" >&6; } |
| 3111 | fi |
Benjamin Peterson | 14ae959 | 2008-07-16 02:20:15 +0000 | [diff] [blame] | 3112 | |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 3113 | |
| 3114 | # Check whether --with-framework-name was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3115 | if test "${with_framework_name+set}" = set; then : |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 3116 | withval=$with_framework_name; |
| 3117 | PYTHONFRAMEWORK=${withval} |
| 3118 | PYTHONFRAMEWORKDIR=${withval}.framework |
| 3119 | PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'` |
| 3120 | |
| 3121 | else |
| 3122 | |
| 3123 | PYTHONFRAMEWORK=Python |
| 3124 | PYTHONFRAMEWORKDIR=Python.framework |
| 3125 | PYTHONFRAMEWORKIDENTIFIER=org.python.python |
| 3126 | |
| 3127 | fi |
| 3128 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3129 | # Check whether --enable-framework was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3130 | if test "${enable_framework+set}" = set; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3131 | enableval=$enable_framework; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3132 | case $enableval in |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3133 | yes) |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3134 | enableval=/Library/Frameworks |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3135 | esac |
| 3136 | case $enableval in |
| 3137 | no) |
| 3138 | PYTHONFRAMEWORK= |
| 3139 | PYTHONFRAMEWORKDIR=no-framework |
| 3140 | PYTHONFRAMEWORKPREFIX= |
| 3141 | PYTHONFRAMEWORKINSTALLDIR= |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3142 | FRAMEWORKINSTALLFIRST= |
| 3143 | FRAMEWORKINSTALLLAST= |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 3144 | FRAMEWORKALTINSTALLFIRST= |
| 3145 | FRAMEWORKALTINSTALLLAST= |
Ned Deily | b8f944f | 2013-11-21 22:42:25 -0800 | [diff] [blame] | 3146 | FRAMEWORKPYTHONW= |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 3147 | if test "x${prefix}" = "xNONE"; then |
| 3148 | FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}" |
| 3149 | else |
| 3150 | FRAMEWORKUNIXTOOLSPREFIX="${prefix}" |
| 3151 | fi |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3152 | enable_framework= |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3153 | ;; |
| 3154 | *) |
Ronald Oussoren | 86b33c8 | 2010-04-30 11:41:56 +0000 | [diff] [blame] | 3155 | PYTHONFRAMEWORKPREFIX="${enableval}" |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3156 | PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3157 | FRAMEWORKINSTALLFIRST="frameworkinstallstructure" |
Ronald Oussoren | f6ccbf6 | 2009-06-02 10:55:56 +0000 | [diff] [blame] | 3158 | FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure " |
Ronald Oussoren | 6f6c562 | 2009-12-24 14:03:19 +0000 | [diff] [blame] | 3159 | FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools" |
| 3160 | FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools" |
Ned Deily | b8f944f | 2013-11-21 22:42:25 -0800 | [diff] [blame] | 3161 | FRAMEWORKPYTHONW="frameworkpythonw" |
Ronald Oussoren | 86b33c8 | 2010-04-30 11:41:56 +0000 | [diff] [blame] | 3162 | FRAMEWORKINSTALLAPPSPREFIX="/Applications" |
Benjamin Peterson | 14ae959 | 2008-07-16 02:20:15 +0000 | [diff] [blame] | 3163 | |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 3164 | if test "x${prefix}" = "xNONE" ; then |
| 3165 | FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}" |
Ronald Oussoren | 86b33c8 | 2010-04-30 11:41:56 +0000 | [diff] [blame] | 3166 | |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 3167 | else |
| 3168 | FRAMEWORKUNIXTOOLSPREFIX="${prefix}" |
| 3169 | fi |
Ronald Oussoren | 86b33c8 | 2010-04-30 11:41:56 +0000 | [diff] [blame] | 3170 | |
| 3171 | case "${enableval}" in |
| 3172 | /System*) |
| 3173 | FRAMEWORKINSTALLAPPSPREFIX="/Applications" |
| 3174 | if test "${prefix}" = "NONE" ; then |
| 3175 | # See below |
| 3176 | FRAMEWORKUNIXTOOLSPREFIX="/usr" |
| 3177 | fi |
| 3178 | ;; |
| 3179 | |
| 3180 | /Library*) |
| 3181 | FRAMEWORKINSTALLAPPSPREFIX="/Applications" |
| 3182 | ;; |
| 3183 | |
| 3184 | */Library/Frameworks) |
| 3185 | MDIR="`dirname "${enableval}"`" |
| 3186 | MDIR="`dirname "${MDIR}"`" |
| 3187 | FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications" |
| 3188 | |
| 3189 | if test "${prefix}" = "NONE"; then |
| 3190 | # User hasn't specified the |
| 3191 | # --prefix option, but wants to install |
| 3192 | # the framework in a non-default location, |
| 3193 | # ensure that the compatibility links get |
| 3194 | # installed relative to that prefix as well |
| 3195 | # instead of in /usr/local. |
| 3196 | FRAMEWORKUNIXTOOLSPREFIX="${MDIR}" |
| 3197 | fi |
| 3198 | ;; |
| 3199 | |
| 3200 | *) |
| 3201 | FRAMEWORKINSTALLAPPSPREFIX="/Applications" |
| 3202 | ;; |
| 3203 | esac |
| 3204 | |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3205 | prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3206 | |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 3207 | # Add files for Mac specific code to the list of output |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3208 | # files: |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3209 | ac_config_files="$ac_config_files Mac/Makefile" |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3210 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3211 | ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile" |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3212 | |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 3213 | ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist" |
| 3214 | |
| 3215 | ac_config_files="$ac_config_files Mac/Resources/app/Info.plist" |
| 3216 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3217 | esac |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3218 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3219 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3220 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3221 | PYTHONFRAMEWORK= |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3222 | PYTHONFRAMEWORKDIR=no-framework |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3223 | PYTHONFRAMEWORKPREFIX= |
| 3224 | PYTHONFRAMEWORKINSTALLDIR= |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3225 | FRAMEWORKINSTALLFIRST= |
| 3226 | FRAMEWORKINSTALLLAST= |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 3227 | FRAMEWORKALTINSTALLFIRST= |
| 3228 | FRAMEWORKALTINSTALLLAST= |
Ned Deily | b8f944f | 2013-11-21 22:42:25 -0800 | [diff] [blame] | 3229 | FRAMEWORKPYTHONW= |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 3230 | if test "x${prefix}" = "xNONE" ; then |
| 3231 | FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}" |
| 3232 | else |
| 3233 | FRAMEWORKUNIXTOOLSPREFIX="${prefix}" |
| 3234 | fi |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3235 | enable_framework= |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3236 | |
Benjamin Peterson | 14ae959 | 2008-07-16 02:20:15 +0000 | [diff] [blame] | 3237 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3238 | fi |
| 3239 | |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3240 | |
| 3241 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3242 | |
| 3243 | |
| 3244 | |
| 3245 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3246 | |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 3247 | |
| 3248 | |
| 3249 | |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 3250 | |
Ronald Oussoren | 86b33c8 | 2010-04-30 11:41:56 +0000 | [diff] [blame] | 3251 | |
Ned Deily | b8f944f | 2013-11-21 22:42:25 -0800 | [diff] [blame] | 3252 | |
INADA Naoki | a8f8d5b | 2017-06-29 00:31:53 +0900 | [diff] [blame] | 3253 | |
| 3254 | cat >>confdefs.h <<_ACEOF |
INADA Naoki | 6b42eb1 | 2017-06-29 15:31:38 +0900 | [diff] [blame] | 3255 | #define _PYTHONFRAMEWORK "${PYTHONFRAMEWORK}" |
INADA Naoki | a8f8d5b | 2017-06-29 00:31:53 +0900 | [diff] [blame] | 3256 | _ACEOF |
| 3257 | |
| 3258 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3259 | ##AC_ARG_WITH(dyld, |
Matthias Klose | 2b8733f | 2010-04-25 18:34:36 +0000 | [diff] [blame] | 3260 | ## AS_HELP_STRING([--with-dyld], |
Anthony Shaw | 2de064e | 2020-01-14 17:40:10 +1100 | [diff] [blame] | 3261 | ## [use (OpenStep|Rhapsody) dynamic linker])) |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3262 | ## |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3263 | # Set name for machine-dependent library files |
| 3264 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3265 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5 |
| 3266 | $as_echo_n "checking MACHDEP... " >&6; } |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3267 | if test -z "$MACHDEP" |
| 3268 | then |
Matthias Klose | df2aecb | 2012-03-15 22:19:28 +0100 | [diff] [blame] | 3269 | # avoid using uname for cross builds |
| 3270 | if test "$cross_compiling" = yes; then |
doko@python.org | 44bbbda | 2013-01-25 14:44:00 +0100 | [diff] [blame] | 3271 | # ac_sys_system and ac_sys_release are used for setting |
| 3272 | # a lot of different things including 'define_xopen_source' |
| 3273 | # in the case statement below. |
Matthias Klose | df2aecb | 2012-03-15 22:19:28 +0100 | [diff] [blame] | 3274 | case "$host" in |
Xavier de Gaye | 2a352b6 | 2017-01-04 21:51:16 +0100 | [diff] [blame] | 3275 | *-*-linux-android*) |
| 3276 | ac_sys_system=Linux-android |
| 3277 | ;; |
Matthias Klose | df2aecb | 2012-03-15 22:19:28 +0100 | [diff] [blame] | 3278 | *-*-linux*) |
| 3279 | ac_sys_system=Linux |
| 3280 | ;; |
| 3281 | *-*-cygwin*) |
| 3282 | ac_sys_system=Cygwin |
| 3283 | ;; |
pxinwr | 32f5fdd | 2019-02-27 19:09:28 +0800 | [diff] [blame] | 3284 | *-*-vxworks*) |
| 3285 | ac_sys_system=VxWorks |
| 3286 | ;; |
Matthias Klose | df2aecb | 2012-03-15 22:19:28 +0100 | [diff] [blame] | 3287 | *) |
| 3288 | # for now, limit cross builds to known configurations |
| 3289 | MACHDEP="unknown" |
| 3290 | as_fn_error $? "cross build not supported for $host" "$LINENO" 5 |
| 3291 | esac |
| 3292 | ac_sys_release= |
| 3293 | else |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3294 | ac_sys_system=`uname -s` |
Benjamin Peterson | 8719ad5 | 2009-09-11 22:24:02 +0000 | [diff] [blame] | 3295 | if test "$ac_sys_system" = "AIX" \ |
Martin v. Löwis | 21ee409 | 2002-09-30 16:19:48 +0000 | [diff] [blame] | 3296 | -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3297 | ac_sys_release=`uname -v` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3298 | else |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3299 | ac_sys_release=`uname -r` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3300 | fi |
Matthias Klose | df2aecb | 2012-03-15 22:19:28 +0100 | [diff] [blame] | 3301 | fi |
| 3302 | ac_md_system=`echo $ac_sys_system | |
| 3303 | tr -d '/ ' | tr '[A-Z]' '[a-z]'` |
| 3304 | ac_md_release=`echo $ac_sys_release | |
| 3305 | tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'` |
| 3306 | MACHDEP="$ac_md_system$ac_md_release" |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3307 | |
Matthias Klose | df2aecb | 2012-03-15 22:19:28 +0100 | [diff] [blame] | 3308 | case $MACHDEP in |
Michael Felt | 9d949f7 | 2019-04-12 16:15:32 +0200 | [diff] [blame] | 3309 | aix*) MACHDEP="aix";; |
Victor Stinner | 7209ff2 | 2011-08-21 00:00:16 +0200 | [diff] [blame] | 3310 | linux*) MACHDEP="linux";; |
Andrew M. Kuchling | 5a3e4cb | 2001-07-20 19:29:04 +0000 | [diff] [blame] | 3311 | cygwin*) MACHDEP="cygwin";; |
Jack Jansen | 8a97f4a | 2001-12-05 23:27:32 +0000 | [diff] [blame] | 3312 | darwin*) MACHDEP="darwin";; |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 3313 | '') MACHDEP="unknown";; |
Matthias Klose | df2aecb | 2012-03-15 22:19:28 +0100 | [diff] [blame] | 3314 | esac |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3315 | fi |
E. M. Bray | b1fc417 | 2019-05-24 18:39:39 +0200 | [diff] [blame] | 3316 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$MACHDEP\"" >&5 |
| 3317 | $as_echo "\"$MACHDEP\"" >&6; } |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 3318 | |
doko@ubuntu.com | 1abe1c5 | 2012-06-30 20:42:45 +0200 | [diff] [blame] | 3319 | |
| 3320 | if test "$cross_compiling" = yes; then |
| 3321 | case "$host" in |
| 3322 | *-*-linux*) |
| 3323 | case "$host_cpu" in |
| 3324 | arm*) |
| 3325 | _host_cpu=arm |
| 3326 | ;; |
| 3327 | *) |
| 3328 | _host_cpu=$host_cpu |
| 3329 | esac |
| 3330 | ;; |
| 3331 | *-*-cygwin*) |
| 3332 | _host_cpu= |
| 3333 | ;; |
pxinwr | 32f5fdd | 2019-02-27 19:09:28 +0800 | [diff] [blame] | 3334 | *-*-vxworks*) |
| 3335 | _host_cpu=$host_cpu |
| 3336 | ;; |
doko@ubuntu.com | 1abe1c5 | 2012-06-30 20:42:45 +0200 | [diff] [blame] | 3337 | *) |
| 3338 | # for now, limit cross builds to known configurations |
| 3339 | MACHDEP="unknown" |
| 3340 | as_fn_error $? "cross build not supported for $host" "$LINENO" 5 |
| 3341 | esac |
| 3342 | _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}" |
| 3343 | fi |
| 3344 | |
Martin v. Löwis | 35195ad | 2002-11-11 13:26:51 +0000 | [diff] [blame] | 3345 | # Some systems cannot stand _XOPEN_SOURCE being defined at all; they |
| 3346 | # disable features if it is defined, without any means to access these |
| 3347 | # features as extensions. For these systems, we skip the definition of |
| 3348 | # _XOPEN_SOURCE. Before adding a system to the list to gain access to |
| 3349 | # some feature, make sure there is no alternative way to access this |
| 3350 | # feature. Also, when using wildcards, make sure you have verified the |
| 3351 | # need for not defining _XOPEN_SOURCE on all systems matching the |
| 3352 | # wildcard, and that the wildcard does not include future systems |
| 3353 | # (which may remove their limitations). |
| 3354 | case $ac_sys_system/$ac_sys_release in |
| 3355 | # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined, |
| 3356 | # even though select is a POSIX function. Reported by J. Ribbens. |
Martin v. Löwis | 76bafc6 | 2003-10-03 13:47:44 +0000 | [diff] [blame] | 3357 | # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish. |
Martin v. Löwis | 19ed3c8 | 2010-02-15 21:45:06 +0000 | [diff] [blame] | 3358 | # In addition, Stefan Krah confirms that issue #1244610 exists through |
| 3359 | # OpenBSD 4.6, but is fixed in 4.7. |
Charles-François Natali | 54ef40b | 2011-07-22 23:52:02 +0200 | [diff] [blame] | 3360 | OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456]) |
Christian Heimes | 5b5e81c | 2007-12-31 16:14:33 +0000 | [diff] [blame] | 3361 | define_xopen_source=no |
| 3362 | # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is |
| 3363 | # also defined. This can be overridden by defining _BSD_SOURCE |
| 3364 | # As this has a different meaning on Linux, only define it on OpenBSD |
| 3365 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3366 | $as_echo "#define _BSD_SOURCE 1" >>confdefs.h |
Christian Heimes | 5b5e81c | 2007-12-31 16:14:33 +0000 | [diff] [blame] | 3367 | |
| 3368 | ;; |
Charles-François Natali | 54ef40b | 2011-07-22 23:52:02 +0200 | [diff] [blame] | 3369 | OpenBSD/*) |
Martin v. Löwis | 7671efc | 2010-02-15 08:35:16 +0000 | [diff] [blame] | 3370 | # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is |
| 3371 | # also defined. This can be overridden by defining _BSD_SOURCE |
| 3372 | # As this has a different meaning on Linux, only define it on OpenBSD |
| 3373 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3374 | $as_echo "#define _BSD_SOURCE 1" >>confdefs.h |
Martin v. Löwis | 7671efc | 2010-02-15 08:35:16 +0000 | [diff] [blame] | 3375 | |
| 3376 | ;; |
Thomas Wouters | 89f507f | 2006-12-13 04:49:30 +0000 | [diff] [blame] | 3377 | # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of |
| 3378 | # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by |
| 3379 | # Marc Recht |
Benjamin Peterson | f608c61 | 2008-11-16 18:33:53 +0000 | [diff] [blame] | 3380 | NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S]) |
Martin v. Löwis | 35195ad | 2002-11-11 13:26:51 +0000 | [diff] [blame] | 3381 | define_xopen_source=no;; |
Martin v. Löwis | 1a41576 | 2010-05-28 15:44:20 +0000 | [diff] [blame] | 3382 | # From the perspective of Solaris, _XOPEN_SOURCE is not so much a |
| 3383 | # request to enable features supported by the standard as a request |
| 3384 | # to disable features not supported by the standard. The best way |
| 3385 | # for Python to use Solaris is simply to leave _XOPEN_SOURCE out |
| 3386 | # entirely and define __EXTENSIONS__ instead. |
| 3387 | SunOS/*) |
Martin v. Löwis | a9d7142 | 2003-03-28 18:43:31 +0000 | [diff] [blame] | 3388 | define_xopen_source=no;; |
Martin v. Löwis | c2409b4 | 2003-05-11 05:53:41 +0000 | [diff] [blame] | 3389 | # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE, |
| 3390 | # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice. |
Jack Jansen | 6b08a40 | 2004-06-03 12:41:45 +0000 | [diff] [blame] | 3391 | # Reconfirmed for 7.1.4 by Martin v. Loewis. |
Martin v. Löwis | 253d1f4 | 2004-05-07 19:14:14 +0000 | [diff] [blame] | 3392 | OpenUNIX/8.0.0| UnixWare/7.1.[0-4]) |
Martin v. Löwis | c2409b4 | 2003-05-11 05:53:41 +0000 | [diff] [blame] | 3393 | define_xopen_source=no;; |
| 3394 | # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE, |
Martin v. Löwis | 53e73c3 | 2003-05-05 05:13:18 +0000 | [diff] [blame] | 3395 | # but used in struct sockaddr.sa_family. Reported by Tim Rice. |
Martin v. Löwis | c2409b4 | 2003-05-11 05:53:41 +0000 | [diff] [blame] | 3396 | SCO_SV/3.2) |
Martin v. Löwis | 53e73c3 | 2003-05-05 05:13:18 +0000 | [diff] [blame] | 3397 | define_xopen_source=no;; |
Martin v. Löwis | b37509b | 2008-11-04 20:45:29 +0000 | [diff] [blame] | 3398 | # On MacOS X 10.2, a bug in ncurses.h means that it craps out if |
| 3399 | # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which |
| 3400 | # identifies itself as Darwin/7.* |
| 3401 | # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE |
| 3402 | # disables platform specific features beyond repair. |
| 3403 | # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE |
| 3404 | # has no effect, don't bother defining them |
| 3405 | Darwin/[6789].*) |
Anthony Baxter | 6169c6b | 2003-10-04 07:46:23 +0000 | [diff] [blame] | 3406 | define_xopen_source=no;; |
Ronald Oussoren | 92fb941 | 2010-03-09 06:40:19 +0000 | [diff] [blame] | 3407 | Darwin/1[0-9].*) |
Ronald Oussoren | b8f11a6 | 2010-03-08 07:02:03 +0000 | [diff] [blame] | 3408 | define_xopen_source=no;; |
Trent Mick | c5625ba | 2004-08-25 23:59:39 +0000 | [diff] [blame] | 3409 | # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but |
| 3410 | # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined |
| 3411 | # or has another value. By not (re)defining it, the defaults come in place. |
Martin v. Löwis | c19c5a6 | 2003-11-18 20:00:44 +0000 | [diff] [blame] | 3412 | AIX/4) |
| 3413 | define_xopen_source=no;; |
Trent Mick | c5625ba | 2004-08-25 23:59:39 +0000 | [diff] [blame] | 3414 | AIX/5) |
| 3415 | if test `uname -r` -eq 1; then |
| 3416 | define_xopen_source=no |
| 3417 | fi |
| 3418 | ;; |
Benjamin Peterson | de9c869 | 2008-07-01 18:23:09 +0000 | [diff] [blame] | 3419 | # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from |
| 3420 | # defining NI_NUMERICHOST. |
| 3421 | QNX/6.3.2) |
| 3422 | define_xopen_source=no |
| 3423 | ;; |
pxinwr | 32f5fdd | 2019-02-27 19:09:28 +0800 | [diff] [blame] | 3424 | # On VxWorks, defining _XOPEN_SOURCE causes compile failures |
| 3425 | # in network headers still using system V types. |
| 3426 | VxWorks/*) |
| 3427 | define_xopen_source=no |
| 3428 | ;; |
Bob Ippolito | 7026a0a | 2005-03-28 23:23:47 +0000 | [diff] [blame] | 3429 | |
Martin v. Löwis | 35195ad | 2002-11-11 13:26:51 +0000 | [diff] [blame] | 3430 | esac |
| 3431 | |
| 3432 | if test $define_xopen_source = yes |
| 3433 | then |
Victor Stinner | 14d098d | 2011-09-07 22:29:43 +0200 | [diff] [blame] | 3434 | # X/Open 7, incorporating POSIX.1-2008 |
Martin v. Löwis | 678fc1e | 2002-11-12 06:04:39 +0000 | [diff] [blame] | 3435 | |
Victor Stinner | 14d098d | 2011-09-07 22:29:43 +0200 | [diff] [blame] | 3436 | $as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h |
Martin v. Löwis | 35195ad | 2002-11-11 13:26:51 +0000 | [diff] [blame] | 3437 | |
Martin v. Löwis | 678fc1e | 2002-11-12 06:04:39 +0000 | [diff] [blame] | 3438 | |
| 3439 | # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires |
| 3440 | # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else |
| 3441 | # several APIs are not declared. Since this is also needed in some |
| 3442 | # cases for HP-UX, we define it globally. |
Martin v. Löwis | 678fc1e | 2002-11-12 06:04:39 +0000 | [diff] [blame] | 3443 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3444 | $as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h |
Martin v. Löwis | 678fc1e | 2002-11-12 06:04:39 +0000 | [diff] [blame] | 3445 | |
| 3446 | |
Bob Ippolito | 7026a0a | 2005-03-28 23:23:47 +0000 | [diff] [blame] | 3447 | |
Victor Stinner | d169fdc | 2011-09-08 00:56:17 +0200 | [diff] [blame] | 3448 | $as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h |
Martin v. Löwis | 678fc1e | 2002-11-12 06:04:39 +0000 | [diff] [blame] | 3449 | |
Martin v. Löwis | 35195ad | 2002-11-11 13:26:51 +0000 | [diff] [blame] | 3450 | fi |
| 3451 | |
Christian Heimes | 647cd87 | 2013-12-07 23:39:33 +0100 | [diff] [blame] | 3452 | # On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE |
| 3453 | case $ac_sys_system in |
Christian Heimes | b02bcae | 2013-12-08 15:21:08 +0100 | [diff] [blame] | 3454 | hp*|HP*) |
| 3455 | define_stdc_a1=yes;; |
| 3456 | *) |
| 3457 | define_stdc_a1=no;; |
| 3458 | esac |
| 3459 | |
| 3460 | if test $define_stdc_a1 = yes |
| 3461 | then |
Christian Heimes | 647cd87 | 2013-12-07 23:39:33 +0100 | [diff] [blame] | 3462 | |
| 3463 | $as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h |
| 3464 | |
Christian Heimes | b02bcae | 2013-12-08 15:21:08 +0100 | [diff] [blame] | 3465 | fi |
Christian Heimes | 647cd87 | 2013-12-07 23:39:33 +0100 | [diff] [blame] | 3466 | |
Jack Jansen | 6b08a40 | 2004-06-03 12:41:45 +0000 | [diff] [blame] | 3467 | # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET, |
| 3468 | # it may influence the way we can build extensions, so distutils |
| 3469 | # needs to check it |
| 3470 | |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3471 | |
Jack Jansen | 6b08a40 | 2004-06-03 12:41:45 +0000 | [diff] [blame] | 3472 | CONFIGURE_MACOSX_DEPLOYMENT_TARGET= |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3473 | EXPORT_MACOSX_DEPLOYMENT_TARGET='#' |
Jack Jansen | 6b08a40 | 2004-06-03 12:41:45 +0000 | [diff] [blame] | 3474 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3475 | # checks for alternative programs |
Skip Montanaro | decc6a4 | 2003-01-01 20:07:49 +0000 | [diff] [blame] | 3476 | |
| 3477 | # compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just |
| 3478 | # for debug/optimization stuff. BASECFLAGS is for flags that are required |
| 3479 | # just to get things to compile and link. Users are free to override OPT |
| 3480 | # when running configure or make. The build should not break if they do. |
| 3481 | # BASECFLAGS should generally not be messed with, however. |
| 3482 | |
Guido van Rossum | 8b131c5 | 1995-03-09 14:10:13 +0000 | [diff] [blame] | 3483 | # If the user switches compilers, we can't believe the cache |
| 3484 | if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" |
| 3485 | then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 3486 | as_fn_error $? "cached CC is different -- throw away $cache_file |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3487 | (it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5 |
Guido van Rossum | 8b131c5 | 1995-03-09 14:10:13 +0000 | [diff] [blame] | 3488 | fi |
| 3489 | |
Jeffrey Yasskin | d4fcdb1 | 2010-07-09 16:30:58 +0000 | [diff] [blame] | 3490 | # Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2 |
| 3491 | # when the compiler supports them, but we don't always want -O2, and |
| 3492 | # we set -g later. |
| 3493 | if test -z "$CFLAGS"; then |
| 3494 | CFLAGS= |
| 3495 | fi |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 3496 | |
| 3497 | if test "$ac_sys_system" = "Darwin" |
| 3498 | then |
| 3499 | # Compiler selection on MacOSX is more complicated than |
Serhiy Storchaka | 88cc339 | 2018-06-04 08:20:25 +0300 | [diff] [blame] | 3500 | # AC_PROG_CC can handle, see Mac/README for more |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 3501 | # information |
| 3502 | if test -z "${CC}" |
| 3503 | then |
| 3504 | found_gcc= |
| 3505 | found_clang= |
| 3506 | as_save_IFS=$IFS; IFS=: |
| 3507 | for as_dir in $PATH |
| 3508 | do |
| 3509 | IFS=$as_save_IFS |
Ned Deily | 14aa00b | 2017-10-09 13:53:27 -0400 | [diff] [blame] | 3510 | if test -x "${as_dir}/gcc"; then |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 3511 | if test -z "${found_gcc}"; then |
Ned Deily | 14aa00b | 2017-10-09 13:53:27 -0400 | [diff] [blame] | 3512 | found_gcc="${as_dir}/gcc" |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 3513 | fi |
| 3514 | fi |
Ned Deily | 14aa00b | 2017-10-09 13:53:27 -0400 | [diff] [blame] | 3515 | if test -x "${as_dir}/clang"; then |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 3516 | if test -z "${found_clang}"; then |
Ned Deily | 14aa00b | 2017-10-09 13:53:27 -0400 | [diff] [blame] | 3517 | found_clang="${as_dir}/clang" |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 3518 | fi |
| 3519 | fi |
| 3520 | done |
| 3521 | IFS=$as_save_IFS |
| 3522 | |
| 3523 | if test -n "$found_gcc" -a -n "$found_clang" |
| 3524 | then |
| 3525 | if test -n "`"$found_gcc" --version | grep llvm-gcc`" |
| 3526 | then |
| 3527 | { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5 |
| 3528 | $as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;} |
| 3529 | CC="$found_clang" |
| 3530 | CXX="$found_clang++" |
| 3531 | fi |
| 3532 | |
| 3533 | |
| 3534 | elif test -z "$found_gcc" -a -n "$found_clang" |
| 3535 | then |
| 3536 | { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5 |
| 3537 | $as_echo "$as_me: No GCC found, use CLANG" >&6;} |
| 3538 | CC="$found_clang" |
| 3539 | CXX="$found_clang++" |
| 3540 | |
| 3541 | elif test -z "$found_gcc" -a -z "$found_clang" |
| 3542 | then |
| 3543 | found_clang=`/usr/bin/xcrun -find clang 2>/dev/null` |
| 3544 | if test -n "${found_clang}" |
| 3545 | then |
| 3546 | { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5 |
| 3547 | $as_echo "$as_me: Using clang from Xcode.app" >&6;} |
| 3548 | CC="${found_clang}" |
| 3549 | CXX="`/usr/bin/xcrun -find clang++`" |
| 3550 | |
| 3551 | # else: use default behaviour |
| 3552 | fi |
| 3553 | fi |
| 3554 | fi |
| 3555 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3556 | ac_ext=c |
| 3557 | ac_cpp='$CPP $CPPFLAGS' |
| 3558 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 3559 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 3560 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
| 3561 | if test -n "$ac_tool_prefix"; then |
| 3562 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. |
| 3563 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3564 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 3565 | $as_echo_n "checking for $ac_word... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 3566 | if ${ac_cv_prog_CC+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3567 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3568 | else |
| 3569 | if test -n "$CC"; then |
| 3570 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 3571 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3572 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 3573 | for as_dir in $PATH |
| 3574 | do |
| 3575 | IFS=$as_save_IFS |
| 3576 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3577 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 3578 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3579 | ac_cv_prog_CC="${ac_tool_prefix}gcc" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3580 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3581 | break 2 |
| 3582 | fi |
| 3583 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3584 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3585 | IFS=$as_save_IFS |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3586 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 3587 | fi |
| 3588 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3589 | CC=$ac_cv_prog_CC |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 3590 | if test -n "$CC"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3591 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
| 3592 | $as_echo "$CC" >&6; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 3593 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3594 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3595 | $as_echo "no" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3596 | fi |
| 3597 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3598 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3599 | fi |
| 3600 | if test -z "$ac_cv_prog_CC"; then |
| 3601 | ac_ct_CC=$CC |
| 3602 | # Extract the first word of "gcc", so it can be a program name with args. |
| 3603 | set dummy gcc; ac_word=$2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3604 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 3605 | $as_echo_n "checking for $ac_word... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 3606 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3607 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3608 | else |
| 3609 | if test -n "$ac_ct_CC"; then |
| 3610 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. |
| 3611 | else |
| 3612 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 3613 | for as_dir in $PATH |
| 3614 | do |
| 3615 | IFS=$as_save_IFS |
| 3616 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3617 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 3618 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3619 | ac_cv_prog_ac_ct_CC="gcc" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3620 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3621 | break 2 |
| 3622 | fi |
| 3623 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3624 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3625 | IFS=$as_save_IFS |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3626 | |
| 3627 | fi |
| 3628 | fi |
| 3629 | ac_ct_CC=$ac_cv_prog_ac_ct_CC |
| 3630 | if test -n "$ac_ct_CC"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3631 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
| 3632 | $as_echo "$ac_ct_CC" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3633 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3634 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3635 | $as_echo "no" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3636 | fi |
| 3637 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3638 | if test "x$ac_ct_CC" = x; then |
| 3639 | CC="" |
| 3640 | else |
| 3641 | case $cross_compiling:$ac_tool_warned in |
| 3642 | yes:) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3643 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 3644 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3645 | ac_tool_warned=yes ;; |
| 3646 | esac |
| 3647 | CC=$ac_ct_CC |
| 3648 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3649 | else |
| 3650 | CC="$ac_cv_prog_CC" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 3651 | fi |
| 3652 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 3653 | if test -z "$CC"; then |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3654 | if test -n "$ac_tool_prefix"; then |
| 3655 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3656 | set dummy ${ac_tool_prefix}cc; ac_word=$2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3657 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 3658 | $as_echo_n "checking for $ac_word... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 3659 | if ${ac_cv_prog_CC+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3660 | $as_echo_n "(cached) " >&6 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 3661 | else |
| 3662 | if test -n "$CC"; then |
| 3663 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 3664 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3665 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 3666 | for as_dir in $PATH |
| 3667 | do |
| 3668 | IFS=$as_save_IFS |
| 3669 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3670 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 3671 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3672 | ac_cv_prog_CC="${ac_tool_prefix}cc" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3673 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3674 | break 2 |
| 3675 | fi |
| 3676 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3677 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3678 | IFS=$as_save_IFS |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3679 | |
| 3680 | fi |
| 3681 | fi |
| 3682 | CC=$ac_cv_prog_CC |
| 3683 | if test -n "$CC"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3684 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
| 3685 | $as_echo "$CC" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3686 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3687 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3688 | $as_echo "no" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3689 | fi |
| 3690 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3691 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3692 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3693 | fi |
| 3694 | if test -z "$CC"; then |
| 3695 | # Extract the first word of "cc", so it can be a program name with args. |
| 3696 | set dummy cc; ac_word=$2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3697 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 3698 | $as_echo_n "checking for $ac_word... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 3699 | if ${ac_cv_prog_CC+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3700 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3701 | else |
| 3702 | if test -n "$CC"; then |
| 3703 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 3704 | else |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3705 | ac_prog_rejected=no |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3706 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 3707 | for as_dir in $PATH |
| 3708 | do |
| 3709 | IFS=$as_save_IFS |
| 3710 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3711 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 3712 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3713 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then |
| 3714 | ac_prog_rejected=yes |
| 3715 | continue |
| 3716 | fi |
| 3717 | ac_cv_prog_CC="cc" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3718 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3719 | break 2 |
| 3720 | fi |
| 3721 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3722 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3723 | IFS=$as_save_IFS |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3724 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3725 | if test $ac_prog_rejected = yes; then |
| 3726 | # We found a bogon in the path, so make sure we never use it. |
| 3727 | set dummy $ac_cv_prog_CC |
| 3728 | shift |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3729 | if test $# != 0; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3730 | # We chose a different compiler from the bogus one. |
| 3731 | # However, it has the same basename, so the bogon will be chosen |
| 3732 | # first if we set CC to just the basename; use the full file name. |
| 3733 | shift |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 3734 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3735 | fi |
| 3736 | fi |
| 3737 | fi |
| 3738 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3739 | CC=$ac_cv_prog_CC |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3740 | if test -n "$CC"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3741 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
| 3742 | $as_echo "$CC" >&6; } |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3743 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3744 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3745 | $as_echo "no" >&6; } |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3746 | fi |
| 3747 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3748 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3749 | fi |
| 3750 | if test -z "$CC"; then |
| 3751 | if test -n "$ac_tool_prefix"; then |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3752 | for ac_prog in cl.exe |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3753 | do |
| 3754 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. |
| 3755 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3756 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 3757 | $as_echo_n "checking for $ac_word... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 3758 | if ${ac_cv_prog_CC+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3759 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3760 | else |
| 3761 | if test -n "$CC"; then |
| 3762 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 3763 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3764 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 3765 | for as_dir in $PATH |
| 3766 | do |
| 3767 | IFS=$as_save_IFS |
| 3768 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3769 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 3770 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3771 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3772 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3773 | break 2 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3774 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3775 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3776 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3777 | IFS=$as_save_IFS |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3778 | |
| 3779 | fi |
| 3780 | fi |
| 3781 | CC=$ac_cv_prog_CC |
| 3782 | if test -n "$CC"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3783 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
| 3784 | $as_echo "$CC" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3785 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3786 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3787 | $as_echo "no" >&6; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 3788 | fi |
| 3789 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3790 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3791 | test -n "$CC" && break |
| 3792 | done |
| 3793 | fi |
| 3794 | if test -z "$CC"; then |
| 3795 | ac_ct_CC=$CC |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3796 | for ac_prog in cl.exe |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3797 | do |
| 3798 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 3799 | set dummy $ac_prog; ac_word=$2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3800 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 3801 | $as_echo_n "checking for $ac_word... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 3802 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3803 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3804 | else |
| 3805 | if test -n "$ac_ct_CC"; then |
| 3806 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. |
| 3807 | else |
| 3808 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 3809 | for as_dir in $PATH |
| 3810 | do |
| 3811 | IFS=$as_save_IFS |
| 3812 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3813 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 3814 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3815 | ac_cv_prog_ac_ct_CC="$ac_prog" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3816 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3817 | break 2 |
| 3818 | fi |
| 3819 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3820 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3821 | IFS=$as_save_IFS |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 3822 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3823 | fi |
| 3824 | fi |
| 3825 | ac_ct_CC=$ac_cv_prog_ac_ct_CC |
| 3826 | if test -n "$ac_ct_CC"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3827 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
| 3828 | $as_echo "$ac_ct_CC" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3829 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3830 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3831 | $as_echo "no" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3832 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3833 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3834 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3835 | test -n "$ac_ct_CC" && break |
| 3836 | done |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3837 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3838 | if test "x$ac_ct_CC" = x; then |
| 3839 | CC="" |
| 3840 | else |
| 3841 | case $cross_compiling:$ac_tool_warned in |
| 3842 | yes:) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3843 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 3844 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3845 | ac_tool_warned=yes ;; |
| 3846 | esac |
| 3847 | CC=$ac_ct_CC |
| 3848 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3849 | fi |
| 3850 | |
| 3851 | fi |
| 3852 | |
| 3853 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3854 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 3855 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 3856 | as_fn_error $? "no acceptable C compiler found in \$PATH |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 3857 | See \`config.log' for more details" "$LINENO" 5; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3858 | |
| 3859 | # Provide some information about the compiler. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3860 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
| 3861 | set X $ac_compile |
| 3862 | ac_compiler=$2 |
| 3863 | for ac_option in --version -v -V -qversion; do |
| 3864 | { { ac_try="$ac_compiler $ac_option >&5" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3865 | case "(($ac_try" in |
| 3866 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 3867 | *) ac_try_echo=$ac_try;; |
| 3868 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3869 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 3870 | $as_echo "$ac_try_echo"; } >&5 |
| 3871 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3872 | ac_status=$? |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3873 | if test -s conftest.err; then |
| 3874 | sed '10a\ |
| 3875 | ... rest of stderr output deleted ... |
| 3876 | 10q' conftest.err >conftest.er1 |
| 3877 | cat conftest.er1 >&5 |
| 3878 | fi |
| 3879 | rm -f conftest.er1 conftest.err |
| 3880 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 3881 | test $ac_status = 0; } |
| 3882 | done |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3883 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3884 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 3885 | /* end confdefs.h. */ |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 3886 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3887 | int |
| 3888 | main () |
| 3889 | { |
| 3890 | |
| 3891 | ; |
| 3892 | return 0; |
| 3893 | } |
| 3894 | _ACEOF |
| 3895 | ac_clean_files_save=$ac_clean_files |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3896 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3897 | # Try to create an executable without -o first, disregard a.out. |
| 3898 | # It will help us diagnose broken compilers, and finding out an intuition |
| 3899 | # of exeext. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3900 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
| 3901 | $as_echo_n "checking whether the C compiler works... " >&6; } |
| 3902 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
| 3903 | |
| 3904 | # The possible output files: |
| 3905 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" |
| 3906 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3907 | ac_rmfiles= |
| 3908 | for ac_file in $ac_files |
| 3909 | do |
| 3910 | case $ac_file in |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3911 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3912 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; |
| 3913 | esac |
| 3914 | done |
| 3915 | rm -f $ac_rmfiles |
| 3916 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3917 | if { { ac_try="$ac_link_default" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3918 | case "(($ac_try" in |
| 3919 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 3920 | *) ac_try_echo=$ac_try;; |
| 3921 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3922 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 3923 | $as_echo "$ac_try_echo"; } >&5 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3924 | (eval "$ac_link_default") 2>&5 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3925 | ac_status=$? |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3926 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 3927 | test $ac_status = 0; }; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3928 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. |
| 3929 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' |
| 3930 | # in a Makefile. We should not override ac_cv_exeext if it was cached, |
| 3931 | # so that the user can short-circuit this test for compilers unknown to |
| 3932 | # Autoconf. |
| 3933 | for ac_file in $ac_files '' |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 3934 | do |
| 3935 | test -f "$ac_file" || continue |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3936 | case $ac_file in |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3937 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 3938 | ;; |
| 3939 | [ab].out ) |
| 3940 | # We found the default executable, but exeext='' is most |
| 3941 | # certainly right. |
| 3942 | break;; |
| 3943 | *.* ) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3944 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3945 | then :; else |
| 3946 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
| 3947 | fi |
| 3948 | # We set ac_cv_exeext here because the later test for it is not |
| 3949 | # safe: cross compilers may not add the suffix if given an `-o' |
| 3950 | # argument, so we may need to know it at that point already. |
| 3951 | # Even if this section looks crufty: it has the advantage of |
| 3952 | # actually working. |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 3953 | break;; |
| 3954 | * ) |
| 3955 | break;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3956 | esac |
| 3957 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3958 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
| 3959 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3960 | else |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3961 | ac_file='' |
| 3962 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3963 | if test -z "$ac_file"; then : |
| 3964 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3965 | $as_echo "no" >&6; } |
| 3966 | $as_echo "$as_me: failed program was:" >&5 |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 3967 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 3968 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3969 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 3970 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 3971 | as_fn_error 77 "C compiler cannot create executables |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 3972 | See \`config.log' for more details" "$LINENO" 5; } |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3973 | else |
| 3974 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 3975 | $as_echo "yes" >&6; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3976 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3977 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
| 3978 | $as_echo_n "checking for C compiler default output file name... " >&6; } |
| 3979 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 |
| 3980 | $as_echo "$ac_file" >&6; } |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 3981 | ac_exeext=$ac_cv_exeext |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 3982 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3983 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 3984 | ac_clean_files=$ac_clean_files_save |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3985 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 |
| 3986 | $as_echo_n "checking for suffix of executables... " >&6; } |
| 3987 | if { { ac_try="$ac_link" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3988 | case "(($ac_try" in |
| 3989 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 3990 | *) ac_try_echo=$ac_try;; |
| 3991 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3992 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 3993 | $as_echo "$ac_try_echo"; } >&5 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3994 | (eval "$ac_link") 2>&5 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3995 | ac_status=$? |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3996 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 3997 | test $ac_status = 0; }; then : |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 3998 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
| 3999 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will |
| 4000 | # work properly (i.e., refer to `conftest.exe'), while it won't with |
| 4001 | # `rm'. |
| 4002 | for ac_file in conftest.exe conftest conftest.*; do |
| 4003 | test -f "$ac_file" || continue |
| 4004 | case $ac_file in |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4005 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 4006 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
| 4007 | break;; |
| 4008 | * ) break;; |
| 4009 | esac |
| 4010 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4011 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4012 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 4013 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 4014 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 4015 | See \`config.log' for more details" "$LINENO" 5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4016 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4017 | rm -f conftest conftest$ac_cv_exeext |
| 4018 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
| 4019 | $as_echo "$ac_cv_exeext" >&6; } |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 4020 | |
| 4021 | rm -f conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4022 | EXEEXT=$ac_cv_exeext |
| 4023 | ac_exeext=$EXEEXT |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4024 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4025 | /* end confdefs.h. */ |
| 4026 | #include <stdio.h> |
| 4027 | int |
| 4028 | main () |
| 4029 | { |
| 4030 | FILE *f = fopen ("conftest.out", "w"); |
| 4031 | return ferror (f) || fclose (f) != 0; |
| 4032 | |
| 4033 | ; |
| 4034 | return 0; |
| 4035 | } |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 4036 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4037 | ac_clean_files="$ac_clean_files conftest.out" |
| 4038 | # Check that the compiler produces executables we can run. If not, either |
| 4039 | # the compiler is broken, or we cross compile. |
| 4040 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
| 4041 | $as_echo_n "checking whether we are cross compiling... " >&6; } |
| 4042 | if test "$cross_compiling" != yes; then |
| 4043 | { { ac_try="$ac_link" |
| 4044 | case "(($ac_try" in |
| 4045 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 4046 | *) ac_try_echo=$ac_try;; |
| 4047 | esac |
| 4048 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 4049 | $as_echo "$ac_try_echo"; } >&5 |
| 4050 | (eval "$ac_link") 2>&5 |
| 4051 | ac_status=$? |
| 4052 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 4053 | test $ac_status = 0; } |
| 4054 | if { ac_try='./conftest$ac_cv_exeext' |
| 4055 | { { case "(($ac_try" in |
| 4056 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 4057 | *) ac_try_echo=$ac_try;; |
| 4058 | esac |
| 4059 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 4060 | $as_echo "$ac_try_echo"; } >&5 |
| 4061 | (eval "$ac_try") 2>&5 |
| 4062 | ac_status=$? |
| 4063 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 4064 | test $ac_status = 0; }; }; then |
| 4065 | cross_compiling=no |
| 4066 | else |
| 4067 | if test "$cross_compiling" = maybe; then |
| 4068 | cross_compiling=yes |
| 4069 | else |
| 4070 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 4071 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 4072 | as_fn_error $? "cannot run C compiled programs. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4073 | If you meant to cross compile, use \`--host'. |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 4074 | See \`config.log' for more details" "$LINENO" 5; } |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4075 | fi |
| 4076 | fi |
| 4077 | fi |
| 4078 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 |
| 4079 | $as_echo "$cross_compiling" >&6; } |
| 4080 | |
| 4081 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out |
| 4082 | ac_clean_files=$ac_clean_files_save |
| 4083 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
| 4084 | $as_echo_n "checking for suffix of object files... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 4085 | if ${ac_cv_objext+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4086 | $as_echo_n "(cached) " >&6 |
| 4087 | else |
| 4088 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 4089 | /* end confdefs.h. */ |
| 4090 | |
| 4091 | int |
| 4092 | main () |
| 4093 | { |
| 4094 | |
| 4095 | ; |
| 4096 | return 0; |
| 4097 | } |
| 4098 | _ACEOF |
| 4099 | rm -f conftest.o conftest.obj |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4100 | if { { ac_try="$ac_compile" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4101 | case "(($ac_try" in |
| 4102 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 4103 | *) ac_try_echo=$ac_try;; |
| 4104 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4105 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 4106 | $as_echo "$ac_try_echo"; } >&5 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4107 | (eval "$ac_compile") 2>&5 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4108 | ac_status=$? |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4109 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 4110 | test $ac_status = 0; }; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4111 | for ac_file in conftest.o conftest.obj conftest.*; do |
| 4112 | test -f "$ac_file" || continue; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4113 | case $ac_file in |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4114 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4115 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
| 4116 | break;; |
| 4117 | esac |
| 4118 | done |
| 4119 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4120 | $as_echo "$as_me: failed program was:" >&5 |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4121 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 4122 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4123 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 4124 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 4125 | as_fn_error $? "cannot compute suffix of object files: cannot compile |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 4126 | See \`config.log' for more details" "$LINENO" 5; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4127 | fi |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 4128 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4129 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4130 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
| 4131 | $as_echo "$ac_cv_objext" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4132 | OBJEXT=$ac_cv_objext |
| 4133 | ac_objext=$OBJEXT |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4134 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
| 4135 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 4136 | if ${ac_cv_c_compiler_gnu+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4137 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4138 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4139 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4140 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4141 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4142 | int |
| 4143 | main () |
| 4144 | { |
| 4145 | #ifndef __GNUC__ |
| 4146 | choke me |
| 4147 | #endif |
| 4148 | |
| 4149 | ; |
| 4150 | return 0; |
| 4151 | } |
| 4152 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4153 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4154 | ac_compiler_gnu=yes |
| 4155 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4156 | ac_compiler_gnu=no |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4157 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4158 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4159 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
| 4160 | |
| 4161 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4162 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
| 4163 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } |
| 4164 | if test $ac_compiler_gnu = yes; then |
| 4165 | GCC=yes |
| 4166 | else |
| 4167 | GCC= |
| 4168 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4169 | ac_test_CFLAGS=${CFLAGS+set} |
| 4170 | ac_save_CFLAGS=$CFLAGS |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4171 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
| 4172 | $as_echo_n "checking whether $CC accepts -g... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 4173 | if ${ac_cv_prog_cc_g+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4174 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4175 | else |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4176 | ac_save_c_werror_flag=$ac_c_werror_flag |
| 4177 | ac_c_werror_flag=yes |
| 4178 | ac_cv_prog_cc_g=no |
| 4179 | CFLAGS="-g" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4180 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4181 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4182 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4183 | int |
| 4184 | main () |
| 4185 | { |
| 4186 | |
| 4187 | ; |
| 4188 | return 0; |
| 4189 | } |
| 4190 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4191 | if ac_fn_c_try_compile "$LINENO"; then : |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4192 | ac_cv_prog_cc_g=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4193 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4194 | CFLAGS="" |
| 4195 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4196 | /* end confdefs.h. */ |
| 4197 | |
| 4198 | int |
| 4199 | main () |
| 4200 | { |
| 4201 | |
| 4202 | ; |
| 4203 | return 0; |
| 4204 | } |
| 4205 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4206 | if ac_fn_c_try_compile "$LINENO"; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4207 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4208 | else |
| 4209 | ac_c_werror_flag=$ac_save_c_werror_flag |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4210 | CFLAGS="-g" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4211 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4212 | /* end confdefs.h. */ |
| 4213 | |
| 4214 | int |
| 4215 | main () |
| 4216 | { |
| 4217 | |
| 4218 | ; |
| 4219 | return 0; |
| 4220 | } |
| 4221 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4222 | if ac_fn_c_try_compile "$LINENO"; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4223 | ac_cv_prog_cc_g=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4224 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4225 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4226 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4227 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 4228 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4229 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 4230 | ac_c_werror_flag=$ac_save_c_werror_flag |
| 4231 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4232 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
| 4233 | $as_echo "$ac_cv_prog_cc_g" >&6; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 4234 | if test "$ac_test_CFLAGS" = set; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4235 | CFLAGS=$ac_save_CFLAGS |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 4236 | elif test $ac_cv_prog_cc_g = yes; then |
| 4237 | if test "$GCC" = yes; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4238 | CFLAGS="-g -O2" |
| 4239 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 4240 | CFLAGS="-g" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4241 | fi |
| 4242 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 4243 | if test "$GCC" = yes; then |
| 4244 | CFLAGS="-O2" |
| 4245 | else |
| 4246 | CFLAGS= |
| 4247 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4248 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4249 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
| 4250 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 4251 | if ${ac_cv_prog_cc_c89+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4252 | $as_echo_n "(cached) " >&6 |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4253 | else |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4254 | ac_cv_prog_cc_c89=no |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4255 | ac_save_CC=$CC |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4256 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4257 | /* end confdefs.h. */ |
| 4258 | #include <stdarg.h> |
| 4259 | #include <stdio.h> |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 4260 | struct stat; |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4261 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ |
| 4262 | struct buf { int x; }; |
| 4263 | FILE * (*rcsopen) (struct buf *, struct stat *, int); |
| 4264 | static char *e (p, i) |
| 4265 | char **p; |
| 4266 | int i; |
| 4267 | { |
| 4268 | return p[i]; |
| 4269 | } |
| 4270 | static char *f (char * (*g) (char **, int), char **p, ...) |
| 4271 | { |
| 4272 | char *s; |
| 4273 | va_list v; |
| 4274 | va_start (v,p); |
| 4275 | s = g (p, va_arg (v,int)); |
| 4276 | va_end (v); |
| 4277 | return s; |
| 4278 | } |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 4279 | |
| 4280 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has |
| 4281 | function prototypes and stuff, but not '\xHH' hex character constants. |
| 4282 | These don't provoke an error unfortunately, instead are silently treated |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4283 | as 'x'. The following induces an error, until -std is added to get |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 4284 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
| 4285 | array size at least. It's necessary to write '\x00'==0 to get something |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4286 | that's true only with -std. */ |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 4287 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
| 4288 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4289 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
| 4290 | inside strings and character constants. */ |
| 4291 | #define FOO(x) 'x' |
| 4292 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; |
| 4293 | |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4294 | int test (int i, double x); |
| 4295 | struct s1 {int (*f) (int a);}; |
| 4296 | struct s2 {int (*f) (double a);}; |
| 4297 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); |
| 4298 | int argc; |
| 4299 | char **argv; |
| 4300 | int |
| 4301 | main () |
| 4302 | { |
| 4303 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
| 4304 | ; |
| 4305 | return 0; |
| 4306 | } |
| 4307 | _ACEOF |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4308 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
| 4309 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4310 | do |
| 4311 | CC="$ac_save_CC $ac_arg" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4312 | if ac_fn_c_try_compile "$LINENO"; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4313 | ac_cv_prog_cc_c89=$ac_arg |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4314 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4315 | rm -f core conftest.err conftest.$ac_objext |
| 4316 | test "x$ac_cv_prog_cc_c89" != "xno" && break |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4317 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4318 | rm -f conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4319 | CC=$ac_save_CC |
| 4320 | |
| 4321 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4322 | # AC_CACHE_VAL |
| 4323 | case "x$ac_cv_prog_cc_c89" in |
| 4324 | x) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4325 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
| 4326 | $as_echo "none needed" >&6; } ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4327 | xno) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4328 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 |
| 4329 | $as_echo "unsupported" >&6; } ;; |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4330 | *) |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4331 | CC="$CC $ac_cv_prog_cc_c89" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4332 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 |
| 4333 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4334 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4335 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4336 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4337 | fi |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4338 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4339 | ac_ext=c |
| 4340 | ac_cpp='$CPP $CPPFLAGS' |
| 4341 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 4342 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 4343 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4344 | |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 4345 | ac_ext=c |
| 4346 | ac_cpp='$CPP $CPPFLAGS' |
| 4347 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 4348 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 4349 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
| 4350 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
| 4351 | $as_echo_n "checking how to run the C preprocessor... " >&6; } |
| 4352 | # On Suns, sometimes $CPP names a directory. |
| 4353 | if test -n "$CPP" && test -d "$CPP"; then |
| 4354 | CPP= |
| 4355 | fi |
| 4356 | if test -z "$CPP"; then |
| 4357 | if ${ac_cv_prog_CPP+:} false; then : |
| 4358 | $as_echo_n "(cached) " >&6 |
| 4359 | else |
| 4360 | # Double quotes because CPP needs to be expanded |
| 4361 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" |
| 4362 | do |
| 4363 | ac_preproc_ok=false |
| 4364 | for ac_c_preproc_warn_flag in '' yes |
| 4365 | do |
| 4366 | # Use a header file that comes with gcc, so configuring glibc |
| 4367 | # with a fresh cross-compiler works. |
| 4368 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
| 4369 | # <limits.h> exists even on freestanding compilers. |
| 4370 | # On the NeXT, cc -E runs the code through the compiler's parser, |
| 4371 | # not just through cpp. "Syntax error" is here to catch this case. |
| 4372 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4373 | /* end confdefs.h. */ |
| 4374 | #ifdef __STDC__ |
| 4375 | # include <limits.h> |
| 4376 | #else |
| 4377 | # include <assert.h> |
| 4378 | #endif |
| 4379 | Syntax error |
| 4380 | _ACEOF |
| 4381 | if ac_fn_c_try_cpp "$LINENO"; then : |
| 4382 | |
| 4383 | else |
| 4384 | # Broken: fails on valid input. |
| 4385 | continue |
| 4386 | fi |
| 4387 | rm -f conftest.err conftest.i conftest.$ac_ext |
| 4388 | |
| 4389 | # OK, works on sane cases. Now check whether nonexistent headers |
| 4390 | # can be detected and how. |
| 4391 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4392 | /* end confdefs.h. */ |
| 4393 | #include <ac_nonexistent.h> |
| 4394 | _ACEOF |
| 4395 | if ac_fn_c_try_cpp "$LINENO"; then : |
| 4396 | # Broken: success on invalid input. |
| 4397 | continue |
| 4398 | else |
| 4399 | # Passes both tests. |
| 4400 | ac_preproc_ok=: |
| 4401 | break |
| 4402 | fi |
| 4403 | rm -f conftest.err conftest.i conftest.$ac_ext |
| 4404 | |
| 4405 | done |
| 4406 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. |
| 4407 | rm -f conftest.i conftest.err conftest.$ac_ext |
| 4408 | if $ac_preproc_ok; then : |
| 4409 | break |
| 4410 | fi |
| 4411 | |
| 4412 | done |
| 4413 | ac_cv_prog_CPP=$CPP |
| 4414 | |
| 4415 | fi |
| 4416 | CPP=$ac_cv_prog_CPP |
| 4417 | else |
| 4418 | ac_cv_prog_CPP=$CPP |
| 4419 | fi |
| 4420 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
| 4421 | $as_echo "$CPP" >&6; } |
| 4422 | ac_preproc_ok=false |
| 4423 | for ac_c_preproc_warn_flag in '' yes |
| 4424 | do |
| 4425 | # Use a header file that comes with gcc, so configuring glibc |
| 4426 | # with a fresh cross-compiler works. |
| 4427 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
| 4428 | # <limits.h> exists even on freestanding compilers. |
| 4429 | # On the NeXT, cc -E runs the code through the compiler's parser, |
| 4430 | # not just through cpp. "Syntax error" is here to catch this case. |
| 4431 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4432 | /* end confdefs.h. */ |
| 4433 | #ifdef __STDC__ |
| 4434 | # include <limits.h> |
| 4435 | #else |
| 4436 | # include <assert.h> |
| 4437 | #endif |
| 4438 | Syntax error |
| 4439 | _ACEOF |
| 4440 | if ac_fn_c_try_cpp "$LINENO"; then : |
| 4441 | |
| 4442 | else |
| 4443 | # Broken: fails on valid input. |
| 4444 | continue |
| 4445 | fi |
| 4446 | rm -f conftest.err conftest.i conftest.$ac_ext |
| 4447 | |
| 4448 | # OK, works on sane cases. Now check whether nonexistent headers |
| 4449 | # can be detected and how. |
| 4450 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4451 | /* end confdefs.h. */ |
| 4452 | #include <ac_nonexistent.h> |
| 4453 | _ACEOF |
| 4454 | if ac_fn_c_try_cpp "$LINENO"; then : |
| 4455 | # Broken: success on invalid input. |
| 4456 | continue |
| 4457 | else |
| 4458 | # Passes both tests. |
| 4459 | ac_preproc_ok=: |
| 4460 | break |
| 4461 | fi |
| 4462 | rm -f conftest.err conftest.i conftest.$ac_ext |
| 4463 | |
| 4464 | done |
| 4465 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. |
| 4466 | rm -f conftest.i conftest.err conftest.$ac_ext |
| 4467 | if $ac_preproc_ok; then : |
| 4468 | |
| 4469 | else |
| 4470 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 4471 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 4472 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
| 4473 | See \`config.log' for more details" "$LINENO" 5; } |
| 4474 | fi |
| 4475 | |
| 4476 | ac_ext=c |
| 4477 | ac_cpp='$CPP $CPPFLAGS' |
| 4478 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 4479 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 4480 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
| 4481 | |
| 4482 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
| 4483 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } |
| 4484 | if ${ac_cv_path_GREP+:} false; then : |
| 4485 | $as_echo_n "(cached) " >&6 |
| 4486 | else |
| 4487 | if test -z "$GREP"; then |
| 4488 | ac_path_GREP_found=false |
| 4489 | # Loop through the user's path and test for each of PROGNAME-LIST |
| 4490 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 4491 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin |
| 4492 | do |
| 4493 | IFS=$as_save_IFS |
| 4494 | test -z "$as_dir" && as_dir=. |
| 4495 | for ac_prog in grep ggrep; do |
| 4496 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 4497 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" |
| 4498 | as_fn_executable_p "$ac_path_GREP" || continue |
| 4499 | # Check for GNU ac_path_GREP and select it if it is found. |
| 4500 | # Check for GNU $ac_path_GREP |
| 4501 | case `"$ac_path_GREP" --version 2>&1` in |
| 4502 | *GNU*) |
| 4503 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; |
| 4504 | *) |
| 4505 | ac_count=0 |
| 4506 | $as_echo_n 0123456789 >"conftest.in" |
| 4507 | while : |
| 4508 | do |
| 4509 | cat "conftest.in" "conftest.in" >"conftest.tmp" |
| 4510 | mv "conftest.tmp" "conftest.in" |
| 4511 | cp "conftest.in" "conftest.nl" |
| 4512 | $as_echo 'GREP' >> "conftest.nl" |
| 4513 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break |
| 4514 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break |
| 4515 | as_fn_arith $ac_count + 1 && ac_count=$as_val |
| 4516 | if test $ac_count -gt ${ac_path_GREP_max-0}; then |
| 4517 | # Best one so far, save it but keep looking for a better one |
| 4518 | ac_cv_path_GREP="$ac_path_GREP" |
| 4519 | ac_path_GREP_max=$ac_count |
| 4520 | fi |
| 4521 | # 10*(2^10) chars as input seems more than enough |
| 4522 | test $ac_count -gt 10 && break |
| 4523 | done |
| 4524 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; |
| 4525 | esac |
| 4526 | |
| 4527 | $ac_path_GREP_found && break 3 |
| 4528 | done |
| 4529 | done |
| 4530 | done |
| 4531 | IFS=$as_save_IFS |
| 4532 | if test -z "$ac_cv_path_GREP"; then |
| 4533 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
| 4534 | fi |
| 4535 | else |
| 4536 | ac_cv_path_GREP=$GREP |
| 4537 | fi |
| 4538 | |
| 4539 | fi |
| 4540 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 |
| 4541 | $as_echo "$ac_cv_path_GREP" >&6; } |
| 4542 | GREP="$ac_cv_path_GREP" |
| 4543 | |
| 4544 | |
Łukasz Langa | a785c87 | 2016-09-09 17:37:37 -0700 | [diff] [blame] | 4545 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 |
| 4546 | $as_echo_n "checking for a sed that does not truncate output... " >&6; } |
| 4547 | if ${ac_cv_path_SED+:} false; then : |
| 4548 | $as_echo_n "(cached) " >&6 |
| 4549 | else |
| 4550 | ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ |
| 4551 | for ac_i in 1 2 3 4 5 6 7; do |
| 4552 | ac_script="$ac_script$as_nl$ac_script" |
| 4553 | done |
| 4554 | echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed |
| 4555 | { ac_script=; unset ac_script;} |
| 4556 | if test -z "$SED"; then |
| 4557 | ac_path_SED_found=false |
| 4558 | # Loop through the user's path and test for each of PROGNAME-LIST |
| 4559 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 4560 | for as_dir in $PATH |
| 4561 | do |
| 4562 | IFS=$as_save_IFS |
| 4563 | test -z "$as_dir" && as_dir=. |
| 4564 | for ac_prog in sed gsed; do |
| 4565 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 4566 | ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" |
| 4567 | as_fn_executable_p "$ac_path_SED" || continue |
| 4568 | # Check for GNU ac_path_SED and select it if it is found. |
| 4569 | # Check for GNU $ac_path_SED |
| 4570 | case `"$ac_path_SED" --version 2>&1` in |
| 4571 | *GNU*) |
| 4572 | ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; |
| 4573 | *) |
| 4574 | ac_count=0 |
| 4575 | $as_echo_n 0123456789 >"conftest.in" |
| 4576 | while : |
| 4577 | do |
| 4578 | cat "conftest.in" "conftest.in" >"conftest.tmp" |
| 4579 | mv "conftest.tmp" "conftest.in" |
| 4580 | cp "conftest.in" "conftest.nl" |
| 4581 | $as_echo '' >> "conftest.nl" |
| 4582 | "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break |
| 4583 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break |
| 4584 | as_fn_arith $ac_count + 1 && ac_count=$as_val |
| 4585 | if test $ac_count -gt ${ac_path_SED_max-0}; then |
| 4586 | # Best one so far, save it but keep looking for a better one |
| 4587 | ac_cv_path_SED="$ac_path_SED" |
| 4588 | ac_path_SED_max=$ac_count |
| 4589 | fi |
| 4590 | # 10*(2^10) chars as input seems more than enough |
| 4591 | test $ac_count -gt 10 && break |
| 4592 | done |
| 4593 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; |
| 4594 | esac |
| 4595 | |
| 4596 | $ac_path_SED_found && break 3 |
| 4597 | done |
| 4598 | done |
| 4599 | done |
| 4600 | IFS=$as_save_IFS |
| 4601 | if test -z "$ac_cv_path_SED"; then |
| 4602 | as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 |
| 4603 | fi |
| 4604 | else |
| 4605 | ac_cv_path_SED=$SED |
| 4606 | fi |
| 4607 | |
| 4608 | fi |
| 4609 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 |
| 4610 | $as_echo "$ac_cv_path_SED" >&6; } |
| 4611 | SED="$ac_cv_path_SED" |
| 4612 | rm -f conftest.sed |
| 4613 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 4614 | |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4615 | |
| 4616 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4617 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5 |
| 4618 | $as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; } |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4619 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4620 | # Check whether --with-cxx_main was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4621 | if test "${with_cxx_main+set}" = set; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4622 | withval=$with_cxx_main; |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4623 | |
| 4624 | case $withval in |
| 4625 | no) with_cxx_main=no |
| 4626 | MAINCC='$(CC)';; |
| 4627 | yes) with_cxx_main=yes |
| 4628 | MAINCC='$(CXX)';; |
| 4629 | *) with_cxx_main=yes |
| 4630 | MAINCC=$withval |
| 4631 | if test -z "$CXX" |
| 4632 | then |
| 4633 | CXX=$withval |
| 4634 | fi;; |
| 4635 | esac |
| 4636 | else |
| 4637 | |
| 4638 | with_cxx_main=no |
| 4639 | MAINCC='$(CC)' |
| 4640 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4641 | fi |
| 4642 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4643 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5 |
| 4644 | $as_echo "$with_cxx_main" >&6; } |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4645 | |
| 4646 | preset_cxx="$CXX" |
| 4647 | if test -z "$CXX" |
| 4648 | then |
| 4649 | case "$CC" in |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4650 | gcc) if test -n "$ac_tool_prefix"; then |
| 4651 | # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args. |
| 4652 | set dummy ${ac_tool_prefix}g++; ac_word=$2 |
| 4653 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 4654 | $as_echo_n "checking for $ac_word... " >&6; } |
| 4655 | if ${ac_cv_path_CXX+:} false; then : |
| 4656 | $as_echo_n "(cached) " >&6 |
| 4657 | else |
| 4658 | case $CXX in |
| 4659 | [\\/]* | ?:[\\/]*) |
| 4660 | ac_cv_path_CXX="$CXX" # Let the user override the test with a path. |
| 4661 | ;; |
| 4662 | *) |
| 4663 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 4664 | for as_dir in notfound |
| 4665 | do |
| 4666 | IFS=$as_save_IFS |
| 4667 | test -z "$as_dir" && as_dir=. |
| 4668 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 646eb1e | 2012-10-29 17:35:57 +0000 | [diff] [blame] | 4669 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4670 | ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext" |
| 4671 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 4672 | break 2 |
| 4673 | fi |
| 4674 | done |
| 4675 | done |
| 4676 | IFS=$as_save_IFS |
| 4677 | |
| 4678 | ;; |
| 4679 | esac |
| 4680 | fi |
| 4681 | CXX=$ac_cv_path_CXX |
| 4682 | if test -n "$CXX"; then |
| 4683 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 |
| 4684 | $as_echo "$CXX" >&6; } |
| 4685 | else |
| 4686 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 4687 | $as_echo "no" >&6; } |
| 4688 | fi |
| 4689 | |
| 4690 | |
| 4691 | fi |
| 4692 | if test -z "$ac_cv_path_CXX"; then |
| 4693 | ac_pt_CXX=$CXX |
| 4694 | # Extract the first word of "g++", so it can be a program name with args. |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4695 | set dummy g++; ac_word=$2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4696 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 4697 | $as_echo_n "checking for $ac_word... " >&6; } |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4698 | if ${ac_cv_path_ac_pt_CXX+:} false; then : |
| 4699 | $as_echo_n "(cached) " >&6 |
| 4700 | else |
| 4701 | case $ac_pt_CXX in |
| 4702 | [\\/]* | ?:[\\/]*) |
| 4703 | ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path. |
| 4704 | ;; |
| 4705 | *) |
| 4706 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 4707 | for as_dir in notfound |
| 4708 | do |
| 4709 | IFS=$as_save_IFS |
| 4710 | test -z "$as_dir" && as_dir=. |
| 4711 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 4712 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4713 | ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext" |
| 4714 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 4715 | break 2 |
| 4716 | fi |
| 4717 | done |
| 4718 | done |
| 4719 | IFS=$as_save_IFS |
| 4720 | |
| 4721 | ;; |
| 4722 | esac |
| 4723 | fi |
| 4724 | ac_pt_CXX=$ac_cv_path_ac_pt_CXX |
| 4725 | if test -n "$ac_pt_CXX"; then |
| 4726 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5 |
| 4727 | $as_echo "$ac_pt_CXX" >&6; } |
| 4728 | else |
| 4729 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 4730 | $as_echo "no" >&6; } |
| 4731 | fi |
| 4732 | |
| 4733 | if test "x$ac_pt_CXX" = x; then |
| 4734 | CXX="g++" |
| 4735 | else |
| 4736 | case $cross_compiling:$ac_tool_warned in |
| 4737 | yes:) |
| 4738 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 4739 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 4740 | ac_tool_warned=yes ;; |
| 4741 | esac |
| 4742 | CXX=$ac_pt_CXX |
| 4743 | fi |
| 4744 | else |
| 4745 | CXX="$ac_cv_path_CXX" |
| 4746 | fi |
| 4747 | ;; |
| 4748 | cc) if test -n "$ac_tool_prefix"; then |
| 4749 | # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args. |
| 4750 | set dummy ${ac_tool_prefix}c++; ac_word=$2 |
| 4751 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 4752 | $as_echo_n "checking for $ac_word... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 4753 | if ${ac_cv_path_CXX+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4754 | $as_echo_n "(cached) " >&6 |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4755 | else |
| 4756 | case $CXX in |
| 4757 | [\\/]* | ?:[\\/]*) |
| 4758 | ac_cv_path_CXX="$CXX" # Let the user override the test with a path. |
| 4759 | ;; |
| 4760 | *) |
| 4761 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 4762 | for as_dir in notfound |
| 4763 | do |
| 4764 | IFS=$as_save_IFS |
| 4765 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4766 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 4767 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4768 | ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4769 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4770 | break 2 |
| 4771 | fi |
| 4772 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4773 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4774 | IFS=$as_save_IFS |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4775 | |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4776 | ;; |
| 4777 | esac |
| 4778 | fi |
| 4779 | CXX=$ac_cv_path_CXX |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 4780 | if test -n "$CXX"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4781 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 |
| 4782 | $as_echo "$CXX" >&6; } |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 4783 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4784 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 4785 | $as_echo "no" >&6; } |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 4786 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4787 | |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4788 | |
| 4789 | fi |
| 4790 | if test -z "$ac_cv_path_CXX"; then |
| 4791 | ac_pt_CXX=$CXX |
| 4792 | # Extract the first word of "c++", so it can be a program name with args. |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4793 | set dummy c++; ac_word=$2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4794 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 4795 | $as_echo_n "checking for $ac_word... " >&6; } |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4796 | if ${ac_cv_path_ac_pt_CXX+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4797 | $as_echo_n "(cached) " >&6 |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4798 | else |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4799 | case $ac_pt_CXX in |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4800 | [\\/]* | ?:[\\/]*) |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4801 | ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path. |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4802 | ;; |
| 4803 | *) |
| 4804 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 4805 | for as_dir in notfound |
| 4806 | do |
| 4807 | IFS=$as_save_IFS |
| 4808 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4809 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 646eb1e | 2012-10-29 17:35:57 +0000 | [diff] [blame] | 4810 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4811 | ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4812 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4813 | break 2 |
| 4814 | fi |
| 4815 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4816 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4817 | IFS=$as_save_IFS |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4818 | |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4819 | ;; |
| 4820 | esac |
| 4821 | fi |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4822 | ac_pt_CXX=$ac_cv_path_ac_pt_CXX |
| 4823 | if test -n "$ac_pt_CXX"; then |
| 4824 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5 |
| 4825 | $as_echo "$ac_pt_CXX" >&6; } |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 4826 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4827 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 4828 | $as_echo "no" >&6; } |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 4829 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4830 | |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4831 | if test "x$ac_pt_CXX" = x; then |
| 4832 | CXX="c++" |
| 4833 | else |
| 4834 | case $cross_compiling:$ac_tool_warned in |
| 4835 | yes:) |
| 4836 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 4837 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 4838 | ac_tool_warned=yes ;; |
| 4839 | esac |
| 4840 | CXX=$ac_pt_CXX |
| 4841 | fi |
| 4842 | else |
| 4843 | CXX="$ac_cv_path_CXX" |
| 4844 | fi |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4845 | ;; |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4846 | clang|*/clang) if test -n "$ac_tool_prefix"; then |
| 4847 | # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args. |
| 4848 | set dummy ${ac_tool_prefix}clang++; ac_word=$2 |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 4849 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 4850 | $as_echo_n "checking for $ac_word... " >&6; } |
| 4851 | if ${ac_cv_path_CXX+:} false; then : |
| 4852 | $as_echo_n "(cached) " >&6 |
| 4853 | else |
| 4854 | case $CXX in |
| 4855 | [\\/]* | ?:[\\/]*) |
| 4856 | ac_cv_path_CXX="$CXX" # Let the user override the test with a path. |
| 4857 | ;; |
| 4858 | *) |
| 4859 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 4860 | for as_dir in notfound |
| 4861 | do |
| 4862 | IFS=$as_save_IFS |
| 4863 | test -z "$as_dir" && as_dir=. |
| 4864 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 646eb1e | 2012-10-29 17:35:57 +0000 | [diff] [blame] | 4865 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 4866 | ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext" |
| 4867 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 4868 | break 2 |
| 4869 | fi |
| 4870 | done |
| 4871 | done |
| 4872 | IFS=$as_save_IFS |
| 4873 | |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 4874 | ;; |
| 4875 | esac |
| 4876 | fi |
| 4877 | CXX=$ac_cv_path_CXX |
| 4878 | if test -n "$CXX"; then |
| 4879 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 |
| 4880 | $as_echo "$CXX" >&6; } |
| 4881 | else |
| 4882 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 4883 | $as_echo "no" >&6; } |
| 4884 | fi |
| 4885 | |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4886 | |
| 4887 | fi |
| 4888 | if test -z "$ac_cv_path_CXX"; then |
| 4889 | ac_pt_CXX=$CXX |
| 4890 | # Extract the first word of "clang++", so it can be a program name with args. |
| 4891 | set dummy clang++; ac_word=$2 |
| 4892 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 4893 | $as_echo_n "checking for $ac_word... " >&6; } |
| 4894 | if ${ac_cv_path_ac_pt_CXX+:} false; then : |
| 4895 | $as_echo_n "(cached) " >&6 |
| 4896 | else |
| 4897 | case $ac_pt_CXX in |
| 4898 | [\\/]* | ?:[\\/]*) |
| 4899 | ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path. |
| 4900 | ;; |
| 4901 | *) |
| 4902 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 4903 | for as_dir in notfound |
| 4904 | do |
| 4905 | IFS=$as_save_IFS |
| 4906 | test -z "$as_dir" && as_dir=. |
| 4907 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 646eb1e | 2012-10-29 17:35:57 +0000 | [diff] [blame] | 4908 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4909 | ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext" |
| 4910 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 4911 | break 2 |
| 4912 | fi |
| 4913 | done |
| 4914 | done |
| 4915 | IFS=$as_save_IFS |
| 4916 | |
| 4917 | ;; |
| 4918 | esac |
| 4919 | fi |
| 4920 | ac_pt_CXX=$ac_cv_path_ac_pt_CXX |
| 4921 | if test -n "$ac_pt_CXX"; then |
| 4922 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5 |
| 4923 | $as_echo "$ac_pt_CXX" >&6; } |
| 4924 | else |
| 4925 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 4926 | $as_echo "no" >&6; } |
| 4927 | fi |
| 4928 | |
| 4929 | if test "x$ac_pt_CXX" = x; then |
| 4930 | CXX="clang++" |
| 4931 | else |
| 4932 | case $cross_compiling:$ac_tool_warned in |
| 4933 | yes:) |
| 4934 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 4935 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 4936 | ac_tool_warned=yes ;; |
| 4937 | esac |
| 4938 | CXX=$ac_pt_CXX |
| 4939 | fi |
| 4940 | else |
| 4941 | CXX="$ac_cv_path_CXX" |
| 4942 | fi |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 4943 | ;; |
Zachary Ware | 5af8564 | 2015-12-21 12:09:17 -0600 | [diff] [blame] | 4944 | icc|*/icc) if test -n "$ac_tool_prefix"; then |
| 4945 | # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args. |
| 4946 | set dummy ${ac_tool_prefix}icpc; ac_word=$2 |
| 4947 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 4948 | $as_echo_n "checking for $ac_word... " >&6; } |
| 4949 | if ${ac_cv_path_CXX+:} false; then : |
| 4950 | $as_echo_n "(cached) " >&6 |
| 4951 | else |
| 4952 | case $CXX in |
| 4953 | [\\/]* | ?:[\\/]*) |
| 4954 | ac_cv_path_CXX="$CXX" # Let the user override the test with a path. |
| 4955 | ;; |
| 4956 | *) |
| 4957 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 4958 | for as_dir in notfound |
| 4959 | do |
| 4960 | IFS=$as_save_IFS |
| 4961 | test -z "$as_dir" && as_dir=. |
| 4962 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 4963 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 4964 | ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext" |
| 4965 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 4966 | break 2 |
| 4967 | fi |
| 4968 | done |
| 4969 | done |
| 4970 | IFS=$as_save_IFS |
| 4971 | |
| 4972 | ;; |
| 4973 | esac |
| 4974 | fi |
| 4975 | CXX=$ac_cv_path_CXX |
| 4976 | if test -n "$CXX"; then |
| 4977 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 |
| 4978 | $as_echo "$CXX" >&6; } |
| 4979 | else |
| 4980 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 4981 | $as_echo "no" >&6; } |
| 4982 | fi |
| 4983 | |
| 4984 | |
| 4985 | fi |
| 4986 | if test -z "$ac_cv_path_CXX"; then |
| 4987 | ac_pt_CXX=$CXX |
| 4988 | # Extract the first word of "icpc", so it can be a program name with args. |
| 4989 | set dummy icpc; ac_word=$2 |
| 4990 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 4991 | $as_echo_n "checking for $ac_word... " >&6; } |
| 4992 | if ${ac_cv_path_ac_pt_CXX+:} false; then : |
| 4993 | $as_echo_n "(cached) " >&6 |
| 4994 | else |
| 4995 | case $ac_pt_CXX in |
| 4996 | [\\/]* | ?:[\\/]*) |
| 4997 | ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path. |
| 4998 | ;; |
| 4999 | *) |
| 5000 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 5001 | for as_dir in notfound |
| 5002 | do |
| 5003 | IFS=$as_save_IFS |
| 5004 | test -z "$as_dir" && as_dir=. |
| 5005 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 5006 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 5007 | ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext" |
| 5008 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 5009 | break 2 |
| 5010 | fi |
| 5011 | done |
| 5012 | done |
| 5013 | IFS=$as_save_IFS |
| 5014 | |
| 5015 | ;; |
| 5016 | esac |
| 5017 | fi |
| 5018 | ac_pt_CXX=$ac_cv_path_ac_pt_CXX |
| 5019 | if test -n "$ac_pt_CXX"; then |
| 5020 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5 |
| 5021 | $as_echo "$ac_pt_CXX" >&6; } |
| 5022 | else |
| 5023 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 5024 | $as_echo "no" >&6; } |
| 5025 | fi |
| 5026 | |
| 5027 | if test "x$ac_pt_CXX" = x; then |
| 5028 | CXX="icpc" |
| 5029 | else |
| 5030 | case $cross_compiling:$ac_tool_warned in |
| 5031 | yes:) |
| 5032 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 5033 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 5034 | ac_tool_warned=yes ;; |
| 5035 | esac |
| 5036 | CXX=$ac_pt_CXX |
| 5037 | fi |
| 5038 | else |
| 5039 | CXX="$ac_cv_path_CXX" |
| 5040 | fi |
| 5041 | ;; |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 5042 | esac |
| 5043 | if test "$CXX" = "notfound" |
| 5044 | then |
| 5045 | CXX="" |
| 5046 | fi |
| 5047 | fi |
| 5048 | if test -z "$CXX" |
| 5049 | then |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 5050 | if test -n "$ac_tool_prefix"; then |
| 5051 | for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl |
| 5052 | do |
| 5053 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. |
| 5054 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5055 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 5056 | $as_echo_n "checking for $ac_word... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 5057 | if ${ac_cv_prog_CXX+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5058 | $as_echo_n "(cached) " >&6 |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 5059 | else |
| 5060 | if test -n "$CXX"; then |
| 5061 | ac_cv_prog_CXX="$CXX" # Let the user override the test. |
| 5062 | else |
| 5063 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 5064 | for as_dir in $PATH |
| 5065 | do |
| 5066 | IFS=$as_save_IFS |
| 5067 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5068 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 5069 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 5070 | ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5071 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 5072 | break 2 |
| 5073 | fi |
| 5074 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5075 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5076 | IFS=$as_save_IFS |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 5077 | |
| 5078 | fi |
| 5079 | fi |
| 5080 | CXX=$ac_cv_prog_CXX |
| 5081 | if test -n "$CXX"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5082 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 |
| 5083 | $as_echo "$CXX" >&6; } |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 5084 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5085 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 5086 | $as_echo "no" >&6; } |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 5087 | fi |
| 5088 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5089 | |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 5090 | test -n "$CXX" && break |
| 5091 | done |
| 5092 | fi |
| 5093 | if test -z "$CXX"; then |
| 5094 | ac_ct_CXX=$CXX |
| 5095 | for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl |
| 5096 | do |
| 5097 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 5098 | set dummy $ac_prog; ac_word=$2 |
| 5099 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 5100 | $as_echo_n "checking for $ac_word... " >&6; } |
| 5101 | if ${ac_cv_prog_ac_ct_CXX+:} false; then : |
| 5102 | $as_echo_n "(cached) " >&6 |
| 5103 | else |
| 5104 | if test -n "$ac_ct_CXX"; then |
| 5105 | ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. |
| 5106 | else |
| 5107 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 5108 | for as_dir in $PATH |
| 5109 | do |
| 5110 | IFS=$as_save_IFS |
| 5111 | test -z "$as_dir" && as_dir=. |
| 5112 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 646eb1e | 2012-10-29 17:35:57 +0000 | [diff] [blame] | 5113 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 5114 | ac_cv_prog_ac_ct_CXX="$ac_prog" |
| 5115 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 5116 | break 2 |
| 5117 | fi |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 5118 | done |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 5119 | done |
| 5120 | IFS=$as_save_IFS |
| 5121 | |
| 5122 | fi |
| 5123 | fi |
| 5124 | ac_ct_CXX=$ac_cv_prog_ac_ct_CXX |
| 5125 | if test -n "$ac_ct_CXX"; then |
| 5126 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 |
| 5127 | $as_echo "$ac_ct_CXX" >&6; } |
| 5128 | else |
| 5129 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 5130 | $as_echo "no" >&6; } |
| 5131 | fi |
| 5132 | |
| 5133 | |
| 5134 | test -n "$ac_ct_CXX" && break |
| 5135 | done |
| 5136 | |
| 5137 | if test "x$ac_ct_CXX" = x; then |
| 5138 | CXX="notfound" |
| 5139 | else |
| 5140 | case $cross_compiling:$ac_tool_warned in |
| 5141 | yes:) |
| 5142 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 5143 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 5144 | ac_tool_warned=yes ;; |
| 5145 | esac |
| 5146 | CXX=$ac_ct_CXX |
| 5147 | fi |
| 5148 | fi |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 5149 | |
| 5150 | if test "$CXX" = "notfound" |
| 5151 | then |
| 5152 | CXX="" |
| 5153 | fi |
| 5154 | fi |
| 5155 | if test "$preset_cxx" != "$CXX" |
| 5156 | then |
Christian Heimes | fe32aec | 2013-11-20 01:18:26 +0100 | [diff] [blame] | 5157 | { $as_echo "$as_me:${as_lineno-$LINENO}: |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 5158 | |
| 5159 | By default, distutils will build C++ extension modules with \"$CXX\". |
| 5160 | If this is not intended, then set CXX on the configure command line. |
| 5161 | " >&5 |
Christian Heimes | fe32aec | 2013-11-20 01:18:26 +0100 | [diff] [blame] | 5162 | $as_echo "$as_me: |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 5163 | |
| 5164 | By default, distutils will build C++ extension modules with \"$CXX\". |
| 5165 | If this is not intended, then set CXX on the configure command line. |
Christian Heimes | fe32aec | 2013-11-20 01:18:26 +0100 | [diff] [blame] | 5166 | " >&6;} |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 5167 | fi |
| 5168 | |
| 5169 | |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 5170 | MULTIARCH=$($CC --print-multiarch 2>/dev/null) |
| 5171 | |
| 5172 | |
| 5173 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5 |
| 5174 | $as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; } |
| 5175 | cat >> conftest.c <<EOF |
doko@ubuntu.com | 5cc9c4f | 2015-04-19 14:44:05 +0200 | [diff] [blame] | 5176 | #undef bfin |
| 5177 | #undef cris |
| 5178 | #undef fr30 |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 5179 | #undef linux |
doko@ubuntu.com | 5cc9c4f | 2015-04-19 14:44:05 +0200 | [diff] [blame] | 5180 | #undef hppa |
| 5181 | #undef hpux |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 5182 | #undef i386 |
doko@ubuntu.com | 5cc9c4f | 2015-04-19 14:44:05 +0200 | [diff] [blame] | 5183 | #undef mips |
doko@ubuntu.com | 9abe049 | 2015-04-15 23:31:02 +0200 | [diff] [blame] | 5184 | #undef powerpc |
doko@ubuntu.com | 5cc9c4f | 2015-04-19 14:44:05 +0200 | [diff] [blame] | 5185 | #undef sparc |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 5186 | #undef unix |
doko@ubuntu.com | 5c38cb2 | 2016-09-01 22:05:20 +0200 | [diff] [blame] | 5187 | #if defined(__ANDROID__) |
Xavier de Gaye | 32cf1ac | 2016-12-10 17:31:28 +0100 | [diff] [blame] | 5188 | # Android is not a multiarch system. |
doko@ubuntu.com | 5c38cb2 | 2016-09-01 22:05:20 +0200 | [diff] [blame] | 5189 | #elif defined(__linux__) |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 5190 | # if defined(__x86_64__) && defined(__LP64__) |
| 5191 | x86_64-linux-gnu |
| 5192 | # elif defined(__x86_64__) && defined(__ILP32__) |
| 5193 | x86_64-linux-gnux32 |
| 5194 | # elif defined(__i386__) |
| 5195 | i386-linux-gnu |
| 5196 | # elif defined(__aarch64__) && defined(__AARCH64EL__) |
| 5197 | # if defined(__ILP32__) |
| 5198 | aarch64_ilp32-linux-gnu |
| 5199 | # else |
| 5200 | aarch64-linux-gnu |
| 5201 | # endif |
| 5202 | # elif defined(__aarch64__) && defined(__AARCH64EB__) |
| 5203 | # if defined(__ILP32__) |
| 5204 | aarch64_be_ilp32-linux-gnu |
| 5205 | # else |
| 5206 | aarch64_be-linux-gnu |
| 5207 | # endif |
| 5208 | # elif defined(__alpha__) |
| 5209 | alpha-linux-gnu |
| 5210 | # elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP) |
| 5211 | # if defined(__ARMEL__) |
| 5212 | arm-linux-gnueabihf |
| 5213 | # else |
| 5214 | armeb-linux-gnueabihf |
| 5215 | # endif |
| 5216 | # elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP) |
| 5217 | # if defined(__ARMEL__) |
| 5218 | arm-linux-gnueabi |
| 5219 | # else |
| 5220 | armeb-linux-gnueabi |
| 5221 | # endif |
| 5222 | # elif defined(__hppa__) |
| 5223 | hppa-linux-gnu |
| 5224 | # elif defined(__ia64__) |
| 5225 | ia64-linux-gnu |
| 5226 | # elif defined(__m68k__) && !defined(__mcoldfire__) |
| 5227 | m68k-linux-gnu |
Matthias Klose | ddbe976 | 2018-04-30 19:22:16 +0200 | [diff] [blame] | 5228 | # elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) && defined(_MIPSEL) |
| 5229 | # if _MIPS_SIM == _ABIO32 |
| 5230 | mipsisa32r6el-linux-gnu |
| 5231 | # elif _MIPS_SIM == _ABIN32 |
| 5232 | mipsisa64r6el-linux-gnuabin32 |
| 5233 | # elif _MIPS_SIM == _ABI64 |
| 5234 | mipsisa64r6el-linux-gnuabi64 |
| 5235 | # else |
| 5236 | # error unknown platform triplet |
| 5237 | # endif |
| 5238 | # elif defined(__mips_hard_float) && defined(__mips_isa_rev) && (__mips_isa_rev >=6) |
| 5239 | # if _MIPS_SIM == _ABIO32 |
| 5240 | mipsisa32r6-linux-gnu |
| 5241 | # elif _MIPS_SIM == _ABIN32 |
| 5242 | mipsisa64r6-linux-gnuabin32 |
| 5243 | # elif _MIPS_SIM == _ABI64 |
| 5244 | mipsisa64r6-linux-gnuabi64 |
| 5245 | # else |
| 5246 | # error unknown platform triplet |
| 5247 | # endif |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 5248 | # elif defined(__mips_hard_float) && defined(_MIPSEL) |
| 5249 | # if _MIPS_SIM == _ABIO32 |
| 5250 | mipsel-linux-gnu |
| 5251 | # elif _MIPS_SIM == _ABIN32 |
| 5252 | mips64el-linux-gnuabin32 |
| 5253 | # elif _MIPS_SIM == _ABI64 |
| 5254 | mips64el-linux-gnuabi64 |
| 5255 | # else |
| 5256 | # error unknown platform triplet |
| 5257 | # endif |
| 5258 | # elif defined(__mips_hard_float) |
| 5259 | # if _MIPS_SIM == _ABIO32 |
| 5260 | mips-linux-gnu |
| 5261 | # elif _MIPS_SIM == _ABIN32 |
| 5262 | mips64-linux-gnuabin32 |
| 5263 | # elif _MIPS_SIM == _ABI64 |
| 5264 | mips64-linux-gnuabi64 |
| 5265 | # else |
| 5266 | # error unknown platform triplet |
| 5267 | # endif |
| 5268 | # elif defined(__or1k__) |
| 5269 | or1k-linux-gnu |
| 5270 | # elif defined(__powerpc__) && defined(__SPE__) |
| 5271 | powerpc-linux-gnuspe |
| 5272 | # elif defined(__powerpc64__) |
| 5273 | # if defined(__LITTLE_ENDIAN__) |
| 5274 | powerpc64le-linux-gnu |
| 5275 | # else |
| 5276 | powerpc64-linux-gnu |
| 5277 | # endif |
| 5278 | # elif defined(__powerpc__) |
| 5279 | powerpc-linux-gnu |
| 5280 | # elif defined(__s390x__) |
| 5281 | s390x-linux-gnu |
| 5282 | # elif defined(__s390__) |
| 5283 | s390-linux-gnu |
| 5284 | # elif defined(__sh__) && defined(__LITTLE_ENDIAN__) |
| 5285 | sh4-linux-gnu |
| 5286 | # elif defined(__sparc__) && defined(__arch64__) |
| 5287 | sparc64-linux-gnu |
| 5288 | # elif defined(__sparc__) |
| 5289 | sparc-linux-gnu |
Matthias Klose | ddbe976 | 2018-04-30 19:22:16 +0200 | [diff] [blame] | 5290 | # elif defined(__riscv) |
| 5291 | # if __riscv_xlen == 32 |
| 5292 | riscv32-linux-gnu |
| 5293 | # elif __riscv_xlen == 64 |
| 5294 | riscv64-linux-gnu |
| 5295 | # else |
| 5296 | # error unknown platform triplet |
| 5297 | # endif |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 5298 | # else |
| 5299 | # error unknown platform triplet |
| 5300 | # endif |
| 5301 | #elif defined(__FreeBSD_kernel__) |
| 5302 | # if defined(__LP64__) |
| 5303 | x86_64-kfreebsd-gnu |
| 5304 | # elif defined(__i386__) |
| 5305 | i386-kfreebsd-gnu |
| 5306 | # else |
| 5307 | # error unknown platform triplet |
| 5308 | # endif |
| 5309 | #elif defined(__gnu_hurd__) |
| 5310 | i386-gnu |
Ned Deily | 3b81248 | 2015-04-15 17:11:47 -0700 | [diff] [blame] | 5311 | #elif defined(__APPLE__) |
| 5312 | darwin |
pxinwr | 32f5fdd | 2019-02-27 19:09:28 +0800 | [diff] [blame] | 5313 | #elif defined(__VXWORKS__) |
| 5314 | vxworks |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 5315 | #else |
| 5316 | # error unknown platform triplet |
| 5317 | #endif |
| 5318 | |
| 5319 | EOF |
| 5320 | |
Xavier de Gaye | 3a32bdf | 2016-07-30 11:28:35 +0200 | [diff] [blame] | 5321 | if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 5322 | PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '` |
| 5323 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5 |
| 5324 | $as_echo "$PLATFORM_TRIPLET" >&6; } |
| 5325 | else |
| 5326 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 |
| 5327 | $as_echo "none" >&6; } |
| 5328 | fi |
| 5329 | rm -f conftest.c conftest.out |
| 5330 | |
| 5331 | if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then |
| 5332 | if test x$PLATFORM_TRIPLET != x$MULTIARCH; then |
| 5333 | as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5 |
| 5334 | fi |
doko@ubuntu.com | 75b1cb1 | 2016-08-29 20:03:25 +0200 | [diff] [blame] | 5335 | elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then |
| 5336 | MULTIARCH=$PLATFORM_TRIPLET |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 5337 | fi |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 5338 | |
doko@ubuntu.com | 5553231 | 2016-06-14 08:55:19 +0200 | [diff] [blame] | 5339 | if test x$MULTIARCH != x; then |
| 5340 | MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\"" |
| 5341 | fi |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 5342 | |
| 5343 | |
Martin v. Löwis | 48e14d3 | 2011-05-09 07:37:45 +0200 | [diff] [blame] | 5344 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5 |
| 5345 | $as_echo_n "checking for -Wl,--no-as-needed... " >&6; } |
| 5346 | save_LDFLAGS="$LDFLAGS" |
| 5347 | LDFLAGS="$LDFLAGS -Wl,--no-as-needed" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 5348 | |
Martin v. Löwis | 48e14d3 | 2011-05-09 07:37:45 +0200 | [diff] [blame] | 5349 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 5350 | /* end confdefs.h. */ |
| 5351 | |
| 5352 | int |
| 5353 | main () |
| 5354 | { |
| 5355 | |
| 5356 | ; |
| 5357 | return 0; |
| 5358 | } |
| 5359 | _ACEOF |
| 5360 | if ac_fn_c_try_link "$LINENO"; then : |
| 5361 | NO_AS_NEEDED="-Wl,--no-as-needed" |
| 5362 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 5363 | $as_echo "yes" >&6; } |
| 5364 | else |
| 5365 | NO_AS_NEEDED="" |
| 5366 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 5367 | $as_echo "no" >&6; } |
| 5368 | fi |
| 5369 | rm -f core conftest.err conftest.$ac_objext \ |
| 5370 | conftest$ac_exeext conftest.$ac_ext |
| 5371 | LDFLAGS="$save_LDFLAGS" |
| 5372 | |
| 5373 | |
| 5374 | |
| 5375 | # checks for UNIX variants that set C preprocessor variables |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5376 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5377 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
| 5378 | $as_echo_n "checking for egrep... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 5379 | if ${ac_cv_path_EGREP+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5380 | $as_echo_n "(cached) " >&6 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5381 | else |
| 5382 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
| 5383 | then ac_cv_path_EGREP="$GREP -E" |
| 5384 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5385 | if test -z "$EGREP"; then |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5386 | ac_path_EGREP_found=false |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5387 | # Loop through the user's path and test for each of PROGNAME-LIST |
| 5388 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5389 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin |
| 5390 | do |
| 5391 | IFS=$as_save_IFS |
| 5392 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5393 | for ac_prog in egrep; do |
| 5394 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 5395 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 5396 | as_fn_executable_p "$ac_path_EGREP" || continue |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5397 | # Check for GNU ac_path_EGREP and select it if it is found. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5398 | # Check for GNU $ac_path_EGREP |
| 5399 | case `"$ac_path_EGREP" --version 2>&1` in |
| 5400 | *GNU*) |
| 5401 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; |
| 5402 | *) |
| 5403 | ac_count=0 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5404 | $as_echo_n 0123456789 >"conftest.in" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5405 | while : |
| 5406 | do |
| 5407 | cat "conftest.in" "conftest.in" >"conftest.tmp" |
| 5408 | mv "conftest.tmp" "conftest.in" |
| 5409 | cp "conftest.in" "conftest.nl" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5410 | $as_echo 'EGREP' >> "conftest.nl" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5411 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break |
| 5412 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5413 | as_fn_arith $ac_count + 1 && ac_count=$as_val |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5414 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then |
| 5415 | # Best one so far, save it but keep looking for a better one |
| 5416 | ac_cv_path_EGREP="$ac_path_EGREP" |
| 5417 | ac_path_EGREP_max=$ac_count |
| 5418 | fi |
| 5419 | # 10*(2^10) chars as input seems more than enough |
| 5420 | test $ac_count -gt 10 && break |
| 5421 | done |
| 5422 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; |
| 5423 | esac |
| 5424 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5425 | $ac_path_EGREP_found && break 3 |
| 5426 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5427 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5428 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5429 | IFS=$as_save_IFS |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5430 | if test -z "$ac_cv_path_EGREP"; then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 5431 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5432 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5433 | else |
| 5434 | ac_cv_path_EGREP=$EGREP |
| 5435 | fi |
| 5436 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5437 | fi |
| 5438 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5439 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
| 5440 | $as_echo "$ac_cv_path_EGREP" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5441 | EGREP="$ac_cv_path_EGREP" |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 5442 | |
| 5443 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5444 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
| 5445 | $as_echo_n "checking for ANSI C header files... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 5446 | if ${ac_cv_header_stdc+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5447 | $as_echo_n "(cached) " >&6 |
| 5448 | else |
| 5449 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Benjamin Peterson | 8719ad5 | 2009-09-11 22:24:02 +0000 | [diff] [blame] | 5450 | /* end confdefs.h. */ |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5451 | #include <stdlib.h> |
| 5452 | #include <stdarg.h> |
| 5453 | #include <string.h> |
| 5454 | #include <float.h> |
| 5455 | |
| 5456 | int |
| 5457 | main () |
| 5458 | { |
| 5459 | |
| 5460 | ; |
| 5461 | return 0; |
| 5462 | } |
| 5463 | _ACEOF |
| 5464 | if ac_fn_c_try_compile "$LINENO"; then : |
| 5465 | ac_cv_header_stdc=yes |
| 5466 | else |
| 5467 | ac_cv_header_stdc=no |
| 5468 | fi |
| 5469 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 5470 | |
| 5471 | if test $ac_cv_header_stdc = yes; then |
| 5472 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
| 5473 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 5474 | /* end confdefs.h. */ |
| 5475 | #include <string.h> |
Benjamin Peterson | 8719ad5 | 2009-09-11 22:24:02 +0000 | [diff] [blame] | 5476 | |
Benjamin Peterson | 8719ad5 | 2009-09-11 22:24:02 +0000 | [diff] [blame] | 5477 | _ACEOF |
Ronald Oussoren | 74f29b4 | 2009-09-20 20:09:26 +0000 | [diff] [blame] | 5478 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5479 | $EGREP "memchr" >/dev/null 2>&1; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5480 | |
Ronald Oussoren | 74f29b4 | 2009-09-20 20:09:26 +0000 | [diff] [blame] | 5481 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5482 | ac_cv_header_stdc=no |
Ronald Oussoren | 74f29b4 | 2009-09-20 20:09:26 +0000 | [diff] [blame] | 5483 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 5484 | rm -f conftest* |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5485 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5486 | fi |
| 5487 | |
| 5488 | if test $ac_cv_header_stdc = yes; then |
| 5489 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
| 5490 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 5491 | /* end confdefs.h. */ |
| 5492 | #include <stdlib.h> |
| 5493 | |
| 5494 | _ACEOF |
| 5495 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 5496 | $EGREP "free" >/dev/null 2>&1; then : |
| 5497 | |
| 5498 | else |
| 5499 | ac_cv_header_stdc=no |
| 5500 | fi |
| 5501 | rm -f conftest* |
| 5502 | |
| 5503 | fi |
| 5504 | |
| 5505 | if test $ac_cv_header_stdc = yes; then |
| 5506 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
| 5507 | if test "$cross_compiling" = yes; then : |
| 5508 | : |
| 5509 | else |
| 5510 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 5511 | /* end confdefs.h. */ |
| 5512 | #include <ctype.h> |
| 5513 | #include <stdlib.h> |
| 5514 | #if ((' ' & 0x0FF) == 0x020) |
| 5515 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 5516 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
| 5517 | #else |
| 5518 | # define ISLOWER(c) \ |
| 5519 | (('a' <= (c) && (c) <= 'i') \ |
| 5520 | || ('j' <= (c) && (c) <= 'r') \ |
| 5521 | || ('s' <= (c) && (c) <= 'z')) |
| 5522 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
| 5523 | #endif |
| 5524 | |
| 5525 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
| 5526 | int |
| 5527 | main () |
| 5528 | { |
| 5529 | int i; |
| 5530 | for (i = 0; i < 256; i++) |
| 5531 | if (XOR (islower (i), ISLOWER (i)) |
| 5532 | || toupper (i) != TOUPPER (i)) |
| 5533 | return 2; |
| 5534 | return 0; |
| 5535 | } |
| 5536 | _ACEOF |
| 5537 | if ac_fn_c_try_run "$LINENO"; then : |
| 5538 | |
| 5539 | else |
| 5540 | ac_cv_header_stdc=no |
| 5541 | fi |
| 5542 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 5543 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 5544 | fi |
| 5545 | |
| 5546 | fi |
| 5547 | fi |
| 5548 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
| 5549 | $as_echo "$ac_cv_header_stdc" >&6; } |
| 5550 | if test $ac_cv_header_stdc = yes; then |
| 5551 | |
| 5552 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
| 5553 | |
| 5554 | fi |
| 5555 | |
| 5556 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. |
| 5557 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
| 5558 | inttypes.h stdint.h unistd.h |
| 5559 | do : |
| 5560 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| 5561 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default |
| 5562 | " |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 5563 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5564 | cat >>confdefs.h <<_ACEOF |
| 5565 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
| 5566 | _ACEOF |
| 5567 | |
| 5568 | fi |
| 5569 | |
| 5570 | done |
| 5571 | |
| 5572 | |
| 5573 | |
| 5574 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 5575 | if test "x$ac_cv_header_minix_config_h" = xyes; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5576 | MINIX=yes |
| 5577 | else |
| 5578 | MINIX= |
| 5579 | fi |
| 5580 | |
| 5581 | |
| 5582 | if test "$MINIX" = yes; then |
| 5583 | |
| 5584 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
| 5585 | |
| 5586 | |
| 5587 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
| 5588 | |
| 5589 | |
| 5590 | $as_echo "#define _MINIX 1" >>confdefs.h |
| 5591 | |
| 5592 | fi |
| 5593 | |
| 5594 | |
| 5595 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
| 5596 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 5597 | if ${ac_cv_safe_to_define___extensions__+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5598 | $as_echo_n "(cached) " >&6 |
| 5599 | else |
| 5600 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 5601 | /* end confdefs.h. */ |
| 5602 | |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 5603 | # define __EXTENSIONS__ 1 |
| 5604 | $ac_includes_default |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5605 | int |
| 5606 | main () |
| 5607 | { |
| 5608 | |
| 5609 | ; |
| 5610 | return 0; |
| 5611 | } |
| 5612 | _ACEOF |
| 5613 | if ac_fn_c_try_compile "$LINENO"; then : |
| 5614 | ac_cv_safe_to_define___extensions__=yes |
| 5615 | else |
| 5616 | ac_cv_safe_to_define___extensions__=no |
| 5617 | fi |
| 5618 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 5619 | fi |
| 5620 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
| 5621 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } |
| 5622 | test $ac_cv_safe_to_define___extensions__ = yes && |
| 5623 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
| 5624 | |
| 5625 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
| 5626 | |
| 5627 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
| 5628 | |
| 5629 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
| 5630 | |
| 5631 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
| 5632 | |
| 5633 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5634 | |
Xavier de Gaye | 95750b1 | 2016-07-09 11:05:42 +0200 | [diff] [blame] | 5635 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5 |
| 5636 | $as_echo_n "checking for the Android API level... " >&6; } |
| 5637 | cat >> conftest.c <<EOF |
| 5638 | #ifdef __ANDROID__ |
Xavier de Gaye | 2a352b6 | 2017-01-04 21:51:16 +0100 | [diff] [blame] | 5639 | android_api = __ANDROID_API__ |
| 5640 | arm_arch = __ARM_ARCH |
Xavier de Gaye | 95750b1 | 2016-07-09 11:05:42 +0200 | [diff] [blame] | 5641 | #else |
| 5642 | #error not Android |
| 5643 | #endif |
| 5644 | EOF |
| 5645 | |
| 5646 | if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then |
Xavier de Gaye | 2a352b6 | 2017-01-04 21:51:16 +0100 | [diff] [blame] | 5647 | ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out` |
| 5648 | _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out` |
Xavier de Gaye | 95750b1 | 2016-07-09 11:05:42 +0200 | [diff] [blame] | 5649 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5 |
| 5650 | $as_echo "$ANDROID_API_LEVEL" >&6; } |
xdegaye | c06c22e | 2017-11-23 11:44:38 +0100 | [diff] [blame] | 5651 | if test -z "$ANDROID_API_LEVEL"; then |
| 5652 | echo 'Fatal: you must define __ANDROID_API__' |
| 5653 | exit 1 |
| 5654 | fi |
Xavier de Gaye | 95750b1 | 2016-07-09 11:05:42 +0200 | [diff] [blame] | 5655 | |
| 5656 | cat >>confdefs.h <<_ACEOF |
| 5657 | #define ANDROID_API_LEVEL $ANDROID_API_LEVEL |
| 5658 | _ACEOF |
| 5659 | |
Xavier de Gaye | 2a352b6 | 2017-01-04 21:51:16 +0100 | [diff] [blame] | 5660 | |
| 5661 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5 |
| 5662 | $as_echo_n "checking for the Android arm ABI... " >&6; } |
| 5663 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5 |
| 5664 | $as_echo "$_arm_arch" >&6; } |
| 5665 | if test "$_arm_arch" = 7; then |
| 5666 | BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16" |
| 5667 | LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8" |
| 5668 | fi |
Xavier de Gaye | 95750b1 | 2016-07-09 11:05:42 +0200 | [diff] [blame] | 5669 | else |
| 5670 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5 |
| 5671 | $as_echo "not Android" >&6; } |
| 5672 | fi |
| 5673 | rm -f conftest.c conftest.out |
| 5674 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5675 | # Check for unsupported systems |
| 5676 | case $ac_sys_system/$ac_sys_release in |
| 5677 | atheos*|Linux*/1*) |
| 5678 | echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported. |
| 5679 | echo See README for details. |
| 5680 | exit 1;; |
| 5681 | esac |
| 5682 | |
| 5683 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5684 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5 |
| 5685 | $as_echo_n "checking for --with-suffix... " >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5686 | |
| 5687 | # Check whether --with-suffix was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5688 | if test "${with_suffix+set}" = set; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5689 | withval=$with_suffix; |
| 5690 | case $withval in |
| 5691 | no) EXEEXT=;; |
| 5692 | yes) EXEEXT=.exe;; |
| 5693 | *) EXEEXT=$withval;; |
| 5694 | esac |
| 5695 | fi |
| 5696 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5697 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5 |
| 5698 | $as_echo "$EXEEXT" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5699 | |
| 5700 | # Test whether we're running on a non-case-sensitive system, in which |
| 5701 | # case we give a warning if no ext is given |
| 5702 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5703 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5 |
| 5704 | $as_echo_n "checking for case-insensitive build directory... " >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5705 | if test ! -d CaseSensitiveTestDir; then |
| 5706 | mkdir CaseSensitiveTestDir |
| 5707 | fi |
| 5708 | |
| 5709 | if test -d casesensitivetestdir |
| 5710 | then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5711 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 5712 | $as_echo "yes" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5713 | BUILDEXEEXT=.exe |
| 5714 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5715 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 5716 | $as_echo "no" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5717 | BUILDEXEEXT=$EXEEXT |
| 5718 | fi |
| 5719 | rmdir CaseSensitiveTestDir |
| 5720 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5721 | case $ac_sys_system in |
| 5722 | hp*|HP*) |
| 5723 | case $CC in |
| 5724 | cc|*/cc) CC="$CC -Ae";; |
| 5725 | esac;; |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5726 | esac |
| 5727 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5728 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5729 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5 |
| 5730 | $as_echo_n "checking LIBRARY... " >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5731 | if test -z "$LIBRARY" |
| 5732 | then |
Barry Warsaw | f040d7d | 2010-10-18 17:09:07 +0000 | [diff] [blame] | 5733 | LIBRARY='libpython$(VERSION)$(ABIFLAGS).a' |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5734 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5735 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5 |
| 5736 | $as_echo "$LIBRARY" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5737 | |
| 5738 | # LDLIBRARY is the name of the library to link against (as opposed to the |
| 5739 | # name of the library into which to insert object files). BLDLIBRARY is also |
| 5740 | # the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY |
| 5741 | # is blank as the main program is not linked directly against LDLIBRARY. |
| 5742 | # LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On |
| 5743 | # systems without shared libraries, LDLIBRARY is the same as LIBRARY |
| 5744 | # (defined in the Makefiles). On Cygwin LDLIBRARY is the import library, |
| 5745 | # DLLLIBRARY is the shared (i.e., DLL) library. |
| 5746 | # |
| 5747 | # RUNSHARED is used to run shared python without installed libraries |
| 5748 | # |
| 5749 | # INSTSONAME is the name of the shared library that will be use to install |
| 5750 | # on the system - some systems like version suffix, others don't |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 5751 | # |
| 5752 | # LDVERSION is the shared library version number, normally the Python version |
| 5753 | # with the ABI build flags appended. |
| 5754 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5755 | |
| 5756 | |
| 5757 | |
| 5758 | |
| 5759 | |
| 5760 | |
Martin v. Löwis | d1fc34d | 2010-12-30 14:55:47 +0000 | [diff] [blame] | 5761 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5762 | LDLIBRARY="$LIBRARY" |
| 5763 | BLDLIBRARY='$(LDLIBRARY)' |
| 5764 | INSTSONAME='$(LDLIBRARY)' |
| 5765 | DLLLIBRARY='' |
| 5766 | LDLIBRARYDIR='' |
| 5767 | RUNSHARED='' |
Barry Warsaw | 14d98ac | 2010-11-24 19:43:47 +0000 | [diff] [blame] | 5768 | LDVERSION="$VERSION" |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5769 | |
| 5770 | # LINKCC is the command that links the python executable -- default is $(CC). |
| 5771 | # If CXX is set, and if it is needed to link a main function that was |
| 5772 | # compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable: |
| 5773 | # python might then depend on the C++ runtime |
| 5774 | # This is altered for AIX in order to build the export list before |
| 5775 | # linking. |
| 5776 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5777 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5 |
| 5778 | $as_echo_n "checking LINKCC... " >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5779 | if test -z "$LINKCC" |
| 5780 | then |
| 5781 | LINKCC='$(PURIFY) $(MAINCC)' |
| 5782 | case $ac_sys_system in |
| 5783 | AIX*) |
| 5784 | exp_extra="\"\"" |
| 5785 | if test $ac_sys_release -ge 5 -o \ |
| 5786 | $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then |
| 5787 | exp_extra="." |
| 5788 | fi |
| 5789 | LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";; |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5790 | QNX*) |
| 5791 | # qcc must be used because the other compilers do not |
| 5792 | # support -N. |
| 5793 | LINKCC=qcc;; |
| 5794 | esac |
| 5795 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5796 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5 |
| 5797 | $as_echo "$LINKCC" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5798 | |
| 5799 | # GNULD is set to "yes" if the GNU linker is used. If this goes wrong |
| 5800 | # make sure we default having it set to "no": this is used by |
| 5801 | # distutils.unixccompiler to know if it should add --enable-new-dtags |
| 5802 | # to linker command lines, and failing to detect GNU ld simply results |
| 5803 | # in the same bahaviour as before. |
| 5804 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5805 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
| 5806 | $as_echo_n "checking for GNU ld... " >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5807 | ac_prog=ld |
| 5808 | if test "$GCC" = yes; then |
| 5809 | ac_prog=`$CC -print-prog-name=ld` |
| 5810 | fi |
| 5811 | case `"$ac_prog" -V 2>&1 < /dev/null` in |
| 5812 | *GNU*) |
| 5813 | GNULD=yes;; |
| 5814 | *) |
| 5815 | GNULD=no;; |
| 5816 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5817 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5 |
| 5818 | $as_echo "$GNULD" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5819 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5820 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5 |
| 5821 | $as_echo_n "checking for --enable-shared... " >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5822 | # Check whether --enable-shared was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5823 | if test "${enable_shared+set}" = set; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5824 | enableval=$enable_shared; |
| 5825 | fi |
| 5826 | |
| 5827 | |
| 5828 | if test -z "$enable_shared" |
| 5829 | then |
| 5830 | case $ac_sys_system in |
Antoine Pitrou | 6103ab1 | 2009-10-24 20:11:21 +0000 | [diff] [blame] | 5831 | CYGWIN*) |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5832 | enable_shared="yes";; |
| 5833 | *) |
| 5834 | enable_shared="no";; |
| 5835 | esac |
| 5836 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5837 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 |
| 5838 | $as_echo "$enable_shared" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5839 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5840 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5 |
| 5841 | $as_echo_n "checking for --enable-profiling... " >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5842 | # Check whether --enable-profiling was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5843 | if test "${enable_profiling+set}" = set; then : |
doko@ubuntu.com | ba01583 | 2012-06-30 16:52:05 +0200 | [diff] [blame] | 5844 | enableval=$enable_profiling; |
| 5845 | fi |
| 5846 | |
| 5847 | if test "x$enable_profiling" = xyes; then |
| 5848 | ac_save_cc="$CC" |
Benjamin Peterson | 615ea1a | 2013-03-26 08:55:37 -0400 | [diff] [blame] | 5849 | CC="$CC -pg" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5850 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5851 | /* end confdefs.h. */ |
| 5852 | int main() { return 0; } |
| 5853 | _ACEOF |
doko@ubuntu.com | ba01583 | 2012-06-30 16:52:05 +0200 | [diff] [blame] | 5854 | if ac_fn_c_try_link "$LINENO"; then : |
| 5855 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5856 | else |
doko@ubuntu.com | ba01583 | 2012-06-30 16:52:05 +0200 | [diff] [blame] | 5857 | enable_profiling=no |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5858 | fi |
doko@ubuntu.com | ba01583 | 2012-06-30 16:52:05 +0200 | [diff] [blame] | 5859 | rm -f core conftest.err conftest.$ac_objext \ |
| 5860 | conftest$ac_exeext conftest.$ac_ext |
| 5861 | CC="$ac_save_cc" |
| 5862 | else |
| 5863 | enable_profiling=no |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5864 | fi |
doko@ubuntu.com | ba01583 | 2012-06-30 16:52:05 +0200 | [diff] [blame] | 5865 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5 |
| 5866 | $as_echo "$enable_profiling" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5867 | |
doko@ubuntu.com | ba01583 | 2012-06-30 16:52:05 +0200 | [diff] [blame] | 5868 | if test "x$enable_profiling" = xyes; then |
| 5869 | BASECFLAGS="-pg $BASECFLAGS" |
| 5870 | LDFLAGS="-pg $LDFLAGS" |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5871 | fi |
| 5872 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5873 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5 |
| 5874 | $as_echo_n "checking LDLIBRARY... " >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5875 | |
| 5876 | # MacOSX framework builds need more magic. LDLIBRARY is the dynamic |
| 5877 | # library that we build, but we do not want to link against it (we |
| 5878 | # will find it with a -framework option). For this reason there is an |
| 5879 | # extra variable BLDLIBRARY against which Python and the extension |
| 5880 | # modules are linked, BLDLIBRARY. This is normally the same as |
| 5881 | # LDLIBRARY, but empty for MacOSX framework builds. |
| 5882 | if test "$enable_framework" |
| 5883 | then |
| 5884 | LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
doko@ubuntu.com | e5de66e | 2014-05-07 12:57:44 +0200 | [diff] [blame] | 5885 | RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}} |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5886 | BLDLIBRARY='' |
| 5887 | else |
| 5888 | BLDLIBRARY='$(LDLIBRARY)' |
| 5889 | fi |
| 5890 | |
| 5891 | # Other platforms follow |
| 5892 | if test $enable_shared = "yes"; then |
doko@python.org | 8742119 | 2013-01-26 11:39:31 +0100 | [diff] [blame] | 5893 | PY_ENABLE_SHARED=1 |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5894 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5895 | $as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5896 | |
| 5897 | case $ac_sys_system in |
| 5898 | CYGWIN*) |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 5899 | LDLIBRARY='libpython$(LDVERSION).dll.a' |
| 5900 | DLLLIBRARY='libpython$(LDVERSION).dll' |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5901 | ;; |
| 5902 | SunOS*) |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 5903 | LDLIBRARY='libpython$(LDVERSION).so' |
| 5904 | BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)' |
doko@ubuntu.com | e5de66e | 2014-05-07 12:57:44 +0200 | [diff] [blame] | 5905 | RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5906 | INSTSONAME="$LDLIBRARY".$SOVERSION |
Martin v. Löwis | 9b142aa | 2011-02-05 20:26:52 +0000 | [diff] [blame] | 5907 | if test "$with_pydebug" != yes |
Martin v. Löwis | d1fc34d | 2010-12-30 14:55:47 +0000 | [diff] [blame] | 5908 | then |
| 5909 | PY3LIBRARY=libpython3.so |
| 5910 | fi |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5911 | ;; |
Charles-François Natali | 749400a | 2011-07-24 22:41:18 +0200 | [diff] [blame] | 5912 | Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*) |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 5913 | LDLIBRARY='libpython$(LDVERSION).so' |
| 5914 | BLDLIBRARY='-L. -lpython$(LDVERSION)' |
doko@ubuntu.com | e5de66e | 2014-05-07 12:57:44 +0200 | [diff] [blame] | 5915 | RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5916 | INSTSONAME="$LDLIBRARY".$SOVERSION |
Martin v. Löwis | 9b142aa | 2011-02-05 20:26:52 +0000 | [diff] [blame] | 5917 | if test "$with_pydebug" != yes |
Martin v. Löwis | d1fc34d | 2010-12-30 14:55:47 +0000 | [diff] [blame] | 5918 | then |
| 5919 | PY3LIBRARY=libpython3.so |
| 5920 | fi |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5921 | ;; |
| 5922 | hp*|HP*) |
| 5923 | case `uname -m` in |
| 5924 | ia64) |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 5925 | LDLIBRARY='libpython$(LDVERSION).so' |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5926 | ;; |
| 5927 | *) |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 5928 | LDLIBRARY='libpython$(LDVERSION).sl' |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5929 | ;; |
| 5930 | esac |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 5931 | BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)' |
doko@ubuntu.com | e5de66e | 2014-05-07 12:57:44 +0200 | [diff] [blame] | 5932 | RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}} |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5933 | ;; |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5934 | Darwin*) |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 5935 | LDLIBRARY='libpython$(LDVERSION).dylib' |
| 5936 | BLDLIBRARY='-L. -lpython$(LDVERSION)' |
doko@ubuntu.com | e5de66e | 2014-05-07 12:57:44 +0200 | [diff] [blame] | 5937 | RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5938 | ;; |
Antoine Pitrou | 8e6b407 | 2010-09-10 19:44:44 +0000 | [diff] [blame] | 5939 | AIX*) |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 5940 | LDLIBRARY='libpython$(LDVERSION).so' |
doko@ubuntu.com | e5de66e | 2014-05-07 12:57:44 +0200 | [diff] [blame] | 5941 | RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}} |
Antoine Pitrou | 8e6b407 | 2010-09-10 19:44:44 +0000 | [diff] [blame] | 5942 | ;; |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5943 | |
| 5944 | esac |
| 5945 | else # shared is disabled |
doko@python.org | 8742119 | 2013-01-26 11:39:31 +0100 | [diff] [blame] | 5946 | PY_ENABLE_SHARED=0 |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5947 | case $ac_sys_system in |
| 5948 | CYGWIN*) |
| 5949 | BLDLIBRARY='$(LIBRARY)' |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 5950 | LDLIBRARY='libpython$(LDVERSION).dll.a' |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5951 | ;; |
| 5952 | esac |
| 5953 | fi |
| 5954 | |
doko@ubuntu.com | 1abe1c5 | 2012-06-30 20:42:45 +0200 | [diff] [blame] | 5955 | if test "$cross_compiling" = yes; then |
| 5956 | RUNSHARED= |
| 5957 | fi |
| 5958 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5959 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5 |
| 5960 | $as_echo "$LDLIBRARY" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5961 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5962 | |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 5963 | if test -n "$ac_tool_prefix"; then |
| 5964 | for ac_prog in ar aal |
| 5965 | do |
| 5966 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. |
| 5967 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5968 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 5969 | $as_echo_n "checking for $ac_word... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 5970 | if ${ac_cv_prog_AR+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5971 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5972 | else |
| 5973 | if test -n "$AR"; then |
| 5974 | ac_cv_prog_AR="$AR" # Let the user override the test. |
| 5975 | else |
| 5976 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 5977 | for as_dir in $PATH |
| 5978 | do |
| 5979 | IFS=$as_save_IFS |
| 5980 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5981 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 5982 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 5983 | ac_cv_prog_AR="$ac_tool_prefix$ac_prog" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5984 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5985 | break 2 |
| 5986 | fi |
| 5987 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5988 | done |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5989 | IFS=$as_save_IFS |
| 5990 | |
| 5991 | fi |
| 5992 | fi |
| 5993 | AR=$ac_cv_prog_AR |
| 5994 | if test -n "$AR"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5995 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
| 5996 | $as_echo "$AR" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5997 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5998 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 5999 | $as_echo "no" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6000 | fi |
| 6001 | |
| 6002 | |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 6003 | test -n "$AR" && break |
| 6004 | done |
| 6005 | fi |
| 6006 | if test -z "$AR"; then |
| 6007 | ac_ct_AR=$AR |
| 6008 | for ac_prog in ar aal |
| 6009 | do |
| 6010 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 6011 | set dummy $ac_prog; ac_word=$2 |
| 6012 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 6013 | $as_echo_n "checking for $ac_word... " >&6; } |
| 6014 | if ${ac_cv_prog_ac_ct_AR+:} false; then : |
| 6015 | $as_echo_n "(cached) " >&6 |
| 6016 | else |
| 6017 | if test -n "$ac_ct_AR"; then |
| 6018 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. |
| 6019 | else |
| 6020 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 6021 | for as_dir in $PATH |
| 6022 | do |
| 6023 | IFS=$as_save_IFS |
| 6024 | test -z "$as_dir" && as_dir=. |
| 6025 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 646eb1e | 2012-10-29 17:35:57 +0000 | [diff] [blame] | 6026 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 6027 | ac_cv_prog_ac_ct_AR="$ac_prog" |
| 6028 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 6029 | break 2 |
| 6030 | fi |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6031 | done |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 6032 | done |
| 6033 | IFS=$as_save_IFS |
| 6034 | |
| 6035 | fi |
| 6036 | fi |
| 6037 | ac_ct_AR=$ac_cv_prog_ac_ct_AR |
| 6038 | if test -n "$ac_ct_AR"; then |
| 6039 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
| 6040 | $as_echo "$ac_ct_AR" >&6; } |
| 6041 | else |
| 6042 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6043 | $as_echo "no" >&6; } |
| 6044 | fi |
| 6045 | |
| 6046 | |
| 6047 | test -n "$ac_ct_AR" && break |
| 6048 | done |
| 6049 | |
| 6050 | if test "x$ac_ct_AR" = x; then |
| 6051 | AR="ar" |
| 6052 | else |
| 6053 | case $cross_compiling:$ac_tool_warned in |
| 6054 | yes:) |
| 6055 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 6056 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 6057 | ac_tool_warned=yes ;; |
| 6058 | esac |
| 6059 | AR=$ac_ct_AR |
| 6060 | fi |
| 6061 | fi |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6062 | |
| 6063 | |
| 6064 | # tweak ARFLAGS only if the user didn't set it on the command line |
| 6065 | |
| 6066 | if test -z "$ARFLAGS" |
| 6067 | then |
Benjamin Peterson | d15108a | 2017-09-29 08:42:41 -0700 | [diff] [blame] | 6068 | ARFLAGS="rcs" |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6069 | fi |
| 6070 | |
doko@ubuntu.com | 5884449 | 2012-06-30 18:25:32 +0200 | [diff] [blame] | 6071 | if test -n "$ac_tool_prefix"; then |
| 6072 | for ac_prog in readelf |
| 6073 | do |
| 6074 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. |
| 6075 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 |
| 6076 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 6077 | $as_echo_n "checking for $ac_word... " >&6; } |
| 6078 | if ${ac_cv_prog_READELF+:} false; then : |
| 6079 | $as_echo_n "(cached) " >&6 |
| 6080 | else |
| 6081 | if test -n "$READELF"; then |
| 6082 | ac_cv_prog_READELF="$READELF" # Let the user override the test. |
| 6083 | else |
| 6084 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 6085 | for as_dir in $PATH |
| 6086 | do |
| 6087 | IFS=$as_save_IFS |
| 6088 | test -z "$as_dir" && as_dir=. |
| 6089 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 6090 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
doko@ubuntu.com | 5884449 | 2012-06-30 18:25:32 +0200 | [diff] [blame] | 6091 | ac_cv_prog_READELF="$ac_tool_prefix$ac_prog" |
| 6092 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 6093 | break 2 |
| 6094 | fi |
| 6095 | done |
| 6096 | done |
| 6097 | IFS=$as_save_IFS |
| 6098 | |
| 6099 | fi |
| 6100 | fi |
| 6101 | READELF=$ac_cv_prog_READELF |
| 6102 | if test -n "$READELF"; then |
| 6103 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5 |
| 6104 | $as_echo "$READELF" >&6; } |
| 6105 | else |
| 6106 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6107 | $as_echo "no" >&6; } |
| 6108 | fi |
| 6109 | |
| 6110 | |
| 6111 | test -n "$READELF" && break |
| 6112 | done |
| 6113 | fi |
| 6114 | if test -z "$READELF"; then |
| 6115 | ac_ct_READELF=$READELF |
| 6116 | for ac_prog in readelf |
| 6117 | do |
| 6118 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 6119 | set dummy $ac_prog; ac_word=$2 |
| 6120 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 6121 | $as_echo_n "checking for $ac_word... " >&6; } |
| 6122 | if ${ac_cv_prog_ac_ct_READELF+:} false; then : |
| 6123 | $as_echo_n "(cached) " >&6 |
| 6124 | else |
| 6125 | if test -n "$ac_ct_READELF"; then |
| 6126 | ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test. |
| 6127 | else |
| 6128 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 6129 | for as_dir in $PATH |
| 6130 | do |
| 6131 | IFS=$as_save_IFS |
| 6132 | test -z "$as_dir" && as_dir=. |
| 6133 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 6134 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
doko@ubuntu.com | 5884449 | 2012-06-30 18:25:32 +0200 | [diff] [blame] | 6135 | ac_cv_prog_ac_ct_READELF="$ac_prog" |
| 6136 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 6137 | break 2 |
| 6138 | fi |
| 6139 | done |
| 6140 | done |
| 6141 | IFS=$as_save_IFS |
| 6142 | |
| 6143 | fi |
| 6144 | fi |
| 6145 | ac_ct_READELF=$ac_cv_prog_ac_ct_READELF |
| 6146 | if test -n "$ac_ct_READELF"; then |
| 6147 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5 |
| 6148 | $as_echo "$ac_ct_READELF" >&6; } |
| 6149 | else |
| 6150 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6151 | $as_echo "no" >&6; } |
| 6152 | fi |
| 6153 | |
| 6154 | |
| 6155 | test -n "$ac_ct_READELF" && break |
| 6156 | done |
| 6157 | |
| 6158 | if test "x$ac_ct_READELF" = x; then |
| 6159 | READELF=":" |
| 6160 | else |
| 6161 | case $cross_compiling:$ac_tool_warned in |
| 6162 | yes:) |
| 6163 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 6164 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 6165 | ac_tool_warned=yes ;; |
| 6166 | esac |
| 6167 | READELF=$ac_ct_READELF |
| 6168 | fi |
| 6169 | fi |
| 6170 | |
| 6171 | if test "$cross_compiling" = yes; then |
| 6172 | case "$READELF" in |
| 6173 | readelf|:) |
| 6174 | as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5 |
| 6175 | ;; |
| 6176 | esac |
| 6177 | fi |
| 6178 | |
| 6179 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6180 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6181 | case $MACHDEP in |
Benjamin Peterson | 288d1da | 2017-09-28 22:44:27 -0700 | [diff] [blame] | 6182 | hp*|HP*) |
| 6183 | # install -d does not work on HP-UX |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6184 | if test -z "$INSTALL" |
| 6185 | then |
| 6186 | INSTALL="${srcdir}/install-sh -c" |
| 6187 | fi |
| 6188 | esac |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6189 | # Find a good install program. We prefer a C program (faster), |
| 6190 | # so one script is as good as another. But avoid the broken or |
| 6191 | # incompatible versions: |
| 6192 | # SysV /etc/install, /usr/sbin/install |
| 6193 | # SunOS /usr/etc/install |
| 6194 | # IRIX /sbin/install |
| 6195 | # AIX /bin/install |
| 6196 | # AmigaOS /C/install, which installs bootblocks on floppy discs |
| 6197 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
| 6198 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
| 6199 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
| 6200 | # OS/2's system install, which has a completely different semantic |
| 6201 | # ./install, which can be erroneously created by make from ./install.sh. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6202 | # Reject install programs that cannot install multiple files. |
| 6203 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 |
| 6204 | $as_echo_n "checking for a BSD-compatible install... " >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6205 | if test -z "$INSTALL"; then |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 6206 | if ${ac_cv_path_install+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6207 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6208 | else |
| 6209 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 6210 | for as_dir in $PATH |
| 6211 | do |
| 6212 | IFS=$as_save_IFS |
| 6213 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6214 | # Account for people who put trailing slashes in PATH elements. |
| 6215 | case $as_dir/ in #(( |
| 6216 | ./ | .// | /[cC]/* | \ |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6217 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6218 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6219 | /usr/ucb/* ) ;; |
| 6220 | *) |
| 6221 | # OSF1 and SCO ODT 3.0 have their own names for install. |
| 6222 | # Don't use installbsd from OSF since it installs stuff as root |
| 6223 | # by default. |
| 6224 | for ac_prog in ginstall scoinst install; do |
| 6225 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 6226 | if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6227 | if test $ac_prog = install && |
| 6228 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then |
| 6229 | # AIX install. It has an incompatible calling convention. |
| 6230 | : |
| 6231 | elif test $ac_prog = install && |
| 6232 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then |
| 6233 | # program-specific install script used by HP pwplus--don't use. |
| 6234 | : |
| 6235 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6236 | rm -rf conftest.one conftest.two conftest.dir |
| 6237 | echo one > conftest.one |
| 6238 | echo two > conftest.two |
| 6239 | mkdir conftest.dir |
| 6240 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && |
| 6241 | test -s conftest.one && test -s conftest.two && |
| 6242 | test -s conftest.dir/conftest.one && |
| 6243 | test -s conftest.dir/conftest.two |
| 6244 | then |
| 6245 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" |
| 6246 | break 3 |
| 6247 | fi |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6248 | fi |
| 6249 | fi |
| 6250 | done |
| 6251 | done |
| 6252 | ;; |
| 6253 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6254 | |
| 6255 | done |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6256 | IFS=$as_save_IFS |
| 6257 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6258 | rm -rf conftest.one conftest.two conftest.dir |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6259 | |
| 6260 | fi |
| 6261 | if test "${ac_cv_path_install+set}" = set; then |
| 6262 | INSTALL=$ac_cv_path_install |
| 6263 | else |
| 6264 | # As a last resort, use the slow shell script. Don't cache a |
| 6265 | # value for INSTALL within a source directory, because that will |
| 6266 | # break other packages using the cache if that directory is |
| 6267 | # removed, or if the value is a relative name. |
| 6268 | INSTALL=$ac_install_sh |
| 6269 | fi |
| 6270 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6271 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
| 6272 | $as_echo "$INSTALL" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6273 | |
| 6274 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
| 6275 | # It thinks the first close brace ends the variable substitution. |
| 6276 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' |
| 6277 | |
| 6278 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' |
| 6279 | |
| 6280 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
| 6281 | |
Matthias Klose | 93a0ef1 | 2012-03-15 18:08:34 +0100 | [diff] [blame] | 6282 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 |
| 6283 | $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } |
| 6284 | if test -z "$MKDIR_P"; then |
| 6285 | if ${ac_cv_path_mkdir+:} false; then : |
| 6286 | $as_echo_n "(cached) " >&6 |
| 6287 | else |
| 6288 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 6289 | for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin |
| 6290 | do |
| 6291 | IFS=$as_save_IFS |
| 6292 | test -z "$as_dir" && as_dir=. |
| 6293 | for ac_prog in mkdir gmkdir; do |
| 6294 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 6295 | as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue |
Matthias Klose | 93a0ef1 | 2012-03-15 18:08:34 +0100 | [diff] [blame] | 6296 | case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( |
| 6297 | 'mkdir (GNU coreutils) '* | \ |
| 6298 | 'mkdir (coreutils) '* | \ |
| 6299 | 'mkdir (fileutils) '4.1*) |
| 6300 | ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext |
| 6301 | break 3;; |
| 6302 | esac |
| 6303 | done |
| 6304 | done |
| 6305 | done |
| 6306 | IFS=$as_save_IFS |
| 6307 | |
| 6308 | fi |
| 6309 | |
| 6310 | test -d ./--version && rmdir ./--version |
| 6311 | if test "${ac_cv_path_mkdir+set}" = set; then |
| 6312 | MKDIR_P="$ac_cv_path_mkdir -p" |
| 6313 | else |
| 6314 | # As a last resort, use the slow shell script. Don't cache a |
| 6315 | # value for MKDIR_P within a source directory, because that will |
| 6316 | # break other packages using the cache if that directory is |
| 6317 | # removed, or if the value is a relative name. |
| 6318 | MKDIR_P="$ac_install_sh -d" |
| 6319 | fi |
| 6320 | fi |
| 6321 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 |
| 6322 | $as_echo "$MKDIR_P" >&6; } |
| 6323 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6324 | |
| 6325 | # Not every filesystem supports hard links |
| 6326 | |
| 6327 | if test -z "$LN" ; then |
| 6328 | case $ac_sys_system in |
| 6329 | CYGWIN*) LN="ln -s";; |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6330 | *) LN=ln;; |
| 6331 | esac |
| 6332 | fi |
| 6333 | |
Barry Warsaw | 35f3a2c | 2010-09-03 18:30:30 +0000 | [diff] [blame] | 6334 | # For calculating the .so ABI tag. |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 6335 | |
| 6336 | ABIFLAGS="" |
Barry Warsaw | 35f3a2c | 2010-09-03 18:30:30 +0000 | [diff] [blame] | 6337 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6338 | # Check for --with-pydebug |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6339 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5 |
| 6340 | $as_echo_n "checking for --with-pydebug... " >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6341 | |
| 6342 | # Check whether --with-pydebug was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6343 | if test "${with_pydebug+set}" = set; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6344 | withval=$with_pydebug; |
| 6345 | if test "$withval" != no |
| 6346 | then |
| 6347 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6348 | $as_echo "#define Py_DEBUG 1" >>confdefs.h |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6349 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6350 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 6351 | $as_echo "yes" >&6; }; |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6352 | Py_DEBUG='true' |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 6353 | ABIFLAGS="${ABIFLAGS}d" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6354 | else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6355 | $as_echo "no" >&6; }; Py_DEBUG='false' |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6356 | fi |
| 6357 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6358 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6359 | $as_echo "no" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6360 | fi |
| 6361 | |
| 6362 | |
Victor Stinner | f4e4703 | 2019-04-25 00:56:28 +0200 | [diff] [blame] | 6363 | # Check for --with-trace-refs |
| 6364 | # --with-trace-refs |
| 6365 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-trace-refs" >&5 |
| 6366 | $as_echo_n "checking for --with-trace-refs... " >&6; } |
| 6367 | |
| 6368 | # Check whether --with-trace-refs was given. |
| 6369 | if test "${with_trace_refs+set}" = set; then : |
| 6370 | withval=$with_trace_refs; |
| 6371 | else |
| 6372 | with_trace_refs=no |
| 6373 | fi |
| 6374 | |
| 6375 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5 |
| 6376 | $as_echo "$with_trace_refs" >&6; } |
| 6377 | |
| 6378 | if test "$with_trace_refs" = "yes" |
| 6379 | then |
| 6380 | |
| 6381 | $as_echo "#define Py_TRACE_REFS 1" >>confdefs.h |
| 6382 | |
| 6383 | fi |
| 6384 | |
| 6385 | # Check for --with-assertions. |
| 6386 | # This allows enabling assertions without Py_DEBUG. |
T. Wouters | ddbfa2c | 2017-05-23 01:30:49 +0200 | [diff] [blame] | 6387 | assertions='false' |
| 6388 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5 |
| 6389 | $as_echo_n "checking for --with-assertions... " >&6; } |
| 6390 | |
| 6391 | # Check whether --with-assertions was given. |
| 6392 | if test "${with_assertions+set}" = set; then : |
| 6393 | withval=$with_assertions; |
| 6394 | if test "$withval" != no |
| 6395 | then |
| 6396 | assertions='true' |
| 6397 | fi |
| 6398 | fi |
| 6399 | |
| 6400 | if test "$assertions" = 'true'; then |
| 6401 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 6402 | $as_echo "yes" >&6; } |
| 6403 | elif test "$Py_DEBUG" = 'true'; then |
| 6404 | assertions='true' |
| 6405 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5 |
| 6406 | $as_echo "implied by --with-pydebug" >&6; } |
| 6407 | else |
| 6408 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6409 | $as_echo "no" >&6; } |
| 6410 | fi |
| 6411 | |
Brett Cannon | 63d98bc | 2016-09-06 17:12:40 -0700 | [diff] [blame] | 6412 | # Enable optimization flags |
| 6413 | |
| 6414 | |
| 6415 | Py_OPT='false' |
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 1016b2f | 2016-11-20 21:07:42 +0000 | [diff] [blame] | 6416 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5 |
| 6417 | $as_echo_n "checking for --enable-optimizations... " >&6; } |
| 6418 | # Check whether --enable-optimizations was given. |
| 6419 | if test "${enable_optimizations+set}" = set; then : |
| 6420 | enableval=$enable_optimizations; |
Alex Wang | 8cea592 | 2017-03-28 08:50:51 -0400 | [diff] [blame] | 6421 | if test "$enableval" != no |
Brett Cannon | 63d98bc | 2016-09-06 17:12:40 -0700 | [diff] [blame] | 6422 | then |
| 6423 | Py_OPT='true' |
| 6424 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 6425 | $as_echo "yes" >&6; }; |
| 6426 | else |
| 6427 | Py_OPT='false' |
| 6428 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6429 | $as_echo "no" >&6; }; |
| 6430 | fi |
| 6431 | else |
| 6432 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6433 | $as_echo "no" >&6; } |
| 6434 | fi |
| 6435 | |
| 6436 | if test "$Py_OPT" = 'true' ; then |
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 14c7f71 | 2016-09-08 22:38:46 +0000 | [diff] [blame] | 6437 | # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not |
| 6438 | # compile working code using it and both test_distutils and test_gdb are |
Brett Cannon | 1d8f755 | 2016-11-03 16:20:00 -0700 | [diff] [blame] | 6439 | # broken when you do manage to get a toolchain that works with it. People |
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 14c7f71 | 2016-09-08 22:38:46 +0000 | [diff] [blame] | 6440 | # who want LTO need to use --with-lto themselves. |
Brett Cannon | 63d98bc | 2016-09-06 17:12:40 -0700 | [diff] [blame] | 6441 | DEF_MAKE_ALL_RULE="profile-opt" |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6442 | REQUIRE_PGO="yes" |
Brett Cannon | 63d98bc | 2016-09-06 17:12:40 -0700 | [diff] [blame] | 6443 | DEF_MAKE_RULE="build_all" |
| 6444 | else |
| 6445 | DEF_MAKE_ALL_RULE="build_all" |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6446 | REQUIRE_PGO="no" |
Brett Cannon | 63d98bc | 2016-09-06 17:12:40 -0700 | [diff] [blame] | 6447 | DEF_MAKE_RULE="all" |
| 6448 | fi |
| 6449 | |
Neil Schemenauer | 4e16a4a | 2019-07-22 12:54:25 -0700 | [diff] [blame] | 6450 | |
| 6451 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking PROFILE_TASK" >&5 |
| 6452 | $as_echo_n "checking PROFILE_TASK... " >&6; } |
| 6453 | if test -z "$PROFILE_TASK" |
| 6454 | then |
| 6455 | PROFILE_TASK='-m test --pgo' |
| 6456 | fi |
| 6457 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROFILE_TASK" >&5 |
| 6458 | $as_echo "$PROFILE_TASK" >&6; } |
| 6459 | |
serge-sans-paille | 5ad36f9 | 2018-10-25 01:54:22 +0200 | [diff] [blame] | 6460 | # Make llvm-relatec checks work on systems where llvm tools are not installed with their |
| 6461 | # normal names in the default $PATH (ie: Ubuntu). They exist under the |
| 6462 | # non-suffixed name in their versioned llvm directory. |
| 6463 | |
| 6464 | llvm_bin_dir='' |
| 6465 | llvm_path="${PATH}" |
| 6466 | if test "${CC}" = "clang" |
| 6467 | then |
| 6468 | clang_bin=`which clang` |
| 6469 | # Some systems install clang elsewhere as a symlink to the real path |
| 6470 | # which is where the related llvm tools are located. |
| 6471 | if test -L "${clang_bin}" |
| 6472 | then |
| 6473 | clang_dir=`dirname "${clang_bin}"` |
| 6474 | clang_bin=`readlink "${clang_bin}"` |
| 6475 | llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"` |
| 6476 | llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}" |
| 6477 | fi |
| 6478 | fi |
| 6479 | |
Gregory P. Smith | d82da9f | 2016-04-15 16:57:04 -0700 | [diff] [blame] | 6480 | # Enable LTO flags |
Gregory P. Smith | d82da9f | 2016-04-15 16:57:04 -0700 | [diff] [blame] | 6481 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5 |
| 6482 | $as_echo_n "checking for --with-lto... " >&6; } |
| 6483 | |
| 6484 | # Check whether --with-lto was given. |
| 6485 | if test "${with_lto+set}" = set; then : |
| 6486 | withval=$with_lto; |
| 6487 | if test "$withval" != no |
| 6488 | then |
| 6489 | Py_LTO='true' |
| 6490 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 6491 | $as_echo "yes" >&6; }; |
| 6492 | else |
| 6493 | Py_LTO='false' |
| 6494 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6495 | $as_echo "no" >&6; }; |
| 6496 | fi |
| 6497 | else |
| 6498 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6499 | $as_echo "no" >&6; } |
| 6500 | fi |
| 6501 | |
| 6502 | if test "$Py_LTO" = 'true' ; then |
| 6503 | case $CC in |
| 6504 | *clang*) |
Victor Stinner | 06fe77a | 2018-06-19 18:24:58 +0200 | [diff] [blame] | 6505 | |
Benjamin Peterson | f3095b0 | 2019-09-13 15:30:36 +0100 | [diff] [blame] | 6506 | if test -n "$ac_tool_prefix"; then |
| 6507 | # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args. |
| 6508 | set dummy ${ac_tool_prefix}llvm-ar; ac_word=$2 |
serge-sans-paille | 5ad36f9 | 2018-10-25 01:54:22 +0200 | [diff] [blame] | 6509 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 6510 | $as_echo_n "checking for $ac_word... " >&6; } |
| 6511 | if ${ac_cv_path_LLVM_AR+:} false; then : |
| 6512 | $as_echo_n "(cached) " >&6 |
| 6513 | else |
| 6514 | case $LLVM_AR in |
| 6515 | [\\/]* | ?:[\\/]*) |
| 6516 | ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path. |
| 6517 | ;; |
| 6518 | *) |
| 6519 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 6520 | for as_dir in ${llvm_path} |
| 6521 | do |
| 6522 | IFS=$as_save_IFS |
| 6523 | test -z "$as_dir" && as_dir=. |
| 6524 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 6525 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 6526 | ac_cv_path_LLVM_AR="$as_dir/$ac_word$ac_exec_ext" |
| 6527 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 6528 | break 2 |
| 6529 | fi |
| 6530 | done |
| 6531 | done |
| 6532 | IFS=$as_save_IFS |
| 6533 | |
| 6534 | ;; |
| 6535 | esac |
| 6536 | fi |
| 6537 | LLVM_AR=$ac_cv_path_LLVM_AR |
| 6538 | if test -n "$LLVM_AR"; then |
| 6539 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_AR" >&5 |
| 6540 | $as_echo "$LLVM_AR" >&6; } |
| 6541 | else |
| 6542 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6543 | $as_echo "no" >&6; } |
| 6544 | fi |
| 6545 | |
| 6546 | |
Benjamin Peterson | f3095b0 | 2019-09-13 15:30:36 +0100 | [diff] [blame] | 6547 | fi |
serge-sans-paille | 5ad36f9 | 2018-10-25 01:54:22 +0200 | [diff] [blame] | 6548 | if test -z "$ac_cv_path_LLVM_AR"; then |
Benjamin Peterson | f3095b0 | 2019-09-13 15:30:36 +0100 | [diff] [blame] | 6549 | ac_pt_LLVM_AR=$LLVM_AR |
| 6550 | # Extract the first word of "llvm-ar", so it can be a program name with args. |
serge-sans-paille | 5ad36f9 | 2018-10-25 01:54:22 +0200 | [diff] [blame] | 6551 | set dummy llvm-ar; ac_word=$2 |
| 6552 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 6553 | $as_echo_n "checking for $ac_word... " >&6; } |
| 6554 | if ${ac_cv_path_ac_pt_LLVM_AR+:} false; then : |
| 6555 | $as_echo_n "(cached) " >&6 |
| 6556 | else |
| 6557 | case $ac_pt_LLVM_AR in |
| 6558 | [\\/]* | ?:[\\/]*) |
| 6559 | ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path. |
| 6560 | ;; |
| 6561 | *) |
| 6562 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 6563 | for as_dir in ${llvm_path} |
| 6564 | do |
| 6565 | IFS=$as_save_IFS |
| 6566 | test -z "$as_dir" && as_dir=. |
| 6567 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 6568 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 6569 | ac_cv_path_ac_pt_LLVM_AR="$as_dir/$ac_word$ac_exec_ext" |
| 6570 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 6571 | break 2 |
| 6572 | fi |
| 6573 | done |
| 6574 | done |
| 6575 | IFS=$as_save_IFS |
| 6576 | |
serge-sans-paille | 5ad36f9 | 2018-10-25 01:54:22 +0200 | [diff] [blame] | 6577 | ;; |
| 6578 | esac |
| 6579 | fi |
| 6580 | ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR |
| 6581 | if test -n "$ac_pt_LLVM_AR"; then |
| 6582 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_AR" >&5 |
| 6583 | $as_echo "$ac_pt_LLVM_AR" >&6; } |
| 6584 | else |
| 6585 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6586 | $as_echo "no" >&6; } |
| 6587 | fi |
| 6588 | |
Benjamin Peterson | f3095b0 | 2019-09-13 15:30:36 +0100 | [diff] [blame] | 6589 | if test "x$ac_pt_LLVM_AR" = x; then |
serge-sans-paille | 5ad36f9 | 2018-10-25 01:54:22 +0200 | [diff] [blame] | 6590 | LLVM_AR="''" |
Benjamin Peterson | f3095b0 | 2019-09-13 15:30:36 +0100 | [diff] [blame] | 6591 | else |
| 6592 | case $cross_compiling:$ac_tool_warned in |
| 6593 | yes:) |
| 6594 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 6595 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 6596 | ac_tool_warned=yes ;; |
| 6597 | esac |
| 6598 | LLVM_AR=$ac_pt_LLVM_AR |
serge-sans-paille | 5ad36f9 | 2018-10-25 01:54:22 +0200 | [diff] [blame] | 6599 | fi |
| 6600 | else |
| 6601 | LLVM_AR="$ac_cv_path_LLVM_AR" |
| 6602 | fi |
| 6603 | |
| 6604 | |
| 6605 | if test -n "${LLVM_AR}" -a -x "${LLVM_AR}" |
| 6606 | then |
| 6607 | LLVM_AR_FOUND="found" |
| 6608 | else |
| 6609 | LLVM_AR_FOUND="not-found" |
| 6610 | fi |
| 6611 | if test "$ac_sys_system" = "Darwin" -a "${LLVM_AR_FOUND}" = "not-found" |
| 6612 | then |
| 6613 | found_llvm_ar=`/usr/bin/xcrun -find llvm-ar 2>/dev/null` |
| 6614 | if test -n "${found_llvm_ar}" |
| 6615 | then |
| 6616 | LLVM_AR='/usr/bin/xcrun llvm-ar' |
| 6617 | LLVM_AR_FOUND=found |
| 6618 | { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-ar found via xcrun: ${LLVM_AR}" >&5 |
| 6619 | $as_echo "$as_me: llvm-ar found via xcrun: ${LLVM_AR}" >&6;} |
| 6620 | fi |
| 6621 | fi |
| 6622 | if test $LLVM_AR_FOUND = not-found |
| 6623 | then |
| 6624 | LLVM_PROFR_ERR=yes |
| 6625 | as_fn_error $? "llvm-ar is required for a --with-lto build with clang but could not be found." "$LINENO" 5 |
| 6626 | else |
| 6627 | LLVM_AR_ERR=no |
| 6628 | fi |
| 6629 | AR="${LLVM_AR}" |
| 6630 | case $ac_sys_system in |
| 6631 | Darwin*) |
| 6632 | # Any changes made here should be reflected in the GCC+Darwin case below |
| 6633 | LTOFLAGS="-flto -Wl,-export_dynamic" |
| 6634 | ;; |
| 6635 | *) |
| 6636 | LTOFLAGS="-flto" |
| 6637 | ;; |
| 6638 | esac |
| 6639 | ;; |
| 6640 | *gcc*) |
| 6641 | case $ac_sys_system in |
| 6642 | Darwin*) |
| 6643 | LTOFLAGS="-flto -Wl,-export_dynamic" |
| 6644 | ;; |
| 6645 | *) |
| 6646 | LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none" |
| 6647 | ;; |
| 6648 | esac |
| 6649 | ;; |
| 6650 | esac |
| 6651 | |
| 6652 | if test "$ac_cv_prog_cc_g" = "yes" |
| 6653 | then |
| 6654 | # bpo-30345: Add -g to LDFLAGS when compiling with LTO |
| 6655 | # to get debug symbols. |
| 6656 | LTOFLAGS="$LTOFLAGS -g" |
| 6657 | fi |
| 6658 | |
stratakis | f92c7aa | 2018-12-04 15:54:01 +0100 | [diff] [blame] | 6659 | CFLAGS_NODIST="$CFLAGS_NODIST $LTOFLAGS" |
stratakis | cf10a75 | 2018-12-19 18:19:01 +0100 | [diff] [blame] | 6660 | LDFLAGS_NODIST="$LDFLAGS_NODIST $LTOFLAGS" |
serge-sans-paille | 5ad36f9 | 2018-10-25 01:54:22 +0200 | [diff] [blame] | 6661 | fi |
| 6662 | |
| 6663 | # Enable PGO flags. |
| 6664 | |
| 6665 | |
| 6666 | |
| 6667 | |
| 6668 | |
| 6669 | |
Benjamin Peterson | f3095b0 | 2019-09-13 15:30:36 +0100 | [diff] [blame] | 6670 | if test -n "$ac_tool_prefix"; then |
| 6671 | # Extract the first word of "${ac_tool_prefix}llvm-profdata", so it can be a program name with args. |
| 6672 | set dummy ${ac_tool_prefix}llvm-profdata; ac_word=$2 |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6673 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 6674 | $as_echo_n "checking for $ac_word... " >&6; } |
| 6675 | if ${ac_cv_path_LLVM_PROFDATA+:} false; then : |
| 6676 | $as_echo_n "(cached) " >&6 |
| 6677 | else |
| 6678 | case $LLVM_PROFDATA in |
| 6679 | [\\/]* | ?:[\\/]*) |
| 6680 | ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path. |
| 6681 | ;; |
| 6682 | *) |
| 6683 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 6684 | for as_dir in ${llvm_path} |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6685 | do |
| 6686 | IFS=$as_save_IFS |
| 6687 | test -z "$as_dir" && as_dir=. |
| 6688 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 6689 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6690 | ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext" |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6691 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 6692 | break 2 |
| 6693 | fi |
| 6694 | done |
| 6695 | done |
| 6696 | IFS=$as_save_IFS |
| 6697 | |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6698 | ;; |
| 6699 | esac |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6700 | fi |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6701 | LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA |
| 6702 | if test -n "$LLVM_PROFDATA"; then |
| 6703 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5 |
| 6704 | $as_echo "$LLVM_PROFDATA" >&6; } |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6705 | else |
| 6706 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6707 | $as_echo "no" >&6; } |
| 6708 | fi |
| 6709 | |
| 6710 | |
Benjamin Peterson | f3095b0 | 2019-09-13 15:30:36 +0100 | [diff] [blame] | 6711 | fi |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6712 | if test -z "$ac_cv_path_LLVM_PROFDATA"; then |
Benjamin Peterson | f3095b0 | 2019-09-13 15:30:36 +0100 | [diff] [blame] | 6713 | ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA |
| 6714 | # Extract the first word of "llvm-profdata", so it can be a program name with args. |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6715 | set dummy llvm-profdata; ac_word=$2 |
| 6716 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 6717 | $as_echo_n "checking for $ac_word... " >&6; } |
| 6718 | if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then : |
| 6719 | $as_echo_n "(cached) " >&6 |
| 6720 | else |
| 6721 | case $ac_pt_LLVM_PROFDATA in |
| 6722 | [\\/]* | ?:[\\/]*) |
| 6723 | ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path. |
| 6724 | ;; |
| 6725 | *) |
| 6726 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 6727 | for as_dir in ${llvm_path} |
| 6728 | do |
| 6729 | IFS=$as_save_IFS |
| 6730 | test -z "$as_dir" && as_dir=. |
| 6731 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 6732 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 6733 | ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext" |
| 6734 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 6735 | break 2 |
| 6736 | fi |
| 6737 | done |
| 6738 | done |
| 6739 | IFS=$as_save_IFS |
| 6740 | |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6741 | ;; |
| 6742 | esac |
| 6743 | fi |
| 6744 | ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA |
| 6745 | if test -n "$ac_pt_LLVM_PROFDATA"; then |
| 6746 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5 |
| 6747 | $as_echo "$ac_pt_LLVM_PROFDATA" >&6; } |
| 6748 | else |
| 6749 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6750 | $as_echo "no" >&6; } |
| 6751 | fi |
| 6752 | |
Benjamin Peterson | f3095b0 | 2019-09-13 15:30:36 +0100 | [diff] [blame] | 6753 | if test "x$ac_pt_LLVM_PROFDATA" = x; then |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6754 | LLVM_PROFDATA="''" |
Benjamin Peterson | f3095b0 | 2019-09-13 15:30:36 +0100 | [diff] [blame] | 6755 | else |
| 6756 | case $cross_compiling:$ac_tool_warned in |
| 6757 | yes:) |
| 6758 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 6759 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 6760 | ac_tool_warned=yes ;; |
| 6761 | esac |
| 6762 | LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6763 | fi |
| 6764 | else |
| 6765 | LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA" |
| 6766 | fi |
| 6767 | |
| 6768 | |
| 6769 | if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}" |
| 6770 | then |
| 6771 | LLVM_PROF_FOUND="found" |
| 6772 | else |
| 6773 | LLVM_PROF_FOUND="not-found" |
| 6774 | fi |
| 6775 | if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found" |
| 6776 | then |
| 6777 | found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null` |
| 6778 | if test -n "${found_llvm_profdata}" |
| 6779 | then |
| 6780 | # llvm-profdata isn't directly in $PATH in some cases. |
| 6781 | # https://apple.stackexchange.com/questions/197053/ |
| 6782 | LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata' |
| 6783 | LLVM_PROF_FOUND=found |
| 6784 | { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5 |
| 6785 | $as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;} |
| 6786 | fi |
| 6787 | fi |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6788 | LLVM_PROF_ERR=no |
| 6789 | case $CC in |
| 6790 | *clang*) |
| 6791 | # Any changes made here should be reflected in the GCC+Darwin case below |
| 6792 | PGO_PROF_GEN_FLAG="-fprofile-instr-generate" |
| 6793 | PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd" |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6794 | LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr" |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6795 | LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\"" |
| 6796 | if test $LLVM_PROF_FOUND = not-found |
| 6797 | then |
| 6798 | LLVM_PROF_ERR=yes |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6799 | if test "${REQUIRE_PGO}" = "yes" |
| 6800 | then |
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 1016b2f | 2016-11-20 21:07:42 +0000 | [diff] [blame] | 6801 | as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5 |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6802 | fi |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6803 | fi |
| 6804 | ;; |
| 6805 | *gcc*) |
| 6806 | case $ac_sys_system in |
| 6807 | Darwin*) |
| 6808 | PGO_PROF_GEN_FLAG="-fprofile-instr-generate" |
| 6809 | PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd" |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6810 | LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr" |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6811 | LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\"" |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6812 | if test "${LLVM_PROF_FOUND}" = "not-found" |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6813 | then |
| 6814 | LLVM_PROF_ERR=yes |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6815 | if test "${REQUIRE_PGO}" = "yes" |
| 6816 | then |
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 1016b2f | 2016-11-20 21:07:42 +0000 | [diff] [blame] | 6817 | as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5 |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6818 | fi |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6819 | fi |
| 6820 | ;; |
| 6821 | *) |
| 6822 | PGO_PROF_GEN_FLAG="-fprofile-generate" |
| 6823 | PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction" |
| 6824 | LLVM_PROF_MERGER="true" |
| 6825 | LLVM_PROF_FILE="" |
| 6826 | ;; |
| 6827 | esac |
| 6828 | ;; |
Zachary Ware | 5af8564 | 2015-12-21 12:09:17 -0600 | [diff] [blame] | 6829 | *icc*) |
| 6830 | PGO_PROF_GEN_FLAG="-prof-gen" |
| 6831 | PGO_PROF_USE_FLAG="-prof-use" |
| 6832 | LLVM_PROF_MERGER="true" |
| 6833 | LLVM_PROF_FILE="" |
| 6834 | ;; |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6835 | esac |
| 6836 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6837 | # XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be |
| 6838 | # merged with this chunk of code? |
| 6839 | |
| 6840 | # Optimizer/debugger flags |
| 6841 | # ------------------------ |
| 6842 | # (The following bit of code is complicated enough - please keep things |
| 6843 | # indented properly. Just pretend you're editing Python code. ;-) |
| 6844 | |
| 6845 | # There are two parallel sets of case statements below, one that checks to |
| 6846 | # see if OPT was set and one that does BASECFLAGS setting based upon |
| 6847 | # compiler and platform. BASECFLAGS tweaks need to be made even if the |
| 6848 | # user set OPT. |
| 6849 | |
Victor Stinner | 23a683a | 2019-04-12 21:27:37 +0200 | [diff] [blame] | 6850 | case $CC in |
| 6851 | *clang*) |
| 6852 | cc_is_clang=1 |
| 6853 | ;; |
| 6854 | *) |
| 6855 | if $CC --version 2>&1 | grep -q clang |
| 6856 | then |
| 6857 | cc_is_clang=1 |
| 6858 | else |
| 6859 | cc_is_clang= |
| 6860 | fi |
| 6861 | esac |
| 6862 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6863 | # tweak OPT based on compiler and platform, only if the user didn't set |
| 6864 | # it on the command line |
| 6865 | |
Victor Stinner | 9ed34a8 | 2017-05-02 22:35:58 +0200 | [diff] [blame] | 6866 | |
Benjamin Peterson | 65b4ec5 | 2010-03-23 21:02:34 +0000 | [diff] [blame] | 6867 | if test "${OPT-unset}" = "unset" |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6868 | then |
| 6869 | case $GCC in |
| 6870 | yes) |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6871 | # For gcc 4.x we need to use -fwrapv so lets check if its supported |
| 6872 | if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then |
| 6873 | WRAP="-fwrapv" |
| 6874 | fi |
Stefan Krah | 962055d | 2011-09-14 15:14:08 +0200 | [diff] [blame] | 6875 | |
Victor Stinner | 35f3d24 | 2017-04-21 12:35:24 +0200 | [diff] [blame] | 6876 | if test -n "${cc_is_clang}" |
| 6877 | then |
| 6878 | # Clang also needs -fwrapv |
| 6879 | WRAP="-fwrapv" |
Victor Stinner | 9ed34a8 | 2017-05-02 22:35:58 +0200 | [diff] [blame] | 6880 | # bpo-30104: disable strict aliasing to compile correctly dtoa.c, |
| 6881 | # see Makefile.pre.in for more information |
Victor Stinner | 826f83f | 2017-04-28 15:07:10 +0200 | [diff] [blame] | 6882 | CFLAGS_ALIASING="-fno-strict-aliasing" |
Victor Stinner | 35f3d24 | 2017-04-21 12:35:24 +0200 | [diff] [blame] | 6883 | fi |
| 6884 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6885 | case $ac_cv_prog_cc_g in |
| 6886 | yes) |
| 6887 | if test "$Py_DEBUG" = 'true' ; then |
| 6888 | # Optimization messes up debuggers, so turn it off for |
| 6889 | # debug builds. |
Antoine Pitrou | 3d6c784 | 2015-02-11 19:39:16 +0100 | [diff] [blame] | 6890 | if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then |
Victor Stinner | 28205b2 | 2017-04-21 11:24:34 +0200 | [diff] [blame] | 6891 | OPT="-g -Og -Wall" |
Antoine Pitrou | 3d6c784 | 2015-02-11 19:39:16 +0100 | [diff] [blame] | 6892 | else |
Victor Stinner | 28205b2 | 2017-04-21 11:24:34 +0200 | [diff] [blame] | 6893 | OPT="-g -O0 -Wall" |
Antoine Pitrou | 3d6c784 | 2015-02-11 19:39:16 +0100 | [diff] [blame] | 6894 | fi |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6895 | else |
Victor Stinner | 28205b2 | 2017-04-21 11:24:34 +0200 | [diff] [blame] | 6896 | OPT="-g $WRAP -O3 -Wall" |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6897 | fi |
| 6898 | ;; |
| 6899 | *) |
Victor Stinner | 28205b2 | 2017-04-21 11:24:34 +0200 | [diff] [blame] | 6900 | OPT="-O3 -Wall" |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6901 | ;; |
| 6902 | esac |
Victor Stinner | 28205b2 | 2017-04-21 11:24:34 +0200 | [diff] [blame] | 6903 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6904 | case $ac_sys_system in |
| 6905 | SCO_SV*) OPT="$OPT -m486 -DSCO5" |
| 6906 | ;; |
| 6907 | esac |
| 6908 | ;; |
| 6909 | |
| 6910 | *) |
| 6911 | OPT="-O" |
| 6912 | ;; |
| 6913 | esac |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6914 | fi |
| 6915 | |
| 6916 | |
| 6917 | |
Benjamin Peterson | acb8c52 | 2014-08-09 20:01:49 -0700 | [diff] [blame] | 6918 | |
stratakis | cf10a75 | 2018-12-19 18:19:01 +0100 | [diff] [blame] | 6919 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6920 | # The -arch flags for universal builds on OSX |
| 6921 | UNIVERSAL_ARCH_FLAGS= |
| 6922 | |
| 6923 | |
| 6924 | # tweak BASECFLAGS based on compiler and platform |
| 6925 | case $GCC in |
| 6926 | yes) |
Benjamin Peterson | 050af5d | 2016-09-10 17:53:13 -0700 | [diff] [blame] | 6927 | CFLAGS_NODIST="$CFLAGS_NODIST -std=c99" |
Benjamin Peterson | d170256 | 2016-09-07 12:00:06 -0700 | [diff] [blame] | 6928 | |
Serhiy Storchaka | ea80ffb | 2016-09-11 21:56:32 +0300 | [diff] [blame] | 6929 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5 |
| 6930 | $as_echo_n "checking for -Wextra... " >&6; } |
| 6931 | ac_save_cc="$CC" |
| 6932 | CC="$CC -Wextra -Werror" |
| 6933 | if ${ac_cv_extra_warnings+:} false; then : |
| 6934 | $as_echo_n "(cached) " >&6 |
| 6935 | else |
| 6936 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 6937 | /* end confdefs.h. */ |
| 6938 | |
| 6939 | |
| 6940 | int |
| 6941 | main () |
| 6942 | { |
| 6943 | |
| 6944 | ; |
| 6945 | return 0; |
| 6946 | } |
| 6947 | |
| 6948 | _ACEOF |
| 6949 | if ac_fn_c_try_compile "$LINENO"; then : |
| 6950 | |
| 6951 | ac_cv_extra_warnings=yes |
| 6952 | |
| 6953 | else |
| 6954 | |
| 6955 | ac_cv_extra_warnings=no |
| 6956 | |
| 6957 | fi |
| 6958 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 6959 | fi |
| 6960 | |
| 6961 | CC="$ac_save_cc" |
| 6962 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5 |
| 6963 | $as_echo "$ac_cv_extra_warnings" >&6; } |
| 6964 | |
| 6965 | if test $ac_cv_extra_warnings = yes |
| 6966 | then |
| 6967 | CFLAGS_NODIST="$CFLAGS_NODIST -Wextra" |
| 6968 | fi |
| 6969 | |
Benjamin Peterson | e6c9d24 | 2010-03-30 17:34:47 +0000 | [diff] [blame] | 6970 | # Python doesn't violate C99 aliasing rules, but older versions of |
| 6971 | # GCC produce warnings for legal Python code. Enable |
| 6972 | # -fno-strict-aliasing on versions of GCC that support but produce |
| 6973 | # warnings. See Issue3326 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6974 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5 |
| 6975 | $as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6976 | ac_save_cc="$CC" |
| 6977 | CC="$CC -fno-strict-aliasing" |
Benjamin Peterson | e6c9d24 | 2010-03-30 17:34:47 +0000 | [diff] [blame] | 6978 | save_CFLAGS="$CFLAGS" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 6979 | if ${ac_cv_no_strict_aliasing+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6980 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 6981 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6982 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6983 | /* end confdefs.h. */ |
Gregory P. Smith | e0450c6 | 2009-11-01 21:11:36 +0000 | [diff] [blame] | 6984 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 6985 | |
Gregory P. Smith | e0450c6 | 2009-11-01 21:11:36 +0000 | [diff] [blame] | 6986 | int |
| 6987 | main () |
| 6988 | { |
Mark Dickinson | 8c2b6f1 | 2010-05-11 09:23:07 +0000 | [diff] [blame] | 6989 | |
Gregory P. Smith | e0450c6 | 2009-11-01 21:11:36 +0000 | [diff] [blame] | 6990 | ; |
| 6991 | return 0; |
| 6992 | } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 6993 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6994 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6995 | if ac_fn_c_try_compile "$LINENO"; then : |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 6996 | |
| 6997 | CC="$ac_save_cc -fstrict-aliasing" |
| 6998 | CFLAGS="$CFLAGS -Werror -Wstrict-aliasing" |
| 6999 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Benjamin Peterson | e6c9d24 | 2010-03-30 17:34:47 +0000 | [diff] [blame] | 7000 | /* end confdefs.h. */ |
| 7001 | |
Mark Dickinson | 8c2b6f1 | 2010-05-11 09:23:07 +0000 | [diff] [blame] | 7002 | void f(int **x) {} |
Benjamin Peterson | e6c9d24 | 2010-03-30 17:34:47 +0000 | [diff] [blame] | 7003 | int |
| 7004 | main () |
| 7005 | { |
Mark Dickinson | 8c2b6f1 | 2010-05-11 09:23:07 +0000 | [diff] [blame] | 7006 | double *x; f((int **) &x); |
Benjamin Peterson | e6c9d24 | 2010-03-30 17:34:47 +0000 | [diff] [blame] | 7007 | ; |
| 7008 | return 0; |
| 7009 | } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 7010 | |
Benjamin Peterson | e6c9d24 | 2010-03-30 17:34:47 +0000 | [diff] [blame] | 7011 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7012 | if ac_fn_c_try_compile "$LINENO"; then : |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 7013 | |
| 7014 | ac_cv_no_strict_aliasing=no |
| 7015 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7016 | else |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 7017 | |
| 7018 | ac_cv_no_strict_aliasing=yes |
| 7019 | |
Benjamin Peterson | e6c9d24 | 2010-03-30 17:34:47 +0000 | [diff] [blame] | 7020 | fi |
Benjamin Peterson | e6c9d24 | 2010-03-30 17:34:47 +0000 | [diff] [blame] | 7021 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 7022 | |
Benjamin Peterson | e6c9d24 | 2010-03-30 17:34:47 +0000 | [diff] [blame] | 7023 | else |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 7024 | |
| 7025 | ac_cv_no_strict_aliasing=no |
| 7026 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7027 | fi |
Gregory P. Smith | e0450c6 | 2009-11-01 21:11:36 +0000 | [diff] [blame] | 7028 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 7029 | fi |
| 7030 | |
Benjamin Peterson | e6c9d24 | 2010-03-30 17:34:47 +0000 | [diff] [blame] | 7031 | CFLAGS="$save_CFLAGS" |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7032 | CC="$ac_save_cc" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7033 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5 |
| 7034 | $as_echo "$ac_cv_no_strict_aliasing" >&6; } |
Benjamin Peterson | e6c9d24 | 2010-03-30 17:34:47 +0000 | [diff] [blame] | 7035 | if test $ac_cv_no_strict_aliasing = yes |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7036 | then |
| 7037 | BASECFLAGS="$BASECFLAGS -fno-strict-aliasing" |
| 7038 | fi |
| 7039 | |
Zachary Ware | 5af8564 | 2015-12-21 12:09:17 -0600 | [diff] [blame] | 7040 | # ICC doesn't recognize the option, but only emits a warning |
| 7041 | ## XXX does it emit an unused result warning and can it be disabled? |
| 7042 | case "$CC" in |
| 7043 | *icc*) |
| 7044 | ac_cv_disable_unused_result_warning=no |
| 7045 | ;; |
| 7046 | *) |
Benjamin Peterson | 7ddbf10 | 2011-09-23 13:23:22 -0400 | [diff] [blame] | 7047 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5 |
| 7048 | $as_echo_n "checking if we can turn off $CC unused result warning... " >&6; } |
| 7049 | ac_save_cc="$CC" |
| 7050 | CC="$CC -Wunused-result -Werror" |
| 7051 | save_CFLAGS="$CFLAGS" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 7052 | if ${ac_cv_disable_unused_result_warning+:} false; then : |
Benjamin Peterson | 7ddbf10 | 2011-09-23 13:23:22 -0400 | [diff] [blame] | 7053 | $as_echo_n "(cached) " >&6 |
| 7054 | else |
| 7055 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7056 | /* end confdefs.h. */ |
| 7057 | |
| 7058 | |
| 7059 | int |
| 7060 | main () |
| 7061 | { |
| 7062 | |
| 7063 | ; |
| 7064 | return 0; |
| 7065 | } |
| 7066 | |
| 7067 | _ACEOF |
| 7068 | if ac_fn_c_try_compile "$LINENO"; then : |
| 7069 | |
| 7070 | ac_cv_disable_unused_result_warning=yes |
| 7071 | |
| 7072 | else |
| 7073 | |
| 7074 | ac_cv_disable_unused_result_warning=no |
| 7075 | |
| 7076 | fi |
| 7077 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 7078 | fi |
| 7079 | |
| 7080 | CFLAGS="$save_CFLAGS" |
| 7081 | CC="$ac_save_cc" |
| 7082 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5 |
| 7083 | $as_echo "$ac_cv_disable_unused_result_warning" >&6; } |
Zachary Ware | 5af8564 | 2015-12-21 12:09:17 -0600 | [diff] [blame] | 7084 | ;; |
| 7085 | esac |
Benjamin Peterson | 7ddbf10 | 2011-09-23 13:23:22 -0400 | [diff] [blame] | 7086 | |
| 7087 | if test $ac_cv_disable_unused_result_warning = yes |
| 7088 | then |
| 7089 | BASECFLAGS="$BASECFLAGS -Wno-unused-result" |
Serhiy Storchaka | ea80ffb | 2016-09-11 21:56:32 +0300 | [diff] [blame] | 7090 | CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result" |
| 7091 | fi |
| 7092 | |
| 7093 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5 |
| 7094 | $as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; } |
| 7095 | ac_save_cc="$CC" |
| 7096 | CC="$CC -Wunused-parameter -Werror" |
| 7097 | if ${ac_cv_disable_unused_parameter_warning+:} false; then : |
| 7098 | $as_echo_n "(cached) " >&6 |
| 7099 | else |
| 7100 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7101 | /* end confdefs.h. */ |
| 7102 | |
| 7103 | |
| 7104 | int |
| 7105 | main () |
| 7106 | { |
| 7107 | |
| 7108 | ; |
| 7109 | return 0; |
| 7110 | } |
| 7111 | |
| 7112 | _ACEOF |
| 7113 | if ac_fn_c_try_compile "$LINENO"; then : |
| 7114 | |
| 7115 | ac_cv_disable_unused_parameter_warning=yes |
| 7116 | |
| 7117 | else |
| 7118 | |
| 7119 | ac_cv_disable_unused_parameter_warning=no |
| 7120 | |
| 7121 | fi |
| 7122 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 7123 | fi |
| 7124 | |
| 7125 | CC="$ac_save_cc" |
| 7126 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5 |
| 7127 | $as_echo "$ac_cv_disable_unused_parameter_warning" >&6; } |
| 7128 | |
| 7129 | if test $ac_cv_disable_unused_parameter_warning = yes |
| 7130 | then |
| 7131 | CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter" |
| 7132 | fi |
| 7133 | |
| 7134 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5 |
| 7135 | $as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; } |
| 7136 | ac_save_cc="$CC" |
| 7137 | CC="$CC -Wmissing-field-initializers -Werror" |
| 7138 | if ${ac_cv_disable_missing_field_initializers+:} false; then : |
| 7139 | $as_echo_n "(cached) " >&6 |
| 7140 | else |
| 7141 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7142 | /* end confdefs.h. */ |
| 7143 | |
| 7144 | |
| 7145 | int |
| 7146 | main () |
| 7147 | { |
| 7148 | |
| 7149 | ; |
| 7150 | return 0; |
| 7151 | } |
| 7152 | |
| 7153 | _ACEOF |
| 7154 | if ac_fn_c_try_compile "$LINENO"; then : |
| 7155 | |
| 7156 | ac_cv_disable_missing_field_initializers=yes |
| 7157 | |
| 7158 | else |
| 7159 | |
| 7160 | ac_cv_disable_missing_field_initializers=no |
| 7161 | |
| 7162 | fi |
| 7163 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 7164 | fi |
| 7165 | |
| 7166 | CC="$ac_save_cc" |
| 7167 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5 |
| 7168 | $as_echo "$ac_cv_disable_missing_field_initializers" >&6; } |
| 7169 | |
| 7170 | if test $ac_cv_disable_missing_field_initializers = yes |
| 7171 | then |
| 7172 | CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers" |
Benjamin Peterson | 7ddbf10 | 2011-09-23 13:23:22 -0400 | [diff] [blame] | 7173 | fi |
| 7174 | |
Charles-François Natali | 7f9cc93 | 2014-08-01 21:57:49 +0100 | [diff] [blame] | 7175 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5 |
| 7176 | $as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; } |
| 7177 | ac_save_cc="$CC" |
| 7178 | CC="$CC -Wsign-compare" |
| 7179 | save_CFLAGS="$CFLAGS" |
| 7180 | if ${ac_cv_enable_sign_compare_warning+:} false; then : |
| 7181 | $as_echo_n "(cached) " >&6 |
| 7182 | else |
| 7183 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7184 | /* end confdefs.h. */ |
| 7185 | |
| 7186 | |
| 7187 | int |
| 7188 | main () |
| 7189 | { |
| 7190 | |
| 7191 | ; |
| 7192 | return 0; |
| 7193 | } |
| 7194 | |
| 7195 | _ACEOF |
| 7196 | if ac_fn_c_try_compile "$LINENO"; then : |
| 7197 | |
| 7198 | ac_cv_enable_sign_compare_warning=yes |
| 7199 | |
| 7200 | else |
| 7201 | |
| 7202 | ac_cv_enable_sign_compare_warning=no |
| 7203 | |
| 7204 | fi |
| 7205 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 7206 | fi |
| 7207 | |
| 7208 | CFLAGS="$save_CFLAGS" |
| 7209 | CC="$ac_save_cc" |
| 7210 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5 |
| 7211 | $as_echo "$ac_cv_enable_sign_compare_warning" >&6; } |
| 7212 | |
| 7213 | if test $ac_cv_enable_sign_compare_warning = yes |
| 7214 | then |
| 7215 | BASECFLAGS="$BASECFLAGS -Wsign-compare" |
| 7216 | fi |
| 7217 | |
| 7218 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5 |
| 7219 | $as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; } |
| 7220 | ac_save_cc="$CC" |
| 7221 | CC="$CC -Wunreachable-code" |
| 7222 | save_CFLAGS="$CFLAGS" |
| 7223 | if ${ac_cv_enable_unreachable_code_warning+:} false; then : |
| 7224 | $as_echo_n "(cached) " >&6 |
| 7225 | else |
| 7226 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7227 | /* end confdefs.h. */ |
| 7228 | |
| 7229 | |
| 7230 | int |
| 7231 | main () |
| 7232 | { |
| 7233 | |
| 7234 | ; |
| 7235 | return 0; |
| 7236 | } |
| 7237 | |
| 7238 | _ACEOF |
| 7239 | if ac_fn_c_try_compile "$LINENO"; then : |
| 7240 | |
| 7241 | ac_cv_enable_unreachable_code_warning=yes |
| 7242 | |
| 7243 | else |
| 7244 | |
| 7245 | ac_cv_enable_unreachable_code_warning=no |
| 7246 | |
| 7247 | fi |
| 7248 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 7249 | fi |
| 7250 | |
| 7251 | CFLAGS="$save_CFLAGS" |
| 7252 | CC="$ac_save_cc" |
Charles-François Natali | 7f9cc93 | 2014-08-01 21:57:49 +0100 | [diff] [blame] | 7253 | |
| 7254 | # Don't enable unreachable code warning in debug mode, since it usually |
| 7255 | # results in non-standard code paths. |
Ned Deily | bec699e | 2016-03-08 00:28:37 -0500 | [diff] [blame] | 7256 | # Issue #24324: Unfortunately, the unreachable code warning does not work |
| 7257 | # correctly on gcc and has been silently removed from the compiler. |
| 7258 | # It is supported on clang but on OS X systems gcc may be an alias |
| 7259 | # for clang. Try to determine if the compiler is not really gcc and, |
| 7260 | # if so, only then enable the warning. |
| 7261 | if test $ac_cv_enable_unreachable_code_warning = yes && \ |
| 7262 | test "$Py_DEBUG" != "true" && \ |
| 7263 | test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`" |
Charles-François Natali | 7f9cc93 | 2014-08-01 21:57:49 +0100 | [diff] [blame] | 7264 | then |
| 7265 | BASECFLAGS="$BASECFLAGS -Wunreachable-code" |
Ned Deily | bec699e | 2016-03-08 00:28:37 -0500 | [diff] [blame] | 7266 | else |
| 7267 | ac_cv_enable_unreachable_code_warning=no |
Charles-François Natali | 7f9cc93 | 2014-08-01 21:57:49 +0100 | [diff] [blame] | 7268 | fi |
Ned Deily | bec699e | 2016-03-08 00:28:37 -0500 | [diff] [blame] | 7269 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5 |
| 7270 | $as_echo "$ac_cv_enable_unreachable_code_warning" >&6; } |
Charles-François Natali | 7f9cc93 | 2014-08-01 21:57:49 +0100 | [diff] [blame] | 7271 | |
INADA Naoki | e336484 | 2018-06-05 20:40:53 +0900 | [diff] [blame] | 7272 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC strict-prototypes warning" >&5 |
| 7273 | $as_echo_n "checking if we can turn on $CC strict-prototypes warning... " >&6; } |
| 7274 | ac_save_cc="$CC" |
| 7275 | CC="$CC -Werror -Wstrict-prototypes" |
| 7276 | if ${ac_cv_enable_enable_strict_prototypes_warning+:} false; then : |
| 7277 | $as_echo_n "(cached) " >&6 |
| 7278 | else |
| 7279 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7280 | /* end confdefs.h. */ |
| 7281 | |
| 7282 | |
| 7283 | int |
| 7284 | main () |
| 7285 | { |
| 7286 | |
| 7287 | ; |
| 7288 | return 0; |
| 7289 | } |
| 7290 | |
| 7291 | _ACEOF |
| 7292 | if ac_fn_c_try_compile "$LINENO"; then : |
| 7293 | |
| 7294 | ac_cv_enable_strict_prototypes_warning=yes |
| 7295 | |
| 7296 | else |
| 7297 | |
| 7298 | ac_cv_enable_strict_prototypes_warning=no |
| 7299 | |
| 7300 | fi |
| 7301 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 7302 | fi |
| 7303 | |
| 7304 | CC="$ac_save_cc" |
| 7305 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5 |
| 7306 | $as_echo "$ac_cv_enable_strict_prototypes_warning" >&6; } |
| 7307 | |
| 7308 | if test $ac_cv_enable_strict_prototypes_warning = yes |
| 7309 | then |
| 7310 | CFLAGS_NODIST="$CFLAGS_NODIST -Wstrict-prototypes" |
| 7311 | fi |
| 7312 | |
Victor Stinner | 193ee0a | 2017-02-06 14:24:00 +0100 | [diff] [blame] | 7313 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5 |
| 7314 | $as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; } |
| 7315 | ac_save_cc="$CC" |
| 7316 | CC="$CC -Werror=implicit-function-declaration" |
| 7317 | if ${ac_cv_enable_implicit_function_declaration_error+:} false; then : |
| 7318 | $as_echo_n "(cached) " >&6 |
| 7319 | else |
| 7320 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7321 | /* end confdefs.h. */ |
| 7322 | |
| 7323 | |
| 7324 | int |
| 7325 | main () |
| 7326 | { |
| 7327 | |
| 7328 | ; |
| 7329 | return 0; |
| 7330 | } |
| 7331 | |
| 7332 | _ACEOF |
| 7333 | if ac_fn_c_try_compile "$LINENO"; then : |
| 7334 | |
| 7335 | ac_cv_enable_implicit_function_declaration_error=yes |
| 7336 | |
| 7337 | else |
| 7338 | |
| 7339 | ac_cv_enable_implicit_function_declaration_error=no |
| 7340 | |
| 7341 | fi |
| 7342 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 7343 | fi |
| 7344 | |
| 7345 | CC="$ac_save_cc" |
| 7346 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5 |
| 7347 | $as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; } |
| 7348 | |
| 7349 | if test $ac_cv_enable_implicit_function_declaration_error = yes |
| 7350 | then |
| 7351 | CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration" |
| 7352 | fi |
| 7353 | |
Vinay Sajip | 0b60f64 | 2019-10-15 08:26:12 +0100 | [diff] [blame] | 7354 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can use visibility in $CC" >&5 |
| 7355 | $as_echo_n "checking if we can use visibility in $CC... " >&6; } |
| 7356 | ac_save_cc="$CC" |
| 7357 | CC="$CC -fvisibility=hidden" |
| 7358 | if ${ac_cv_enable_visibility+:} false; then : |
| 7359 | $as_echo_n "(cached) " >&6 |
| 7360 | else |
| 7361 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7362 | /* end confdefs.h. */ |
| 7363 | |
| 7364 | |
| 7365 | int |
| 7366 | main () |
| 7367 | { |
| 7368 | |
| 7369 | ; |
| 7370 | return 0; |
| 7371 | } |
| 7372 | |
| 7373 | _ACEOF |
| 7374 | if ac_fn_c_try_compile "$LINENO"; then : |
| 7375 | |
| 7376 | ac_cv_enable_visibility=yes |
| 7377 | |
| 7378 | else |
| 7379 | |
| 7380 | ac_cv_enable_visibility=no |
| 7381 | |
| 7382 | fi |
| 7383 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 7384 | fi |
| 7385 | |
| 7386 | CC="$ac_save_cc" |
| 7387 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5 |
| 7388 | $as_echo "$ac_cv_enable_visibility" >&6; } |
| 7389 | |
| 7390 | if test $ac_cv_enable_visibility = yes |
| 7391 | then |
| 7392 | CFLAGS_NODIST="$CFLAGS_NODIST -fvisibility=hidden" |
| 7393 | fi |
| 7394 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7395 | # if using gcc on alpha, use -mieee to get (near) full IEEE 754 |
| 7396 | # support. Without this, treatment of subnormals doesn't follow |
| 7397 | # the standard. |
Matthias Klose | df2aecb | 2012-03-15 22:19:28 +0100 | [diff] [blame] | 7398 | case $host in |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7399 | alpha*) |
| 7400 | BASECFLAGS="$BASECFLAGS -mieee" |
| 7401 | ;; |
| 7402 | esac |
| 7403 | |
| 7404 | case $ac_sys_system in |
| 7405 | SCO_SV*) |
| 7406 | BASECFLAGS="$BASECFLAGS -m486 -DSCO5" |
| 7407 | ;; |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7408 | |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7409 | Darwin*) |
| 7410 | # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd |
| 7411 | # used to be here, but non-Apple gcc doesn't accept them. |
| 7412 | if test "${CC}" = gcc |
| 7413 | then |
| 7414 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7415 | $as_echo_n "checking which compiler should be used... " >&6; } |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7416 | case "${UNIVERSALSDK}" in |
| 7417 | */MacOSX10.4u.sdk) |
| 7418 | # Build using 10.4 SDK, force usage of gcc when the |
| 7419 | # compiler is gcc, otherwise the user will get very |
| 7420 | # confusing error messages when building on OSX 10.6 |
| 7421 | CC=gcc-4.0 |
| 7422 | CPP=cpp-4.0 |
| 7423 | ;; |
| 7424 | esac |
| 7425 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7426 | $as_echo "$CC" >&6; } |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7427 | fi |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7428 | |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7429 | if test "${enable_universalsdk}" |
| 7430 | then |
| 7431 | case "$UNIVERSAL_ARCHS" in |
| 7432 | 32-bit) |
| 7433 | UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386" |
| 7434 | LIPO_32BIT_FLAGS="" |
| 7435 | ARCH_RUN_32BIT="" |
| 7436 | ;; |
| 7437 | 64-bit) |
| 7438 | UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64" |
| 7439 | LIPO_32BIT_FLAGS="" |
| 7440 | ARCH_RUN_32BIT="true" |
| 7441 | ;; |
| 7442 | all) |
| 7443 | UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" |
| 7444 | LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386" |
| 7445 | ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc" |
| 7446 | ;; |
| 7447 | intel) |
| 7448 | UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64" |
| 7449 | LIPO_32BIT_FLAGS="-extract i386" |
| 7450 | ARCH_RUN_32BIT="/usr/bin/arch -i386" |
| 7451 | ;; |
| 7452 | intel-32) |
| 7453 | UNIVERSAL_ARCH_FLAGS="-arch i386" |
| 7454 | LIPO_32BIT_FLAGS="" |
| 7455 | ARCH_RUN_32BIT="" |
| 7456 | ;; |
Ned Deily | 8c9bb72 | 2018-01-30 07:42:14 -0500 | [diff] [blame] | 7457 | intel-64) |
| 7458 | UNIVERSAL_ARCH_FLAGS="-arch x86_64" |
| 7459 | LIPO_32BIT_FLAGS="" |
| 7460 | ARCH_RUN_32BIT="true" |
| 7461 | ;; |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7462 | 3-way) |
| 7463 | UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64" |
| 7464 | LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386" |
| 7465 | ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc" |
| 7466 | ;; |
| 7467 | *) |
| 7468 | as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5 |
| 7469 | ;; |
| 7470 | esac |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7471 | |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7472 | if test "${UNIVERSALSDK}" != "/" |
| 7473 | then |
Ned Deily | 8c9bb72 | 2018-01-30 07:42:14 -0500 | [diff] [blame] | 7474 | CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}" |
| 7475 | LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}" |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7476 | CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}" |
Ned Deily | 8c9bb72 | 2018-01-30 07:42:14 -0500 | [diff] [blame] | 7477 | else |
| 7478 | CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}" |
| 7479 | LDFLAGS="${UNIVERSAL_ARCH_FLAGS} ${LDFLAGS}" |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7480 | fi |
| 7481 | fi |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7482 | |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7483 | # Calculate an appropriate deployment target for this build: |
| 7484 | # The deployment target value is used explicitly to enable certain |
| 7485 | # features are enabled (such as builtin libedit support for readline) |
Raymond Hettinger | 15f44ab | 2016-08-30 10:47:49 -0700 | [diff] [blame] | 7486 | # through the use of Apple's Availability Macros and is used as a |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7487 | # component of the string returned by distutils.get_platform(). |
| 7488 | # |
| 7489 | # Use the value from: |
| 7490 | # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified |
| 7491 | # 2. the operating system version of the build machine if >= 10.6 |
| 7492 | # 3. If running on OS X 10.3 through 10.5, use the legacy tests |
| 7493 | # below to pick either 10.3, 10.4, or 10.5 as the target. |
| 7494 | # 4. If we are running on OS X 10.2 or earlier, good luck! |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7495 | |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7496 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5 |
| 7497 | $as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; } |
Ned Deily | 36820b6 | 2014-06-25 13:44:22 -0700 | [diff] [blame] | 7498 | cur_target_major=`sw_vers -productVersion | \ |
| 7499 | sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'` |
| 7500 | cur_target_minor=`sw_vers -productVersion | \ |
| 7501 | sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'` |
| 7502 | cur_target="${cur_target_major}.${cur_target_minor}" |
| 7503 | if test ${cur_target_major} -eq 10 && \ |
| 7504 | test ${cur_target_minor} -ge 3 && \ |
| 7505 | test ${cur_target_minor} -le 5 |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7506 | then |
Ned Deily | 36820b6 | 2014-06-25 13:44:22 -0700 | [diff] [blame] | 7507 | # OS X 10.3 through 10.5 |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7508 | cur_target=10.3 |
| 7509 | if test ${enable_universalsdk} |
| 7510 | then |
| 7511 | case "$UNIVERSAL_ARCHS" in |
| 7512 | all|3-way|intel|64-bit) |
| 7513 | # These configurations were first supported in 10.5 |
| 7514 | cur_target='10.5' |
| 7515 | ;; |
| 7516 | esac |
| 7517 | else |
| 7518 | if test `/usr/bin/arch` = "i386" |
| 7519 | then |
| 7520 | # 10.4 was the first release to support Intel archs |
| 7521 | cur_target="10.4" |
| 7522 | fi |
| 7523 | fi |
| 7524 | fi |
| 7525 | CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}} |
Ronald Oussoren | 3c064c1 | 2009-09-08 07:12:42 +0000 | [diff] [blame] | 7526 | |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7527 | # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the |
| 7528 | # environment with a value that is the same as what we'll use |
| 7529 | # in the Makefile to ensure that we'll get the same compiler |
| 7530 | # environment during configure and build time. |
| 7531 | MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET" |
| 7532 | export MACOSX_DEPLOYMENT_TARGET |
| 7533 | EXPORT_MACOSX_DEPLOYMENT_TARGET='' |
| 7534 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5 |
| 7535 | $as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; } |
Ronald Oussoren | 3c064c1 | 2009-09-08 07:12:42 +0000 | [diff] [blame] | 7536 | |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7537 | # end of Darwin* tests |
| 7538 | ;; |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7539 | esac |
| 7540 | ;; |
| 7541 | |
| 7542 | *) |
| 7543 | case $ac_sys_system in |
| 7544 | OpenUNIX*|UnixWare*) |
| 7545 | BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca " |
| 7546 | ;; |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7547 | SCO_SV*) |
| 7548 | BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5" |
| 7549 | ;; |
| 7550 | esac |
| 7551 | ;; |
| 7552 | esac |
| 7553 | |
Zachary Ware | 5af8564 | 2015-12-21 12:09:17 -0600 | [diff] [blame] | 7554 | # ICC needs -fp-model strict or floats behave badly |
| 7555 | case "$CC" in |
| 7556 | *icc*) |
| 7557 | CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict" |
| 7558 | ;; |
| 7559 | esac |
| 7560 | |
T. Wouters | ddbfa2c | 2017-05-23 01:30:49 +0200 | [diff] [blame] | 7561 | if test "$assertions" = 'true'; then |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7562 | : |
| 7563 | else |
| 7564 | OPT="-DNDEBUG $OPT" |
| 7565 | fi |
| 7566 | |
| 7567 | if test "$ac_arch_flags" |
| 7568 | then |
| 7569 | BASECFLAGS="$BASECFLAGS $ac_arch_flags" |
| 7570 | fi |
| 7571 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7572 | # On some compilers, pthreads are available without further options |
| 7573 | # (e.g. MacOS X). On some of these systems, the compiler will not |
| 7574 | # complain if unaccepted options are passed (e.g. gcc on Mac OS X). |
| 7575 | # So we have to see first whether pthreads are available without |
| 7576 | # options before we can check whether -Kpthread improves anything. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7577 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5 |
| 7578 | $as_echo_n "checking whether pthreads are available without options... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 7579 | if ${ac_cv_pthread_is_default+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7580 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7581 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7582 | if test "$cross_compiling" = yes; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7583 | ac_cv_pthread_is_default=no |
| 7584 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7585 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7586 | /* end confdefs.h. */ |
| 7587 | |
Stefan Krah | 7dba594 | 2012-11-22 22:49:11 +0100 | [diff] [blame] | 7588 | #include <stdio.h> |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7589 | #include <pthread.h> |
| 7590 | |
| 7591 | void* routine(void* p){return NULL;} |
| 7592 | |
| 7593 | int main(){ |
| 7594 | pthread_t p; |
| 7595 | if(pthread_create(&p,NULL,routine,NULL)!=0) |
| 7596 | return 1; |
| 7597 | (void)pthread_detach(p); |
| 7598 | return 0; |
| 7599 | } |
| 7600 | |
| 7601 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7602 | if ac_fn_c_try_run "$LINENO"; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7603 | |
| 7604 | ac_cv_pthread_is_default=yes |
| 7605 | ac_cv_kthread=no |
| 7606 | ac_cv_pthread=no |
| 7607 | |
| 7608 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7609 | ac_cv_pthread_is_default=no |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7610 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7611 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 7612 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7613 | fi |
| 7614 | |
| 7615 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7616 | fi |
| 7617 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7618 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5 |
| 7619 | $as_echo "$ac_cv_pthread_is_default" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7620 | |
| 7621 | |
| 7622 | if test $ac_cv_pthread_is_default = yes |
| 7623 | then |
| 7624 | ac_cv_kpthread=no |
| 7625 | else |
| 7626 | # -Kpthread, if available, provides the right #defines |
| 7627 | # and linker options to make pthread_create available |
| 7628 | # Some compilers won't report that they do not support -Kpthread, |
| 7629 | # so we need to run a program to see whether it really made the |
| 7630 | # function available. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7631 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5 |
| 7632 | $as_echo_n "checking whether $CC accepts -Kpthread... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 7633 | if ${ac_cv_kpthread+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7634 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7635 | else |
| 7636 | ac_save_cc="$CC" |
| 7637 | CC="$CC -Kpthread" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7638 | if test "$cross_compiling" = yes; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7639 | ac_cv_kpthread=no |
| 7640 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7641 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7642 | /* end confdefs.h. */ |
| 7643 | |
Stefan Krah | 7dba594 | 2012-11-22 22:49:11 +0100 | [diff] [blame] | 7644 | #include <stdio.h> |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7645 | #include <pthread.h> |
| 7646 | |
| 7647 | void* routine(void* p){return NULL;} |
| 7648 | |
| 7649 | int main(){ |
| 7650 | pthread_t p; |
| 7651 | if(pthread_create(&p,NULL,routine,NULL)!=0) |
| 7652 | return 1; |
| 7653 | (void)pthread_detach(p); |
| 7654 | return 0; |
| 7655 | } |
| 7656 | |
| 7657 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7658 | if ac_fn_c_try_run "$LINENO"; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7659 | ac_cv_kpthread=yes |
| 7660 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7661 | ac_cv_kpthread=no |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7662 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7663 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 7664 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7665 | fi |
| 7666 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7667 | CC="$ac_save_cc" |
| 7668 | fi |
| 7669 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7670 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5 |
| 7671 | $as_echo "$ac_cv_kpthread" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7672 | fi |
| 7673 | |
| 7674 | if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no |
| 7675 | then |
| 7676 | # -Kthread, if available, provides the right #defines |
| 7677 | # and linker options to make pthread_create available |
| 7678 | # Some compilers won't report that they do not support -Kthread, |
| 7679 | # so we need to run a program to see whether it really made the |
| 7680 | # function available. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7681 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5 |
| 7682 | $as_echo_n "checking whether $CC accepts -Kthread... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 7683 | if ${ac_cv_kthread+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7684 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7685 | else |
| 7686 | ac_save_cc="$CC" |
| 7687 | CC="$CC -Kthread" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7688 | if test "$cross_compiling" = yes; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7689 | ac_cv_kthread=no |
| 7690 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7691 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7692 | /* end confdefs.h. */ |
| 7693 | |
Stefan Krah | 7dba594 | 2012-11-22 22:49:11 +0100 | [diff] [blame] | 7694 | #include <stdio.h> |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7695 | #include <pthread.h> |
| 7696 | |
| 7697 | void* routine(void* p){return NULL;} |
| 7698 | |
| 7699 | int main(){ |
| 7700 | pthread_t p; |
| 7701 | if(pthread_create(&p,NULL,routine,NULL)!=0) |
| 7702 | return 1; |
| 7703 | (void)pthread_detach(p); |
| 7704 | return 0; |
| 7705 | } |
| 7706 | |
| 7707 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7708 | if ac_fn_c_try_run "$LINENO"; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7709 | ac_cv_kthread=yes |
| 7710 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7711 | ac_cv_kthread=no |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7712 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7713 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 7714 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7715 | fi |
| 7716 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7717 | CC="$ac_save_cc" |
| 7718 | fi |
| 7719 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7720 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5 |
| 7721 | $as_echo "$ac_cv_kthread" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7722 | fi |
| 7723 | |
| 7724 | if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no |
| 7725 | then |
| 7726 | # -pthread, if available, provides the right #defines |
| 7727 | # and linker options to make pthread_create available |
| 7728 | # Some compilers won't report that they do not support -pthread, |
| 7729 | # so we need to run a program to see whether it really made the |
| 7730 | # function available. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7731 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5 |
| 7732 | $as_echo_n "checking whether $CC accepts -pthread... " >&6; } |
doko@python.org | 7981f20 | 2013-01-25 15:33:25 +0100 | [diff] [blame] | 7733 | if ${ac_cv_pthread+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7734 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7735 | else |
| 7736 | ac_save_cc="$CC" |
| 7737 | CC="$CC -pthread" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7738 | if test "$cross_compiling" = yes; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7739 | ac_cv_pthread=no |
| 7740 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7741 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7742 | /* end confdefs.h. */ |
| 7743 | |
Stefan Krah | 7dba594 | 2012-11-22 22:49:11 +0100 | [diff] [blame] | 7744 | #include <stdio.h> |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7745 | #include <pthread.h> |
| 7746 | |
| 7747 | void* routine(void* p){return NULL;} |
| 7748 | |
| 7749 | int main(){ |
| 7750 | pthread_t p; |
| 7751 | if(pthread_create(&p,NULL,routine,NULL)!=0) |
| 7752 | return 1; |
| 7753 | (void)pthread_detach(p); |
| 7754 | return 0; |
| 7755 | } |
| 7756 | |
| 7757 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7758 | if ac_fn_c_try_run "$LINENO"; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7759 | ac_cv_pthread=yes |
| 7760 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7761 | ac_cv_pthread=no |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7762 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7763 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 7764 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7765 | fi |
| 7766 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7767 | CC="$ac_save_cc" |
| 7768 | fi |
| 7769 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7770 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5 |
| 7771 | $as_echo "$ac_cv_pthread" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7772 | fi |
| 7773 | |
| 7774 | # If we have set a CC compiler flag for thread support then |
| 7775 | # check if it works for CXX, too. |
| 7776 | ac_cv_cxx_thread=no |
| 7777 | if test ! -z "$CXX" |
| 7778 | then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7779 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5 |
| 7780 | $as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7781 | ac_save_cxx="$CXX" |
| 7782 | |
| 7783 | if test "$ac_cv_kpthread" = "yes" |
| 7784 | then |
| 7785 | CXX="$CXX -Kpthread" |
| 7786 | ac_cv_cxx_thread=yes |
| 7787 | elif test "$ac_cv_kthread" = "yes" |
| 7788 | then |
| 7789 | CXX="$CXX -Kthread" |
| 7790 | ac_cv_cxx_thread=yes |
| 7791 | elif test "$ac_cv_pthread" = "yes" |
| 7792 | then |
| 7793 | CXX="$CXX -pthread" |
| 7794 | ac_cv_cxx_thread=yes |
| 7795 | fi |
| 7796 | |
| 7797 | if test $ac_cv_cxx_thread = yes |
| 7798 | then |
| 7799 | echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext |
| 7800 | $CXX -c conftest.$ac_ext 2>&5 |
| 7801 | if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \ |
| 7802 | && test -s conftest$ac_exeext && ./conftest$ac_exeext |
| 7803 | then |
| 7804 | ac_cv_cxx_thread=yes |
| 7805 | else |
| 7806 | ac_cv_cxx_thread=no |
| 7807 | fi |
| 7808 | rm -fr conftest* |
| 7809 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7810 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5 |
| 7811 | $as_echo "$ac_cv_cxx_thread" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7812 | fi |
| 7813 | CXX="$ac_save_cxx" |
| 7814 | |
| 7815 | |
| 7816 | # checks for header files |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7817 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
| 7818 | $as_echo_n "checking for ANSI C header files... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 7819 | if ${ac_cv_header_stdc+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7820 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7821 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7822 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7823 | /* end confdefs.h. */ |
| 7824 | #include <stdlib.h> |
| 7825 | #include <stdarg.h> |
| 7826 | #include <string.h> |
| 7827 | #include <float.h> |
| 7828 | |
| 7829 | int |
| 7830 | main () |
| 7831 | { |
| 7832 | |
| 7833 | ; |
| 7834 | return 0; |
| 7835 | } |
| 7836 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7837 | if ac_fn_c_try_compile "$LINENO"; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7838 | ac_cv_header_stdc=yes |
| 7839 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7840 | ac_cv_header_stdc=no |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7841 | fi |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7842 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 7843 | |
| 7844 | if test $ac_cv_header_stdc = yes; then |
| 7845 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7846 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7847 | /* end confdefs.h. */ |
| 7848 | #include <string.h> |
| 7849 | |
| 7850 | _ACEOF |
| 7851 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7852 | $EGREP "memchr" >/dev/null 2>&1; then : |
| 7853 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7854 | else |
| 7855 | ac_cv_header_stdc=no |
| 7856 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 7857 | rm -f conftest* |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7858 | |
| 7859 | fi |
| 7860 | |
| 7861 | if test $ac_cv_header_stdc = yes; then |
| 7862 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7863 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7864 | /* end confdefs.h. */ |
| 7865 | #include <stdlib.h> |
| 7866 | |
| 7867 | _ACEOF |
| 7868 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7869 | $EGREP "free" >/dev/null 2>&1; then : |
| 7870 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7871 | else |
| 7872 | ac_cv_header_stdc=no |
| 7873 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 7874 | rm -f conftest* |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7875 | |
| 7876 | fi |
| 7877 | |
| 7878 | if test $ac_cv_header_stdc = yes; then |
| 7879 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7880 | if test "$cross_compiling" = yes; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7881 | : |
| 7882 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7883 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7884 | /* end confdefs.h. */ |
| 7885 | #include <ctype.h> |
| 7886 | #include <stdlib.h> |
| 7887 | #if ((' ' & 0x0FF) == 0x020) |
| 7888 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 7889 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
| 7890 | #else |
| 7891 | # define ISLOWER(c) \ |
| 7892 | (('a' <= (c) && (c) <= 'i') \ |
| 7893 | || ('j' <= (c) && (c) <= 'r') \ |
| 7894 | || ('s' <= (c) && (c) <= 'z')) |
| 7895 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
| 7896 | #endif |
| 7897 | |
| 7898 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
| 7899 | int |
| 7900 | main () |
| 7901 | { |
| 7902 | int i; |
| 7903 | for (i = 0; i < 256; i++) |
| 7904 | if (XOR (islower (i), ISLOWER (i)) |
| 7905 | || toupper (i) != TOUPPER (i)) |
| 7906 | return 2; |
| 7907 | return 0; |
| 7908 | } |
| 7909 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7910 | if ac_fn_c_try_run "$LINENO"; then : |
| 7911 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7912 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7913 | ac_cv_header_stdc=no |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7914 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7915 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 7916 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7917 | fi |
| 7918 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7919 | fi |
| 7920 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7921 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
| 7922 | $as_echo "$ac_cv_header_stdc" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7923 | if test $ac_cv_header_stdc = yes; then |
| 7924 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7925 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7926 | |
| 7927 | fi |
| 7928 | |
stratakis | e768c86 | 2018-01-23 16:11:24 +0100 | [diff] [blame] | 7929 | for ac_header in asm/types.h crypt.h conio.h direct.h dlfcn.h errno.h \ |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 7930 | fcntl.h grp.h \ |
doko@ubuntu.com | 1a4f561 | 2014-04-17 20:13:44 +0200 | [diff] [blame] | 7931 | ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \ |
Benjamin Peterson | 4fe5510 | 2016-09-06 11:58:01 -0700 | [diff] [blame] | 7932 | sched.h shadow.h signal.h stropts.h termios.h \ |
Benjamin Peterson | ea13740 | 2018-09-13 21:57:31 -0700 | [diff] [blame] | 7933 | utime.h \ |
Jesus Cea | d8b9ae6 | 2011-11-14 19:07:41 +0100 | [diff] [blame] | 7934 | poll.h sys/devpoll.h sys/epoll.h sys/poll.h \ |
Antoine Pitrou | bcf2b59 | 2012-02-08 23:28:36 +0100 | [diff] [blame] | 7935 | sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \ |
Martin v. Löwis | 9d6c669 | 2012-02-03 17:44:58 +0100 | [diff] [blame] | 7936 | sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \ |
Benjamin Peterson | fb2ae15 | 2016-12-19 23:54:25 -0800 | [diff] [blame] | 7937 | sys/param.h sys/random.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \ |
Martin v. Löwis | 9d6c669 | 2012-02-03 17:44:58 +0100 | [diff] [blame] | 7938 | sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \ |
Georg Brandl | 941f956 | 2011-02-25 15:21:47 +0000 | [diff] [blame] | 7939 | sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \ |
Gregory P. Smith | 3b1f2c3 | 2011-05-15 12:18:23 -0700 | [diff] [blame] | 7940 | libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ |
Benjamin Peterson | 93b2dee | 2016-09-09 10:22:45 -0700 | [diff] [blame] | 7941 | linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \ |
Benjamin Peterson | 5c0c325 | 2019-11-05 21:58:31 -0800 | [diff] [blame] | 7942 | sys/endian.h sys/sysmacros.h linux/memfd.h linux/wait.h sys/memfd.h sys/mman.h |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7943 | do : |
| 7944 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| 7945 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 7946 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7947 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7948 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7949 | _ACEOF |
| 7950 | |
| 7951 | fi |
| 7952 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7953 | done |
| 7954 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7955 | ac_header_dirent=no |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7956 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7957 | as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` |
| 7958 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 |
| 7959 | $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 7960 | if eval \${$as_ac_Header+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7961 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7962 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7963 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 7964 | /* end confdefs.h. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7965 | #include <sys/types.h> |
| 7966 | #include <$ac_hdr> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7967 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7968 | int |
| 7969 | main () |
| 7970 | { |
| 7971 | if ((DIR *) 0) |
| 7972 | return 0; |
| 7973 | ; |
| 7974 | return 0; |
| 7975 | } |
| 7976 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7977 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7978 | eval "$as_ac_Header=yes" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7979 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7980 | eval "$as_ac_Header=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7981 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 7982 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7983 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7984 | eval ac_res=\$$as_ac_Header |
| 7985 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 7986 | $as_echo "$ac_res" >&6; } |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 7987 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7988 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7989 | #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7990 | _ACEOF |
| 7991 | |
| 7992 | ac_header_dirent=$ac_hdr; break |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7993 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7994 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7995 | done |
| 7996 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. |
| 7997 | if test $ac_header_dirent = dirent.h; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7998 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 |
| 7999 | $as_echo_n "checking for library containing opendir... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8000 | if ${ac_cv_search_opendir+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8001 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8002 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8003 | ac_func_search_save_LIBS=$LIBS |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8004 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8005 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8006 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8007 | /* Override any GCC internal prototype to avoid an error. |
| 8008 | Use char because int might match the return type of a GCC |
| 8009 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8010 | #ifdef __cplusplus |
| 8011 | extern "C" |
| 8012 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8013 | char opendir (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8014 | int |
| 8015 | main () |
| 8016 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8017 | return opendir (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8018 | ; |
| 8019 | return 0; |
| 8020 | } |
| 8021 | _ACEOF |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8022 | for ac_lib in '' dir; do |
| 8023 | if test -z "$ac_lib"; then |
| 8024 | ac_res="none required" |
| 8025 | else |
| 8026 | ac_res=-l$ac_lib |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 8027 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8028 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8029 | if ac_fn_c_try_link "$LINENO"; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8030 | ac_cv_search_opendir=$ac_res |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 8031 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8032 | rm -f core conftest.err conftest.$ac_objext \ |
| 8033 | conftest$ac_exeext |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8034 | if ${ac_cv_search_opendir+:} false; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8035 | break |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 8036 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8037 | done |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8038 | if ${ac_cv_search_opendir+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8039 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8040 | else |
| 8041 | ac_cv_search_opendir=no |
| 8042 | fi |
| 8043 | rm conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8044 | LIBS=$ac_func_search_save_LIBS |
| 8045 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8046 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 |
| 8047 | $as_echo "$ac_cv_search_opendir" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8048 | ac_res=$ac_cv_search_opendir |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8049 | if test "$ac_res" != no; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8050 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8051 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8052 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8053 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8054 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8055 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 |
| 8056 | $as_echo_n "checking for library containing opendir... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8057 | if ${ac_cv_search_opendir+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8058 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8059 | else |
| 8060 | ac_func_search_save_LIBS=$LIBS |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8061 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8062 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8063 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8064 | /* Override any GCC internal prototype to avoid an error. |
| 8065 | Use char because int might match the return type of a GCC |
| 8066 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8067 | #ifdef __cplusplus |
| 8068 | extern "C" |
| 8069 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8070 | char opendir (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8071 | int |
| 8072 | main () |
| 8073 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8074 | return opendir (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8075 | ; |
| 8076 | return 0; |
| 8077 | } |
| 8078 | _ACEOF |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8079 | for ac_lib in '' x; do |
| 8080 | if test -z "$ac_lib"; then |
| 8081 | ac_res="none required" |
| 8082 | else |
| 8083 | ac_res=-l$ac_lib |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 8084 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8085 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8086 | if ac_fn_c_try_link "$LINENO"; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8087 | ac_cv_search_opendir=$ac_res |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 8088 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8089 | rm -f core conftest.err conftest.$ac_objext \ |
| 8090 | conftest$ac_exeext |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8091 | if ${ac_cv_search_opendir+:} false; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8092 | break |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 8093 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8094 | done |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8095 | if ${ac_cv_search_opendir+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8096 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8097 | else |
| 8098 | ac_cv_search_opendir=no |
| 8099 | fi |
| 8100 | rm conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8101 | LIBS=$ac_func_search_save_LIBS |
| 8102 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8103 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 |
| 8104 | $as_echo "$ac_cv_search_opendir" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8105 | ac_res=$ac_cv_search_opendir |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8106 | if test "$ac_res" != no; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8107 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8108 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8109 | fi |
| 8110 | |
| 8111 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8112 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8113 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5 |
| 8114 | $as_echo_n "checking whether sys/types.h defines makedev... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8115 | if ${ac_cv_header_sys_types_h_makedev+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8116 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 8117 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8118 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8119 | /* end confdefs.h. */ |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 8120 | #include <sys/types.h> |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 8121 | int |
| 8122 | main () |
| 8123 | { |
| 8124 | return makedev(0, 0); |
| 8125 | ; |
| 8126 | return 0; |
| 8127 | } |
| 8128 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8129 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 8130 | ac_cv_header_sys_types_h_makedev=yes |
| 8131 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8132 | ac_cv_header_sys_types_h_makedev=no |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 8133 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8134 | rm -f core conftest.err conftest.$ac_objext \ |
| 8135 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 8136 | |
| 8137 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8138 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5 |
| 8139 | $as_echo "$ac_cv_header_sys_types_h_makedev" >&6; } |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 8140 | |
| 8141 | if test $ac_cv_header_sys_types_h_makedev = no; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8142 | ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8143 | if test "x$ac_cv_header_sys_mkdev_h" = xyes; then : |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8144 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8145 | $as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 8146 | |
| 8147 | fi |
| 8148 | |
| 8149 | |
| 8150 | |
| 8151 | if test $ac_cv_header_sys_mkdev_h = no; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8152 | ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8153 | if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then : |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8154 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8155 | $as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 8156 | |
| 8157 | fi |
| 8158 | |
| 8159 | |
| 8160 | fi |
| 8161 | fi |
| 8162 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8163 | |
Benjamin Peterson | 93b2dee | 2016-09-09 10:22:45 -0700 | [diff] [blame] | 8164 | # bluetooth/bluetooth.h has been known to not compile with -std=c99. |
| 8165 | # http://permalink.gmane.org/gmane.linux.bluez.kernel/22294 |
| 8166 | SAVE_CFLAGS=$CFLAGS |
| 8167 | CFLAGS="-std=c99 $CFLAGS" |
| 8168 | for ac_header in bluetooth/bluetooth.h |
| 8169 | do : |
| 8170 | ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default" |
| 8171 | if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then : |
| 8172 | cat >>confdefs.h <<_ACEOF |
| 8173 | #define HAVE_BLUETOOTH_BLUETOOTH_H 1 |
| 8174 | _ACEOF |
| 8175 | |
| 8176 | fi |
| 8177 | |
| 8178 | done |
| 8179 | |
| 8180 | CFLAGS=$SAVE_CFLAGS |
| 8181 | |
Gregory P. Smith | 3b1f2c3 | 2011-05-15 12:18:23 -0700 | [diff] [blame] | 8182 | # On Darwin (OS X) net/if.h requires sys/socket.h to be imported first. |
| 8183 | for ac_header in net/if.h |
| 8184 | do : |
| 8185 | ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h> |
| 8186 | #ifdef STDC_HEADERS |
| 8187 | # include <stdlib.h> |
| 8188 | # include <stddef.h> |
| 8189 | #else |
| 8190 | # ifdef HAVE_STDLIB_H |
| 8191 | # include <stdlib.h> |
| 8192 | # endif |
| 8193 | #endif |
| 8194 | #ifdef HAVE_SYS_SOCKET_H |
| 8195 | # include <sys/socket.h> |
| 8196 | #endif |
| 8197 | |
| 8198 | " |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8199 | if test "x$ac_cv_header_net_if_h" = xyes; then : |
Gregory P. Smith | 3b1f2c3 | 2011-05-15 12:18:23 -0700 | [diff] [blame] | 8200 | cat >>confdefs.h <<_ACEOF |
| 8201 | #define HAVE_NET_IF_H 1 |
| 8202 | _ACEOF |
| 8203 | |
| 8204 | fi |
| 8205 | |
| 8206 | done |
| 8207 | |
| 8208 | |
Martin v. Löwis | 11017b1 | 2006-01-14 18:12:57 +0000 | [diff] [blame] | 8209 | # On Linux, netlink.h requires asm/types.h |
Martin v. Löwis | 11017b1 | 2006-01-14 18:12:57 +0000 | [diff] [blame] | 8210 | for ac_header in linux/netlink.h |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8211 | do : |
| 8212 | ac_fn_c_check_header_compile "$LINENO" "linux/netlink.h" "ac_cv_header_linux_netlink_h" " |
Martin v. Löwis | 11017b1 | 2006-01-14 18:12:57 +0000 | [diff] [blame] | 8213 | #ifdef HAVE_ASM_TYPES_H |
| 8214 | #include <asm/types.h> |
| 8215 | #endif |
| 8216 | #ifdef HAVE_SYS_SOCKET_H |
| 8217 | #include <sys/socket.h> |
| 8218 | #endif |
| 8219 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8220 | " |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8221 | if test "x$ac_cv_header_linux_netlink_h" = xyes; then : |
Martin v. Löwis | 11017b1 | 2006-01-14 18:12:57 +0000 | [diff] [blame] | 8222 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8223 | #define HAVE_LINUX_NETLINK_H 1 |
Martin v. Löwis | 11017b1 | 2006-01-14 18:12:57 +0000 | [diff] [blame] | 8224 | _ACEOF |
| 8225 | |
| 8226 | fi |
| 8227 | |
| 8228 | done |
| 8229 | |
| 8230 | |
Bjorn Andersson | bb81651 | 2018-09-26 06:47:52 -0700 | [diff] [blame] | 8231 | # On Linux, qrtr.h requires asm/types.h |
| 8232 | for ac_header in linux/qrtr.h |
| 8233 | do : |
| 8234 | ac_fn_c_check_header_compile "$LINENO" "linux/qrtr.h" "ac_cv_header_linux_qrtr_h" " |
| 8235 | #ifdef HAVE_ASM_TYPES_H |
| 8236 | #include <asm/types.h> |
| 8237 | #endif |
| 8238 | #ifdef HAVE_SYS_SOCKET_H |
| 8239 | #include <sys/socket.h> |
| 8240 | #endif |
| 8241 | |
| 8242 | " |
| 8243 | if test "x$ac_cv_header_linux_qrtr_h" = xyes; then : |
| 8244 | cat >>confdefs.h <<_ACEOF |
| 8245 | #define HAVE_LINUX_QRTR_H 1 |
| 8246 | _ACEOF |
| 8247 | |
| 8248 | fi |
| 8249 | |
| 8250 | done |
| 8251 | |
| 8252 | |
caavery | effc12f | 2017-09-06 18:18:10 -0400 | [diff] [blame] | 8253 | for ac_header in linux/vm_sockets.h |
| 8254 | do : |
| 8255 | ac_fn_c_check_header_compile "$LINENO" "linux/vm_sockets.h" "ac_cv_header_linux_vm_sockets_h" " |
| 8256 | #ifdef HAVE_SYS_SOCKET_H |
| 8257 | #include <sys/socket.h> |
| 8258 | #endif |
| 8259 | |
| 8260 | " |
| 8261 | if test "x$ac_cv_header_linux_vm_sockets_h" = xyes; then : |
| 8262 | cat >>confdefs.h <<_ACEOF |
| 8263 | #define HAVE_LINUX_VM_SOCKETS_H 1 |
| 8264 | _ACEOF |
| 8265 | |
| 8266 | fi |
| 8267 | |
| 8268 | done |
| 8269 | |
| 8270 | |
Charles-François Natali | 47413c1 | 2011-10-06 19:47:44 +0200 | [diff] [blame] | 8271 | # On Linux, can.h and can/raw.h require sys/socket.h |
Charles-François Natali | 773e42d | 2013-02-05 19:42:01 +0100 | [diff] [blame] | 8272 | for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h |
Charles-François Natali | 47413c1 | 2011-10-06 19:47:44 +0200 | [diff] [blame] | 8273 | do : |
| 8274 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| 8275 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " |
| 8276 | #ifdef HAVE_SYS_SOCKET_H |
| 8277 | #include <sys/socket.h> |
| 8278 | #endif |
| 8279 | |
| 8280 | " |
| 8281 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
| 8282 | cat >>confdefs.h <<_ACEOF |
| 8283 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
| 8284 | _ACEOF |
| 8285 | |
| 8286 | fi |
| 8287 | |
| 8288 | done |
| 8289 | |
| 8290 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8291 | # checks for typedefs |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 8292 | was_it_defined=no |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8293 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5 |
| 8294 | $as_echo_n "checking for clock_t in time.h... " >&6; } |
| 8295 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8296 | /* end confdefs.h. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8297 | #include <time.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8298 | |
| 8299 | _ACEOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8300 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8301 | $EGREP "clock_t" >/dev/null 2>&1; then : |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 8302 | was_it_defined=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8303 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8304 | |
| 8305 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8306 | $as_echo "#define clock_t long" >>confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8307 | |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 8308 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8309 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 8310 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8311 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8312 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5 |
| 8313 | $as_echo "$was_it_defined" >&6; } |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 8314 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8315 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5 |
| 8316 | $as_echo_n "checking for makedev... " >&6; } |
| 8317 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8318 | /* end confdefs.h. */ |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 8319 | |
Jesus Cea | 740f53a | 2010-04-28 11:35:30 +0000 | [diff] [blame] | 8320 | #if defined(MAJOR_IN_MKDEV) |
| 8321 | #include <sys/mkdev.h> |
| 8322 | #elif defined(MAJOR_IN_SYSMACROS) |
| 8323 | #include <sys/sysmacros.h> |
| 8324 | #else |
| 8325 | #include <sys/types.h> |
| 8326 | #endif |
| 8327 | |
Neal Norwitz | 1169011 | 2002-07-30 01:08:28 +0000 | [diff] [blame] | 8328 | int |
| 8329 | main () |
| 8330 | { |
Jesus Cea | 740f53a | 2010-04-28 11:35:30 +0000 | [diff] [blame] | 8331 | |
| 8332 | makedev(0, 0) |
Neal Norwitz | 1169011 | 2002-07-30 01:08:28 +0000 | [diff] [blame] | 8333 | ; |
| 8334 | return 0; |
| 8335 | } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 8336 | |
Neal Norwitz | 1169011 | 2002-07-30 01:08:28 +0000 | [diff] [blame] | 8337 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8338 | if ac_fn_c_try_link "$LINENO"; then : |
Neal Norwitz | 1169011 | 2002-07-30 01:08:28 +0000 | [diff] [blame] | 8339 | ac_cv_has_makedev=yes |
| 8340 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8341 | ac_cv_has_makedev=no |
Neal Norwitz | 1169011 | 2002-07-30 01:08:28 +0000 | [diff] [blame] | 8342 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8343 | rm -f core conftest.err conftest.$ac_objext \ |
| 8344 | conftest$ac_exeext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8345 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5 |
| 8346 | $as_echo "$ac_cv_has_makedev" >&6; } |
Neal Norwitz | 1169011 | 2002-07-30 01:08:28 +0000 | [diff] [blame] | 8347 | if test "$ac_cv_has_makedev" = "yes"; then |
| 8348 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8349 | $as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h |
Neal Norwitz | 1169011 | 2002-07-30 01:08:28 +0000 | [diff] [blame] | 8350 | |
| 8351 | fi |
| 8352 | |
Christian Heimes | 985ecdc | 2013-11-20 11:46:18 +0100 | [diff] [blame] | 8353 | # byte swapping |
| 8354 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5 |
| 8355 | $as_echo_n "checking for le64toh... " >&6; } |
| 8356 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 8357 | /* end confdefs.h. */ |
| 8358 | |
| 8359 | #ifdef HAVE_ENDIAN_H |
| 8360 | #include <endian.h> |
| 8361 | #elif defined(HAVE_SYS_ENDIAN_H) |
| 8362 | #include <sys/endian.h> |
| 8363 | #endif |
| 8364 | |
| 8365 | int |
| 8366 | main () |
| 8367 | { |
| 8368 | |
| 8369 | le64toh(1) |
| 8370 | ; |
| 8371 | return 0; |
| 8372 | } |
| 8373 | |
| 8374 | _ACEOF |
| 8375 | if ac_fn_c_try_link "$LINENO"; then : |
| 8376 | ac_cv_has_le64toh=yes |
| 8377 | else |
| 8378 | ac_cv_has_le64toh=no |
| 8379 | fi |
| 8380 | rm -f core conftest.err conftest.$ac_objext \ |
| 8381 | conftest$ac_exeext conftest.$ac_ext |
| 8382 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5 |
| 8383 | $as_echo "$ac_cv_has_le64toh" >&6; } |
| 8384 | if test "$ac_cv_has_le64toh" = "yes"; then |
| 8385 | |
| 8386 | $as_echo "#define HAVE_HTOLE64 1" >>confdefs.h |
| 8387 | |
| 8388 | fi |
| 8389 | |
Martin v. Löwis | 399a689 | 2002-10-04 10:22:02 +0000 | [diff] [blame] | 8390 | use_lfs=yes |
doko@ubuntu.com | 006a56c | 2016-06-14 10:15:25 +0200 | [diff] [blame] | 8391 | # Don't use largefile support for GNU/Hurd |
| 8392 | case $ac_sys_system in GNU*) |
| 8393 | use_lfs=no |
| 8394 | esac |
| 8395 | |
Martin v. Löwis | 399a689 | 2002-10-04 10:22:02 +0000 | [diff] [blame] | 8396 | if test "$use_lfs" = "yes"; then |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 8397 | # Two defines needed to enable largefile support on various platforms |
| 8398 | # These may affect some typedefs |
Georg Brandl | 216e404 | 2011-02-19 08:58:23 +0000 | [diff] [blame] | 8399 | case $ac_sys_system/$ac_sys_release in |
| 8400 | AIX*) |
| 8401 | |
| 8402 | $as_echo "#define _LARGE_FILES 1" >>confdefs.h |
| 8403 | |
| 8404 | ;; |
| 8405 | esac |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 8406 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8407 | $as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8408 | |
| 8409 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8410 | $as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 8411 | |
Martin v. Löwis | 399a689 | 2002-10-04 10:22:02 +0000 | [diff] [blame] | 8412 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8413 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 8414 | # Add some code to confdefs.h so that the test for off_t works on SCO |
| 8415 | cat >> confdefs.h <<\EOF |
| 8416 | #if defined(SCO_DS) |
| 8417 | #undef _OFF_T |
| 8418 | #endif |
| 8419 | EOF |
| 8420 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 8421 | # Type availability checks |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8422 | ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8423 | if test "x$ac_cv_type_mode_t" = xyes; then : |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8424 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8425 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8426 | |
| 8427 | cat >>confdefs.h <<_ACEOF |
| 8428 | #define mode_t int |
| 8429 | _ACEOF |
| 8430 | |
| 8431 | fi |
| 8432 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8433 | ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8434 | if test "x$ac_cv_type_off_t" = xyes; then : |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8435 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8436 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8437 | |
| 8438 | cat >>confdefs.h <<_ACEOF |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8439 | #define off_t long int |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8440 | _ACEOF |
| 8441 | |
| 8442 | fi |
| 8443 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8444 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8445 | if test "x$ac_cv_type_pid_t" = xyes; then : |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8446 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8447 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8448 | |
| 8449 | cat >>confdefs.h <<_ACEOF |
| 8450 | #define pid_t int |
| 8451 | _ACEOF |
| 8452 | |
| 8453 | fi |
| 8454 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 8455 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8456 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | bada4c3 | 2010-04-25 21:18:48 +0000 | [diff] [blame] | 8457 | #define RETSIGTYPE void |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8458 | _ACEOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8459 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8460 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8461 | if test "x$ac_cv_type_size_t" = xyes; then : |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8462 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8463 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8464 | |
| 8465 | cat >>confdefs.h <<_ACEOF |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8466 | #define size_t unsigned int |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8467 | _ACEOF |
| 8468 | |
| 8469 | fi |
| 8470 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8471 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 |
| 8472 | $as_echo_n "checking for uid_t in sys/types.h... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8473 | if ${ac_cv_type_uid_t+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8474 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8475 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8476 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8477 | /* end confdefs.h. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8478 | #include <sys/types.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8479 | |
| 8480 | _ACEOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8481 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8482 | $EGREP "uid_t" >/dev/null 2>&1; then : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8483 | ac_cv_type_uid_t=yes |
| 8484 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8485 | ac_cv_type_uid_t=no |
| 8486 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 8487 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8488 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8489 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8490 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 |
| 8491 | $as_echo "$ac_cv_type_uid_t" >&6; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8492 | if test $ac_cv_type_uid_t = no; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8493 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8494 | $as_echo "#define uid_t int" >>confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8495 | |
| 8496 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8497 | $as_echo "#define gid_t int" >>confdefs.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8498 | |
| 8499 | fi |
| 8500 | |
Mark Dickinson | 983bc16 | 2012-12-02 12:11:38 +0000 | [diff] [blame] | 8501 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8502 | ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8503 | if test "x$ac_cv_type_ssize_t" = xyes; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8504 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8505 | $as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h |
Martin v. Löwis | 18e1655 | 2006-02-15 17:27:45 +0000 | [diff] [blame] | 8506 | |
| 8507 | fi |
| 8508 | |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 8509 | ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default" |
| 8510 | if test "x$ac_cv_type___uint128_t" = xyes; then : |
| 8511 | |
| 8512 | $as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h |
| 8513 | |
| 8514 | fi |
| 8515 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8516 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8517 | # Sizes of various common basic types |
Skip Montanaro | b9820a3 | 2004-01-17 00:16:12 +0000 | [diff] [blame] | 8518 | # ANSI C requires sizeof(char) == 1, so no need to check it |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8519 | # The cast to long int works around a bug in the HP C Compiler |
| 8520 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8521 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8522 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8523 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 |
| 8524 | $as_echo_n "checking size of int... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8525 | if ${ac_cv_sizeof_int+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8526 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8527 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8528 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8529 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8530 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8531 | if test "$ac_cv_type_int" = yes; then |
| 8532 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8533 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8534 | as_fn_error 77 "cannot compute sizeof (int) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8535 | See \`config.log' for more details" "$LINENO" 5; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8536 | else |
| 8537 | ac_cv_sizeof_int=0 |
| 8538 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8539 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8540 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8541 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8542 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 |
| 8543 | $as_echo "$ac_cv_sizeof_int" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8544 | |
| 8545 | |
| 8546 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8547 | cat >>confdefs.h <<_ACEOF |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 8548 | #define SIZEOF_INT $ac_cv_sizeof_int |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8549 | _ACEOF |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 8550 | |
| 8551 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8552 | # The cast to long int works around a bug in the HP C Compiler |
| 8553 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8554 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8555 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8556 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 |
| 8557 | $as_echo_n "checking size of long... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8558 | if ${ac_cv_sizeof_long+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8559 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8560 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8561 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8562 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8563 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8564 | if test "$ac_cv_type_long" = yes; then |
| 8565 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8566 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8567 | as_fn_error 77 "cannot compute sizeof (long) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8568 | See \`config.log' for more details" "$LINENO" 5; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8569 | else |
| 8570 | ac_cv_sizeof_long=0 |
| 8571 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8572 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8573 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8574 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8575 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
| 8576 | $as_echo "$ac_cv_sizeof_long" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8577 | |
| 8578 | |
| 8579 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8580 | cat >>confdefs.h <<_ACEOF |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 8581 | #define SIZEOF_LONG $ac_cv_sizeof_long |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8582 | _ACEOF |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 8583 | |
| 8584 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8585 | # The cast to long int works around a bug in the HP C Compiler |
| 8586 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8587 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8588 | # This bug is HP SR number 8606223364. |
Benjamin Peterson | ed4aa83 | 2016-09-05 17:44:18 -0700 | [diff] [blame] | 8589 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 |
| 8590 | $as_echo_n "checking size of long long... " >&6; } |
| 8591 | if ${ac_cv_sizeof_long_long+:} false; then : |
| 8592 | $as_echo_n "(cached) " >&6 |
| 8593 | else |
| 8594 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : |
| 8595 | |
| 8596 | else |
| 8597 | if test "$ac_cv_type_long_long" = yes; then |
| 8598 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8599 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 8600 | as_fn_error 77 "cannot compute sizeof (long long) |
| 8601 | See \`config.log' for more details" "$LINENO" 5; } |
| 8602 | else |
| 8603 | ac_cv_sizeof_long_long=0 |
| 8604 | fi |
| 8605 | fi |
| 8606 | |
| 8607 | fi |
| 8608 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 |
| 8609 | $as_echo "$ac_cv_sizeof_long_long" >&6; } |
| 8610 | |
| 8611 | |
| 8612 | |
| 8613 | cat >>confdefs.h <<_ACEOF |
| 8614 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
| 8615 | _ACEOF |
| 8616 | |
| 8617 | |
| 8618 | # The cast to long int works around a bug in the HP C Compiler |
| 8619 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8620 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8621 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8622 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 |
| 8623 | $as_echo_n "checking size of void *... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8624 | if ${ac_cv_sizeof_void_p+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8625 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8626 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8627 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8628 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8629 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8630 | if test "$ac_cv_type_void_p" = yes; then |
| 8631 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8632 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8633 | as_fn_error 77 "cannot compute sizeof (void *) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8634 | See \`config.log' for more details" "$LINENO" 5; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8635 | else |
| 8636 | ac_cv_sizeof_void_p=0 |
| 8637 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8638 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8639 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8640 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8641 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 |
| 8642 | $as_echo "$ac_cv_sizeof_void_p" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8643 | |
| 8644 | |
| 8645 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8646 | cat >>confdefs.h <<_ACEOF |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 8647 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8648 | _ACEOF |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 8649 | |
| 8650 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8651 | # The cast to long int works around a bug in the HP C Compiler |
| 8652 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8653 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8654 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8655 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 |
| 8656 | $as_echo_n "checking size of short... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8657 | if ${ac_cv_sizeof_short+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8658 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8659 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8660 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8661 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8662 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8663 | if test "$ac_cv_type_short" = yes; then |
| 8664 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8665 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8666 | as_fn_error 77 "cannot compute sizeof (short) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8667 | See \`config.log' for more details" "$LINENO" 5; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8668 | else |
| 8669 | ac_cv_sizeof_short=0 |
| 8670 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8671 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8672 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8673 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8674 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 |
| 8675 | $as_echo "$ac_cv_sizeof_short" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8676 | |
| 8677 | |
| 8678 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8679 | cat >>confdefs.h <<_ACEOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 8680 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8681 | _ACEOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 8682 | |
| 8683 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8684 | # The cast to long int works around a bug in the HP C Compiler |
| 8685 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8686 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8687 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8688 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5 |
| 8689 | $as_echo_n "checking size of float... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8690 | if ${ac_cv_sizeof_float+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8691 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8692 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8693 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8694 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8695 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8696 | if test "$ac_cv_type_float" = yes; then |
| 8697 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8698 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8699 | as_fn_error 77 "cannot compute sizeof (float) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8700 | See \`config.log' for more details" "$LINENO" 5; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8701 | else |
| 8702 | ac_cv_sizeof_float=0 |
| 8703 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8704 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8705 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8706 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8707 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5 |
| 8708 | $as_echo "$ac_cv_sizeof_float" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8709 | |
| 8710 | |
| 8711 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8712 | cat >>confdefs.h <<_ACEOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 8713 | #define SIZEOF_FLOAT $ac_cv_sizeof_float |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8714 | _ACEOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 8715 | |
| 8716 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8717 | # The cast to long int works around a bug in the HP C Compiler |
| 8718 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8719 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8720 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8721 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5 |
| 8722 | $as_echo_n "checking size of double... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8723 | if ${ac_cv_sizeof_double+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8724 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8725 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8726 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8727 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8728 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8729 | if test "$ac_cv_type_double" = yes; then |
| 8730 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8731 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8732 | as_fn_error 77 "cannot compute sizeof (double) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8733 | See \`config.log' for more details" "$LINENO" 5; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8734 | else |
| 8735 | ac_cv_sizeof_double=0 |
| 8736 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8737 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8738 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8739 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8740 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5 |
| 8741 | $as_echo "$ac_cv_sizeof_double" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8742 | |
| 8743 | |
| 8744 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8745 | cat >>confdefs.h <<_ACEOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 8746 | #define SIZEOF_DOUBLE $ac_cv_sizeof_double |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8747 | _ACEOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 8748 | |
| 8749 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8750 | # The cast to long int works around a bug in the HP C Compiler |
| 8751 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8752 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8753 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8754 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5 |
| 8755 | $as_echo_n "checking size of fpos_t... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8756 | if ${ac_cv_sizeof_fpos_t+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8757 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8758 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8759 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8760 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8761 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8762 | if test "$ac_cv_type_fpos_t" = yes; then |
| 8763 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8764 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8765 | as_fn_error 77 "cannot compute sizeof (fpos_t) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8766 | See \`config.log' for more details" "$LINENO" 5; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8767 | else |
| 8768 | ac_cv_sizeof_fpos_t=0 |
| 8769 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8770 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8771 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8772 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8773 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5 |
| 8774 | $as_echo "$ac_cv_sizeof_fpos_t" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8775 | |
| 8776 | |
| 8777 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8778 | cat >>confdefs.h <<_ACEOF |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 8779 | #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8780 | _ACEOF |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 8781 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8782 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8783 | # The cast to long int works around a bug in the HP C Compiler |
| 8784 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8785 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8786 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8787 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 |
| 8788 | $as_echo_n "checking size of size_t... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8789 | if ${ac_cv_sizeof_size_t+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8790 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 18e1655 | 2006-02-15 17:27:45 +0000 | [diff] [blame] | 8791 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8792 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : |
Martin v. Löwis | 18e1655 | 2006-02-15 17:27:45 +0000 | [diff] [blame] | 8793 | |
Martin v. Löwis | 18e1655 | 2006-02-15 17:27:45 +0000 | [diff] [blame] | 8794 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8795 | if test "$ac_cv_type_size_t" = yes; then |
| 8796 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8797 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8798 | as_fn_error 77 "cannot compute sizeof (size_t) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8799 | See \`config.log' for more details" "$LINENO" 5; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8800 | else |
| 8801 | ac_cv_sizeof_size_t=0 |
| 8802 | fi |
Martin v. Löwis | 18e1655 | 2006-02-15 17:27:45 +0000 | [diff] [blame] | 8803 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8804 | |
Martin v. Löwis | 18e1655 | 2006-02-15 17:27:45 +0000 | [diff] [blame] | 8805 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8806 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 |
| 8807 | $as_echo "$ac_cv_sizeof_size_t" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8808 | |
| 8809 | |
| 8810 | |
Martin v. Löwis | 18e1655 | 2006-02-15 17:27:45 +0000 | [diff] [blame] | 8811 | cat >>confdefs.h <<_ACEOF |
| 8812 | #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t |
| 8813 | _ACEOF |
| 8814 | |
| 8815 | |
Christian Heimes | 400adb0 | 2008-02-01 08:12:03 +0000 | [diff] [blame] | 8816 | # The cast to long int works around a bug in the HP C Compiler |
| 8817 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8818 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8819 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8820 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5 |
| 8821 | $as_echo_n "checking size of pid_t... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8822 | if ${ac_cv_sizeof_pid_t+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8823 | $as_echo_n "(cached) " >&6 |
Christian Heimes | 400adb0 | 2008-02-01 08:12:03 +0000 | [diff] [blame] | 8824 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8825 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then : |
Christian Heimes | 400adb0 | 2008-02-01 08:12:03 +0000 | [diff] [blame] | 8826 | |
Christian Heimes | 400adb0 | 2008-02-01 08:12:03 +0000 | [diff] [blame] | 8827 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8828 | if test "$ac_cv_type_pid_t" = yes; then |
| 8829 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8830 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8831 | as_fn_error 77 "cannot compute sizeof (pid_t) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8832 | See \`config.log' for more details" "$LINENO" 5; } |
Christian Heimes | 400adb0 | 2008-02-01 08:12:03 +0000 | [diff] [blame] | 8833 | else |
| 8834 | ac_cv_sizeof_pid_t=0 |
| 8835 | fi |
| 8836 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8837 | |
Christian Heimes | 400adb0 | 2008-02-01 08:12:03 +0000 | [diff] [blame] | 8838 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8839 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5 |
| 8840 | $as_echo "$ac_cv_sizeof_pid_t" >&6; } |
Christian Heimes | 400adb0 | 2008-02-01 08:12:03 +0000 | [diff] [blame] | 8841 | |
| 8842 | |
| 8843 | |
| 8844 | cat >>confdefs.h <<_ACEOF |
| 8845 | #define SIZEOF_PID_T $ac_cv_sizeof_pid_t |
| 8846 | _ACEOF |
| 8847 | |
| 8848 | |
Benjamin Peterson | df6ff7b | 2016-09-06 13:53:14 -0700 | [diff] [blame] | 8849 | # The cast to long int works around a bug in the HP C Compiler |
| 8850 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8851 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8852 | # This bug is HP SR number 8606223364. |
| 8853 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5 |
| 8854 | $as_echo_n "checking size of uintptr_t... " >&6; } |
| 8855 | if ${ac_cv_sizeof_uintptr_t+:} false; then : |
| 8856 | $as_echo_n "(cached) " >&6 |
| 8857 | else |
| 8858 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then : |
| 8859 | |
| 8860 | else |
| 8861 | if test "$ac_cv_type_uintptr_t" = yes; then |
| 8862 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8863 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 8864 | as_fn_error 77 "cannot compute sizeof (uintptr_t) |
| 8865 | See \`config.log' for more details" "$LINENO" 5; } |
| 8866 | else |
| 8867 | ac_cv_sizeof_uintptr_t=0 |
| 8868 | fi |
| 8869 | fi |
| 8870 | |
| 8871 | fi |
| 8872 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5 |
| 8873 | $as_echo "$ac_cv_sizeof_uintptr_t" >&6; } |
| 8874 | |
| 8875 | |
| 8876 | |
| 8877 | cat >>confdefs.h <<_ACEOF |
| 8878 | #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t |
| 8879 | _ACEOF |
| 8880 | |
| 8881 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8882 | |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8883 | |
Eitan Adler | 3055c94 | 2018-05-15 22:58:09 -0700 | [diff] [blame] | 8884 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double" >&5 |
| 8885 | $as_echo_n "checking for long double... " >&6; } |
| 8886 | if ${ac_cv_type_long_double+:} false; then : |
| 8887 | $as_echo_n "(cached) " >&6 |
| 8888 | else |
| 8889 | if test "$GCC" = yes; then |
| 8890 | ac_cv_type_long_double=yes |
| 8891 | else |
| 8892 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 8893 | /* end confdefs.h. */ |
| 8894 | /* The Stardent Vistra knows sizeof (long double), but does |
| 8895 | not support it. */ |
| 8896 | long double foo = 0.0L; |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8897 | int |
| 8898 | main () |
| 8899 | { |
Eitan Adler | 3055c94 | 2018-05-15 22:58:09 -0700 | [diff] [blame] | 8900 | static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */ |
| 8901 | sizeof (double) <= sizeof (long double))]; |
| 8902 | test_array [0] = 0; |
| 8903 | return test_array [0]; |
| 8904 | |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8905 | ; |
| 8906 | return 0; |
| 8907 | } |
| 8908 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8909 | if ac_fn_c_try_compile "$LINENO"; then : |
Eitan Adler | 3055c94 | 2018-05-15 22:58:09 -0700 | [diff] [blame] | 8910 | ac_cv_type_long_double=yes |
| 8911 | else |
| 8912 | ac_cv_type_long_double=no |
| 8913 | fi |
| 8914 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 8915 | fi |
| 8916 | fi |
| 8917 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5 |
| 8918 | $as_echo "$ac_cv_type_long_double" >&6; } |
| 8919 | if test $ac_cv_type_long_double = yes; then |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8920 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8921 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8922 | |
Eitan Adler | 3055c94 | 2018-05-15 22:58:09 -0700 | [diff] [blame] | 8923 | fi |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8924 | |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8925 | # The cast to long int works around a bug in the HP C Compiler |
| 8926 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8927 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8928 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8929 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5 |
| 8930 | $as_echo_n "checking size of long double... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8931 | if ${ac_cv_sizeof_long_double+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8932 | $as_echo_n "(cached) " >&6 |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8933 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8934 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then : |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8935 | |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8936 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8937 | if test "$ac_cv_type_long_double" = yes; then |
| 8938 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8939 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8940 | as_fn_error 77 "cannot compute sizeof (long double) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8941 | See \`config.log' for more details" "$LINENO" 5; } |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8942 | else |
| 8943 | ac_cv_sizeof_long_double=0 |
| 8944 | fi |
| 8945 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8946 | |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8947 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8948 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5 |
| 8949 | $as_echo "$ac_cv_sizeof_long_double" >&6; } |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8950 | |
| 8951 | |
| 8952 | |
| 8953 | cat >>confdefs.h <<_ACEOF |
| 8954 | #define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double |
| 8955 | _ACEOF |
| 8956 | |
| 8957 | |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8958 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8959 | # The cast to long int works around a bug in the HP C Compiler |
| 8960 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8961 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8962 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8963 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5 |
| 8964 | $as_echo_n "checking size of _Bool... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8965 | if ${ac_cv_sizeof__Bool+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8966 | $as_echo_n "(cached) " >&6 |
Thomas Wouters | b213704 | 2007-02-01 18:02:27 +0000 | [diff] [blame] | 8967 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8968 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then : |
Thomas Wouters | b213704 | 2007-02-01 18:02:27 +0000 | [diff] [blame] | 8969 | |
Thomas Wouters | b213704 | 2007-02-01 18:02:27 +0000 | [diff] [blame] | 8970 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8971 | if test "$ac_cv_type__Bool" = yes; then |
| 8972 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8973 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8974 | as_fn_error 77 "cannot compute sizeof (_Bool) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8975 | See \`config.log' for more details" "$LINENO" 5; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8976 | else |
| 8977 | ac_cv_sizeof__Bool=0 |
| 8978 | fi |
Thomas Wouters | b213704 | 2007-02-01 18:02:27 +0000 | [diff] [blame] | 8979 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8980 | |
Thomas Wouters | b213704 | 2007-02-01 18:02:27 +0000 | [diff] [blame] | 8981 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8982 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5 |
| 8983 | $as_echo "$ac_cv_sizeof__Bool" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8984 | |
| 8985 | |
| 8986 | |
Thomas Wouters | b213704 | 2007-02-01 18:02:27 +0000 | [diff] [blame] | 8987 | cat >>confdefs.h <<_ACEOF |
| 8988 | #define SIZEOF__BOOL $ac_cv_sizeof__Bool |
| 8989 | _ACEOF |
| 8990 | |
| 8991 | |
Thomas Wouters | b213704 | 2007-02-01 18:02:27 +0000 | [diff] [blame] | 8992 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 8993 | # The cast to long int works around a bug in the HP C Compiler |
| 8994 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8995 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8996 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8997 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 |
| 8998 | $as_echo_n "checking size of off_t... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8999 | if ${ac_cv_sizeof_off_t+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9000 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9001 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9002 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" " |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9003 | #ifdef HAVE_SYS_TYPES_H |
| 9004 | #include <sys/types.h> |
| 9005 | #endif |
| 9006 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9007 | "; then : |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9008 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9009 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9010 | if test "$ac_cv_type_off_t" = yes; then |
| 9011 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 9012 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 9013 | as_fn_error 77 "cannot compute sizeof (off_t) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9014 | See \`config.log' for more details" "$LINENO" 5; } |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9015 | else |
| 9016 | ac_cv_sizeof_off_t=0 |
| 9017 | fi |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 9018 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9019 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 9020 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9021 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 |
| 9022 | $as_echo "$ac_cv_sizeof_off_t" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9023 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9024 | |
| 9025 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9026 | cat >>confdefs.h <<_ACEOF |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 9027 | #define SIZEOF_OFF_T $ac_cv_sizeof_off_t |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9028 | _ACEOF |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 9029 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 9030 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9031 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9032 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5 |
| 9033 | $as_echo_n "checking whether to enable large file support... " >&6; } |
Mark Dickinson | 2df5d28 | 2009-12-31 21:22:50 +0000 | [diff] [blame] | 9034 | if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \ |
Guido van Rossum | 96f2eb9 | 1999-04-10 16:02:18 +0000 | [diff] [blame] | 9035 | "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 9036 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9037 | $as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9038 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9039 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 9040 | $as_echo "yes" >&6; } |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 9041 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9042 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9043 | $as_echo "no" >&6; } |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 9044 | fi |
| 9045 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9046 | # The cast to long int works around a bug in the HP C Compiler |
| 9047 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 9048 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 9049 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9050 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 |
| 9051 | $as_echo_n "checking size of time_t... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9052 | if ${ac_cv_sizeof_time_t+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9053 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9054 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9055 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" " |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9056 | #ifdef HAVE_SYS_TYPES_H |
| 9057 | #include <sys/types.h> |
| 9058 | #endif |
| 9059 | #ifdef HAVE_TIME_H |
| 9060 | #include <time.h> |
| 9061 | #endif |
| 9062 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9063 | "; then : |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9064 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9065 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9066 | if test "$ac_cv_type_time_t" = yes; then |
| 9067 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 9068 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 9069 | as_fn_error 77 "cannot compute sizeof (time_t) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9070 | See \`config.log' for more details" "$LINENO" 5; } |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9071 | else |
| 9072 | ac_cv_sizeof_time_t=0 |
| 9073 | fi |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 9074 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9075 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 9076 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9077 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5 |
| 9078 | $as_echo "$ac_cv_sizeof_time_t" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9079 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9080 | |
| 9081 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9082 | cat >>confdefs.h <<_ACEOF |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 9083 | #define SIZEOF_TIME_T $ac_cv_sizeof_time_t |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9084 | _ACEOF |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 9085 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 9086 | |
| 9087 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 9088 | # if have pthread_t then define SIZEOF_PTHREAD_T |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 9089 | ac_save_cc="$CC" |
| 9090 | if test "$ac_cv_kpthread" = "yes" |
| 9091 | then CC="$CC -Kpthread" |
Martin v. Löwis | 5f433f0 | 2003-05-05 05:05:30 +0000 | [diff] [blame] | 9092 | elif test "$ac_cv_kthread" = "yes" |
| 9093 | then CC="$CC -Kthread" |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 9094 | elif test "$ac_cv_pthread" = "yes" |
| 9095 | then CC="$CC -pthread" |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 9096 | fi |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9097 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9098 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5 |
| 9099 | $as_echo_n "checking for pthread_t... " >&6; } |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 9100 | have_pthread_t=no |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9101 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 9102 | /* end confdefs.h. */ |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 9103 | |
| 9104 | #include <pthread.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9105 | int |
| 9106 | main () |
| 9107 | { |
Guido van Rossum | 1258049 | 2000-09-24 16:47:19 +0000 | [diff] [blame] | 9108 | pthread_t x; x = *(pthread_t*)0; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9109 | ; |
| 9110 | return 0; |
| 9111 | } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 9112 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9113 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9114 | if ac_fn_c_try_compile "$LINENO"; then : |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 9115 | have_pthread_t=yes |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 9116 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9117 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9118 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5 |
| 9119 | $as_echo "$have_pthread_t" >&6; } |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 9120 | if test "$have_pthread_t" = yes ; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9121 | # The cast to long int works around a bug in the HP C Compiler |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9122 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 9123 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 9124 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9125 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5 |
| 9126 | $as_echo_n "checking size of pthread_t... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9127 | if ${ac_cv_sizeof_pthread_t+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9128 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9129 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9130 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" " |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9131 | #ifdef HAVE_PTHREAD_H |
| 9132 | #include <pthread.h> |
| 9133 | #endif |
| 9134 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9135 | "; then : |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9136 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9137 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9138 | if test "$ac_cv_type_pthread_t" = yes; then |
| 9139 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 9140 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 9141 | as_fn_error 77 "cannot compute sizeof (pthread_t) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9142 | See \`config.log' for more details" "$LINENO" 5; } |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9143 | else |
| 9144 | ac_cv_sizeof_pthread_t=0 |
| 9145 | fi |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 9146 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9147 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 9148 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9149 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5 |
| 9150 | $as_echo "$ac_cv_sizeof_pthread_t" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9151 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9152 | |
| 9153 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9154 | cat >>confdefs.h <<_ACEOF |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 9155 | #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9156 | _ACEOF |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 9157 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9158 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 9159 | fi |
Masayuki Yamamoto | 731e189 | 2017-10-06 19:41:34 +0900 | [diff] [blame] | 9160 | |
| 9161 | # Issue #25658: POSIX hasn't defined that pthread_key_t is compatible with int. |
| 9162 | # This checking will be unnecessary after removing deprecated TLS API. |
| 9163 | # The cast to long int works around a bug in the HP C Compiler |
| 9164 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 9165 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 9166 | # This bug is HP SR number 8606223364. |
| 9167 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5 |
| 9168 | $as_echo_n "checking size of pthread_key_t... " >&6; } |
| 9169 | if ${ac_cv_sizeof_pthread_key_t+:} false; then : |
| 9170 | $as_echo_n "(cached) " >&6 |
| 9171 | else |
| 9172 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include <pthread.h> |
| 9173 | "; then : |
| 9174 | |
| 9175 | else |
| 9176 | if test "$ac_cv_type_pthread_key_t" = yes; then |
| 9177 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 9178 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 9179 | as_fn_error 77 "cannot compute sizeof (pthread_key_t) |
| 9180 | See \`config.log' for more details" "$LINENO" 5; } |
| 9181 | else |
| 9182 | ac_cv_sizeof_pthread_key_t=0 |
| 9183 | fi |
| 9184 | fi |
| 9185 | |
| 9186 | fi |
| 9187 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5 |
| 9188 | $as_echo "$ac_cv_sizeof_pthread_key_t" >&6; } |
| 9189 | |
| 9190 | |
| 9191 | |
| 9192 | cat >>confdefs.h <<_ACEOF |
| 9193 | #define SIZEOF_PTHREAD_KEY_T $ac_cv_sizeof_pthread_key_t |
| 9194 | _ACEOF |
| 9195 | |
| 9196 | |
| 9197 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_key_t is compatible with int" >&5 |
| 9198 | $as_echo_n "checking whether pthread_key_t is compatible with int... " >&6; } |
| 9199 | if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then |
| 9200 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9201 | /* end confdefs.h. */ |
| 9202 | #include <pthread.h> |
| 9203 | int |
| 9204 | main () |
| 9205 | { |
| 9206 | pthread_key_t k; k * 1; |
| 9207 | ; |
| 9208 | return 0; |
| 9209 | } |
| 9210 | _ACEOF |
| 9211 | if ac_fn_c_try_compile "$LINENO"; then : |
| 9212 | ac_pthread_key_t_is_arithmetic_type=yes |
| 9213 | else |
| 9214 | ac_pthread_key_t_is_arithmetic_type=no |
| 9215 | |
| 9216 | fi |
| 9217 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9218 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pthread_key_t_is_arithmetic_type" >&5 |
| 9219 | $as_echo "$ac_pthread_key_t_is_arithmetic_type" >&6; } |
| 9220 | if test "$ac_pthread_key_t_is_arithmetic_type" = yes ; then |
| 9221 | |
| 9222 | $as_echo "#define PTHREAD_KEY_T_IS_COMPATIBLE_WITH_INT 1" >>confdefs.h |
| 9223 | |
| 9224 | fi |
| 9225 | else |
| 9226 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9227 | $as_echo "no" >&6; } |
| 9228 | fi |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 9229 | CC="$ac_save_cc" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 9230 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 9231 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9232 | case $ac_sys_system/$ac_sys_release in |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 9233 | Darwin/[01567]\..*) |
Bob Ippolito | 7026a0a | 2005-03-28 23:23:47 +0000 | [diff] [blame] | 9234 | OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000" |
| 9235 | ;; |
| 9236 | Darwin/*) |
| 9237 | OTHER_LIBTOOL_OPT="" |
| 9238 | ;; |
| 9239 | esac |
| 9240 | |
| 9241 | |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9242 | |
Bob Ippolito | 7026a0a | 2005-03-28 23:23:47 +0000 | [diff] [blame] | 9243 | case $ac_sys_system/$ac_sys_release in |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 9244 | Darwin/[01567]\..*) |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 9245 | LIBTOOL_CRUFT="-framework System -lcc_dynamic" |
| 9246 | if test "${enable_universalsdk}"; then |
| 9247 | : |
| 9248 | else |
Ronald Oussoren | e3da75a | 2010-02-11 13:38:58 +0000 | [diff] [blame] | 9249 | LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`" |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 9250 | fi |
Jack Jansen | b36687a | 2004-07-16 08:43:47 +0000 | [diff] [blame] | 9251 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 9252 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 9253 | Darwin/*) |
Ronald Oussoren | 9812a6c | 2010-02-07 11:53:18 +0000 | [diff] [blame] | 9254 | gcc_version=`gcc -dumpversion` |
Bob Ippolito | 7026a0a | 2005-03-28 23:23:47 +0000 | [diff] [blame] | 9255 | if test ${gcc_version} '<' 4.0 |
| 9256 | then |
| 9257 | LIBTOOL_CRUFT="-lcc_dynamic" |
| 9258 | else |
| 9259 | LIBTOOL_CRUFT="" |
| 9260 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9261 | if test "$cross_compiling" = yes; then : |
Ronald Oussoren | 3c064c1 | 2009-09-08 07:12:42 +0000 | [diff] [blame] | 9262 | ac_osx_32bit=yes |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9263 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9264 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9265 | /* end confdefs.h. */ |
Ronald Oussoren | 3c064c1 | 2009-09-08 07:12:42 +0000 | [diff] [blame] | 9266 | |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9267 | #include <unistd.h> |
| 9268 | int main(int argc, char*argv[]) |
| 9269 | { |
| 9270 | if (sizeof(long) == 4) { |
| 9271 | return 0; |
| 9272 | } else { |
| 9273 | return 1; |
| 9274 | } |
Ronald Oussoren | 3c064c1 | 2009-09-08 07:12:42 +0000 | [diff] [blame] | 9275 | } |
| 9276 | |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9277 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9278 | if ac_fn_c_try_run "$LINENO"; then : |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9279 | ac_osx_32bit=yes |
| 9280 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9281 | ac_osx_32bit=no |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9282 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9283 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 9284 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9285 | fi |
| 9286 | |
| 9287 | |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9288 | if test "${ac_osx_32bit}" = "yes"; then |
Ronald Oussoren | e3da75a | 2010-02-11 13:38:58 +0000 | [diff] [blame] | 9289 | case `/usr/bin/arch` in |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9290 | i386) |
| 9291 | MACOSX_DEFAULT_ARCH="i386" |
| 9292 | ;; |
| 9293 | ppc) |
| 9294 | MACOSX_DEFAULT_ARCH="ppc" |
| 9295 | ;; |
| 9296 | *) |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 9297 | as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5 |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9298 | ;; |
| 9299 | esac |
| 9300 | else |
Ronald Oussoren | e3da75a | 2010-02-11 13:38:58 +0000 | [diff] [blame] | 9301 | case `/usr/bin/arch` in |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9302 | i386) |
| 9303 | MACOSX_DEFAULT_ARCH="x86_64" |
| 9304 | ;; |
| 9305 | ppc) |
| 9306 | MACOSX_DEFAULT_ARCH="ppc64" |
| 9307 | ;; |
| 9308 | *) |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 9309 | as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5 |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9310 | ;; |
| 9311 | esac |
| 9312 | |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9313 | fi |
| 9314 | |
| 9315 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}" |
Jack Jansen | b36687a | 2004-07-16 08:43:47 +0000 | [diff] [blame] | 9316 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 9317 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9318 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9319 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5 |
| 9320 | $as_echo_n "checking for --enable-framework... " >&6; } |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 9321 | if test "$enable_framework" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9322 | then |
Skip Montanaro | decc6a4 | 2003-01-01 20:07:49 +0000 | [diff] [blame] | 9323 | BASECFLAGS="$BASECFLAGS -fno-common -dynamic" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9324 | # -F. is needed to allow linking to the framework while |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 9325 | # in the build location. |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9326 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9327 | $as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9328 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9329 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 9330 | $as_echo "yes" >&6; } |
Ronald Oussoren | 99aab65 | 2009-06-08 21:22:57 +0000 | [diff] [blame] | 9331 | if test $enable_shared = "yes" |
| 9332 | then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 9333 | as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5 |
Ronald Oussoren | 99aab65 | 2009-06-08 21:22:57 +0000 | [diff] [blame] | 9334 | fi |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9335 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9336 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9337 | $as_echo "no" >&6; } |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9338 | fi |
| 9339 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9340 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5 |
| 9341 | $as_echo_n "checking for dyld... " >&6; } |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 9342 | case $ac_sys_system/$ac_sys_release in |
| 9343 | Darwin/*) |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9344 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9345 | $as_echo "#define WITH_DYLD 1" >>confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9346 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9347 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5 |
| 9348 | $as_echo "always on for Darwin" >&6; } |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 9349 | ;; |
| 9350 | *) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9351 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9352 | $as_echo "no" >&6; } |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 9353 | ;; |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 9354 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9355 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9356 | # Set info about shared libraries. |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9357 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 9358 | |
| 9359 | |
| 9360 | |
| 9361 | |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9362 | |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 9363 | |
doko@ubuntu.com | d5537d0 | 2013-03-21 13:21:49 -0700 | [diff] [blame] | 9364 | # SHLIB_SUFFIX is the extension of shared libraries `(including the dot!) |
| 9365 | # -- usually .so, .sl on HP-UX, .dll on Cygwin |
| 9366 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5 |
| 9367 | $as_echo_n "checking the extension of shared libraries... " >&6; } |
| 9368 | if test -z "$SHLIB_SUFFIX"; then |
| 9369 | case $ac_sys_system in |
| 9370 | hp*|HP*) |
| 9371 | case `uname -m` in |
| 9372 | ia64) SHLIB_SUFFIX=.so;; |
| 9373 | *) SHLIB_SUFFIX=.sl;; |
| 9374 | esac |
| 9375 | ;; |
| 9376 | CYGWIN*) SHLIB_SUFFIX=.dll;; |
| 9377 | *) SHLIB_SUFFIX=.so;; |
| 9378 | esac |
| 9379 | fi |
| 9380 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5 |
| 9381 | $as_echo "$SHLIB_SUFFIX" >&6; } |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 9382 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9383 | # LDSHARED is the ld *command* used to create shared library |
Benjamin Peterson | 0693063 | 2017-09-04 16:36:05 -0700 | [diff] [blame] | 9384 | # -- "cc -G" on SunOS 5.x. |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9385 | # (Shared libraries in this instance are shared modules to be loaded into |
| 9386 | # Python, as opposed to building Python itself as a shared library.) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9387 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5 |
| 9388 | $as_echo_n "checking LDSHARED... " >&6; } |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9389 | if test -z "$LDSHARED" |
| 9390 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 9391 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 9392 | AIX*) |
Martin Panter | 395733d | 2016-11-20 07:56:37 +0000 | [diff] [blame] | 9393 | BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp" |
Martin Panter | 5de141f | 2016-08-27 04:00:19 +0000 | [diff] [blame] | 9394 | LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 9395 | ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9396 | SunOS/5*) |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9397 | if test "$GCC" = "yes" ; then |
| 9398 | LDSHARED='$(CC) -shared' |
| 9399 | LDCXXSHARED='$(CXX) -shared' |
| 9400 | else |
| 9401 | LDSHARED='$(CC) -G' |
| 9402 | LDCXXSHARED='$(CXX) -G' |
Greg Ward | 57c9a663 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 9403 | fi ;; |
Thomas Heller | f44b9a1 | 2008-04-04 10:18:23 +0000 | [diff] [blame] | 9404 | hp*|HP*) |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9405 | if test "$GCC" = "yes" ; then |
| 9406 | LDSHARED='$(CC) -shared' |
| 9407 | LDCXXSHARED='$(CXX) -shared' |
| 9408 | else |
Rob Boehne | 9d25bd1 | 2017-12-06 11:58:17 -0600 | [diff] [blame] | 9409 | LDSHARED='$(CC) -b' |
Benjamin Peterson | 62ed6be | 2017-12-21 21:43:09 -0800 | [diff] [blame] | 9410 | LDCXXSHARED='$(CXX) -b' |
Thomas Heller | f44b9a1 | 2008-04-04 10:18:23 +0000 | [diff] [blame] | 9411 | fi ;; |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 9412 | Darwin/1.3*) |
Antoine Pitrou | d4958c2 | 2010-10-13 17:01:10 +0000 | [diff] [blame] | 9413 | LDSHARED='$(CC) -bundle' |
| 9414 | LDCXXSHARED='$(CXX) -bundle' |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 9415 | if test "$enable_framework" ; then |
| 9416 | # Link against the framework. All externals should be defined. |
Jack Jansen | da49e19 | 2005-01-07 13:08:22 +0000 | [diff] [blame] | 9417 | BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
| 9418 | LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9419 | LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 9420 | else |
| 9421 | # No framework. Ignore undefined symbols, assuming they come from Python |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 9422 | LDSHARED="$LDSHARED -undefined suppress" |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9423 | LDCXXSHARED="$LDCXXSHARED -undefined suppress" |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 9424 | fi ;; |
Jack Jansen | 6b08a40 | 2004-06-03 12:41:45 +0000 | [diff] [blame] | 9425 | Darwin/1.4*|Darwin/5.*|Darwin/6.*) |
Antoine Pitrou | d4958c2 | 2010-10-13 17:01:10 +0000 | [diff] [blame] | 9426 | LDSHARED='$(CC) -bundle' |
| 9427 | LDCXXSHARED='$(CXX) -bundle' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 9428 | if test "$enable_framework" ; then |
| 9429 | # Link against the framework. All externals should be defined. |
Jack Jansen | da49e19 | 2005-01-07 13:08:22 +0000 | [diff] [blame] | 9430 | BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
| 9431 | LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9432 | LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 9433 | else |
Michael W. Hudson | 594bc80 | 2002-03-07 09:59:15 +0000 | [diff] [blame] | 9434 | # No framework, use the Python app as bundle-loader |
| 9435 | BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)' |
Jack Jansen | c28fc37 | 2003-02-25 13:14:43 +0000 | [diff] [blame] | 9436 | LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)' |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9437 | LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)' |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9438 | fi ;; |
Jack Jansen | 6b08a40 | 2004-06-03 12:41:45 +0000 | [diff] [blame] | 9439 | Darwin/*) |
| 9440 | # Use -undefined dynamic_lookup whenever possible (10.3 and later). |
| 9441 | # This allows an extension to be used in any Python |
Thomas Wouters | 89d996e | 2007-09-08 17:39:28 +0000 | [diff] [blame] | 9442 | |
Ned Deily | 36820b6 | 2014-06-25 13:44:22 -0700 | [diff] [blame] | 9443 | dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \ |
| 9444 | sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'` |
| 9445 | dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \ |
| 9446 | sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'` |
| 9447 | if test ${dep_target_major} -eq 10 && \ |
| 9448 | test ${dep_target_minor} -le 2 |
Jack Jansen | 6b08a40 | 2004-06-03 12:41:45 +0000 | [diff] [blame] | 9449 | then |
Ned Deily | 36820b6 | 2014-06-25 13:44:22 -0700 | [diff] [blame] | 9450 | # building for OS X 10.0 through 10.2 |
Antoine Pitrou | d4958c2 | 2010-10-13 17:01:10 +0000 | [diff] [blame] | 9451 | LDSHARED='$(CC) -bundle' |
| 9452 | LDCXXSHARED='$(CXX) -bundle' |
Jack Jansen | 6b08a40 | 2004-06-03 12:41:45 +0000 | [diff] [blame] | 9453 | if test "$enable_framework" ; then |
| 9454 | # Link against the framework. All externals should be defined. |
Jack Jansen | da49e19 | 2005-01-07 13:08:22 +0000 | [diff] [blame] | 9455 | BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
| 9456 | LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9457 | LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
Jack Jansen | 6b08a40 | 2004-06-03 12:41:45 +0000 | [diff] [blame] | 9458 | else |
| 9459 | # No framework, use the Python app as bundle-loader |
| 9460 | BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)' |
| 9461 | LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)' |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9462 | LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)' |
Jack Jansen | 6b08a40 | 2004-06-03 12:41:45 +0000 | [diff] [blame] | 9463 | fi |
Ned Deily | 36820b6 | 2014-06-25 13:44:22 -0700 | [diff] [blame] | 9464 | else |
| 9465 | # building for OS X 10.3 and later |
| 9466 | LDSHARED='$(CC) -bundle -undefined dynamic_lookup' |
| 9467 | LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup' |
| 9468 | BLDSHARED="$LDSHARED" |
Jack Jansen | 6b08a40 | 2004-06-03 12:41:45 +0000 | [diff] [blame] | 9469 | fi |
| 9470 | ;; |
pxinwr | 32f5fdd | 2019-02-27 19:09:28 +0800 | [diff] [blame] | 9471 | Linux*|GNU*|QNX*|VxWorks*) |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9472 | LDSHARED='$(CC) -shared' |
| 9473 | LDCXXSHARED='$(CXX) -shared';; |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 9474 | FreeBSD*) |
Jeremy Hylton | 4bcc7c5 | 2000-08-31 17:45:35 +0000 | [diff] [blame] | 9475 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 9476 | then |
Antoine Pitrou | d4958c2 | 2010-10-13 17:01:10 +0000 | [diff] [blame] | 9477 | LDSHARED='$(CC) -shared' |
| 9478 | LDCXXSHARED='$(CXX) -shared' |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 9479 | else |
Antoine Pitrou | d4958c2 | 2010-10-13 17:01:10 +0000 | [diff] [blame] | 9480 | LDSHARED="ld -Bshareable" |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 9481 | fi;; |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 9482 | OpenBSD*) |
| 9483 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 9484 | then |
Antoine Pitrou | d4958c2 | 2010-10-13 17:01:10 +0000 | [diff] [blame] | 9485 | LDSHARED='$(CC) -shared $(CCSHARED)' |
| 9486 | LDCXXSHARED='$(CXX) -shared $(CCSHARED)' |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 9487 | else |
| 9488 | case `uname -r` in |
| 9489 | [01].* | 2.[0-7] | 2.[0-7].*) |
| 9490 | LDSHARED="ld -Bshareable ${LDFLAGS}" |
| 9491 | ;; |
| 9492 | *) |
Antoine Pitrou | d4958c2 | 2010-10-13 17:01:10 +0000 | [diff] [blame] | 9493 | LDSHARED='$(CC) -shared $(CCSHARED)' |
| 9494 | LDCXXSHARED='$(CXX) -shared $(CCSHARED)' |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 9495 | ;; |
| 9496 | esac |
| 9497 | fi;; |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9498 | NetBSD*|DragonFly*) |
Antoine Pitrou | ece919e | 2011-01-02 20:45:21 +0000 | [diff] [blame] | 9499 | LDSHARED='$(CC) -shared' |
| 9500 | LDCXXSHARED='$(CXX) -shared';; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 9501 | OpenUNIX*|UnixWare*) |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9502 | if test "$GCC" = "yes" ; then |
| 9503 | LDSHARED='$(CC) -shared' |
| 9504 | LDCXXSHARED='$(CXX) -shared' |
| 9505 | else |
| 9506 | LDSHARED='$(CC) -G' |
| 9507 | LDCXXSHARED='$(CXX) -G' |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 9508 | fi;; |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9509 | SCO_SV*) |
| 9510 | LDSHARED='$(CC) -Wl,-G,-Bexport' |
| 9511 | LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';; |
| 9512 | CYGWIN*) |
| 9513 | LDSHARED="gcc -shared -Wl,--enable-auto-image-base" |
| 9514 | LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9515 | *) LDSHARED="ld";; |
| 9516 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9517 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9518 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5 |
| 9519 | $as_echo "$LDSHARED" >&6; } |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9520 | LDCXXSHARED=${LDCXXSHARED-$LDSHARED} |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 9521 | BLDSHARED=${BLDSHARED-$LDSHARED} |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9522 | # CCSHARED are the C *flags* used to create objects to go into a shared |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9523 | # library (module) -- this is only needed for a few systems |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9524 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5 |
| 9525 | $as_echo_n "checking CCSHARED... " >&6; } |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9526 | if test -z "$CCSHARED" |
| 9527 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 9528 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 9529 | SunOS*) if test "$GCC" = yes; |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 9530 | then CCSHARED="-fPIC"; |
| 9531 | elif test `uname -p` = sparc; |
| 9532 | then CCSHARED="-xcode=pic32"; |
| 9533 | else CCSHARED="-Kpic"; |
| 9534 | fi;; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 9535 | hp*|HP*) if test "$GCC" = yes; |
Martin v. Löwis | 703ad70 | 2001-09-05 08:36:52 +0000 | [diff] [blame] | 9536 | then CCSHARED="-fPIC"; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 9537 | else CCSHARED="+z"; |
| 9538 | fi;; |
Xavier de Gaye | 2a352b6 | 2017-01-04 21:51:16 +0100 | [diff] [blame] | 9539 | Linux-android*) ;; |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 9540 | Linux*|GNU*) CCSHARED="-fPIC";; |
Martin v. Löwis | 86d6626 | 2006-02-17 08:40:11 +0000 | [diff] [blame] | 9541 | FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 9542 | OpenUNIX*|UnixWare*) |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 9543 | if test "$GCC" = "yes" |
| 9544 | then CCSHARED="-fPIC" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 9545 | else CCSHARED="-KPIC" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 9546 | fi;; |
Martin v. Löwis | 21ee409 | 2002-09-30 16:19:48 +0000 | [diff] [blame] | 9547 | SCO_SV*) |
| 9548 | if test "$GCC" = "yes" |
| 9549 | then CCSHARED="-fPIC" |
| 9550 | else CCSHARED="-Kpic -belf" |
| 9551 | fi;; |
pxinwr | 32f5fdd | 2019-02-27 19:09:28 +0800 | [diff] [blame] | 9552 | VxWorks*) |
| 9553 | CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic" |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9554 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9555 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9556 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5 |
| 9557 | $as_echo "$CCSHARED" >&6; } |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9558 | # LINKFORSHARED are the flags passed to the $(CC) command that links |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 9559 | # the python executable -- this is only needed for a few systems |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9560 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5 |
| 9561 | $as_echo_n "checking LINKFORSHARED... " >&6; } |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9562 | if test -z "$LINKFORSHARED" |
| 9563 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 9564 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 9565 | AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';; |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 9566 | hp*|HP*) |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 9567 | LINKFORSHARED="-Wl,-E -Wl,+s";; |
| 9568 | # LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |
Xavier de Gaye | 2a352b6 | 2017-01-04 21:51:16 +0100 | [diff] [blame] | 9569 | Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 9570 | Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9571 | # -u libsys_s pulls in all symbols in libsys |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9572 | Darwin/*) |
Benjamin Peterson | 9c80cac | 2009-05-23 16:34:23 +0000 | [diff] [blame] | 9573 | LINKFORSHARED="$extra_undefs -framework CoreFoundation" |
Ned Deily | 5bbbc73 | 2019-07-02 03:12:18 -0400 | [diff] [blame] | 9574 | |
| 9575 | # Issue #18075: the default maximum stack size (8MBytes) is too |
| 9576 | # small for the default recursion limit. Increase the stack size |
| 9577 | # to ensure that tests don't crash |
Ronald Oussoren | 1a057ba | 2019-08-01 07:43:07 +0200 | [diff] [blame] | 9578 | # Note: This matches the value of THREAD_STACK_SIZE in |
| 9579 | # thread_pthread.h |
Ned Deily | 5bbbc73 | 2019-07-02 03:12:18 -0400 | [diff] [blame] | 9580 | LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED" |
| 9581 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 9582 | if test "$enable_framework" |
| 9583 | then |
Jack Jansen | da49e19 | 2005-01-07 13:08:22 +0000 | [diff] [blame] | 9584 | LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 9585 | fi |
Anthony Baxter | eef2d3b | 2004-11-06 04:45:33 +0000 | [diff] [blame] | 9586 | LINKFORSHARED="$LINKFORSHARED";; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 9587 | OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";; |
Martin v. Löwis | 21ee409 | 2002-09-30 16:19:48 +0000 | [diff] [blame] | 9588 | SCO_SV*) LINKFORSHARED="-Wl,-Bexport";; |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 9589 | ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; |
Martin v. Löwis | 86d6626 | 2006-02-17 08:40:11 +0000 | [diff] [blame] | 9590 | FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 9591 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 9592 | then |
| 9593 | LINKFORSHARED="-Wl,--export-dynamic" |
| 9594 | fi;; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 9595 | SunOS/5*) case $CC in |
| 9596 | *gcc*) |
Martin v. Löwis | a454857 | 2002-04-18 14:51:36 +0000 | [diff] [blame] | 9597 | if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null |
Guido van Rossum | 8f4ceb1 | 1997-12-18 23:42:19 +0000 | [diff] [blame] | 9598 | then |
| 9599 | LINKFORSHARED="-Xlinker --export-dynamic" |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 9600 | fi;; |
| 9601 | esac;; |
Jason Tishler | 3076559 | 2003-09-04 11:04:06 +0000 | [diff] [blame] | 9602 | CYGWIN*) |
| 9603 | if test $enable_shared = "no" |
| 9604 | then |
| 9605 | LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)' |
| 9606 | fi;; |
Benjamin Peterson | de9c869 | 2008-07-01 18:23:09 +0000 | [diff] [blame] | 9607 | QNX*) |
| 9608 | # -Wl,-E causes the symbols to be added to the dynamic |
| 9609 | # symbol table so that they can be found when a module |
| 9610 | # is loaded. -N 2048K causes the stack size to be set |
| 9611 | # to 2048 kilobytes so that the stack doesn't overflow |
| 9612 | # when running test_compile.py. |
| 9613 | LINKFORSHARED='-Wl,-E -N 2048K';; |
pxinwr | 32f5fdd | 2019-02-27 19:09:28 +0800 | [diff] [blame] | 9614 | VxWorks*) |
| 9615 | LINKFORSHARED='--export-dynamic';; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9616 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9617 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9618 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5 |
| 9619 | $as_echo "$LINKFORSHARED" >&6; } |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9620 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 9621 | |
Benjamin Peterson | 8f95cc2 | 2008-07-16 02:23:25 +0000 | [diff] [blame] | 9622 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9623 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5 |
| 9624 | $as_echo_n "checking CFLAGSFORSHARED... " >&6; } |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 9625 | if test ! "$LIBRARY" = "$LDLIBRARY" |
| 9626 | then |
Neil Schemenauer | 0c6141f | 2001-01-27 21:40:54 +0000 | [diff] [blame] | 9627 | case $ac_sys_system in |
| 9628 | CYGWIN*) |
| 9629 | # Cygwin needs CCSHARED when building extension DLLs |
| 9630 | # but not when building the interpreter DLL. |
| 9631 | CFLAGSFORSHARED='';; |
| 9632 | *) |
| 9633 | CFLAGSFORSHARED='$(CCSHARED)' |
| 9634 | esac |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 9635 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9636 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5 |
| 9637 | $as_echo "$CFLAGSFORSHARED" >&6; } |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 9638 | |
Martin v. Löwis | f90ae20 | 2002-06-11 06:22:31 +0000 | [diff] [blame] | 9639 | # SHLIBS are libraries (except -lc and -lm) to link to the python shared |
| 9640 | # library (with --enable-shared). |
| 9641 | # For platforms on which shared libraries are not allowed to have unresolved |
Martin v. Löwis | d6359c5 | 2002-08-04 12:38:50 +0000 | [diff] [blame] | 9642 | # symbols, this must be set to $(LIBS) (expanded by make). We do this even |
| 9643 | # if it is not required, since it creates a dependency of the shared library |
| 9644 | # to LIBS. This, in turn, means that applications linking the shared libpython |
| 9645 | # don't need to link LIBS explicitly. The default should be only changed |
| 9646 | # on systems where this approach causes problems. |
Martin v. Löwis | f90ae20 | 2002-06-11 06:22:31 +0000 | [diff] [blame] | 9647 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9648 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5 |
| 9649 | $as_echo_n "checking SHLIBS... " >&6; } |
Martin v. Löwis | f90ae20 | 2002-06-11 06:22:31 +0000 | [diff] [blame] | 9650 | case "$ac_sys_system" in |
Martin v. Löwis | f90ae20 | 2002-06-11 06:22:31 +0000 | [diff] [blame] | 9651 | *) |
Martin v. Löwis | d6359c5 | 2002-08-04 12:38:50 +0000 | [diff] [blame] | 9652 | SHLIBS='$(LIBS)';; |
Martin v. Löwis | f90ae20 | 2002-06-11 06:22:31 +0000 | [diff] [blame] | 9653 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9654 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5 |
| 9655 | $as_echo "$SHLIBS" >&6; } |
Martin v. Löwis | f90ae20 | 2002-06-11 06:22:31 +0000 | [diff] [blame] | 9656 | |
| 9657 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 9658 | # checks for libraries |
Georg Brandl | 941f956 | 2011-02-25 15:21:47 +0000 | [diff] [blame] | 9659 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5 |
| 9660 | $as_echo_n "checking for sendfile in -lsendfile... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9661 | if ${ac_cv_lib_sendfile_sendfile+:} false; then : |
Georg Brandl | 941f956 | 2011-02-25 15:21:47 +0000 | [diff] [blame] | 9662 | $as_echo_n "(cached) " >&6 |
| 9663 | else |
| 9664 | ac_check_lib_save_LIBS=$LIBS |
| 9665 | LIBS="-lsendfile $LIBS" |
| 9666 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9667 | /* end confdefs.h. */ |
| 9668 | |
| 9669 | /* Override any GCC internal prototype to avoid an error. |
| 9670 | Use char because int might match the return type of a GCC |
| 9671 | builtin and then its argument prototype would still apply. */ |
| 9672 | #ifdef __cplusplus |
| 9673 | extern "C" |
| 9674 | #endif |
| 9675 | char sendfile (); |
| 9676 | int |
| 9677 | main () |
| 9678 | { |
| 9679 | return sendfile (); |
| 9680 | ; |
| 9681 | return 0; |
| 9682 | } |
| 9683 | _ACEOF |
| 9684 | if ac_fn_c_try_link "$LINENO"; then : |
| 9685 | ac_cv_lib_sendfile_sendfile=yes |
| 9686 | else |
| 9687 | ac_cv_lib_sendfile_sendfile=no |
| 9688 | fi |
| 9689 | rm -f core conftest.err conftest.$ac_objext \ |
| 9690 | conftest$ac_exeext conftest.$ac_ext |
| 9691 | LIBS=$ac_check_lib_save_LIBS |
| 9692 | fi |
| 9693 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5 |
| 9694 | $as_echo "$ac_cv_lib_sendfile_sendfile" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9695 | if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then : |
Georg Brandl | 941f956 | 2011-02-25 15:21:47 +0000 | [diff] [blame] | 9696 | cat >>confdefs.h <<_ACEOF |
| 9697 | #define HAVE_LIBSENDFILE 1 |
| 9698 | _ACEOF |
| 9699 | |
| 9700 | LIBS="-lsendfile $LIBS" |
| 9701 | |
| 9702 | fi |
| 9703 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9704 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 |
| 9705 | $as_echo_n "checking for dlopen in -ldl... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9706 | if ${ac_cv_lib_dl_dlopen+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9707 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 9708 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9709 | ac_check_lib_save_LIBS=$LIBS |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 9710 | LIBS="-ldl $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9711 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 9712 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9713 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9714 | /* Override any GCC internal prototype to avoid an error. |
| 9715 | Use char because int might match the return type of a GCC |
| 9716 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9717 | #ifdef __cplusplus |
| 9718 | extern "C" |
| 9719 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9720 | char dlopen (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9721 | int |
| 9722 | main () |
| 9723 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9724 | return dlopen (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9725 | ; |
| 9726 | return 0; |
| 9727 | } |
| 9728 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9729 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9730 | ac_cv_lib_dl_dlopen=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 9731 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9732 | ac_cv_lib_dl_dlopen=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 9733 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9734 | rm -f core conftest.err conftest.$ac_objext \ |
| 9735 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9736 | LIBS=$ac_check_lib_save_LIBS |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 9737 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9738 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
| 9739 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9740 | if test "x$ac_cv_lib_dl_dlopen" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9741 | cat >>confdefs.h <<_ACEOF |
| 9742 | #define HAVE_LIBDL 1 |
| 9743 | _ACEOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 9744 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 9745 | LIBS="-ldl $LIBS" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 9746 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 9747 | fi |
| 9748 | # Dynamic linking for SunOS/Solaris and SYSV |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9749 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 |
| 9750 | $as_echo_n "checking for shl_load in -ldld... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9751 | if ${ac_cv_lib_dld_shl_load+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9752 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 9753 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9754 | ac_check_lib_save_LIBS=$LIBS |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 9755 | LIBS="-ldld $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9756 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 9757 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9758 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9759 | /* Override any GCC internal prototype to avoid an error. |
| 9760 | Use char because int might match the return type of a GCC |
| 9761 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9762 | #ifdef __cplusplus |
| 9763 | extern "C" |
| 9764 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9765 | char shl_load (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9766 | int |
| 9767 | main () |
| 9768 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9769 | return shl_load (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9770 | ; |
| 9771 | return 0; |
| 9772 | } |
| 9773 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9774 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9775 | ac_cv_lib_dld_shl_load=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 9776 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9777 | ac_cv_lib_dld_shl_load=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 9778 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9779 | rm -f core conftest.err conftest.$ac_objext \ |
| 9780 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9781 | LIBS=$ac_check_lib_save_LIBS |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 9782 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9783 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 |
| 9784 | $as_echo "$ac_cv_lib_dld_shl_load" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9785 | if test "x$ac_cv_lib_dld_shl_load" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9786 | cat >>confdefs.h <<_ACEOF |
| 9787 | #define HAVE_LIBDLD 1 |
| 9788 | _ACEOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 9789 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 9790 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 9791 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 9792 | fi |
| 9793 | # Dynamic linking for HP-UX |
Martin v. Löwis | 519adae | 2003-09-20 10:47:47 +0000 | [diff] [blame] | 9794 | |
Michael Felt | 0d3ccb4 | 2017-12-30 22:39:20 +0100 | [diff] [blame] | 9795 | # checks for uuid.h location |
| 9796 | for ac_header in uuid/uuid.h uuid.h |
| 9797 | do : |
| 9798 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| 9799 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" |
| 9800 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
| 9801 | cat >>confdefs.h <<_ACEOF |
| 9802 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
| 9803 | _ACEOF |
| 9804 | |
| 9805 | fi |
| 9806 | |
| 9807 | done |
| 9808 | |
| 9809 | |
Berker Peksag | 9a10ff4 | 2017-11-08 23:09:16 +0300 | [diff] [blame] | 9810 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate_time_safe" >&5 |
| 9811 | $as_echo_n "checking for uuid_generate_time_safe... " >&6; } |
| 9812 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9813 | /* end confdefs.h. */ |
| 9814 | #include <uuid/uuid.h> |
| 9815 | int |
| 9816 | main () |
| 9817 | { |
| 9818 | |
| 9819 | #ifndef uuid_generate_time_safe |
Berker Peksag | 0e163d2 | 2017-11-09 00:43:14 +0300 | [diff] [blame] | 9820 | void *x = uuid_generate_time_safe |
Berker Peksag | 9a10ff4 | 2017-11-08 23:09:16 +0300 | [diff] [blame] | 9821 | #endif |
| 9822 | |
| 9823 | ; |
| 9824 | return 0; |
| 9825 | } |
| 9826 | _ACEOF |
| 9827 | if ac_fn_c_try_compile "$LINENO"; then : |
| 9828 | |
| 9829 | $as_echo "#define HAVE_UUID_GENERATE_TIME_SAFE 1" >>confdefs.h |
| 9830 | |
| 9831 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 9832 | $as_echo "yes" >&6; } |
| 9833 | else |
| 9834 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9835 | $as_echo "no" >&6; } |
| 9836 | |
| 9837 | fi |
| 9838 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9839 | |
Michael Felt | 0d3ccb4 | 2017-12-30 22:39:20 +0100 | [diff] [blame] | 9840 | # AIX provides support for RFC4122 (uuid) in libc.a starting with AIX 6.1 (anno 2007) |
David Carlier | b4ebaa7 | 2018-01-09 19:38:07 +0000 | [diff] [blame] | 9841 | # FreeBSD and OpenBSD provides support as well |
| 9842 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create" >&5 |
| 9843 | $as_echo_n "checking for uuid_create... " >&6; } |
Michael Felt | 0d3ccb4 | 2017-12-30 22:39:20 +0100 | [diff] [blame] | 9844 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9845 | /* end confdefs.h. */ |
| 9846 | #include <uuid.h> |
| 9847 | int |
| 9848 | main () |
| 9849 | { |
| 9850 | |
| 9851 | #ifndef uuid_create |
| 9852 | void *x = uuid_create |
| 9853 | #endif |
| 9854 | |
| 9855 | ; |
| 9856 | return 0; |
| 9857 | } |
| 9858 | _ACEOF |
| 9859 | if ac_fn_c_try_compile "$LINENO"; then : |
| 9860 | |
| 9861 | $as_echo "#define HAVE_UUID_CREATE 1" >>confdefs.h |
| 9862 | |
| 9863 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 9864 | $as_echo "yes" >&6; } |
| 9865 | else |
| 9866 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9867 | $as_echo "no" >&6; } |
| 9868 | |
| 9869 | fi |
| 9870 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9871 | |
Serhiy Storchaka | 17d8830 | 2018-05-25 01:45:09 +0300 | [diff] [blame] | 9872 | # Little-endian FreeBSD, OpenBSD and NetBSD needs encoding into an octet |
| 9873 | # stream in big-endian byte-order |
| 9874 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_enc_be" >&5 |
| 9875 | $as_echo_n "checking for uuid_enc_be... " >&6; } |
| 9876 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9877 | /* end confdefs.h. */ |
| 9878 | #include <uuid.h> |
| 9879 | int |
| 9880 | main () |
| 9881 | { |
| 9882 | |
| 9883 | #ifndef uuid_enc_be |
Ned Deily | ced0adb | 2018-06-09 18:19:57 -0400 | [diff] [blame] | 9884 | void *x = uuid_enc_be |
Serhiy Storchaka | 17d8830 | 2018-05-25 01:45:09 +0300 | [diff] [blame] | 9885 | #endif |
| 9886 | |
| 9887 | ; |
| 9888 | return 0; |
| 9889 | } |
| 9890 | _ACEOF |
| 9891 | if ac_fn_c_try_compile "$LINENO"; then : |
| 9892 | |
| 9893 | $as_echo "#define HAVE_UUID_ENC_BE 1" >>confdefs.h |
| 9894 | |
| 9895 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 9896 | $as_echo "yes" >&6; } |
| 9897 | else |
| 9898 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9899 | $as_echo "no" >&6; } |
| 9900 | |
| 9901 | fi |
| 9902 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9903 | |
Serhiy Storchaka | 9e78dc2 | 2017-11-11 19:18:28 +0200 | [diff] [blame] | 9904 | # 'Real Time' functions on Solaris |
| 9905 | # posix4 on Solaris 2.6 |
| 9906 | # pthread (first!) on Linux |
Berker Peksag | 7e666ee | 2017-11-06 19:06:05 +0300 | [diff] [blame] | 9907 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9908 | $as_echo_n "checking for library containing sem_init... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9909 | if ${ac_cv_search_sem_init+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9910 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 41933dd | 2002-03-21 15:10:58 +0000 | [diff] [blame] | 9911 | else |
Martin v. Löwis | 82c19a7 | 2002-10-06 11:48:09 +0000 | [diff] [blame] | 9912 | ac_func_search_save_LIBS=$LIBS |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9913 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 9914 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9915 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9916 | /* Override any GCC internal prototype to avoid an error. |
| 9917 | Use char because int might match the return type of a GCC |
| 9918 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9919 | #ifdef __cplusplus |
| 9920 | extern "C" |
| 9921 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9922 | char sem_init (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9923 | int |
| 9924 | main () |
| 9925 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9926 | return sem_init (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9927 | ; |
| 9928 | return 0; |
| 9929 | } |
| 9930 | _ACEOF |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9931 | for ac_lib in '' pthread rt posix4; do |
| 9932 | if test -z "$ac_lib"; then |
| 9933 | ac_res="none required" |
| 9934 | else |
| 9935 | ac_res=-l$ac_lib |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 9936 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9937 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9938 | if ac_fn_c_try_link "$LINENO"; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9939 | ac_cv_search_sem_init=$ac_res |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 9940 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9941 | rm -f core conftest.err conftest.$ac_objext \ |
| 9942 | conftest$ac_exeext |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9943 | if ${ac_cv_search_sem_init+:} false; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9944 | break |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 9945 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9946 | done |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9947 | if ${ac_cv_search_sem_init+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9948 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9949 | else |
| 9950 | ac_cv_search_sem_init=no |
| 9951 | fi |
| 9952 | rm conftest.$ac_ext |
Martin v. Löwis | 82c19a7 | 2002-10-06 11:48:09 +0000 | [diff] [blame] | 9953 | LIBS=$ac_func_search_save_LIBS |
| 9954 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9955 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5 |
| 9956 | $as_echo "$ac_cv_search_sem_init" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9957 | ac_res=$ac_cv_search_sem_init |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9958 | if test "$ac_res" != no; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9959 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
Martin v. Löwis | 41933dd | 2002-03-21 15:10:58 +0000 | [diff] [blame] | 9960 | |
Martin v. Löwis | 41933dd | 2002-03-21 15:10:58 +0000 | [diff] [blame] | 9961 | fi |
Serhiy Storchaka | 9e78dc2 | 2017-11-11 19:18:28 +0200 | [diff] [blame] | 9962 | |
Martin v. Löwis | 519adae | 2003-09-20 10:47:47 +0000 | [diff] [blame] | 9963 | |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9964 | # check if we need libintl for locale functions |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9965 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5 |
| 9966 | $as_echo_n "checking for textdomain in -lintl... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9967 | if ${ac_cv_lib_intl_textdomain+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9968 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9969 | else |
| 9970 | ac_check_lib_save_LIBS=$LIBS |
| 9971 | LIBS="-lintl $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9972 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 9973 | /* end confdefs.h. */ |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9974 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9975 | /* Override any GCC internal prototype to avoid an error. |
| 9976 | Use char because int might match the return type of a GCC |
| 9977 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9978 | #ifdef __cplusplus |
| 9979 | extern "C" |
| 9980 | #endif |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9981 | char textdomain (); |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9982 | int |
| 9983 | main () |
| 9984 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9985 | return textdomain (); |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9986 | ; |
| 9987 | return 0; |
| 9988 | } |
| 9989 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9990 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9991 | ac_cv_lib_intl_textdomain=yes |
| 9992 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9993 | ac_cv_lib_intl_textdomain=no |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9994 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9995 | rm -f core conftest.err conftest.$ac_objext \ |
| 9996 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9997 | LIBS=$ac_check_lib_save_LIBS |
| 9998 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9999 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5 |
| 10000 | $as_echo "$ac_cv_lib_intl_textdomain" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10001 | if test "x$ac_cv_lib_intl_textdomain" = xyes; then : |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 10002 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10003 | $as_echo "#define WITH_LIBINTL 1" >>confdefs.h |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 10004 | |
Brett Cannon | c6d936e | 2009-06-07 20:09:53 +0000 | [diff] [blame] | 10005 | LIBS="-lintl $LIBS" |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 10006 | fi |
| 10007 | |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 10008 | |
| 10009 | # checks for system dependent C++ extensions support |
| 10010 | case "$ac_sys_system" in |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10011 | AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5 |
| 10012 | $as_echo_n "checking for genuine AIX C++ extensions support... " >&6; } |
| 10013 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10014 | /* end confdefs.h. */ |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 10015 | |
Georg Brandl | 59e87bd | 2011-02-15 19:48:59 +0000 | [diff] [blame] | 10016 | #include <load.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10017 | int |
| 10018 | main () |
| 10019 | { |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 10020 | loadAndInit("", 0, "") |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10021 | ; |
| 10022 | return 0; |
| 10023 | } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 10024 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10025 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10026 | if ac_fn_c_try_link "$LINENO"; then : |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 10027 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 10028 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10029 | $as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10030 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 10031 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10032 | $as_echo "yes" >&6; } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 10033 | |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 10034 | else |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 10035 | |
| 10036 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10037 | $as_echo "no" >&6; } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 10038 | |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 10039 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10040 | rm -f core conftest.err conftest.$ac_objext \ |
Michael Felt | 39afa2d | 2019-12-15 15:17:53 +0100 | [diff] [blame] | 10041 | conftest$ac_exeext conftest.$ac_ext |
| 10042 | # BUILD_GNU_TYPE + AIX_BUILDDATE are used to construct the platform_tag |
| 10043 | # of the AIX system used to build/package Python executable. This tag serves |
| 10044 | # as a baseline for bdist module packages |
| 10045 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the system builddate" >&5 |
| 10046 | $as_echo_n "checking for the system builddate... " >&6; } |
| 10047 | AIX_BUILDDATE=$(lslpp -Lcq bos.mp64 | awk -F: '{ print $NF }') |
| 10048 | |
| 10049 | cat >>confdefs.h <<_ACEOF |
| 10050 | #define AIX_BUILDDATE $AIX_BUILDDATE |
| 10051 | _ACEOF |
| 10052 | |
| 10053 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AIX_BUILDDATE" >&5 |
| 10054 | $as_echo "$AIX_BUILDDATE" >&6; } |
| 10055 | ;; |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 10056 | *) ;; |
| 10057 | esac |
| 10058 | |
Christian Heimes | 985ecdc | 2013-11-20 11:46:18 +0100 | [diff] [blame] | 10059 | # check for systems that require aligned memory access |
| 10060 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5 |
| 10061 | $as_echo_n "checking aligned memory access is required... " >&6; } |
Benjamin Peterson | e4f961b | 2017-04-14 09:36:45 -0700 | [diff] [blame] | 10062 | if ${ac_cv_aligned_required+:} false; then : |
| 10063 | $as_echo_n "(cached) " >&6 |
| 10064 | else |
| 10065 | if test "$cross_compiling" = yes; then : |
| 10066 | ac_cv_aligned_required=yes |
Christian Heimes | 985ecdc | 2013-11-20 11:46:18 +0100 | [diff] [blame] | 10067 | else |
| 10068 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 10069 | /* end confdefs.h. */ |
| 10070 | |
| 10071 | int main() |
| 10072 | { |
| 10073 | char s[16]; |
| 10074 | int i, *p1, *p2; |
| 10075 | for (i=0; i < 16; i++) |
| 10076 | s[i] = i; |
| 10077 | p1 = (int*)(s+1); |
| 10078 | p2 = (int*)(s+2); |
| 10079 | if (*p1 == *p2) |
| 10080 | return 1; |
| 10081 | return 0; |
| 10082 | } |
Christian Heimes | 985ecdc | 2013-11-20 11:46:18 +0100 | [diff] [blame] | 10083 | _ACEOF |
| 10084 | if ac_fn_c_try_run "$LINENO"; then : |
Benjamin Peterson | e4f961b | 2017-04-14 09:36:45 -0700 | [diff] [blame] | 10085 | ac_cv_aligned_required=no |
Christian Heimes | 985ecdc | 2013-11-20 11:46:18 +0100 | [diff] [blame] | 10086 | else |
Benjamin Peterson | e4f961b | 2017-04-14 09:36:45 -0700 | [diff] [blame] | 10087 | ac_cv_aligned_required=yes |
Christian Heimes | 985ecdc | 2013-11-20 11:46:18 +0100 | [diff] [blame] | 10088 | fi |
| 10089 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 10090 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 10091 | fi |
| 10092 | |
| 10093 | |
Benjamin Peterson | e4f961b | 2017-04-14 09:36:45 -0700 | [diff] [blame] | 10094 | fi |
| 10095 | |
| 10096 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5 |
| 10097 | $as_echo "$ac_cv_aligned_required" >&6; } |
| 10098 | if test "$ac_cv_aligned_required" = yes ; then |
Christian Heimes | 985ecdc | 2013-11-20 11:46:18 +0100 | [diff] [blame] | 10099 | |
| 10100 | $as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h |
| 10101 | |
| 10102 | fi |
Christian Heimes | 985ecdc | 2013-11-20 11:46:18 +0100 | [diff] [blame] | 10103 | |
| 10104 | # str, bytes and memoryview hash algorithm |
| 10105 | |
| 10106 | |
| 10107 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5 |
| 10108 | $as_echo_n "checking for --with-hash-algorithm... " >&6; } |
| 10109 | |
| 10110 | # Check whether --with-hash_algorithm was given. |
| 10111 | if test "${with_hash_algorithm+set}" = set; then : |
| 10112 | withval=$with_hash_algorithm; |
| 10113 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 |
| 10114 | $as_echo "$withval" >&6; } |
| 10115 | case "$withval" in |
| 10116 | siphash24) |
| 10117 | $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h |
| 10118 | |
| 10119 | ;; |
| 10120 | fnv) |
| 10121 | $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h |
| 10122 | |
| 10123 | ;; |
| 10124 | *) |
| 10125 | as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5 |
| 10126 | ;; |
| 10127 | esac |
| 10128 | |
| 10129 | else |
| 10130 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5 |
| 10131 | $as_echo "default" >&6; } |
| 10132 | fi |
| 10133 | |
| 10134 | |
Charles-François Natali | d30b022 | 2014-05-08 23:08:51 +0100 | [diff] [blame] | 10135 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5 |
| 10136 | $as_echo_n "checking for --with-address-sanitizer... " >&6; } |
| 10137 | |
| 10138 | # Check whether --with-address_sanitizer was given. |
| 10139 | if test "${with_address_sanitizer+set}" = set; then : |
| 10140 | withval=$with_address_sanitizer; |
| 10141 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 |
| 10142 | $as_echo "$withval" >&6; } |
| 10143 | BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS" |
| 10144 | LDFLAGS="-fsanitize=address $LDFLAGS" |
Gregory P. Smith | 1584a00 | 2018-11-12 12:07:14 -0800 | [diff] [blame] | 10145 | # ASan works by controlling memory allocation, our own malloc interferes. |
| 10146 | with_pymalloc="no" |
| 10147 | |
| 10148 | else |
| 10149 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 10150 | $as_echo "no" >&6; } |
| 10151 | fi |
| 10152 | |
| 10153 | |
| 10154 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-memory-sanitizer" >&5 |
| 10155 | $as_echo_n "checking for --with-memory-sanitizer... " >&6; } |
| 10156 | |
| 10157 | # Check whether --with-memory_sanitizer was given. |
| 10158 | if test "${with_memory_sanitizer+set}" = set; then : |
| 10159 | withval=$with_memory_sanitizer; |
| 10160 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 |
| 10161 | $as_echo "$withval" >&6; } |
| 10162 | BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS" |
| 10163 | LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS" |
| 10164 | # MSan works by controlling memory allocation, our own malloc interferes. |
| 10165 | with_pymalloc="no" |
| 10166 | |
| 10167 | else |
| 10168 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 10169 | $as_echo "no" >&6; } |
| 10170 | fi |
| 10171 | |
| 10172 | |
| 10173 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-undefined-behavior-sanitizer" >&5 |
| 10174 | $as_echo_n "checking for --with-undefined-behavior-sanitizer... " >&6; } |
| 10175 | |
| 10176 | # Check whether --with-undefined_behavior_sanitizer was given. |
| 10177 | if test "${with_undefined_behavior_sanitizer+set}" = set; then : |
| 10178 | withval=$with_undefined_behavior_sanitizer; |
| 10179 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 |
| 10180 | $as_echo "$withval" >&6; } |
| 10181 | BASECFLAGS="-fsanitize=undefined $BASECFLAGS" |
| 10182 | LDFLAGS="-fsanitize=undefined $LDFLAGS" |
Charles-François Natali | d30b022 | 2014-05-08 23:08:51 +0100 | [diff] [blame] | 10183 | |
| 10184 | else |
| 10185 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 10186 | $as_echo "no" >&6; } |
| 10187 | fi |
| 10188 | |
| 10189 | |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 10190 | # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10191 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5 |
| 10192 | $as_echo_n "checking for t_open in -lnsl... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10193 | if ${ac_cv_lib_nsl_t_open+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10194 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 10195 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10196 | ac_check_lib_save_LIBS=$LIBS |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 10197 | LIBS="-lnsl $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10198 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10199 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10200 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10201 | /* Override any GCC internal prototype to avoid an error. |
| 10202 | Use char because int might match the return type of a GCC |
| 10203 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10204 | #ifdef __cplusplus |
| 10205 | extern "C" |
| 10206 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10207 | char t_open (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10208 | int |
| 10209 | main () |
| 10210 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10211 | return t_open (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10212 | ; |
| 10213 | return 0; |
| 10214 | } |
| 10215 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10216 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10217 | ac_cv_lib_nsl_t_open=yes |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 10218 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10219 | ac_cv_lib_nsl_t_open=no |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 10220 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10221 | rm -f core conftest.err conftest.$ac_objext \ |
| 10222 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10223 | LIBS=$ac_check_lib_save_LIBS |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 10224 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10225 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5 |
| 10226 | $as_echo "$ac_cv_lib_nsl_t_open" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10227 | if test "x$ac_cv_lib_nsl_t_open" = xyes; then : |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 10228 | LIBS="-lnsl $LIBS" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 10229 | fi |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 10230 | # SVR4 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10231 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 |
| 10232 | $as_echo_n "checking for socket in -lsocket... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10233 | if ${ac_cv_lib_socket_socket+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10234 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 10235 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10236 | ac_check_lib_save_LIBS=$LIBS |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 10237 | LIBS="-lsocket $LIBS $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10238 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10239 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10240 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10241 | /* Override any GCC internal prototype to avoid an error. |
| 10242 | Use char because int might match the return type of a GCC |
| 10243 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10244 | #ifdef __cplusplus |
| 10245 | extern "C" |
| 10246 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10247 | char socket (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10248 | int |
| 10249 | main () |
| 10250 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10251 | return socket (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10252 | ; |
| 10253 | return 0; |
| 10254 | } |
| 10255 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10256 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10257 | ac_cv_lib_socket_socket=yes |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 10258 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10259 | ac_cv_lib_socket_socket=no |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 10260 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10261 | rm -f core conftest.err conftest.$ac_objext \ |
| 10262 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10263 | LIBS=$ac_check_lib_save_LIBS |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 10264 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10265 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 |
| 10266 | $as_echo "$ac_cv_lib_socket_socket" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10267 | if test "x$ac_cv_lib_socket_socket" = xyes; then : |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 10268 | LIBS="-lsocket $LIBS" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 10269 | fi |
| 10270 | # SVR4 sockets |
Skip Montanaro | b9949db | 2004-01-17 04:04:13 +0000 | [diff] [blame] | 10271 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10272 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5 |
| 10273 | $as_echo_n "checking for --with-libs... " >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10274 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10275 | # Check whether --with-libs was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10276 | if test "${with_libs+set}" = set; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10277 | withval=$with_libs; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10278 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 |
| 10279 | $as_echo "$withval" >&6; } |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 10280 | LIBS="$withval $LIBS" |
| 10281 | |
| 10282 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10283 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 10284 | $as_echo "no" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10285 | fi |
| 10286 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 10287 | |
Chih-Hsuan Yen | 03c0d2e | 2018-05-24 14:37:08 +0800 | [diff] [blame] | 10288 | |
| 10289 | |
| 10290 | |
| 10291 | |
| 10292 | |
| 10293 | |
Victor Stinner | b477d19 | 2020-01-22 22:48:16 +0100 | [diff] [blame^] | 10294 | |
Chih-Hsuan Yen | 03c0d2e | 2018-05-24 14:37:08 +0800 | [diff] [blame] | 10295 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then |
| 10296 | if test -n "$ac_tool_prefix"; then |
| 10297 | # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. |
| 10298 | set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 |
| 10299 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 10300 | $as_echo_n "checking for $ac_word... " >&6; } |
| 10301 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
| 10302 | $as_echo_n "(cached) " >&6 |
| 10303 | else |
| 10304 | case $PKG_CONFIG in |
| 10305 | [\\/]* | ?:[\\/]*) |
| 10306 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. |
| 10307 | ;; |
| 10308 | *) |
| 10309 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 10310 | for as_dir in $PATH |
| 10311 | do |
| 10312 | IFS=$as_save_IFS |
| 10313 | test -z "$as_dir" && as_dir=. |
| 10314 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 10315 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 10316 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" |
| 10317 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 10318 | break 2 |
| 10319 | fi |
| 10320 | done |
| 10321 | done |
| 10322 | IFS=$as_save_IFS |
| 10323 | |
| 10324 | ;; |
| 10325 | esac |
| 10326 | fi |
| 10327 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG |
| 10328 | if test -n "$PKG_CONFIG"; then |
| 10329 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 |
| 10330 | $as_echo "$PKG_CONFIG" >&6; } |
| 10331 | else |
| 10332 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 10333 | $as_echo "no" >&6; } |
| 10334 | fi |
| 10335 | |
| 10336 | |
| 10337 | fi |
| 10338 | if test -z "$ac_cv_path_PKG_CONFIG"; then |
| 10339 | ac_pt_PKG_CONFIG=$PKG_CONFIG |
| 10340 | # Extract the first word of "pkg-config", so it can be a program name with args. |
| 10341 | set dummy pkg-config; ac_word=$2 |
| 10342 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 10343 | $as_echo_n "checking for $ac_word... " >&6; } |
| 10344 | if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : |
| 10345 | $as_echo_n "(cached) " >&6 |
| 10346 | else |
| 10347 | case $ac_pt_PKG_CONFIG in |
| 10348 | [\\/]* | ?:[\\/]*) |
| 10349 | ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. |
| 10350 | ;; |
| 10351 | *) |
| 10352 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 10353 | for as_dir in $PATH |
| 10354 | do |
| 10355 | IFS=$as_save_IFS |
| 10356 | test -z "$as_dir" && as_dir=. |
| 10357 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 10358 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 10359 | ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" |
| 10360 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 10361 | break 2 |
| 10362 | fi |
| 10363 | done |
| 10364 | done |
| 10365 | IFS=$as_save_IFS |
| 10366 | |
| 10367 | ;; |
| 10368 | esac |
| 10369 | fi |
| 10370 | ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG |
| 10371 | if test -n "$ac_pt_PKG_CONFIG"; then |
| 10372 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 |
| 10373 | $as_echo "$ac_pt_PKG_CONFIG" >&6; } |
| 10374 | else |
| 10375 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 10376 | $as_echo "no" >&6; } |
| 10377 | fi |
| 10378 | |
| 10379 | if test "x$ac_pt_PKG_CONFIG" = x; then |
| 10380 | PKG_CONFIG="" |
| 10381 | else |
| 10382 | case $cross_compiling:$ac_tool_warned in |
| 10383 | yes:) |
| 10384 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 10385 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 10386 | ac_tool_warned=yes ;; |
| 10387 | esac |
| 10388 | PKG_CONFIG=$ac_pt_PKG_CONFIG |
| 10389 | fi |
| 10390 | else |
| 10391 | PKG_CONFIG="$ac_cv_path_PKG_CONFIG" |
| 10392 | fi |
| 10393 | |
| 10394 | fi |
| 10395 | if test -n "$PKG_CONFIG"; then |
| 10396 | _pkg_min_version=0.9.0 |
| 10397 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 |
| 10398 | $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } |
| 10399 | if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then |
| 10400 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 10401 | $as_echo "yes" >&6; } |
| 10402 | else |
| 10403 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 10404 | $as_echo "no" >&6; } |
| 10405 | PKG_CONFIG="" |
| 10406 | fi |
| 10407 | fi |
Benjamin Peterson | 0f64b0b | 2010-03-09 21:49:52 +0000 | [diff] [blame] | 10408 | |
| 10409 | # Check for use of the system expat library |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10410 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5 |
| 10411 | $as_echo_n "checking for --with-system-expat... " >&6; } |
Benjamin Peterson | 0f64b0b | 2010-03-09 21:49:52 +0000 | [diff] [blame] | 10412 | |
| 10413 | # Check whether --with-system_expat was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10414 | if test "${with_system_expat+set}" = set; then : |
Benjamin Peterson | 0f64b0b | 2010-03-09 21:49:52 +0000 | [diff] [blame] | 10415 | withval=$with_system_expat; |
Benjamin Peterson | 7926325 | 2010-10-31 16:50:44 +0000 | [diff] [blame] | 10416 | else |
| 10417 | with_system_expat="no" |
Benjamin Peterson | 0f64b0b | 2010-03-09 21:49:52 +0000 | [diff] [blame] | 10418 | fi |
| 10419 | |
| 10420 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10421 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5 |
| 10422 | $as_echo "$with_system_expat" >&6; } |
Benjamin Peterson | 0f64b0b | 2010-03-09 21:49:52 +0000 | [diff] [blame] | 10423 | |
| 10424 | # Check for use of the system libffi library |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10425 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5 |
| 10426 | $as_echo_n "checking for --with-system-ffi... " >&6; } |
Benjamin Peterson | 0f64b0b | 2010-03-09 21:49:52 +0000 | [diff] [blame] | 10427 | |
| 10428 | # Check whether --with-system_ffi was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10429 | if test "${with_system_ffi+set}" = set; then : |
Benjamin Peterson | 0f64b0b | 2010-03-09 21:49:52 +0000 | [diff] [blame] | 10430 | withval=$with_system_ffi; |
| 10431 | fi |
| 10432 | |
| 10433 | |
Zachary Ware | f40d4dd | 2016-09-17 01:25:24 -0500 | [diff] [blame] | 10434 | if test "$ac_sys_system" = "Darwin" |
| 10435 | then |
| 10436 | case "$with_system_ffi" in |
| 10437 | "") |
| 10438 | with_system_ffi="no" |
| 10439 | ;; |
| 10440 | yes|no) |
| 10441 | ;; |
| 10442 | *) |
| 10443 | as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5 |
| 10444 | ;; |
| 10445 | esac |
| 10446 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5 |
| 10447 | $as_echo "$with_system_ffi" >&6; } |
| 10448 | else |
| 10449 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 10450 | $as_echo "yes" >&6; } |
| 10451 | if test "$with_system_ffi" != "" |
| 10452 | then |
| 10453 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5 |
| 10454 | $as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;} |
| 10455 | fi |
| 10456 | with_system_ffi="yes" |
| 10457 | fi |
Zachary Ware | 935043d | 2016-09-09 17:01:21 -0700 | [diff] [blame] | 10458 | |
Benjamin Peterson | 0f64b0b | 2010-03-09 21:49:52 +0000 | [diff] [blame] | 10459 | if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then |
Benjamin Peterson | d78735d | 2010-01-01 16:04:23 +0000 | [diff] [blame] | 10460 | LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`" |
| 10461 | else |
| 10462 | LIBFFI_INCLUDEDIR="" |
| 10463 | fi |
| 10464 | |
| 10465 | |
Stefan Krah | 60187b5 | 2012-03-23 19:06:27 +0100 | [diff] [blame] | 10466 | # Check for use of the system libmpdec library |
| 10467 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5 |
| 10468 | $as_echo_n "checking for --with-system-libmpdec... " >&6; } |
| 10469 | |
| 10470 | # Check whether --with-system_libmpdec was given. |
| 10471 | if test "${with_system_libmpdec+set}" = set; then : |
| 10472 | withval=$with_system_libmpdec; |
| 10473 | else |
| 10474 | with_system_libmpdec="no" |
| 10475 | fi |
| 10476 | |
| 10477 | |
| 10478 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5 |
| 10479 | $as_echo "$with_system_libmpdec" >&6; } |
| 10480 | |
Benjamin Peterson | 076ed00 | 2010-10-31 17:11:02 +0000 | [diff] [blame] | 10481 | # Check for support for loadable sqlite extensions |
| 10482 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5 |
| 10483 | $as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; } |
| 10484 | # Check whether --enable-loadable-sqlite-extensions was given. |
| 10485 | if test "${enable_loadable_sqlite_extensions+set}" = set; then : |
| 10486 | enableval=$enable_loadable_sqlite_extensions; |
| 10487 | else |
| 10488 | enable_loadable_sqlite_extensions="no" |
| 10489 | fi |
| 10490 | |
| 10491 | |
| 10492 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5 |
| 10493 | $as_echo "$enable_loadable_sqlite_extensions" >&6; } |
| 10494 | |
Ned Deily | d819b93 | 2013-09-06 01:07:05 -0700 | [diff] [blame] | 10495 | # Check for --with-tcltk-includes=path and --with-tcltk-libs=path |
| 10496 | |
| 10497 | |
| 10498 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5 |
| 10499 | $as_echo_n "checking for --with-tcltk-includes... " >&6; } |
| 10500 | |
| 10501 | # Check whether --with-tcltk-includes was given. |
| 10502 | if test "${with_tcltk_includes+set}" = set; then : |
| 10503 | withval=$with_tcltk_includes; |
| 10504 | else |
| 10505 | with_tcltk_includes="default" |
| 10506 | fi |
| 10507 | |
| 10508 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5 |
| 10509 | $as_echo "$with_tcltk_includes" >&6; } |
| 10510 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5 |
| 10511 | $as_echo_n "checking for --with-tcltk-libs... " >&6; } |
| 10512 | |
| 10513 | # Check whether --with-tcltk-libs was given. |
| 10514 | if test "${with_tcltk_libs+set}" = set; then : |
| 10515 | withval=$with_tcltk_libs; |
| 10516 | else |
| 10517 | with_tcltk_libs="default" |
| 10518 | fi |
| 10519 | |
| 10520 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5 |
| 10521 | $as_echo "$with_tcltk_libs" >&6; } |
| 10522 | if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault |
| 10523 | then |
| 10524 | if test "x$with_tcltk_includes" != "x$with_tcltk_libs" |
| 10525 | then |
| 10526 | as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5 |
| 10527 | fi |
| 10528 | TCLTK_INCLUDES="" |
| 10529 | TCLTK_LIBS="" |
| 10530 | else |
| 10531 | TCLTK_INCLUDES="$with_tcltk_includes" |
| 10532 | TCLTK_LIBS="$with_tcltk_libs" |
| 10533 | fi |
| 10534 | |
Matthias Klose | 55708cc | 2009-04-30 08:06:49 +0000 | [diff] [blame] | 10535 | # Check for --with-dbmliborder |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10536 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5 |
| 10537 | $as_echo_n "checking for --with-dbmliborder... " >&6; } |
Matthias Klose | 55708cc | 2009-04-30 08:06:49 +0000 | [diff] [blame] | 10538 | |
| 10539 | # Check whether --with-dbmliborder was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10540 | if test "${with_dbmliborder+set}" = set; then : |
Matthias Klose | 55708cc | 2009-04-30 08:06:49 +0000 | [diff] [blame] | 10541 | withval=$with_dbmliborder; |
| 10542 | if test x$with_dbmliborder = xyes |
| 10543 | then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 10544 | as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5 |
Matthias Klose | 55708cc | 2009-04-30 08:06:49 +0000 | [diff] [blame] | 10545 | else |
| 10546 | for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do |
| 10547 | if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb |
| 10548 | then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 10549 | as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5 |
Matthias Klose | 55708cc | 2009-04-30 08:06:49 +0000 | [diff] [blame] | 10550 | fi |
| 10551 | done |
| 10552 | fi |
| 10553 | fi |
| 10554 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10555 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5 |
| 10556 | $as_echo "$with_dbmliborder" >&6; } |
Matthias Klose | 55708cc | 2009-04-30 08:06:49 +0000 | [diff] [blame] | 10557 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10558 | # Templates for things AC_DEFINEd more than once. |
| 10559 | # For a single AC_DEFINE, no template is needed. |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 10560 | |
| 10561 | |
Antoine Pitrou | a6a4dc8 | 2017-09-07 18:56:24 +0200 | [diff] [blame] | 10562 | if test "$ac_cv_pthread_is_default" = yes |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 10563 | then |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 10564 | # Defining _REENTRANT on system with POSIX threads should not hurt. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10565 | $as_echo "#define _REENTRANT 1" >>confdefs.h |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 10566 | |
| 10567 | posix_threads=yes |
Jesús Cea | 52d1b86 | 2019-09-28 03:44:32 +0200 | [diff] [blame] | 10568 | if test "$ac_sys_system" = "SunOS"; then |
| 10569 | CFLAGS="$CFLAGS -D_REENTRANT" |
| 10570 | fi |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 10571 | elif test "$ac_cv_kpthread" = "yes" |
| 10572 | then |
| 10573 | CC="$CC -Kpthread" |
Martin v. Löwis | 519adae | 2003-09-20 10:47:47 +0000 | [diff] [blame] | 10574 | if test "$ac_cv_cxx_thread" = "yes"; then |
| 10575 | CXX="$CXX -Kpthread" |
| 10576 | fi |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 10577 | posix_threads=yes |
Martin v. Löwis | 5f433f0 | 2003-05-05 05:05:30 +0000 | [diff] [blame] | 10578 | elif test "$ac_cv_kthread" = "yes" |
| 10579 | then |
| 10580 | CC="$CC -Kthread" |
Martin v. Löwis | 519adae | 2003-09-20 10:47:47 +0000 | [diff] [blame] | 10581 | if test "$ac_cv_cxx_thread" = "yes"; then |
| 10582 | CXX="$CXX -Kthread" |
| 10583 | fi |
Martin v. Löwis | 5f433f0 | 2003-05-05 05:05:30 +0000 | [diff] [blame] | 10584 | posix_threads=yes |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10585 | elif test "$ac_cv_pthread" = "yes" |
| 10586 | then |
| 10587 | CC="$CC -pthread" |
Martin v. Löwis | 519adae | 2003-09-20 10:47:47 +0000 | [diff] [blame] | 10588 | if test "$ac_cv_cxx_thread" = "yes"; then |
| 10589 | CXX="$CXX -pthread" |
| 10590 | fi |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10591 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 10592 | else |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 10593 | if test ! -z "$withval" -a -d "$withval" |
| 10594 | then LDFLAGS="$LDFLAGS -L$withval" |
| 10595 | fi |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 10596 | |
| 10597 | # According to the POSIX spec, a pthreads implementation must |
Matthias Klose | a2542be | 2004-08-16 11:35:51 +0000 | [diff] [blame] | 10598 | # define _POSIX_THREADS in unistd.h. Some apparently don't |
| 10599 | # (e.g. gnu pth with pthread emulation) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10600 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5 |
| 10601 | $as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; } |
| 10602 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10603 | /* end confdefs.h. */ |
Neal Norwitz | 6eb37f0 | 2003-02-23 23:28:15 +0000 | [diff] [blame] | 10604 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 10605 | #include <unistd.h> |
Neal Norwitz | 6eb37f0 | 2003-02-23 23:28:15 +0000 | [diff] [blame] | 10606 | #ifdef _POSIX_THREADS |
| 10607 | yes |
| 10608 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10609 | |
| 10610 | _ACEOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 10611 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10612 | $EGREP "yes" >/dev/null 2>&1; then : |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 10613 | unistd_defines_pthreads=yes |
| 10614 | else |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 10615 | unistd_defines_pthreads=no |
| 10616 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 10617 | rm -f conftest* |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 10618 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10619 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5 |
| 10620 | $as_echo "$unistd_defines_pthreads" >&6; } |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 10621 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10622 | $as_echo "#define _REENTRANT 1" >>confdefs.h |
Guido van Rossum | 9caf77a | 1996-08-01 00:52:26 +0000 | [diff] [blame] | 10623 | |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 10624 | # Just looking for pthread_create in libpthread is not enough: |
| 10625 | # on HP/UX, pthread.h renames pthread_create to a different symbol name. |
| 10626 | # So we really have to include pthread.h, and then link. |
| 10627 | _libs=$LIBS |
| 10628 | LIBS="$LIBS -lpthread" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10629 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 |
| 10630 | $as_echo_n "checking for pthread_create in -lpthread... " >&6; } |
| 10631 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10632 | /* end confdefs.h. */ |
Stefan Krah | 7dba594 | 2012-11-22 22:49:11 +0100 | [diff] [blame] | 10633 | |
| 10634 | #include <stdio.h> |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 10635 | #include <pthread.h> |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 10636 | |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 10637 | void * start_routine (void *arg) { exit (0); } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10638 | int |
| 10639 | main () |
| 10640 | { |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 10641 | |
| 10642 | pthread_create (NULL, NULL, start_routine, NULL) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10643 | ; |
| 10644 | return 0; |
| 10645 | } |
| 10646 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10647 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10648 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10649 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 10650 | $as_echo "yes" >&6; } |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 10651 | posix_threads=yes |
Antoine Pitrou | a6a4dc8 | 2017-09-07 18:56:24 +0200 | [diff] [blame] | 10652 | |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 10653 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10654 | |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 10655 | LIBS=$_libs |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10656 | ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10657 | if test "x$ac_cv_func_pthread_detach" = xyes; then : |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 10658 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 10659 | posix_threads=yes |
Antoine Pitrou | a6a4dc8 | 2017-09-07 18:56:24 +0200 | [diff] [blame] | 10660 | |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 10661 | else |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 10662 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10663 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5 |
| 10664 | $as_echo_n "checking for pthread_create in -lpthreads... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10665 | if ${ac_cv_lib_pthreads_pthread_create+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10666 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 10667 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10668 | ac_check_lib_save_LIBS=$LIBS |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 10669 | LIBS="-lpthreads $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10670 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10671 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10672 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10673 | /* Override any GCC internal prototype to avoid an error. |
| 10674 | Use char because int might match the return type of a GCC |
| 10675 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10676 | #ifdef __cplusplus |
| 10677 | extern "C" |
| 10678 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10679 | char pthread_create (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10680 | int |
| 10681 | main () |
| 10682 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10683 | return pthread_create (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10684 | ; |
| 10685 | return 0; |
| 10686 | } |
| 10687 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10688 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10689 | ac_cv_lib_pthreads_pthread_create=yes |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 10690 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10691 | ac_cv_lib_pthreads_pthread_create=no |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 10692 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10693 | rm -f core conftest.err conftest.$ac_objext \ |
| 10694 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10695 | LIBS=$ac_check_lib_save_LIBS |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 10696 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10697 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5 |
| 10698 | $as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10699 | if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then : |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 10700 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 10701 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 10702 | LIBS="$LIBS -lpthreads" |
Antoine Pitrou | a6a4dc8 | 2017-09-07 18:56:24 +0200 | [diff] [blame] | 10703 | |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 10704 | else |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 10705 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10706 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5 |
| 10707 | $as_echo_n "checking for pthread_create in -lc_r... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10708 | if ${ac_cv_lib_c_r_pthread_create+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10709 | $as_echo_n "(cached) " >&6 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 10710 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10711 | ac_check_lib_save_LIBS=$LIBS |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 10712 | LIBS="-lc_r $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10713 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10714 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10715 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10716 | /* Override any GCC internal prototype to avoid an error. |
| 10717 | Use char because int might match the return type of a GCC |
| 10718 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10719 | #ifdef __cplusplus |
| 10720 | extern "C" |
| 10721 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10722 | char pthread_create (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10723 | int |
| 10724 | main () |
| 10725 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10726 | return pthread_create (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10727 | ; |
| 10728 | return 0; |
| 10729 | } |
| 10730 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10731 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10732 | ac_cv_lib_c_r_pthread_create=yes |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 10733 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10734 | ac_cv_lib_c_r_pthread_create=no |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 10735 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10736 | rm -f core conftest.err conftest.$ac_objext \ |
| 10737 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10738 | LIBS=$ac_check_lib_save_LIBS |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 10739 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10740 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5 |
| 10741 | $as_echo "$ac_cv_lib_c_r_pthread_create" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10742 | if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then : |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 10743 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 10744 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 10745 | LIBS="$LIBS -lc_r" |
Antoine Pitrou | a6a4dc8 | 2017-09-07 18:56:24 +0200 | [diff] [blame] | 10746 | |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 10747 | else |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 10748 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10749 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5 |
| 10750 | $as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10751 | if ${ac_cv_lib_pthread___pthread_create_system+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10752 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 10753 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10754 | ac_check_lib_save_LIBS=$LIBS |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 10755 | LIBS="-lpthread $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10756 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10757 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10758 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10759 | /* Override any GCC internal prototype to avoid an error. |
| 10760 | Use char because int might match the return type of a GCC |
| 10761 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10762 | #ifdef __cplusplus |
| 10763 | extern "C" |
| 10764 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10765 | char __pthread_create_system (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10766 | int |
| 10767 | main () |
| 10768 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10769 | return __pthread_create_system (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10770 | ; |
| 10771 | return 0; |
| 10772 | } |
| 10773 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10774 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10775 | ac_cv_lib_pthread___pthread_create_system=yes |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 10776 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10777 | ac_cv_lib_pthread___pthread_create_system=no |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 10778 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10779 | rm -f core conftest.err conftest.$ac_objext \ |
| 10780 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10781 | LIBS=$ac_check_lib_save_LIBS |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 10782 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10783 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5 |
| 10784 | $as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10785 | if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then : |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 10786 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 10787 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 10788 | LIBS="$LIBS -lpthread" |
Antoine Pitrou | a6a4dc8 | 2017-09-07 18:56:24 +0200 | [diff] [blame] | 10789 | |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 10790 | else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 10791 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10792 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5 |
| 10793 | $as_echo_n "checking for pthread_create in -lcma... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10794 | if ${ac_cv_lib_cma_pthread_create+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10795 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 10796 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10797 | ac_check_lib_save_LIBS=$LIBS |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 10798 | LIBS="-lcma $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10799 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10800 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10801 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10802 | /* Override any GCC internal prototype to avoid an error. |
| 10803 | Use char because int might match the return type of a GCC |
| 10804 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10805 | #ifdef __cplusplus |
| 10806 | extern "C" |
| 10807 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10808 | char pthread_create (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10809 | int |
| 10810 | main () |
| 10811 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10812 | return pthread_create (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10813 | ; |
| 10814 | return 0; |
| 10815 | } |
| 10816 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10817 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10818 | ac_cv_lib_cma_pthread_create=yes |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 10819 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10820 | ac_cv_lib_cma_pthread_create=no |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 10821 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10822 | rm -f core conftest.err conftest.$ac_objext \ |
| 10823 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10824 | LIBS=$ac_check_lib_save_LIBS |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 10825 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10826 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5 |
| 10827 | $as_echo "$ac_cv_lib_cma_pthread_create" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10828 | if test "x$ac_cv_lib_cma_pthread_create" = xyes; then : |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 10829 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 10830 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 10831 | LIBS="$LIBS -lcma" |
Antoine Pitrou | a6a4dc8 | 2017-09-07 18:56:24 +0200 | [diff] [blame] | 10832 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 10833 | else |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 10834 | |
Antoine Pitrou | a6a4dc8 | 2017-09-07 18:56:24 +0200 | [diff] [blame] | 10835 | as_fn_error $? "could not find pthreads on your system" "$LINENO" 5 |
| 10836 | |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 10837 | fi |
| 10838 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 10839 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 10840 | fi |
| 10841 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 10842 | fi |
| 10843 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 10844 | fi |
| 10845 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 10846 | fi |
| 10847 | |
Martin v. Löwis | f90ae20 | 2002-06-11 06:22:31 +0000 | [diff] [blame] | 10848 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10849 | rm -f core conftest.err conftest.$ac_objext \ |
| 10850 | conftest$ac_exeext conftest.$ac_ext |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 10851 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10852 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5 |
| 10853 | $as_echo_n "checking for usconfig in -lmpc... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10854 | if ${ac_cv_lib_mpc_usconfig+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10855 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 10856 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10857 | ac_check_lib_save_LIBS=$LIBS |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 10858 | LIBS="-lmpc $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10859 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10860 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10861 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10862 | /* Override any GCC internal prototype to avoid an error. |
| 10863 | Use char because int might match the return type of a GCC |
| 10864 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10865 | #ifdef __cplusplus |
| 10866 | extern "C" |
| 10867 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10868 | char usconfig (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10869 | int |
| 10870 | main () |
| 10871 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10872 | return usconfig (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10873 | ; |
| 10874 | return 0; |
| 10875 | } |
| 10876 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10877 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10878 | ac_cv_lib_mpc_usconfig=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 10879 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10880 | ac_cv_lib_mpc_usconfig=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 10881 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10882 | rm -f core conftest.err conftest.$ac_objext \ |
| 10883 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10884 | LIBS=$ac_check_lib_save_LIBS |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 10885 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10886 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5 |
| 10887 | $as_echo "$ac_cv_lib_mpc_usconfig" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10888 | if test "x$ac_cv_lib_mpc_usconfig" = xyes; then : |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 10889 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 10890 | LIBS="$LIBS -lmpc" |
Antoine Pitrou | a6a4dc8 | 2017-09-07 18:56:24 +0200 | [diff] [blame] | 10891 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 10892 | fi |
| 10893 | |
Martin v. Löwis | 3d2b549 | 2002-03-15 13:48:21 +0000 | [diff] [blame] | 10894 | |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10895 | fi |
Martin v. Löwis | a7a76d3 | 2002-10-04 07:21:24 +0000 | [diff] [blame] | 10896 | |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10897 | if test "$posix_threads" = "yes"; then |
| 10898 | if test "$unistd_defines_pthreads" = "no"; then |
Martin v. Löwis | a7a76d3 | 2002-10-04 07:21:24 +0000 | [diff] [blame] | 10899 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10900 | $as_echo "#define _POSIX_THREADS 1" >>confdefs.h |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10901 | |
| 10902 | fi |
| 10903 | |
| 10904 | # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8. |
| 10905 | case $ac_sys_system/$ac_sys_release in |
Charles-François Natali | 996f606 | 2011-07-21 19:45:31 +0200 | [diff] [blame] | 10906 | SunOS/5.6) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10907 | $as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h |
Martin v. Löwis | a7a76d3 | 2002-10-04 07:21:24 +0000 | [diff] [blame] | 10908 | |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10909 | ;; |
| 10910 | SunOS/5.8) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10911 | $as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10912 | |
| 10913 | ;; |
Charles-François Natali | 996f606 | 2011-07-21 19:45:31 +0200 | [diff] [blame] | 10914 | AIX/*) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10915 | $as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h |
Christian Heimes | 7b3ce6a | 2008-01-31 14:31:45 +0000 | [diff] [blame] | 10916 | |
| 10917 | ;; |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10918 | esac |
| 10919 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10920 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 |
| 10921 | $as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10922 | if ${ac_cv_pthread_system_supported+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10923 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10924 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10925 | if test "$cross_compiling" = yes; then : |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10926 | ac_cv_pthread_system_supported=no |
| 10927 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10928 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10929 | /* end confdefs.h. */ |
Stefan Krah | 7dba594 | 2012-11-22 22:49:11 +0100 | [diff] [blame] | 10930 | |
| 10931 | #include <stdio.h> |
| 10932 | #include <pthread.h> |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10933 | void *foo(void *parm) { |
| 10934 | return NULL; |
| 10935 | } |
| 10936 | main() { |
| 10937 | pthread_attr_t attr; |
| 10938 | pthread_t id; |
| 10939 | if (pthread_attr_init(&attr)) exit(-1); |
| 10940 | if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1); |
| 10941 | if (pthread_create(&id, &attr, foo, NULL)) exit(-1); |
| 10942 | exit(0); |
| 10943 | } |
| 10944 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10945 | if ac_fn_c_try_run "$LINENO"; then : |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10946 | ac_cv_pthread_system_supported=yes |
| 10947 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10948 | ac_cv_pthread_system_supported=no |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10949 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10950 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 10951 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10952 | fi |
Martin v. Löwis | a7a76d3 | 2002-10-04 07:21:24 +0000 | [diff] [blame] | 10953 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10954 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 10955 | fi |
| 10956 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10957 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5 |
| 10958 | $as_echo "$ac_cv_pthread_system_supported" >&6; } |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10959 | if test "$ac_cv_pthread_system_supported" = "yes"; then |
| 10960 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10961 | $as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10962 | |
| 10963 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10964 | for ac_func in pthread_sigmask |
| 10965 | do : |
| 10966 | ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10967 | if test "x$ac_cv_func_pthread_sigmask" = xyes; then : |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10968 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10969 | #define HAVE_PTHREAD_SIGMASK 1 |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10970 | _ACEOF |
Jason Tishler | fac083d | 2003-07-22 15:20:49 +0000 | [diff] [blame] | 10971 | case $ac_sys_system in |
| 10972 | CYGWIN*) |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10973 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10974 | $as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h |
Jason Tishler | fac083d | 2003-07-22 15:20:49 +0000 | [diff] [blame] | 10975 | |
| 10976 | ;; |
| 10977 | esac |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10978 | fi |
| 10979 | done |
| 10980 | |
pdox | e14679c | 2017-10-05 00:01:56 -0700 | [diff] [blame] | 10981 | for ac_func in pthread_getcpuclockid |
| 10982 | do : |
| 10983 | ac_fn_c_check_func "$LINENO" "pthread_getcpuclockid" "ac_cv_func_pthread_getcpuclockid" |
| 10984 | if test "x$ac_cv_func_pthread_getcpuclockid" = xyes; then : |
| 10985 | cat >>confdefs.h <<_ACEOF |
| 10986 | #define HAVE_PTHREAD_GETCPUCLOCKID 1 |
| 10987 | _ACEOF |
| 10988 | |
| 10989 | fi |
| 10990 | done |
| 10991 | |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10992 | fi |
| 10993 | |
| 10994 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10995 | # Check for enable-ipv6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10996 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10997 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5 |
| 10998 | $as_echo_n "checking if --enable-ipv6 is specified... " >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10999 | # Check whether --enable-ipv6 was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11000 | if test "${enable_ipv6+set}" = set; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11001 | enableval=$enable_ipv6; case "$enableval" in |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11002 | no) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11003 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11004 | $as_echo "no" >&6; } |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11005 | ipv6=no |
| 11006 | ;; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11007 | *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 11008 | $as_echo "yes" >&6; } |
| 11009 | $as_echo "#define ENABLE_IPV6 1" >>confdefs.h |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11010 | |
| 11011 | ipv6=yes |
| 11012 | ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11013 | esac |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11014 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11015 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11016 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11017 | /* end confdefs.h. */ |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11018 | /* AF_INET6 available check */ |
| 11019 | #include <sys/types.h> |
| 11020 | #include <sys/socket.h> |
Charles-François Natali | f6fd794 | 2013-01-08 19:49:42 +0100 | [diff] [blame] | 11021 | int |
| 11022 | main () |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11023 | { |
Charles-François Natali | f6fd794 | 2013-01-08 19:49:42 +0100 | [diff] [blame] | 11024 | int domain = AF_INET6; |
| 11025 | ; |
| 11026 | return 0; |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11027 | } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11028 | _ACEOF |
Charles-François Natali | f6fd794 | 2013-01-08 19:49:42 +0100 | [diff] [blame] | 11029 | if ac_fn_c_try_compile "$LINENO"; then : |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11030 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11031 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 11032 | $as_echo "yes" >&6; } |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11033 | ipv6=yes |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11034 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11035 | else |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11036 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11037 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11038 | $as_echo "no" >&6; } |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11039 | ipv6=no |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11040 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11041 | fi |
Charles-François Natali | f6fd794 | 2013-01-08 19:49:42 +0100 | [diff] [blame] | 11042 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11043 | |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 11044 | if test "$ipv6" = "yes"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11045 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5 |
| 11046 | $as_echo_n "checking if RFC2553 API is available... " >&6; } |
| 11047 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11048 | /* end confdefs.h. */ |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11049 | |
| 11050 | #include <sys/types.h> |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 11051 | #include <netinet/in.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11052 | int |
| 11053 | main () |
| 11054 | { |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 11055 | struct sockaddr_in6 x; |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11056 | x.sin6_scope_id; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11057 | ; |
| 11058 | return 0; |
| 11059 | } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11060 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11061 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11062 | if ac_fn_c_try_compile "$LINENO"; then : |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11063 | |
| 11064 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11065 | $as_echo "yes" >&6; } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11066 | ipv6=yes |
| 11067 | |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 11068 | else |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11069 | |
| 11070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11071 | $as_echo "no" >&6; } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11072 | ipv6=no |
| 11073 | |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 11074 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11075 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 11076 | fi |
| 11077 | |
| 11078 | if test "$ipv6" = "yes"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11079 | $as_echo "#define ENABLE_IPV6 1" >>confdefs.h |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 11080 | |
| 11081 | fi |
| 11082 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11083 | fi |
| 11084 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11085 | |
| 11086 | ipv6type=unknown |
| 11087 | ipv6lib=none |
| 11088 | ipv6trylibc=no |
| 11089 | |
| 11090 | if test "$ipv6" = "yes"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11091 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5 |
| 11092 | $as_echo_n "checking ipv6 stack type... " >&6; } |
Guido van Rossum | b855216 | 2001-09-05 14:58:11 +0000 | [diff] [blame] | 11093 | for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; |
| 11094 | do |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11095 | case $i in |
| 11096 | inria) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11097 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11098 | /* end confdefs.h. */ |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 11099 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11100 | #include <netinet/in.h> |
| 11101 | #ifdef IPV6_INRIA_VERSION |
| 11102 | yes |
| 11103 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11104 | _ACEOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11105 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11106 | $EGREP "yes" >/dev/null 2>&1; then : |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 11107 | ipv6type=$i |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11108 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 11109 | rm -f conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11110 | |
| 11111 | ;; |
| 11112 | kame) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11113 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11114 | /* end confdefs.h. */ |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 11115 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11116 | #include <netinet/in.h> |
| 11117 | #ifdef __KAME__ |
| 11118 | yes |
| 11119 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11120 | _ACEOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11121 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11122 | $EGREP "yes" >/dev/null 2>&1; then : |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11123 | ipv6type=$i; |
| 11124 | ipv6lib=inet6 |
| 11125 | ipv6libdir=/usr/local/v6/lib |
| 11126 | ipv6trylibc=yes |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11127 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 11128 | rm -f conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11129 | |
| 11130 | ;; |
| 11131 | linux-glibc) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11132 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11133 | /* end confdefs.h. */ |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 11134 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11135 | #include <features.h> |
| 11136 | #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) |
| 11137 | yes |
| 11138 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11139 | _ACEOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11140 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11141 | $EGREP "yes" >/dev/null 2>&1; then : |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11142 | ipv6type=$i; |
| 11143 | ipv6trylibc=yes |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11144 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 11145 | rm -f conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11146 | |
| 11147 | ;; |
| 11148 | linux-inet6) |
| 11149 | if test -d /usr/inet6; then |
| 11150 | ipv6type=$i |
| 11151 | ipv6lib=inet6 |
| 11152 | ipv6libdir=/usr/inet6/lib |
Skip Montanaro | decc6a4 | 2003-01-01 20:07:49 +0000 | [diff] [blame] | 11153 | BASECFLAGS="-I/usr/inet6/include $BASECFLAGS" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11154 | fi |
| 11155 | ;; |
| 11156 | solaris) |
| 11157 | if test -f /etc/netconfig; then |
Antoine Pitrou | f3fcd9f | 2011-01-03 18:53:50 +0000 | [diff] [blame] | 11158 | if $GREP -q tcp6 /etc/netconfig; then |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11159 | ipv6type=$i |
| 11160 | ipv6trylibc=yes |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11161 | fi |
| 11162 | fi |
| 11163 | ;; |
| 11164 | toshiba) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11165 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11166 | /* end confdefs.h. */ |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 11167 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11168 | #include <sys/param.h> |
| 11169 | #ifdef _TOSHIBA_INET6 |
| 11170 | yes |
| 11171 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11172 | _ACEOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11173 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11174 | $EGREP "yes" >/dev/null 2>&1; then : |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11175 | ipv6type=$i; |
| 11176 | ipv6lib=inet6; |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 11177 | ipv6libdir=/usr/local/v6/lib |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11178 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 11179 | rm -f conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11180 | |
| 11181 | ;; |
| 11182 | v6d) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11183 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11184 | /* end confdefs.h. */ |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 11185 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11186 | #include </usr/local/v6/include/sys/v6config.h> |
| 11187 | #ifdef __V6D__ |
| 11188 | yes |
| 11189 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11190 | _ACEOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11191 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11192 | $EGREP "yes" >/dev/null 2>&1; then : |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11193 | ipv6type=$i; |
| 11194 | ipv6lib=v6; |
| 11195 | ipv6libdir=/usr/local/v6/lib; |
Skip Montanaro | decc6a4 | 2003-01-01 20:07:49 +0000 | [diff] [blame] | 11196 | BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11197 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 11198 | rm -f conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11199 | |
| 11200 | ;; |
| 11201 | zeta) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11202 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11203 | /* end confdefs.h. */ |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 11204 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11205 | #include <sys/param.h> |
| 11206 | #ifdef _ZETA_MINAMI_INET6 |
| 11207 | yes |
| 11208 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11209 | _ACEOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11210 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11211 | $EGREP "yes" >/dev/null 2>&1; then : |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11212 | ipv6type=$i; |
| 11213 | ipv6lib=inet6; |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 11214 | ipv6libdir=/usr/local/v6/lib |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11215 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 11216 | rm -f conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11217 | |
| 11218 | ;; |
| 11219 | esac |
| 11220 | if test "$ipv6type" != "unknown"; then |
| 11221 | break |
| 11222 | fi |
| 11223 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11224 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5 |
| 11225 | $as_echo "$ipv6type" >&6; } |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 11226 | fi |
| 11227 | |
| 11228 | if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then |
| 11229 | if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then |
| 11230 | LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" |
| 11231 | echo "using lib$ipv6lib" |
| 11232 | else |
| 11233 | if test $ipv6trylibc = "yes"; then |
| 11234 | echo "using libc" |
| 11235 | else |
| 11236 | echo 'Fatal: no $ipv6lib library found. cannot continue.' |
| 11237 | echo "You need to fetch lib$ipv6lib.a from appropriate" |
| 11238 | echo 'ipv6 kit and compile beforehand.' |
| 11239 | exit 1 |
| 11240 | fi |
| 11241 | fi |
| 11242 | fi |
| 11243 | |
Larry Hastings | a6cc551 | 2015-04-13 17:48:40 -0400 | [diff] [blame] | 11244 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5 |
| 11245 | $as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; } |
| 11246 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 11247 | /* end confdefs.h. */ |
| 11248 | /* CAN_RAW_FD_FRAMES available check */ |
| 11249 | #include <linux/can/raw.h> |
| 11250 | int |
| 11251 | main () |
| 11252 | { |
| 11253 | int can_raw_fd_frames = CAN_RAW_FD_FRAMES; |
| 11254 | ; |
| 11255 | return 0; |
| 11256 | } |
| 11257 | _ACEOF |
| 11258 | if ac_fn_c_try_compile "$LINENO"; then : |
| 11259 | |
| 11260 | |
| 11261 | $as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h |
| 11262 | |
| 11263 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 11264 | $as_echo "yes" >&6; } |
| 11265 | |
| 11266 | else |
| 11267 | |
| 11268 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11269 | $as_echo "no" >&6; } |
| 11270 | |
| 11271 | fi |
| 11272 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 11273 | |
Martin v. Löwis | a3fb4f7 | 2002-06-09 13:33:54 +0000 | [diff] [blame] | 11274 | # Check for --with-doc-strings |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11275 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5 |
| 11276 | $as_echo_n "checking for --with-doc-strings... " >&6; } |
Martin v. Löwis | a3fb4f7 | 2002-06-09 13:33:54 +0000 | [diff] [blame] | 11277 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11278 | # Check whether --with-doc-strings was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11279 | if test "${with_doc_strings+set}" = set; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11280 | withval=$with_doc_strings; |
| 11281 | fi |
Martin v. Löwis | a3fb4f7 | 2002-06-09 13:33:54 +0000 | [diff] [blame] | 11282 | |
Martin v. Löwis | a3fb4f7 | 2002-06-09 13:33:54 +0000 | [diff] [blame] | 11283 | |
| 11284 | if test -z "$with_doc_strings" |
| 11285 | then with_doc_strings="yes" |
| 11286 | fi |
| 11287 | if test "$with_doc_strings" != "no" |
| 11288 | then |
| 11289 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11290 | $as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h |
Martin v. Löwis | a3fb4f7 | 2002-06-09 13:33:54 +0000 | [diff] [blame] | 11291 | |
| 11292 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11293 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5 |
| 11294 | $as_echo "$with_doc_strings" >&6; } |
Martin v. Löwis | a3fb4f7 | 2002-06-09 13:33:54 +0000 | [diff] [blame] | 11295 | |
Martin v. Löwis | f30d60e | 2004-06-08 08:17:44 +0000 | [diff] [blame] | 11296 | # Check for Python-specific malloc support |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11297 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5 |
| 11298 | $as_echo_n "checking for --with-pymalloc... " >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11299 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11300 | # Check whether --with-pymalloc was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11301 | if test "${with_pymalloc+set}" = set; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11302 | withval=$with_pymalloc; |
| 11303 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 11304 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 11305 | |
Neil Schemenauer | 16c2297 | 2002-03-22 15:34:49 +0000 | [diff] [blame] | 11306 | if test -z "$with_pymalloc" |
Barry Warsaw | 35f3a2c | 2010-09-03 18:30:30 +0000 | [diff] [blame] | 11307 | then |
| 11308 | with_pymalloc="yes" |
Neil Schemenauer | 16c2297 | 2002-03-22 15:34:49 +0000 | [diff] [blame] | 11309 | fi |
| 11310 | if test "$with_pymalloc" != "no" |
| 11311 | then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11312 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11313 | $as_echo "#define WITH_PYMALLOC 1" >>confdefs.h |
Neil Schemenauer | 16c2297 | 2002-03-22 15:34:49 +0000 | [diff] [blame] | 11314 | |
| 11315 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11316 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5 |
| 11317 | $as_echo "$with_pymalloc" >&6; } |
Neil Schemenauer | 16c2297 | 2002-03-22 15:34:49 +0000 | [diff] [blame] | 11318 | |
Nick Coghlan | 6ea4186 | 2017-06-11 13:16:15 +1000 | [diff] [blame] | 11319 | # Check for --with-c-locale-coercion |
| 11320 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-c-locale-coercion" >&5 |
| 11321 | $as_echo_n "checking for --with-c-locale-coercion... " >&6; } |
| 11322 | |
| 11323 | # Check whether --with-c-locale-coercion was given. |
| 11324 | if test "${with_c_locale_coercion+set}" = set; then : |
| 11325 | withval=$with_c_locale_coercion; |
| 11326 | fi |
| 11327 | |
| 11328 | |
| 11329 | if test -z "$with_c_locale_coercion" |
| 11330 | then |
| 11331 | with_c_locale_coercion="yes" |
| 11332 | fi |
| 11333 | if test "$with_c_locale_coercion" != "no" |
| 11334 | then |
| 11335 | |
| 11336 | $as_echo "#define PY_COERCE_C_LOCALE 1" >>confdefs.h |
| 11337 | |
| 11338 | fi |
| 11339 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_c_locale_coercion" >&5 |
| 11340 | $as_echo "$with_c_locale_coercion" >&6; } |
| 11341 | |
Benjamin Peterson | 05159c4 | 2009-12-03 03:01:27 +0000 | [diff] [blame] | 11342 | # Check for Valgrind support |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11343 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5 |
| 11344 | $as_echo_n "checking for --with-valgrind... " >&6; } |
Benjamin Peterson | 05159c4 | 2009-12-03 03:01:27 +0000 | [diff] [blame] | 11345 | |
| 11346 | # Check whether --with-valgrind was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11347 | if test "${with_valgrind+set}" = set; then : |
Benjamin Peterson | 05159c4 | 2009-12-03 03:01:27 +0000 | [diff] [blame] | 11348 | withval=$with_valgrind; |
| 11349 | else |
| 11350 | with_valgrind=no |
| 11351 | fi |
| 11352 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11353 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5 |
| 11354 | $as_echo "$with_valgrind" >&6; } |
Benjamin Peterson | 05159c4 | 2009-12-03 03:01:27 +0000 | [diff] [blame] | 11355 | if test "$with_valgrind" != no; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11356 | ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 11357 | if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then : |
Benjamin Peterson | 05159c4 | 2009-12-03 03:01:27 +0000 | [diff] [blame] | 11358 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11359 | $as_echo "#define WITH_VALGRIND 1" >>confdefs.h |
Benjamin Peterson | 05159c4 | 2009-12-03 03:01:27 +0000 | [diff] [blame] | 11360 | |
| 11361 | else |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 11362 | as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5 |
Benjamin Peterson | 05159c4 | 2009-12-03 03:01:27 +0000 | [diff] [blame] | 11363 | |
| 11364 | fi |
| 11365 | |
| 11366 | |
Jeffrey Yasskin | 3937083 | 2010-05-03 19:29:34 +0000 | [diff] [blame] | 11367 | OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT" |
Benjamin Peterson | 05159c4 | 2009-12-03 03:01:27 +0000 | [diff] [blame] | 11368 | fi |
| 11369 | |
Łukasz Langa | a785c87 | 2016-09-09 17:37:37 -0700 | [diff] [blame] | 11370 | # Check for DTrace support |
| 11371 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5 |
| 11372 | $as_echo_n "checking for --with-dtrace... " >&6; } |
| 11373 | |
| 11374 | # Check whether --with-dtrace was given. |
| 11375 | if test "${with_dtrace+set}" = set; then : |
| 11376 | withval=$with_dtrace; |
| 11377 | else |
| 11378 | with_dtrace=no |
| 11379 | fi |
| 11380 | |
| 11381 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5 |
| 11382 | $as_echo "$with_dtrace" >&6; } |
| 11383 | |
| 11384 | |
| 11385 | |
| 11386 | |
| 11387 | |
| 11388 | DTRACE= |
| 11389 | DFLAGS= |
| 11390 | DTRACE_HEADERS= |
| 11391 | DTRACE_OBJS= |
| 11392 | |
| 11393 | if test "$with_dtrace" = "yes" |
| 11394 | then |
| 11395 | # Extract the first word of "dtrace", so it can be a program name with args. |
| 11396 | set dummy dtrace; ac_word=$2 |
| 11397 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 11398 | $as_echo_n "checking for $ac_word... " >&6; } |
| 11399 | if ${ac_cv_path_DTRACE+:} false; then : |
| 11400 | $as_echo_n "(cached) " >&6 |
| 11401 | else |
| 11402 | case $DTRACE in |
| 11403 | [\\/]* | ?:[\\/]*) |
| 11404 | ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path. |
| 11405 | ;; |
| 11406 | *) |
| 11407 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 11408 | for as_dir in $PATH |
| 11409 | do |
| 11410 | IFS=$as_save_IFS |
| 11411 | test -z "$as_dir" && as_dir=. |
| 11412 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 11413 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 11414 | ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" |
| 11415 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 11416 | break 2 |
| 11417 | fi |
| 11418 | done |
| 11419 | done |
| 11420 | IFS=$as_save_IFS |
| 11421 | |
| 11422 | test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found" |
| 11423 | ;; |
| 11424 | esac |
| 11425 | fi |
| 11426 | DTRACE=$ac_cv_path_DTRACE |
| 11427 | if test -n "$DTRACE"; then |
| 11428 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5 |
| 11429 | $as_echo "$DTRACE" >&6; } |
| 11430 | else |
| 11431 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11432 | $as_echo "no" >&6; } |
| 11433 | fi |
| 11434 | |
| 11435 | |
| 11436 | if test "$DTRACE" = "not found"; then |
| 11437 | as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5 |
| 11438 | fi |
| 11439 | |
| 11440 | $as_echo "#define WITH_DTRACE 1" >>confdefs.h |
| 11441 | |
| 11442 | DTRACE_HEADERS="Include/pydtrace_probes.h" |
| 11443 | |
| 11444 | # On OS X, DTrace providers do not need to be explicitly compiled and |
| 11445 | # linked into the binary. Correspondingly, dtrace(1) is missing the ELF |
| 11446 | # generation flag '-G'. We check for presence of this flag, rather than |
| 11447 | # hardcoding support by OS, in the interest of robustness. |
| 11448 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5 |
| 11449 | $as_echo_n "checking whether DTrace probes require linking... " >&6; } |
| 11450 | if ${ac_cv_dtrace_link+:} false; then : |
| 11451 | $as_echo_n "(cached) " >&6 |
| 11452 | else |
| 11453 | ac_cv_dtrace_link=no |
Jakub Kulík | 5c8f537 | 2019-01-24 18:29:48 +0100 | [diff] [blame] | 11454 | echo 'BEGIN{}' > conftest.d |
Łukasz Langa | a785c87 | 2016-09-09 17:37:37 -0700 | [diff] [blame] | 11455 | "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \ |
| 11456 | ac_cv_dtrace_link=yes |
| 11457 | |
| 11458 | fi |
| 11459 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5 |
| 11460 | $as_echo "$ac_cv_dtrace_link" >&6; } |
| 11461 | if test "$ac_cv_dtrace_link" = "yes"; then |
| 11462 | DTRACE_OBJS="Python/pydtrace.o" |
| 11463 | fi |
| 11464 | fi |
| 11465 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 11466 | # -I${DLINCLDIR} is added to the compile rule for importdl.o |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 11467 | |
Guido van Rossum | 98935bf | 2001-09-05 19:13:16 +0000 | [diff] [blame] | 11468 | DLINCLDIR=. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 11469 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 11470 | # the dlopen() function means we might want to use dynload_shlib.o. some |
| 11471 | # platforms, such as AIX, have dlopen(), but don't want to use it. |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 11472 | for ac_func in dlopen |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11473 | do : |
| 11474 | ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 11475 | if test "x$ac_cv_func_dlopen" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11476 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11477 | #define HAVE_DLOPEN 1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11478 | _ACEOF |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 11479 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 11480 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 11481 | done |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 11482 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 11483 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 11484 | # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic |
| 11485 | # loading of modules. |
| 11486 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11487 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5 |
| 11488 | $as_echo_n "checking DYNLOADFILE... " >&6; } |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 11489 | if test -z "$DYNLOADFILE" |
| 11490 | then |
| 11491 | case $ac_sys_system/$ac_sys_release in |
Martin v. Löwis | c19c5a6 | 2003-11-18 20:00:44 +0000 | [diff] [blame] | 11492 | AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c |
| 11493 | if test "$ac_cv_func_dlopen" = yes |
| 11494 | then DYNLOADFILE="dynload_shlib.o" |
| 11495 | else DYNLOADFILE="dynload_aix.o" |
| 11496 | fi |
| 11497 | ;; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 11498 | hp*|HP*) DYNLOADFILE="dynload_hpux.o";; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 11499 | *) |
| 11500 | # use dynload_shlib.c and dlopen() if we have it; otherwise stub |
| 11501 | # out any dynamic loading |
| 11502 | if test "$ac_cv_func_dlopen" = yes |
| 11503 | then DYNLOADFILE="dynload_shlib.o" |
| 11504 | else DYNLOADFILE="dynload_stub.o" |
| 11505 | fi |
| 11506 | ;; |
| 11507 | esac |
| 11508 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11509 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5 |
| 11510 | $as_echo "$DYNLOADFILE" >&6; } |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 11511 | if test "$DYNLOADFILE" != "dynload_stub.o" |
| 11512 | then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11513 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11514 | $as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 11515 | |
| 11516 | fi |
| 11517 | |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 11518 | # MACHDEP_OBJS can be set to platform-specific object files needed by Python |
| 11519 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 11520 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11521 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5 |
| 11522 | $as_echo_n "checking MACHDEP_OBJS... " >&6; } |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 11523 | if test -z "$MACHDEP_OBJS" |
| 11524 | then |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 11525 | MACHDEP_OBJS=$extra_machdep_objs |
| 11526 | else |
| 11527 | MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 11528 | fi |
doko@ubuntu.com | 9c7817e | 2012-06-30 17:05:13 +0200 | [diff] [blame] | 11529 | if test -z "$MACHDEP_OBJS"; then |
| 11530 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 |
| 11531 | $as_echo "none" >&6; } |
| 11532 | else |
| 11533 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5 |
| 11534 | $as_echo "$MACHDEP_OBJS" >&6; } |
| 11535 | fi |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 11536 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 11537 | # checks for library functions |
Antoine Pitrou | b1c5496 | 2010-10-14 15:05:38 +0000 | [diff] [blame] | 11538 | for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \ |
Pablo Galindo | aac4d03 | 2019-05-31 19:39:47 +0100 | [diff] [blame] | 11539 | clock confstr copy_file_range ctermid dup3 execv explicit_bzero explicit_memset \ |
| 11540 | faccessat fchmod fchmodat fchown fchownat \ |
Jakub Kulík | e20134f | 2019-09-11 17:11:57 +0200 | [diff] [blame] | 11541 | fdwalk fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \ |
Victor Stinner | 4d6a3d6 | 2014-12-21 01:16:38 +0100 | [diff] [blame] | 11542 | futimens futimes gai_strerror getentropy \ |
William Grzybowski | 23e65b2 | 2018-09-07 09:06:15 -0300 | [diff] [blame] | 11543 | getgrgid_r getgrnam_r \ |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 11544 | getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \ |
William Grzybowski | 23e65b2 | 2018-09-07 09:06:15 -0300 | [diff] [blame] | 11545 | getpriority getresuid getresgid getpwent getpwnam_r getpwuid_r getspnam getspent getsid getwd \ |
xdegaye | 5ad7ef8 | 2017-11-23 11:13:22 +0100 | [diff] [blame] | 11546 | if_nameindex \ |
Benjamin Peterson | bed04b6 | 2019-09-09 05:13:00 -0700 | [diff] [blame] | 11547 | initgroups kill killpg lchown lockf linkat lstat lutimes mmap \ |
Antoine Pitrou | f0effe6 | 2011-11-26 01:11:02 +0100 | [diff] [blame] | 11548 | memrchr mbrtowc mkdirat mkfifo \ |
Inada Naoki | bee31ce | 2019-05-30 16:35:41 +0900 | [diff] [blame] | 11549 | madvise mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \ |
Joannah Nanjekye | 92b8322 | 2019-01-16 16:29:26 +0300 | [diff] [blame] | 11550 | posix_fallocate posix_fadvise posix_spawn posix_spawnp pread preadv preadv2 \ |
Inada Naoki | 001fee1 | 2019-02-20 10:00:09 +0900 | [diff] [blame] | 11551 | pthread_condattr_setclock pthread_init pthread_kill putenv pwrite pwritev pwritev2 \ |
| 11552 | readlink readlinkat readv realpath renameat \ |
Victor Stinner | b477d19 | 2020-01-22 22:48:16 +0100 | [diff] [blame^] | 11553 | sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid setenv seteuid \ |
Antoine Pitrou | 061cfb5 | 2011-02-28 22:25:22 +0000 | [diff] [blame] | 11554 | setgid sethostname \ |
Giampaolo Rodolà | 18e8bcb | 2011-02-25 20:57:54 +0000 | [diff] [blame] | 11555 | setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \ |
Charles-François Natali | ea0d5fc | 2011-09-06 19:03:35 +0200 | [diff] [blame] | 11556 | sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \ |
| 11557 | sched_rr_get_interval \ |
Antoine Pitrou | 9d3627e | 2018-05-04 13:00:50 +0200 | [diff] [blame] | 11558 | sigaction sigaltstack sigfillset siginterrupt sigpending sigrelse \ |
Michael Osipov | 48ce489 | 2018-08-23 15:27:19 +0200 | [diff] [blame] | 11559 | sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy strsignal symlinkat sync \ |
Michael W. Hudson | 34f20ea | 2002-05-27 15:08:24 +0000 | [diff] [blame] | 11560 | sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ |
Ross Lagerwall | 7807c35 | 2011-03-17 20:20:30 +0200 | [diff] [blame] | 11561 | truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \ |
pxinwr | f2d7ac7 | 2019-05-21 18:46:37 +0800 | [diff] [blame] | 11562 | wcscoll wcsftime wcsxfrm wmemcmp writev _getpty rtpSpawn |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11563 | do : |
| 11564 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
| 11565 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 11566 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11567 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11568 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11569 | _ACEOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 11570 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 11571 | fi |
| 11572 | done |
| 11573 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 11574 | |
Benjamin Peterson | 40caa05 | 2018-09-12 15:52:40 -0700 | [diff] [blame] | 11575 | # Force lchmod off for Linux. Linux disallows changing the mode of symbolic |
| 11576 | # links. Some libc implementations have a stub lchmod implementation that always |
| 11577 | # returns an error. |
| 11578 | if test "$MACHDEP" != linux; then |
Benjamin Peterson | ed709d5 | 2018-09-12 17:22:11 -0700 | [diff] [blame] | 11579 | for ac_func in lchmod |
| 11580 | do : |
Benjamin Peterson | 40caa05 | 2018-09-12 15:52:40 -0700 | [diff] [blame] | 11581 | ac_fn_c_check_func "$LINENO" "lchmod" "ac_cv_func_lchmod" |
| 11582 | if test "x$ac_cv_func_lchmod" = xyes; then : |
Benjamin Peterson | ed709d5 | 2018-09-12 17:22:11 -0700 | [diff] [blame] | 11583 | cat >>confdefs.h <<_ACEOF |
| 11584 | #define HAVE_LCHMOD 1 |
| 11585 | _ACEOF |
Benjamin Peterson | 40caa05 | 2018-09-12 15:52:40 -0700 | [diff] [blame] | 11586 | |
| 11587 | fi |
Benjamin Peterson | ed709d5 | 2018-09-12 17:22:11 -0700 | [diff] [blame] | 11588 | done |
Benjamin Peterson | 40caa05 | 2018-09-12 15:52:40 -0700 | [diff] [blame] | 11589 | |
| 11590 | fi |
| 11591 | |
Gregory P. Smith | df300d5 | 2012-01-21 18:20:15 -0800 | [diff] [blame] | 11592 | ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h> |
| 11593 | #include <dirent.h> |
| 11594 | " |
| 11595 | if test "x$ac_cv_have_decl_dirfd" = xyes; then : |
| 11596 | |
| 11597 | $as_echo "#define HAVE_DIRFD 1" >>confdefs.h |
| 11598 | |
| 11599 | fi |
| 11600 | |
| 11601 | |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11602 | # For some functions, having a definition is not sufficient, since |
| 11603 | # we want to take their address. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11604 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5 |
| 11605 | $as_echo_n "checking for chroot... " >&6; } |
| 11606 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11607 | /* end confdefs.h. */ |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11608 | #include <unistd.h> |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11609 | int |
| 11610 | main () |
| 11611 | { |
| 11612 | void *x=chroot |
| 11613 | ; |
| 11614 | return 0; |
| 11615 | } |
| 11616 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11617 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11618 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11619 | $as_echo "#define HAVE_CHROOT 1" >>confdefs.h |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11620 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11621 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11622 | $as_echo "yes" >&6; } |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11623 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11624 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11625 | $as_echo "no" >&6; } |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11626 | |
| 11627 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11628 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11629 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5 |
| 11630 | $as_echo_n "checking for link... " >&6; } |
| 11631 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11632 | /* end confdefs.h. */ |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11633 | #include <unistd.h> |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11634 | int |
| 11635 | main () |
| 11636 | { |
| 11637 | void *x=link |
| 11638 | ; |
| 11639 | return 0; |
| 11640 | } |
| 11641 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11642 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11643 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11644 | $as_echo "#define HAVE_LINK 1" >>confdefs.h |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11645 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11646 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11647 | $as_echo "yes" >&6; } |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11648 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11649 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11650 | $as_echo "no" >&6; } |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11651 | |
| 11652 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11653 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11654 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5 |
| 11655 | $as_echo_n "checking for symlink... " >&6; } |
| 11656 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11657 | /* end confdefs.h. */ |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11658 | #include <unistd.h> |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11659 | int |
| 11660 | main () |
| 11661 | { |
| 11662 | void *x=symlink |
| 11663 | ; |
| 11664 | return 0; |
| 11665 | } |
| 11666 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11667 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11668 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11669 | $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11670 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11671 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11672 | $as_echo "yes" >&6; } |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11673 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11674 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11675 | $as_echo "no" >&6; } |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11676 | |
| 11677 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11678 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11679 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5 |
| 11680 | $as_echo_n "checking for fchdir... " >&6; } |
| 11681 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11682 | /* end confdefs.h. */ |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11683 | #include <unistd.h> |
| 11684 | int |
| 11685 | main () |
| 11686 | { |
| 11687 | void *x=fchdir |
| 11688 | ; |
| 11689 | return 0; |
| 11690 | } |
| 11691 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11692 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11693 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11694 | $as_echo "#define HAVE_FCHDIR 1" >>confdefs.h |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11695 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11696 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11697 | $as_echo "yes" >&6; } |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11698 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11699 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11700 | $as_echo "no" >&6; } |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11701 | |
| 11702 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11703 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11704 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5 |
| 11705 | $as_echo_n "checking for fsync... " >&6; } |
| 11706 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11707 | /* end confdefs.h. */ |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11708 | #include <unistd.h> |
| 11709 | int |
| 11710 | main () |
| 11711 | { |
| 11712 | void *x=fsync |
| 11713 | ; |
| 11714 | return 0; |
| 11715 | } |
| 11716 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11717 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11718 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11719 | $as_echo "#define HAVE_FSYNC 1" >>confdefs.h |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11720 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11721 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11722 | $as_echo "yes" >&6; } |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11723 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11724 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11725 | $as_echo "no" >&6; } |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11726 | |
| 11727 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11728 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11729 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5 |
| 11730 | $as_echo_n "checking for fdatasync... " >&6; } |
| 11731 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11732 | /* end confdefs.h. */ |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11733 | #include <unistd.h> |
| 11734 | int |
| 11735 | main () |
| 11736 | { |
| 11737 | void *x=fdatasync |
| 11738 | ; |
| 11739 | return 0; |
| 11740 | } |
| 11741 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11742 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11743 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11744 | $as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11745 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11746 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11747 | $as_echo "yes" >&6; } |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11748 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11749 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11750 | $as_echo "no" >&6; } |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11751 | |
| 11752 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11753 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11754 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5 |
| 11755 | $as_echo_n "checking for epoll... " >&6; } |
| 11756 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Christian Heimes | 4fbc72b | 2008-03-22 00:47:35 +0000 | [diff] [blame] | 11757 | /* end confdefs.h. */ |
| 11758 | #include <sys/epoll.h> |
| 11759 | int |
| 11760 | main () |
| 11761 | { |
| 11762 | void *x=epoll_create |
| 11763 | ; |
| 11764 | return 0; |
| 11765 | } |
| 11766 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11767 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11768 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11769 | $as_echo "#define HAVE_EPOLL 1" >>confdefs.h |
Christian Heimes | 4fbc72b | 2008-03-22 00:47:35 +0000 | [diff] [blame] | 11770 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11771 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11772 | $as_echo "yes" >&6; } |
Christian Heimes | 4fbc72b | 2008-03-22 00:47:35 +0000 | [diff] [blame] | 11773 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11774 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11775 | $as_echo "no" >&6; } |
Christian Heimes | 4fbc72b | 2008-03-22 00:47:35 +0000 | [diff] [blame] | 11776 | |
| 11777 | fi |
Christian Heimes | 4fbc72b | 2008-03-22 00:47:35 +0000 | [diff] [blame] | 11778 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Benjamin Peterson | 95c1662 | 2011-12-27 15:36:32 -0600 | [diff] [blame] | 11779 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5 |
| 11780 | $as_echo_n "checking for epoll_create1... " >&6; } |
| 11781 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 11782 | /* end confdefs.h. */ |
| 11783 | #include <sys/epoll.h> |
| 11784 | int |
| 11785 | main () |
| 11786 | { |
| 11787 | void *x=epoll_create1 |
| 11788 | ; |
| 11789 | return 0; |
| 11790 | } |
| 11791 | _ACEOF |
| 11792 | if ac_fn_c_try_compile "$LINENO"; then : |
| 11793 | |
| 11794 | $as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h |
| 11795 | |
| 11796 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 11797 | $as_echo "yes" >&6; } |
| 11798 | else |
| 11799 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11800 | $as_echo "no" >&6; } |
| 11801 | |
| 11802 | fi |
| 11803 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11804 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5 |
| 11805 | $as_echo_n "checking for kqueue... " >&6; } |
| 11806 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Christian Heimes | 4fbc72b | 2008-03-22 00:47:35 +0000 | [diff] [blame] | 11807 | /* end confdefs.h. */ |
| 11808 | |
| 11809 | #include <sys/types.h> |
| 11810 | #include <sys/event.h> |
| 11811 | |
| 11812 | int |
| 11813 | main () |
| 11814 | { |
| 11815 | int x=kqueue() |
| 11816 | ; |
| 11817 | return 0; |
| 11818 | } |
| 11819 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11820 | if ac_fn_c_try_compile "$LINENO"; then : |
Christian Heimes | 4fbc72b | 2008-03-22 00:47:35 +0000 | [diff] [blame] | 11821 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11822 | $as_echo "#define HAVE_KQUEUE 1" >>confdefs.h |
Christian Heimes | 4fbc72b | 2008-03-22 00:47:35 +0000 | [diff] [blame] | 11823 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11824 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11825 | $as_echo "yes" >&6; } |
Christian Heimes | 4fbc72b | 2008-03-22 00:47:35 +0000 | [diff] [blame] | 11826 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11827 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11828 | $as_echo "no" >&6; } |
Christian Heimes | 4fbc72b | 2008-03-22 00:47:35 +0000 | [diff] [blame] | 11829 | |
| 11830 | fi |
Christian Heimes | 4fbc72b | 2008-03-22 00:47:35 +0000 | [diff] [blame] | 11831 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Christian Heimes | b7bd5df | 2013-10-22 11:21:54 +0200 | [diff] [blame] | 11832 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5 |
| 11833 | $as_echo_n "checking for prlimit... " >&6; } |
| 11834 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 11835 | /* end confdefs.h. */ |
| 11836 | |
| 11837 | #include <sys/time.h> |
| 11838 | #include <sys/resource.h> |
| 11839 | |
| 11840 | int |
| 11841 | main () |
| 11842 | { |
| 11843 | void *x=prlimit |
| 11844 | ; |
| 11845 | return 0; |
| 11846 | } |
| 11847 | _ACEOF |
| 11848 | if ac_fn_c_try_compile "$LINENO"; then : |
| 11849 | |
| 11850 | $as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h |
| 11851 | |
| 11852 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 11853 | $as_echo "yes" >&6; } |
| 11854 | else |
| 11855 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11856 | $as_echo "no" >&6; } |
| 11857 | |
| 11858 | fi |
| 11859 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 11860 | |
Zackery Spytz | 43fdbd2 | 2019-05-29 13:57:07 -0600 | [diff] [blame] | 11861 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memfd_create" >&5 |
| 11862 | $as_echo_n "checking for memfd_create... " >&6; } |
| 11863 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 11864 | /* end confdefs.h. */ |
| 11865 | |
| 11866 | #ifdef HAVE_SYS_MMAN_H |
| 11867 | #include <sys/mman.h> |
| 11868 | #endif |
| 11869 | #ifdef HAVE_SYS_MEMFD_H |
| 11870 | #include <sys/memfd.h> |
| 11871 | #endif |
| 11872 | |
| 11873 | int |
| 11874 | main () |
| 11875 | { |
| 11876 | void *x=memfd_create |
| 11877 | ; |
| 11878 | return 0; |
| 11879 | } |
| 11880 | _ACEOF |
| 11881 | if ac_fn_c_try_compile "$LINENO"; then : |
| 11882 | |
| 11883 | $as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h |
| 11884 | |
| 11885 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 11886 | $as_echo "yes" >&6; } |
| 11887 | else |
| 11888 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11889 | $as_echo "no" >&6; } |
| 11890 | |
| 11891 | fi |
| 11892 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 11893 | |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 11894 | # On some systems (eg. FreeBSD 5), we would find a definition of the |
| 11895 | # functions ctermid_r, setgroups in the library, but no prototype |
| 11896 | # (e.g. because we use _XOPEN_SOURCE). See whether we can take their |
| 11897 | # address to avoid compiler warnings and potential miscompilations |
| 11898 | # because of the missing prototypes. |
| 11899 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11900 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5 |
| 11901 | $as_echo_n "checking for ctermid_r... " >&6; } |
| 11902 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11903 | /* end confdefs.h. */ |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 11904 | |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 11905 | #include <stdio.h> |
| 11906 | |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 11907 | int |
| 11908 | main () |
| 11909 | { |
| 11910 | void* p = ctermid_r |
| 11911 | ; |
| 11912 | return 0; |
| 11913 | } |
| 11914 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11915 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 11916 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11917 | $as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 11918 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11919 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11920 | $as_echo "yes" >&6; } |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 11921 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11922 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11923 | $as_echo "no" >&6; } |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 11924 | |
| 11925 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11926 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 11927 | |
Antoine Pitrou | a4e4ae2 | 2010-09-10 18:39:00 +0000 | [diff] [blame] | 11928 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5 |
| 11929 | $as_echo_n "checking for flock declaration... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 11930 | if ${ac_cv_flock_decl+:} false; then : |
Antoine Pitrou | a4e4ae2 | 2010-09-10 18:39:00 +0000 | [diff] [blame] | 11931 | $as_echo_n "(cached) " >&6 |
| 11932 | else |
| 11933 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11934 | /* end confdefs.h. */ |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 11935 | #include <sys/file.h> |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 11936 | int |
| 11937 | main () |
| 11938 | { |
| 11939 | void* p = flock |
Antoine Pitrou | a4e4ae2 | 2010-09-10 18:39:00 +0000 | [diff] [blame] | 11940 | |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 11941 | ; |
| 11942 | return 0; |
| 11943 | } |
| 11944 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11945 | if ac_fn_c_try_compile "$LINENO"; then : |
Antoine Pitrou | a4e4ae2 | 2010-09-10 18:39:00 +0000 | [diff] [blame] | 11946 | ac_cv_flock_decl=yes |
| 11947 | else |
| 11948 | ac_cv_flock_decl=no |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 11949 | |
| 11950 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11951 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Antoine Pitrou | a300007 | 2010-09-07 14:52:42 +0000 | [diff] [blame] | 11952 | |
Antoine Pitrou | a4e4ae2 | 2010-09-10 18:39:00 +0000 | [diff] [blame] | 11953 | fi |
| 11954 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5 |
| 11955 | $as_echo "$ac_cv_flock_decl" >&6; } |
| 11956 | if test "x${ac_cv_flock_decl}" = xyes; then |
| 11957 | for ac_func in flock |
| 11958 | do : |
| 11959 | ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 11960 | if test "x$ac_cv_func_flock" = xyes; then : |
Antoine Pitrou | a4e4ae2 | 2010-09-10 18:39:00 +0000 | [diff] [blame] | 11961 | cat >>confdefs.h <<_ACEOF |
| 11962 | #define HAVE_FLOCK 1 |
Antoine Pitrou | a300007 | 2010-09-07 14:52:42 +0000 | [diff] [blame] | 11963 | _ACEOF |
Antoine Pitrou | a4e4ae2 | 2010-09-10 18:39:00 +0000 | [diff] [blame] | 11964 | |
Antoine Pitrou | a300007 | 2010-09-07 14:52:42 +0000 | [diff] [blame] | 11965 | else |
Antoine Pitrou | a4e4ae2 | 2010-09-10 18:39:00 +0000 | [diff] [blame] | 11966 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5 |
Antoine Pitrou | a300007 | 2010-09-07 14:52:42 +0000 | [diff] [blame] | 11967 | $as_echo_n "checking for flock in -lbsd... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 11968 | if ${ac_cv_lib_bsd_flock+:} false; then : |
Antoine Pitrou | a300007 | 2010-09-07 14:52:42 +0000 | [diff] [blame] | 11969 | $as_echo_n "(cached) " >&6 |
| 11970 | else |
| 11971 | ac_check_lib_save_LIBS=$LIBS |
| 11972 | LIBS="-lbsd $LIBS" |
| 11973 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 11974 | /* end confdefs.h. */ |
| 11975 | |
| 11976 | /* Override any GCC internal prototype to avoid an error. |
| 11977 | Use char because int might match the return type of a GCC |
| 11978 | builtin and then its argument prototype would still apply. */ |
| 11979 | #ifdef __cplusplus |
| 11980 | extern "C" |
| 11981 | #endif |
| 11982 | char flock (); |
| 11983 | int |
| 11984 | main () |
| 11985 | { |
| 11986 | return flock (); |
| 11987 | ; |
| 11988 | return 0; |
| 11989 | } |
| 11990 | _ACEOF |
| 11991 | if ac_fn_c_try_link "$LINENO"; then : |
| 11992 | ac_cv_lib_bsd_flock=yes |
| 11993 | else |
| 11994 | ac_cv_lib_bsd_flock=no |
| 11995 | fi |
| 11996 | rm -f core conftest.err conftest.$ac_objext \ |
| 11997 | conftest$ac_exeext conftest.$ac_ext |
| 11998 | LIBS=$ac_check_lib_save_LIBS |
| 11999 | fi |
| 12000 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5 |
| 12001 | $as_echo "$ac_cv_lib_bsd_flock" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12002 | if test "x$ac_cv_lib_bsd_flock" = xyes; then : |
Antoine Pitrou | a4e4ae2 | 2010-09-10 18:39:00 +0000 | [diff] [blame] | 12003 | $as_echo "#define HAVE_FLOCK 1" >>confdefs.h |
Antoine Pitrou | a300007 | 2010-09-07 14:52:42 +0000 | [diff] [blame] | 12004 | |
| 12005 | |
| 12006 | $as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h |
| 12007 | |
| 12008 | |
| 12009 | fi |
| 12010 | |
| 12011 | |
| 12012 | fi |
Antoine Pitrou | a4e4ae2 | 2010-09-10 18:39:00 +0000 | [diff] [blame] | 12013 | done |
| 12014 | |
Antoine Pitrou | a300007 | 2010-09-07 14:52:42 +0000 | [diff] [blame] | 12015 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12016 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12017 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5 |
| 12018 | $as_echo_n "checking for getpagesize... " >&6; } |
| 12019 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12020 | /* end confdefs.h. */ |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 12021 | |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 12022 | #include <unistd.h> |
| 12023 | |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 12024 | int |
| 12025 | main () |
| 12026 | { |
| 12027 | void* p = getpagesize |
| 12028 | ; |
| 12029 | return 0; |
| 12030 | } |
| 12031 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12032 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 12033 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12034 | $as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 12035 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 12036 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12037 | $as_echo "yes" >&6; } |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 12038 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12039 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 12040 | $as_echo "no" >&6; } |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 12041 | |
| 12042 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12043 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 12044 | |
Victor Stinner | 984890f | 2011-11-24 13:53:38 +0100 | [diff] [blame] | 12045 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5 |
| 12046 | $as_echo_n "checking for broken unsetenv... " >&6; } |
| 12047 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12048 | /* end confdefs.h. */ |
| 12049 | |
| 12050 | #include <stdlib.h> |
| 12051 | |
| 12052 | int |
| 12053 | main () |
| 12054 | { |
| 12055 | int res = unsetenv("DUMMY") |
| 12056 | ; |
| 12057 | return 0; |
| 12058 | } |
| 12059 | _ACEOF |
| 12060 | if ac_fn_c_try_compile "$LINENO"; then : |
| 12061 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 12062 | $as_echo "no" >&6; } |
| 12063 | else |
| 12064 | |
| 12065 | $as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h |
| 12066 | |
| 12067 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 12068 | $as_echo "yes" >&6; } |
| 12069 | |
| 12070 | fi |
| 12071 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 12072 | |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 12073 | for ac_prog in true |
| 12074 | do |
| 12075 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 12076 | set dummy $ac_prog; ac_word=$2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12077 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 12078 | $as_echo_n "checking for $ac_word... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12079 | if ${ac_cv_prog_TRUE+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12080 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 12081 | else |
| 12082 | if test -n "$TRUE"; then |
| 12083 | ac_cv_prog_TRUE="$TRUE" # Let the user override the test. |
| 12084 | else |
| 12085 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 12086 | for as_dir in $PATH |
| 12087 | do |
| 12088 | IFS=$as_save_IFS |
| 12089 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12090 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 12091 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 12092 | ac_cv_prog_TRUE="$ac_prog" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12093 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 12094 | break 2 |
| 12095 | fi |
| 12096 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12097 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12098 | IFS=$as_save_IFS |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 12099 | |
| 12100 | fi |
| 12101 | fi |
| 12102 | TRUE=$ac_cv_prog_TRUE |
| 12103 | if test -n "$TRUE"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12104 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5 |
| 12105 | $as_echo "$TRUE" >&6; } |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 12106 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12107 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 12108 | $as_echo "no" >&6; } |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 12109 | fi |
| 12110 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12111 | |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 12112 | test -n "$TRUE" && break |
| 12113 | done |
| 12114 | test -n "$TRUE" || TRUE="/bin/true" |
| 12115 | |
| 12116 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12117 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5 |
| 12118 | $as_echo_n "checking for inet_aton in -lc... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12119 | if ${ac_cv_lib_c_inet_aton+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12120 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12121 | else |
| 12122 | ac_check_lib_save_LIBS=$LIBS |
| 12123 | LIBS="-lc $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12124 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12125 | /* end confdefs.h. */ |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12126 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12127 | /* Override any GCC internal prototype to avoid an error. |
| 12128 | Use char because int might match the return type of a GCC |
| 12129 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12130 | #ifdef __cplusplus |
| 12131 | extern "C" |
| 12132 | #endif |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12133 | char inet_aton (); |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12134 | int |
| 12135 | main () |
| 12136 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12137 | return inet_aton (); |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12138 | ; |
| 12139 | return 0; |
| 12140 | } |
| 12141 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12142 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12143 | ac_cv_lib_c_inet_aton=yes |
| 12144 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12145 | ac_cv_lib_c_inet_aton=no |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12146 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12147 | rm -f core conftest.err conftest.$ac_objext \ |
| 12148 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12149 | LIBS=$ac_check_lib_save_LIBS |
| 12150 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12151 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5 |
| 12152 | $as_echo "$ac_cv_lib_c_inet_aton" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12153 | if test "x$ac_cv_lib_c_inet_aton" = xyes; then : |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 12154 | $ac_cv_prog_TRUE |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12155 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12156 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5 |
| 12157 | $as_echo_n "checking for inet_aton in -lresolv... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12158 | if ${ac_cv_lib_resolv_inet_aton+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12159 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12160 | else |
| 12161 | ac_check_lib_save_LIBS=$LIBS |
| 12162 | LIBS="-lresolv $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12163 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12164 | /* end confdefs.h. */ |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12165 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12166 | /* Override any GCC internal prototype to avoid an error. |
| 12167 | Use char because int might match the return type of a GCC |
| 12168 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12169 | #ifdef __cplusplus |
| 12170 | extern "C" |
| 12171 | #endif |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12172 | char inet_aton (); |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12173 | int |
| 12174 | main () |
| 12175 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12176 | return inet_aton (); |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12177 | ; |
| 12178 | return 0; |
| 12179 | } |
| 12180 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12181 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12182 | ac_cv_lib_resolv_inet_aton=yes |
| 12183 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12184 | ac_cv_lib_resolv_inet_aton=no |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12185 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12186 | rm -f core conftest.err conftest.$ac_objext \ |
| 12187 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12188 | LIBS=$ac_check_lib_save_LIBS |
| 12189 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12190 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5 |
| 12191 | $as_echo "$ac_cv_lib_resolv_inet_aton" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12192 | if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then : |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12193 | cat >>confdefs.h <<_ACEOF |
| 12194 | #define HAVE_LIBRESOLV 1 |
| 12195 | _ACEOF |
| 12196 | |
| 12197 | LIBS="-lresolv $LIBS" |
| 12198 | |
| 12199 | fi |
| 12200 | |
| 12201 | |
| 12202 | fi |
| 12203 | |
| 12204 | |
Christian Heimes | d0764e2 | 2007-12-04 15:00:33 +0000 | [diff] [blame] | 12205 | # On Tru64, chflags seems to be present, but calling it will |
| 12206 | # exit Python |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12207 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5 |
| 12208 | $as_echo_n "checking for chflags... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12209 | if ${ac_cv_have_chflags+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12210 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 12211 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12212 | if test "$cross_compiling" = yes; then : |
Benjamin Peterson | ed68afa | 2010-01-30 19:36:43 +0000 | [diff] [blame] | 12213 | ac_cv_have_chflags=cross |
Christian Heimes | d0764e2 | 2007-12-04 15:00:33 +0000 | [diff] [blame] | 12214 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12215 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Christian Heimes | d0764e2 | 2007-12-04 15:00:33 +0000 | [diff] [blame] | 12216 | /* end confdefs.h. */ |
Ned Deily | 3eb67d5 | 2011-06-28 00:00:28 -0700 | [diff] [blame] | 12217 | |
Christian Heimes | d0764e2 | 2007-12-04 15:00:33 +0000 | [diff] [blame] | 12218 | #include <sys/stat.h> |
| 12219 | #include <unistd.h> |
| 12220 | int main(int argc, char*argv[]) |
| 12221 | { |
| 12222 | if(chflags(argv[0], 0) != 0) |
| 12223 | return 1; |
| 12224 | return 0; |
| 12225 | } |
Ned Deily | 3eb67d5 | 2011-06-28 00:00:28 -0700 | [diff] [blame] | 12226 | |
Christian Heimes | d0764e2 | 2007-12-04 15:00:33 +0000 | [diff] [blame] | 12227 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12228 | if ac_fn_c_try_run "$LINENO"; then : |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 12229 | ac_cv_have_chflags=yes |
Alexandre Vassalotti | 1914228 | 2009-07-17 23:11:52 +0000 | [diff] [blame] | 12230 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12231 | ac_cv_have_chflags=no |
Alexandre Vassalotti | 1914228 | 2009-07-17 23:11:52 +0000 | [diff] [blame] | 12232 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12233 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 12234 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 12235 | fi |
| 12236 | |
Alexandre Vassalotti | 1914228 | 2009-07-17 23:11:52 +0000 | [diff] [blame] | 12237 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 12238 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12239 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5 |
| 12240 | $as_echo "$ac_cv_have_chflags" >&6; } |
Benjamin Peterson | ed68afa | 2010-01-30 19:36:43 +0000 | [diff] [blame] | 12241 | if test "$ac_cv_have_chflags" = cross ; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12242 | ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12243 | if test "x$ac_cv_func_chflags" = xyes; then : |
Benjamin Peterson | ed68afa | 2010-01-30 19:36:43 +0000 | [diff] [blame] | 12244 | ac_cv_have_chflags="yes" |
| 12245 | else |
| 12246 | ac_cv_have_chflags="no" |
| 12247 | fi |
| 12248 | |
| 12249 | fi |
| 12250 | if test "$ac_cv_have_chflags" = yes ; then |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 12251 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12252 | $as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 12253 | |
| 12254 | fi |
| 12255 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12256 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5 |
| 12257 | $as_echo_n "checking for lchflags... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12258 | if ${ac_cv_have_lchflags+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12259 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 12260 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12261 | if test "$cross_compiling" = yes; then : |
Benjamin Peterson | ed68afa | 2010-01-30 19:36:43 +0000 | [diff] [blame] | 12262 | ac_cv_have_lchflags=cross |
Christian Heimes | d0764e2 | 2007-12-04 15:00:33 +0000 | [diff] [blame] | 12263 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12264 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Christian Heimes | d0764e2 | 2007-12-04 15:00:33 +0000 | [diff] [blame] | 12265 | /* end confdefs.h. */ |
Ned Deily | 3eb67d5 | 2011-06-28 00:00:28 -0700 | [diff] [blame] | 12266 | |
Christian Heimes | d0764e2 | 2007-12-04 15:00:33 +0000 | [diff] [blame] | 12267 | #include <sys/stat.h> |
| 12268 | #include <unistd.h> |
| 12269 | int main(int argc, char*argv[]) |
| 12270 | { |
| 12271 | if(lchflags(argv[0], 0) != 0) |
| 12272 | return 1; |
| 12273 | return 0; |
| 12274 | } |
Ned Deily | 3eb67d5 | 2011-06-28 00:00:28 -0700 | [diff] [blame] | 12275 | |
Christian Heimes | d0764e2 | 2007-12-04 15:00:33 +0000 | [diff] [blame] | 12276 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12277 | if ac_fn_c_try_run "$LINENO"; then : |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 12278 | ac_cv_have_lchflags=yes |
Alexandre Vassalotti | 1914228 | 2009-07-17 23:11:52 +0000 | [diff] [blame] | 12279 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12280 | ac_cv_have_lchflags=no |
Christian Heimes | d0764e2 | 2007-12-04 15:00:33 +0000 | [diff] [blame] | 12281 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12282 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 12283 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Alexandre Vassalotti | 1914228 | 2009-07-17 23:11:52 +0000 | [diff] [blame] | 12284 | fi |
| 12285 | |
| 12286 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 12287 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12288 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5 |
| 12289 | $as_echo "$ac_cv_have_lchflags" >&6; } |
Benjamin Peterson | ed68afa | 2010-01-30 19:36:43 +0000 | [diff] [blame] | 12290 | if test "$ac_cv_have_lchflags" = cross ; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12291 | ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12292 | if test "x$ac_cv_func_lchflags" = xyes; then : |
Benjamin Peterson | ed68afa | 2010-01-30 19:36:43 +0000 | [diff] [blame] | 12293 | ac_cv_have_lchflags="yes" |
| 12294 | else |
| 12295 | ac_cv_have_lchflags="no" |
| 12296 | fi |
| 12297 | |
| 12298 | fi |
| 12299 | if test "$ac_cv_have_lchflags" = yes ; then |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 12300 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12301 | $as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 12302 | |
| 12303 | fi |
| 12304 | |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 12305 | case $ac_sys_system/$ac_sys_release in |
| 12306 | Darwin/*) |
| 12307 | _CUR_CFLAGS="${CFLAGS}" |
| 12308 | _CUR_LDFLAGS="${LDFLAGS}" |
| 12309 | CFLAGS="${CFLAGS} -Wl,-search_paths_first" |
| 12310 | LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib" |
| 12311 | ;; |
| 12312 | esac |
| 12313 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12314 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5 |
| 12315 | $as_echo_n "checking for inflateCopy in -lz... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12316 | if ${ac_cv_lib_z_inflateCopy+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12317 | $as_echo_n "(cached) " >&6 |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 12318 | else |
| 12319 | ac_check_lib_save_LIBS=$LIBS |
| 12320 | LIBS="-lz $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12321 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 12322 | /* end confdefs.h. */ |
| 12323 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12324 | /* Override any GCC internal prototype to avoid an error. |
| 12325 | Use char because int might match the return type of a GCC |
| 12326 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 12327 | #ifdef __cplusplus |
| 12328 | extern "C" |
| 12329 | #endif |
| 12330 | char inflateCopy (); |
| 12331 | int |
| 12332 | main () |
| 12333 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12334 | return inflateCopy (); |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 12335 | ; |
| 12336 | return 0; |
| 12337 | } |
| 12338 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12339 | if ac_fn_c_try_link "$LINENO"; then : |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 12340 | ac_cv_lib_z_inflateCopy=yes |
| 12341 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12342 | ac_cv_lib_z_inflateCopy=no |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 12343 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12344 | rm -f core conftest.err conftest.$ac_objext \ |
| 12345 | conftest$ac_exeext conftest.$ac_ext |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 12346 | LIBS=$ac_check_lib_save_LIBS |
| 12347 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12348 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5 |
| 12349 | $as_echo "$ac_cv_lib_z_inflateCopy" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12350 | if test "x$ac_cv_lib_z_inflateCopy" = xyes; then : |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 12351 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12352 | $as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 12353 | |
| 12354 | fi |
| 12355 | |
| 12356 | |
| 12357 | case $ac_sys_system/$ac_sys_release in |
| 12358 | Darwin/*) |
| 12359 | CFLAGS="${_CUR_CFLAGS}" |
| 12360 | LDFLAGS="${_CUR_LDFLAGS}" |
| 12361 | ;; |
| 12362 | esac |
| 12363 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12364 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5 |
| 12365 | $as_echo_n "checking for hstrerror... " >&6; } |
| 12366 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12367 | /* end confdefs.h. */ |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12368 | |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12369 | #include <netdb.h> |
| 12370 | |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12371 | int |
| 12372 | main () |
| 12373 | { |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12374 | void* p = hstrerror; hstrerror(0) |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12375 | ; |
| 12376 | return 0; |
| 12377 | } |
| 12378 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12379 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12380 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12381 | $as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12382 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 12383 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12384 | $as_echo "yes" >&6; } |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12385 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12386 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 12387 | $as_echo "no" >&6; } |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12388 | |
| 12389 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12390 | rm -f core conftest.err conftest.$ac_objext \ |
| 12391 | conftest$ac_exeext conftest.$ac_ext |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12392 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12393 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5 |
| 12394 | $as_echo_n "checking for inet_aton... " >&6; } |
| 12395 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12396 | /* end confdefs.h. */ |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12397 | |
Martin v. Löwis | 86d6626 | 2006-02-17 08:40:11 +0000 | [diff] [blame] | 12398 | #include <sys/types.h> |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12399 | #include <sys/socket.h> |
| 12400 | #include <netinet/in.h> |
| 12401 | #include <arpa/inet.h> |
| 12402 | |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12403 | int |
| 12404 | main () |
| 12405 | { |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12406 | void* p = inet_aton;inet_aton(0,0) |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12407 | ; |
| 12408 | return 0; |
| 12409 | } |
| 12410 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12411 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12412 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12413 | $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12414 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 12415 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12416 | $as_echo "yes" >&6; } |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12417 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12418 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 12419 | $as_echo "no" >&6; } |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12420 | |
| 12421 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12422 | rm -f core conftest.err conftest.$ac_objext \ |
| 12423 | conftest$ac_exeext conftest.$ac_ext |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12424 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12425 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5 |
| 12426 | $as_echo_n "checking for inet_pton... " >&6; } |
| 12427 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12428 | /* end confdefs.h. */ |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12429 | |
Martin v. Löwis | f2e488d | 2003-05-05 22:00:11 +0000 | [diff] [blame] | 12430 | #include <sys/types.h> |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12431 | #include <sys/socket.h> |
| 12432 | #include <netinet/in.h> |
| 12433 | #include <arpa/inet.h> |
| 12434 | |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12435 | int |
| 12436 | main () |
| 12437 | { |
| 12438 | void* p = inet_pton |
| 12439 | ; |
| 12440 | return 0; |
| 12441 | } |
| 12442 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12443 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12444 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12445 | $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12446 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 12447 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12448 | $as_echo "yes" >&6; } |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12449 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12450 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 12451 | $as_echo "no" >&6; } |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12452 | |
| 12453 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12454 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12455 | |
Martin v. Löwis | d6640d4 | 2003-07-06 09:29:52 +0000 | [diff] [blame] | 12456 | # On some systems, setgroups is in unistd.h, on others, in grp.h |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12457 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5 |
| 12458 | $as_echo_n "checking for setgroups... " >&6; } |
| 12459 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12460 | /* end confdefs.h. */ |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 12461 | |
Martin v. Löwis | f2e488d | 2003-05-05 22:00:11 +0000 | [diff] [blame] | 12462 | #include <unistd.h> |
Martin v. Löwis | d6640d4 | 2003-07-06 09:29:52 +0000 | [diff] [blame] | 12463 | #ifdef HAVE_GRP_H |
| 12464 | #include <grp.h> |
| 12465 | #endif |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 12466 | |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 12467 | int |
| 12468 | main () |
| 12469 | { |
| 12470 | void* p = setgroups |
| 12471 | ; |
| 12472 | return 0; |
| 12473 | } |
| 12474 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12475 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 12476 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12477 | $as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 12478 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 12479 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12480 | $as_echo "yes" >&6; } |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 12481 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12482 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 12483 | $as_echo "no" >&6; } |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 12484 | |
| 12485 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12486 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 12487 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 12488 | # check for openpty and forkpty |
| 12489 | |
| 12490 | for ac_func in openpty |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12491 | do : |
| 12492 | ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12493 | if test "x$ac_cv_func_openpty" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12494 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12495 | #define HAVE_OPENPTY 1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12496 | _ACEOF |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 12497 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 12498 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12499 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5 |
| 12500 | $as_echo_n "checking for openpty in -lutil... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12501 | if ${ac_cv_lib_util_openpty+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12502 | $as_echo_n "(cached) " >&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12503 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12504 | ac_check_lib_save_LIBS=$LIBS |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12505 | LIBS="-lutil $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12506 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12507 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12508 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12509 | /* Override any GCC internal prototype to avoid an error. |
| 12510 | Use char because int might match the return type of a GCC |
| 12511 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12512 | #ifdef __cplusplus |
| 12513 | extern "C" |
| 12514 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12515 | char openpty (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12516 | int |
| 12517 | main () |
| 12518 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12519 | return openpty (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12520 | ; |
| 12521 | return 0; |
| 12522 | } |
| 12523 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12524 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12525 | ac_cv_lib_util_openpty=yes |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12526 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12527 | ac_cv_lib_util_openpty=no |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12528 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12529 | rm -f core conftest.err conftest.$ac_objext \ |
| 12530 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12531 | LIBS=$ac_check_lib_save_LIBS |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12532 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12533 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5 |
| 12534 | $as_echo "$ac_cv_lib_util_openpty" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12535 | if test "x$ac_cv_lib_util_openpty" = xyes; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12536 | $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12537 | LIBS="$LIBS -lutil" |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12538 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12539 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5 |
| 12540 | $as_echo_n "checking for openpty in -lbsd... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12541 | if ${ac_cv_lib_bsd_openpty+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12542 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12543 | else |
| 12544 | ac_check_lib_save_LIBS=$LIBS |
| 12545 | LIBS="-lbsd $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12546 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12547 | /* end confdefs.h. */ |
| 12548 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12549 | /* Override any GCC internal prototype to avoid an error. |
| 12550 | Use char because int might match the return type of a GCC |
| 12551 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12552 | #ifdef __cplusplus |
| 12553 | extern "C" |
| 12554 | #endif |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12555 | char openpty (); |
| 12556 | int |
| 12557 | main () |
| 12558 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12559 | return openpty (); |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12560 | ; |
| 12561 | return 0; |
| 12562 | } |
| 12563 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12564 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12565 | ac_cv_lib_bsd_openpty=yes |
| 12566 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12567 | ac_cv_lib_bsd_openpty=no |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12568 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12569 | rm -f core conftest.err conftest.$ac_objext \ |
| 12570 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12571 | LIBS=$ac_check_lib_save_LIBS |
| 12572 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12573 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5 |
| 12574 | $as_echo "$ac_cv_lib_bsd_openpty" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12575 | if test "x$ac_cv_lib_bsd_openpty" = xyes; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12576 | $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12577 | LIBS="$LIBS -lbsd" |
| 12578 | fi |
| 12579 | |
| 12580 | |
| 12581 | fi |
| 12582 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12583 | |
| 12584 | fi |
| 12585 | done |
| 12586 | |
| 12587 | for ac_func in forkpty |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12588 | do : |
| 12589 | ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12590 | if test "x$ac_cv_func_forkpty" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12591 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12592 | #define HAVE_FORKPTY 1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12593 | _ACEOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12594 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12595 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12596 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5 |
| 12597 | $as_echo_n "checking for forkpty in -lutil... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12598 | if ${ac_cv_lib_util_forkpty+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12599 | $as_echo_n "(cached) " >&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12600 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12601 | ac_check_lib_save_LIBS=$LIBS |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12602 | LIBS="-lutil $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12603 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12604 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12605 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12606 | /* Override any GCC internal prototype to avoid an error. |
| 12607 | Use char because int might match the return type of a GCC |
| 12608 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12609 | #ifdef __cplusplus |
| 12610 | extern "C" |
| 12611 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12612 | char forkpty (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12613 | int |
| 12614 | main () |
| 12615 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12616 | return forkpty (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12617 | ; |
| 12618 | return 0; |
| 12619 | } |
| 12620 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12621 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12622 | ac_cv_lib_util_forkpty=yes |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12623 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12624 | ac_cv_lib_util_forkpty=no |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12625 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12626 | rm -f core conftest.err conftest.$ac_objext \ |
| 12627 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12628 | LIBS=$ac_check_lib_save_LIBS |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12629 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12630 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5 |
| 12631 | $as_echo "$ac_cv_lib_util_forkpty" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12632 | if test "x$ac_cv_lib_util_forkpty" = xyes; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12633 | $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12634 | LIBS="$LIBS -lutil" |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12635 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12636 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5 |
| 12637 | $as_echo_n "checking for forkpty in -lbsd... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12638 | if ${ac_cv_lib_bsd_forkpty+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12639 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12640 | else |
| 12641 | ac_check_lib_save_LIBS=$LIBS |
| 12642 | LIBS="-lbsd $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12643 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12644 | /* end confdefs.h. */ |
| 12645 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12646 | /* Override any GCC internal prototype to avoid an error. |
| 12647 | Use char because int might match the return type of a GCC |
| 12648 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12649 | #ifdef __cplusplus |
| 12650 | extern "C" |
| 12651 | #endif |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12652 | char forkpty (); |
| 12653 | int |
| 12654 | main () |
| 12655 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12656 | return forkpty (); |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12657 | ; |
| 12658 | return 0; |
| 12659 | } |
| 12660 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12661 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12662 | ac_cv_lib_bsd_forkpty=yes |
| 12663 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12664 | ac_cv_lib_bsd_forkpty=no |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12665 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12666 | rm -f core conftest.err conftest.$ac_objext \ |
| 12667 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12668 | LIBS=$ac_check_lib_save_LIBS |
| 12669 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12670 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5 |
| 12671 | $as_echo "$ac_cv_lib_bsd_forkpty" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12672 | if test "x$ac_cv_lib_bsd_forkpty" = xyes; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12673 | $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12674 | LIBS="$LIBS -lbsd" |
| 12675 | fi |
| 12676 | |
| 12677 | |
| 12678 | fi |
| 12679 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12680 | |
| 12681 | fi |
| 12682 | done |
| 12683 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 12684 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 12685 | # check for long file support functions |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12686 | for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12687 | do : |
| 12688 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
| 12689 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 12690 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12691 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12692 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12693 | _ACEOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 12694 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 12695 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 12696 | done |
| 12697 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 12698 | |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 12699 | ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12700 | if test "x$ac_cv_func_dup2" = xyes; then : |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 12701 | $as_echo "#define HAVE_DUP2 1" >>confdefs.h |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 12702 | |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 12703 | else |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12704 | case " $LIBOBJS " in |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 12705 | *" dup2.$ac_objext "* ) ;; |
| 12706 | *) LIBOBJS="$LIBOBJS dup2.$ac_objext" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12707 | ;; |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 12708 | esac |
| 12709 | |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 12710 | fi |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 12711 | |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 12712 | ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12713 | if test "x$ac_cv_func_strdup" = xyes; then : |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 12714 | $as_echo "#define HAVE_STRDUP 1" >>confdefs.h |
| 12715 | |
| 12716 | else |
| 12717 | case " $LIBOBJS " in |
| 12718 | *" strdup.$ac_objext "* ) ;; |
| 12719 | *) LIBOBJS="$LIBOBJS strdup.$ac_objext" |
| 12720 | ;; |
| 12721 | esac |
| 12722 | |
| 12723 | fi |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 12724 | |
| 12725 | |
| 12726 | for ac_func in getpgrp |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12727 | do : |
| 12728 | ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12729 | if test "x$ac_cv_func_getpgrp" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12730 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12731 | #define HAVE_GETPGRP 1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12732 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12733 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12734 | /* end confdefs.h. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 12735 | #include <unistd.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12736 | int |
| 12737 | main () |
| 12738 | { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 12739 | getpgrp(0); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12740 | ; |
| 12741 | return 0; |
| 12742 | } |
| 12743 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12744 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12745 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12746 | $as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12747 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 12748 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12749 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 12750 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 12751 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 12752 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 12753 | |
Jack Jansen | 150753c | 2003-03-29 22:07:47 +0000 | [diff] [blame] | 12754 | for ac_func in setpgrp |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12755 | do : |
| 12756 | ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12757 | if test "x$ac_cv_func_setpgrp" = xyes; then : |
Jack Jansen | 150753c | 2003-03-29 22:07:47 +0000 | [diff] [blame] | 12758 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12759 | #define HAVE_SETPGRP 1 |
Jack Jansen | 150753c | 2003-03-29 22:07:47 +0000 | [diff] [blame] | 12760 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12761 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12762 | /* end confdefs.h. */ |
Jack Jansen | 150753c | 2003-03-29 22:07:47 +0000 | [diff] [blame] | 12763 | #include <unistd.h> |
Jack Jansen | 150753c | 2003-03-29 22:07:47 +0000 | [diff] [blame] | 12764 | int |
| 12765 | main () |
| 12766 | { |
| 12767 | setpgrp(0,0); |
| 12768 | ; |
| 12769 | return 0; |
| 12770 | } |
| 12771 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12772 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12773 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12774 | $as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12775 | |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 12776 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12777 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Jack Jansen | 150753c | 2003-03-29 22:07:47 +0000 | [diff] [blame] | 12778 | |
| 12779 | fi |
| 12780 | done |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 12781 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 12782 | |
Gregory P. Smith | 387512c | 2018-12-30 15:42:32 -0800 | [diff] [blame] | 12783 | # We search for both crypt and crypt_r as one or the other may be defined |
| 12784 | # This gets us our -lcrypt in LIBS when required on the target platform. |
| 12785 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5 |
| 12786 | $as_echo_n "checking for library containing crypt... " >&6; } |
| 12787 | if ${ac_cv_search_crypt+:} false; then : |
| 12788 | $as_echo_n "(cached) " >&6 |
| 12789 | else |
| 12790 | ac_func_search_save_LIBS=$LIBS |
| 12791 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12792 | /* end confdefs.h. */ |
| 12793 | |
| 12794 | /* Override any GCC internal prototype to avoid an error. |
| 12795 | Use char because int might match the return type of a GCC |
| 12796 | builtin and then its argument prototype would still apply. */ |
| 12797 | #ifdef __cplusplus |
| 12798 | extern "C" |
| 12799 | #endif |
| 12800 | char crypt (); |
| 12801 | int |
| 12802 | main () |
| 12803 | { |
| 12804 | return crypt (); |
| 12805 | ; |
| 12806 | return 0; |
| 12807 | } |
| 12808 | _ACEOF |
| 12809 | for ac_lib in '' crypt; do |
| 12810 | if test -z "$ac_lib"; then |
| 12811 | ac_res="none required" |
| 12812 | else |
| 12813 | ac_res=-l$ac_lib |
| 12814 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
| 12815 | fi |
| 12816 | if ac_fn_c_try_link "$LINENO"; then : |
| 12817 | ac_cv_search_crypt=$ac_res |
| 12818 | fi |
| 12819 | rm -f core conftest.err conftest.$ac_objext \ |
| 12820 | conftest$ac_exeext |
| 12821 | if ${ac_cv_search_crypt+:} false; then : |
| 12822 | break |
| 12823 | fi |
| 12824 | done |
| 12825 | if ${ac_cv_search_crypt+:} false; then : |
| 12826 | |
| 12827 | else |
| 12828 | ac_cv_search_crypt=no |
| 12829 | fi |
| 12830 | rm conftest.$ac_ext |
| 12831 | LIBS=$ac_func_search_save_LIBS |
| 12832 | fi |
| 12833 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5 |
| 12834 | $as_echo "$ac_cv_search_crypt" >&6; } |
| 12835 | ac_res=$ac_cv_search_crypt |
| 12836 | if test "$ac_res" != no; then : |
| 12837 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
| 12838 | |
| 12839 | fi |
| 12840 | |
| 12841 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt_r" >&5 |
| 12842 | $as_echo_n "checking for library containing crypt_r... " >&6; } |
| 12843 | if ${ac_cv_search_crypt_r+:} false; then : |
| 12844 | $as_echo_n "(cached) " >&6 |
| 12845 | else |
| 12846 | ac_func_search_save_LIBS=$LIBS |
| 12847 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12848 | /* end confdefs.h. */ |
| 12849 | |
| 12850 | /* Override any GCC internal prototype to avoid an error. |
| 12851 | Use char because int might match the return type of a GCC |
| 12852 | builtin and then its argument prototype would still apply. */ |
| 12853 | #ifdef __cplusplus |
| 12854 | extern "C" |
| 12855 | #endif |
| 12856 | char crypt_r (); |
| 12857 | int |
| 12858 | main () |
| 12859 | { |
| 12860 | return crypt_r (); |
| 12861 | ; |
| 12862 | return 0; |
| 12863 | } |
| 12864 | _ACEOF |
| 12865 | for ac_lib in '' crypt; do |
| 12866 | if test -z "$ac_lib"; then |
| 12867 | ac_res="none required" |
| 12868 | else |
| 12869 | ac_res=-l$ac_lib |
| 12870 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
| 12871 | fi |
| 12872 | if ac_fn_c_try_link "$LINENO"; then : |
| 12873 | ac_cv_search_crypt_r=$ac_res |
| 12874 | fi |
| 12875 | rm -f core conftest.err conftest.$ac_objext \ |
| 12876 | conftest$ac_exeext |
| 12877 | if ${ac_cv_search_crypt_r+:} false; then : |
| 12878 | break |
| 12879 | fi |
| 12880 | done |
| 12881 | if ${ac_cv_search_crypt_r+:} false; then : |
| 12882 | |
| 12883 | else |
| 12884 | ac_cv_search_crypt_r=no |
| 12885 | fi |
| 12886 | rm conftest.$ac_ext |
| 12887 | LIBS=$ac_func_search_save_LIBS |
| 12888 | fi |
| 12889 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5 |
| 12890 | $as_echo "$ac_cv_search_crypt_r" >&6; } |
| 12891 | ac_res=$ac_cv_search_crypt_r |
| 12892 | if test "$ac_res" != no; then : |
| 12893 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
| 12894 | |
| 12895 | fi |
| 12896 | |
| 12897 | |
| 12898 | ac_fn_c_check_func "$LINENO" "crypt_r" "ac_cv_func_crypt_r" |
| 12899 | if test "x$ac_cv_func_crypt_r" = xyes; then : |
| 12900 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12901 | /* end confdefs.h. */ |
| 12902 | |
| 12903 | #define _GNU_SOURCE /* Required for crypt_r()'s prototype in glibc. */ |
| 12904 | #include <crypt.h> |
| 12905 | |
| 12906 | int |
| 12907 | main () |
| 12908 | { |
| 12909 | |
| 12910 | struct crypt_data d; |
| 12911 | char *r = crypt_r("", "", &d); |
| 12912 | |
| 12913 | ; |
| 12914 | return 0; |
| 12915 | } |
| 12916 | _ACEOF |
| 12917 | if ac_fn_c_try_compile "$LINENO"; then : |
| 12918 | |
| 12919 | $as_echo "#define HAVE_CRYPT_R 1" >>confdefs.h |
| 12920 | |
| 12921 | fi |
| 12922 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 12923 | |
| 12924 | fi |
| 12925 | |
| 12926 | |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12927 | for ac_func in clock_gettime |
| 12928 | do : |
| 12929 | ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" |
| 12930 | if test "x$ac_cv_func_clock_gettime" = xyes; then : |
| 12931 | cat >>confdefs.h <<_ACEOF |
| 12932 | #define HAVE_CLOCK_GETTIME 1 |
| 12933 | _ACEOF |
| 12934 | |
| 12935 | else |
| 12936 | |
| 12937 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 |
| 12938 | $as_echo_n "checking for clock_gettime in -lrt... " >&6; } |
| 12939 | if ${ac_cv_lib_rt_clock_gettime+:} false; then : |
| 12940 | $as_echo_n "(cached) " >&6 |
| 12941 | else |
| 12942 | ac_check_lib_save_LIBS=$LIBS |
| 12943 | LIBS="-lrt $LIBS" |
| 12944 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12945 | /* end confdefs.h. */ |
| 12946 | |
| 12947 | /* Override any GCC internal prototype to avoid an error. |
| 12948 | Use char because int might match the return type of a GCC |
| 12949 | builtin and then its argument prototype would still apply. */ |
| 12950 | #ifdef __cplusplus |
| 12951 | extern "C" |
| 12952 | #endif |
| 12953 | char clock_gettime (); |
| 12954 | int |
| 12955 | main () |
| 12956 | { |
| 12957 | return clock_gettime (); |
| 12958 | ; |
| 12959 | return 0; |
| 12960 | } |
| 12961 | _ACEOF |
| 12962 | if ac_fn_c_try_link "$LINENO"; then : |
| 12963 | ac_cv_lib_rt_clock_gettime=yes |
| 12964 | else |
| 12965 | ac_cv_lib_rt_clock_gettime=no |
| 12966 | fi |
| 12967 | rm -f core conftest.err conftest.$ac_objext \ |
| 12968 | conftest$ac_exeext conftest.$ac_ext |
| 12969 | LIBS=$ac_check_lib_save_LIBS |
| 12970 | fi |
| 12971 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 |
| 12972 | $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } |
| 12973 | if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : |
| 12974 | |
Victor Stinner | 7efb833 | 2014-08-29 15:41:08 +0200 | [diff] [blame] | 12975 | LIBS="$LIBS -lrt" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12976 | $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h |
| 12977 | |
| 12978 | |
| 12979 | $as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h |
| 12980 | |
| 12981 | |
| 12982 | fi |
| 12983 | |
| 12984 | |
| 12985 | fi |
| 12986 | done |
| 12987 | |
| 12988 | |
| 12989 | for ac_func in clock_getres |
| 12990 | do : |
| 12991 | ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres" |
| 12992 | if test "x$ac_cv_func_clock_getres" = xyes; then : |
| 12993 | cat >>confdefs.h <<_ACEOF |
| 12994 | #define HAVE_CLOCK_GETRES 1 |
| 12995 | _ACEOF |
| 12996 | |
| 12997 | else |
| 12998 | |
| 12999 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5 |
| 13000 | $as_echo_n "checking for clock_getres in -lrt... " >&6; } |
| 13001 | if ${ac_cv_lib_rt_clock_getres+:} false; then : |
| 13002 | $as_echo_n "(cached) " >&6 |
| 13003 | else |
| 13004 | ac_check_lib_save_LIBS=$LIBS |
| 13005 | LIBS="-lrt $LIBS" |
| 13006 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 13007 | /* end confdefs.h. */ |
| 13008 | |
| 13009 | /* Override any GCC internal prototype to avoid an error. |
| 13010 | Use char because int might match the return type of a GCC |
| 13011 | builtin and then its argument prototype would still apply. */ |
| 13012 | #ifdef __cplusplus |
| 13013 | extern "C" |
| 13014 | #endif |
| 13015 | char clock_getres (); |
| 13016 | int |
| 13017 | main () |
| 13018 | { |
| 13019 | return clock_getres (); |
| 13020 | ; |
| 13021 | return 0; |
| 13022 | } |
| 13023 | _ACEOF |
| 13024 | if ac_fn_c_try_link "$LINENO"; then : |
| 13025 | ac_cv_lib_rt_clock_getres=yes |
| 13026 | else |
| 13027 | ac_cv_lib_rt_clock_getres=no |
| 13028 | fi |
| 13029 | rm -f core conftest.err conftest.$ac_objext \ |
| 13030 | conftest$ac_exeext conftest.$ac_ext |
| 13031 | LIBS=$ac_check_lib_save_LIBS |
| 13032 | fi |
| 13033 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5 |
| 13034 | $as_echo "$ac_cv_lib_rt_clock_getres" >&6; } |
| 13035 | if test "x$ac_cv_lib_rt_clock_getres" = xyes; then : |
| 13036 | |
| 13037 | $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h |
| 13038 | |
| 13039 | |
| 13040 | fi |
| 13041 | |
| 13042 | |
| 13043 | fi |
| 13044 | done |
| 13045 | |
| 13046 | |
Benjamin Peterson | 37098cd | 2016-09-13 22:55:09 -0700 | [diff] [blame] | 13047 | for ac_func in clock_settime |
| 13048 | do : |
| 13049 | ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime" |
| 13050 | if test "x$ac_cv_func_clock_settime" = xyes; then : |
| 13051 | cat >>confdefs.h <<_ACEOF |
| 13052 | #define HAVE_CLOCK_SETTIME 1 |
| 13053 | _ACEOF |
| 13054 | |
| 13055 | else |
| 13056 | |
| 13057 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5 |
| 13058 | $as_echo_n "checking for clock_settime in -lrt... " >&6; } |
| 13059 | if ${ac_cv_lib_rt_clock_settime+:} false; then : |
| 13060 | $as_echo_n "(cached) " >&6 |
| 13061 | else |
| 13062 | ac_check_lib_save_LIBS=$LIBS |
| 13063 | LIBS="-lrt $LIBS" |
| 13064 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 13065 | /* end confdefs.h. */ |
| 13066 | |
| 13067 | /* Override any GCC internal prototype to avoid an error. |
| 13068 | Use char because int might match the return type of a GCC |
| 13069 | builtin and then its argument prototype would still apply. */ |
| 13070 | #ifdef __cplusplus |
| 13071 | extern "C" |
| 13072 | #endif |
| 13073 | char clock_settime (); |
| 13074 | int |
| 13075 | main () |
| 13076 | { |
| 13077 | return clock_settime (); |
| 13078 | ; |
| 13079 | return 0; |
| 13080 | } |
| 13081 | _ACEOF |
| 13082 | if ac_fn_c_try_link "$LINENO"; then : |
| 13083 | ac_cv_lib_rt_clock_settime=yes |
| 13084 | else |
| 13085 | ac_cv_lib_rt_clock_settime=no |
| 13086 | fi |
| 13087 | rm -f core conftest.err conftest.$ac_objext \ |
| 13088 | conftest$ac_exeext conftest.$ac_ext |
| 13089 | LIBS=$ac_check_lib_save_LIBS |
| 13090 | fi |
| 13091 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5 |
| 13092 | $as_echo "$ac_cv_lib_rt_clock_settime" >&6; } |
| 13093 | if test "x$ac_cv_lib_rt_clock_settime" = xyes; then : |
| 13094 | |
| 13095 | $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h |
| 13096 | |
| 13097 | |
| 13098 | fi |
| 13099 | |
| 13100 | |
| 13101 | fi |
| 13102 | done |
| 13103 | |
| 13104 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13105 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5 |
| 13106 | $as_echo_n "checking for major... " >&6; } |
| 13107 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13108 | /* end confdefs.h. */ |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 13109 | |
Neal Norwitz | 6eb37f0 | 2003-02-23 23:28:15 +0000 | [diff] [blame] | 13110 | #if defined(MAJOR_IN_MKDEV) |
| 13111 | #include <sys/mkdev.h> |
| 13112 | #elif defined(MAJOR_IN_SYSMACROS) |
| 13113 | #include <sys/sysmacros.h> |
| 13114 | #else |
| 13115 | #include <sys/types.h> |
| 13116 | #endif |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 13117 | |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 13118 | int |
| 13119 | main () |
| 13120 | { |
| 13121 | |
| 13122 | makedev(major(0),minor(0)); |
| 13123 | |
| 13124 | ; |
| 13125 | return 0; |
| 13126 | } |
| 13127 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13128 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 13129 | |
| 13130 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13131 | $as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 13132 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13133 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 13134 | $as_echo "yes" >&6; } |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 13135 | |
| 13136 | else |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13137 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13138 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 13139 | $as_echo "no" >&6; } |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 13140 | |
| 13141 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13142 | rm -f core conftest.err conftest.$ac_objext \ |
| 13143 | conftest$ac_exeext conftest.$ac_ext |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 13144 | |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 13145 | # On OSF/1 V5.1, getaddrinfo is available, but a define |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13146 | # for [no]getaddrinfo in netdb.h. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13147 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5 |
| 13148 | $as_echo_n "checking for getaddrinfo... " >&6; } |
| 13149 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13150 | /* end confdefs.h. */ |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 13151 | |
Martin v. Löwis | c010b6d | 2001-11-09 17:50:52 +0000 | [diff] [blame] | 13152 | #include <sys/types.h> |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 13153 | #include <sys/socket.h> |
| 13154 | #include <netdb.h> |
Martin v. Löwis | c010b6d | 2001-11-09 17:50:52 +0000 | [diff] [blame] | 13155 | #include <stdio.h> |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13156 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13157 | int |
| 13158 | main () |
| 13159 | { |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 13160 | getaddrinfo(NULL, NULL, NULL, NULL); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13161 | ; |
| 13162 | return 0; |
| 13163 | } |
| 13164 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13165 | if ac_fn_c_try_link "$LINENO"; then : |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 13166 | have_getaddrinfo=yes |
| 13167 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13168 | have_getaddrinfo=no |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 13169 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13170 | rm -f core conftest.err conftest.$ac_objext \ |
| 13171 | conftest$ac_exeext conftest.$ac_ext |
| 13172 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5 |
| 13173 | $as_echo "$have_getaddrinfo" >&6; } |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 13174 | if test $have_getaddrinfo = yes |
| 13175 | then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13176 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5 |
| 13177 | $as_echo_n "checking getaddrinfo bug... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13178 | if ${ac_cv_buggy_getaddrinfo+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13179 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 13180 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13181 | if test "$cross_compiling" = yes; then : |
Matthias Klose | 9635013 | 2012-03-15 20:42:23 +0100 | [diff] [blame] | 13182 | |
| 13183 | if test "${enable_ipv6+set}" = set; then |
| 13184 | ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6" |
| 13185 | else |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 13186 | ac_cv_buggy_getaddrinfo=yes |
Matthias Klose | 9635013 | 2012-03-15 20:42:23 +0100 | [diff] [blame] | 13187 | fi |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13188 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13189 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13190 | /* end confdefs.h. */ |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13191 | |
Stefan Krah | 19c2139 | 2012-11-22 23:47:32 +0100 | [diff] [blame] | 13192 | #include <stdio.h> |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13193 | #include <sys/types.h> |
| 13194 | #include <netdb.h> |
| 13195 | #include <string.h> |
| 13196 | #include <sys/socket.h> |
| 13197 | #include <netinet/in.h> |
| 13198 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 13199 | int main() |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13200 | { |
| 13201 | int passive, gaierr, inet4 = 0, inet6 = 0; |
| 13202 | struct addrinfo hints, *ai, *aitop; |
| 13203 | char straddr[INET6_ADDRSTRLEN], strport[16]; |
| 13204 | |
| 13205 | for (passive = 0; passive <= 1; passive++) { |
| 13206 | memset(&hints, 0, sizeof(hints)); |
| 13207 | hints.ai_family = AF_UNSPEC; |
| 13208 | hints.ai_flags = passive ? AI_PASSIVE : 0; |
| 13209 | hints.ai_socktype = SOCK_STREAM; |
Hye-Shik Chang | 54f9439 | 2004-04-14 07:55:31 +0000 | [diff] [blame] | 13210 | hints.ai_protocol = IPPROTO_TCP; |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13211 | if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { |
| 13212 | (void)gai_strerror(gaierr); |
| 13213 | goto bad; |
| 13214 | } |
| 13215 | for (ai = aitop; ai; ai = ai->ai_next) { |
| 13216 | if (ai->ai_addr == NULL || |
| 13217 | ai->ai_addrlen == 0 || |
| 13218 | getnameinfo(ai->ai_addr, ai->ai_addrlen, |
| 13219 | straddr, sizeof(straddr), strport, sizeof(strport), |
| 13220 | NI_NUMERICHOST|NI_NUMERICSERV) != 0) { |
| 13221 | goto bad; |
| 13222 | } |
| 13223 | switch (ai->ai_family) { |
| 13224 | case AF_INET: |
| 13225 | if (strcmp(strport, "54321") != 0) { |
| 13226 | goto bad; |
| 13227 | } |
| 13228 | if (passive) { |
| 13229 | if (strcmp(straddr, "0.0.0.0") != 0) { |
| 13230 | goto bad; |
| 13231 | } |
| 13232 | } else { |
| 13233 | if (strcmp(straddr, "127.0.0.1") != 0) { |
| 13234 | goto bad; |
| 13235 | } |
| 13236 | } |
| 13237 | inet4++; |
| 13238 | break; |
| 13239 | case AF_INET6: |
| 13240 | if (strcmp(strport, "54321") != 0) { |
| 13241 | goto bad; |
| 13242 | } |
| 13243 | if (passive) { |
| 13244 | if (strcmp(straddr, "::") != 0) { |
| 13245 | goto bad; |
| 13246 | } |
| 13247 | } else { |
| 13248 | if (strcmp(straddr, "::1") != 0) { |
| 13249 | goto bad; |
| 13250 | } |
| 13251 | } |
| 13252 | inet6++; |
| 13253 | break; |
| 13254 | case AF_UNSPEC: |
| 13255 | goto bad; |
| 13256 | break; |
| 13257 | default: |
| 13258 | /* another family support? */ |
| 13259 | break; |
| 13260 | } |
| 13261 | } |
Benjamin Peterson | 01c340d | 2016-09-06 15:54:24 -0700 | [diff] [blame] | 13262 | freeaddrinfo(aitop); |
| 13263 | aitop = NULL; |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13264 | } |
| 13265 | |
| 13266 | if (!(inet4 == 0 || inet4 == 2)) |
| 13267 | goto bad; |
| 13268 | if (!(inet6 == 0 || inet6 == 2)) |
| 13269 | goto bad; |
| 13270 | |
| 13271 | if (aitop) |
| 13272 | freeaddrinfo(aitop); |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 13273 | return 0; |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13274 | |
| 13275 | bad: |
| 13276 | if (aitop) |
| 13277 | freeaddrinfo(aitop); |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 13278 | return 1; |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13279 | } |
| 13280 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13281 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13282 | if ac_fn_c_try_run "$LINENO"; then : |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 13283 | ac_cv_buggy_getaddrinfo=no |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13284 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13285 | ac_cv_buggy_getaddrinfo=yes |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13286 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13287 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 13288 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13289 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13290 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 13291 | fi |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13292 | |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 13293 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13294 | |
Benjamin Peterson | d4694ed | 2010-11-01 01:44:30 +0000 | [diff] [blame] | 13295 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5 |
| 13296 | $as_echo "$ac_cv_buggy_getaddrinfo" >&6; } |
| 13297 | |
doko@ubuntu.com | 9c7817e | 2012-06-30 17:05:13 +0200 | [diff] [blame] | 13298 | if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 13299 | then |
| 13300 | if test $ipv6 = yes |
| 13301 | then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13302 | echo 'Fatal: You must get working getaddrinfo() function.' |
| 13303 | echo ' or you can specify "--disable-ipv6"'. |
| 13304 | exit 1 |
| 13305 | fi |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 13306 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13307 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13308 | $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 13309 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13310 | fi |
Benjamin Peterson | d4694ed | 2010-11-01 01:44:30 +0000 | [diff] [blame] | 13311 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 13312 | for ac_func in getnameinfo |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13313 | do : |
| 13314 | ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13315 | if test "x$ac_cv_func_getnameinfo" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13316 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13317 | #define HAVE_GETNAMEINFO 1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13318 | _ACEOF |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13319 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13320 | fi |
| 13321 | done |
| 13322 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 13323 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13324 | # checks for structures |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13325 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 |
| 13326 | $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13327 | if ${ac_cv_header_time+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13328 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13329 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13330 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13331 | /* end confdefs.h. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13332 | #include <sys/types.h> |
| 13333 | #include <sys/time.h> |
| 13334 | #include <time.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13335 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13336 | int |
| 13337 | main () |
| 13338 | { |
| 13339 | if ((struct tm *) 0) |
| 13340 | return 0; |
| 13341 | ; |
| 13342 | return 0; |
| 13343 | } |
| 13344 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13345 | if ac_fn_c_try_compile "$LINENO"; then : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13346 | ac_cv_header_time=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13347 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13348 | ac_cv_header_time=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13349 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13350 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13351 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13352 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 |
| 13353 | $as_echo "$ac_cv_header_time" >&6; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 13354 | if test $ac_cv_header_time = yes; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13355 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13356 | $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13357 | |
| 13358 | fi |
| 13359 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13360 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 |
| 13361 | $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13362 | if ${ac_cv_struct_tm+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13363 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13364 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13365 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13366 | /* end confdefs.h. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13367 | #include <sys/types.h> |
| 13368 | #include <time.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13369 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13370 | int |
| 13371 | main () |
| 13372 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13373 | struct tm tm; |
| 13374 | int *p = &tm.tm_sec; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13375 | return !p; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13376 | ; |
| 13377 | return 0; |
| 13378 | } |
| 13379 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13380 | if ac_fn_c_try_compile "$LINENO"; then : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13381 | ac_cv_struct_tm=time.h |
| 13382 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13383 | ac_cv_struct_tm=sys/time.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13384 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13385 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13386 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13387 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 |
| 13388 | $as_echo "$ac_cv_struct_tm" >&6; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 13389 | if test $ac_cv_struct_tm = sys/time.h; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13390 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13391 | $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13392 | |
| 13393 | fi |
| 13394 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13395 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h> |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13396 | #include <$ac_cv_struct_tm> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13397 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13398 | " |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13399 | if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13400 | |
| 13401 | cat >>confdefs.h <<_ACEOF |
| 13402 | #define HAVE_STRUCT_TM_TM_ZONE 1 |
| 13403 | _ACEOF |
| 13404 | |
| 13405 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13406 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 13407 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13408 | if test "$ac_cv_member_struct_tm_tm_zone" = yes; then |
| 13409 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13410 | $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13411 | |
| 13412 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13413 | ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h> |
| 13414 | " |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13415 | if test "x$ac_cv_have_decl_tzname" = xyes; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13416 | ac_have_decl=1 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13417 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13418 | ac_have_decl=0 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13419 | fi |
| 13420 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13421 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13422 | #define HAVE_DECL_TZNAME $ac_have_decl |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13423 | _ACEOF |
| 13424 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13425 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 |
| 13426 | $as_echo_n "checking for tzname... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13427 | if ${ac_cv_var_tzname+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13428 | $as_echo_n "(cached) " >&6 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13429 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13430 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13431 | /* end confdefs.h. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13432 | #include <time.h> |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13433 | #if !HAVE_DECL_TZNAME |
| 13434 | extern char *tzname[]; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13435 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13436 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13437 | int |
| 13438 | main () |
| 13439 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13440 | return tzname[0][0]; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13441 | ; |
| 13442 | return 0; |
| 13443 | } |
| 13444 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13445 | if ac_fn_c_try_link "$LINENO"; then : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13446 | ac_cv_var_tzname=yes |
| 13447 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13448 | ac_cv_var_tzname=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13449 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13450 | rm -f core conftest.err conftest.$ac_objext \ |
| 13451 | conftest$ac_exeext conftest.$ac_ext |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13452 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13453 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 |
| 13454 | $as_echo "$ac_cv_var_tzname" >&6; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 13455 | if test $ac_cv_var_tzname = yes; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13456 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13457 | $as_echo "#define HAVE_TZNAME 1" >>confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13458 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13459 | fi |
| 13460 | fi |
| 13461 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13462 | ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13463 | if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13464 | |
| 13465 | cat >>confdefs.h <<_ACEOF |
| 13466 | #define HAVE_STRUCT_STAT_ST_RDEV 1 |
| 13467 | _ACEOF |
| 13468 | |
| 13469 | |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 13470 | fi |
| 13471 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13472 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13473 | if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 13474 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13475 | cat >>confdefs.h <<_ACEOF |
| 13476 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 |
| 13477 | _ACEOF |
| 13478 | |
| 13479 | |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 13480 | fi |
| 13481 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13482 | ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13483 | if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then : |
Hye-Shik Chang | 5f937a7 | 2005-06-02 13:09:30 +0000 | [diff] [blame] | 13484 | |
| 13485 | cat >>confdefs.h <<_ACEOF |
| 13486 | #define HAVE_STRUCT_STAT_ST_FLAGS 1 |
| 13487 | _ACEOF |
| 13488 | |
| 13489 | |
| 13490 | fi |
| 13491 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13492 | ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13493 | if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then : |
Martin v. Löwis | ebd9d5b | 2005-08-09 15:00:59 +0000 | [diff] [blame] | 13494 | |
| 13495 | cat >>confdefs.h <<_ACEOF |
| 13496 | #define HAVE_STRUCT_STAT_ST_GEN 1 |
| 13497 | _ACEOF |
| 13498 | |
| 13499 | |
| 13500 | fi |
| 13501 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13502 | ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13503 | if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then : |
Martin v. Löwis | ebd9d5b | 2005-08-09 15:00:59 +0000 | [diff] [blame] | 13504 | |
| 13505 | cat >>confdefs.h <<_ACEOF |
| 13506 | #define HAVE_STRUCT_STAT_ST_BIRTHTIME 1 |
| 13507 | _ACEOF |
| 13508 | |
| 13509 | |
| 13510 | fi |
| 13511 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13512 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13513 | if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 13514 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13515 | cat >>confdefs.h <<_ACEOF |
| 13516 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 |
| 13517 | _ACEOF |
| 13518 | |
| 13519 | |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 13520 | fi |
| 13521 | |
Stefan Krah | 267b639 | 2016-04-26 01:09:18 +0200 | [diff] [blame] | 13522 | ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" " |
| 13523 | #include <sys/types.h> |
| 13524 | #include <pwd.h> |
| 13525 | |
| 13526 | " |
| 13527 | if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then : |
| 13528 | |
| 13529 | cat >>confdefs.h <<_ACEOF |
| 13530 | #define HAVE_STRUCT_PASSWD_PW_GECOS 1 |
| 13531 | _ACEOF |
| 13532 | |
| 13533 | |
| 13534 | fi |
| 13535 | ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" " |
| 13536 | #include <sys/types.h> |
| 13537 | #include <pwd.h> |
| 13538 | |
| 13539 | " |
| 13540 | if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then : |
| 13541 | |
| 13542 | cat >>confdefs.h <<_ACEOF |
| 13543 | #define HAVE_STRUCT_PASSWD_PW_PASSWD 1 |
| 13544 | _ACEOF |
| 13545 | |
| 13546 | |
| 13547 | fi |
| 13548 | |
Zachary Ware | 6a6967e | 2016-10-01 00:47:27 -0500 | [diff] [blame] | 13549 | # Issue #21085: In Cygwin, siginfo_t does not have si_band field. |
| 13550 | ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h> |
| 13551 | " |
| 13552 | if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then : |
| 13553 | |
| 13554 | cat >>confdefs.h <<_ACEOF |
| 13555 | #define HAVE_SIGINFO_T_SI_BAND 1 |
| 13556 | _ACEOF |
| 13557 | |
| 13558 | |
| 13559 | fi |
| 13560 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 13561 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13562 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5 |
| 13563 | $as_echo_n "checking for time.h that defines altzone... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13564 | if ${ac_cv_header_time_altzone+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13565 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13566 | else |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 13567 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13568 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13569 | /* end confdefs.h. */ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13570 | #include <time.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13571 | int |
| 13572 | main () |
| 13573 | { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13574 | return altzone; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13575 | ; |
| 13576 | return 0; |
| 13577 | } |
| 13578 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13579 | if ac_fn_c_try_compile "$LINENO"; then : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13580 | ac_cv_header_time_altzone=yes |
| 13581 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13582 | ac_cv_header_time_altzone=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13583 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13584 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 13585 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13586 | fi |
| 13587 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13588 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5 |
| 13589 | $as_echo "$ac_cv_header_time_altzone" >&6; } |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13590 | if test $ac_cv_header_time_altzone = yes; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13591 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13592 | $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13593 | |
| 13594 | fi |
| 13595 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 13596 | was_it_defined=no |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13597 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5 |
| 13598 | $as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; } |
| 13599 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13600 | /* end confdefs.h. */ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13601 | |
| 13602 | #include <sys/types.h> |
| 13603 | #include <sys/select.h> |
| 13604 | #include <sys/time.h> |
| 13605 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13606 | int |
| 13607 | main () |
| 13608 | { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13609 | ; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13610 | ; |
| 13611 | return 0; |
| 13612 | } |
| 13613 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13614 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13615 | |
| 13616 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13617 | $as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13618 | |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 13619 | was_it_defined=yes |
| 13620 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13621 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13622 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13623 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5 |
| 13624 | $as_echo "$was_it_defined" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13625 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13626 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5 |
| 13627 | $as_echo_n "checking for addrinfo... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13628 | if ${ac_cv_struct_addrinfo+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13629 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13630 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13631 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13632 | /* end confdefs.h. */ |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 13633 | #include <netdb.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13634 | int |
| 13635 | main () |
| 13636 | { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13637 | struct addrinfo a |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13638 | ; |
| 13639 | return 0; |
| 13640 | } |
| 13641 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13642 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13643 | ac_cv_struct_addrinfo=yes |
| 13644 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13645 | ac_cv_struct_addrinfo=no |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13646 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13647 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 13648 | fi |
| 13649 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13650 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5 |
| 13651 | $as_echo "$ac_cv_struct_addrinfo" >&6; } |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13652 | if test $ac_cv_struct_addrinfo = yes; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13653 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13654 | $as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13655 | |
| 13656 | fi |
| 13657 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13658 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5 |
| 13659 | $as_echo_n "checking for sockaddr_storage... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13660 | if ${ac_cv_struct_sockaddr_storage+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13661 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13662 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13663 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13664 | /* end confdefs.h. */ |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13665 | |
| 13666 | # include <sys/types.h> |
| 13667 | # include <sys/socket.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13668 | int |
| 13669 | main () |
| 13670 | { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13671 | struct sockaddr_storage s |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13672 | ; |
| 13673 | return 0; |
| 13674 | } |
| 13675 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13676 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13677 | ac_cv_struct_sockaddr_storage=yes |
| 13678 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13679 | ac_cv_struct_sockaddr_storage=no |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13680 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13681 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 13682 | fi |
| 13683 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13684 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5 |
| 13685 | $as_echo "$ac_cv_struct_sockaddr_storage" >&6; } |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13686 | if test $ac_cv_struct_sockaddr_storage = yes; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13687 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13688 | $as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13689 | |
| 13690 | fi |
| 13691 | |
Christian Heimes | dffa394 | 2016-09-05 23:54:41 +0200 | [diff] [blame] | 13692 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5 |
| 13693 | $as_echo_n "checking for sockaddr_alg... " >&6; } |
| 13694 | if ${ac_cv_struct_sockaddr_alg+:} false; then : |
| 13695 | $as_echo_n "(cached) " >&6 |
| 13696 | else |
| 13697 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 13698 | /* end confdefs.h. */ |
| 13699 | |
| 13700 | # include <sys/types.h> |
| 13701 | # include <sys/socket.h> |
| 13702 | # include <linux/if_alg.h> |
| 13703 | int |
| 13704 | main () |
| 13705 | { |
| 13706 | struct sockaddr_alg s |
| 13707 | ; |
| 13708 | return 0; |
| 13709 | } |
| 13710 | _ACEOF |
| 13711 | if ac_fn_c_try_compile "$LINENO"; then : |
| 13712 | ac_cv_struct_sockaddr_alg=yes |
| 13713 | else |
| 13714 | ac_cv_struct_sockaddr_alg=no |
| 13715 | fi |
| 13716 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 13717 | fi |
| 13718 | |
| 13719 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5 |
| 13720 | $as_echo "$ac_cv_struct_sockaddr_alg" >&6; } |
| 13721 | if test $ac_cv_struct_sockaddr_alg = yes; then |
| 13722 | |
| 13723 | $as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h |
| 13724 | |
| 13725 | fi |
| 13726 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13727 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13728 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13729 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5 |
| 13730 | $as_echo_n "checking whether char is unsigned... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13731 | if ${ac_cv_c_char_unsigned+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13732 | $as_echo_n "(cached) " >&6 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 13733 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13734 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13735 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13736 | $ac_includes_default |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13737 | int |
| 13738 | main () |
| 13739 | { |
| 13740 | static int test_array [1 - 2 * !(((char) -1) < 0)]; |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 13741 | test_array [0] = 0; |
| 13742 | return test_array [0]; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13743 | |
| 13744 | ; |
| 13745 | return 0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 13746 | } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13747 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13748 | if ac_fn_c_try_compile "$LINENO"; then : |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 13749 | ac_cv_c_char_unsigned=no |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13750 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13751 | ac_cv_c_char_unsigned=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13752 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13753 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 13754 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13755 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5 |
| 13756 | $as_echo "$ac_cv_c_char_unsigned" >&6; } |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13757 | if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13758 | $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13759 | |
| 13760 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13761 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13762 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
| 13763 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13764 | if ${ac_cv_c_const+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13765 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13766 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13767 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13768 | /* end confdefs.h. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13769 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13770 | int |
| 13771 | main () |
| 13772 | { |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 13773 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13774 | #ifndef __cplusplus |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 13775 | /* Ultrix mips cc rejects this sort of thing. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13776 | typedef int charset[2]; |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 13777 | const charset cs = { 0, 0 }; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13778 | /* SunOS 4.1.1 cc rejects this. */ |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13779 | char const *const *pcpcc; |
| 13780 | char **ppc; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13781 | /* NEC SVR4.0.2 mips cc rejects this. */ |
| 13782 | struct point {int x, y;}; |
| 13783 | static struct point const zero = {0,0}; |
| 13784 | /* AIX XL C 1.02.0.0 rejects this. |
| 13785 | It does not let you subtract one const X* pointer from another in |
| 13786 | an arm of an if-expression whose if-part is not a constant |
| 13787 | expression */ |
| 13788 | const char *g = "string"; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13789 | pcpcc = &g + (g ? g-g : 0); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13790 | /* HPUX 7.0 cc rejects these. */ |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13791 | ++pcpcc; |
| 13792 | ppc = (char**) pcpcc; |
| 13793 | pcpcc = (char const *const *) ppc; |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 13794 | { /* SCO 3.2v4 cc rejects this sort of thing. */ |
| 13795 | char tx; |
| 13796 | char *t = &tx; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13797 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13798 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13799 | *t++ = 0; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13800 | if (s) return 0; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13801 | } |
| 13802 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
| 13803 | int x[] = {25, 17}; |
| 13804 | const int *foo = &x[0]; |
| 13805 | ++foo; |
| 13806 | } |
| 13807 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 13808 | typedef const int *iptr; |
| 13809 | iptr p = 0; |
| 13810 | ++p; |
| 13811 | } |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 13812 | { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13813 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 13814 | struct s { int j; const int *ap[3]; } bx; |
| 13815 | struct s *b = &bx; b->j = 5; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13816 | } |
| 13817 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 13818 | const int foo = 10; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13819 | if (!foo) return 0; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13820 | } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13821 | return !cs[0] && !zero.x; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13822 | #endif |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13823 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13824 | ; |
| 13825 | return 0; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13826 | } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13827 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13828 | if ac_fn_c_try_compile "$LINENO"; then : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13829 | ac_cv_c_const=yes |
| 13830 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13831 | ac_cv_c_const=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13832 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13833 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13834 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13835 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
| 13836 | $as_echo "$ac_cv_c_const" >&6; } |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13837 | if test $ac_cv_c_const = no; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13838 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13839 | $as_echo "#define const /**/" >>confdefs.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13840 | |
| 13841 | fi |
| 13842 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 13843 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 13844 | works=no |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13845 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5 |
| 13846 | $as_echo_n "checking for working signed char... " >&6; } |
| 13847 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13848 | /* end confdefs.h. */ |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 13849 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13850 | int |
| 13851 | main () |
| 13852 | { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13853 | signed char c; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13854 | ; |
| 13855 | return 0; |
| 13856 | } |
| 13857 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13858 | if ac_fn_c_try_compile "$LINENO"; then : |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 13859 | works=yes |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 13860 | else |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13861 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13862 | $as_echo "#define signed /**/" >>confdefs.h |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13863 | |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 13864 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13865 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13866 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13867 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5 |
| 13868 | $as_echo "$works" >&6; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13869 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 13870 | have_prototypes=no |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13871 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5 |
| 13872 | $as_echo_n "checking for prototypes... " >&6; } |
| 13873 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13874 | /* end confdefs.h. */ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13875 | int foo(int x) { return 0; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13876 | int |
| 13877 | main () |
| 13878 | { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13879 | return foo(10); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13880 | ; |
| 13881 | return 0; |
| 13882 | } |
| 13883 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13884 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13885 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13886 | $as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13887 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 13888 | have_prototypes=yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13889 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13890 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13891 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5 |
| 13892 | $as_echo "$have_prototypes" >&6; } |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13893 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 13894 | works=no |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13895 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5 |
| 13896 | $as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; } |
| 13897 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13898 | /* end confdefs.h. */ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13899 | |
| 13900 | #include <stdarg.h> |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 13901 | int foo(int x, ...) { |
| 13902 | va_list va; |
| 13903 | va_start(va, x); |
| 13904 | va_arg(va, int); |
| 13905 | va_arg(va, char *); |
| 13906 | va_arg(va, double); |
| 13907 | return 0; |
| 13908 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13909 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13910 | int |
| 13911 | main () |
| 13912 | { |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 13913 | return foo(10, "", 3.14); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13914 | ; |
| 13915 | return 0; |
| 13916 | } |
| 13917 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13918 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13919 | |
| 13920 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13921 | $as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13922 | |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 13923 | works=yes |
| 13924 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13925 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13926 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13927 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5 |
| 13928 | $as_echo "$works" >&6; } |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13929 | |
Martin v. Löwis | d632050 | 2004-08-12 13:45:08 +0000 | [diff] [blame] | 13930 | # check for socketpair |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13931 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5 |
| 13932 | $as_echo_n "checking for socketpair... " >&6; } |
| 13933 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Martin v. Löwis | d632050 | 2004-08-12 13:45:08 +0000 | [diff] [blame] | 13934 | /* end confdefs.h. */ |
| 13935 | |
| 13936 | #include <sys/types.h> |
| 13937 | #include <sys/socket.h> |
| 13938 | |
| 13939 | int |
| 13940 | main () |
| 13941 | { |
| 13942 | void *x=socketpair |
| 13943 | ; |
| 13944 | return 0; |
| 13945 | } |
| 13946 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13947 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | d632050 | 2004-08-12 13:45:08 +0000 | [diff] [blame] | 13948 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13949 | $as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h |
Martin v. Löwis | d632050 | 2004-08-12 13:45:08 +0000 | [diff] [blame] | 13950 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 13951 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13952 | $as_echo "yes" >&6; } |
Martin v. Löwis | d632050 | 2004-08-12 13:45:08 +0000 | [diff] [blame] | 13953 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13954 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 13955 | $as_echo "no" >&6; } |
Martin v. Löwis | d632050 | 2004-08-12 13:45:08 +0000 | [diff] [blame] | 13956 | |
| 13957 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13958 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Martin v. Löwis | d632050 | 2004-08-12 13:45:08 +0000 | [diff] [blame] | 13959 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13960 | # check if sockaddr has sa_len member |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13961 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5 |
| 13962 | $as_echo_n "checking if sockaddr has sa_len member... " >&6; } |
| 13963 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13964 | /* end confdefs.h. */ |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13965 | #include <sys/types.h> |
| 13966 | #include <sys/socket.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13967 | int |
| 13968 | main () |
| 13969 | { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13970 | struct sockaddr x; |
| 13971 | x.sa_len = 0; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13972 | ; |
| 13973 | return 0; |
| 13974 | } |
| 13975 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13976 | if ac_fn_c_try_compile "$LINENO"; then : |
| 13977 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 13978 | $as_echo "yes" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13979 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13980 | $as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13981 | |
| 13982 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13983 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 13984 | $as_echo "no" >&6; } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 13985 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13986 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13987 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13988 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13989 | # sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-( |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13990 | |
| 13991 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13992 | ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13993 | if test "x$ac_cv_func_gethostbyname_r" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13994 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13995 | $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h |
Martin v. Löwis | 4ddc78a | 2006-01-29 09:53:44 +0000 | [diff] [blame] | 13996 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13997 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5 |
| 13998 | $as_echo_n "checking gethostbyname_r with 6 args... " >&6; } |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13999 | OLD_CFLAGS=$CFLAGS |
| 14000 | CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14001 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 14002 | /* end confdefs.h. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 14003 | |
| 14004 | # include <netdb.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14005 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14006 | int |
| 14007 | main () |
| 14008 | { |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 14009 | |
| 14010 | char *name; |
| 14011 | struct hostent *he, *res; |
| 14012 | char buffer[2048]; |
| 14013 | int buflen = 2048; |
| 14014 | int h_errnop; |
| 14015 | |
| 14016 | (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14017 | |
| 14018 | ; |
| 14019 | return 0; |
| 14020 | } |
| 14021 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14022 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14023 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14024 | $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 14025 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14026 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14027 | $as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 14028 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14029 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 14030 | $as_echo "yes" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14031 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 14032 | else |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 14033 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14034 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 14035 | $as_echo "no" >&6; } |
| 14036 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5 |
| 14037 | $as_echo_n "checking gethostbyname_r with 5 args... " >&6; } |
| 14038 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 14039 | /* end confdefs.h. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 14040 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 14041 | # include <netdb.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14042 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14043 | int |
| 14044 | main () |
| 14045 | { |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 14046 | |
| 14047 | char *name; |
| 14048 | struct hostent *he; |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 14049 | char buffer[2048]; |
| 14050 | int buflen = 2048; |
| 14051 | int h_errnop; |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 14052 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 14053 | (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14054 | |
| 14055 | ; |
| 14056 | return 0; |
| 14057 | } |
| 14058 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14059 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14060 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14061 | $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 14062 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14063 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 14064 | $as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 14065 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14066 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 14067 | $as_echo "yes" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14068 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 14069 | else |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 14070 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14071 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 14072 | $as_echo "no" >&6; } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 14073 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5 |
| 14074 | $as_echo_n "checking gethostbyname_r with 3 args... " >&6; } |
| 14075 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14076 | /* end confdefs.h. */ |
| 14077 | |
| 14078 | # include <netdb.h> |
| 14079 | |
| 14080 | int |
| 14081 | main () |
| 14082 | { |
| 14083 | |
| 14084 | char *name; |
| 14085 | struct hostent *he; |
| 14086 | struct hostent_data data; |
| 14087 | |
| 14088 | (void) gethostbyname_r(name, he, &data); |
| 14089 | |
| 14090 | ; |
| 14091 | return 0; |
| 14092 | } |
| 14093 | _ACEOF |
| 14094 | if ac_fn_c_try_compile "$LINENO"; then : |
| 14095 | |
| 14096 | $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h |
| 14097 | |
| 14098 | |
| 14099 | $as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h |
| 14100 | |
| 14101 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 14102 | $as_echo "yes" >&6; } |
| 14103 | |
| 14104 | else |
| 14105 | |
| 14106 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 14107 | $as_echo "no" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14108 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 14109 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14110 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14111 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 14112 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14113 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14114 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 14115 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14116 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 14117 | CFLAGS=$OLD_CFLAGS |
| 14118 | |
| 14119 | else |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 14120 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14121 | for ac_func in gethostbyname |
| 14122 | do : |
| 14123 | ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14124 | if test "x$ac_cv_func_gethostbyname" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14125 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14126 | #define HAVE_GETHOSTBYNAME 1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14127 | _ACEOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 14128 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 14129 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 14130 | done |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 14131 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 14132 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 14133 | fi |
| 14134 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 14135 | |
| 14136 | |
| 14137 | |
| 14138 | |
| 14139 | |
| 14140 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 14141 | # checks for system services |
| 14142 | # (none yet) |
| 14143 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 14144 | # Linux requires this for correct f.p. operations |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14145 | ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14146 | if test "x$ac_cv_func___fpu_control" = xyes; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14147 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 14148 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14149 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5 |
| 14150 | $as_echo_n "checking for __fpu_control in -lieee... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14151 | if ${ac_cv_lib_ieee___fpu_control+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14152 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 14153 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14154 | ac_check_lib_save_LIBS=$LIBS |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 14155 | LIBS="-lieee $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14156 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 14157 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14158 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14159 | /* Override any GCC internal prototype to avoid an error. |
| 14160 | Use char because int might match the return type of a GCC |
| 14161 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14162 | #ifdef __cplusplus |
| 14163 | extern "C" |
| 14164 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14165 | char __fpu_control (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14166 | int |
| 14167 | main () |
| 14168 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14169 | return __fpu_control (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14170 | ; |
| 14171 | return 0; |
| 14172 | } |
| 14173 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14174 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14175 | ac_cv_lib_ieee___fpu_control=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 14176 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14177 | ac_cv_lib_ieee___fpu_control=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 14178 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14179 | rm -f core conftest.err conftest.$ac_objext \ |
| 14180 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14181 | LIBS=$ac_check_lib_save_LIBS |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 14182 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14183 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5 |
| 14184 | $as_echo "$ac_cv_lib_ieee___fpu_control" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14185 | if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14186 | cat >>confdefs.h <<_ACEOF |
| 14187 | #define HAVE_LIBIEEE 1 |
| 14188 | _ACEOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 14189 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 14190 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 14191 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 14192 | fi |
| 14193 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 14194 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 14195 | fi |
| 14196 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 14197 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 14198 | # check for --with-libm=... |
| 14199 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 14200 | case $ac_sys_system in |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 14201 | Darwin) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 14202 | *) LIBM=-lm |
| 14203 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14204 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5 |
| 14205 | $as_echo_n "checking for --with-libm=STRING... " >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14206 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14207 | # Check whether --with-libm was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14208 | if test "${with_libm+set}" = set; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14209 | withval=$with_libm; |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 14210 | if test "$withval" = no |
| 14211 | then LIBM= |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14212 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5 |
| 14213 | $as_echo "force LIBM empty" >&6; } |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 14214 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 14215 | then LIBM=$withval |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14216 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5 |
| 14217 | $as_echo "set LIBM=\"$withval\"" >&6; } |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 14218 | else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 14219 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 14220 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14221 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5 |
| 14222 | $as_echo "default LIBM=\"$LIBM\"" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14223 | fi |
| 14224 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 14225 | |
| 14226 | # check for --with-libc=... |
| 14227 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14228 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5 |
| 14229 | $as_echo_n "checking for --with-libc=STRING... " >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14230 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14231 | # Check whether --with-libc was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14232 | if test "${with_libc+set}" = set; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14233 | withval=$with_libc; |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 14234 | if test "$withval" = no |
| 14235 | then LIBC= |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14236 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5 |
| 14237 | $as_echo "force LIBC empty" >&6; } |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 14238 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 14239 | then LIBC=$withval |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14240 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5 |
| 14241 | $as_echo "set LIBC=\"$withval\"" >&6; } |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 14242 | else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5 |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 14243 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 14244 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14245 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5 |
| 14246 | $as_echo "default LIBC=\"$LIBC\"" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14247 | fi |
| 14248 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 14249 | |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 14250 | # ************************************** |
| 14251 | # * Check for gcc x64 inline assembler * |
| 14252 | # ************************************** |
| 14253 | |
| 14254 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5 |
| 14255 | $as_echo_n "checking for x64 gcc inline assembler... " >&6; } |
| 14256 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14257 | /* end confdefs.h. */ |
| 14258 | |
| 14259 | int |
| 14260 | main () |
| 14261 | { |
| 14262 | |
| 14263 | __asm__ __volatile__ ("movq %rcx, %rax"); |
| 14264 | |
| 14265 | ; |
| 14266 | return 0; |
| 14267 | } |
| 14268 | _ACEOF |
Stefan Krah | e31db2a | 2015-07-02 20:27:56 +0200 | [diff] [blame] | 14269 | if ac_fn_c_try_link "$LINENO"; then : |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 14270 | have_gcc_asm_for_x64=yes |
| 14271 | else |
| 14272 | have_gcc_asm_for_x64=no |
| 14273 | fi |
Stefan Krah | e31db2a | 2015-07-02 20:27:56 +0200 | [diff] [blame] | 14274 | rm -f core conftest.err conftest.$ac_objext \ |
| 14275 | conftest$ac_exeext conftest.$ac_ext |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 14276 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5 |
| 14277 | $as_echo "$have_gcc_asm_for_x64" >&6; } |
| 14278 | if test "$have_gcc_asm_for_x64" = yes |
| 14279 | then |
| 14280 | |
| 14281 | $as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h |
| 14282 | |
| 14283 | fi |
| 14284 | |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14285 | # ************************************************** |
| 14286 | # * Check for various properties of floating point * |
| 14287 | # ************************************************** |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 14288 | |
Benjamin Peterson | b3b8cb4 | 2018-09-18 23:49:05 -0700 | [diff] [blame] | 14289 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether float word ordering is bigendian" >&5 |
| 14290 | $as_echo_n "checking whether float word ordering is bigendian... " >&6; } |
| 14291 | if ${ax_cv_c_float_words_bigendian+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14292 | $as_echo_n "(cached) " >&6 |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14293 | else |
| 14294 | |
Benjamin Peterson | b3b8cb4 | 2018-09-18 23:49:05 -0700 | [diff] [blame] | 14295 | |
| 14296 | ax_cv_c_float_words_bigendian=unknown |
| 14297 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14298 | /* end confdefs.h. */ |
| 14299 | |
Benjamin Peterson | b3b8cb4 | 2018-09-18 23:49:05 -0700 | [diff] [blame] | 14300 | |
| 14301 | double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0; |
| 14302 | |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14303 | |
| 14304 | _ACEOF |
Benjamin Peterson | b3b8cb4 | 2018-09-18 23:49:05 -0700 | [diff] [blame] | 14305 | if ac_fn_c_try_compile "$LINENO"; then : |
| 14306 | |
| 14307 | |
| 14308 | if grep noonsees conftest.$ac_objext >/dev/null ; then |
| 14309 | ax_cv_c_float_words_bigendian=yes |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14310 | fi |
Benjamin Peterson | b3b8cb4 | 2018-09-18 23:49:05 -0700 | [diff] [blame] | 14311 | if grep seesnoon conftest.$ac_objext >/dev/null ; then |
| 14312 | if test "$ax_cv_c_float_words_bigendian" = unknown; then |
| 14313 | ax_cv_c_float_words_bigendian=no |
| 14314 | else |
| 14315 | ax_cv_c_float_words_bigendian=unknown |
| 14316 | fi |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14317 | fi |
| 14318 | |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14319 | |
| 14320 | fi |
Benjamin Peterson | b3b8cb4 | 2018-09-18 23:49:05 -0700 | [diff] [blame] | 14321 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14322 | fi |
Benjamin Peterson | b3b8cb4 | 2018-09-18 23:49:05 -0700 | [diff] [blame] | 14323 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5 |
| 14324 | $as_echo "$ax_cv_c_float_words_bigendian" >&6; } |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14325 | |
Benjamin Peterson | b3b8cb4 | 2018-09-18 23:49:05 -0700 | [diff] [blame] | 14326 | case $ax_cv_c_float_words_bigendian in |
| 14327 | yes) |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14328 | |
Benjamin Peterson | b3b8cb4 | 2018-09-18 23:49:05 -0700 | [diff] [blame] | 14329 | $as_echo "#define FLOAT_WORDS_BIGENDIAN 1" >>confdefs.h |
| 14330 | ;; |
| 14331 | no) |
| 14332 | ;; |
| 14333 | *) |
| 14334 | as_fn_error $? " |
| 14335 | |
| 14336 | Unknown float word ordering. You need to manually preset |
| 14337 | ax_cv_c_float_words_bigendian=no (or yes) according to your system. |
| 14338 | |
| 14339 | " "$LINENO" 5 ;; |
| 14340 | esac |
| 14341 | |
| 14342 | |
| 14343 | if test "$ax_cv_c_float_words_bigendian" = "yes" |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14344 | then |
| 14345 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14346 | $as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14347 | |
Benjamin Peterson | b3b8cb4 | 2018-09-18 23:49:05 -0700 | [diff] [blame] | 14348 | elif test "$ax_cv_c_float_words_bigendian" = "no" |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14349 | then |
| 14350 | |
Benjamin Peterson | b3b8cb4 | 2018-09-18 23:49:05 -0700 | [diff] [blame] | 14351 | $as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h |
| 14352 | |
| 14353 | else |
| 14354 | # Some ARM platforms use a mixed-endian representation for doubles. |
| 14355 | # While Python doesn't currently have full support for these platforms |
| 14356 | # (see e.g., issue 1762561), we can at least make sure that float <-> string |
| 14357 | # conversions work. |
| 14358 | # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big |
| 14359 | # or little, then it must be this? |
| 14360 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14361 | $as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14362 | |
| 14363 | fi |
| 14364 | |
Mark Dickinson | 7abf8d4 | 2009-04-18 20:17:52 +0000 | [diff] [blame] | 14365 | # The short float repr introduced in Python 3.1 requires the |
Mark Dickinson | 1068307 | 2009-04-18 21:18:19 +0000 | [diff] [blame] | 14366 | # correctly-rounded string <-> double conversion functions from |
Mark Dickinson | 7abf8d4 | 2009-04-18 20:17:52 +0000 | [diff] [blame] | 14367 | # Python/dtoa.c, which in turn require that the FPU uses 53-bit |
Mark Dickinson | 1068307 | 2009-04-18 21:18:19 +0000 | [diff] [blame] | 14368 | # rounding; this is a problem on x86, where the x87 FPU has a default |
Mark Dickinson | f4243f6 | 2009-11-15 13:47:27 +0000 | [diff] [blame] | 14369 | # rounding precision of 64 bits. For gcc/x86, we can fix this by |
Mark Dickinson | 1068307 | 2009-04-18 21:18:19 +0000 | [diff] [blame] | 14370 | # using inline assembler to get and set the x87 FPU control word. |
Mark Dickinson | f4243f6 | 2009-11-15 13:47:27 +0000 | [diff] [blame] | 14371 | |
| 14372 | # This inline assembler syntax may also work for suncc and icc, |
| 14373 | # so we try it on all platforms. |
| 14374 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14375 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5 |
| 14376 | $as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; } |
| 14377 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14378 | /* end confdefs.h. */ |
| 14379 | |
| 14380 | int |
| 14381 | main () |
| 14382 | { |
| 14383 | |
Mark Dickinson | f4243f6 | 2009-11-15 13:47:27 +0000 | [diff] [blame] | 14384 | unsigned short cw; |
| 14385 | __asm__ __volatile__ ("fnstcw %0" : "=m" (cw)); |
| 14386 | __asm__ __volatile__ ("fldcw %0" : : "m" (cw)); |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14387 | |
| 14388 | ; |
| 14389 | return 0; |
| 14390 | } |
| 14391 | _ACEOF |
Stefan Krah | e31db2a | 2015-07-02 20:27:56 +0200 | [diff] [blame] | 14392 | if ac_fn_c_try_link "$LINENO"; then : |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14393 | have_gcc_asm_for_x87=yes |
| 14394 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14395 | have_gcc_asm_for_x87=no |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14396 | fi |
Stefan Krah | e31db2a | 2015-07-02 20:27:56 +0200 | [diff] [blame] | 14397 | rm -f core conftest.err conftest.$ac_objext \ |
| 14398 | conftest$ac_exeext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14399 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5 |
| 14400 | $as_echo "$have_gcc_asm_for_x87" >&6; } |
Mark Dickinson | f4243f6 | 2009-11-15 13:47:27 +0000 | [diff] [blame] | 14401 | if test "$have_gcc_asm_for_x87" = yes |
| 14402 | then |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14403 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14404 | $as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14405 | |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14406 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14407 | |
Benjamin Peterson | 8bdeb16 | 2014-04-17 00:00:31 -0400 | [diff] [blame] | 14408 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5 |
| 14409 | $as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; } |
| 14410 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14411 | /* end confdefs.h. */ |
| 14412 | |
| 14413 | int |
| 14414 | main () |
| 14415 | { |
| 14416 | |
| 14417 | unsigned int fpcr; |
| 14418 | __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr)); |
| 14419 | __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr)); |
| 14420 | |
| 14421 | ; |
| 14422 | return 0; |
| 14423 | } |
| 14424 | _ACEOF |
Stefan Krah | e31db2a | 2015-07-02 20:27:56 +0200 | [diff] [blame] | 14425 | if ac_fn_c_try_link "$LINENO"; then : |
Benjamin Peterson | 8bdeb16 | 2014-04-17 00:00:31 -0400 | [diff] [blame] | 14426 | have_gcc_asm_for_mc68881=yes |
| 14427 | else |
| 14428 | have_gcc_asm_for_mc68881=no |
| 14429 | fi |
Stefan Krah | e31db2a | 2015-07-02 20:27:56 +0200 | [diff] [blame] | 14430 | rm -f core conftest.err conftest.$ac_objext \ |
| 14431 | conftest$ac_exeext conftest.$ac_ext |
Benjamin Peterson | 8bdeb16 | 2014-04-17 00:00:31 -0400 | [diff] [blame] | 14432 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5 |
| 14433 | $as_echo "$have_gcc_asm_for_mc68881" >&6; } |
| 14434 | if test "$have_gcc_asm_for_mc68881" = yes |
| 14435 | then |
| 14436 | |
| 14437 | $as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h |
| 14438 | |
| 14439 | fi |
| 14440 | |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14441 | # Detect whether system arithmetic is subject to x87-style double |
| 14442 | # rounding issues. The result of this test has little meaning on non |
| 14443 | # IEEE 754 platforms. On IEEE 754, test should return 1 if rounding |
| 14444 | # mode is round-to-nearest and double rounding issues are present, and |
| 14445 | # 0 otherwise. See http://bugs.python.org/issue2937 for more info. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14446 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5 |
| 14447 | $as_echo_n "checking for x87-style double rounding... " >&6; } |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14448 | # $BASECFLAGS may affect the result |
| 14449 | ac_save_cc="$CC" |
| 14450 | CC="$CC $BASECFLAGS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14451 | if test "$cross_compiling" = yes; then : |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14452 | ac_cv_x87_double_rounding=no |
| 14453 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14454 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14455 | /* end confdefs.h. */ |
| 14456 | |
| 14457 | #include <stdlib.h> |
| 14458 | #include <math.h> |
| 14459 | int main() { |
| 14460 | volatile double x, y, z; |
| 14461 | /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */ |
| 14462 | x = 0.99999999999999989; /* 1-2**-53 */ |
| 14463 | y = 1./x; |
| 14464 | if (y != 1.) |
| 14465 | exit(0); |
| 14466 | /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */ |
| 14467 | x = 1e16; |
| 14468 | y = 2.99999; |
| 14469 | z = x + y; |
| 14470 | if (z != 1e16+4.) |
| 14471 | exit(0); |
| 14472 | /* both tests show evidence of double rounding */ |
| 14473 | exit(1); |
| 14474 | } |
| 14475 | |
| 14476 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14477 | if ac_fn_c_try_run "$LINENO"; then : |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14478 | ac_cv_x87_double_rounding=no |
| 14479 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14480 | ac_cv_x87_double_rounding=yes |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14481 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14482 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 14483 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14484 | fi |
| 14485 | |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14486 | CC="$ac_save_cc" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14487 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5 |
| 14488 | $as_echo "$ac_cv_x87_double_rounding" >&6; } |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14489 | if test "$ac_cv_x87_double_rounding" = yes |
| 14490 | then |
| 14491 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14492 | $as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14493 | |
| 14494 | fi |
| 14495 | |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14496 | # ************************************ |
| 14497 | # * Check for mathematical functions * |
| 14498 | # ************************************ |
| 14499 | |
| 14500 | LIBS_SAVE=$LIBS |
| 14501 | LIBS="$LIBS $LIBM" |
| 14502 | |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14503 | for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma |
| 14504 | do : |
| 14505 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
| 14506 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 14507 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14508 | cat >>confdefs.h <<_ACEOF |
| 14509 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
| 14510 | _ACEOF |
| 14511 | |
| 14512 | fi |
| 14513 | done |
| 14514 | |
Victor Stinner | 8f9f8d6 | 2011-05-09 12:45:41 +0200 | [diff] [blame] | 14515 | for ac_func in hypot lgamma log1p log2 round tgamma |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14516 | do : |
| 14517 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
| 14518 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 14519 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14520 | cat >>confdefs.h <<_ACEOF |
| 14521 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
| 14522 | _ACEOF |
| 14523 | |
| 14524 | fi |
| 14525 | done |
| 14526 | |
| 14527 | ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h> |
| 14528 | " |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14529 | if test "x$ac_cv_have_decl_isinf" = xyes; then : |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14530 | ac_have_decl=1 |
| 14531 | else |
| 14532 | ac_have_decl=0 |
| 14533 | fi |
| 14534 | |
| 14535 | cat >>confdefs.h <<_ACEOF |
| 14536 | #define HAVE_DECL_ISINF $ac_have_decl |
| 14537 | _ACEOF |
| 14538 | ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h> |
| 14539 | " |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14540 | if test "x$ac_cv_have_decl_isnan" = xyes; then : |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14541 | ac_have_decl=1 |
| 14542 | else |
| 14543 | ac_have_decl=0 |
| 14544 | fi |
| 14545 | |
| 14546 | cat >>confdefs.h <<_ACEOF |
| 14547 | #define HAVE_DECL_ISNAN $ac_have_decl |
| 14548 | _ACEOF |
| 14549 | ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h> |
| 14550 | " |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14551 | if test "x$ac_cv_have_decl_isfinite" = xyes; then : |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14552 | ac_have_decl=1 |
| 14553 | else |
| 14554 | ac_have_decl=0 |
| 14555 | fi |
| 14556 | |
| 14557 | cat >>confdefs.h <<_ACEOF |
| 14558 | #define HAVE_DECL_ISFINITE $ac_have_decl |
| 14559 | _ACEOF |
| 14560 | |
| 14561 | |
Mark Dickinson | a614f04 | 2009-11-28 12:48:43 +0000 | [diff] [blame] | 14562 | # For multiprocessing module, check that sem_open |
| 14563 | # actually works. For FreeBSD versions <= 7.2, |
| 14564 | # the kernel module that provides POSIX semaphores |
| 14565 | # isn't loaded by default, so an attempt to call |
| 14566 | # sem_open results in a 'Signal 12' error. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14567 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5 |
| 14568 | $as_echo_n "checking whether POSIX semaphores are enabled... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14569 | if ${ac_cv_posix_semaphores_enabled+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14570 | $as_echo_n "(cached) " >&6 |
Mark Dickinson | a614f04 | 2009-11-28 12:48:43 +0000 | [diff] [blame] | 14571 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14572 | if test "$cross_compiling" = yes; then : |
Mark Dickinson | a614f04 | 2009-11-28 12:48:43 +0000 | [diff] [blame] | 14573 | ac_cv_posix_semaphores_enabled=yes |
| 14574 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14575 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Mark Dickinson | a614f04 | 2009-11-28 12:48:43 +0000 | [diff] [blame] | 14576 | /* end confdefs.h. */ |
| 14577 | |
| 14578 | #include <unistd.h> |
| 14579 | #include <fcntl.h> |
| 14580 | #include <stdio.h> |
| 14581 | #include <semaphore.h> |
| 14582 | #include <sys/stat.h> |
| 14583 | |
| 14584 | int main(void) { |
| 14585 | sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0); |
| 14586 | if (a == SEM_FAILED) { |
| 14587 | perror("sem_open"); |
| 14588 | return 1; |
| 14589 | } |
| 14590 | sem_close(a); |
Mark Dickinson | ba79b35 | 2009-12-13 21:10:57 +0000 | [diff] [blame] | 14591 | sem_unlink("/autoconf"); |
Mark Dickinson | a614f04 | 2009-11-28 12:48:43 +0000 | [diff] [blame] | 14592 | return 0; |
| 14593 | } |
| 14594 | |
| 14595 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14596 | if ac_fn_c_try_run "$LINENO"; then : |
Mark Dickinson | a614f04 | 2009-11-28 12:48:43 +0000 | [diff] [blame] | 14597 | ac_cv_posix_semaphores_enabled=yes |
| 14598 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14599 | ac_cv_posix_semaphores_enabled=no |
Mark Dickinson | a614f04 | 2009-11-28 12:48:43 +0000 | [diff] [blame] | 14600 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14601 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 14602 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Mark Dickinson | a614f04 | 2009-11-28 12:48:43 +0000 | [diff] [blame] | 14603 | fi |
| 14604 | |
| 14605 | |
Mark Dickinson | a614f04 | 2009-11-28 12:48:43 +0000 | [diff] [blame] | 14606 | fi |
| 14607 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14608 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5 |
| 14609 | $as_echo "$ac_cv_posix_semaphores_enabled" >&6; } |
Mark Dickinson | a614f04 | 2009-11-28 12:48:43 +0000 | [diff] [blame] | 14610 | if test $ac_cv_posix_semaphores_enabled = no |
| 14611 | then |
| 14612 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14613 | $as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h |
Mark Dickinson | a614f04 | 2009-11-28 12:48:43 +0000 | [diff] [blame] | 14614 | |
| 14615 | fi |
| 14616 | |
Mark Dickinson | 1068307 | 2009-04-18 21:18:19 +0000 | [diff] [blame] | 14617 | # Multiprocessing check for broken sem_getvalue |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14618 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5 |
| 14619 | $as_echo_n "checking for broken sem_getvalue... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14620 | if ${ac_cv_broken_sem_getvalue+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14621 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 14622 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14623 | if test "$cross_compiling" = yes; then : |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 14624 | ac_cv_broken_sem_getvalue=yes |
Mark Dickinson | 1068307 | 2009-04-18 21:18:19 +0000 | [diff] [blame] | 14625 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14626 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Mark Dickinson | 1068307 | 2009-04-18 21:18:19 +0000 | [diff] [blame] | 14627 | /* end confdefs.h. */ |
| 14628 | |
| 14629 | #include <unistd.h> |
| 14630 | #include <fcntl.h> |
| 14631 | #include <stdio.h> |
| 14632 | #include <semaphore.h> |
| 14633 | #include <sys/stat.h> |
| 14634 | |
| 14635 | int main(void){ |
Mark Dickinson | ba79b35 | 2009-12-13 21:10:57 +0000 | [diff] [blame] | 14636 | sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0); |
Mark Dickinson | 1068307 | 2009-04-18 21:18:19 +0000 | [diff] [blame] | 14637 | int count; |
| 14638 | int res; |
| 14639 | if(a==SEM_FAILED){ |
| 14640 | perror("sem_open"); |
| 14641 | return 1; |
| 14642 | |
| 14643 | } |
| 14644 | res = sem_getvalue(a, &count); |
| 14645 | sem_close(a); |
Mark Dickinson | ba79b35 | 2009-12-13 21:10:57 +0000 | [diff] [blame] | 14646 | sem_unlink("/autocftw"); |
Mark Dickinson | 1068307 | 2009-04-18 21:18:19 +0000 | [diff] [blame] | 14647 | return res==-1 ? 1 : 0; |
| 14648 | } |
| 14649 | |
Mark Dickinson | 1068307 | 2009-04-18 21:18:19 +0000 | [diff] [blame] | 14650 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14651 | if ac_fn_c_try_run "$LINENO"; then : |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 14652 | ac_cv_broken_sem_getvalue=no |
Mark Dickinson | 1068307 | 2009-04-18 21:18:19 +0000 | [diff] [blame] | 14653 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14654 | ac_cv_broken_sem_getvalue=yes |
Alexandre Vassalotti | 1914228 | 2009-07-17 23:11:52 +0000 | [diff] [blame] | 14655 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14656 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 14657 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 14658 | fi |
| 14659 | |
Alexandre Vassalotti | 1914228 | 2009-07-17 23:11:52 +0000 | [diff] [blame] | 14660 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 14661 | fi |
| 14662 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14663 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5 |
| 14664 | $as_echo "$ac_cv_broken_sem_getvalue" >&6; } |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 14665 | if test $ac_cv_broken_sem_getvalue = yes |
| 14666 | then |
| 14667 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14668 | $as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 14669 | |
| 14670 | fi |
| 14671 | |
Serhiy Storchaka | c2f7d87 | 2016-05-04 09:44:44 +0300 | [diff] [blame] | 14672 | ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h> |
| 14673 | " |
| 14674 | if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then : |
| 14675 | ac_have_decl=1 |
| 14676 | else |
| 14677 | ac_have_decl=0 |
| 14678 | fi |
| 14679 | |
| 14680 | cat >>confdefs.h <<_ACEOF |
| 14681 | #define HAVE_DECL_RTLD_LAZY $ac_have_decl |
| 14682 | _ACEOF |
| 14683 | ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h> |
| 14684 | " |
| 14685 | if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then : |
| 14686 | ac_have_decl=1 |
| 14687 | else |
| 14688 | ac_have_decl=0 |
| 14689 | fi |
| 14690 | |
| 14691 | cat >>confdefs.h <<_ACEOF |
| 14692 | #define HAVE_DECL_RTLD_NOW $ac_have_decl |
| 14693 | _ACEOF |
| 14694 | ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h> |
| 14695 | " |
| 14696 | if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then : |
| 14697 | ac_have_decl=1 |
| 14698 | else |
| 14699 | ac_have_decl=0 |
| 14700 | fi |
| 14701 | |
| 14702 | cat >>confdefs.h <<_ACEOF |
| 14703 | #define HAVE_DECL_RTLD_GLOBAL $ac_have_decl |
| 14704 | _ACEOF |
| 14705 | ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h> |
| 14706 | " |
| 14707 | if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then : |
| 14708 | ac_have_decl=1 |
| 14709 | else |
| 14710 | ac_have_decl=0 |
| 14711 | fi |
| 14712 | |
| 14713 | cat >>confdefs.h <<_ACEOF |
| 14714 | #define HAVE_DECL_RTLD_LOCAL $ac_have_decl |
| 14715 | _ACEOF |
| 14716 | ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h> |
| 14717 | " |
| 14718 | if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then : |
| 14719 | ac_have_decl=1 |
| 14720 | else |
| 14721 | ac_have_decl=0 |
| 14722 | fi |
| 14723 | |
| 14724 | cat >>confdefs.h <<_ACEOF |
| 14725 | #define HAVE_DECL_RTLD_NODELETE $ac_have_decl |
| 14726 | _ACEOF |
| 14727 | ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h> |
| 14728 | " |
| 14729 | if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then : |
| 14730 | ac_have_decl=1 |
| 14731 | else |
| 14732 | ac_have_decl=0 |
| 14733 | fi |
| 14734 | |
| 14735 | cat >>confdefs.h <<_ACEOF |
| 14736 | #define HAVE_DECL_RTLD_NOLOAD $ac_have_decl |
| 14737 | _ACEOF |
| 14738 | ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h> |
| 14739 | " |
| 14740 | if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then : |
| 14741 | ac_have_decl=1 |
| 14742 | else |
| 14743 | ac_have_decl=0 |
| 14744 | fi |
| 14745 | |
| 14746 | cat >>confdefs.h <<_ACEOF |
| 14747 | #define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl |
| 14748 | _ACEOF |
Michael Felt | c5ae169 | 2017-12-19 13:58:49 +0100 | [diff] [blame] | 14749 | ac_fn_c_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include <dlfcn.h> |
| 14750 | " |
| 14751 | if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes; then : |
| 14752 | ac_have_decl=1 |
| 14753 | else |
| 14754 | ac_have_decl=0 |
| 14755 | fi |
| 14756 | |
| 14757 | cat >>confdefs.h <<_ACEOF |
| 14758 | #define HAVE_DECL_RTLD_MEMBER $ac_have_decl |
| 14759 | _ACEOF |
Serhiy Storchaka | c2f7d87 | 2016-05-04 09:44:44 +0300 | [diff] [blame] | 14760 | |
| 14761 | |
Mark Dickinson | bd79264 | 2009-03-18 20:06:12 +0000 | [diff] [blame] | 14762 | # determine what size digit to use for Python's longs |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14763 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5 |
| 14764 | $as_echo_n "checking digit size for Python's longs... " >&6; } |
Mark Dickinson | bd79264 | 2009-03-18 20:06:12 +0000 | [diff] [blame] | 14765 | # Check whether --enable-big-digits was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14766 | if test "${enable_big_digits+set}" = set; then : |
Mark Dickinson | bd79264 | 2009-03-18 20:06:12 +0000 | [diff] [blame] | 14767 | enableval=$enable_big_digits; case $enable_big_digits in |
| 14768 | yes) |
| 14769 | enable_big_digits=30 ;; |
| 14770 | no) |
| 14771 | enable_big_digits=15 ;; |
| 14772 | 15|30) |
| 14773 | ;; |
| 14774 | *) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14775 | as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;; |
Mark Dickinson | bd79264 | 2009-03-18 20:06:12 +0000 | [diff] [blame] | 14776 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14777 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5 |
| 14778 | $as_echo "$enable_big_digits" >&6; } |
Mark Dickinson | bd79264 | 2009-03-18 20:06:12 +0000 | [diff] [blame] | 14779 | |
| 14780 | cat >>confdefs.h <<_ACEOF |
| 14781 | #define PYLONG_BITS_IN_DIGIT $enable_big_digits |
| 14782 | _ACEOF |
| 14783 | |
| 14784 | |
| 14785 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14786 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5 |
| 14787 | $as_echo "no value specified" >&6; } |
Mark Dickinson | bd79264 | 2009-03-18 20:06:12 +0000 | [diff] [blame] | 14788 | fi |
| 14789 | |
| 14790 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14791 | # check for wchar.h |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14792 | ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14793 | if test "x$ac_cv_header_wchar_h" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14794 | |
| 14795 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14796 | $as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14797 | |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 14798 | wchar_h="yes" |
| 14799 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14800 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14801 | wchar_h="no" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14802 | |
| 14803 | fi |
| 14804 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 14805 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14806 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 14807 | # determine wchar_t size |
| 14808 | if test "$wchar_h" = yes |
| 14809 | then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14810 | # The cast to long int works around a bug in the HP C Compiler |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14811 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 14812 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 14813 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14814 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5 |
| 14815 | $as_echo_n "checking size of wchar_t... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14816 | if ${ac_cv_sizeof_wchar_t+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14817 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14818 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14819 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h> |
| 14820 | "; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14821 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14822 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14823 | if test "$ac_cv_type_wchar_t" = yes; then |
| 14824 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 14825 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 14826 | as_fn_error 77 "cannot compute sizeof (wchar_t) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14827 | See \`config.log' for more details" "$LINENO" 5; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14828 | else |
| 14829 | ac_cv_sizeof_wchar_t=0 |
| 14830 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14831 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14832 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14833 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14834 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5 |
| 14835 | $as_echo "$ac_cv_sizeof_wchar_t" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14836 | |
| 14837 | |
| 14838 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14839 | cat >>confdefs.h <<_ACEOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 14840 | #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14841 | _ACEOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 14842 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 14843 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 14844 | fi |
| 14845 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14846 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5 |
| 14847 | $as_echo_n "checking for UCS-4 tcl... " >&6; } |
Martin v. Löwis | fa3bdea | 2003-09-04 18:50:54 +0000 | [diff] [blame] | 14848 | have_ucs4_tcl=no |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14849 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 14850 | /* end confdefs.h. */ |
Martin v. Löwis | fa3bdea | 2003-09-04 18:50:54 +0000 | [diff] [blame] | 14851 | |
| 14852 | #include <tcl.h> |
| 14853 | #if TCL_UTF_MAX != 6 |
| 14854 | # error "NOT UCS4_TCL" |
| 14855 | #endif |
| 14856 | int |
| 14857 | main () |
| 14858 | { |
| 14859 | |
| 14860 | ; |
| 14861 | return 0; |
| 14862 | } |
| 14863 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14864 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | fa3bdea | 2003-09-04 18:50:54 +0000 | [diff] [blame] | 14865 | |
| 14866 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14867 | $as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h |
Martin v. Löwis | fa3bdea | 2003-09-04 18:50:54 +0000 | [diff] [blame] | 14868 | |
| 14869 | have_ucs4_tcl=yes |
| 14870 | |
Martin v. Löwis | fa3bdea | 2003-09-04 18:50:54 +0000 | [diff] [blame] | 14871 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14872 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14873 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5 |
| 14874 | $as_echo "$have_ucs4_tcl" >&6; } |
Martin v. Löwis | fa3bdea | 2003-09-04 18:50:54 +0000 | [diff] [blame] | 14875 | |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 14876 | # check whether wchar_t is signed or not |
Marc-André Lemburg | d7160f8 | 2003-09-22 11:14:40 +0000 | [diff] [blame] | 14877 | if test "$wchar_h" = yes |
| 14878 | then |
| 14879 | # check whether wchar_t is signed or not |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14880 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5 |
| 14881 | $as_echo_n "checking whether wchar_t is signed... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14882 | if ${ac_cv_wchar_t_signed+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14883 | $as_echo_n "(cached) " >&6 |
Marc-André Lemburg | d7160f8 | 2003-09-22 11:14:40 +0000 | [diff] [blame] | 14884 | else |
| 14885 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14886 | if test "$cross_compiling" = yes; then : |
Marc-André Lemburg | d7160f8 | 2003-09-22 11:14:40 +0000 | [diff] [blame] | 14887 | ac_cv_wchar_t_signed=yes |
| 14888 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14889 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 14890 | /* end confdefs.h. */ |
Marc-André Lemburg | d7160f8 | 2003-09-22 11:14:40 +0000 | [diff] [blame] | 14891 | |
| 14892 | #include <wchar.h> |
| 14893 | int main() |
| 14894 | { |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 14895 | /* Success: exit code 0 */ |
| 14896 | exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1); |
Marc-André Lemburg | d7160f8 | 2003-09-22 11:14:40 +0000 | [diff] [blame] | 14897 | } |
| 14898 | |
| 14899 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14900 | if ac_fn_c_try_run "$LINENO"; then : |
Marc-André Lemburg | d7160f8 | 2003-09-22 11:14:40 +0000 | [diff] [blame] | 14901 | ac_cv_wchar_t_signed=yes |
| 14902 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14903 | ac_cv_wchar_t_signed=no |
Marc-André Lemburg | d7160f8 | 2003-09-22 11:14:40 +0000 | [diff] [blame] | 14904 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14905 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 14906 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Marc-André Lemburg | d7160f8 | 2003-09-22 11:14:40 +0000 | [diff] [blame] | 14907 | fi |
| 14908 | |
Marc-André Lemburg | d7160f8 | 2003-09-22 11:14:40 +0000 | [diff] [blame] | 14909 | fi |
| 14910 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14911 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5 |
| 14912 | $as_echo "$ac_cv_wchar_t_signed" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14913 | fi |
| 14914 | |
Michael Osipov | 3738fad | 2018-08-24 18:17:19 +0200 | [diff] [blame] | 14915 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is usable" >&5 |
| 14916 | $as_echo_n "checking whether wchar_t is usable... " >&6; } |
Georg Brandl | 52d168a | 2008-01-07 18:10:24 +0000 | [diff] [blame] | 14917 | # wchar_t is only usable if it maps to an unsigned type |
Martin v. Löwis | d63a3b8 | 2011-09-28 07:41:54 +0200 | [diff] [blame] | 14918 | if test "$ac_cv_sizeof_wchar_t" -ge 2 \ |
Matthias Klose | 7dbeed7 | 2004-12-24 08:22:17 +0000 | [diff] [blame] | 14919 | -a "$ac_cv_wchar_t_signed" = "no" |
Georg Brandl | 52d168a | 2008-01-07 18:10:24 +0000 | [diff] [blame] | 14920 | then |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 14921 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14922 | $as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14923 | |
Michael Osipov | 3738fad | 2018-08-24 18:17:19 +0200 | [diff] [blame] | 14924 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 14925 | $as_echo "yes" >&6; } |
Georg Brandl | 52d168a | 2008-01-07 18:10:24 +0000 | [diff] [blame] | 14926 | else |
Michael Osipov | 3738fad | 2018-08-24 18:17:19 +0200 | [diff] [blame] | 14927 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 14928 | $as_echo "no" >&6; } |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 14929 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14930 | |
| 14931 | # check for endianness |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14932 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
| 14933 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14934 | if ${ac_cv_c_bigendian+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14935 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14936 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14937 | ac_cv_c_bigendian=unknown |
| 14938 | # See if we're dealing with a universal compiler. |
| 14939 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14940 | /* end confdefs.h. */ |
| 14941 | #ifndef __APPLE_CC__ |
| 14942 | not a universal capable compiler |
| 14943 | #endif |
| 14944 | typedef int dummy; |
| 14945 | |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 14946 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14947 | if ac_fn_c_try_compile "$LINENO"; then : |
| 14948 | |
| 14949 | # Check for potential -arch flags. It is not universal unless |
| 14950 | # there are at least two -arch flags with different values. |
| 14951 | ac_arch= |
| 14952 | ac_prev= |
| 14953 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do |
| 14954 | if test -n "$ac_prev"; then |
| 14955 | case $ac_word in |
| 14956 | i?86 | x86_64 | ppc | ppc64) |
| 14957 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then |
| 14958 | ac_arch=$ac_word |
| 14959 | else |
| 14960 | ac_cv_c_bigendian=universal |
| 14961 | break |
| 14962 | fi |
| 14963 | ;; |
| 14964 | esac |
| 14965 | ac_prev= |
| 14966 | elif test "x$ac_word" = "x-arch"; then |
| 14967 | ac_prev=arch |
| 14968 | fi |
| 14969 | done |
| 14970 | fi |
| 14971 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 14972 | if test $ac_cv_c_bigendian = unknown; then |
| 14973 | # See if sys/param.h defines the BYTE_ORDER macro. |
| 14974 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 14975 | /* end confdefs.h. */ |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14976 | #include <sys/types.h> |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14977 | #include <sys/param.h> |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14978 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14979 | int |
| 14980 | main () |
| 14981 | { |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14982 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
| 14983 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ |
| 14984 | && LITTLE_ENDIAN) |
| 14985 | bogus endian macros |
| 14986 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14987 | |
| 14988 | ; |
| 14989 | return 0; |
| 14990 | } |
| 14991 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14992 | if ac_fn_c_try_compile "$LINENO"; then : |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14993 | # It does; now see whether it defined to BIG_ENDIAN or not. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14994 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 14995 | /* end confdefs.h. */ |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14996 | #include <sys/types.h> |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14997 | #include <sys/param.h> |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14998 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14999 | int |
| 15000 | main () |
| 15001 | { |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 15002 | #if BYTE_ORDER != BIG_ENDIAN |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15003 | not big endian |
| 15004 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15005 | |
| 15006 | ; |
| 15007 | return 0; |
| 15008 | } |
| 15009 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15010 | if ac_fn_c_try_compile "$LINENO"; then : |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 15011 | ac_cv_c_bigendian=yes |
| 15012 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15013 | ac_cv_c_bigendian=no |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 15014 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15015 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15016 | fi |
| 15017 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15018 | fi |
| 15019 | if test $ac_cv_c_bigendian = unknown; then |
| 15020 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). |
| 15021 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15022 | /* end confdefs.h. */ |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15023 | #include <limits.h> |
| 15024 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15025 | int |
| 15026 | main () |
| 15027 | { |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15028 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) |
| 15029 | bogus endian macros |
| 15030 | #endif |
| 15031 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15032 | ; |
| 15033 | return 0; |
| 15034 | } |
| 15035 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15036 | if ac_fn_c_try_compile "$LINENO"; then : |
| 15037 | # It does; now see whether it defined to _BIG_ENDIAN or not. |
| 15038 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15039 | /* end confdefs.h. */ |
| 15040 | #include <limits.h> |
| 15041 | |
| 15042 | int |
| 15043 | main () |
| 15044 | { |
| 15045 | #ifndef _BIG_ENDIAN |
| 15046 | not big endian |
| 15047 | #endif |
| 15048 | |
| 15049 | ; |
| 15050 | return 0; |
| 15051 | } |
| 15052 | _ACEOF |
| 15053 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15054 | ac_cv_c_bigendian=yes |
Benjamin Peterson | 8719ad5 | 2009-09-11 22:24:02 +0000 | [diff] [blame] | 15055 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15056 | ac_cv_c_bigendian=no |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15057 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15058 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15059 | fi |
| 15060 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15061 | fi |
| 15062 | if test $ac_cv_c_bigendian = unknown; then |
| 15063 | # Compile a test program. |
| 15064 | if test "$cross_compiling" = yes; then : |
| 15065 | # Try to guess by grepping values from an object file. |
| 15066 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15067 | /* end confdefs.h. */ |
| 15068 | short int ascii_mm[] = |
| 15069 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; |
| 15070 | short int ascii_ii[] = |
| 15071 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; |
| 15072 | int use_ascii (int i) { |
| 15073 | return ascii_mm[i] + ascii_ii[i]; |
| 15074 | } |
| 15075 | short int ebcdic_ii[] = |
| 15076 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; |
| 15077 | short int ebcdic_mm[] = |
| 15078 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; |
| 15079 | int use_ebcdic (int i) { |
| 15080 | return ebcdic_mm[i] + ebcdic_ii[i]; |
| 15081 | } |
| 15082 | extern int foo; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15083 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15084 | int |
| 15085 | main () |
| 15086 | { |
| 15087 | return use_ascii (foo) == use_ebcdic (foo); |
| 15088 | ; |
| 15089 | return 0; |
| 15090 | } |
| 15091 | _ACEOF |
| 15092 | if ac_fn_c_try_compile "$LINENO"; then : |
| 15093 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then |
| 15094 | ac_cv_c_bigendian=yes |
| 15095 | fi |
| 15096 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then |
| 15097 | if test "$ac_cv_c_bigendian" = unknown; then |
| 15098 | ac_cv_c_bigendian=no |
| 15099 | else |
| 15100 | # finding both strings is unlikely to happen, but who knows? |
| 15101 | ac_cv_c_bigendian=unknown |
| 15102 | fi |
| 15103 | fi |
| 15104 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15105 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15106 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15107 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15108 | /* end confdefs.h. */ |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15109 | $ac_includes_default |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15110 | int |
| 15111 | main () |
| 15112 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15113 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15114 | /* Are we little or big endian? From Harbison&Steele. */ |
| 15115 | union |
| 15116 | { |
| 15117 | long int l; |
| 15118 | char c[sizeof (long int)]; |
| 15119 | } u; |
| 15120 | u.l = 1; |
| 15121 | return u.c[sizeof (long int) - 1] == 1; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15122 | |
| 15123 | ; |
| 15124 | return 0; |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 15125 | } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15126 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15127 | if ac_fn_c_try_run "$LINENO"; then : |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 15128 | ac_cv_c_bigendian=no |
| 15129 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15130 | ac_cv_c_bigendian=yes |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 15131 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15132 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 15133 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 15134 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15135 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15136 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15137 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15138 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 |
| 15139 | $as_echo "$ac_cv_c_bigendian" >&6; } |
| 15140 | case $ac_cv_c_bigendian in #( |
| 15141 | yes) |
| 15142 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h |
| 15143 | ;; #( |
| 15144 | no) |
| 15145 | ;; #( |
| 15146 | universal) |
Ronald Oussoren | 74f29b4 | 2009-09-20 20:09:26 +0000 | [diff] [blame] | 15147 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15148 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h |
Benjamin Peterson | 8719ad5 | 2009-09-11 22:24:02 +0000 | [diff] [blame] | 15149 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15150 | ;; #( |
| 15151 | *) |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 15152 | as_fn_error $? "unknown endianness |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15153 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15154 | esac |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 15155 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 15156 | |
Barry Warsaw | 35f3a2c | 2010-09-03 18:30:30 +0000 | [diff] [blame] | 15157 | # ABI version string for Python extension modules. This appears between the |
| 15158 | # periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated |
| 15159 | # from the following attributes which affect the ABI of this Python build (in |
| 15160 | # this order): |
| 15161 | # |
| 15162 | # * The Python implementation (always 'cpython-' for us) |
| 15163 | # * The major and minor version numbers |
| 15164 | # * --with-pydebug (adds a 'd') |
Barry Warsaw | 35f3a2c | 2010-09-03 18:30:30 +0000 | [diff] [blame] | 15165 | # |
| 15166 | # Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc, |
Benjamin Peterson | d7f73e9 | 2010-09-05 00:09:07 +0000 | [diff] [blame] | 15167 | # would get a shared library ABI version tag of 'cpython-32dmu' and shared |
| 15168 | # libraries would be named 'foo.cpython-32dmu.so'. |
Victor Stinner | 6c44fde | 2019-04-24 16:10:09 +0200 | [diff] [blame] | 15169 | # |
| 15170 | # In Python 3.2 and older, --with-wide-unicode added a 'u' flag. |
| 15171 | # In Python 3.7 and older, --with-pymalloc added a 'm' flag. |
Barry Warsaw | 35f3a2c | 2010-09-03 18:30:30 +0000 | [diff] [blame] | 15172 | |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 15173 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5 |
| 15174 | $as_echo_n "checking ABIFLAGS... " >&6; } |
| 15175 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5 |
| 15176 | $as_echo "$ABIFLAGS" >&6; } |
Barry Warsaw | 35f3a2c | 2010-09-03 18:30:30 +0000 | [diff] [blame] | 15177 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5 |
| 15178 | $as_echo_n "checking SOABI... " >&6; } |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 15179 | SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET} |
Barry Warsaw | 35f3a2c | 2010-09-03 18:30:30 +0000 | [diff] [blame] | 15180 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5 |
| 15181 | $as_echo "$SOABI" >&6; } |
| 15182 | |
Victor Stinner | 6d13e5b | 2019-04-26 18:56:19 +0200 | [diff] [blame] | 15183 | # Release and debug (Py_DEBUG) ABI are compatible, but not Py_TRACE_REFS ABI |
| 15184 | if test "$Py_DEBUG" = 'true' -a "$with_trace_refs" != "yes"; then |
Victor Stinner | 5422e3c | 2019-04-26 01:40:00 +0200 | [diff] [blame] | 15185 | # Similar to SOABI but remove "d" flag from ABIFLAGS |
| 15186 | |
| 15187 | ALT_SOABI='cpython-'`echo $VERSION | tr -d .``echo $ABIFLAGS | tr -d d`${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET} |
| 15188 | |
| 15189 | cat >>confdefs.h <<_ACEOF |
| 15190 | #define ALT_SOABI "${ALT_SOABI}" |
| 15191 | _ACEOF |
| 15192 | |
| 15193 | fi |
| 15194 | |
doko@ubuntu.com | d5537d0 | 2013-03-21 13:21:49 -0700 | [diff] [blame] | 15195 | |
| 15196 | case $ac_sys_system in |
pxinwr | 32f5fdd | 2019-02-27 19:09:28 +0800 | [diff] [blame] | 15197 | Linux*|GNU*|Darwin|VxWorks) |
doko@ubuntu.com | d5537d0 | 2013-03-21 13:21:49 -0700 | [diff] [blame] | 15198 | EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};; |
| 15199 | *) |
| 15200 | EXT_SUFFIX=${SHLIB_SUFFIX};; |
| 15201 | esac |
| 15202 | |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 15203 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5 |
| 15204 | $as_echo_n "checking LDVERSION... " >&6; } |
| 15205 | LDVERSION='$(VERSION)$(ABIFLAGS)' |
| 15206 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5 |
| 15207 | $as_echo "$LDVERSION" >&6; } |
| 15208 | |
E. M. Bray | c994c8f | 2019-05-24 17:33:47 +0200 | [diff] [blame] | 15209 | # On Android and Cygwin the shared libraries must be linked with libpython. |
xdegaye | 254b309 | 2019-04-29 09:27:40 +0200 | [diff] [blame] | 15210 | |
E. M. Bray | b1fc417 | 2019-05-24 18:39:39 +0200 | [diff] [blame] | 15211 | if test -n "$ANDROID_API_LEVEL" -o "$MACHDEP" = "cygwin"; then |
xdegaye | 254b309 | 2019-04-29 09:27:40 +0200 | [diff] [blame] | 15212 | LIBPYTHON="-lpython${VERSION}${ABIFLAGS}" |
E. M. Bray | b1fc417 | 2019-05-24 18:39:39 +0200 | [diff] [blame] | 15213 | else |
| 15214 | LIBPYTHON='' |
xdegaye | 254b309 | 2019-04-29 09:27:40 +0200 | [diff] [blame] | 15215 | fi |
| 15216 | |
doko@python.org | 8742119 | 2013-01-26 11:39:31 +0100 | [diff] [blame] | 15217 | |
doko@ubuntu.com | 5553231 | 2016-06-14 08:55:19 +0200 | [diff] [blame] | 15218 | if test x$PLATFORM_TRIPLET = x; then |
| 15219 | LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}" |
| 15220 | else |
| 15221 | LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" |
| 15222 | fi |
doko@python.org | 8742119 | 2013-01-26 11:39:31 +0100 | [diff] [blame] | 15223 | |
| 15224 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 15225 | # Check whether right shifting a negative integer extends the sign bit |
| 15226 | # or fills with zeros (like the Cray J90, according to Tim Peters). |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15227 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5 |
| 15228 | $as_echo_n "checking whether right shift extends the sign bit... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15229 | if ${ac_cv_rshift_extends_sign+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15230 | $as_echo_n "(cached) " >&6 |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 15231 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15232 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15233 | if test "$cross_compiling" = yes; then : |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 15234 | ac_cv_rshift_extends_sign=yes |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 15235 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15236 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15237 | /* end confdefs.h. */ |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 15238 | |
| 15239 | int main() |
| 15240 | { |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 15241 | exit(((-1)>>3 == -1) ? 0 : 1); |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 15242 | } |
| 15243 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15244 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15245 | if ac_fn_c_try_run "$LINENO"; then : |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 15246 | ac_cv_rshift_extends_sign=yes |
| 15247 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15248 | ac_cv_rshift_extends_sign=no |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 15249 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15250 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 15251 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 15252 | fi |
| 15253 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15254 | fi |
| 15255 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15256 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5 |
| 15257 | $as_echo "$ac_cv_rshift_extends_sign" >&6; } |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 15258 | if test "$ac_cv_rshift_extends_sign" = no |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 15259 | then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15260 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15261 | $as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 15262 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 15263 | fi |
| 15264 | |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 15265 | # check for getc_unlocked and related locking functions |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15266 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5 |
| 15267 | $as_echo_n "checking for getc_unlocked() and friends... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15268 | if ${ac_cv_have_getc_unlocked+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15269 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 15270 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15271 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15272 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15273 | /* end confdefs.h. */ |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 15274 | #include <stdio.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15275 | int |
| 15276 | main () |
| 15277 | { |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 15278 | |
| 15279 | FILE *f = fopen("/dev/null", "r"); |
| 15280 | flockfile(f); |
| 15281 | getc_unlocked(f); |
| 15282 | funlockfile(f); |
| 15283 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15284 | ; |
| 15285 | return 0; |
| 15286 | } |
| 15287 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15288 | if ac_fn_c_try_link "$LINENO"; then : |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 15289 | ac_cv_have_getc_unlocked=yes |
| 15290 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15291 | ac_cv_have_getc_unlocked=no |
| 15292 | fi |
| 15293 | rm -f core conftest.err conftest.$ac_objext \ |
| 15294 | conftest$ac_exeext conftest.$ac_ext |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 15295 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15296 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15297 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5 |
| 15298 | $as_echo "$ac_cv_have_getc_unlocked" >&6; } |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 15299 | if test "$ac_cv_have_getc_unlocked" = yes |
| 15300 | then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15301 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15302 | $as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 15303 | |
| 15304 | fi |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 15305 | |
Neal Norwitz | fe8e3d9 | 2006-01-07 21:07:20 +0000 | [diff] [blame] | 15306 | # check where readline lives |
Martin v. Löwis | 82bca63 | 2006-02-10 20:49:30 +0000 | [diff] [blame] | 15307 | # save the value of LIBS so we don't actually link Python with readline |
| 15308 | LIBS_no_readline=$LIBS |
Neal Norwitz | fe8e3d9 | 2006-01-07 21:07:20 +0000 | [diff] [blame] | 15309 | |
Gregory P. Smith | 1882094 | 2008-09-07 06:24:49 +0000 | [diff] [blame] | 15310 | # On some systems we need to link readline to a termcap compatible |
| 15311 | # library. NOTE: Keep the precedence of listed libraries synchronised |
| 15312 | # with setup.py. |
| 15313 | py_cv_lib_readline=no |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15314 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5 |
| 15315 | $as_echo_n "checking how to link readline libs... " >&6; } |
doko@ubuntu.com | f2967c7 | 2012-06-30 17:32:23 +0200 | [diff] [blame] | 15316 | for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do |
Gregory P. Smith | 1882094 | 2008-09-07 06:24:49 +0000 | [diff] [blame] | 15317 | if test -z "$py_libtermcap"; then |
| 15318 | READLINE_LIBS="-lreadline" |
| 15319 | else |
| 15320 | READLINE_LIBS="-lreadline -l$py_libtermcap" |
| 15321 | fi |
| 15322 | LIBS="$READLINE_LIBS $LIBS_no_readline" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15323 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Neal Norwitz | fe8e3d9 | 2006-01-07 21:07:20 +0000 | [diff] [blame] | 15324 | /* end confdefs.h. */ |
| 15325 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15326 | /* Override any GCC internal prototype to avoid an error. |
| 15327 | Use char because int might match the return type of a GCC |
| 15328 | builtin and then its argument prototype would still apply. */ |
Neal Norwitz | fe8e3d9 | 2006-01-07 21:07:20 +0000 | [diff] [blame] | 15329 | #ifdef __cplusplus |
| 15330 | extern "C" |
| 15331 | #endif |
Neal Norwitz | fe8e3d9 | 2006-01-07 21:07:20 +0000 | [diff] [blame] | 15332 | char readline (); |
| 15333 | int |
| 15334 | main () |
| 15335 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15336 | return readline (); |
Neal Norwitz | fe8e3d9 | 2006-01-07 21:07:20 +0000 | [diff] [blame] | 15337 | ; |
| 15338 | return 0; |
| 15339 | } |
| 15340 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15341 | if ac_fn_c_try_link "$LINENO"; then : |
Gregory P. Smith | 1882094 | 2008-09-07 06:24:49 +0000 | [diff] [blame] | 15342 | py_cv_lib_readline=yes |
Neal Norwitz | fe8e3d9 | 2006-01-07 21:07:20 +0000 | [diff] [blame] | 15343 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15344 | rm -f core conftest.err conftest.$ac_objext \ |
| 15345 | conftest$ac_exeext conftest.$ac_ext |
Gregory P. Smith | 1882094 | 2008-09-07 06:24:49 +0000 | [diff] [blame] | 15346 | if test $py_cv_lib_readline = yes; then |
| 15347 | break |
| 15348 | fi |
| 15349 | done |
| 15350 | # Uncomment this line if you want to use READINE_LIBS in Makefile or scripts |
| 15351 | #AC_SUBST([READLINE_LIBS]) |
Gregory P. Smith | 3856c37 | 2008-09-07 19:24:00 +0000 | [diff] [blame] | 15352 | if test $py_cv_lib_readline = no; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15353 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 |
| 15354 | $as_echo "none" >&6; } |
Gregory P. Smith | 1882094 | 2008-09-07 06:24:49 +0000 | [diff] [blame] | 15355 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15356 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5 |
| 15357 | $as_echo "$READLINE_LIBS" >&6; } |
Gregory P. Smith | 1882094 | 2008-09-07 06:24:49 +0000 | [diff] [blame] | 15358 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15359 | $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h |
Neal Norwitz | fe8e3d9 | 2006-01-07 21:07:20 +0000 | [diff] [blame] | 15360 | |
Neal Norwitz | fe8e3d9 | 2006-01-07 21:07:20 +0000 | [diff] [blame] | 15361 | fi |
| 15362 | |
Guido van Rossum | faf5e4d | 2002-12-30 16:25:41 +0000 | [diff] [blame] | 15363 | # check for readline 2.2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15364 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15365 | /* end confdefs.h. */ |
Guido van Rossum | faf5e4d | 2002-12-30 16:25:41 +0000 | [diff] [blame] | 15366 | #include <readline/readline.h> |
| 15367 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15368 | if ac_fn_c_try_cpp "$LINENO"; then : |
Guido van Rossum | faf5e4d | 2002-12-30 16:25:41 +0000 | [diff] [blame] | 15369 | have_readline=yes |
| 15370 | else |
Guido van Rossum | faf5e4d | 2002-12-30 16:25:41 +0000 | [diff] [blame] | 15371 | have_readline=no |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 15372 | |
Guido van Rossum | faf5e4d | 2002-12-30 16:25:41 +0000 | [diff] [blame] | 15373 | fi |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 15374 | rm -f conftest.err conftest.i conftest.$ac_ext |
Guido van Rossum | faf5e4d | 2002-12-30 16:25:41 +0000 | [diff] [blame] | 15375 | if test $have_readline = yes |
| 15376 | then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15377 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15378 | /* end confdefs.h. */ |
Guido van Rossum | faf5e4d | 2002-12-30 16:25:41 +0000 | [diff] [blame] | 15379 | #include <readline/readline.h> |
| 15380 | |
| 15381 | _ACEOF |
| 15382 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15383 | $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then : |
Guido van Rossum | faf5e4d | 2002-12-30 16:25:41 +0000 | [diff] [blame] | 15384 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15385 | $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h |
Guido van Rossum | faf5e4d | 2002-12-30 16:25:41 +0000 | [diff] [blame] | 15386 | |
| 15387 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 15388 | rm -f conftest* |
Guido van Rossum | faf5e4d | 2002-12-30 16:25:41 +0000 | [diff] [blame] | 15389 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15390 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Antoine Pitrou | d513177 | 2009-10-26 19:22:14 +0000 | [diff] [blame] | 15391 | /* end confdefs.h. */ |
| 15392 | #include <readline/readline.h> |
| 15393 | |
| 15394 | _ACEOF |
| 15395 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15396 | $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then : |
Antoine Pitrou | d513177 | 2009-10-26 19:22:14 +0000 | [diff] [blame] | 15397 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15398 | $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h |
Antoine Pitrou | d513177 | 2009-10-26 19:22:14 +0000 | [diff] [blame] | 15399 | |
| 15400 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 15401 | rm -f conftest* |
Antoine Pitrou | d513177 | 2009-10-26 19:22:14 +0000 | [diff] [blame] | 15402 | |
Guido van Rossum | faf5e4d | 2002-12-30 16:25:41 +0000 | [diff] [blame] | 15403 | fi |
| 15404 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 15405 | # check for readline 4.0 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15406 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5 |
| 15407 | $as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15408 | if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15409 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 15410 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15411 | ac_check_lib_save_LIBS=$LIBS |
Gregory P. Smith | 1882094 | 2008-09-07 06:24:49 +0000 | [diff] [blame] | 15412 | LIBS="-lreadline $READLINE_LIBS $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15413 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15414 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15415 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15416 | /* Override any GCC internal prototype to avoid an error. |
| 15417 | Use char because int might match the return type of a GCC |
| 15418 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15419 | #ifdef __cplusplus |
| 15420 | extern "C" |
| 15421 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15422 | char rl_pre_input_hook (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15423 | int |
| 15424 | main () |
| 15425 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15426 | return rl_pre_input_hook (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15427 | ; |
| 15428 | return 0; |
| 15429 | } |
| 15430 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15431 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15432 | ac_cv_lib_readline_rl_pre_input_hook=yes |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 15433 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15434 | ac_cv_lib_readline_rl_pre_input_hook=no |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 15435 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15436 | rm -f core conftest.err conftest.$ac_objext \ |
| 15437 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15438 | LIBS=$ac_check_lib_save_LIBS |
| 15439 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15440 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5 |
| 15441 | $as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15442 | if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then : |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 15443 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15444 | $as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 15445 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 15446 | fi |
| 15447 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 15448 | |
Thomas Wouters | 89d996e | 2007-09-08 17:39:28 +0000 | [diff] [blame] | 15449 | # also in 4.0 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15450 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5 |
| 15451 | $as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15452 | if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15453 | $as_echo_n "(cached) " >&6 |
Thomas Wouters | 89d996e | 2007-09-08 17:39:28 +0000 | [diff] [blame] | 15454 | else |
| 15455 | ac_check_lib_save_LIBS=$LIBS |
Gregory P. Smith | 1882094 | 2008-09-07 06:24:49 +0000 | [diff] [blame] | 15456 | LIBS="-lreadline $READLINE_LIBS $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15457 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Thomas Wouters | 89d996e | 2007-09-08 17:39:28 +0000 | [diff] [blame] | 15458 | /* end confdefs.h. */ |
| 15459 | |
| 15460 | /* Override any GCC internal prototype to avoid an error. |
| 15461 | Use char because int might match the return type of a GCC |
| 15462 | builtin and then its argument prototype would still apply. */ |
| 15463 | #ifdef __cplusplus |
| 15464 | extern "C" |
| 15465 | #endif |
| 15466 | char rl_completion_display_matches_hook (); |
| 15467 | int |
| 15468 | main () |
| 15469 | { |
| 15470 | return rl_completion_display_matches_hook (); |
| 15471 | ; |
| 15472 | return 0; |
| 15473 | } |
| 15474 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15475 | if ac_fn_c_try_link "$LINENO"; then : |
Thomas Wouters | 89d996e | 2007-09-08 17:39:28 +0000 | [diff] [blame] | 15476 | ac_cv_lib_readline_rl_completion_display_matches_hook=yes |
| 15477 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15478 | ac_cv_lib_readline_rl_completion_display_matches_hook=no |
Thomas Wouters | 89d996e | 2007-09-08 17:39:28 +0000 | [diff] [blame] | 15479 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15480 | rm -f core conftest.err conftest.$ac_objext \ |
| 15481 | conftest$ac_exeext conftest.$ac_ext |
Thomas Wouters | 89d996e | 2007-09-08 17:39:28 +0000 | [diff] [blame] | 15482 | LIBS=$ac_check_lib_save_LIBS |
| 15483 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15484 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5 |
| 15485 | $as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15486 | if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then : |
Thomas Wouters | 89d996e | 2007-09-08 17:39:28 +0000 | [diff] [blame] | 15487 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15488 | $as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h |
Thomas Wouters | 89d996e | 2007-09-08 17:39:28 +0000 | [diff] [blame] | 15489 | |
| 15490 | fi |
| 15491 | |
| 15492 | |
Martin Panter | 5dbbf1a | 2016-04-03 02:54:58 +0000 | [diff] [blame] | 15493 | # also in 4.0, but not in editline |
| 15494 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5 |
| 15495 | $as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; } |
| 15496 | if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then : |
| 15497 | $as_echo_n "(cached) " >&6 |
| 15498 | else |
| 15499 | ac_check_lib_save_LIBS=$LIBS |
| 15500 | LIBS="-lreadline $READLINE_LIBS $LIBS" |
| 15501 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15502 | /* end confdefs.h. */ |
| 15503 | |
| 15504 | /* Override any GCC internal prototype to avoid an error. |
| 15505 | Use char because int might match the return type of a GCC |
| 15506 | builtin and then its argument prototype would still apply. */ |
| 15507 | #ifdef __cplusplus |
| 15508 | extern "C" |
| 15509 | #endif |
| 15510 | char rl_resize_terminal (); |
| 15511 | int |
| 15512 | main () |
| 15513 | { |
| 15514 | return rl_resize_terminal (); |
| 15515 | ; |
| 15516 | return 0; |
| 15517 | } |
| 15518 | _ACEOF |
| 15519 | if ac_fn_c_try_link "$LINENO"; then : |
| 15520 | ac_cv_lib_readline_rl_resize_terminal=yes |
| 15521 | else |
| 15522 | ac_cv_lib_readline_rl_resize_terminal=no |
| 15523 | fi |
| 15524 | rm -f core conftest.err conftest.$ac_objext \ |
| 15525 | conftest$ac_exeext conftest.$ac_ext |
| 15526 | LIBS=$ac_check_lib_save_LIBS |
| 15527 | fi |
| 15528 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5 |
| 15529 | $as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; } |
| 15530 | if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then : |
| 15531 | |
| 15532 | $as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h |
| 15533 | |
| 15534 | fi |
| 15535 | |
| 15536 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 15537 | # check for readline 4.2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15538 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5 |
| 15539 | $as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15540 | if ${ac_cv_lib_readline_rl_completion_matches+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15541 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 15542 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15543 | ac_check_lib_save_LIBS=$LIBS |
Gregory P. Smith | 1882094 | 2008-09-07 06:24:49 +0000 | [diff] [blame] | 15544 | LIBS="-lreadline $READLINE_LIBS $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15545 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15546 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15547 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15548 | /* Override any GCC internal prototype to avoid an error. |
| 15549 | Use char because int might match the return type of a GCC |
| 15550 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15551 | #ifdef __cplusplus |
| 15552 | extern "C" |
| 15553 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15554 | char rl_completion_matches (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15555 | int |
| 15556 | main () |
| 15557 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15558 | return rl_completion_matches (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15559 | ; |
| 15560 | return 0; |
| 15561 | } |
| 15562 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15563 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15564 | ac_cv_lib_readline_rl_completion_matches=yes |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 15565 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15566 | ac_cv_lib_readline_rl_completion_matches=no |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 15567 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15568 | rm -f core conftest.err conftest.$ac_objext \ |
| 15569 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15570 | LIBS=$ac_check_lib_save_LIBS |
| 15571 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15572 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5 |
| 15573 | $as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15574 | if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then : |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 15575 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15576 | $as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 15577 | |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 15578 | fi |
| 15579 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 15580 | |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15581 | # also in readline 4.2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15582 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15583 | /* end confdefs.h. */ |
| 15584 | #include <readline/readline.h> |
| 15585 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15586 | if ac_fn_c_try_cpp "$LINENO"; then : |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15587 | have_readline=yes |
| 15588 | else |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15589 | have_readline=no |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 15590 | |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15591 | fi |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 15592 | rm -f conftest.err conftest.i conftest.$ac_ext |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15593 | if test $have_readline = yes |
| 15594 | then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15595 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15596 | /* end confdefs.h. */ |
| 15597 | #include <readline/readline.h> |
| 15598 | |
| 15599 | _ACEOF |
| 15600 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15601 | $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then : |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15602 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15603 | $as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15604 | |
| 15605 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 15606 | rm -f conftest* |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15607 | |
| 15608 | fi |
| 15609 | |
Benjamin Peterson | d1e22ba | 2014-11-26 14:35:12 -0600 | [diff] [blame] | 15610 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5 |
| 15611 | $as_echo_n "checking for append_history in -lreadline... " >&6; } |
| 15612 | if ${ac_cv_lib_readline_append_history+:} false; then : |
| 15613 | $as_echo_n "(cached) " >&6 |
| 15614 | else |
| 15615 | ac_check_lib_save_LIBS=$LIBS |
| 15616 | LIBS="-lreadline $READLINE_LIBS $LIBS" |
| 15617 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15618 | /* end confdefs.h. */ |
| 15619 | |
| 15620 | /* Override any GCC internal prototype to avoid an error. |
| 15621 | Use char because int might match the return type of a GCC |
| 15622 | builtin and then its argument prototype would still apply. */ |
| 15623 | #ifdef __cplusplus |
| 15624 | extern "C" |
| 15625 | #endif |
| 15626 | char append_history (); |
| 15627 | int |
| 15628 | main () |
| 15629 | { |
| 15630 | return append_history (); |
| 15631 | ; |
| 15632 | return 0; |
| 15633 | } |
| 15634 | _ACEOF |
| 15635 | if ac_fn_c_try_link "$LINENO"; then : |
| 15636 | ac_cv_lib_readline_append_history=yes |
| 15637 | else |
| 15638 | ac_cv_lib_readline_append_history=no |
| 15639 | fi |
| 15640 | rm -f core conftest.err conftest.$ac_objext \ |
| 15641 | conftest$ac_exeext conftest.$ac_ext |
| 15642 | LIBS=$ac_check_lib_save_LIBS |
| 15643 | fi |
| 15644 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5 |
| 15645 | $as_echo "$ac_cv_lib_readline_append_history" >&6; } |
| 15646 | if test "x$ac_cv_lib_readline_append_history" = xyes; then : |
| 15647 | |
| 15648 | $as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h |
| 15649 | |
| 15650 | fi |
| 15651 | |
| 15652 | |
Martin v. Löwis | 82bca63 | 2006-02-10 20:49:30 +0000 | [diff] [blame] | 15653 | # End of readline checks: restore LIBS |
| 15654 | LIBS=$LIBS_no_readline |
| 15655 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15656 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5 |
| 15657 | $as_echo_n "checking for broken nice()... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15658 | if ${ac_cv_broken_nice+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15659 | $as_echo_n "(cached) " >&6 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 15660 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15661 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15662 | if test "$cross_compiling" = yes; then : |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 15663 | ac_cv_broken_nice=no |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 15664 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15665 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15666 | /* end confdefs.h. */ |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 15667 | |
Benjamin Peterson | b84df2d | 2019-02-25 21:37:59 -0800 | [diff] [blame] | 15668 | #include <stdlib.h> |
| 15669 | #include <unistd.h> |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 15670 | int main() |
| 15671 | { |
| 15672 | int val1 = nice(1); |
| 15673 | if (val1 != -1 && val1 == nice(2)) |
| 15674 | exit(0); |
| 15675 | exit(1); |
| 15676 | } |
| 15677 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15678 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15679 | if ac_fn_c_try_run "$LINENO"; then : |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 15680 | ac_cv_broken_nice=yes |
| 15681 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15682 | ac_cv_broken_nice=no |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 15683 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15684 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 15685 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 15686 | fi |
| 15687 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15688 | fi |
| 15689 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15690 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5 |
| 15691 | $as_echo "$ac_cv_broken_nice" >&6; } |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 15692 | if test "$ac_cv_broken_nice" = yes |
| 15693 | then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15694 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15695 | $as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 15696 | |
| 15697 | fi |
| 15698 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15699 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5 |
| 15700 | $as_echo_n "checking for broken poll()... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15701 | if ${ac_cv_broken_poll+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15702 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 15703 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15704 | if test "$cross_compiling" = yes; then : |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15705 | ac_cv_broken_poll=no |
| 15706 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15707 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15708 | /* end confdefs.h. */ |
| 15709 | |
| 15710 | #include <poll.h> |
| 15711 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 15712 | int main() |
| 15713 | { |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15714 | struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 }; |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 15715 | int poll_test; |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15716 | |
| 15717 | close (42); |
| 15718 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 15719 | poll_test = poll(&poll_struct, 1, 0); |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15720 | if (poll_test < 0) |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 15721 | return 0; |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15722 | else if (poll_test == 0 && poll_struct.revents != POLLNVAL) |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 15723 | return 0; |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15724 | else |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 15725 | return 1; |
| 15726 | } |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15727 | |
| 15728 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15729 | if ac_fn_c_try_run "$LINENO"; then : |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15730 | ac_cv_broken_poll=yes |
| 15731 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15732 | ac_cv_broken_poll=no |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15733 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15734 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 15735 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15736 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15737 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 15738 | fi |
| 15739 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15740 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5 |
| 15741 | $as_echo "$ac_cv_broken_poll" >&6; } |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15742 | if test "$ac_cv_broken_poll" = yes |
| 15743 | then |
| 15744 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15745 | $as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15746 | |
| 15747 | fi |
| 15748 | |
Martin v. Löwis | 1d45906 | 2005-03-14 21:23:33 +0000 | [diff] [blame] | 15749 | # check tzset(3) exists and works like we expect it to |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15750 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5 |
| 15751 | $as_echo_n "checking for working tzset()... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15752 | if ${ac_cv_working_tzset+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15753 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15754 | else |
| 15755 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15756 | if test "$cross_compiling" = yes; then : |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15757 | ac_cv_working_tzset=no |
| 15758 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15759 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15760 | /* end confdefs.h. */ |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15761 | |
| 15762 | #include <stdlib.h> |
| 15763 | #include <time.h> |
Brett Cannon | 1836781 | 2003-09-19 00:59:16 +0000 | [diff] [blame] | 15764 | #include <string.h> |
Brett Cannon | 4380242 | 2005-02-10 20:48:03 +0000 | [diff] [blame] | 15765 | |
| 15766 | #if HAVE_TZNAME |
| 15767 | extern char *tzname[]; |
| 15768 | #endif |
| 15769 | |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15770 | int main() |
| 15771 | { |
Brett Cannon | 1836781 | 2003-09-19 00:59:16 +0000 | [diff] [blame] | 15772 | /* Note that we need to ensure that not only does tzset(3) |
| 15773 | do 'something' with localtime, but it works as documented |
| 15774 | in the library reference and as expected by the test suite. |
Martin v. Löwis | 1d45906 | 2005-03-14 21:23:33 +0000 | [diff] [blame] | 15775 | This includes making sure that tzname is set properly if |
| 15776 | tm->tm_zone does not exist since it is the alternative way |
| 15777 | of getting timezone info. |
Brett Cannon | 1836781 | 2003-09-19 00:59:16 +0000 | [diff] [blame] | 15778 | |
| 15779 | Red Hat 6.2 doesn't understand the southern hemisphere |
Martin v. Löwis | 1d45906 | 2005-03-14 21:23:33 +0000 | [diff] [blame] | 15780 | after New Year's Day. |
Brett Cannon | 1836781 | 2003-09-19 00:59:16 +0000 | [diff] [blame] | 15781 | */ |
| 15782 | |
Martin v. Löwis | 1d45906 | 2005-03-14 21:23:33 +0000 | [diff] [blame] | 15783 | time_t groundhogday = 1044144000; /* GMT-based */ |
Brett Cannon | 1836781 | 2003-09-19 00:59:16 +0000 | [diff] [blame] | 15784 | time_t midyear = groundhogday + (365 * 24 * 3600 / 2); |
| 15785 | |
Neal Norwitz | 7f2588c | 2003-04-11 15:35:53 +0000 | [diff] [blame] | 15786 | putenv("TZ=UTC+0"); |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15787 | tzset(); |
Brett Cannon | 1836781 | 2003-09-19 00:59:16 +0000 | [diff] [blame] | 15788 | if (localtime(&groundhogday)->tm_hour != 0) |
| 15789 | exit(1); |
Brett Cannon | 4380242 | 2005-02-10 20:48:03 +0000 | [diff] [blame] | 15790 | #if HAVE_TZNAME |
| 15791 | /* For UTC, tzname[1] is sometimes "", sometimes " " */ |
| 15792 | if (strcmp(tzname[0], "UTC") || |
| 15793 | (tzname[1][0] != 0 && tzname[1][0] != ' ')) |
| 15794 | exit(1); |
| 15795 | #endif |
Brett Cannon | 1836781 | 2003-09-19 00:59:16 +0000 | [diff] [blame] | 15796 | |
Neal Norwitz | 7f2588c | 2003-04-11 15:35:53 +0000 | [diff] [blame] | 15797 | putenv("TZ=EST+5EDT,M4.1.0,M10.5.0"); |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15798 | tzset(); |
Brett Cannon | 1836781 | 2003-09-19 00:59:16 +0000 | [diff] [blame] | 15799 | if (localtime(&groundhogday)->tm_hour != 19) |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15800 | exit(1); |
Brett Cannon | 4380242 | 2005-02-10 20:48:03 +0000 | [diff] [blame] | 15801 | #if HAVE_TZNAME |
| 15802 | if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT")) |
| 15803 | exit(1); |
| 15804 | #endif |
Brett Cannon | 1836781 | 2003-09-19 00:59:16 +0000 | [diff] [blame] | 15805 | |
| 15806 | putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0"); |
| 15807 | tzset(); |
| 15808 | if (localtime(&groundhogday)->tm_hour != 11) |
| 15809 | exit(1); |
Brett Cannon | 4380242 | 2005-02-10 20:48:03 +0000 | [diff] [blame] | 15810 | #if HAVE_TZNAME |
| 15811 | if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT")) |
| 15812 | exit(1); |
| 15813 | #endif |
| 15814 | |
| 15815 | #if HAVE_STRUCT_TM_TM_ZONE |
Brett Cannon | 1836781 | 2003-09-19 00:59:16 +0000 | [diff] [blame] | 15816 | if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT")) |
| 15817 | exit(1); |
| 15818 | if (strcmp(localtime(&midyear)->tm_zone, "AEST")) |
| 15819 | exit(1); |
Brett Cannon | 4380242 | 2005-02-10 20:48:03 +0000 | [diff] [blame] | 15820 | #endif |
Brett Cannon | 1836781 | 2003-09-19 00:59:16 +0000 | [diff] [blame] | 15821 | |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15822 | exit(0); |
| 15823 | } |
| 15824 | |
| 15825 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15826 | if ac_fn_c_try_run "$LINENO"; then : |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15827 | ac_cv_working_tzset=yes |
| 15828 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15829 | ac_cv_working_tzset=no |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15830 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15831 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 15832 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15833 | fi |
| 15834 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15835 | fi |
| 15836 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15837 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5 |
| 15838 | $as_echo "$ac_cv_working_tzset" >&6; } |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15839 | if test "$ac_cv_working_tzset" = yes |
| 15840 | then |
| 15841 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15842 | $as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15843 | |
| 15844 | fi |
| 15845 | |
Martin v. Löwis | 94717ed | 2002-09-09 14:24:16 +0000 | [diff] [blame] | 15846 | # Look for subsecond timestamps in struct stat |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15847 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5 |
| 15848 | $as_echo_n "checking for tv_nsec in struct stat... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15849 | if ${ac_cv_stat_tv_nsec+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15850 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 94717ed | 2002-09-09 14:24:16 +0000 | [diff] [blame] | 15851 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15852 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15853 | /* end confdefs.h. */ |
Martin v. Löwis | 94717ed | 2002-09-09 14:24:16 +0000 | [diff] [blame] | 15854 | #include <sys/stat.h> |
Martin v. Löwis | 94717ed | 2002-09-09 14:24:16 +0000 | [diff] [blame] | 15855 | int |
| 15856 | main () |
| 15857 | { |
| 15858 | |
| 15859 | struct stat st; |
| 15860 | st.st_mtim.tv_nsec = 1; |
| 15861 | |
| 15862 | ; |
| 15863 | return 0; |
| 15864 | } |
| 15865 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15866 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | a32c994 | 2002-09-09 16:17:47 +0000 | [diff] [blame] | 15867 | ac_cv_stat_tv_nsec=yes |
Martin v. Löwis | 94717ed | 2002-09-09 14:24:16 +0000 | [diff] [blame] | 15868 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15869 | ac_cv_stat_tv_nsec=no |
Martin v. Löwis | 94717ed | 2002-09-09 14:24:16 +0000 | [diff] [blame] | 15870 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15871 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15872 | fi |
| 15873 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15874 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5 |
| 15875 | $as_echo "$ac_cv_stat_tv_nsec" >&6; } |
Martin v. Löwis | 94717ed | 2002-09-09 14:24:16 +0000 | [diff] [blame] | 15876 | if test "$ac_cv_stat_tv_nsec" = yes |
| 15877 | then |
| 15878 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15879 | $as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h |
Martin v. Löwis | 94717ed | 2002-09-09 14:24:16 +0000 | [diff] [blame] | 15880 | |
| 15881 | fi |
| 15882 | |
Martin v. Löwis | ebd9d5b | 2005-08-09 15:00:59 +0000 | [diff] [blame] | 15883 | # Look for BSD style subsecond timestamps in struct stat |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15884 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5 |
| 15885 | $as_echo_n "checking for tv_nsec2 in struct stat... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15886 | if ${ac_cv_stat_tv_nsec2+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15887 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | ebd9d5b | 2005-08-09 15:00:59 +0000 | [diff] [blame] | 15888 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15889 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Martin v. Löwis | ebd9d5b | 2005-08-09 15:00:59 +0000 | [diff] [blame] | 15890 | /* end confdefs.h. */ |
| 15891 | #include <sys/stat.h> |
| 15892 | int |
| 15893 | main () |
| 15894 | { |
| 15895 | |
| 15896 | struct stat st; |
| 15897 | st.st_mtimespec.tv_nsec = 1; |
| 15898 | |
| 15899 | ; |
| 15900 | return 0; |
| 15901 | } |
| 15902 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15903 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | ebd9d5b | 2005-08-09 15:00:59 +0000 | [diff] [blame] | 15904 | ac_cv_stat_tv_nsec2=yes |
| 15905 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15906 | ac_cv_stat_tv_nsec2=no |
Martin v. Löwis | ebd9d5b | 2005-08-09 15:00:59 +0000 | [diff] [blame] | 15907 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15908 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15909 | fi |
| 15910 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15911 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5 |
| 15912 | $as_echo "$ac_cv_stat_tv_nsec2" >&6; } |
Martin v. Löwis | ebd9d5b | 2005-08-09 15:00:59 +0000 | [diff] [blame] | 15913 | if test "$ac_cv_stat_tv_nsec2" = yes |
| 15914 | then |
| 15915 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15916 | $as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h |
Martin v. Löwis | ebd9d5b | 2005-08-09 15:00:59 +0000 | [diff] [blame] | 15917 | |
| 15918 | fi |
| 15919 | |
doko@ubuntu.com | 1a4f561 | 2014-04-17 20:13:44 +0200 | [diff] [blame] | 15920 | # first curses header check |
doko@ubuntu.com | 9dc823d | 2012-07-07 03:06:42 +0200 | [diff] [blame] | 15921 | ac_save_cppflags="$CPPFLAGS" |
Xavier de Gaye | e13c320 | 2016-12-13 16:04:14 +0100 | [diff] [blame] | 15922 | if test "$cross_compiling" = no; then |
| 15923 | CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" |
| 15924 | fi |
doko@ubuntu.com | 1a4f561 | 2014-04-17 20:13:44 +0200 | [diff] [blame] | 15925 | |
| 15926 | for ac_header in curses.h ncurses.h |
| 15927 | do : |
| 15928 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| 15929 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" |
| 15930 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
| 15931 | cat >>confdefs.h <<_ACEOF |
| 15932 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
| 15933 | _ACEOF |
| 15934 | |
| 15935 | fi |
| 15936 | |
| 15937 | done |
| 15938 | |
| 15939 | |
| 15940 | # On Solaris, term.h requires curses.h |
| 15941 | for ac_header in term.h |
| 15942 | do : |
| 15943 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" " |
| 15944 | #ifdef HAVE_CURSES_H |
| 15945 | #include <curses.h> |
| 15946 | #endif |
| 15947 | |
| 15948 | " |
| 15949 | if test "x$ac_cv_header_term_h" = xyes; then : |
| 15950 | cat >>confdefs.h <<_ACEOF |
| 15951 | #define HAVE_TERM_H 1 |
| 15952 | _ACEOF |
| 15953 | |
| 15954 | fi |
| 15955 | |
| 15956 | done |
| 15957 | |
| 15958 | |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15959 | # On HP/UX 11.0, mvwdelch is a block with a return statement |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15960 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5 |
| 15961 | $as_echo_n "checking whether mvwdelch is an expression... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15962 | if ${ac_cv_mvwdelch_is_expression+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15963 | $as_echo_n "(cached) " >&6 |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15964 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15965 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15966 | /* end confdefs.h. */ |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15967 | #include <curses.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15968 | int |
| 15969 | main () |
| 15970 | { |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15971 | |
| 15972 | int rtn; |
| 15973 | rtn = mvwdelch(0,0,0); |
| 15974 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15975 | ; |
| 15976 | return 0; |
| 15977 | } |
| 15978 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15979 | if ac_fn_c_try_compile "$LINENO"; then : |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15980 | ac_cv_mvwdelch_is_expression=yes |
| 15981 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15982 | ac_cv_mvwdelch_is_expression=no |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15983 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15984 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15985 | fi |
| 15986 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15987 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5 |
| 15988 | $as_echo "$ac_cv_mvwdelch_is_expression" >&6; } |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15989 | |
| 15990 | if test "$ac_cv_mvwdelch_is_expression" = yes |
| 15991 | then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15992 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15993 | $as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15994 | |
| 15995 | fi |
| 15996 | |
Masayuki Yamamoto | 8bc7d63 | 2017-11-01 21:05:26 +0900 | [diff] [blame] | 15997 | # Issue #25720: ncurses has introduced the NCURSES_OPAQUE symbol making opaque |
| 15998 | # structs since version 5.7. If the macro is defined as zero before including |
| 15999 | # [n]curses.h, ncurses will expose fields of the structs regardless of the |
| 16000 | # configuration. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16001 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5 |
| 16002 | $as_echo_n "checking whether WINDOW has _flags... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 16003 | if ${ac_cv_window_has_flags+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16004 | $as_echo_n "(cached) " >&6 |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 16005 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16006 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 16007 | /* end confdefs.h. */ |
Masayuki Yamamoto | 8bc7d63 | 2017-11-01 21:05:26 +0900 | [diff] [blame] | 16008 | |
| 16009 | #define NCURSES_OPAQUE 0 |
| 16010 | #include <curses.h> |
| 16011 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16012 | int |
| 16013 | main () |
| 16014 | { |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 16015 | |
| 16016 | WINDOW *w; |
| 16017 | w->_flags = 0; |
| 16018 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16019 | ; |
| 16020 | return 0; |
| 16021 | } |
| 16022 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16023 | if ac_fn_c_try_compile "$LINENO"; then : |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 16024 | ac_cv_window_has_flags=yes |
| 16025 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16026 | ac_cv_window_has_flags=no |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 16027 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16028 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 16029 | fi |
| 16030 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16031 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5 |
| 16032 | $as_echo "$ac_cv_window_has_flags" >&6; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 16033 | |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 16034 | |
| 16035 | if test "$ac_cv_window_has_flags" = yes |
| 16036 | then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16037 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16038 | $as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 16039 | |
| 16040 | fi |
| 16041 | |
Masayuki Yamamoto | 8bc7d63 | 2017-11-01 21:05:26 +0900 | [diff] [blame] | 16042 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_pad" >&5 |
| 16043 | $as_echo_n "checking for is_pad... " >&6; } |
| 16044 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16045 | /* end confdefs.h. */ |
| 16046 | #include <curses.h> |
| 16047 | int |
| 16048 | main () |
| 16049 | { |
| 16050 | |
| 16051 | #ifndef is_pad |
| 16052 | void *x=is_pad |
| 16053 | #endif |
| 16054 | |
| 16055 | ; |
| 16056 | return 0; |
| 16057 | } |
| 16058 | _ACEOF |
| 16059 | if ac_fn_c_try_compile "$LINENO"; then : |
| 16060 | |
| 16061 | $as_echo "#define HAVE_CURSES_IS_PAD 1" >>confdefs.h |
| 16062 | |
| 16063 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 16064 | $as_echo "yes" >&6; } |
| 16065 | else |
| 16066 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 16067 | $as_echo "no" >&6; } |
| 16068 | |
| 16069 | fi |
| 16070 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 16071 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16072 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5 |
| 16073 | $as_echo_n "checking for is_term_resized... " >&6; } |
| 16074 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 16075 | /* end confdefs.h. */ |
| 16076 | #include <curses.h> |
| 16077 | int |
| 16078 | main () |
| 16079 | { |
| 16080 | void *x=is_term_resized |
| 16081 | ; |
| 16082 | return 0; |
| 16083 | } |
| 16084 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16085 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 24a880b | 2002-12-31 12:55:15 +0000 | [diff] [blame] | 16086 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16087 | $as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 16088 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 16089 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16090 | $as_echo "yes" >&6; } |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 16091 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16092 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 16093 | $as_echo "no" >&6; } |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 16094 | |
| 16095 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16096 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 16097 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16098 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5 |
| 16099 | $as_echo_n "checking for resize_term... " >&6; } |
| 16100 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 16101 | /* end confdefs.h. */ |
| 16102 | #include <curses.h> |
| 16103 | int |
| 16104 | main () |
| 16105 | { |
| 16106 | void *x=resize_term |
| 16107 | ; |
| 16108 | return 0; |
| 16109 | } |
| 16110 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16111 | if ac_fn_c_try_compile "$LINENO"; then : |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 16112 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16113 | $as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 16114 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 16115 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16116 | $as_echo "yes" >&6; } |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 16117 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16118 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 16119 | $as_echo "no" >&6; } |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 16120 | |
| 16121 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16122 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 16123 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16124 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5 |
| 16125 | $as_echo_n "checking for resizeterm... " >&6; } |
| 16126 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 16127 | /* end confdefs.h. */ |
| 16128 | #include <curses.h> |
| 16129 | int |
| 16130 | main () |
| 16131 | { |
| 16132 | void *x=resizeterm |
| 16133 | ; |
| 16134 | return 0; |
| 16135 | } |
| 16136 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16137 | if ac_fn_c_try_compile "$LINENO"; then : |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 16138 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16139 | $as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 16140 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 16141 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16142 | $as_echo "yes" >&6; } |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 16143 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16144 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 16145 | $as_echo "no" >&6; } |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 16146 | |
| 16147 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16148 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Serhiy Storchaka | baac01e | 2017-10-31 13:56:44 +0200 | [diff] [blame] | 16149 | |
| 16150 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for immedok" >&5 |
| 16151 | $as_echo_n "checking for immedok... " >&6; } |
| 16152 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16153 | /* end confdefs.h. */ |
| 16154 | #include <curses.h> |
| 16155 | int |
| 16156 | main () |
| 16157 | { |
| 16158 | |
| 16159 | #ifndef immedok |
| 16160 | void *x=immedok |
| 16161 | #endif |
| 16162 | |
| 16163 | ; |
| 16164 | return 0; |
| 16165 | } |
| 16166 | _ACEOF |
| 16167 | if ac_fn_c_try_compile "$LINENO"; then : |
| 16168 | |
| 16169 | $as_echo "#define HAVE_CURSES_IMMEDOK 1" >>confdefs.h |
| 16170 | |
| 16171 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 16172 | $as_echo "yes" >&6; } |
| 16173 | else |
| 16174 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 16175 | $as_echo "no" >&6; } |
| 16176 | |
| 16177 | fi |
| 16178 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 16179 | |
| 16180 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for syncok" >&5 |
| 16181 | $as_echo_n "checking for syncok... " >&6; } |
| 16182 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16183 | /* end confdefs.h. */ |
| 16184 | #include <curses.h> |
| 16185 | int |
| 16186 | main () |
| 16187 | { |
| 16188 | |
| 16189 | #ifndef syncok |
| 16190 | void *x=syncok |
| 16191 | #endif |
| 16192 | |
| 16193 | ; |
| 16194 | return 0; |
| 16195 | } |
| 16196 | _ACEOF |
| 16197 | if ac_fn_c_try_compile "$LINENO"; then : |
| 16198 | |
| 16199 | $as_echo "#define HAVE_CURSES_SYNCOK 1" >>confdefs.h |
| 16200 | |
| 16201 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 16202 | $as_echo "yes" >&6; } |
| 16203 | else |
| 16204 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 16205 | $as_echo "no" >&6; } |
| 16206 | |
| 16207 | fi |
| 16208 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 16209 | |
Serhiy Storchaka | 894ebd0 | 2017-11-01 14:34:20 +0200 | [diff] [blame] | 16210 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchgat" >&5 |
| 16211 | $as_echo_n "checking for wchgat... " >&6; } |
| 16212 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16213 | /* end confdefs.h. */ |
| 16214 | #include <curses.h> |
| 16215 | int |
| 16216 | main () |
| 16217 | { |
| 16218 | |
| 16219 | #ifndef wchgat |
| 16220 | void *x=wchgat |
| 16221 | #endif |
| 16222 | |
| 16223 | ; |
| 16224 | return 0; |
| 16225 | } |
| 16226 | _ACEOF |
| 16227 | if ac_fn_c_try_compile "$LINENO"; then : |
| 16228 | |
| 16229 | $as_echo "#define HAVE_CURSES_WCHGAT 1" >>confdefs.h |
| 16230 | |
| 16231 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 16232 | $as_echo "yes" >&6; } |
| 16233 | else |
| 16234 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 16235 | $as_echo "no" >&6; } |
| 16236 | |
| 16237 | fi |
| 16238 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 16239 | |
Serhiy Storchaka | baac01e | 2017-10-31 13:56:44 +0200 | [diff] [blame] | 16240 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for filter" >&5 |
| 16241 | $as_echo_n "checking for filter... " >&6; } |
| 16242 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16243 | /* end confdefs.h. */ |
| 16244 | #include <curses.h> |
| 16245 | int |
| 16246 | main () |
| 16247 | { |
| 16248 | |
| 16249 | #ifndef filter |
| 16250 | void *x=filter |
| 16251 | #endif |
| 16252 | |
| 16253 | ; |
| 16254 | return 0; |
| 16255 | } |
| 16256 | _ACEOF |
| 16257 | if ac_fn_c_try_compile "$LINENO"; then : |
| 16258 | |
| 16259 | $as_echo "#define HAVE_CURSES_FILTER 1" >>confdefs.h |
| 16260 | |
| 16261 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 16262 | $as_echo "yes" >&6; } |
| 16263 | else |
| 16264 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 16265 | $as_echo "no" >&6; } |
| 16266 | |
| 16267 | fi |
| 16268 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 16269 | |
| 16270 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for has_key" >&5 |
| 16271 | $as_echo_n "checking for has_key... " >&6; } |
| 16272 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16273 | /* end confdefs.h. */ |
| 16274 | #include <curses.h> |
| 16275 | int |
| 16276 | main () |
| 16277 | { |
| 16278 | |
| 16279 | #ifndef has_key |
| 16280 | void *x=has_key |
| 16281 | #endif |
| 16282 | |
| 16283 | ; |
| 16284 | return 0; |
| 16285 | } |
| 16286 | _ACEOF |
| 16287 | if ac_fn_c_try_compile "$LINENO"; then : |
| 16288 | |
| 16289 | $as_echo "#define HAVE_CURSES_HAS_KEY 1" >>confdefs.h |
| 16290 | |
| 16291 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 16292 | $as_echo "yes" >&6; } |
| 16293 | else |
| 16294 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 16295 | $as_echo "no" >&6; } |
| 16296 | |
| 16297 | fi |
| 16298 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 16299 | |
| 16300 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeahead" >&5 |
| 16301 | $as_echo_n "checking for typeahead... " >&6; } |
| 16302 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16303 | /* end confdefs.h. */ |
| 16304 | #include <curses.h> |
| 16305 | int |
| 16306 | main () |
| 16307 | { |
| 16308 | |
| 16309 | #ifndef typeahead |
| 16310 | void *x=typeahead |
| 16311 | #endif |
| 16312 | |
| 16313 | ; |
| 16314 | return 0; |
| 16315 | } |
| 16316 | _ACEOF |
| 16317 | if ac_fn_c_try_compile "$LINENO"; then : |
| 16318 | |
| 16319 | $as_echo "#define HAVE_CURSES_TYPEAHEAD 1" >>confdefs.h |
| 16320 | |
| 16321 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 16322 | $as_echo "yes" >&6; } |
| 16323 | else |
| 16324 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 16325 | $as_echo "no" >&6; } |
| 16326 | |
| 16327 | fi |
| 16328 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 16329 | |
| 16330 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for use_env" >&5 |
| 16331 | $as_echo_n "checking for use_env... " >&6; } |
| 16332 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16333 | /* end confdefs.h. */ |
| 16334 | #include <curses.h> |
| 16335 | int |
| 16336 | main () |
| 16337 | { |
| 16338 | |
| 16339 | #ifndef use_env |
| 16340 | void *x=use_env |
| 16341 | #endif |
| 16342 | |
| 16343 | ; |
| 16344 | return 0; |
| 16345 | } |
| 16346 | _ACEOF |
| 16347 | if ac_fn_c_try_compile "$LINENO"; then : |
| 16348 | |
| 16349 | $as_echo "#define HAVE_CURSES_USE_ENV 1" >>confdefs.h |
| 16350 | |
| 16351 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 16352 | $as_echo "yes" >&6; } |
| 16353 | else |
| 16354 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 16355 | $as_echo "no" >&6; } |
| 16356 | |
| 16357 | fi |
| 16358 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
doko@ubuntu.com | 9dc823d | 2012-07-07 03:06:42 +0200 | [diff] [blame] | 16359 | # last curses configure check |
| 16360 | CPPFLAGS=$ac_save_cppflags |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16361 | |
doko@ubuntu.com | b457b9b | 2012-06-30 19:28:16 +0200 | [diff] [blame] | 16362 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5 |
| 16363 | $as_echo "$as_me: checking for device files" >&6;} |
| 16364 | |
| 16365 | if test "x$cross_compiling" = xyes; then |
| 16366 | if test "${ac_cv_file__dev_ptmx+set}" != set; then |
| 16367 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5 |
| 16368 | $as_echo_n "checking for /dev/ptmx... " >&6; } |
| 16369 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5 |
| 16370 | $as_echo "not set" >&6; } |
| 16371 | as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5 |
| 16372 | fi |
| 16373 | if test "${ac_cv_file__dev_ptc+set}" != set; then |
| 16374 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5 |
| 16375 | $as_echo_n "checking for /dev/ptc... " >&6; } |
| 16376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5 |
| 16377 | $as_echo "not set" >&6; } |
| 16378 | as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5 |
| 16379 | fi |
| 16380 | fi |
| 16381 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16382 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5 |
| 16383 | $as_echo_n "checking for /dev/ptmx... " >&6; } |
doko@ubuntu.com | b457b9b | 2012-06-30 19:28:16 +0200 | [diff] [blame] | 16384 | if ${ac_cv_file__dev_ptmx+:} false; then : |
| 16385 | $as_echo_n "(cached) " >&6 |
| 16386 | else |
| 16387 | test "$cross_compiling" = yes && |
| 16388 | as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 |
| 16389 | if test -r "/dev/ptmx"; then |
| 16390 | ac_cv_file__dev_ptmx=yes |
| 16391 | else |
| 16392 | ac_cv_file__dev_ptmx=no |
| 16393 | fi |
| 16394 | fi |
| 16395 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5 |
| 16396 | $as_echo "$ac_cv_file__dev_ptmx" >&6; } |
| 16397 | if test "x$ac_cv_file__dev_ptmx" = xyes; then : |
Thomas Wouters | 89f507f | 2006-12-13 04:49:30 +0000 | [diff] [blame] | 16398 | |
doko@ubuntu.com | b457b9b | 2012-06-30 19:28:16 +0200 | [diff] [blame] | 16399 | fi |
| 16400 | |
| 16401 | if test "x$ac_cv_file__dev_ptmx" = xyes; then |
Martin v. Löwis | 24a880b | 2002-12-31 12:55:15 +0000 | [diff] [blame] | 16402 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16403 | $as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h |
Martin v. Löwis | 24a880b | 2002-12-31 12:55:15 +0000 | [diff] [blame] | 16404 | |
Martin v. Löwis | 24a880b | 2002-12-31 12:55:15 +0000 | [diff] [blame] | 16405 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16406 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5 |
| 16407 | $as_echo_n "checking for /dev/ptc... " >&6; } |
doko@ubuntu.com | b457b9b | 2012-06-30 19:28:16 +0200 | [diff] [blame] | 16408 | if ${ac_cv_file__dev_ptc+:} false; then : |
| 16409 | $as_echo_n "(cached) " >&6 |
| 16410 | else |
| 16411 | test "$cross_compiling" = yes && |
| 16412 | as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 |
| 16413 | if test -r "/dev/ptc"; then |
| 16414 | ac_cv_file__dev_ptc=yes |
| 16415 | else |
| 16416 | ac_cv_file__dev_ptc=no |
| 16417 | fi |
| 16418 | fi |
| 16419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5 |
| 16420 | $as_echo "$ac_cv_file__dev_ptc" >&6; } |
| 16421 | if test "x$ac_cv_file__dev_ptc" = xyes; then : |
Thomas Wouters | 89f507f | 2006-12-13 04:49:30 +0000 | [diff] [blame] | 16422 | |
doko@ubuntu.com | b457b9b | 2012-06-30 19:28:16 +0200 | [diff] [blame] | 16423 | fi |
| 16424 | |
| 16425 | if test "x$ac_cv_file__dev_ptc" = xyes; then |
Neal Norwitz | 865400f | 2003-03-21 01:42:58 +0000 | [diff] [blame] | 16426 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16427 | $as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h |
Neal Norwitz | 865400f | 2003-03-21 01:42:58 +0000 | [diff] [blame] | 16428 | |
Neal Norwitz | 865400f | 2003-03-21 01:42:58 +0000 | [diff] [blame] | 16429 | fi |
| 16430 | |
Ronald Oussoren | 3c1928a | 2009-11-19 17:15:31 +0000 | [diff] [blame] | 16431 | if test $ac_sys_system = Darwin |
| 16432 | then |
| 16433 | LIBS="$LIBS -framework CoreFoundation" |
| 16434 | fi |
Mark Dickinson | 6ce4a9a | 2009-11-16 17:00:11 +0000 | [diff] [blame] | 16435 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16436 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5 |
| 16437 | $as_echo_n "checking for %zd printf() format support... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 16438 | if ${ac_cv_have_size_t_format+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16439 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 16440 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16441 | if test "$cross_compiling" = yes; then : |
Benjamin Peterson | 8f326b2 | 2009-12-13 02:10:36 +0000 | [diff] [blame] | 16442 | ac_cv_have_size_t_format="cross -- assuming yes" |
| 16443 | |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 16444 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16445 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 16446 | /* end confdefs.h. */ |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 16447 | |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 16448 | #include <stdio.h> |
| 16449 | #include <stddef.h> |
| 16450 | #include <string.h> |
| 16451 | |
Christian Heimes | 2c18161 | 2007-12-17 20:04:13 +0000 | [diff] [blame] | 16452 | #ifdef HAVE_SYS_TYPES_H |
| 16453 | #include <sys/types.h> |
| 16454 | #endif |
Thomas Wouters | 89f507f | 2006-12-13 04:49:30 +0000 | [diff] [blame] | 16455 | |
| 16456 | #ifdef HAVE_SSIZE_T |
| 16457 | typedef ssize_t Py_ssize_t; |
| 16458 | #elif SIZEOF_VOID_P == SIZEOF_LONG |
| 16459 | typedef long Py_ssize_t; |
| 16460 | #else |
| 16461 | typedef int Py_ssize_t; |
| 16462 | #endif |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 16463 | |
Christian Heimes | 2c18161 | 2007-12-17 20:04:13 +0000 | [diff] [blame] | 16464 | int main() |
| 16465 | { |
| 16466 | char buffer[256]; |
| 16467 | |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 16468 | if(sprintf(buffer, "%zd", (size_t)123) < 0) |
| 16469 | return 1; |
| 16470 | |
Thomas Wouters | 89f507f | 2006-12-13 04:49:30 +0000 | [diff] [blame] | 16471 | if (strcmp(buffer, "123")) |
| 16472 | return 1; |
| 16473 | |
| 16474 | if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0) |
| 16475 | return 1; |
| 16476 | |
| 16477 | if (strcmp(buffer, "-123")) |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 16478 | return 1; |
| 16479 | |
| 16480 | return 0; |
| 16481 | } |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 16482 | |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 16483 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16484 | if ac_fn_c_try_run "$LINENO"; then : |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 16485 | ac_cv_have_size_t_format=yes |
Alexandre Vassalotti | 1914228 | 2009-07-17 23:11:52 +0000 | [diff] [blame] | 16486 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16487 | ac_cv_have_size_t_format=no |
Alexandre Vassalotti | 1914228 | 2009-07-17 23:11:52 +0000 | [diff] [blame] | 16488 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16489 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 16490 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 16491 | fi |
| 16492 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 16493 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16494 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5 |
| 16495 | $as_echo "$ac_cv_have_size_t_format" >&6; } |
Benjamin Peterson | 8f326b2 | 2009-12-13 02:10:36 +0000 | [diff] [blame] | 16496 | if test "$ac_cv_have_size_t_format" != no ; then |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 16497 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16498 | $as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 16499 | |
| 16500 | fi |
| 16501 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16502 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " |
Martin v. Löwis | 01c0401 | 2002-11-11 14:58:44 +0000 | [diff] [blame] | 16503 | #ifdef HAVE_SYS_TYPES_H |
| 16504 | #include <sys/types.h> |
| 16505 | #endif |
| 16506 | #ifdef HAVE_SYS_SOCKET_H |
| 16507 | #include <sys/socket.h> |
| 16508 | #endif |
| 16509 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16510 | " |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 16511 | if test "x$ac_cv_type_socklen_t" = xyes; then : |
Martin v. Löwis | 01c0401 | 2002-11-11 14:58:44 +0000 | [diff] [blame] | 16512 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16513 | else |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 16514 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16515 | $as_echo "#define socklen_t int" >>confdefs.h |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 16516 | |
| 16517 | fi |
| 16518 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 16519 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16520 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5 |
| 16521 | $as_echo_n "checking for broken mbstowcs... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 16522 | if ${ac_cv_broken_mbstowcs+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16523 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 16524 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16525 | if test "$cross_compiling" = yes; then : |
Antoine Pitrou | fff9530 | 2008-09-03 18:58:51 +0000 | [diff] [blame] | 16526 | ac_cv_broken_mbstowcs=no |
| 16527 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16528 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Antoine Pitrou | fff9530 | 2008-09-03 18:58:51 +0000 | [diff] [blame] | 16529 | /* end confdefs.h. */ |
| 16530 | |
Stefan Krah | 19c2139 | 2012-11-22 23:47:32 +0100 | [diff] [blame] | 16531 | #include <stdio.h> |
Antoine Pitrou | fff9530 | 2008-09-03 18:58:51 +0000 | [diff] [blame] | 16532 | #include<stdlib.h> |
| 16533 | int main() { |
| 16534 | size_t len = -1; |
| 16535 | const char *str = "text"; |
| 16536 | len = mbstowcs(NULL, str, 0); |
| 16537 | return (len != 4); |
| 16538 | } |
| 16539 | |
| 16540 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16541 | if ac_fn_c_try_run "$LINENO"; then : |
Antoine Pitrou | fff9530 | 2008-09-03 18:58:51 +0000 | [diff] [blame] | 16542 | ac_cv_broken_mbstowcs=no |
| 16543 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16544 | ac_cv_broken_mbstowcs=yes |
Antoine Pitrou | fff9530 | 2008-09-03 18:58:51 +0000 | [diff] [blame] | 16545 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16546 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 16547 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Antoine Pitrou | fff9530 | 2008-09-03 18:58:51 +0000 | [diff] [blame] | 16548 | fi |
| 16549 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 16550 | fi |
| 16551 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16552 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5 |
| 16553 | $as_echo "$ac_cv_broken_mbstowcs" >&6; } |
Antoine Pitrou | fff9530 | 2008-09-03 18:58:51 +0000 | [diff] [blame] | 16554 | if test "$ac_cv_broken_mbstowcs" = yes |
| 16555 | then |
| 16556 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16557 | $as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h |
Antoine Pitrou | fff9530 | 2008-09-03 18:58:51 +0000 | [diff] [blame] | 16558 | |
| 16559 | fi |
| 16560 | |
Antoine Pitrou | b52ec78 | 2009-01-25 16:34:23 +0000 | [diff] [blame] | 16561 | # Check for --with-computed-gotos |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16562 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5 |
| 16563 | $as_echo_n "checking for --with-computed-gotos... " >&6; } |
Antoine Pitrou | b52ec78 | 2009-01-25 16:34:23 +0000 | [diff] [blame] | 16564 | |
| 16565 | # Check whether --with-computed-gotos was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16566 | if test "${with_computed_gotos+set}" = set; then : |
Antoine Pitrou | b52ec78 | 2009-01-25 16:34:23 +0000 | [diff] [blame] | 16567 | withval=$with_computed_gotos; |
Antoine Pitrou | 042b128 | 2010-08-13 21:15:58 +0000 | [diff] [blame] | 16568 | if test "$withval" = yes |
Antoine Pitrou | b52ec78 | 2009-01-25 16:34:23 +0000 | [diff] [blame] | 16569 | then |
| 16570 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16571 | $as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h |
Antoine Pitrou | b52ec78 | 2009-01-25 16:34:23 +0000 | [diff] [blame] | 16572 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16573 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 16574 | $as_echo "yes" >&6; } |
Antoine Pitrou | b52ec78 | 2009-01-25 16:34:23 +0000 | [diff] [blame] | 16575 | fi |
Antoine Pitrou | 042b128 | 2010-08-13 21:15:58 +0000 | [diff] [blame] | 16576 | if test "$withval" = no |
| 16577 | then |
| 16578 | |
| 16579 | $as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h |
| 16580 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16581 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 16582 | $as_echo "no" >&6; } |
Antoine Pitrou | b52ec78 | 2009-01-25 16:34:23 +0000 | [diff] [blame] | 16583 | fi |
| 16584 | |
Antoine Pitrou | 042b128 | 2010-08-13 21:15:58 +0000 | [diff] [blame] | 16585 | else |
| 16586 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5 |
| 16587 | $as_echo "no value specified" >&6; } |
| 16588 | fi |
| 16589 | |
Antoine Pitrou | b52ec78 | 2009-01-25 16:34:23 +0000 | [diff] [blame] | 16590 | |
Matthias Klose | b17289e | 2012-03-15 19:51:34 +0100 | [diff] [blame] | 16591 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5 |
| 16592 | $as_echo_n "checking whether $CC supports computed gotos... " >&6; } |
| 16593 | if ${ac_cv_computed_gotos+:} false; then : |
| 16594 | $as_echo_n "(cached) " >&6 |
| 16595 | else |
| 16596 | if test "$cross_compiling" = yes; then : |
| 16597 | if test "${with_computed_gotos+set}" = set; then |
| 16598 | ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos" |
| 16599 | else |
| 16600 | ac_cv_computed_gotos=no |
| 16601 | fi |
| 16602 | else |
| 16603 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16604 | /* end confdefs.h. */ |
| 16605 | |
| 16606 | int main(int argc, char **argv) |
| 16607 | { |
| 16608 | static void *targets[1] = { &&LABEL1 }; |
| 16609 | goto LABEL2; |
| 16610 | LABEL1: |
| 16611 | return 0; |
| 16612 | LABEL2: |
| 16613 | goto *targets[0]; |
| 16614 | return 1; |
| 16615 | } |
| 16616 | |
| 16617 | _ACEOF |
| 16618 | if ac_fn_c_try_run "$LINENO"; then : |
| 16619 | ac_cv_computed_gotos=yes |
| 16620 | else |
| 16621 | ac_cv_computed_gotos=no |
| 16622 | fi |
| 16623 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 16624 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 16625 | fi |
| 16626 | |
| 16627 | fi |
| 16628 | |
| 16629 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5 |
| 16630 | $as_echo "$ac_cv_computed_gotos" >&6; } |
| 16631 | case "$ac_cv_computed_gotos" in yes*) |
| 16632 | |
| 16633 | $as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h |
| 16634 | |
| 16635 | esac |
| 16636 | |
Benjamin Peterson | d8d835b | 2010-10-15 23:14:46 +0000 | [diff] [blame] | 16637 | case $ac_sys_system in |
| 16638 | AIX*) |
| 16639 | |
| 16640 | $as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h |
| 16641 | ;; |
| 16642 | esac |
Antoine Pitrou | b52ec78 | 2009-01-25 16:34:23 +0000 | [diff] [blame] | 16643 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 16644 | |
Mark Dickinson | b2153e9 | 2010-05-05 22:31:36 +0000 | [diff] [blame] | 16645 | |
| 16646 | |
Martin v. Löwis | 06f15bb | 2001-12-02 13:02:32 +0000 | [diff] [blame] | 16647 | for h in `(cd $srcdir;echo Python/thread_*.h)` |
| 16648 | do |
| 16649 | THREADHEADERS="$THREADHEADERS \$(srcdir)/$h" |
| 16650 | done |
| 16651 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 16652 | |
Victor Stinner | 21a74a9 | 2019-04-11 22:28:12 +0200 | [diff] [blame] | 16653 | SRCDIRS="Parser Objects Python Modules Modules/_io Programs" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16654 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5 |
| 16655 | $as_echo_n "checking for build directories... " >&6; } |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 16656 | for dir in $SRCDIRS; do |
| 16657 | if test ! -d $dir; then |
| 16658 | mkdir $dir |
Guido van Rossum | 262cf20 | 2000-11-02 19:33:53 +0000 | [diff] [blame] | 16659 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 16660 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16661 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 |
| 16662 | $as_echo "done" >&6; } |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 16663 | |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 16664 | # Availability of -O2: |
| 16665 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5 |
| 16666 | $as_echo_n "checking for -O2... " >&6; } |
| 16667 | saved_cflags="$CFLAGS" |
| 16668 | CFLAGS="-O2" |
| 16669 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16670 | /* end confdefs.h. */ |
| 16671 | |
| 16672 | int |
| 16673 | main () |
| 16674 | { |
| 16675 | |
| 16676 | |
| 16677 | ; |
| 16678 | return 0; |
| 16679 | } |
| 16680 | _ACEOF |
| 16681 | if ac_fn_c_try_compile "$LINENO"; then : |
| 16682 | have_O2=yes |
| 16683 | else |
| 16684 | have_O2=no |
| 16685 | fi |
| 16686 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 16687 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5 |
| 16688 | $as_echo "$have_O2" >&6; } |
| 16689 | CFLAGS="$saved_cflags" |
| 16690 | |
| 16691 | # _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect: |
| 16692 | # http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html |
| 16693 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5 |
| 16694 | $as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; } |
| 16695 | saved_cflags="$CFLAGS" |
| 16696 | CFLAGS="-O2 -D_FORTIFY_SOURCE=2" |
| 16697 | if test "$have_O2" = no; then |
| 16698 | CFLAGS="" |
| 16699 | fi |
| 16700 | if test "$cross_compiling" = yes; then : |
| 16701 | have_glibc_memmove_bug=undefined |
| 16702 | else |
| 16703 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16704 | /* end confdefs.h. */ |
| 16705 | |
| 16706 | #include <stdio.h> |
| 16707 | #include <stdlib.h> |
| 16708 | #include <string.h> |
| 16709 | void foo(void *p, void *q) { memmove(p, q, 19); } |
| 16710 | int main() { |
| 16711 | char a[32] = "123456789000000000"; |
| 16712 | foo(&a[9], a); |
| 16713 | if (strcmp(a, "123456789123456789000000000") != 0) |
| 16714 | return 1; |
| 16715 | foo(a, &a[9]); |
| 16716 | if (strcmp(a, "123456789000000000") != 0) |
| 16717 | return 1; |
| 16718 | return 0; |
| 16719 | } |
| 16720 | |
| 16721 | _ACEOF |
| 16722 | if ac_fn_c_try_run "$LINENO"; then : |
| 16723 | have_glibc_memmove_bug=no |
| 16724 | else |
| 16725 | have_glibc_memmove_bug=yes |
| 16726 | fi |
| 16727 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 16728 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 16729 | fi |
| 16730 | |
| 16731 | CFLAGS="$saved_cflags" |
| 16732 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5 |
| 16733 | $as_echo "$have_glibc_memmove_bug" >&6; } |
| 16734 | if test "$have_glibc_memmove_bug" = yes; then |
| 16735 | |
| 16736 | $as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h |
| 16737 | |
| 16738 | fi |
| 16739 | |
| 16740 | if test "$have_gcc_asm_for_x87" = yes; then |
| 16741 | # Some versions of gcc miscompile inline asm: |
| 16742 | # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491 |
| 16743 | # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html |
| 16744 | case $CC in |
| 16745 | *gcc*) |
| 16746 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5 |
| 16747 | $as_echo_n "checking for gcc ipa-pure-const bug... " >&6; } |
| 16748 | saved_cflags="$CFLAGS" |
| 16749 | CFLAGS="-O2" |
| 16750 | if test "$cross_compiling" = yes; then : |
| 16751 | have_ipa_pure_const_bug=undefined |
| 16752 | else |
| 16753 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16754 | /* end confdefs.h. */ |
| 16755 | |
| 16756 | __attribute__((noinline)) int |
| 16757 | foo(int *p) { |
| 16758 | int r; |
| 16759 | asm ( "movl \$6, (%1)\n\t" |
| 16760 | "xorl %0, %0\n\t" |
| 16761 | : "=r" (r) : "r" (p) : "memory" |
| 16762 | ); |
| 16763 | return r; |
| 16764 | } |
| 16765 | int main() { |
| 16766 | int p = 8; |
| 16767 | if ((foo(&p) ? : p) != 6) |
| 16768 | return 1; |
| 16769 | return 0; |
| 16770 | } |
| 16771 | |
| 16772 | _ACEOF |
| 16773 | if ac_fn_c_try_run "$LINENO"; then : |
| 16774 | have_ipa_pure_const_bug=no |
| 16775 | else |
| 16776 | have_ipa_pure_const_bug=yes |
| 16777 | fi |
| 16778 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 16779 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 16780 | fi |
| 16781 | |
| 16782 | CFLAGS="$saved_cflags" |
| 16783 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5 |
| 16784 | $as_echo "$have_ipa_pure_const_bug" >&6; } |
| 16785 | if test "$have_ipa_pure_const_bug" = yes; then |
| 16786 | |
| 16787 | $as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h |
| 16788 | |
| 16789 | fi |
| 16790 | ;; |
| 16791 | esac |
| 16792 | fi |
| 16793 | |
Victor Stinner | 4f5366e | 2015-01-09 02:13:19 +0100 | [diff] [blame] | 16794 | # Check for stdatomic.h |
| 16795 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5 |
| 16796 | $as_echo_n "checking for stdatomic.h... " >&6; } |
| 16797 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16798 | /* end confdefs.h. */ |
| 16799 | |
| 16800 | |
| 16801 | #include <stdatomic.h> |
Victor Stinner | 028f734 | 2019-10-22 21:53:50 +0200 | [diff] [blame] | 16802 | atomic_int int_var; |
| 16803 | atomic_uintptr_t uintptr_var; |
Victor Stinner | 4f5366e | 2015-01-09 02:13:19 +0100 | [diff] [blame] | 16804 | int main() { |
Victor Stinner | 028f734 | 2019-10-22 21:53:50 +0200 | [diff] [blame] | 16805 | atomic_store_explicit(&int_var, 5, memory_order_relaxed); |
| 16806 | atomic_store_explicit(&uintptr_var, 0, memory_order_relaxed); |
| 16807 | int loaded_value = atomic_load_explicit(&int_var, memory_order_seq_cst); |
Victor Stinner | 4f5366e | 2015-01-09 02:13:19 +0100 | [diff] [blame] | 16808 | return 0; |
| 16809 | } |
| 16810 | |
| 16811 | |
| 16812 | _ACEOF |
| 16813 | if ac_fn_c_try_link "$LINENO"; then : |
| 16814 | have_stdatomic_h=yes |
| 16815 | else |
| 16816 | have_stdatomic_h=no |
| 16817 | fi |
| 16818 | rm -f core conftest.err conftest.$ac_objext \ |
| 16819 | conftest$ac_exeext conftest.$ac_ext |
| 16820 | |
| 16821 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5 |
| 16822 | $as_echo "$have_stdatomic_h" >&6; } |
| 16823 | |
| 16824 | if test "$have_stdatomic_h" = yes; then |
| 16825 | |
| 16826 | $as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h |
| 16827 | |
| 16828 | fi |
| 16829 | |
| 16830 | # Check for GCC >= 4.7 __atomic builtins |
| 16831 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5 |
| 16832 | $as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; } |
| 16833 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16834 | /* end confdefs.h. */ |
| 16835 | |
| 16836 | |
| 16837 | volatile int val = 1; |
| 16838 | int main() { |
| 16839 | __atomic_load_n(&val, __ATOMIC_SEQ_CST); |
| 16840 | return 0; |
| 16841 | } |
| 16842 | |
| 16843 | |
| 16844 | _ACEOF |
| 16845 | if ac_fn_c_try_link "$LINENO"; then : |
| 16846 | have_builtin_atomic=yes |
| 16847 | else |
| 16848 | have_builtin_atomic=no |
| 16849 | fi |
| 16850 | rm -f core conftest.err conftest.$ac_objext \ |
| 16851 | conftest$ac_exeext conftest.$ac_ext |
| 16852 | |
| 16853 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5 |
| 16854 | $as_echo "$have_builtin_atomic" >&6; } |
| 16855 | |
| 16856 | if test "$have_builtin_atomic" = yes; then |
| 16857 | |
| 16858 | $as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h |
| 16859 | |
| 16860 | fi |
| 16861 | |
Ned Deily | 322f5ba | 2013-11-21 23:01:59 -0800 | [diff] [blame] | 16862 | # ensurepip option |
| 16863 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5 |
| 16864 | $as_echo_n "checking for ensurepip... " >&6; } |
| 16865 | |
| 16866 | # Check whether --with-ensurepip was given. |
| 16867 | if test "${with_ensurepip+set}" = set; then : |
| 16868 | withval=$with_ensurepip; |
| 16869 | else |
| 16870 | with_ensurepip=upgrade |
| 16871 | fi |
| 16872 | |
| 16873 | case $with_ensurepip in #( |
| 16874 | yes|upgrade) : |
| 16875 | ENSUREPIP=upgrade ;; #( |
| 16876 | install) : |
| 16877 | ENSUREPIP=install ;; #( |
| 16878 | no) : |
| 16879 | ENSUREPIP=no ;; #( |
| 16880 | *) : |
| 16881 | as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;; |
| 16882 | esac |
| 16883 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5 |
| 16884 | $as_echo "$ENSUREPIP" >&6; } |
| 16885 | |
| 16886 | |
Victor Stinner | 35a97c0 | 2015-03-08 02:59:09 +0100 | [diff] [blame] | 16887 | # check if the dirent structure of a d_type field and DT_UNKNOWN is defined |
| 16888 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5 |
| 16889 | $as_echo_n "checking if the dirent structure of a d_type field... " >&6; } |
| 16890 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16891 | /* end confdefs.h. */ |
| 16892 | |
| 16893 | |
| 16894 | #include <dirent.h> |
| 16895 | |
| 16896 | int main() { |
| 16897 | struct dirent entry; |
| 16898 | return entry.d_type == DT_UNKNOWN; |
| 16899 | } |
| 16900 | |
| 16901 | |
| 16902 | _ACEOF |
| 16903 | if ac_fn_c_try_link "$LINENO"; then : |
| 16904 | have_dirent_d_type=yes |
| 16905 | else |
| 16906 | have_dirent_d_type=no |
| 16907 | fi |
| 16908 | rm -f core conftest.err conftest.$ac_objext \ |
| 16909 | conftest$ac_exeext conftest.$ac_ext |
| 16910 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5 |
| 16911 | $as_echo "$have_dirent_d_type" >&6; } |
| 16912 | |
| 16913 | if test "$have_dirent_d_type" = yes; then |
| 16914 | |
| 16915 | $as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h |
| 16916 | |
| 16917 | fi |
| 16918 | |
Victor Stinner | 9eb57c5 | 2015-03-19 22:21:49 +0100 | [diff] [blame] | 16919 | # check if the Linux getrandom() syscall is available |
| 16920 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5 |
| 16921 | $as_echo_n "checking for the Linux getrandom() syscall... " >&6; } |
| 16922 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16923 | /* end confdefs.h. */ |
| 16924 | |
| 16925 | |
Victor Stinner | 1b80b24 | 2016-04-12 22:34:58 +0200 | [diff] [blame] | 16926 | #include <unistd.h> |
Victor Stinner | 9eb57c5 | 2015-03-19 22:21:49 +0100 | [diff] [blame] | 16927 | #include <sys/syscall.h> |
Victor Stinner | dddf484 | 2016-06-07 11:21:42 +0200 | [diff] [blame] | 16928 | #include <linux/random.h> |
Victor Stinner | 9eb57c5 | 2015-03-19 22:21:49 +0100 | [diff] [blame] | 16929 | |
| 16930 | int main() { |
Victor Stinner | 9eb57c5 | 2015-03-19 22:21:49 +0100 | [diff] [blame] | 16931 | char buffer[1]; |
Victor Stinner | 3abf44e | 2015-09-18 15:38:37 +0200 | [diff] [blame] | 16932 | const size_t buflen = sizeof(buffer); |
Victor Stinner | dddf484 | 2016-06-07 11:21:42 +0200 | [diff] [blame] | 16933 | const int flags = GRND_NONBLOCK; |
| 16934 | /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */ |
Victor Stinner | 3abf44e | 2015-09-18 15:38:37 +0200 | [diff] [blame] | 16935 | (void)syscall(SYS_getrandom, buffer, buflen, flags); |
Victor Stinner | 9eb57c5 | 2015-03-19 22:21:49 +0100 | [diff] [blame] | 16936 | return 0; |
| 16937 | } |
| 16938 | |
| 16939 | |
| 16940 | _ACEOF |
| 16941 | if ac_fn_c_try_link "$LINENO"; then : |
| 16942 | have_getrandom_syscall=yes |
| 16943 | else |
| 16944 | have_getrandom_syscall=no |
| 16945 | fi |
| 16946 | rm -f core conftest.err conftest.$ac_objext \ |
| 16947 | conftest$ac_exeext conftest.$ac_ext |
| 16948 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5 |
| 16949 | $as_echo "$have_getrandom_syscall" >&6; } |
| 16950 | |
| 16951 | if test "$have_getrandom_syscall" = yes; then |
| 16952 | |
| 16953 | $as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h |
| 16954 | |
| 16955 | fi |
| 16956 | |
Victor Stinner | 3abf44e | 2015-09-18 15:38:37 +0200 | [diff] [blame] | 16957 | # check if the getrandom() function is available |
| 16958 | # the test was written for the Solaris function of <sys/random.h> |
| 16959 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5 |
| 16960 | $as_echo_n "checking for the getrandom() function... " >&6; } |
| 16961 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16962 | /* end confdefs.h. */ |
| 16963 | |
| 16964 | |
| 16965 | #include <sys/random.h> |
| 16966 | |
| 16967 | int main() { |
| 16968 | char buffer[1]; |
| 16969 | const size_t buflen = sizeof(buffer); |
| 16970 | const int flags = 0; |
| 16971 | /* ignore the result, Python checks for ENOSYS at runtime */ |
| 16972 | (void)getrandom(buffer, buflen, flags); |
| 16973 | return 0; |
| 16974 | } |
| 16975 | |
| 16976 | |
| 16977 | _ACEOF |
| 16978 | if ac_fn_c_try_link "$LINENO"; then : |
| 16979 | have_getrandom=yes |
| 16980 | else |
| 16981 | have_getrandom=no |
| 16982 | fi |
| 16983 | rm -f core conftest.err conftest.$ac_objext \ |
| 16984 | conftest$ac_exeext conftest.$ac_ext |
| 16985 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5 |
| 16986 | $as_echo "$have_getrandom" >&6; } |
| 16987 | |
| 16988 | if test "$have_getrandom" = yes; then |
| 16989 | |
| 16990 | $as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h |
| 16991 | |
| 16992 | fi |
| 16993 | |
Neil Schemenauer | 5741c45 | 2019-02-08 10:48:46 -0800 | [diff] [blame] | 16994 | # checks for POSIX shared memory, used by Modules/_multiprocessing/posixshmem.c |
| 16995 | # shm_* may only be available if linking against librt |
| 16996 | save_LIBS="$LIBS" |
| 16997 | save_includes_default="$ac_includes_default" |
| 16998 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5 |
| 16999 | $as_echo_n "checking for library containing shm_open... " >&6; } |
| 17000 | if ${ac_cv_search_shm_open+:} false; then : |
| 17001 | $as_echo_n "(cached) " >&6 |
| 17002 | else |
| 17003 | ac_func_search_save_LIBS=$LIBS |
| 17004 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 17005 | /* end confdefs.h. */ |
| 17006 | |
| 17007 | /* Override any GCC internal prototype to avoid an error. |
| 17008 | Use char because int might match the return type of a GCC |
| 17009 | builtin and then its argument prototype would still apply. */ |
| 17010 | #ifdef __cplusplus |
| 17011 | extern "C" |
| 17012 | #endif |
| 17013 | char shm_open (); |
| 17014 | int |
| 17015 | main () |
| 17016 | { |
| 17017 | return shm_open (); |
| 17018 | ; |
| 17019 | return 0; |
| 17020 | } |
| 17021 | _ACEOF |
| 17022 | for ac_lib in '' rt; do |
| 17023 | if test -z "$ac_lib"; then |
| 17024 | ac_res="none required" |
| 17025 | else |
| 17026 | ac_res=-l$ac_lib |
| 17027 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
| 17028 | fi |
| 17029 | if ac_fn_c_try_link "$LINENO"; then : |
| 17030 | ac_cv_search_shm_open=$ac_res |
| 17031 | fi |
| 17032 | rm -f core conftest.err conftest.$ac_objext \ |
| 17033 | conftest$ac_exeext |
| 17034 | if ${ac_cv_search_shm_open+:} false; then : |
| 17035 | break |
| 17036 | fi |
| 17037 | done |
| 17038 | if ${ac_cv_search_shm_open+:} false; then : |
| 17039 | |
| 17040 | else |
| 17041 | ac_cv_search_shm_open=no |
| 17042 | fi |
| 17043 | rm conftest.$ac_ext |
| 17044 | LIBS=$ac_func_search_save_LIBS |
| 17045 | fi |
| 17046 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5 |
| 17047 | $as_echo "$ac_cv_search_shm_open" >&6; } |
| 17048 | ac_res=$ac_cv_search_shm_open |
| 17049 | if test "$ac_res" != no; then : |
| 17050 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
| 17051 | |
| 17052 | fi |
| 17053 | |
| 17054 | if test "$ac_cv_search_shm_open" = "-lrt"; then |
| 17055 | |
| 17056 | $as_echo "#define SHM_NEEDS_LIBRT 1" >>confdefs.h |
| 17057 | |
| 17058 | fi |
| 17059 | for ac_header in sys/mman.h |
| 17060 | do : |
| 17061 | ac_fn_c_check_header_mongrel "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default" |
| 17062 | if test "x$ac_cv_header_sys_mman_h" = xyes; then : |
| 17063 | cat >>confdefs.h <<_ACEOF |
| 17064 | #define HAVE_SYS_MMAN_H 1 |
| 17065 | _ACEOF |
| 17066 | |
| 17067 | fi |
| 17068 | |
| 17069 | done |
| 17070 | |
| 17071 | # temporarily override ac_includes_default for AC_CHECK_FUNCS below |
| 17072 | ac_includes_default="\ |
| 17073 | ${ac_includes_default} |
| 17074 | #ifndef __cplusplus |
| 17075 | # ifdef HAVE_SYS_MMAN_H |
| 17076 | # include <sys/mman.h> |
| 17077 | # endif |
| 17078 | #endif |
| 17079 | " |
| 17080 | for ac_func in shm_open shm_unlink |
| 17081 | do : |
| 17082 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
| 17083 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" |
| 17084 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
| 17085 | cat >>confdefs.h <<_ACEOF |
| 17086 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
| 17087 | _ACEOF |
| 17088 | |
| 17089 | fi |
| 17090 | done |
| 17091 | |
| 17092 | # we don't want to link with librt always, restore LIBS |
| 17093 | LIBS="$save_LIBS" |
| 17094 | ac_includes_default="$save_includes_default" |
| 17095 | |
Christian Heimes | ff5be6e | 2018-01-20 13:19:21 +0100 | [diff] [blame] | 17096 | # Check for usable OpenSSL |
| 17097 | |
| 17098 | found=false |
| 17099 | |
| 17100 | # Check whether --with-openssl was given. |
| 17101 | if test "${with_openssl+set}" = set; then : |
| 17102 | withval=$with_openssl; |
| 17103 | case "$withval" in |
| 17104 | "" | y | ye | yes | n | no) |
| 17105 | as_fn_error $? "Invalid --with-openssl value" "$LINENO" 5 |
| 17106 | ;; |
| 17107 | *) ssldirs="$withval" |
| 17108 | ;; |
| 17109 | esac |
| 17110 | |
| 17111 | else |
| 17112 | |
| 17113 | # if pkg-config is installed and openssl has installed a .pc file, |
| 17114 | # then use that information and don't search ssldirs |
| 17115 | if test -n "$ac_tool_prefix"; then |
| 17116 | # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. |
| 17117 | set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 |
| 17118 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 17119 | $as_echo_n "checking for $ac_word... " >&6; } |
| 17120 | if ${ac_cv_prog_PKG_CONFIG+:} false; then : |
| 17121 | $as_echo_n "(cached) " >&6 |
| 17122 | else |
| 17123 | if test -n "$PKG_CONFIG"; then |
| 17124 | ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test. |
| 17125 | else |
| 17126 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 17127 | for as_dir in $PATH |
| 17128 | do |
| 17129 | IFS=$as_save_IFS |
| 17130 | test -z "$as_dir" && as_dir=. |
| 17131 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 17132 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 17133 | ac_cv_prog_PKG_CONFIG="${ac_tool_prefix}pkg-config" |
| 17134 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 17135 | break 2 |
| 17136 | fi |
| 17137 | done |
| 17138 | done |
| 17139 | IFS=$as_save_IFS |
| 17140 | |
| 17141 | fi |
| 17142 | fi |
| 17143 | PKG_CONFIG=$ac_cv_prog_PKG_CONFIG |
| 17144 | if test -n "$PKG_CONFIG"; then |
| 17145 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 |
| 17146 | $as_echo "$PKG_CONFIG" >&6; } |
| 17147 | else |
| 17148 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 17149 | $as_echo "no" >&6; } |
| 17150 | fi |
| 17151 | |
| 17152 | |
| 17153 | fi |
| 17154 | if test -z "$ac_cv_prog_PKG_CONFIG"; then |
| 17155 | ac_ct_PKG_CONFIG=$PKG_CONFIG |
| 17156 | # Extract the first word of "pkg-config", so it can be a program name with args. |
| 17157 | set dummy pkg-config; ac_word=$2 |
| 17158 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 17159 | $as_echo_n "checking for $ac_word... " >&6; } |
| 17160 | if ${ac_cv_prog_ac_ct_PKG_CONFIG+:} false; then : |
| 17161 | $as_echo_n "(cached) " >&6 |
| 17162 | else |
| 17163 | if test -n "$ac_ct_PKG_CONFIG"; then |
| 17164 | ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test. |
| 17165 | else |
| 17166 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 17167 | for as_dir in $PATH |
| 17168 | do |
| 17169 | IFS=$as_save_IFS |
| 17170 | test -z "$as_dir" && as_dir=. |
| 17171 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 17172 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 17173 | ac_cv_prog_ac_ct_PKG_CONFIG="pkg-config" |
| 17174 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 17175 | break 2 |
| 17176 | fi |
| 17177 | done |
| 17178 | done |
| 17179 | IFS=$as_save_IFS |
| 17180 | |
| 17181 | fi |
| 17182 | fi |
| 17183 | ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG |
| 17184 | if test -n "$ac_ct_PKG_CONFIG"; then |
| 17185 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PKG_CONFIG" >&5 |
| 17186 | $as_echo "$ac_ct_PKG_CONFIG" >&6; } |
| 17187 | else |
| 17188 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 17189 | $as_echo "no" >&6; } |
| 17190 | fi |
| 17191 | |
| 17192 | if test "x$ac_ct_PKG_CONFIG" = x; then |
| 17193 | PKG_CONFIG="" |
| 17194 | else |
| 17195 | case $cross_compiling:$ac_tool_warned in |
| 17196 | yes:) |
| 17197 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 17198 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 17199 | ac_tool_warned=yes ;; |
| 17200 | esac |
| 17201 | PKG_CONFIG=$ac_ct_PKG_CONFIG |
| 17202 | fi |
| 17203 | else |
| 17204 | PKG_CONFIG="$ac_cv_prog_PKG_CONFIG" |
| 17205 | fi |
| 17206 | |
| 17207 | if test x"$PKG_CONFIG" != x""; then |
| 17208 | OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null` |
| 17209 | if test $? = 0; then |
| 17210 | OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null` |
| 17211 | OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null` |
| 17212 | found=true |
| 17213 | fi |
| 17214 | fi |
| 17215 | |
| 17216 | # no such luck; use some default ssldirs |
| 17217 | if ! $found; then |
| 17218 | ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr" |
| 17219 | fi |
| 17220 | |
| 17221 | |
| 17222 | fi |
| 17223 | |
| 17224 | |
| 17225 | |
| 17226 | # note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in |
| 17227 | # an 'openssl' subdirectory |
| 17228 | |
| 17229 | if ! $found; then |
| 17230 | OPENSSL_INCLUDES= |
| 17231 | for ssldir in $ssldirs; do |
| 17232 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h in $ssldir" >&5 |
| 17233 | $as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; } |
| 17234 | if test -f "$ssldir/include/openssl/ssl.h"; then |
| 17235 | OPENSSL_INCLUDES="-I$ssldir/include" |
| 17236 | OPENSSL_LDFLAGS="-L$ssldir/lib" |
| 17237 | OPENSSL_LIBS="-lssl -lcrypto" |
| 17238 | found=true |
| 17239 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 17240 | $as_echo "yes" >&6; } |
| 17241 | break |
| 17242 | else |
| 17243 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 17244 | $as_echo "no" >&6; } |
| 17245 | fi |
| 17246 | done |
| 17247 | |
| 17248 | # if the file wasn't found, well, go ahead and try the link anyway -- maybe |
| 17249 | # it will just work! |
| 17250 | fi |
| 17251 | |
| 17252 | # try the preprocessor and linker with our new flags, |
| 17253 | # being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS |
| 17254 | |
| 17255 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiling and linking against OpenSSL works" >&5 |
| 17256 | $as_echo_n "checking whether compiling and linking against OpenSSL works... " >&6; } |
| 17257 | echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \ |
| 17258 | "OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&5 |
| 17259 | |
| 17260 | save_LIBS="$LIBS" |
| 17261 | save_LDFLAGS="$LDFLAGS" |
| 17262 | save_CPPFLAGS="$CPPFLAGS" |
| 17263 | LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS" |
| 17264 | LIBS="$OPENSSL_LIBS $LIBS" |
| 17265 | CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS" |
| 17266 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 17267 | /* end confdefs.h. */ |
| 17268 | #include <openssl/ssl.h> |
| 17269 | int |
| 17270 | main () |
| 17271 | { |
| 17272 | SSL_new(NULL) |
| 17273 | ; |
| 17274 | return 0; |
| 17275 | } |
| 17276 | _ACEOF |
| 17277 | if ac_fn_c_try_link "$LINENO"; then : |
| 17278 | |
| 17279 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 17280 | $as_echo "yes" >&6; } |
| 17281 | have_openssl=yes |
| 17282 | |
| 17283 | else |
| 17284 | |
| 17285 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 17286 | $as_echo "no" >&6; } |
| 17287 | have_openssl=no |
| 17288 | |
| 17289 | fi |
| 17290 | rm -f core conftest.err conftest.$ac_objext \ |
| 17291 | conftest$ac_exeext conftest.$ac_ext |
| 17292 | CPPFLAGS="$save_CPPFLAGS" |
| 17293 | LDFLAGS="$save_LDFLAGS" |
| 17294 | LIBS="$save_LIBS" |
| 17295 | |
| 17296 | |
| 17297 | |
| 17298 | |
| 17299 | |
| 17300 | |
| 17301 | if test "$have_openssl" = yes; then |
| 17302 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X509_VERIFY_PARAM_set1_host in libssl" >&5 |
| 17303 | $as_echo_n "checking for X509_VERIFY_PARAM_set1_host in libssl... " >&6; } |
| 17304 | |
| 17305 | save_LIBS="$LIBS" |
| 17306 | save_LDFLAGS="$LDFLAGS" |
| 17307 | save_CPPFLAGS="$CPPFLAGS" |
| 17308 | LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS" |
| 17309 | LIBS="$OPENSSL_LIBS $LIBS" |
| 17310 | CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS" |
| 17311 | |
| 17312 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 17313 | /* end confdefs.h. */ |
| 17314 | |
| 17315 | #include <openssl/x509_vfy.h> |
| 17316 | |
| 17317 | int |
| 17318 | main () |
| 17319 | { |
| 17320 | |
| 17321 | X509_VERIFY_PARAM *p = X509_VERIFY_PARAM_new(); |
| 17322 | X509_VERIFY_PARAM_set1_host(p, "localhost", 0); |
| 17323 | X509_VERIFY_PARAM_set1_ip_asc(p, "127.0.0.1"); |
| 17324 | X509_VERIFY_PARAM_set_hostflags(p, 0); |
| 17325 | |
| 17326 | ; |
| 17327 | return 0; |
| 17328 | } |
| 17329 | |
| 17330 | _ACEOF |
| 17331 | if ac_fn_c_try_link "$LINENO"; then : |
| 17332 | |
| 17333 | ac_cv_has_x509_verify_param_set1_host=yes |
| 17334 | |
| 17335 | else |
| 17336 | |
| 17337 | ac_cv_has_x509_verify_param_set1_host=no |
| 17338 | |
| 17339 | fi |
| 17340 | rm -f core conftest.err conftest.$ac_objext \ |
| 17341 | conftest$ac_exeext conftest.$ac_ext |
| 17342 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_x509_verify_param_set1_host" >&5 |
| 17343 | $as_echo "$ac_cv_has_x509_verify_param_set1_host" >&6; } |
| 17344 | if test "$ac_cv_has_x509_verify_param_set1_host" = "yes"; then |
| 17345 | |
| 17346 | $as_echo "#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1" >>confdefs.h |
| 17347 | |
| 17348 | fi |
| 17349 | |
| 17350 | CPPFLAGS="$save_CPPFLAGS" |
| 17351 | LDFLAGS="$save_LDFLAGS" |
| 17352 | LIBS="$save_LIBS" |
| 17353 | fi |
| 17354 | |
Christian Heimes | 892d66e | 2018-01-29 14:10:18 +0100 | [diff] [blame] | 17355 | # ssl module default cipher suite string |
| 17356 | |
| 17357 | |
| 17358 | |
| 17359 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-ssl-default-suites" >&5 |
| 17360 | $as_echo_n "checking for --with-ssl-default-suites... " >&6; } |
| 17361 | |
| 17362 | # Check whether --with-ssl-default-suites was given. |
| 17363 | if test "${with_ssl_default_suites+set}" = set; then : |
| 17364 | withval=$with_ssl_default_suites; |
| 17365 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 |
| 17366 | $as_echo "$withval" >&6; } |
| 17367 | case "$withval" in |
| 17368 | python) |
| 17369 | $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h |
| 17370 | |
| 17371 | ;; |
| 17372 | openssl) |
| 17373 | $as_echo "#define PY_SSL_DEFAULT_CIPHERS 2" >>confdefs.h |
| 17374 | |
| 17375 | ;; |
| 17376 | *) |
| 17377 | $as_echo "#define PY_SSL_DEFAULT_CIPHERS 0" >>confdefs.h |
| 17378 | |
| 17379 | cat >>confdefs.h <<_ACEOF |
| 17380 | #define PY_SSL_DEFAULT_CIPHER_STRING "$withval" |
| 17381 | _ACEOF |
| 17382 | |
| 17383 | ;; |
| 17384 | esac |
| 17385 | |
| 17386 | else |
| 17387 | |
| 17388 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: python" >&5 |
| 17389 | $as_echo "python" >&6; } |
| 17390 | $as_echo "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h |
| 17391 | |
| 17392 | |
| 17393 | fi |
| 17394 | |
| 17395 | |
| 17396 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 17397 | # generate output files |
Victor Stinner | 0a8e572 | 2019-05-23 03:30:23 +0200 | [diff] [blame] | 17398 | ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh" |
Martin v. Löwis | 88afe66 | 2002-10-26 13:47:44 +0000 | [diff] [blame] | 17399 | |
Antoine Pitrou | 8e6b407 | 2010-09-10 19:44:44 +0000 | [diff] [blame] | 17400 | ac_config_files="$ac_config_files Modules/ld_so_aix" |
| 17401 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17402 | cat >confcache <<\_ACEOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 17403 | # This file is a shell script that caches the results of configure |
| 17404 | # tests run on this system so they can be shared between configure |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17405 | # scripts and configure runs, see configure's option --config-cache. |
| 17406 | # It is not useful on other systems. If it contains results you don't |
| 17407 | # want to keep, you may remove or edit it. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 17408 | # |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17409 | # config.status only pays attention to the cache file if you give it |
| 17410 | # the --recheck option to rerun configure. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 17411 | # |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17412 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17413 | # loading this file, other *unset* `ac_cv_foo' will be assigned the |
| 17414 | # following values. |
| 17415 | |
| 17416 | _ACEOF |
| 17417 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 17418 | # The following way of writing the cache mishandles newlines in values, |
| 17419 | # but we know of no workaround that is simple, portable, and efficient. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17420 | # So, we kill variables containing newlines. |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 17421 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 17422 | # and sets the high bit in the cache file unless we assign to the vars. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17423 | ( |
| 17424 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do |
| 17425 | eval ac_val=\$$ac_var |
| 17426 | case $ac_val in #( |
| 17427 | *${as_nl}*) |
| 17428 | case $ac_var in #( |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17429 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 |
| 17430 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17431 | esac |
| 17432 | case $ac_var in #( |
| 17433 | _ | IFS | as_nl) ;; #( |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17434 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( |
| 17435 | *) { eval $ac_var=; unset $ac_var;} ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17436 | esac ;; |
| 17437 | esac |
| 17438 | done |
| 17439 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17440 | (set) 2>&1 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17441 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
| 17442 | *${as_nl}ac_space=\ *) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17443 | # `set' does not quote correctly, so add quotes: double-quote |
| 17444 | # substitution turns \\\\ into \\, and sed turns \\ into \. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17445 | sed -n \ |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 17446 | "s/'/'\\\\''/g; |
| 17447 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17448 | ;; #( |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17449 | *) |
| 17450 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17451 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17452 | ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17453 | esac | |
| 17454 | sort |
| 17455 | ) | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17456 | sed ' |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17457 | /^ac_cv_env_/b end |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17458 | t clear |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17459 | :clear |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17460 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
| 17461 | t end |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17462 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
| 17463 | :end' >>confcache |
| 17464 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else |
| 17465 | if test -w "$cache_file"; then |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17466 | if test "x$cache_file" != "x/dev/null"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17467 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
| 17468 | $as_echo "$as_me: updating cache $cache_file" >&6;} |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17469 | if test ! -f "$cache_file" || test -h "$cache_file"; then |
| 17470 | cat confcache >"$cache_file" |
| 17471 | else |
| 17472 | case $cache_file in #( |
| 17473 | */* | ?:*) |
| 17474 | mv -f confcache "$cache_file"$$ && |
| 17475 | mv -f "$cache_file"$$ "$cache_file" ;; #( |
| 17476 | *) |
| 17477 | mv -f confcache "$cache_file" ;; |
| 17478 | esac |
| 17479 | fi |
| 17480 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 17481 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17482 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
| 17483 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 17484 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 17485 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 17486 | rm -f confcache |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 17487 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 17488 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 17489 | # Let make expand exec_prefix. |
| 17490 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 17491 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 17492 | DEFS=-DHAVE_CONFIG_H |
| 17493 | |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17494 | ac_libobjs= |
| 17495 | ac_ltlibobjs= |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17496 | U= |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17497 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue |
| 17498 | # 1. Remove the extension, and $U if already installed. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17499 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17500 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17501 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR |
| 17502 | # will be set to the directory where LIBOBJS objects are built. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17503 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" |
| 17504 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17505 | done |
| 17506 | LIBOBJS=$ac_libobjs |
| 17507 | |
| 17508 | LTLIBOBJS=$ac_ltlibobjs |
| 17509 | |
| 17510 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17511 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17512 | |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17513 | : "${CONFIG_STATUS=./config.status}" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17514 | ac_write_fail=0 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17515 | ac_clean_files_save=$ac_clean_files |
| 17516 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17517 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
| 17518 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} |
| 17519 | as_write_fail=0 |
| 17520 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17521 | #! $SHELL |
| 17522 | # Generated by $as_me. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 17523 | # Run this file to recreate the current configuration. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 17524 | # Compiler output produced by configure, useful for debugging |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17525 | # configure, is in config.log if it exists. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 17526 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17527 | debug=false |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17528 | ac_cs_recheck=false |
| 17529 | ac_cs_silent=false |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 17530 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17531 | SHELL=\${CONFIG_SHELL-$SHELL} |
| 17532 | export SHELL |
| 17533 | _ASEOF |
| 17534 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 |
| 17535 | ## -------------------- ## |
| 17536 | ## M4sh Initialization. ## |
| 17537 | ## -------------------- ## |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 17538 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17539 | # Be more Bourne compatible |
| 17540 | DUALCASE=1; export DUALCASE # for MKS sh |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17541 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17542 | emulate sh |
| 17543 | NULLCMD=: |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17544 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17545 | # is contrary to our usage. Disable this feature. |
| 17546 | alias -g '${1+"$@"}'='"$@"' |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17547 | setopt NO_GLOB_SUBST |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 17548 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17549 | case `(set -o) 2>/dev/null` in #( |
| 17550 | *posix*) : |
| 17551 | set -o posix ;; #( |
| 17552 | *) : |
| 17553 | ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17554 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 17555 | fi |
Thomas Wouters | 89f507f | 2006-12-13 04:49:30 +0000 | [diff] [blame] | 17556 | |
| 17557 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17558 | as_nl=' |
| 17559 | ' |
| 17560 | export as_nl |
| 17561 | # Printing a long string crashes Solaris 7 /usr/bin/printf. |
| 17562 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' |
| 17563 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo |
| 17564 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo |
| 17565 | # Prefer a ksh shell builtin over an external printf program on Solaris, |
| 17566 | # but without wasting forks for bash or zsh. |
| 17567 | if test -z "$BASH_VERSION$ZSH_VERSION" \ |
| 17568 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then |
| 17569 | as_echo='print -r --' |
| 17570 | as_echo_n='print -rn --' |
| 17571 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then |
| 17572 | as_echo='printf %s\n' |
| 17573 | as_echo_n='printf %s' |
| 17574 | else |
| 17575 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then |
| 17576 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' |
| 17577 | as_echo_n='/usr/ucb/echo -n' |
| 17578 | else |
| 17579 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' |
| 17580 | as_echo_n_body='eval |
| 17581 | arg=$1; |
| 17582 | case $arg in #( |
| 17583 | *"$as_nl"*) |
| 17584 | expr "X$arg" : "X\\(.*\\)$as_nl"; |
| 17585 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; |
| 17586 | esac; |
| 17587 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" |
| 17588 | ' |
| 17589 | export as_echo_n_body |
| 17590 | as_echo_n='sh -c $as_echo_n_body as_echo' |
| 17591 | fi |
| 17592 | export as_echo_body |
| 17593 | as_echo='sh -c $as_echo_body as_echo' |
| 17594 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17595 | |
| 17596 | # The user is always right. |
| 17597 | if test "${PATH_SEPARATOR+set}" != set; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17598 | PATH_SEPARATOR=: |
| 17599 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { |
| 17600 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || |
| 17601 | PATH_SEPARATOR=';' |
| 17602 | } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17603 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17604 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17605 | |
| 17606 | # IFS |
| 17607 | # We need space, tab and new line, in precisely that order. Quoting is |
| 17608 | # there to prevent editors from complaining about space-tab. |
| 17609 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word |
| 17610 | # splitting by setting IFS to empty value.) |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17611 | IFS=" "" $as_nl" |
| 17612 | |
| 17613 | # Find who we are. Look in the path if we contain no directory separator. |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17614 | as_myself= |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17615 | case $0 in #(( |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17616 | *[\\/]* ) as_myself=$0 ;; |
| 17617 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17618 | for as_dir in $PATH |
| 17619 | do |
| 17620 | IFS=$as_save_IFS |
| 17621 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17622 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break |
| 17623 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17624 | IFS=$as_save_IFS |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17625 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17626 | ;; |
| 17627 | esac |
| 17628 | # We did not find ourselves, most probably we were run as `sh COMMAND' |
| 17629 | # in which case we are not to be found in the path. |
| 17630 | if test "x$as_myself" = x; then |
| 17631 | as_myself=$0 |
| 17632 | fi |
| 17633 | if test ! -f "$as_myself"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17634 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 |
| 17635 | exit 1 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17636 | fi |
| 17637 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17638 | # Unset variables that we do not need and which cause bugs (e.g. in |
| 17639 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" |
| 17640 | # suppresses any "Segmentation fault" message there. '((' could |
| 17641 | # trigger a bug in pdksh 5.2.14. |
| 17642 | for as_var in BASH_ENV ENV MAIL MAILPATH |
| 17643 | do eval test x\${$as_var+set} = xset \ |
| 17644 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17645 | done |
| 17646 | PS1='$ ' |
| 17647 | PS2='> ' |
| 17648 | PS4='+ ' |
| 17649 | |
| 17650 | # NLS nuisances. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17651 | LC_ALL=C |
| 17652 | export LC_ALL |
| 17653 | LANGUAGE=C |
| 17654 | export LANGUAGE |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17655 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17656 | # CDPATH. |
| 17657 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH |
| 17658 | |
| 17659 | |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17660 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
| 17661 | # ---------------------------------------- |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17662 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
| 17663 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17664 | # script with STATUS, using 1 if that was 0. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17665 | as_fn_error () |
| 17666 | { |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17667 | as_status=$1; test $as_status -eq 0 && as_status=1 |
| 17668 | if test "$4"; then |
| 17669 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 17670 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17671 | fi |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17672 | $as_echo "$as_me: error: $2" >&2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17673 | as_fn_exit $as_status |
| 17674 | } # as_fn_error |
| 17675 | |
| 17676 | |
| 17677 | # as_fn_set_status STATUS |
| 17678 | # ----------------------- |
| 17679 | # Set $? to STATUS, without forking. |
| 17680 | as_fn_set_status () |
| 17681 | { |
| 17682 | return $1 |
| 17683 | } # as_fn_set_status |
| 17684 | |
| 17685 | # as_fn_exit STATUS |
| 17686 | # ----------------- |
| 17687 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. |
| 17688 | as_fn_exit () |
| 17689 | { |
| 17690 | set +e |
| 17691 | as_fn_set_status $1 |
| 17692 | exit $1 |
| 17693 | } # as_fn_exit |
| 17694 | |
| 17695 | # as_fn_unset VAR |
| 17696 | # --------------- |
| 17697 | # Portably unset VAR. |
| 17698 | as_fn_unset () |
| 17699 | { |
| 17700 | { eval $1=; unset $1;} |
| 17701 | } |
| 17702 | as_unset=as_fn_unset |
| 17703 | # as_fn_append VAR VALUE |
| 17704 | # ---------------------- |
| 17705 | # Append the text in VALUE to the end of the definition contained in VAR. Take |
| 17706 | # advantage of any shell optimizations that allow amortized linear growth over |
| 17707 | # repeated appends, instead of the typical quadratic growth present in naive |
| 17708 | # implementations. |
| 17709 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : |
| 17710 | eval 'as_fn_append () |
| 17711 | { |
| 17712 | eval $1+=\$2 |
| 17713 | }' |
| 17714 | else |
| 17715 | as_fn_append () |
| 17716 | { |
| 17717 | eval $1=\$$1\$2 |
| 17718 | } |
| 17719 | fi # as_fn_append |
| 17720 | |
| 17721 | # as_fn_arith ARG... |
| 17722 | # ------------------ |
| 17723 | # Perform arithmetic evaluation on the ARGs, and store the result in the |
| 17724 | # global $as_val. Take advantage of shells that can avoid forks. The arguments |
| 17725 | # must be portable across $(()) and expr. |
| 17726 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : |
| 17727 | eval 'as_fn_arith () |
| 17728 | { |
| 17729 | as_val=$(( $* )) |
| 17730 | }' |
| 17731 | else |
| 17732 | as_fn_arith () |
| 17733 | { |
| 17734 | as_val=`expr "$@" || test $? -eq 1` |
| 17735 | } |
| 17736 | fi # as_fn_arith |
| 17737 | |
| 17738 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17739 | if expr a : '\(a\)' >/dev/null 2>&1 && |
| 17740 | test "X`expr 00001 : '.*\(...\)'`" = X001; then |
| 17741 | as_expr=expr |
| 17742 | else |
| 17743 | as_expr=false |
| 17744 | fi |
| 17745 | |
| 17746 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
| 17747 | as_basename=basename |
| 17748 | else |
| 17749 | as_basename=false |
| 17750 | fi |
| 17751 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17752 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
| 17753 | as_dirname=dirname |
| 17754 | else |
| 17755 | as_dirname=false |
| 17756 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17757 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17758 | as_me=`$as_basename -- "$0" || |
| 17759 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
| 17760 | X"$0" : 'X\(//\)$' \| \ |
| 17761 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17762 | $as_echo X/"$0" | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17763 | sed '/^.*\/\([^/][^/]*\)\/*$/{ |
| 17764 | s//\1/ |
| 17765 | q |
| 17766 | } |
| 17767 | /^X\/\(\/\/\)$/{ |
| 17768 | s//\1/ |
| 17769 | q |
| 17770 | } |
| 17771 | /^X\/\(\/\).*/{ |
| 17772 | s//\1/ |
| 17773 | q |
| 17774 | } |
| 17775 | s/.*/./; q'` |
| 17776 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17777 | # Avoid depending upon Character Ranges. |
| 17778 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' |
| 17779 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' |
| 17780 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS |
| 17781 | as_cr_digits='0123456789' |
| 17782 | as_cr_alnum=$as_cr_Letters$as_cr_digits |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17783 | |
| 17784 | ECHO_C= ECHO_N= ECHO_T= |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17785 | case `echo -n x` in #((((( |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17786 | -n*) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17787 | case `echo 'xy\c'` in |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17788 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17789 | xy) ECHO_C='\c';; |
| 17790 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null |
| 17791 | ECHO_T=' ';; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17792 | esac;; |
| 17793 | *) |
| 17794 | ECHO_N='-n';; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17795 | esac |
Ronald Oussoren | 74f29b4 | 2009-09-20 20:09:26 +0000 | [diff] [blame] | 17796 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17797 | rm -f conf$$ conf$$.exe conf$$.file |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17798 | if test -d conf$$.dir; then |
| 17799 | rm -f conf$$.dir/conf$$.file |
| 17800 | else |
| 17801 | rm -f conf$$.dir |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17802 | mkdir conf$$.dir 2>/dev/null |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17803 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17804 | if (echo >conf$$.file) 2>/dev/null; then |
| 17805 | if ln -s conf$$.file conf$$ 2>/dev/null; then |
| 17806 | as_ln_s='ln -s' |
| 17807 | # ... but there are two gotchas: |
| 17808 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. |
| 17809 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 17810 | # In both cases, we have to default to `cp -pR'. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17811 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 17812 | as_ln_s='cp -pR' |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17813 | elif ln conf$$.file conf$$ 2>/dev/null; then |
| 17814 | as_ln_s=ln |
| 17815 | else |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 17816 | as_ln_s='cp -pR' |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17817 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17818 | else |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 17819 | as_ln_s='cp -pR' |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17820 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17821 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
| 17822 | rmdir conf$$.dir 2>/dev/null |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17823 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17824 | |
| 17825 | # as_fn_mkdir_p |
| 17826 | # ------------- |
| 17827 | # Create "$as_dir" as a directory, including parents if necessary. |
| 17828 | as_fn_mkdir_p () |
| 17829 | { |
| 17830 | |
| 17831 | case $as_dir in #( |
| 17832 | -*) as_dir=./$as_dir;; |
| 17833 | esac |
| 17834 | test -d "$as_dir" || eval $as_mkdir_p || { |
| 17835 | as_dirs= |
| 17836 | while :; do |
| 17837 | case $as_dir in #( |
| 17838 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( |
| 17839 | *) as_qdir=$as_dir;; |
| 17840 | esac |
| 17841 | as_dirs="'$as_qdir' $as_dirs" |
| 17842 | as_dir=`$as_dirname -- "$as_dir" || |
| 17843 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
| 17844 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
| 17845 | X"$as_dir" : 'X\(//\)$' \| \ |
| 17846 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || |
| 17847 | $as_echo X"$as_dir" | |
| 17848 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
| 17849 | s//\1/ |
| 17850 | q |
| 17851 | } |
| 17852 | /^X\(\/\/\)[^/].*/{ |
| 17853 | s//\1/ |
| 17854 | q |
| 17855 | } |
| 17856 | /^X\(\/\/\)$/{ |
| 17857 | s//\1/ |
| 17858 | q |
| 17859 | } |
| 17860 | /^X\(\/\).*/{ |
| 17861 | s//\1/ |
| 17862 | q |
| 17863 | } |
| 17864 | s/.*/./; q'` |
| 17865 | test -d "$as_dir" && break |
| 17866 | done |
| 17867 | test -z "$as_dirs" || eval "mkdir $as_dirs" |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17868 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17869 | |
| 17870 | |
| 17871 | } # as_fn_mkdir_p |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17872 | if mkdir -p . 2>/dev/null; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17873 | as_mkdir_p='mkdir -p "$as_dir"' |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17874 | else |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 17875 | test -d ./-p && rmdir ./-p |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17876 | as_mkdir_p=false |
| 17877 | fi |
| 17878 | |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 17879 | |
| 17880 | # as_fn_executable_p FILE |
| 17881 | # ----------------------- |
| 17882 | # Test if FILE is an executable regular file. |
| 17883 | as_fn_executable_p () |
| 17884 | { |
| 17885 | test -f "$1" && test -x "$1" |
| 17886 | } # as_fn_executable_p |
| 17887 | as_test_x='test -x' |
| 17888 | as_executable_p=as_fn_executable_p |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17889 | |
| 17890 | # Sed expression to map a string onto a valid CPP name. |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 17891 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17892 | |
| 17893 | # Sed expression to map a string onto a valid variable name. |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 17894 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17895 | |
| 17896 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17897 | exec 6>&1 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17898 | ## ----------------------------------- ## |
| 17899 | ## Main body of $CONFIG_STATUS script. ## |
| 17900 | ## ----------------------------------- ## |
| 17901 | _ASEOF |
| 17902 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17903 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17904 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 17905 | # Save the log message, to keep $0 and so on meaningful, and to |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17906 | # report actual input values of CONFIG_FILES etc. instead of their |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17907 | # values after options handling. |
| 17908 | ac_log=" |
Łukasz Langa | 9ab2fb1 | 2019-06-04 22:12:32 +0200 | [diff] [blame] | 17909 | This file was extended by python $as_me 3.9, which was |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 17910 | generated by GNU Autoconf 2.69. Invocation command line was |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17911 | |
| 17912 | CONFIG_FILES = $CONFIG_FILES |
| 17913 | CONFIG_HEADERS = $CONFIG_HEADERS |
| 17914 | CONFIG_LINKS = $CONFIG_LINKS |
| 17915 | CONFIG_COMMANDS = $CONFIG_COMMANDS |
| 17916 | $ $0 $@ |
| 17917 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17918 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
| 17919 | " |
| 17920 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17921 | _ACEOF |
| 17922 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17923 | case $ac_config_files in *" |
| 17924 | "*) set x $ac_config_files; shift; ac_config_files=$*;; |
| 17925 | esac |
| 17926 | |
| 17927 | case $ac_config_headers in *" |
| 17928 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; |
| 17929 | esac |
| 17930 | |
| 17931 | |
| 17932 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17933 | # Files that config.status was made for. |
Charles-François Natali | 6613c18 | 2011-11-27 12:41:06 +0100 | [diff] [blame] | 17934 | config_files="$ac_config_files" |
| 17935 | config_headers="$ac_config_headers" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17936 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17937 | _ACEOF |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17938 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17939 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17940 | ac_cs_usage="\ |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17941 | \`$as_me' instantiates files and other configuration actions |
| 17942 | from templates according to the current configuration. Unless the files |
| 17943 | and actions are specified as TAGs, all are instantiated by default. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17944 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17945 | Usage: $0 [OPTION]... [TAG]... |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17946 | |
| 17947 | -h, --help print this help, then exit |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17948 | -V, --version print version number and configuration settings, then exit |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17949 | --config print configuration, then exit |
| 17950 | -q, --quiet, --silent |
| 17951 | do not print progress messages |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17952 | -d, --debug don't remove temporary files |
| 17953 | --recheck update $as_me by reconfiguring in the same conditions |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17954 | --file=FILE[:TEMPLATE] |
| 17955 | instantiate the configuration file FILE |
| 17956 | --header=FILE[:TEMPLATE] |
| 17957 | instantiate the configuration header FILE |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17958 | |
| 17959 | Configuration files: |
| 17960 | $config_files |
| 17961 | |
| 17962 | Configuration headers: |
| 17963 | $config_headers |
| 17964 | |
Benjamin Peterson | c2fcbf4 | 2016-08-03 22:01:32 -0700 | [diff] [blame] | 17965 | Report bugs to <https://bugs.python.org/>." |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 17966 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17967 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17968 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 17969 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17970 | ac_cs_version="\\ |
Łukasz Langa | 9ab2fb1 | 2019-06-04 22:12:32 +0200 | [diff] [blame] | 17971 | python config.status 3.9 |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 17972 | configured by $0, generated by GNU Autoconf 2.69, |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17973 | with options \\"\$ac_cs_config\\" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17974 | |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 17975 | Copyright (C) 2012 Free Software Foundation, Inc. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17976 | This config.status script is free software; the Free Software Foundation |
| 17977 | gives unlimited permission to copy, distribute and modify it." |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17978 | |
| 17979 | ac_pwd='$ac_pwd' |
| 17980 | srcdir='$srcdir' |
| 17981 | INSTALL='$INSTALL' |
Matthias Klose | 93a0ef1 | 2012-03-15 18:08:34 +0100 | [diff] [blame] | 17982 | MKDIR_P='$MKDIR_P' |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17983 | test -n "\$AWK" || AWK=awk |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17984 | _ACEOF |
| 17985 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17986 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 17987 | # The default lists apply if the user does not specify any file. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17988 | ac_need_defaults=: |
| 17989 | while test $# != 0 |
| 17990 | do |
| 17991 | case $1 in |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17992 | --*=?*) |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17993 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
| 17994 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17995 | ac_shift=: |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17996 | ;; |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17997 | --*=) |
| 17998 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
| 17999 | ac_optarg= |
| 18000 | ac_shift=: |
| 18001 | ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18002 | *) |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 18003 | ac_option=$1 |
| 18004 | ac_optarg=$2 |
| 18005 | ac_shift=shift |
| 18006 | ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18007 | esac |
| 18008 | |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 18009 | case $ac_option in |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18010 | # Handling of the options. |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 18011 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
| 18012 | ac_cs_recheck=: ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18013 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18014 | $as_echo "$ac_cs_version"; exit ;; |
| 18015 | --config | --confi | --conf | --con | --co | --c ) |
| 18016 | $as_echo "$ac_cs_config"; exit ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18017 | --debug | --debu | --deb | --de | --d | -d ) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18018 | debug=: ;; |
| 18019 | --file | --fil | --fi | --f ) |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 18020 | $ac_shift |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18021 | case $ac_optarg in |
| 18022 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 18023 | '') as_fn_error $? "missing file argument" ;; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18024 | esac |
| 18025 | as_fn_append CONFIG_FILES " '$ac_optarg'" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18026 | ac_need_defaults=false;; |
| 18027 | --header | --heade | --head | --hea ) |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 18028 | $ac_shift |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18029 | case $ac_optarg in |
| 18030 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; |
| 18031 | esac |
| 18032 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18033 | ac_need_defaults=false;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18034 | --he | --h) |
| 18035 | # Conflict between --help and --header |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 18036 | as_fn_error $? "ambiguous option: \`$1' |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18037 | Try \`$0 --help' for more information.";; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18038 | --help | --hel | -h ) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18039 | $as_echo "$ac_cs_usage"; exit ;; |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 18040 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| 18041 | | -silent | --silent | --silen | --sile | --sil | --si | --s) |
| 18042 | ac_cs_silent=: ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18043 | |
| 18044 | # This is an error. |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 18045 | -*) as_fn_error $? "unrecognized option: \`$1' |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18046 | Try \`$0 --help' for more information." ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18047 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18048 | *) as_fn_append ac_config_targets " $1" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18049 | ac_need_defaults=false ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18050 | |
| 18051 | esac |
| 18052 | shift |
| 18053 | done |
| 18054 | |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 18055 | ac_configure_extra_args= |
| 18056 | |
| 18057 | if $ac_cs_silent; then |
| 18058 | exec 6>/dev/null |
| 18059 | ac_configure_extra_args="$ac_configure_extra_args --silent" |
| 18060 | fi |
| 18061 | |
| 18062 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18063 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 18064 | if \$ac_cs_recheck; then |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 18065 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18066 | shift |
| 18067 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 |
| 18068 | CONFIG_SHELL='$SHELL' |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18069 | export CONFIG_SHELL |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18070 | exec "\$@" |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 18071 | fi |
| 18072 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18073 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18074 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18075 | exec 5>>config.log |
| 18076 | { |
| 18077 | echo |
| 18078 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX |
| 18079 | ## Running $as_me. ## |
| 18080 | _ASBOX |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18081 | $as_echo "$ac_log" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18082 | } >&5 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18083 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18084 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18085 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18086 | _ACEOF |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18087 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18088 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18089 | |
| 18090 | # Handling of arguments. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18091 | for ac_config_target in $ac_config_targets |
| 18092 | do |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18093 | case $ac_config_target in |
| 18094 | "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;; |
| 18095 | "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;; |
| 18096 | "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;; |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 18097 | "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;; |
| 18098 | "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18099 | "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;; |
Antoine Pitrou | 2032722 | 2009-05-24 20:39:11 +0000 | [diff] [blame] | 18100 | "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;; |
Victor Stinner | 0a8e572 | 2019-05-23 03:30:23 +0200 | [diff] [blame] | 18101 | "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;; |
doko@python.org | 8742119 | 2013-01-26 11:39:31 +0100 | [diff] [blame] | 18102 | "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;; |
Antoine Pitrou | 8e6b407 | 2010-09-10 19:44:44 +0000 | [diff] [blame] | 18103 | "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18104 | |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18105 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18106 | esac |
| 18107 | done |
| 18108 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18109 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18110 | # If the user did not use the arguments to specify the items to instantiate, |
| 18111 | # then the envvar interface is used. Set only those that are not. |
| 18112 | # We use the long form for the default assignment because of an extremely |
| 18113 | # bizarre bug on SunOS 4.1.3. |
| 18114 | if $ac_need_defaults; then |
| 18115 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files |
| 18116 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers |
| 18117 | fi |
| 18118 | |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 18119 | # Have a temporary directory for convenience. Make it in the build tree |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18120 | # simply because there is no reason against having it here, and in addition, |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 18121 | # creating and moving files from /tmp can sometimes cause problems. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18122 | # Hook for its removal unless debugging. |
| 18123 | # Note that there is a small window in which the directory will not be cleaned: |
| 18124 | # after its creation but before its name has been assigned to `$tmp'. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18125 | $debug || |
| 18126 | { |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18127 | tmp= ac_tmp= |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18128 | trap 'exit_status=$? |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18129 | : "${ac_tmp:=$tmp}" |
| 18130 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18131 | ' 0 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18132 | trap 'as_fn_exit 1' 1 2 13 15 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18133 | } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18134 | # Create a (secure) tmp directory for tmp files. |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 18135 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18136 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18137 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18138 | test -d "$tmp" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18139 | } || |
| 18140 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18141 | tmp=./conf$$-$RANDOM |
| 18142 | (umask 077 && mkdir "$tmp") |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 18143 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18144 | ac_tmp=$tmp |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18145 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18146 | # Set up the scripts for CONFIG_FILES section. |
| 18147 | # No need to generate them if there are no CONFIG_FILES. |
| 18148 | # This happens for instance with `./config.status config.h'. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18149 | if test -n "$CONFIG_FILES"; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18150 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18151 | |
| 18152 | ac_cr=`echo X | tr X '\015'` |
| 18153 | # On cygwin, bash can eat \r inside `` if the user requested igncr. |
| 18154 | # But we know of no other shell where ac_cr would be empty at this |
| 18155 | # point, so we can use a bashism as a fallback. |
| 18156 | if test "x$ac_cr" = x; then |
| 18157 | eval ac_cr=\$\'\\r\' |
| 18158 | fi |
| 18159 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` |
| 18160 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 18161 | ac_cs_awk_cr='\\r' |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18162 | else |
| 18163 | ac_cs_awk_cr=$ac_cr |
| 18164 | fi |
| 18165 | |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18166 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18167 | _ACEOF |
| 18168 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18169 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18170 | { |
| 18171 | echo "cat >conf$$subs.awk <<_ACEOF" && |
| 18172 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && |
| 18173 | echo "_ACEOF" |
| 18174 | } >conf$$subs.sh || |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 18175 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
| 18176 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18177 | ac_delim='%!_!# ' |
| 18178 | for ac_last_try in false false false false false :; do |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18179 | . ./conf$$subs.sh || |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 18180 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18181 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18182 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` |
| 18183 | if test $ac_delim_n = $ac_delim_num; then |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18184 | break |
| 18185 | elif $ac_last_try; then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 18186 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18187 | else |
| 18188 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18189 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18190 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18191 | rm -f conf$$subs.sh |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18192 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18193 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18194 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18195 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18196 | sed -n ' |
| 18197 | h |
| 18198 | s/^/S["/; s/!.*/"]=/ |
| 18199 | p |
| 18200 | g |
| 18201 | s/^[^!]*!// |
| 18202 | :repl |
| 18203 | t repl |
| 18204 | s/'"$ac_delim"'$// |
| 18205 | t delim |
| 18206 | :nl |
| 18207 | h |
| 18208 | s/\(.\{148\}\)..*/\1/ |
| 18209 | t more1 |
| 18210 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ |
| 18211 | p |
| 18212 | n |
| 18213 | b repl |
| 18214 | :more1 |
| 18215 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ |
| 18216 | p |
| 18217 | g |
| 18218 | s/.\{148\}// |
| 18219 | t nl |
| 18220 | :delim |
| 18221 | h |
| 18222 | s/\(.\{148\}\)..*/\1/ |
| 18223 | t more2 |
| 18224 | s/["\\]/\\&/g; s/^/"/; s/$/"/ |
| 18225 | p |
| 18226 | b |
| 18227 | :more2 |
| 18228 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ |
| 18229 | p |
| 18230 | g |
| 18231 | s/.\{148\}// |
| 18232 | t delim |
| 18233 | ' <conf$$subs.awk | sed ' |
| 18234 | /^[^""]/{ |
| 18235 | N |
| 18236 | s/\n// |
| 18237 | } |
| 18238 | ' >>$CONFIG_STATUS || ac_write_fail=1 |
| 18239 | rm -f conf$$subs.awk |
| 18240 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 18241 | _ACAWK |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18242 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18243 | for (key in S) S_is_set[key] = 1 |
| 18244 | FS = "" |
| 18245 | |
| 18246 | } |
| 18247 | { |
| 18248 | line = $ 0 |
| 18249 | nfields = split(line, field, "@") |
| 18250 | substed = 0 |
| 18251 | len = length(field[1]) |
| 18252 | for (i = 2; i < nfields; i++) { |
| 18253 | key = field[i] |
| 18254 | keylen = length(key) |
| 18255 | if (S_is_set[key]) { |
| 18256 | value = S[key] |
| 18257 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) |
| 18258 | len += length(value) + length(field[++i]) |
| 18259 | substed = 1 |
| 18260 | } else |
| 18261 | len += 1 + keylen |
| 18262 | } |
| 18263 | |
| 18264 | print line |
| 18265 | } |
| 18266 | |
| 18267 | _ACAWK |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18268 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18269 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 18270 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then |
| 18271 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" |
| 18272 | else |
| 18273 | cat |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18274 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 18275 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 |
Ronald Oussoren | 74f29b4 | 2009-09-20 20:09:26 +0000 | [diff] [blame] | 18276 | _ACEOF |
| 18277 | |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 18278 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), |
| 18279 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18280 | # trailing colons and then remove the whole line if VPATH becomes empty |
| 18281 | # (actually we leave an empty line to preserve line numbers). |
| 18282 | if test "x$srcdir" = x.; then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 18283 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ |
| 18284 | h |
| 18285 | s/// |
| 18286 | s/^/:/ |
| 18287 | s/[ ]*$/:/ |
| 18288 | s/:\$(srcdir):/:/g |
| 18289 | s/:\${srcdir}:/:/g |
| 18290 | s/:@srcdir@:/:/g |
| 18291 | s/^:*// |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18292 | s/:*$// |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 18293 | x |
| 18294 | s/\(=[ ]*\).*/\1/ |
| 18295 | G |
| 18296 | s/\n// |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18297 | s/^[^=]*=[ ]*$// |
| 18298 | }' |
| 18299 | fi |
| 18300 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18301 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18302 | fi # test -n "$CONFIG_FILES" |
| 18303 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18304 | # Set up the scripts for CONFIG_HEADERS section. |
| 18305 | # No need to generate them if there are no CONFIG_HEADERS. |
| 18306 | # This happens for instance with `./config.status Makefile'. |
| 18307 | if test -n "$CONFIG_HEADERS"; then |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18308 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18309 | BEGIN { |
| 18310 | _ACEOF |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18311 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18312 | # Transform confdefs.h into an awk script `defines.awk', embedded as |
| 18313 | # here-document in config.status, that substitutes the proper values into |
| 18314 | # config.h.in to produce config.h. |
| 18315 | |
| 18316 | # Create a delimiter string that does not exist in confdefs.h, to ease |
| 18317 | # handling of long lines. |
| 18318 | ac_delim='%!_!# ' |
| 18319 | for ac_last_try in false false :; do |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18320 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` |
| 18321 | if test -z "$ac_tt"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18322 | break |
| 18323 | elif $ac_last_try; then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 18324 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18325 | else |
| 18326 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " |
| 18327 | fi |
| 18328 | done |
| 18329 | |
| 18330 | # For the awk script, D is an array of macro values keyed by name, |
| 18331 | # likewise P contains macro parameters if any. Preserve backslash |
| 18332 | # newline sequences. |
| 18333 | |
| 18334 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* |
| 18335 | sed -n ' |
| 18336 | s/.\{148\}/&'"$ac_delim"'/g |
| 18337 | t rset |
| 18338 | :rset |
| 18339 | s/^[ ]*#[ ]*define[ ][ ]*/ / |
| 18340 | t def |
| 18341 | d |
| 18342 | :def |
| 18343 | s/\\$// |
| 18344 | t bsnl |
| 18345 | s/["\\]/\\&/g |
| 18346 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ |
| 18347 | D["\1"]=" \3"/p |
| 18348 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p |
| 18349 | d |
| 18350 | :bsnl |
| 18351 | s/["\\]/\\&/g |
| 18352 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ |
| 18353 | D["\1"]=" \3\\\\\\n"\\/p |
| 18354 | t cont |
| 18355 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p |
| 18356 | t cont |
| 18357 | d |
| 18358 | :cont |
| 18359 | n |
| 18360 | s/.\{148\}/&'"$ac_delim"'/g |
| 18361 | t clear |
| 18362 | :clear |
| 18363 | s/\\$// |
| 18364 | t bsnlc |
| 18365 | s/["\\]/\\&/g; s/^/"/; s/$/"/p |
| 18366 | d |
| 18367 | :bsnlc |
| 18368 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p |
| 18369 | b cont |
| 18370 | ' <confdefs.h | sed ' |
| 18371 | s/'"$ac_delim"'/"\\\ |
| 18372 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 |
| 18373 | |
| 18374 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 18375 | for (key in D) D_is_set[key] = 1 |
| 18376 | FS = "" |
| 18377 | } |
| 18378 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { |
| 18379 | line = \$ 0 |
| 18380 | split(line, arg, " ") |
| 18381 | if (arg[1] == "#") { |
| 18382 | defundef = arg[2] |
| 18383 | mac1 = arg[3] |
| 18384 | } else { |
| 18385 | defundef = substr(arg[1], 2) |
| 18386 | mac1 = arg[2] |
| 18387 | } |
| 18388 | split(mac1, mac2, "(") #) |
| 18389 | macro = mac2[1] |
| 18390 | prefix = substr(line, 1, index(line, defundef) - 1) |
| 18391 | if (D_is_set[macro]) { |
| 18392 | # Preserve the white space surrounding the "#". |
| 18393 | print prefix "define", macro P[macro] D[macro] |
| 18394 | next |
| 18395 | } else { |
| 18396 | # Replace #undef with comments. This is necessary, for example, |
| 18397 | # in the case of _POSIX_SOURCE, which is predefined and required |
| 18398 | # on some systems where configure will not decide to define it. |
| 18399 | if (defundef == "undef") { |
| 18400 | print "/*", prefix defundef, macro, "*/" |
| 18401 | next |
| 18402 | } |
| 18403 | } |
| 18404 | } |
| 18405 | { print } |
| 18406 | _ACAWK |
| 18407 | _ACEOF |
| 18408 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 18409 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18410 | fi # test -n "$CONFIG_HEADERS" |
| 18411 | |
| 18412 | |
| 18413 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " |
| 18414 | shift |
| 18415 | for ac_tag |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18416 | do |
| 18417 | case $ac_tag in |
| 18418 | :[FHLC]) ac_mode=$ac_tag; continue;; |
| 18419 | esac |
| 18420 | case $ac_mode$ac_tag in |
| 18421 | :[FHL]*:*);; |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18422 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18423 | :[FH]-) ac_tag=-:-;; |
| 18424 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; |
| 18425 | esac |
| 18426 | ac_save_IFS=$IFS |
| 18427 | IFS=: |
| 18428 | set x $ac_tag |
| 18429 | IFS=$ac_save_IFS |
| 18430 | shift |
| 18431 | ac_file=$1 |
| 18432 | shift |
| 18433 | |
| 18434 | case $ac_mode in |
| 18435 | :L) ac_source=$1;; |
| 18436 | :[FH]) |
| 18437 | ac_file_inputs= |
| 18438 | for ac_f |
| 18439 | do |
| 18440 | case $ac_f in |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18441 | -) ac_f="$ac_tmp/stdin";; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18442 | *) # Look for the file first in the build tree, then in the source tree |
| 18443 | # (if the path is not absolute). The absolute path cannot be DOS-style, |
| 18444 | # because $ac_f cannot contain `:'. |
| 18445 | test -f "$ac_f" || |
| 18446 | case $ac_f in |
| 18447 | [\\/$]*) false;; |
| 18448 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; |
| 18449 | esac || |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18450 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18451 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18452 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac |
| 18453 | as_fn_append ac_file_inputs " '$ac_f'" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18454 | done |
| 18455 | |
| 18456 | # Let's still pretend it is `configure' which instantiates (i.e., don't |
| 18457 | # use $as_me), people would be surprised to read: |
| 18458 | # /* config.h. Generated by config.status. */ |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18459 | configure_input='Generated from '` |
| 18460 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' |
| 18461 | `' by configure.' |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18462 | if test x"$ac_file" != x-; then |
| 18463 | configure_input="$ac_file. $configure_input" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18464 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 |
| 18465 | $as_echo "$as_me: creating $ac_file" >&6;} |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18466 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18467 | # Neutralize special characters interpreted by sed in replacement strings. |
| 18468 | case $configure_input in #( |
| 18469 | *\&* | *\|* | *\\* ) |
| 18470 | ac_sed_conf_input=`$as_echo "$configure_input" | |
| 18471 | sed 's/[\\\\&|]/\\\\&/g'`;; #( |
| 18472 | *) ac_sed_conf_input=$configure_input;; |
| 18473 | esac |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18474 | |
| 18475 | case $ac_tag in |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18476 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ |
| 18477 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18478 | esac |
| 18479 | ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18480 | esac |
| 18481 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18482 | ac_dir=`$as_dirname -- "$ac_file" || |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18483 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 18484 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
| 18485 | X"$ac_file" : 'X\(//\)$' \| \ |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18486 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18487 | $as_echo X"$ac_file" | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18488 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
| 18489 | s//\1/ |
| 18490 | q |
| 18491 | } |
| 18492 | /^X\(\/\/\)[^/].*/{ |
| 18493 | s//\1/ |
| 18494 | q |
| 18495 | } |
| 18496 | /^X\(\/\/\)$/{ |
| 18497 | s//\1/ |
| 18498 | q |
| 18499 | } |
| 18500 | /^X\(\/\).*/{ |
| 18501 | s//\1/ |
| 18502 | q |
| 18503 | } |
| 18504 | s/.*/./; q'` |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18505 | as_dir="$ac_dir"; as_fn_mkdir_p |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18506 | ac_builddir=. |
| 18507 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18508 | case "$ac_dir" in |
| 18509 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; |
| 18510 | *) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18511 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18512 | # A ".." for each directory in $ac_dir_suffix. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18513 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18514 | case $ac_top_builddir_sub in |
| 18515 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; |
| 18516 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; |
| 18517 | esac ;; |
| 18518 | esac |
| 18519 | ac_abs_top_builddir=$ac_pwd |
| 18520 | ac_abs_builddir=$ac_pwd$ac_dir_suffix |
| 18521 | # for backward compatibility: |
| 18522 | ac_top_builddir=$ac_top_build_prefix |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18523 | |
| 18524 | case $srcdir in |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18525 | .) # We are building in place. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18526 | ac_srcdir=. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18527 | ac_top_srcdir=$ac_top_builddir_sub |
| 18528 | ac_abs_top_srcdir=$ac_pwd ;; |
| 18529 | [\\/]* | ?:[\\/]* ) # Absolute name. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18530 | ac_srcdir=$srcdir$ac_dir_suffix; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18531 | ac_top_srcdir=$srcdir |
| 18532 | ac_abs_top_srcdir=$srcdir ;; |
| 18533 | *) # Relative name. |
| 18534 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix |
| 18535 | ac_top_srcdir=$ac_top_build_prefix$srcdir |
| 18536 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18537 | esac |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18538 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 18539 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18540 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18541 | case $ac_mode in |
| 18542 | :F) |
| 18543 | # |
| 18544 | # CONFIG_FILE |
| 18545 | # |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18546 | |
| 18547 | case $INSTALL in |
| 18548 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18549 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18550 | esac |
Matthias Klose | 93a0ef1 | 2012-03-15 18:08:34 +0100 | [diff] [blame] | 18551 | ac_MKDIR_P=$MKDIR_P |
| 18552 | case $MKDIR_P in |
| 18553 | [\\/$]* | ?:[\\/]* ) ;; |
| 18554 | */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; |
| 18555 | esac |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 18556 | _ACEOF |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18557 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18558 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18559 | # If the template does not know about datarootdir, expand it. |
| 18560 | # FIXME: This hack should be removed a few years after 2.60. |
| 18561 | ac_datarootdir_hack=; ac_datarootdir_seen= |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18562 | ac_sed_dataroot=' |
| 18563 | /datarootdir/ { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18564 | p |
| 18565 | q |
| 18566 | } |
| 18567 | /@datadir@/p |
| 18568 | /@docdir@/p |
| 18569 | /@infodir@/p |
| 18570 | /@localedir@/p |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18571 | /@mandir@/p' |
| 18572 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18573 | *datarootdir*) ac_datarootdir_seen=yes;; |
| 18574 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18575 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 |
| 18576 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18577 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18578 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18579 | ac_datarootdir_hack=' |
| 18580 | s&@datadir@&$datadir&g |
| 18581 | s&@docdir@&$docdir&g |
| 18582 | s&@infodir@&$infodir&g |
| 18583 | s&@localedir@&$localedir&g |
| 18584 | s&@mandir@&$mandir&g |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18585 | s&\\\${datarootdir}&$datarootdir&g' ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18586 | esac |
| 18587 | _ACEOF |
| 18588 | |
| 18589 | # Neutralize VPATH when `$srcdir' = `.'. |
| 18590 | # Shell code in configure.ac might set extrasub. |
| 18591 | # FIXME: do we really want to maintain this feature? |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18592 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 18593 | ac_sed_extra="$ac_vpsub |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18594 | $extrasub |
| 18595 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18596 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18597 | :t |
| 18598 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18599 | s|@configure_input@|$ac_sed_conf_input|;t t |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18600 | s&@top_builddir@&$ac_top_builddir_sub&;t t |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18601 | s&@top_build_prefix@&$ac_top_build_prefix&;t t |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18602 | s&@srcdir@&$ac_srcdir&;t t |
| 18603 | s&@abs_srcdir@&$ac_abs_srcdir&;t t |
| 18604 | s&@top_srcdir@&$ac_top_srcdir&;t t |
| 18605 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t |
| 18606 | s&@builddir@&$ac_builddir&;t t |
| 18607 | s&@abs_builddir@&$ac_abs_builddir&;t t |
| 18608 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t |
| 18609 | s&@INSTALL@&$ac_INSTALL&;t t |
Matthias Klose | 93a0ef1 | 2012-03-15 18:08:34 +0100 | [diff] [blame] | 18610 | s&@MKDIR_P@&$ac_MKDIR_P&;t t |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18611 | $ac_datarootdir_hack |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18612 | " |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18613 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ |
| 18614 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 18615 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18616 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18617 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && |
| 18618 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ |
| 18619 | "$ac_tmp/out"`; test -z "$ac_out"; } && |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18620 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 18621 | which seems to be undefined. Please make sure it is defined" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18622 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 18623 | which seems to be undefined. Please make sure it is defined" >&2;} |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 18624 | |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18625 | rm -f "$ac_tmp/stdin" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18626 | case $ac_file in |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18627 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; |
| 18628 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18629 | esac \ |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 18630 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18631 | ;; |
| 18632 | :H) |
| 18633 | # |
| 18634 | # CONFIG_HEADER |
| 18635 | # |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18636 | if test x"$ac_file" != x-; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18637 | { |
| 18638 | $as_echo "/* $configure_input */" \ |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18639 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" |
| 18640 | } >"$ac_tmp/config.h" \ |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 18641 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18642 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18643 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
| 18644 | $as_echo "$as_me: $ac_file is unchanged" >&6;} |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18645 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18646 | rm -f "$ac_file" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18647 | mv "$ac_tmp/config.h" "$ac_file" \ |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 18648 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18649 | fi |
| 18650 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18651 | $as_echo "/* $configure_input */" \ |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 18652 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 18653 | || as_fn_error $? "could not create -" "$LINENO" 5 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18654 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18655 | ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 18656 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18657 | |
| 18658 | esac |
| 18659 | |
Antoine Pitrou | 8e6b407 | 2010-09-10 19:44:44 +0000 | [diff] [blame] | 18660 | |
| 18661 | case $ac_file$ac_mode in |
| 18662 | "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;; |
| 18663 | |
| 18664 | esac |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 18665 | done # for ac_tag |
| 18666 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 18667 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18668 | as_fn_exit 0 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18669 | _ACEOF |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18670 | ac_clean_files=$ac_clean_files_save |
| 18671 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18672 | test $ac_write_fail = 0 || |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 18673 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18674 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18675 | |
| 18676 | # configure is writing to config.log, and then calls config.status. |
| 18677 | # config.status does its own redirection, appending to config.log. |
| 18678 | # Unfortunately, on DOS this fails, as config.log is still kept open |
| 18679 | # by configure, so config.status won't be able to write to it; its |
| 18680 | # output is simply discarded. So we exec the FD to /dev/null, |
| 18681 | # effectively closing config.log, so it can be properly (re)opened and |
| 18682 | # appended to by config.status. When coming back to configure, we |
| 18683 | # need to make the FD available again. |
| 18684 | if test "$no_create" != yes; then |
| 18685 | ac_cs_success=: |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 18686 | ac_config_status_args= |
| 18687 | test "$silent" = yes && |
| 18688 | ac_config_status_args="$ac_config_status_args --quiet" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18689 | exec 5>/dev/null |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 18690 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18691 | exec 5>>config.log |
| 18692 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which |
| 18693 | # would make configure fail if this is the last instruction. |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 18694 | $ac_cs_success || as_fn_exit 1 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 18695 | fi |
| 18696 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
| 18697 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 |
| 18698 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 18699 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 18700 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 18701 | |
Christian Heimes | 75ed890 | 2013-11-20 01:11:18 +0100 | [diff] [blame] | 18702 | echo "creating Modules/Setup.local" >&6 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 18703 | if test ! -f Modules/Setup.local |
| 18704 | then |
| 18705 | echo "# Edit this file for local setup changes" >Modules/Setup.local |
| 18706 | fi |
| 18707 | |
Christian Heimes | 75ed890 | 2013-11-20 01:11:18 +0100 | [diff] [blame] | 18708 | echo "creating Makefile" >&6 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 18709 | $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ |
Antoine Pitrou | a6a4dc8 | 2017-09-07 18:56:24 +0200 | [diff] [blame] | 18710 | -s Modules \ |
Antoine Pitrou | 961d54c | 2018-07-16 19:03:03 +0200 | [diff] [blame] | 18711 | Modules/Setup.local $srcdir/Modules/Setup |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 18712 | mv config.c Modules |
Brett Cannon | 63d98bc | 2016-09-06 17:12:40 -0700 | [diff] [blame] | 18713 | |
| 18714 | if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then |
| 18715 | echo "" >&6 |
| 18716 | echo "" >&6 |
Brett Cannon | b4e5fee | 2017-06-09 13:56:57 -0700 | [diff] [blame] | 18717 | echo "If you want a release build with all stable optimizations active (PGO, etc)," >&6 |
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 1016b2f | 2016-11-20 21:07:42 +0000 | [diff] [blame] | 18718 | echo "please run ./configure --enable-optimizations" >&6 |
Brett Cannon | 63d98bc | 2016-09-06 17:12:40 -0700 | [diff] [blame] | 18719 | echo "" >&6 |
| 18720 | echo "" >&6 |
| 18721 | fi |
| 18722 | |