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. |
Ned Deily | 4829bc6 | 2016-09-12 17:29:04 -0400 | [diff] [blame] | 3 | # Generated by GNU Autoconf 2.69 for python 3.7. |
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' |
Ned Deily | 4829bc6 | 2016-09-12 17:29:04 -0400 | [diff] [blame] | 583 | PACKAGE_VERSION='3.7' |
| 584 | PACKAGE_STRING='python 3.7' |
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 |
Ned Deily | 322f5ba | 2013-11-21 23:01:59 -0800 | [diff] [blame] | 626 | ENSUREPIP |
Ronald Oussoren | 74f29b4 | 2009-09-20 20:09:26 +0000 | [diff] [blame] | 627 | SRCDIRS |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 628 | THREADHEADERS |
doko@python.org | 8742119 | 2013-01-26 11:39:31 +0100 | [diff] [blame] | 629 | LIBPL |
| 630 | PY_ENABLE_SHARED |
doko@ubuntu.com | d5537d0 | 2013-03-21 13:21:49 -0700 | [diff] [blame] | 631 | EXT_SUFFIX |
Barry Warsaw | 35f3a2c | 2010-09-03 18:30:30 +0000 | [diff] [blame] | 632 | SOABI |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 633 | LIBC |
| 634 | LIBM |
| 635 | HAVE_GETHOSTBYNAME |
| 636 | HAVE_GETHOSTBYNAME_R |
| 637 | HAVE_GETHOSTBYNAME_R_3_ARG |
| 638 | HAVE_GETHOSTBYNAME_R_5_ARG |
| 639 | HAVE_GETHOSTBYNAME_R_6_ARG |
| 640 | LIBOBJS |
| 641 | TRUE |
| 642 | MACHDEP_OBJS |
| 643 | DYNLOADFILE |
| 644 | DLINCLDIR |
Łukasz Langa | a785c87 | 2016-09-09 17:37:37 -0700 | [diff] [blame] | 645 | DTRACE_OBJS |
| 646 | DTRACE_HEADERS |
| 647 | DFLAGS |
| 648 | DTRACE |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 649 | THREADOBJ |
| 650 | LDLAST |
| 651 | USE_THREAD_MODULE |
Ned Deily | d819b93 | 2013-09-06 01:07:05 -0700 | [diff] [blame] | 652 | TCLTK_LIBS |
| 653 | TCLTK_INCLUDES |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 654 | LIBFFI_INCLUDEDIR |
Victor Stinner | 8291b5e | 2015-03-20 16:03:14 +0100 | [diff] [blame] | 655 | PKG_CONFIG_LIBDIR |
| 656 | PKG_CONFIG_PATH |
| 657 | PKG_CONFIG |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 658 | SHLIBS |
| 659 | CFLAGSFORSHARED |
| 660 | LINKFORSHARED |
| 661 | CCSHARED |
| 662 | BLDSHARED |
| 663 | LDCXXSHARED |
| 664 | LDSHARED |
doko@ubuntu.com | d5537d0 | 2013-03-21 13:21:49 -0700 | [diff] [blame] | 665 | SHLIB_SUFFIX |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 666 | LIBTOOL_CRUFT |
| 667 | OTHER_LIBTOOL_OPT |
| 668 | UNIVERSAL_ARCH_FLAGS |
Benjamin Peterson | acb8c52 | 2014-08-09 20:01:49 -0700 | [diff] [blame] | 669 | CFLAGS_NODIST |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 670 | BASECFLAGS |
Victor Stinner | 826f83f | 2017-04-28 15:07:10 +0200 | [diff] [blame] | 671 | CFLAGS_ALIASING |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 672 | OPT |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 673 | LLVM_PROF_FOUND |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 674 | target_os |
| 675 | target_vendor |
| 676 | target_cpu |
| 677 | target |
| 678 | LLVM_PROFDATA |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 679 | LLVM_PROF_ERR |
| 680 | LLVM_PROF_FILE |
| 681 | LLVM_PROF_MERGER |
| 682 | PGO_PROF_USE_FLAG |
| 683 | PGO_PROF_GEN_FLAG |
Gregory P. Smith | d82da9f | 2016-04-15 16:57:04 -0700 | [diff] [blame] | 684 | LTOFLAGS |
Brett Cannon | 63d98bc | 2016-09-06 17:12:40 -0700 | [diff] [blame] | 685 | DEF_MAKE_RULE |
| 686 | DEF_MAKE_ALL_RULE |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 687 | ABIFLAGS |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 688 | LN |
Matthias Klose | 93a0ef1 | 2012-03-15 18:08:34 +0100 | [diff] [blame] | 689 | MKDIR_P |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 690 | INSTALL_DATA |
| 691 | INSTALL_SCRIPT |
| 692 | INSTALL_PROGRAM |
doko@ubuntu.com | 5884449 | 2012-06-30 18:25:32 +0200 | [diff] [blame] | 693 | ac_ct_READELF |
| 694 | READELF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 695 | ARFLAGS |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 696 | ac_ct_AR |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 697 | AR |
| 698 | RANLIB |
| 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 |
| 731 | SGI_ABI |
doko@ubuntu.com | 1abe1c5 | 2012-06-30 20:42:45 +0200 | [diff] [blame] | 732 | _PYTHON_HOST_PLATFORM |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 733 | MACHDEP |
Ronald Oussoren | 86b33c8 | 2010-04-30 11:41:56 +0000 | [diff] [blame] | 734 | FRAMEWORKINSTALLAPPSPREFIX |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 735 | FRAMEWORKUNIXTOOLSPREFIX |
Ned Deily | b8f944f | 2013-11-21 22:42:25 -0800 | [diff] [blame] | 736 | FRAMEWORKPYTHONW |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 737 | FRAMEWORKALTINSTALLLAST |
| 738 | FRAMEWORKALTINSTALLFIRST |
| 739 | FRAMEWORKINSTALLLAST |
| 740 | FRAMEWORKINSTALLFIRST |
| 741 | PYTHONFRAMEWORKINSTALLDIR |
| 742 | PYTHONFRAMEWORKPREFIX |
| 743 | PYTHONFRAMEWORKDIR |
| 744 | PYTHONFRAMEWORKIDENTIFIER |
| 745 | PYTHONFRAMEWORK |
| 746 | LIPO_32BIT_FLAGS |
| 747 | ARCH_RUN_32BIT |
| 748 | UNIVERSALSDK |
| 749 | CONFIG_ARGS |
| 750 | SOVERSION |
| 751 | VERSION |
doko@ubuntu.com | 1abe1c5 | 2012-06-30 20:42:45 +0200 | [diff] [blame] | 752 | PYTHON_FOR_BUILD |
Victor Stinner | a5c62a8 | 2017-05-03 18:21:48 +0200 | [diff] [blame] | 753 | PYTHON_FOR_REGEN |
Matthias Klose | ca2f6ec | 2012-03-15 21:30:11 +0100 | [diff] [blame] | 754 | host_os |
| 755 | host_vendor |
| 756 | host_cpu |
| 757 | host |
| 758 | build_os |
| 759 | build_vendor |
| 760 | build_cpu |
| 761 | build |
Ned Deily | 5c4b0d0 | 2017-03-04 00:19:55 -0500 | [diff] [blame] | 762 | HAS_GIT |
| 763 | GITBRANCH |
| 764 | GITTAG |
| 765 | GITVERSION |
Trent Nelson | 4d4ec65 | 2012-10-16 08:51:24 -0400 | [diff] [blame] | 766 | BASECPPFLAGS |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 767 | target_alias |
| 768 | host_alias |
| 769 | build_alias |
| 770 | LIBS |
| 771 | ECHO_T |
| 772 | ECHO_N |
| 773 | ECHO_C |
| 774 | DEFS |
| 775 | mandir |
| 776 | localedir |
| 777 | libdir |
| 778 | psdir |
| 779 | pdfdir |
| 780 | dvidir |
| 781 | htmldir |
| 782 | infodir |
| 783 | docdir |
| 784 | oldincludedir |
| 785 | includedir |
Benjamin Peterson | e4f961b | 2017-04-14 09:36:45 -0700 | [diff] [blame] | 786 | runstatedir |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 787 | localstatedir |
| 788 | sharedstatedir |
| 789 | sysconfdir |
| 790 | datadir |
| 791 | datarootdir |
| 792 | libexecdir |
| 793 | sbindir |
| 794 | bindir |
| 795 | program_transform_name |
| 796 | prefix |
| 797 | exec_prefix |
| 798 | PACKAGE_URL |
| 799 | PACKAGE_BUGREPORT |
| 800 | PACKAGE_STRING |
| 801 | PACKAGE_VERSION |
| 802 | PACKAGE_TARNAME |
| 803 | PACKAGE_NAME |
| 804 | PATH_SEPARATOR |
| 805 | SHELL' |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 806 | ac_subst_files='' |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 807 | ac_user_opts=' |
| 808 | enable_option_checking |
| 809 | enable_universalsdk |
| 810 | with_universal_archs |
| 811 | with_framework_name |
| 812 | enable_framework |
| 813 | with_gcc |
Zachary Ware | 5af8564 | 2015-12-21 12:09:17 -0600 | [diff] [blame] | 814 | with_icc |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 815 | with_cxx_main |
| 816 | with_suffix |
| 817 | enable_shared |
| 818 | enable_profiling |
| 819 | with_pydebug |
T. Wouters | ddbfa2c | 2017-05-23 01:30:49 +0200 | [diff] [blame] | 820 | with_assertions |
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 1016b2f | 2016-11-20 21:07:42 +0000 | [diff] [blame] | 821 | enable_optimizations |
Gregory P. Smith | d82da9f | 2016-04-15 16:57:04 -0700 | [diff] [blame] | 822 | with_lto |
Christian Heimes | 985ecdc | 2013-11-20 11:46:18 +0100 | [diff] [blame] | 823 | with_hash_algorithm |
Charles-François Natali | d30b022 | 2014-05-08 23:08:51 +0100 | [diff] [blame] | 824 | with_address_sanitizer |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 825 | with_libs |
| 826 | with_system_expat |
| 827 | with_system_ffi |
Stefan Krah | 60187b5 | 2012-03-23 19:06:27 +0100 | [diff] [blame] | 828 | with_system_libmpdec |
Benjamin Peterson | 076ed00 | 2010-10-31 17:11:02 +0000 | [diff] [blame] | 829 | enable_loadable_sqlite_extensions |
Ned Deily | d819b93 | 2013-09-06 01:07:05 -0700 | [diff] [blame] | 830 | with_tcltk_includes |
| 831 | with_tcltk_libs |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 832 | with_dbmliborder |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 833 | with_threads |
| 834 | with_thread |
| 835 | enable_ipv6 |
| 836 | with_doc_strings |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 837 | with_pymalloc |
| 838 | with_valgrind |
Łukasz Langa | a785c87 | 2016-09-09 17:37:37 -0700 | [diff] [blame] | 839 | with_dtrace |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 840 | with_fpectl |
| 841 | with_libm |
| 842 | with_libc |
| 843 | enable_big_digits |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 844 | with_computed_gotos |
Ned Deily | 322f5ba | 2013-11-21 23:01:59 -0800 | [diff] [blame] | 845 | with_ensurepip |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 846 | ' |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 847 | ac_precious_vars='build_alias |
| 848 | host_alias |
| 849 | target_alias |
doko@python.org | eab42bf | 2013-01-26 18:57:19 +0100 | [diff] [blame] | 850 | MACHDEP |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 851 | CC |
| 852 | CFLAGS |
| 853 | LDFLAGS |
| 854 | LIBS |
| 855 | CPPFLAGS |
Victor Stinner | 8291b5e | 2015-03-20 16:03:14 +0100 | [diff] [blame] | 856 | CPP |
| 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' |
Benjamin Peterson | e4f961b | 2017-04-14 09:36:45 -0700 | [diff] [blame] | 898 | runstatedir='${localstatedir}/run' |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 899 | includedir='${prefix}/include' |
| 900 | oldincludedir='/usr/include' |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 901 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' |
| 902 | infodir='${datarootdir}/info' |
| 903 | htmldir='${docdir}' |
| 904 | dvidir='${docdir}' |
| 905 | pdfdir='${docdir}' |
| 906 | psdir='${docdir}' |
| 907 | libdir='${exec_prefix}/lib' |
| 908 | localedir='${datarootdir}/locale' |
| 909 | mandir='${datarootdir}/man' |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 910 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 911 | ac_prev= |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 912 | ac_dashdash= |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 913 | for ac_option |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 914 | do |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 915 | # If the previous option needs an argument, assign it. |
| 916 | if test -n "$ac_prev"; then |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 917 | eval $ac_prev=\$ac_option |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 918 | ac_prev= |
| 919 | continue |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 920 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 921 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 922 | case $ac_option in |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 923 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
| 924 | *=) ac_optarg= ;; |
| 925 | *) ac_optarg=yes ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 926 | esac |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 927 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 928 | # Accept the important Cygnus configure options, so we can diagnose typos. |
| 929 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 930 | case $ac_dashdash$ac_option in |
| 931 | --) |
| 932 | ac_dashdash=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 933 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 934 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
| 935 | ac_prev=bindir ;; |
| 936 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 937 | bindir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 938 | |
| 939 | -build | --build | --buil | --bui | --bu) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 940 | ac_prev=build_alias ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 941 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 942 | build_alias=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 943 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 944 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
| 945 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) |
| 946 | ac_prev=cache_file ;; |
| 947 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ |
| 948 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 949 | cache_file=$ac_optarg ;; |
| 950 | |
| 951 | --config-cache | -C) |
| 952 | cache_file=config.cache ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 953 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 954 | -datadir | --datadir | --datadi | --datad) |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 955 | ac_prev=datadir ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 956 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 957 | datadir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 958 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 959 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
| 960 | | --dataroo | --dataro | --datar) |
| 961 | ac_prev=datarootdir ;; |
| 962 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ |
| 963 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) |
| 964 | datarootdir=$ac_optarg ;; |
| 965 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 966 | -disable-* | --disable-*) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 967 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 968 | # Reject names that are not valid shell variable names. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 969 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 970 | as_fn_error $? "invalid feature name: $ac_useropt" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 971 | ac_useropt_orig=$ac_useropt |
| 972 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` |
| 973 | case $ac_user_opts in |
| 974 | *" |
| 975 | "enable_$ac_useropt" |
| 976 | "*) ;; |
| 977 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" |
| 978 | ac_unrecognized_sep=', ';; |
| 979 | esac |
| 980 | eval enable_$ac_useropt=no ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 981 | |
| 982 | -docdir | --docdir | --docdi | --doc | --do) |
| 983 | ac_prev=docdir ;; |
| 984 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) |
| 985 | docdir=$ac_optarg ;; |
| 986 | |
| 987 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) |
| 988 | ac_prev=dvidir ;; |
| 989 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) |
| 990 | dvidir=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 991 | |
| 992 | -enable-* | --enable-*) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 993 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 994 | # Reject names that are not valid shell variable names. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 995 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 996 | as_fn_error $? "invalid feature name: $ac_useropt" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 997 | ac_useropt_orig=$ac_useropt |
| 998 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` |
| 999 | case $ac_user_opts in |
| 1000 | *" |
| 1001 | "enable_$ac_useropt" |
| 1002 | "*) ;; |
| 1003 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" |
| 1004 | ac_unrecognized_sep=', ';; |
| 1005 | esac |
| 1006 | eval enable_$ac_useropt=\$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1007 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1008 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ |
| 1009 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ |
| 1010 | | --exec | --exe | --ex) |
| 1011 | ac_prev=exec_prefix ;; |
| 1012 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ |
| 1013 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ |
| 1014 | | --exec=* | --exe=* | --ex=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1015 | exec_prefix=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1016 | |
| 1017 | -gas | --gas | --ga | --g) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1018 | # Obsolete; use --with-gas. |
| 1019 | with_gas=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1020 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1021 | -help | --help | --hel | --he | -h) |
| 1022 | ac_init_help=long ;; |
| 1023 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) |
| 1024 | ac_init_help=recursive ;; |
| 1025 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) |
| 1026 | ac_init_help=short ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1027 | |
| 1028 | -host | --host | --hos | --ho) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1029 | ac_prev=host_alias ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1030 | -host=* | --host=* | --hos=* | --ho=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1031 | host_alias=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1032 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1033 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
| 1034 | ac_prev=htmldir ;; |
| 1035 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ |
| 1036 | | --ht=*) |
| 1037 | htmldir=$ac_optarg ;; |
| 1038 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1039 | -includedir | --includedir | --includedi | --included | --include \ |
| 1040 | | --includ | --inclu | --incl | --inc) |
| 1041 | ac_prev=includedir ;; |
| 1042 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ |
| 1043 | | --includ=* | --inclu=* | --incl=* | --inc=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1044 | includedir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1045 | |
| 1046 | -infodir | --infodir | --infodi | --infod | --info | --inf) |
| 1047 | ac_prev=infodir ;; |
| 1048 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1049 | infodir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1050 | |
| 1051 | -libdir | --libdir | --libdi | --libd) |
| 1052 | ac_prev=libdir ;; |
| 1053 | -libdir=* | --libdir=* | --libdi=* | --libd=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1054 | libdir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1055 | |
| 1056 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ |
| 1057 | | --libexe | --libex | --libe) |
| 1058 | ac_prev=libexecdir ;; |
| 1059 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ |
| 1060 | | --libexe=* | --libex=* | --libe=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1061 | libexecdir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1062 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1063 | -localedir | --localedir | --localedi | --localed | --locale) |
| 1064 | ac_prev=localedir ;; |
| 1065 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) |
| 1066 | localedir=$ac_optarg ;; |
| 1067 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1068 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1069 | | --localstate | --localstat | --localsta | --localst | --locals) |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1070 | ac_prev=localstatedir ;; |
| 1071 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1072 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1073 | localstatedir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1074 | |
| 1075 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) |
| 1076 | ac_prev=mandir ;; |
| 1077 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1078 | mandir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1079 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1080 | -nfp | --nfp | --nf) |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1081 | # Obsolete; use --without-fp. |
| 1082 | with_fp=no ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1083 | |
| 1084 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1085 | | --no-cr | --no-c | -n) |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1086 | no_create=yes ;; |
| 1087 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1088 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| 1089 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) |
| 1090 | no_recursion=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1091 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1092 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
| 1093 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ |
| 1094 | | --oldin | --oldi | --old | --ol | --o) |
| 1095 | ac_prev=oldincludedir ;; |
| 1096 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ |
| 1097 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ |
| 1098 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1099 | oldincludedir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1100 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1101 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
| 1102 | ac_prev=prefix ;; |
| 1103 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1104 | prefix=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1105 | |
| 1106 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ |
| 1107 | | --program-pre | --program-pr | --program-p) |
| 1108 | ac_prev=program_prefix ;; |
| 1109 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ |
| 1110 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1111 | program_prefix=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1112 | |
| 1113 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ |
| 1114 | | --program-suf | --program-su | --program-s) |
| 1115 | ac_prev=program_suffix ;; |
| 1116 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ |
| 1117 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1118 | program_suffix=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1119 | |
| 1120 | -program-transform-name | --program-transform-name \ |
| 1121 | | --program-transform-nam | --program-transform-na \ |
| 1122 | | --program-transform-n | --program-transform- \ |
| 1123 | | --program-transform | --program-transfor \ |
| 1124 | | --program-transfo | --program-transf \ |
| 1125 | | --program-trans | --program-tran \ |
| 1126 | | --progr-tra | --program-tr | --program-t) |
| 1127 | ac_prev=program_transform_name ;; |
| 1128 | -program-transform-name=* | --program-transform-name=* \ |
| 1129 | | --program-transform-nam=* | --program-transform-na=* \ |
| 1130 | | --program-transform-n=* | --program-transform-=* \ |
| 1131 | | --program-transform=* | --program-transfor=* \ |
| 1132 | | --program-transfo=* | --program-transf=* \ |
| 1133 | | --program-trans=* | --program-tran=* \ |
| 1134 | | --progr-tra=* | --program-tr=* | --program-t=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1135 | program_transform_name=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1136 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1137 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
| 1138 | ac_prev=pdfdir ;; |
| 1139 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) |
| 1140 | pdfdir=$ac_optarg ;; |
| 1141 | |
| 1142 | -psdir | --psdir | --psdi | --psd | --ps) |
| 1143 | ac_prev=psdir ;; |
| 1144 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) |
| 1145 | psdir=$ac_optarg ;; |
| 1146 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1147 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| 1148 | | -silent | --silent | --silen | --sile | --sil) |
| 1149 | silent=yes ;; |
| 1150 | |
Benjamin Peterson | e4f961b | 2017-04-14 09:36:45 -0700 | [diff] [blame] | 1151 | -runstatedir | --runstatedir | --runstatedi | --runstated \ |
| 1152 | | --runstate | --runstat | --runsta | --runst | --runs \ |
| 1153 | | --run | --ru | --r) |
| 1154 | ac_prev=runstatedir ;; |
| 1155 | -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ |
| 1156 | | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ |
| 1157 | | --run=* | --ru=* | --r=*) |
| 1158 | runstatedir=$ac_optarg ;; |
| 1159 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1160 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
| 1161 | ac_prev=sbindir ;; |
| 1162 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ |
| 1163 | | --sbi=* | --sb=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1164 | sbindir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1165 | |
| 1166 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ |
| 1167 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ |
| 1168 | | --sharedst | --shareds | --shared | --share | --shar \ |
| 1169 | | --sha | --sh) |
| 1170 | ac_prev=sharedstatedir ;; |
| 1171 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ |
| 1172 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ |
| 1173 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ |
| 1174 | | --sha=* | --sh=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1175 | sharedstatedir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1176 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1177 | -site | --site | --sit) |
| 1178 | ac_prev=site ;; |
| 1179 | -site=* | --site=* | --sit=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1180 | site=$ac_optarg ;; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1181 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1182 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
| 1183 | ac_prev=srcdir ;; |
| 1184 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1185 | srcdir=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1186 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1187 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
| 1188 | | --syscon | --sysco | --sysc | --sys | --sy) |
| 1189 | ac_prev=sysconfdir ;; |
| 1190 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ |
| 1191 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1192 | sysconfdir=$ac_optarg ;; |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1193 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1194 | -target | --target | --targe | --targ | --tar | --ta | --t) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1195 | ac_prev=target_alias ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1196 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1197 | target_alias=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1198 | |
| 1199 | -v | -verbose | --verbose | --verbos | --verbo | --verb) |
| 1200 | verbose=yes ;; |
| 1201 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1202 | -version | --version | --versio | --versi | --vers | -V) |
| 1203 | ac_init_version=: ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1204 | |
| 1205 | -with-* | --with-*) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1206 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1207 | # Reject names that are not valid shell variable names. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1208 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1209 | as_fn_error $? "invalid package name: $ac_useropt" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1210 | ac_useropt_orig=$ac_useropt |
| 1211 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` |
| 1212 | case $ac_user_opts in |
| 1213 | *" |
| 1214 | "with_$ac_useropt" |
| 1215 | "*) ;; |
| 1216 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" |
| 1217 | ac_unrecognized_sep=', ';; |
| 1218 | esac |
| 1219 | eval with_$ac_useropt=\$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1220 | |
| 1221 | -without-* | --without-*) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1222 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1223 | # Reject names that are not valid shell variable names. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1224 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1225 | as_fn_error $? "invalid package name: $ac_useropt" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1226 | ac_useropt_orig=$ac_useropt |
| 1227 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` |
| 1228 | case $ac_user_opts in |
| 1229 | *" |
| 1230 | "with_$ac_useropt" |
| 1231 | "*) ;; |
| 1232 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" |
| 1233 | ac_unrecognized_sep=', ';; |
| 1234 | esac |
| 1235 | eval with_$ac_useropt=no ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1236 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1237 | --x) |
| 1238 | # Obsolete; use --with-x. |
| 1239 | with_x=yes ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1240 | |
| 1241 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ |
| 1242 | | --x-incl | --x-inc | --x-in | --x-i) |
| 1243 | ac_prev=x_includes ;; |
| 1244 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ |
| 1245 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1246 | x_includes=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1247 | |
| 1248 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ |
| 1249 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) |
| 1250 | ac_prev=x_libraries ;; |
| 1251 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ |
| 1252 | | --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] | 1253 | x_libraries=$ac_optarg ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1254 | |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1255 | -*) as_fn_error $? "unrecognized option: \`$ac_option' |
| 1256 | Try \`$0 --help' for more information" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1257 | ;; |
| 1258 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1259 | *=*) |
| 1260 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` |
| 1261 | # Reject names that are not valid shell variable names. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1262 | case $ac_envvar in #( |
| 1263 | '' | [0-9]* | *[!_$as_cr_alnum]* ) |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1264 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1265 | esac |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1266 | eval $ac_envvar=\$ac_optarg |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1267 | export $ac_envvar ;; |
| 1268 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 1269 | *) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1270 | # FIXME: should be removed in autoconf 3.0. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1271 | $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] | 1272 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1273 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 1274 | : "${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] | 1275 | ;; |
| 1276 | |
| 1277 | esac |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1278 | done |
| 1279 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1280 | if test -n "$ac_prev"; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1281 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1282 | as_fn_error $? "missing argument to $ac_option" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1283 | fi |
| 1284 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1285 | if test -n "$ac_unrecognized_opts"; then |
| 1286 | case $enable_option_checking in |
| 1287 | no) ;; |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1288 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1289 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
| 1290 | esac |
| 1291 | fi |
| 1292 | |
| 1293 | # Check all directory arguments for consistency. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1294 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ |
| 1295 | datadir sysconfdir sharedstatedir localstatedir includedir \ |
| 1296 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ |
Benjamin Peterson | e4f961b | 2017-04-14 09:36:45 -0700 | [diff] [blame] | 1297 | libdir localedir mandir runstatedir |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1298 | do |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1299 | eval ac_val=\$$ac_var |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1300 | # Remove trailing slashes. |
| 1301 | case $ac_val in |
| 1302 | */ ) |
| 1303 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` |
| 1304 | eval $ac_var=\$ac_val;; |
| 1305 | esac |
| 1306 | # Be sure to have absolute directory names. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1307 | case $ac_val in |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1308 | [\\/$]* | ?:[\\/]* ) continue;; |
| 1309 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1310 | esac |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1311 | 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] | 1312 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1313 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1314 | # There might be people who depend on the old broken behavior: `$host' |
| 1315 | # used to hold the argument of --host etc. |
| 1316 | # FIXME: To remove some day. |
| 1317 | build=$build_alias |
| 1318 | host=$host_alias |
| 1319 | target=$target_alias |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1320 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1321 | # FIXME: To remove some day. |
| 1322 | if test "x$host_alias" != x; then |
| 1323 | if test "x$build_alias" = x; then |
| 1324 | cross_compiling=maybe |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1325 | elif test "x$build_alias" != "x$host_alias"; then |
| 1326 | cross_compiling=yes |
| 1327 | fi |
| 1328 | fi |
| 1329 | |
| 1330 | ac_tool_prefix= |
| 1331 | test -n "$host_alias" && ac_tool_prefix=$host_alias- |
| 1332 | |
| 1333 | test "$silent" = yes && exec 6>/dev/null |
| 1334 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1335 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1336 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
| 1337 | ac_ls_di=`ls -di .` && |
| 1338 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1339 | as_fn_error $? "working directory cannot be determined" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1340 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1341 | as_fn_error $? "pwd does not report name of working directory" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1342 | |
| 1343 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1344 | # Find the source files, if location was not specified. |
| 1345 | if test -z "$srcdir"; then |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1346 | ac_srcdir_defaulted=yes |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1347 | # Try the directory containing this script, then the parent directory. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1348 | ac_confdir=`$as_dirname -- "$as_myself" || |
| 1349 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
| 1350 | X"$as_myself" : 'X\(//\)[^/]' \| \ |
| 1351 | X"$as_myself" : 'X\(//\)$' \| \ |
| 1352 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || |
| 1353 | $as_echo X"$as_myself" | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1354 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
| 1355 | s//\1/ |
| 1356 | q |
| 1357 | } |
| 1358 | /^X\(\/\/\)[^/].*/{ |
| 1359 | s//\1/ |
| 1360 | q |
| 1361 | } |
| 1362 | /^X\(\/\/\)$/{ |
| 1363 | s//\1/ |
| 1364 | q |
| 1365 | } |
| 1366 | /^X\(\/\).*/{ |
| 1367 | s//\1/ |
| 1368 | q |
| 1369 | } |
| 1370 | s/.*/./; q'` |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 1371 | srcdir=$ac_confdir |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1372 | if test ! -r "$srcdir/$ac_unique_file"; then |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1373 | srcdir=.. |
| 1374 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1375 | else |
| 1376 | ac_srcdir_defaulted=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 1377 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1378 | if test ! -r "$srcdir/$ac_unique_file"; then |
| 1379 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1380 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 1381 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1382 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" |
| 1383 | ac_abs_confdir=`( |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1384 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1385 | pwd)` |
| 1386 | # When building in place, set srcdir=. |
| 1387 | if test "$ac_abs_confdir" = "$ac_pwd"; then |
| 1388 | srcdir=. |
| 1389 | fi |
| 1390 | # Remove unnecessary trailing slashes from srcdir. |
| 1391 | # Double slashes in file names in object file debugging info |
| 1392 | # mess up M-x gdb in Emacs. |
| 1393 | case $srcdir in |
| 1394 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; |
| 1395 | esac |
| 1396 | for ac_var in $ac_precious_vars; do |
| 1397 | eval ac_env_${ac_var}_set=\${${ac_var}+set} |
| 1398 | eval ac_env_${ac_var}_value=\$${ac_var} |
| 1399 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} |
| 1400 | eval ac_cv_env_${ac_var}_value=\$${ac_var} |
| 1401 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 1402 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1403 | # |
| 1404 | # Report the --help message. |
| 1405 | # |
| 1406 | if test "$ac_init_help" = "long"; then |
| 1407 | # Omit some internal or obsolete options to make the list less imposing. |
| 1408 | # This message is too long to be a string in the A/UX 3.1 sh. |
| 1409 | cat <<_ACEOF |
Ned Deily | 4829bc6 | 2016-09-12 17:29:04 -0400 | [diff] [blame] | 1410 | \`configure' configures python 3.7 to adapt to many kinds of systems. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1411 | |
| 1412 | Usage: $0 [OPTION]... [VAR=VALUE]... |
| 1413 | |
| 1414 | To assign environment variables (e.g., CC, CFLAGS...), specify them as |
| 1415 | VAR=VALUE. See below for descriptions of some of the useful variables. |
| 1416 | |
| 1417 | Defaults for the options are specified in brackets. |
| 1418 | |
| 1419 | Configuration: |
| 1420 | -h, --help display this help and exit |
| 1421 | --help=short display options specific to this package |
| 1422 | --help=recursive display the short help of all the included packages |
| 1423 | -V, --version display version information and exit |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1424 | -q, --quiet, --silent do not print \`checking ...' messages |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1425 | --cache-file=FILE cache test results in FILE [disabled] |
| 1426 | -C, --config-cache alias for \`--cache-file=config.cache' |
| 1427 | -n, --no-create do not create output files |
| 1428 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] |
| 1429 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1430 | Installation directories: |
| 1431 | --prefix=PREFIX install architecture-independent files in PREFIX |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1432 | [$ac_default_prefix] |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1433 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1434 | [PREFIX] |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1435 | |
| 1436 | By default, \`make install' will install all the files in |
| 1437 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify |
| 1438 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', |
| 1439 | for instance \`--prefix=\$HOME'. |
| 1440 | |
| 1441 | For better control, use the options below. |
| 1442 | |
| 1443 | Fine tuning of the installation directories: |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1444 | --bindir=DIR user executables [EPREFIX/bin] |
| 1445 | --sbindir=DIR system admin executables [EPREFIX/sbin] |
| 1446 | --libexecdir=DIR program executables [EPREFIX/libexec] |
| 1447 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] |
| 1448 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] |
| 1449 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] |
Benjamin Peterson | e4f961b | 2017-04-14 09:36:45 -0700 | [diff] [blame] | 1450 | --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1451 | --libdir=DIR object code libraries [EPREFIX/lib] |
| 1452 | --includedir=DIR C header files [PREFIX/include] |
| 1453 | --oldincludedir=DIR C header files for non-gcc [/usr/include] |
| 1454 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] |
| 1455 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] |
| 1456 | --infodir=DIR info documentation [DATAROOTDIR/info] |
| 1457 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] |
| 1458 | --mandir=DIR man documentation [DATAROOTDIR/man] |
| 1459 | --docdir=DIR documentation root [DATAROOTDIR/doc/python] |
| 1460 | --htmldir=DIR html documentation [DOCDIR] |
| 1461 | --dvidir=DIR dvi documentation [DOCDIR] |
| 1462 | --pdfdir=DIR pdf documentation [DOCDIR] |
| 1463 | --psdir=DIR ps documentation [DOCDIR] |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1464 | _ACEOF |
| 1465 | |
| 1466 | cat <<\_ACEOF |
Matthias Klose | ca2f6ec | 2012-03-15 21:30:11 +0100 | [diff] [blame] | 1467 | |
| 1468 | System types: |
| 1469 | --build=BUILD configure for building on BUILD [guessed] |
| 1470 | --host=HOST cross-compile to build programs to run on HOST [BUILD] |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 1471 | --target=TARGET configure for building compilers for TARGET [HOST] |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1472 | _ACEOF |
| 1473 | fi |
| 1474 | |
| 1475 | if test -n "$ac_init_help"; then |
Martin v. Löwis | 88afe66 | 2002-10-26 13:47:44 +0000 | [diff] [blame] | 1476 | case $ac_init_help in |
Ned Deily | 4829bc6 | 2016-09-12 17:29:04 -0400 | [diff] [blame] | 1477 | short | recursive ) echo "Configuration of python 3.7:";; |
Martin v. Löwis | 88afe66 | 2002-10-26 13:47:44 +0000 | [diff] [blame] | 1478 | esac |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1479 | cat <<\_ACEOF |
| 1480 | |
| 1481 | Optional Features: |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1482 | --disable-option-checking ignore unrecognized --enable/--with options |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1483 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
| 1484 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] |
Christian Heimes | 68f5fbe | 2008-02-14 08:27:37 +0000 | [diff] [blame] | 1485 | --enable-universalsdk[=SDKDIR] |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 1486 | Build fat binary against Mac OS X SDK |
Martin v. Löwis | 3e2c632 | 2002-10-29 10:07:43 +0000 | [diff] [blame] | 1487 | --enable-framework[=INSTALLDIR] |
| 1488 | Build (MacOSX|Darwin) framework |
| 1489 | --enable-shared disable/enable building shared python library |
Skip Montanaro | 56f6a4f | 2004-06-18 02:47:22 +0000 | [diff] [blame] | 1490 | --enable-profiling enable C-level code profiling |
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 164eea5 | 2016-11-20 21:13:16 +0000 | [diff] [blame] | 1491 | --enable-optimizations Enable expensive optimizations (PGO, etc). Disabled |
| 1492 | by default. |
Benjamin Peterson | 076ed00 | 2010-10-31 17:11:02 +0000 | [diff] [blame] | 1493 | --enable-loadable-sqlite-extensions |
| 1494 | support loadable extensions in _sqlite module |
Martin v. Löwis | 3e2c632 | 2002-10-29 10:07:43 +0000 | [diff] [blame] | 1495 | --enable-ipv6 Enable ipv6 (with ipv4) support |
| 1496 | --disable-ipv6 Disable ipv6 support |
Mark Dickinson | bd79264 | 2009-03-18 20:06:12 +0000 | [diff] [blame] | 1497 | --enable-big-digits[=BITS] |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1498 | use big digits for Python longs [[BITS=30]] |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1499 | |
| 1500 | Optional Packages: |
| 1501 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
| 1502 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
Benjamin Peterson | 14ae959 | 2008-07-16 02:20:15 +0000 | [diff] [blame] | 1503 | --with-universal-archs=ARCH |
| 1504 | select architectures for universal build ("32-bit", |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 1505 | "64-bit", "3-way", "intel", "intel-32", or "all") |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 1506 | --with-framework-name=FRAMEWORK |
| 1507 | specify an alternate name of the framework built |
| 1508 | with --enable-framework |
Martin v. Löwis | 3e2c632 | 2002-10-29 10:07:43 +0000 | [diff] [blame] | 1509 | --without-gcc never use gcc |
Zachary Ware | 5af8564 | 2015-12-21 12:09:17 -0600 | [diff] [blame] | 1510 | --with-icc build with icc |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 1511 | --with-cxx-main=<compiler> |
| 1512 | compile main() and link python executable with C++ |
| 1513 | compiler |
Martin v. Löwis | 3e2c632 | 2002-10-29 10:07:43 +0000 | [diff] [blame] | 1514 | --with-suffix=.exe set executable suffix |
| 1515 | --with-pydebug build with Py_DEBUG defined |
T. Wouters | ddbfa2c | 2017-05-23 01:30:49 +0200 | [diff] [blame] | 1516 | --with-assertions build with C assertions enabled |
Gregory P. Smith | d82da9f | 2016-04-15 16:57:04 -0700 | [diff] [blame] | 1517 | --with-lto Enable Link Time Optimization in PGO builds. |
| 1518 | Disabled by default. |
Christian Heimes | 985ecdc | 2013-11-20 11:46:18 +0100 | [diff] [blame] | 1519 | --with-hash-algorithm=[fnv|siphash24] |
| 1520 | select hash algorithm |
Charles-François Natali | d30b022 | 2014-05-08 23:08:51 +0100 | [diff] [blame] | 1521 | --with-address-sanitizer |
| 1522 | enable AddressSanitizer |
Martin v. Löwis | 3e2c632 | 2002-10-29 10:07:43 +0000 | [diff] [blame] | 1523 | --with-libs='lib1 ...' link against additional libs |
Benjamin Peterson | b2d9046 | 2009-12-31 03:23:10 +0000 | [diff] [blame] | 1524 | --with-system-expat build pyexpat module using an installed expat |
| 1525 | library |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 1526 | --with-system-ffi build _ctypes module using an installed ffi library |
Stefan Krah | 60187b5 | 2012-03-23 19:06:27 +0100 | [diff] [blame] | 1527 | --with-system-libmpdec build _decimal module using an installed libmpdec |
| 1528 | library |
Ned Deily | d819b93 | 2013-09-06 01:07:05 -0700 | [diff] [blame] | 1529 | --with-tcltk-includes='-I...' |
| 1530 | override search for Tcl and Tk include files |
| 1531 | --with-tcltk-libs='-L...' |
| 1532 | override search for Tcl and Tk libs |
Matthias Klose | 55708cc | 2009-04-30 08:06:49 +0000 | [diff] [blame] | 1533 | --with-dbmliborder=db1:db2:... |
| 1534 | order to check db backends for dbm. Valid value is a |
| 1535 | colon separated string with the backend names |
| 1536 | `ndbm', `gdbm' and `bdb'. |
Martin v. Löwis | 3e2c632 | 2002-10-29 10:07:43 +0000 | [diff] [blame] | 1537 | --with(out)-threads[=DIRECTORY] |
| 1538 | disable/enable thread support |
| 1539 | --with(out)-thread[=DIRECTORY] |
| 1540 | deprecated; use --with(out)-threads |
Martin v. Löwis | 3e2c632 | 2002-10-29 10:07:43 +0000 | [diff] [blame] | 1541 | --with(out)-doc-strings disable/enable documentation strings |
| 1542 | --with(out)-pymalloc disable/enable specialized mallocs |
Benjamin Peterson | 05159c4 | 2009-12-03 03:01:27 +0000 | [diff] [blame] | 1543 | --with-valgrind Enable Valgrind support |
Łukasz Langa | a785c87 | 2016-09-09 17:37:37 -0700 | [diff] [blame] | 1544 | --with(out)-dtrace disable/enable DTrace support |
Martin v. Löwis | 3e2c632 | 2002-10-29 10:07:43 +0000 | [diff] [blame] | 1545 | --with-fpectl enable SIGFPE catching |
| 1546 | --with-libm=STRING math library |
| 1547 | --with-libc=STRING C library |
Antoine Pitrou | 042b128 | 2010-08-13 21:15:58 +0000 | [diff] [blame] | 1548 | --with(out)-computed-gotos |
| 1549 | Use computed gotos in evaluation loop (enabled by |
| 1550 | default on supported compilers) |
Ned Deily | 322f5ba | 2013-11-21 23:01:59 -0800 | [diff] [blame] | 1551 | --with(out)-ensurepip=[=upgrade] |
| 1552 | "install" or "upgrade" using bundled pip |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1553 | |
| 1554 | Some influential environment variables: |
doko@python.org | eab42bf | 2013-01-26 18:57:19 +0100 | [diff] [blame] | 1555 | MACHDEP name for machine-dependent library files |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1556 | CC C compiler command |
| 1557 | CFLAGS C compiler flags |
| 1558 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a |
| 1559 | nonstandard directory <lib dir> |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1560 | LIBS libraries to pass to the linker, e.g. -l<library> |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1561 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1562 | you have headers in a nonstandard directory <include dir> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1563 | CPP C preprocessor |
Victor Stinner | 8291b5e | 2015-03-20 16:03:14 +0100 | [diff] [blame] | 1564 | PKG_CONFIG path to pkg-config utility |
| 1565 | PKG_CONFIG_PATH |
| 1566 | directories to add to pkg-config's search path |
| 1567 | PKG_CONFIG_LIBDIR |
| 1568 | path overriding pkg-config's built-in search path |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1569 | |
| 1570 | Use these variables to override the choices made by `configure' or to help |
| 1571 | it to find libraries and programs with nonstandard names/locations. |
| 1572 | |
Benjamin Peterson | c2fcbf4 | 2016-08-03 22:01:32 -0700 | [diff] [blame] | 1573 | Report bugs to <https://bugs.python.org/>. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1574 | _ACEOF |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1575 | ac_status=$? |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1576 | fi |
| 1577 | |
| 1578 | if test "$ac_init_help" = "recursive"; then |
| 1579 | # If there are subdirs, report their specific --help. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1580 | 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] | 1581 | test -d "$ac_dir" || |
| 1582 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || |
| 1583 | continue |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1584 | ac_builddir=. |
| 1585 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1586 | case "$ac_dir" in |
| 1587 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; |
| 1588 | *) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1589 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1590 | # A ".." for each directory in $ac_dir_suffix. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1591 | 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] | 1592 | case $ac_top_builddir_sub in |
| 1593 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; |
| 1594 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; |
| 1595 | esac ;; |
| 1596 | esac |
| 1597 | ac_abs_top_builddir=$ac_pwd |
| 1598 | ac_abs_builddir=$ac_pwd$ac_dir_suffix |
| 1599 | # for backward compatibility: |
| 1600 | ac_top_builddir=$ac_top_build_prefix |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1601 | |
| 1602 | case $srcdir in |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1603 | .) # We are building in place. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1604 | ac_srcdir=. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1605 | ac_top_srcdir=$ac_top_builddir_sub |
| 1606 | ac_abs_top_srcdir=$ac_pwd ;; |
| 1607 | [\\/]* | ?:[\\/]* ) # Absolute name. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1608 | ac_srcdir=$srcdir$ac_dir_suffix; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1609 | ac_top_srcdir=$srcdir |
| 1610 | ac_abs_top_srcdir=$srcdir ;; |
| 1611 | *) # Relative name. |
| 1612 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix |
| 1613 | ac_top_srcdir=$ac_top_build_prefix$srcdir |
| 1614 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1615 | esac |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1616 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 1617 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1618 | cd "$ac_dir" || { ac_status=$?; continue; } |
| 1619 | # Check for guested configure. |
| 1620 | if test -f "$ac_srcdir/configure.gnu"; then |
| 1621 | echo && |
| 1622 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive |
| 1623 | elif test -f "$ac_srcdir/configure"; then |
| 1624 | echo && |
| 1625 | $SHELL "$ac_srcdir/configure" --help=recursive |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1626 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1627 | $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] | 1628 | fi || ac_status=$? |
| 1629 | cd "$ac_pwd" || { ac_status=$?; break; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1630 | done |
| 1631 | fi |
| 1632 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1633 | test -n "$ac_init_help" && exit $ac_status |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1634 | if $ac_init_version; then |
| 1635 | cat <<\_ACEOF |
Ned Deily | 4829bc6 | 2016-09-12 17:29:04 -0400 | [diff] [blame] | 1636 | python configure 3.7 |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 1637 | generated by GNU Autoconf 2.69 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1638 | |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 1639 | Copyright (C) 2012 Free Software Foundation, Inc. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1640 | This configure script is free software; the Free Software Foundation |
| 1641 | gives unlimited permission to copy, distribute and modify it. |
| 1642 | _ACEOF |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 1643 | exit |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 1644 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1645 | |
| 1646 | ## ------------------------ ## |
| 1647 | ## Autoconf initialization. ## |
| 1648 | ## ------------------------ ## |
| 1649 | |
| 1650 | # ac_fn_c_try_compile LINENO |
| 1651 | # -------------------------- |
| 1652 | # Try to compile conftest.$ac_ext, and return whether this succeeded. |
| 1653 | ac_fn_c_try_compile () |
| 1654 | { |
| 1655 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1656 | rm -f conftest.$ac_objext |
| 1657 | if { { ac_try="$ac_compile" |
| 1658 | case "(($ac_try" in |
| 1659 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 1660 | *) ac_try_echo=$ac_try;; |
| 1661 | esac |
| 1662 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 1663 | $as_echo "$ac_try_echo"; } >&5 |
| 1664 | (eval "$ac_compile") 2>conftest.err |
| 1665 | ac_status=$? |
| 1666 | if test -s conftest.err; then |
| 1667 | grep -v '^ *+' conftest.err >conftest.er1 |
| 1668 | cat conftest.er1 >&5 |
| 1669 | mv -f conftest.er1 conftest.err |
| 1670 | fi |
| 1671 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 1672 | test $ac_status = 0; } && { |
| 1673 | test -z "$ac_c_werror_flag" || |
| 1674 | test ! -s conftest.err |
| 1675 | } && test -s conftest.$ac_objext; then : |
| 1676 | ac_retval=0 |
| 1677 | else |
| 1678 | $as_echo "$as_me: failed program was:" >&5 |
| 1679 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 1680 | |
| 1681 | ac_retval=1 |
| 1682 | fi |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 1683 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1684 | as_fn_set_status $ac_retval |
| 1685 | |
| 1686 | } # ac_fn_c_try_compile |
| 1687 | |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 1688 | # ac_fn_c_try_cpp LINENO |
| 1689 | # ---------------------- |
| 1690 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. |
| 1691 | ac_fn_c_try_cpp () |
| 1692 | { |
| 1693 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1694 | if { { ac_try="$ac_cpp conftest.$ac_ext" |
| 1695 | case "(($ac_try" in |
| 1696 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 1697 | *) ac_try_echo=$ac_try;; |
| 1698 | esac |
| 1699 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 1700 | $as_echo "$ac_try_echo"; } >&5 |
| 1701 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err |
| 1702 | ac_status=$? |
| 1703 | if test -s conftest.err; then |
| 1704 | grep -v '^ *+' conftest.err >conftest.er1 |
| 1705 | cat conftest.er1 >&5 |
| 1706 | mv -f conftest.er1 conftest.err |
| 1707 | fi |
| 1708 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 1709 | test $ac_status = 0; } > conftest.i && { |
| 1710 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
| 1711 | test ! -s conftest.err |
| 1712 | }; then : |
| 1713 | ac_retval=0 |
| 1714 | else |
| 1715 | $as_echo "$as_me: failed program was:" >&5 |
| 1716 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 1717 | |
| 1718 | ac_retval=1 |
| 1719 | fi |
| 1720 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 1721 | as_fn_set_status $ac_retval |
| 1722 | |
| 1723 | } # ac_fn_c_try_cpp |
| 1724 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1725 | # ac_fn_c_try_link LINENO |
| 1726 | # ----------------------- |
| 1727 | # Try to link conftest.$ac_ext, and return whether this succeeded. |
| 1728 | ac_fn_c_try_link () |
| 1729 | { |
| 1730 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1731 | rm -f conftest.$ac_objext conftest$ac_exeext |
| 1732 | if { { ac_try="$ac_link" |
| 1733 | case "(($ac_try" in |
| 1734 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 1735 | *) ac_try_echo=$ac_try;; |
| 1736 | esac |
| 1737 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 1738 | $as_echo "$ac_try_echo"; } >&5 |
| 1739 | (eval "$ac_link") 2>conftest.err |
| 1740 | ac_status=$? |
| 1741 | if test -s conftest.err; then |
| 1742 | grep -v '^ *+' conftest.err >conftest.er1 |
| 1743 | cat conftest.er1 >&5 |
| 1744 | mv -f conftest.er1 conftest.err |
| 1745 | fi |
| 1746 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 1747 | test $ac_status = 0; } && { |
| 1748 | test -z "$ac_c_werror_flag" || |
| 1749 | test ! -s conftest.err |
| 1750 | } && test -s conftest$ac_exeext && { |
| 1751 | test "$cross_compiling" = yes || |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 1752 | test -x conftest$ac_exeext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1753 | }; then : |
| 1754 | ac_retval=0 |
| 1755 | else |
| 1756 | $as_echo "$as_me: failed program was:" >&5 |
| 1757 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 1758 | |
| 1759 | ac_retval=1 |
| 1760 | fi |
| 1761 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information |
| 1762 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would |
| 1763 | # interfere with the next link command; also delete a directory that is |
| 1764 | # left behind by Apple's compiler. We do this before executing the actions. |
| 1765 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 1766 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1767 | as_fn_set_status $ac_retval |
| 1768 | |
| 1769 | } # ac_fn_c_try_link |
| 1770 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1771 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
| 1772 | # ------------------------------------------------------- |
| 1773 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using |
| 1774 | # the include files in INCLUDES and setting the cache variable VAR |
| 1775 | # accordingly. |
| 1776 | ac_fn_c_check_header_mongrel () |
| 1777 | { |
| 1778 | 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] | 1779 | if eval \${$3+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1780 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
| 1781 | $as_echo_n "checking for $2... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 1782 | if eval \${$3+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1783 | $as_echo_n "(cached) " >&6 |
| 1784 | fi |
| 1785 | eval ac_res=\$$3 |
| 1786 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 1787 | $as_echo "$ac_res" >&6; } |
| 1788 | else |
| 1789 | # Is the header compilable? |
| 1790 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 |
| 1791 | $as_echo_n "checking $2 usability... " >&6; } |
| 1792 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 1793 | /* end confdefs.h. */ |
| 1794 | $4 |
| 1795 | #include <$2> |
| 1796 | _ACEOF |
| 1797 | if ac_fn_c_try_compile "$LINENO"; then : |
| 1798 | ac_header_compiler=yes |
| 1799 | else |
| 1800 | ac_header_compiler=no |
| 1801 | fi |
| 1802 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 1803 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 |
| 1804 | $as_echo "$ac_header_compiler" >&6; } |
| 1805 | |
| 1806 | # Is the header present? |
| 1807 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 |
| 1808 | $as_echo_n "checking $2 presence... " >&6; } |
| 1809 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 1810 | /* end confdefs.h. */ |
| 1811 | #include <$2> |
| 1812 | _ACEOF |
| 1813 | if ac_fn_c_try_cpp "$LINENO"; then : |
| 1814 | ac_header_preproc=yes |
| 1815 | else |
| 1816 | ac_header_preproc=no |
| 1817 | fi |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 1818 | rm -f conftest.err conftest.i conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1819 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
| 1820 | $as_echo "$ac_header_preproc" >&6; } |
| 1821 | |
| 1822 | # So? What about this header? |
| 1823 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( |
| 1824 | yes:no: ) |
| 1825 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 |
| 1826 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} |
| 1827 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 |
| 1828 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} |
| 1829 | ;; |
| 1830 | no:yes:* ) |
| 1831 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 |
| 1832 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} |
| 1833 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 |
| 1834 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} |
| 1835 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 |
| 1836 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} |
| 1837 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 |
| 1838 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} |
| 1839 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 |
| 1840 | $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] | 1841 | ( $as_echo "## --------------------------------------- ## |
| 1842 | ## Report this to https://bugs.python.org/ ## |
| 1843 | ## --------------------------------------- ##" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1844 | ) | sed "s/^/$as_me: WARNING: /" >&2 |
| 1845 | ;; |
| 1846 | esac |
| 1847 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
| 1848 | $as_echo_n "checking for $2... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 1849 | if eval \${$3+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1850 | $as_echo_n "(cached) " >&6 |
| 1851 | else |
| 1852 | eval "$3=\$ac_header_compiler" |
| 1853 | fi |
| 1854 | eval ac_res=\$$3 |
| 1855 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 1856 | $as_echo "$ac_res" >&6; } |
| 1857 | fi |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 1858 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1859 | |
| 1860 | } # ac_fn_c_check_header_mongrel |
| 1861 | |
| 1862 | # ac_fn_c_try_run LINENO |
| 1863 | # ---------------------- |
| 1864 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes |
| 1865 | # that executables *can* be run. |
| 1866 | ac_fn_c_try_run () |
| 1867 | { |
| 1868 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1869 | if { { ac_try="$ac_link" |
| 1870 | case "(($ac_try" in |
| 1871 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 1872 | *) ac_try_echo=$ac_try;; |
| 1873 | esac |
| 1874 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 1875 | $as_echo "$ac_try_echo"; } >&5 |
| 1876 | (eval "$ac_link") 2>&5 |
| 1877 | ac_status=$? |
| 1878 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 1879 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' |
| 1880 | { { case "(($ac_try" in |
| 1881 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 1882 | *) ac_try_echo=$ac_try;; |
| 1883 | esac |
| 1884 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 1885 | $as_echo "$ac_try_echo"; } >&5 |
| 1886 | (eval "$ac_try") 2>&5 |
| 1887 | ac_status=$? |
| 1888 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 1889 | test $ac_status = 0; }; }; then : |
| 1890 | ac_retval=0 |
| 1891 | else |
| 1892 | $as_echo "$as_me: program exited with status $ac_status" >&5 |
| 1893 | $as_echo "$as_me: failed program was:" >&5 |
| 1894 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 1895 | |
| 1896 | ac_retval=$ac_status |
| 1897 | fi |
| 1898 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 1899 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1900 | as_fn_set_status $ac_retval |
| 1901 | |
| 1902 | } # ac_fn_c_try_run |
| 1903 | |
| 1904 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
| 1905 | # ------------------------------------------------------- |
| 1906 | # Tests whether HEADER exists and can be compiled using the include files in |
| 1907 | # INCLUDES, setting the cache variable VAR accordingly. |
| 1908 | ac_fn_c_check_header_compile () |
| 1909 | { |
| 1910 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1911 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
| 1912 | $as_echo_n "checking for $2... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 1913 | if eval \${$3+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1914 | $as_echo_n "(cached) " >&6 |
| 1915 | else |
| 1916 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 1917 | /* end confdefs.h. */ |
| 1918 | $4 |
| 1919 | #include <$2> |
| 1920 | _ACEOF |
| 1921 | if ac_fn_c_try_compile "$LINENO"; then : |
| 1922 | eval "$3=yes" |
| 1923 | else |
| 1924 | eval "$3=no" |
| 1925 | fi |
| 1926 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 1927 | fi |
| 1928 | eval ac_res=\$$3 |
| 1929 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 1930 | $as_echo "$ac_res" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 1931 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1932 | |
| 1933 | } # ac_fn_c_check_header_compile |
| 1934 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1935 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
| 1936 | # ------------------------------------------- |
| 1937 | # Tests whether TYPE exists after having included INCLUDES, setting cache |
| 1938 | # variable VAR accordingly. |
| 1939 | ac_fn_c_check_type () |
| 1940 | { |
| 1941 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1942 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
| 1943 | $as_echo_n "checking for $2... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 1944 | if eval \${$3+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1945 | $as_echo_n "(cached) " >&6 |
| 1946 | else |
| 1947 | eval "$3=no" |
| 1948 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 1949 | /* end confdefs.h. */ |
| 1950 | $4 |
| 1951 | int |
| 1952 | main () |
| 1953 | { |
| 1954 | if (sizeof ($2)) |
| 1955 | return 0; |
| 1956 | ; |
| 1957 | return 0; |
| 1958 | } |
| 1959 | _ACEOF |
| 1960 | if ac_fn_c_try_compile "$LINENO"; then : |
| 1961 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 1962 | /* end confdefs.h. */ |
| 1963 | $4 |
| 1964 | int |
| 1965 | main () |
| 1966 | { |
| 1967 | if (sizeof (($2))) |
| 1968 | return 0; |
| 1969 | ; |
| 1970 | return 0; |
| 1971 | } |
| 1972 | _ACEOF |
| 1973 | if ac_fn_c_try_compile "$LINENO"; then : |
| 1974 | |
| 1975 | else |
| 1976 | eval "$3=yes" |
| 1977 | fi |
| 1978 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 1979 | fi |
| 1980 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 1981 | fi |
| 1982 | eval ac_res=\$$3 |
| 1983 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 1984 | $as_echo "$ac_res" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 1985 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1986 | |
| 1987 | } # ac_fn_c_check_type |
| 1988 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 1989 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
| 1990 | # -------------------------------------------- |
| 1991 | # Tries to find the compile-time value of EXPR in a program that includes |
| 1992 | # INCLUDES, setting VAR accordingly. Returns whether the value could be |
| 1993 | # computed |
| 1994 | ac_fn_c_compute_int () |
| 1995 | { |
| 1996 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1997 | if test "$cross_compiling" = yes; then |
| 1998 | # Depending upon the size, compute the lo and hi bounds. |
| 1999 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2000 | /* end confdefs.h. */ |
| 2001 | $4 |
| 2002 | int |
| 2003 | main () |
| 2004 | { |
| 2005 | static int test_array [1 - 2 * !(($2) >= 0)]; |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 2006 | test_array [0] = 0; |
| 2007 | return test_array [0]; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2008 | |
| 2009 | ; |
| 2010 | return 0; |
| 2011 | } |
| 2012 | _ACEOF |
| 2013 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2014 | ac_lo=0 ac_mid=0 |
| 2015 | while :; do |
| 2016 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2017 | /* end confdefs.h. */ |
| 2018 | $4 |
| 2019 | int |
| 2020 | main () |
| 2021 | { |
| 2022 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 2023 | test_array [0] = 0; |
| 2024 | return test_array [0]; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2025 | |
| 2026 | ; |
| 2027 | return 0; |
| 2028 | } |
| 2029 | _ACEOF |
| 2030 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2031 | ac_hi=$ac_mid; break |
| 2032 | else |
| 2033 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val |
| 2034 | if test $ac_lo -le $ac_mid; then |
| 2035 | ac_lo= ac_hi= |
| 2036 | break |
| 2037 | fi |
| 2038 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val |
| 2039 | fi |
| 2040 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2041 | done |
| 2042 | else |
| 2043 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2044 | /* end confdefs.h. */ |
| 2045 | $4 |
| 2046 | int |
| 2047 | main () |
| 2048 | { |
| 2049 | static int test_array [1 - 2 * !(($2) < 0)]; |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 2050 | test_array [0] = 0; |
| 2051 | return test_array [0]; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2052 | |
| 2053 | ; |
| 2054 | return 0; |
| 2055 | } |
| 2056 | _ACEOF |
| 2057 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2058 | ac_hi=-1 ac_mid=-1 |
| 2059 | while :; do |
| 2060 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2061 | /* end confdefs.h. */ |
| 2062 | $4 |
| 2063 | int |
| 2064 | main () |
| 2065 | { |
| 2066 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 2067 | test_array [0] = 0; |
| 2068 | return test_array [0]; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2069 | |
| 2070 | ; |
| 2071 | return 0; |
| 2072 | } |
| 2073 | _ACEOF |
| 2074 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2075 | ac_lo=$ac_mid; break |
| 2076 | else |
| 2077 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val |
| 2078 | if test $ac_mid -le $ac_hi; then |
| 2079 | ac_lo= ac_hi= |
| 2080 | break |
| 2081 | fi |
| 2082 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val |
| 2083 | fi |
| 2084 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2085 | done |
| 2086 | else |
| 2087 | ac_lo= ac_hi= |
| 2088 | fi |
| 2089 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2090 | fi |
| 2091 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2092 | # Binary search between lo and hi bounds. |
| 2093 | while test "x$ac_lo" != "x$ac_hi"; do |
| 2094 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val |
| 2095 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2096 | /* end confdefs.h. */ |
| 2097 | $4 |
| 2098 | int |
| 2099 | main () |
| 2100 | { |
| 2101 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 2102 | test_array [0] = 0; |
| 2103 | return test_array [0]; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2104 | |
| 2105 | ; |
| 2106 | return 0; |
| 2107 | } |
| 2108 | _ACEOF |
| 2109 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2110 | ac_hi=$ac_mid |
| 2111 | else |
| 2112 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val |
| 2113 | fi |
| 2114 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2115 | done |
| 2116 | case $ac_lo in #(( |
| 2117 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; |
| 2118 | '') ac_retval=1 ;; |
| 2119 | esac |
| 2120 | else |
| 2121 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2122 | /* end confdefs.h. */ |
| 2123 | $4 |
| 2124 | static long int longval () { return $2; } |
| 2125 | static unsigned long int ulongval () { return $2; } |
| 2126 | #include <stdio.h> |
| 2127 | #include <stdlib.h> |
| 2128 | int |
| 2129 | main () |
| 2130 | { |
| 2131 | |
| 2132 | FILE *f = fopen ("conftest.val", "w"); |
| 2133 | if (! f) |
| 2134 | return 1; |
| 2135 | if (($2) < 0) |
| 2136 | { |
| 2137 | long int i = longval (); |
| 2138 | if (i != ($2)) |
| 2139 | return 1; |
| 2140 | fprintf (f, "%ld", i); |
| 2141 | } |
| 2142 | else |
| 2143 | { |
| 2144 | unsigned long int i = ulongval (); |
| 2145 | if (i != ($2)) |
| 2146 | return 1; |
| 2147 | fprintf (f, "%lu", i); |
| 2148 | } |
| 2149 | /* Do not output a trailing newline, as this causes \r\n confusion |
| 2150 | on some platforms. */ |
| 2151 | return ferror (f) || fclose (f) != 0; |
| 2152 | |
| 2153 | ; |
| 2154 | return 0; |
| 2155 | } |
| 2156 | _ACEOF |
| 2157 | if ac_fn_c_try_run "$LINENO"; then : |
| 2158 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 |
| 2159 | else |
| 2160 | ac_retval=1 |
| 2161 | fi |
| 2162 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 2163 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 2164 | rm -f conftest.val |
| 2165 | |
| 2166 | fi |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 2167 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2168 | as_fn_set_status $ac_retval |
| 2169 | |
| 2170 | } # ac_fn_c_compute_int |
| 2171 | |
| 2172 | # ac_fn_c_check_func LINENO FUNC VAR |
| 2173 | # ---------------------------------- |
| 2174 | # Tests whether FUNC exists, setting the cache variable VAR accordingly |
| 2175 | ac_fn_c_check_func () |
| 2176 | { |
| 2177 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 2178 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
| 2179 | $as_echo_n "checking for $2... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 2180 | if eval \${$3+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2181 | $as_echo_n "(cached) " >&6 |
| 2182 | else |
| 2183 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2184 | /* end confdefs.h. */ |
| 2185 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
| 2186 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ |
| 2187 | #define $2 innocuous_$2 |
| 2188 | |
| 2189 | /* System header to define __stub macros and hopefully few prototypes, |
| 2190 | which can conflict with char $2 (); below. |
| 2191 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
| 2192 | <limits.h> exists even on freestanding compilers. */ |
| 2193 | |
| 2194 | #ifdef __STDC__ |
| 2195 | # include <limits.h> |
| 2196 | #else |
| 2197 | # include <assert.h> |
| 2198 | #endif |
| 2199 | |
| 2200 | #undef $2 |
| 2201 | |
| 2202 | /* Override any GCC internal prototype to avoid an error. |
| 2203 | Use char because int might match the return type of a GCC |
| 2204 | builtin and then its argument prototype would still apply. */ |
| 2205 | #ifdef __cplusplus |
| 2206 | extern "C" |
| 2207 | #endif |
| 2208 | char $2 (); |
| 2209 | /* The GNU C library defines this for functions which it implements |
| 2210 | to always fail with ENOSYS. Some functions are actually named |
| 2211 | something starting with __ and the normal name is an alias. */ |
| 2212 | #if defined __stub_$2 || defined __stub___$2 |
| 2213 | choke me |
| 2214 | #endif |
| 2215 | |
| 2216 | int |
| 2217 | main () |
| 2218 | { |
| 2219 | return $2 (); |
| 2220 | ; |
| 2221 | return 0; |
| 2222 | } |
| 2223 | _ACEOF |
| 2224 | if ac_fn_c_try_link "$LINENO"; then : |
| 2225 | eval "$3=yes" |
| 2226 | else |
| 2227 | eval "$3=no" |
| 2228 | fi |
| 2229 | rm -f core conftest.err conftest.$ac_objext \ |
| 2230 | conftest$ac_exeext conftest.$ac_ext |
| 2231 | fi |
| 2232 | eval ac_res=\$$3 |
| 2233 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 2234 | $as_echo "$ac_res" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 2235 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2236 | |
| 2237 | } # ac_fn_c_check_func |
| 2238 | |
Gregory P. Smith | df300d5 | 2012-01-21 18:20:15 -0800 | [diff] [blame] | 2239 | # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES |
| 2240 | # --------------------------------------------- |
| 2241 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR |
| 2242 | # accordingly. |
| 2243 | ac_fn_c_check_decl () |
| 2244 | { |
| 2245 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 2246 | as_decl_name=`echo $2|sed 's/ *(.*//'` |
| 2247 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` |
| 2248 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 |
| 2249 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } |
| 2250 | if eval \${$3+:} false; then : |
| 2251 | $as_echo_n "(cached) " >&6 |
| 2252 | else |
| 2253 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2254 | /* end confdefs.h. */ |
| 2255 | $4 |
| 2256 | int |
| 2257 | main () |
| 2258 | { |
| 2259 | #ifndef $as_decl_name |
| 2260 | #ifdef __cplusplus |
| 2261 | (void) $as_decl_use; |
| 2262 | #else |
| 2263 | (void) $as_decl_name; |
| 2264 | #endif |
| 2265 | #endif |
| 2266 | |
| 2267 | ; |
| 2268 | return 0; |
| 2269 | } |
| 2270 | _ACEOF |
| 2271 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2272 | eval "$3=yes" |
| 2273 | else |
| 2274 | eval "$3=no" |
| 2275 | fi |
| 2276 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2277 | fi |
| 2278 | eval ac_res=\$$3 |
| 2279 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 2280 | $as_echo "$ac_res" >&6; } |
| 2281 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 2282 | |
| 2283 | } # ac_fn_c_check_decl |
| 2284 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2285 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
| 2286 | # ---------------------------------------------------- |
| 2287 | # Tries to find if the field MEMBER exists in type AGGR, after including |
| 2288 | # INCLUDES, setting cache variable VAR accordingly. |
| 2289 | ac_fn_c_check_member () |
| 2290 | { |
| 2291 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 2292 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 |
| 2293 | $as_echo_n "checking for $2.$3... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 2294 | if eval \${$4+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2295 | $as_echo_n "(cached) " >&6 |
| 2296 | else |
| 2297 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2298 | /* end confdefs.h. */ |
| 2299 | $5 |
| 2300 | int |
| 2301 | main () |
| 2302 | { |
| 2303 | static $2 ac_aggr; |
| 2304 | if (ac_aggr.$3) |
| 2305 | return 0; |
| 2306 | ; |
| 2307 | return 0; |
| 2308 | } |
| 2309 | _ACEOF |
| 2310 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2311 | eval "$4=yes" |
| 2312 | else |
| 2313 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2314 | /* end confdefs.h. */ |
| 2315 | $5 |
| 2316 | int |
| 2317 | main () |
| 2318 | { |
| 2319 | static $2 ac_aggr; |
| 2320 | if (sizeof ac_aggr.$3) |
| 2321 | return 0; |
| 2322 | ; |
| 2323 | return 0; |
| 2324 | } |
| 2325 | _ACEOF |
| 2326 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2327 | eval "$4=yes" |
| 2328 | else |
| 2329 | eval "$4=no" |
| 2330 | fi |
| 2331 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2332 | fi |
| 2333 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2334 | fi |
| 2335 | eval ac_res=\$$4 |
| 2336 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 2337 | $as_echo "$ac_res" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 2338 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2339 | |
| 2340 | } # ac_fn_c_check_member |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2341 | cat >config.log <<_ACEOF |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2342 | This file contains any messages produced by compilers while |
| 2343 | running configure, to aid debugging if configure makes a mistake. |
| 2344 | |
Ned Deily | 4829bc6 | 2016-09-12 17:29:04 -0400 | [diff] [blame] | 2345 | It was created by python $as_me 3.7, which was |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 2346 | generated by GNU Autoconf 2.69. Invocation command line was |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2347 | |
| 2348 | $ $0 $@ |
| 2349 | |
| 2350 | _ACEOF |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2351 | exec 5>>config.log |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2352 | { |
| 2353 | cat <<_ASUNAME |
| 2354 | ## --------- ## |
| 2355 | ## Platform. ## |
| 2356 | ## --------- ## |
| 2357 | |
| 2358 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
| 2359 | uname -m = `(uname -m) 2>/dev/null || echo unknown` |
| 2360 | uname -r = `(uname -r) 2>/dev/null || echo unknown` |
| 2361 | uname -s = `(uname -s) 2>/dev/null || echo unknown` |
| 2362 | uname -v = `(uname -v) 2>/dev/null || echo unknown` |
| 2363 | |
| 2364 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
| 2365 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` |
| 2366 | |
| 2367 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
| 2368 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` |
| 2369 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2370 | /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] | 2371 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` |
| 2372 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` |
| 2373 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` |
| 2374 | |
| 2375 | _ASUNAME |
| 2376 | |
| 2377 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 2378 | for as_dir in $PATH |
| 2379 | do |
| 2380 | IFS=$as_save_IFS |
| 2381 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2382 | $as_echo "PATH: $as_dir" |
| 2383 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2384 | IFS=$as_save_IFS |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2385 | |
| 2386 | } >&5 |
| 2387 | |
| 2388 | cat >&5 <<_ACEOF |
| 2389 | |
| 2390 | |
| 2391 | ## ----------- ## |
| 2392 | ## Core tests. ## |
| 2393 | ## ----------- ## |
| 2394 | |
| 2395 | _ACEOF |
| 2396 | |
| 2397 | |
| 2398 | # Keep a trace of the command line. |
| 2399 | # 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] | 2400 | # 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] | 2401 | # Also quote any args containing shell meta-characters. |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2402 | # Make two passes to allow for proper duplicate-argument suppression. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2403 | ac_configure_args= |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2404 | ac_configure_args0= |
| 2405 | ac_configure_args1= |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2406 | ac_must_keep_next=false |
| 2407 | for ac_pass in 1 2 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2408 | do |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2409 | for ac_arg |
| 2410 | do |
| 2411 | case $ac_arg in |
| 2412 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; |
| 2413 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| 2414 | | -silent | --silent | --silen | --sile | --sil) |
| 2415 | continue ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2416 | *\'*) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2417 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2418 | esac |
| 2419 | case $ac_pass in |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2420 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2421 | 2) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2422 | as_fn_append ac_configure_args1 " '$ac_arg'" |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2423 | if test $ac_must_keep_next = true; then |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 2424 | ac_must_keep_next=false # Got value, back to normal. |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2425 | else |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 2426 | case $ac_arg in |
| 2427 | *=* | --config-cache | -C | -disable-* | --disable-* \ |
| 2428 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ |
| 2429 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ |
| 2430 | | -with-* | --with-* | -without-* | --without-* | --x) |
| 2431 | case "$ac_configure_args0 " in |
| 2432 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; |
| 2433 | esac |
| 2434 | ;; |
| 2435 | -* ) ac_must_keep_next=true ;; |
| 2436 | esac |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2437 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2438 | as_fn_append ac_configure_args " '$ac_arg'" |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2439 | ;; |
| 2440 | esac |
| 2441 | done |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2442 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2443 | { ac_configure_args0=; unset ac_configure_args0;} |
| 2444 | { ac_configure_args1=; unset ac_configure_args1;} |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2445 | |
| 2446 | # When interrupted or exit'd, cleanup temporary files, and complete |
| 2447 | # config.log. We remove comments because anyway the quotes in there |
| 2448 | # would cause problems or look ugly. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2449 | # WARNING: Use '\'' to represent an apostrophe within the trap. |
| 2450 | # 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] | 2451 | trap 'exit_status=$? |
| 2452 | # Save into config.log some information that might help in debugging. |
| 2453 | { |
| 2454 | echo |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2455 | |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 2456 | $as_echo "## ---------------- ## |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2457 | ## Cache variables. ## |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 2458 | ## ---------------- ##" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2459 | echo |
| 2460 | # The following way of writing the cache mishandles newlines in values, |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2461 | ( |
| 2462 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do |
| 2463 | eval ac_val=\$$ac_var |
| 2464 | case $ac_val in #( |
| 2465 | *${as_nl}*) |
| 2466 | case $ac_var in #( |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2467 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 |
| 2468 | $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] | 2469 | esac |
| 2470 | case $ac_var in #( |
| 2471 | _ | IFS | as_nl) ;; #( |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2472 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( |
| 2473 | *) { eval $ac_var=; unset $ac_var;} ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2474 | esac ;; |
| 2475 | esac |
| 2476 | done |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2477 | (set) 2>&1 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2478 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( |
| 2479 | *${as_nl}ac_space=\ *) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2480 | sed -n \ |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2481 | "s/'\''/'\''\\\\'\'''\''/g; |
| 2482 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" |
| 2483 | ;; #( |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 2484 | *) |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2485 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 2486 | ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2487 | esac | |
| 2488 | sort |
| 2489 | ) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2490 | echo |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2491 | |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 2492 | $as_echo "## ----------------- ## |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2493 | ## Output variables. ## |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 2494 | ## ----------------- ##" |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2495 | echo |
| 2496 | for ac_var in $ac_subst_vars |
| 2497 | do |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2498 | eval ac_val=\$$ac_var |
| 2499 | case $ac_val in |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2500 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2501 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2502 | $as_echo "$ac_var='\''$ac_val'\''" |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2503 | done | sort |
| 2504 | echo |
| 2505 | |
| 2506 | if test -n "$ac_subst_files"; then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 2507 | $as_echo "## ------------------- ## |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2508 | ## File substitutions. ## |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 2509 | ## ------------------- ##" |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2510 | echo |
| 2511 | for ac_var in $ac_subst_files |
| 2512 | do |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2513 | eval ac_val=\$$ac_var |
| 2514 | case $ac_val in |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2515 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2516 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2517 | $as_echo "$ac_var='\''$ac_val'\''" |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 2518 | done | sort |
| 2519 | echo |
| 2520 | fi |
| 2521 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2522 | if test -s confdefs.h; then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 2523 | $as_echo "## ----------- ## |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2524 | ## confdefs.h. ## |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 2525 | ## ----------- ##" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2526 | echo |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2527 | cat confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2528 | echo |
| 2529 | fi |
| 2530 | test "$ac_signal" != 0 && |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2531 | $as_echo "$as_me: caught signal $ac_signal" |
| 2532 | $as_echo "$as_me: exit $exit_status" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2533 | } >&5 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2534 | rm -f core *.core core.conftest.* && |
| 2535 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2536 | exit $exit_status |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2537 | ' 0 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2538 | for ac_signal in 1 2 13 15; do |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2539 | 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] | 2540 | done |
| 2541 | ac_signal=0 |
| 2542 | |
| 2543 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2544 | rm -f -r conftest* confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2545 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2546 | $as_echo "/* confdefs.h */" > confdefs.h |
| 2547 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2548 | # Predefined preprocessor variables. |
| 2549 | |
| 2550 | cat >>confdefs.h <<_ACEOF |
| 2551 | #define PACKAGE_NAME "$PACKAGE_NAME" |
| 2552 | _ACEOF |
| 2553 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2554 | cat >>confdefs.h <<_ACEOF |
| 2555 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" |
| 2556 | _ACEOF |
| 2557 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2558 | cat >>confdefs.h <<_ACEOF |
| 2559 | #define PACKAGE_VERSION "$PACKAGE_VERSION" |
| 2560 | _ACEOF |
| 2561 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2562 | cat >>confdefs.h <<_ACEOF |
| 2563 | #define PACKAGE_STRING "$PACKAGE_STRING" |
| 2564 | _ACEOF |
| 2565 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2566 | cat >>confdefs.h <<_ACEOF |
| 2567 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" |
| 2568 | _ACEOF |
| 2569 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2570 | cat >>confdefs.h <<_ACEOF |
| 2571 | #define PACKAGE_URL "$PACKAGE_URL" |
| 2572 | _ACEOF |
| 2573 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2574 | |
| 2575 | # 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] | 2576 | # Prefer an explicitly selected file to automatically selected ones. |
| 2577 | ac_site_file1=NONE |
| 2578 | ac_site_file2=NONE |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2579 | if test -n "$CONFIG_SITE"; then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 2580 | # We do not want a PATH search for config.site. |
| 2581 | case $CONFIG_SITE in #(( |
| 2582 | -*) ac_site_file1=./$CONFIG_SITE;; |
| 2583 | */*) ac_site_file1=$CONFIG_SITE;; |
| 2584 | *) ac_site_file1=./$CONFIG_SITE;; |
| 2585 | esac |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2586 | elif test "x$prefix" != xNONE; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2587 | ac_site_file1=$prefix/share/config.site |
| 2588 | ac_site_file2=$prefix/etc/config.site |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2589 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2590 | ac_site_file1=$ac_default_prefix/share/config.site |
| 2591 | ac_site_file2=$ac_default_prefix/etc/config.site |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2592 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2593 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2594 | do |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2595 | test "x$ac_site_file" = xNONE && continue |
| 2596 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then |
| 2597 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 |
| 2598 | $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] | 2599 | sed 's/^/| /' "$ac_site_file" >&5 |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 2600 | . "$ac_site_file" \ |
| 2601 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 2602 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 2603 | as_fn_error $? "failed to load site script $ac_site_file |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 2604 | See \`config.log' for more details" "$LINENO" 5; } |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2605 | fi |
| 2606 | done |
| 2607 | |
| 2608 | if test -r "$cache_file"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2609 | # Some versions of bash will fail to source /dev/null (special files |
| 2610 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. |
| 2611 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then |
| 2612 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 |
| 2613 | $as_echo "$as_me: loading cache $cache_file" >&6;} |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2614 | case $cache_file in |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2615 | [\\/]* | ?:[\\/]* ) . "$cache_file";; |
| 2616 | *) . "./$cache_file";; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2617 | esac |
| 2618 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2619 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2620 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 |
| 2621 | $as_echo "$as_me: creating cache $cache_file" >&6;} |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2622 | >$cache_file |
| 2623 | fi |
| 2624 | |
| 2625 | # Check that the precious variables saved in the cache have kept the same |
| 2626 | # value. |
| 2627 | ac_cache_corrupted=false |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2628 | for ac_var in $ac_precious_vars; do |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2629 | eval ac_old_set=\$ac_cv_env_${ac_var}_set |
| 2630 | eval ac_new_set=\$ac_env_${ac_var}_set |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2631 | eval ac_old_val=\$ac_cv_env_${ac_var}_value |
| 2632 | eval ac_new_val=\$ac_env_${ac_var}_value |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2633 | case $ac_old_set,$ac_new_set in |
| 2634 | set,) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2635 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 |
| 2636 | $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] | 2637 | ac_cache_corrupted=: ;; |
| 2638 | ,set) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2639 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 |
| 2640 | $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] | 2641 | ac_cache_corrupted=: ;; |
| 2642 | ,);; |
| 2643 | *) |
| 2644 | if test "x$ac_old_val" != "x$ac_new_val"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2645 | # differences in whitespace do not lead to failure. |
| 2646 | ac_old_val_w=`echo x $ac_old_val` |
| 2647 | ac_new_val_w=`echo x $ac_new_val` |
| 2648 | if test "$ac_old_val_w" != "$ac_new_val_w"; then |
| 2649 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 |
| 2650 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} |
| 2651 | ac_cache_corrupted=: |
| 2652 | else |
| 2653 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 |
| 2654 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} |
| 2655 | eval $ac_var=\$ac_old_val |
| 2656 | fi |
| 2657 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 |
| 2658 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} |
| 2659 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 |
| 2660 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2661 | fi;; |
| 2662 | esac |
| 2663 | # Pass precious variables to config.status. |
| 2664 | if test "$ac_new_set" = set; then |
| 2665 | case $ac_new_val in |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2666 | *\'*) 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] | 2667 | *) ac_arg=$ac_var=$ac_new_val ;; |
| 2668 | esac |
| 2669 | case " $ac_configure_args " in |
| 2670 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2671 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2672 | esac |
| 2673 | fi |
| 2674 | done |
| 2675 | if $ac_cache_corrupted; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2676 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 2677 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 2678 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 |
| 2679 | $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] | 2680 | 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] | 2681 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2682 | ## -------------------- ## |
| 2683 | ## Main body of script. ## |
| 2684 | ## -------------------- ## |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2685 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 2686 | ac_ext=c |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2687 | ac_cpp='$CPP $CPPFLAGS' |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2688 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 2689 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 2690 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 2691 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 2692 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 2693 | |
Trent Nelson | 4d4ec65 | 2012-10-16 08:51:24 -0400 | [diff] [blame] | 2694 | |
Martin Panter | c5ee3ca | 2016-09-12 01:32:03 +0000 | [diff] [blame] | 2695 | if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then |
Trent Nelson | 4d4ec65 | 2012-10-16 08:51:24 -0400 | [diff] [blame] | 2696 | # If we're building out-of-tree, we need to make sure the following |
| 2697 | # resources get picked up before their $srcdir counterparts. |
| 2698 | # Objects/ -> typeslots.inc |
| 2699 | # Include/ -> Python-ast.h, graminit.h |
| 2700 | # Python/ -> importlib.h |
| 2701 | # (A side effect of this is that these resources will automatically be |
| 2702 | # regenerated when building out-of-tree, regardless of whether or not |
| 2703 | # the $srcdir counterpart is up-to-date. This is an acceptable trade |
| 2704 | # off.) |
| 2705 | BASECPPFLAGS="-IObjects -IInclude -IPython" |
| 2706 | else |
| 2707 | BASECPPFLAGS="" |
| 2708 | fi |
| 2709 | |
Benjamin Peterson | 8c6f88e | 2011-05-31 20:52:17 -0500 | [diff] [blame] | 2710 | |
| 2711 | |
| 2712 | |
| 2713 | |
Victor Stinner | 9ed34a8 | 2017-05-02 22:35:58 +0200 | [diff] [blame] | 2714 | if test -e $srcdir/.git |
Benjamin Peterson | 8c6f88e | 2011-05-31 20:52:17 -0500 | [diff] [blame] | 2715 | then |
Ned Deily | 5c4b0d0 | 2017-03-04 00:19:55 -0500 | [diff] [blame] | 2716 | # Extract the first word of "git", so it can be a program name with args. |
| 2717 | set dummy git; ac_word=$2 |
Benjamin Peterson | 8c6f88e | 2011-05-31 20:52:17 -0500 | [diff] [blame] | 2718 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 2719 | $as_echo_n "checking for $ac_word... " >&6; } |
Ned Deily | 5c4b0d0 | 2017-03-04 00:19:55 -0500 | [diff] [blame] | 2720 | if ${ac_cv_prog_HAS_GIT+:} false; then : |
Benjamin Peterson | 8c6f88e | 2011-05-31 20:52:17 -0500 | [diff] [blame] | 2721 | $as_echo_n "(cached) " >&6 |
| 2722 | else |
Ned Deily | 5c4b0d0 | 2017-03-04 00:19:55 -0500 | [diff] [blame] | 2723 | if test -n "$HAS_GIT"; then |
| 2724 | 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] | 2725 | else |
| 2726 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 2727 | for as_dir in $PATH |
| 2728 | do |
| 2729 | IFS=$as_save_IFS |
| 2730 | test -z "$as_dir" && as_dir=. |
| 2731 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 646eb1e | 2012-10-29 17:35:57 +0000 | [diff] [blame] | 2732 | 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] | 2733 | ac_cv_prog_HAS_GIT="found" |
Benjamin Peterson | 8c6f88e | 2011-05-31 20:52:17 -0500 | [diff] [blame] | 2734 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 2735 | break 2 |
| 2736 | fi |
| 2737 | done |
| 2738 | done |
| 2739 | IFS=$as_save_IFS |
| 2740 | |
Ned Deily | 5c4b0d0 | 2017-03-04 00:19:55 -0500 | [diff] [blame] | 2741 | 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] | 2742 | fi |
| 2743 | fi |
Ned Deily | 5c4b0d0 | 2017-03-04 00:19:55 -0500 | [diff] [blame] | 2744 | HAS_GIT=$ac_cv_prog_HAS_GIT |
| 2745 | if test -n "$HAS_GIT"; then |
| 2746 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5 |
| 2747 | $as_echo "$HAS_GIT" >&6; } |
Benjamin Peterson | 8c6f88e | 2011-05-31 20:52:17 -0500 | [diff] [blame] | 2748 | else |
| 2749 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 2750 | $as_echo "no" >&6; } |
| 2751 | fi |
| 2752 | |
| 2753 | |
| 2754 | else |
Ned Deily | 5c4b0d0 | 2017-03-04 00:19:55 -0500 | [diff] [blame] | 2755 | HAS_GIT=no-repository |
Benjamin Peterson | 8c6f88e | 2011-05-31 20:52:17 -0500 | [diff] [blame] | 2756 | fi |
Ned Deily | 5c4b0d0 | 2017-03-04 00:19:55 -0500 | [diff] [blame] | 2757 | if test $HAS_GIT = found |
Benjamin Peterson | 8c6f88e | 2011-05-31 20:52:17 -0500 | [diff] [blame] | 2758 | then |
Ned Deily | 554626a | 2017-03-20 23:41:52 -0400 | [diff] [blame] | 2759 | GITVERSION="git -C \$(srcdir) rev-parse --short HEAD" |
| 2760 | GITTAG="git -C \$(srcdir) describe --all --always --dirty" |
Ned Deily | 5c4b0d0 | 2017-03-04 00:19:55 -0500 | [diff] [blame] | 2761 | GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD" |
Benjamin Peterson | 8c6f88e | 2011-05-31 20:52:17 -0500 | [diff] [blame] | 2762 | else |
Ned Deily | 5c4b0d0 | 2017-03-04 00:19:55 -0500 | [diff] [blame] | 2763 | GITVERSION="" |
| 2764 | GITTAG="" |
| 2765 | GITBRANCH="" |
Benjamin Peterson | 8c6f88e | 2011-05-31 20:52:17 -0500 | [diff] [blame] | 2766 | fi |
| 2767 | |
| 2768 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 2769 | ac_config_headers="$ac_config_headers pyconfig.h" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2770 | |
| 2771 | |
Matthias Klose | ca2f6ec | 2012-03-15 21:30:11 +0100 | [diff] [blame] | 2772 | ac_aux_dir= |
| 2773 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do |
| 2774 | if test -f "$ac_dir/install-sh"; then |
| 2775 | ac_aux_dir=$ac_dir |
| 2776 | ac_install_sh="$ac_aux_dir/install-sh -c" |
| 2777 | break |
| 2778 | elif test -f "$ac_dir/install.sh"; then |
| 2779 | ac_aux_dir=$ac_dir |
| 2780 | ac_install_sh="$ac_aux_dir/install.sh -c" |
| 2781 | break |
| 2782 | elif test -f "$ac_dir/shtool"; then |
| 2783 | ac_aux_dir=$ac_dir |
| 2784 | ac_install_sh="$ac_aux_dir/shtool install -c" |
| 2785 | break |
| 2786 | fi |
| 2787 | done |
| 2788 | if test -z "$ac_aux_dir"; then |
| 2789 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 |
| 2790 | fi |
| 2791 | |
| 2792 | # These three variables are undocumented and unsupported, |
| 2793 | # and are intended to be withdrawn in a future Autoconf release. |
| 2794 | # They can cause serious problems if a builder's source tree is in a directory |
| 2795 | # whose full name contains unusual characters. |
| 2796 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. |
| 2797 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. |
| 2798 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. |
| 2799 | |
| 2800 | |
| 2801 | # Make sure we can run config.sub. |
| 2802 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || |
| 2803 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
| 2804 | |
| 2805 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 |
| 2806 | $as_echo_n "checking build system type... " >&6; } |
| 2807 | if ${ac_cv_build+:} false; then : |
| 2808 | $as_echo_n "(cached) " >&6 |
| 2809 | else |
| 2810 | ac_build_alias=$build_alias |
| 2811 | test "x$ac_build_alias" = x && |
| 2812 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` |
| 2813 | test "x$ac_build_alias" = x && |
| 2814 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 |
| 2815 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
| 2816 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
| 2817 | |
| 2818 | fi |
| 2819 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
| 2820 | $as_echo "$ac_cv_build" >&6; } |
| 2821 | case $ac_cv_build in |
| 2822 | *-*-*) ;; |
| 2823 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; |
| 2824 | esac |
| 2825 | build=$ac_cv_build |
| 2826 | ac_save_IFS=$IFS; IFS='-' |
| 2827 | set x $ac_cv_build |
| 2828 | shift |
| 2829 | build_cpu=$1 |
| 2830 | build_vendor=$2 |
| 2831 | shift; shift |
| 2832 | # Remember, the first character of IFS is used to create $*, |
| 2833 | # except with old shells: |
| 2834 | build_os=$* |
| 2835 | IFS=$ac_save_IFS |
| 2836 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac |
| 2837 | |
| 2838 | |
| 2839 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
| 2840 | $as_echo_n "checking host system type... " >&6; } |
| 2841 | if ${ac_cv_host+:} false; then : |
| 2842 | $as_echo_n "(cached) " >&6 |
| 2843 | else |
| 2844 | if test "x$host_alias" = x; then |
| 2845 | ac_cv_host=$ac_cv_build |
| 2846 | else |
| 2847 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
| 2848 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
| 2849 | fi |
| 2850 | |
| 2851 | fi |
| 2852 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
| 2853 | $as_echo "$ac_cv_host" >&6; } |
| 2854 | case $ac_cv_host in |
| 2855 | *-*-*) ;; |
| 2856 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; |
| 2857 | esac |
| 2858 | host=$ac_cv_host |
| 2859 | ac_save_IFS=$IFS; IFS='-' |
| 2860 | set x $ac_cv_host |
| 2861 | shift |
| 2862 | host_cpu=$1 |
| 2863 | host_vendor=$2 |
| 2864 | shift; shift |
| 2865 | # Remember, the first character of IFS is used to create $*, |
| 2866 | # except with old shells: |
| 2867 | host_os=$* |
| 2868 | IFS=$ac_save_IFS |
| 2869 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac |
| 2870 | |
| 2871 | |
| 2872 | |
doko@python.org | a10e4a9 | 2013-01-25 18:45:12 +0100 | [diff] [blame] | 2873 | |
| 2874 | |
Ned Deily | fcbc246 | 2014-08-22 13:32:49 -0700 | [diff] [blame] | 2875 | # pybuilddir.txt will be created by --generate-posix-vars in the Makefile |
| 2876 | rm -f pybuilddir.txt |
| 2877 | |
Xavier de Gaye | fd0d593 | 2016-07-26 12:48:08 +0200 | [diff] [blame] | 2878 | for ac_prog in python$PACKAGE_VERSION python3 python |
| 2879 | do |
| 2880 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 2881 | set dummy $ac_prog; ac_word=$2 |
| 2882 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 2883 | $as_echo_n "checking for $ac_word... " >&6; } |
Victor Stinner | a5c62a8 | 2017-05-03 18:21:48 +0200 | [diff] [blame] | 2884 | if ${ac_cv_prog_PYTHON_FOR_REGEN+:} false; then : |
Xavier de Gaye | fd0d593 | 2016-07-26 12:48:08 +0200 | [diff] [blame] | 2885 | $as_echo_n "(cached) " >&6 |
| 2886 | else |
Victor Stinner | a5c62a8 | 2017-05-03 18:21:48 +0200 | [diff] [blame] | 2887 | if test -n "$PYTHON_FOR_REGEN"; then |
| 2888 | 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] | 2889 | else |
| 2890 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 2891 | for as_dir in $PATH |
| 2892 | do |
| 2893 | IFS=$as_save_IFS |
| 2894 | test -z "$as_dir" && as_dir=. |
| 2895 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 2896 | 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] | 2897 | ac_cv_prog_PYTHON_FOR_REGEN="$ac_prog" |
Xavier de Gaye | fd0d593 | 2016-07-26 12:48:08 +0200 | [diff] [blame] | 2898 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 2899 | break 2 |
| 2900 | fi |
| 2901 | done |
| 2902 | done |
| 2903 | IFS=$as_save_IFS |
| 2904 | |
| 2905 | fi |
| 2906 | fi |
Victor Stinner | a5c62a8 | 2017-05-03 18:21:48 +0200 | [diff] [blame] | 2907 | PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN |
| 2908 | if test -n "$PYTHON_FOR_REGEN"; then |
| 2909 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_REGEN" >&5 |
| 2910 | $as_echo "$PYTHON_FOR_REGEN" >&6; } |
Xavier de Gaye | fd0d593 | 2016-07-26 12:48:08 +0200 | [diff] [blame] | 2911 | else |
| 2912 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 2913 | $as_echo "no" >&6; } |
| 2914 | fi |
| 2915 | |
| 2916 | |
Victor Stinner | a5c62a8 | 2017-05-03 18:21:48 +0200 | [diff] [blame] | 2917 | test -n "$PYTHON_FOR_REGEN" && break |
Xavier de Gaye | fd0d593 | 2016-07-26 12:48:08 +0200 | [diff] [blame] | 2918 | done |
Victor Stinner | a5c62a8 | 2017-05-03 18:21:48 +0200 | [diff] [blame] | 2919 | test -n "$PYTHON_FOR_REGEN" || PYTHON_FOR_REGEN="python3" |
Xavier de Gaye | fd0d593 | 2016-07-26 12:48:08 +0200 | [diff] [blame] | 2920 | |
Xavier de Gaye | fd0d593 | 2016-07-26 12:48:08 +0200 | [diff] [blame] | 2921 | |
| 2922 | |
doko@ubuntu.com | 1abe1c5 | 2012-06-30 20:42:45 +0200 | [diff] [blame] | 2923 | if test "$cross_compiling" = yes; then |
| 2924 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5 |
| 2925 | $as_echo_n "checking for python interpreter for cross build... " >&6; } |
| 2926 | if test -z "$PYTHON_FOR_BUILD"; then |
| 2927 | for interp in python$PACKAGE_VERSION python3 python; do |
| 2928 | which $interp >/dev/null 2>&1 || continue |
Xavier de Gaye | 4afd143 | 2016-07-07 18:00:22 +0200 | [diff] [blame] | 2929 | 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] | 2930 | break |
| 2931 | fi |
| 2932 | interp= |
| 2933 | done |
| 2934 | if test x$interp = x; then |
| 2935 | as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5 |
| 2936 | fi |
| 2937 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5 |
| 2938 | $as_echo "$interp" >&6; } |
Xavier de Gaye | 92dec54 | 2016-09-11 22:22:24 +0200 | [diff] [blame] | 2939 | 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] | 2940 | fi |
Christian Heimes | 954ac03 | 2012-12-12 13:10:21 +0100 | [diff] [blame] | 2941 | elif test "$cross_compiling" = maybe; then |
| 2942 | 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] | 2943 | else |
| 2944 | PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E' |
| 2945 | fi |
| 2946 | |
| 2947 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2948 | |
Benjamin Peterson | d23f822 | 2009-04-05 19:13:16 +0000 | [diff] [blame] | 2949 | if test "$prefix" != "/"; then |
| 2950 | prefix=`echo "$prefix" | sed -e 's/\/$//g'` |
| 2951 | fi |
| 2952 | |
| 2953 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 2954 | |
| 2955 | |
Martin v. Löwis | 8316feb | 2003-06-14 07:48:07 +0000 | [diff] [blame] | 2956 | # We don't use PACKAGE_ variables, and they cause conflicts |
| 2957 | # with other autoconf-based packages that include Python.h |
| 2958 | grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new |
| 2959 | rm confdefs.h |
| 2960 | mv confdefs.h.new confdefs.h |
| 2961 | |
Martin v. Löwis | bddf5a5 | 2002-11-11 13:37:28 +0000 | [diff] [blame] | 2962 | |
Ned Deily | 4829bc6 | 2016-09-12 17:29:04 -0400 | [diff] [blame] | 2963 | VERSION=3.7 |
Guido van Rossum | 1fd74a7 | 1997-07-19 19:36:02 +0000 | [diff] [blame] | 2964 | |
Benjamin Peterson | d7f73e9 | 2010-09-05 00:09:07 +0000 | [diff] [blame] | 2965 | # Version number of Python's own shared library file. |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 2966 | |
| 2967 | SOVERSION=1.0 |
| 2968 | |
Martin v. Löwis | 6f18a3c | 2002-07-20 08:51:52 +0000 | [diff] [blame] | 2969 | # The later defininition of _XOPEN_SOURCE disables certain features |
| 2970 | # on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone). |
| 2971 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2972 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
Martin v. Löwis | 6f18a3c | 2002-07-20 08:51:52 +0000 | [diff] [blame] | 2973 | |
| 2974 | |
Martin v. Löwis | bcd9396 | 2003-05-03 10:32:18 +0000 | [diff] [blame] | 2975 | # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables |
| 2976 | # certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable |
| 2977 | # them. |
| 2978 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2979 | $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h |
Martin v. Löwis | bcd9396 | 2003-05-03 10:32:18 +0000 | [diff] [blame] | 2980 | |
| 2981 | |
Andrew MacIntyre | abccf41 | 2003-07-02 13:53:25 +0000 | [diff] [blame] | 2982 | # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables |
| 2983 | # certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable |
| 2984 | # them. |
| 2985 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2986 | $as_echo "#define __BSD_VISIBLE 1" >>confdefs.h |
Andrew MacIntyre | abccf41 | 2003-07-02 13:53:25 +0000 | [diff] [blame] | 2987 | |
| 2988 | |
Martin v. Löwis | d632050 | 2004-08-12 13:45:08 +0000 | [diff] [blame] | 2989 | # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables |
| 2990 | # u_int on Irix 5.3. Defining _BSD_TYPES brings it back. |
| 2991 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2992 | $as_echo "#define _BSD_TYPES 1" >>confdefs.h |
Martin v. Löwis | d632050 | 2004-08-12 13:45:08 +0000 | [diff] [blame] | 2993 | |
| 2994 | |
Benjamin Peterson | 14ae959 | 2008-07-16 02:20:15 +0000 | [diff] [blame] | 2995 | # The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables |
| 2996 | # certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable |
| 2997 | # them. |
| 2998 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 2999 | $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h |
Benjamin Peterson | 14ae959 | 2008-07-16 02:20:15 +0000 | [diff] [blame] | 3000 | |
| 3001 | |
| 3002 | |
Martin v. Löwis | 35195ad | 2002-11-11 13:26:51 +0000 | [diff] [blame] | 3003 | define_xopen_source=yes |
Martin v. Löwis | 6f18a3c | 2002-07-20 08:51:52 +0000 | [diff] [blame] | 3004 | |
Neil Schemenauer | 4edbc2a | 2001-03-22 00:34:03 +0000 | [diff] [blame] | 3005 | # Arguments passed to configure. |
| 3006 | |
| 3007 | CONFIG_ARGS="$ac_configure_args" |
| 3008 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3009 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5 |
| 3010 | $as_echo_n "checking for --enable-universalsdk... " >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3011 | # Check whether --enable-universalsdk was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3012 | if test "${enable_universalsdk+set}" = set; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3013 | enableval=$enable_universalsdk; |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3014 | case $enableval in |
| 3015 | yes) |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 3016 | # Locate the best usable SDK, see Mac/README.txt for more |
| 3017 | # information |
| 3018 | enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`" |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 3019 | if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null ) |
Ronald Oussoren | 8af24c1 | 2010-02-07 12:03:42 +0000 | [diff] [blame] | 3020 | then |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 3021 | enableval=/Developer/SDKs/MacOSX10.4u.sdk |
| 3022 | if test ! -d "${enableval}" |
| 3023 | then |
| 3024 | enableval=/ |
| 3025 | fi |
Ronald Oussoren | 8af24c1 | 2010-02-07 12:03:42 +0000 | [diff] [blame] | 3026 | fi |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3027 | ;; |
| 3028 | esac |
| 3029 | case $enableval in |
| 3030 | no) |
| 3031 | UNIVERSALSDK= |
| 3032 | enable_universalsdk= |
| 3033 | ;; |
| 3034 | *) |
| 3035 | UNIVERSALSDK=$enableval |
Ronald Oussoren | 8af24c1 | 2010-02-07 12:03:42 +0000 | [diff] [blame] | 3036 | if test ! -d "${UNIVERSALSDK}" |
| 3037 | then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 3038 | as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5 |
Ronald Oussoren | 8af24c1 | 2010-02-07 12:03:42 +0000 | [diff] [blame] | 3039 | fi |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3040 | ;; |
| 3041 | esac |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3042 | |
Ronald Oussoren | 8af24c1 | 2010-02-07 12:03:42 +0000 | [diff] [blame] | 3043 | |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3044 | else |
| 3045 | |
| 3046 | UNIVERSALSDK= |
| 3047 | enable_universalsdk= |
| 3048 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3049 | fi |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3050 | |
Ronald Oussoren | 8af24c1 | 2010-02-07 12:03:42 +0000 | [diff] [blame] | 3051 | if test -n "${UNIVERSALSDK}" |
| 3052 | then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3053 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5 |
| 3054 | $as_echo "${UNIVERSALSDK}" >&6; } |
Ronald Oussoren | 8af24c1 | 2010-02-07 12:03:42 +0000 | [diff] [blame] | 3055 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3056 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3057 | $as_echo "no" >&6; } |
Ronald Oussoren | 8af24c1 | 2010-02-07 12:03:42 +0000 | [diff] [blame] | 3058 | fi |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3059 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3060 | |
Benjamin Peterson | 6794aa3 | 2008-07-16 20:33:37 +0000 | [diff] [blame] | 3061 | |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 3062 | ARCH_RUN_32BIT="" |
Benjamin Peterson | 6794aa3 | 2008-07-16 20:33:37 +0000 | [diff] [blame] | 3063 | |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 3064 | # For backward compatibility reasons we prefer to select '32-bit' if available, |
| 3065 | # otherwise use 'intel' |
Benjamin Peterson | 14ae959 | 2008-07-16 02:20:15 +0000 | [diff] [blame] | 3066 | UNIVERSAL_ARCHS="32-bit" |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 3067 | if test "`uname -s`" = "Darwin" |
| 3068 | then |
| 3069 | if test -n "${UNIVERSALSDK}" |
| 3070 | then |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 3071 | 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] | 3072 | then |
| 3073 | UNIVERSAL_ARCHS="intel" |
| 3074 | fi |
| 3075 | fi |
| 3076 | fi |
| 3077 | |
Ronald Oussoren | 6f6c562 | 2009-12-24 14:03:19 +0000 | [diff] [blame] | 3078 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3079 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5 |
| 3080 | $as_echo_n "checking for --with-universal-archs... " >&6; } |
Benjamin Peterson | 14ae959 | 2008-07-16 02:20:15 +0000 | [diff] [blame] | 3081 | |
| 3082 | # Check whether --with-universal-archs was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3083 | if test "${with_universal_archs+set}" = set; then : |
Benjamin Peterson | 14ae959 | 2008-07-16 02:20:15 +0000 | [diff] [blame] | 3084 | withval=$with_universal_archs; |
Benjamin Peterson | 14ae959 | 2008-07-16 02:20:15 +0000 | [diff] [blame] | 3085 | UNIVERSAL_ARCHS="$withval" |
| 3086 | |
Benjamin Peterson | 14ae959 | 2008-07-16 02:20:15 +0000 | [diff] [blame] | 3087 | fi |
| 3088 | |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 3089 | if test -n "${UNIVERSALSDK}" |
| 3090 | then |
| 3091 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5 |
| 3092 | $as_echo "${UNIVERSAL_ARCHS}" >&6; } |
| 3093 | else |
| 3094 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3095 | $as_echo "no" >&6; } |
| 3096 | fi |
Benjamin Peterson | 14ae959 | 2008-07-16 02:20:15 +0000 | [diff] [blame] | 3097 | |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 3098 | |
| 3099 | # Check whether --with-framework-name was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3100 | if test "${with_framework_name+set}" = set; then : |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 3101 | withval=$with_framework_name; |
| 3102 | PYTHONFRAMEWORK=${withval} |
| 3103 | PYTHONFRAMEWORKDIR=${withval}.framework |
| 3104 | PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'` |
| 3105 | |
| 3106 | else |
| 3107 | |
| 3108 | PYTHONFRAMEWORK=Python |
| 3109 | PYTHONFRAMEWORKDIR=Python.framework |
| 3110 | PYTHONFRAMEWORKIDENTIFIER=org.python.python |
| 3111 | |
| 3112 | fi |
| 3113 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3114 | # Check whether --enable-framework was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3115 | if test "${enable_framework+set}" = set; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3116 | enableval=$enable_framework; |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3117 | case $enableval in |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3118 | yes) |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3119 | enableval=/Library/Frameworks |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3120 | esac |
| 3121 | case $enableval in |
| 3122 | no) |
| 3123 | PYTHONFRAMEWORK= |
| 3124 | PYTHONFRAMEWORKDIR=no-framework |
| 3125 | PYTHONFRAMEWORKPREFIX= |
| 3126 | PYTHONFRAMEWORKINSTALLDIR= |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3127 | FRAMEWORKINSTALLFIRST= |
| 3128 | FRAMEWORKINSTALLLAST= |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 3129 | FRAMEWORKALTINSTALLFIRST= |
| 3130 | FRAMEWORKALTINSTALLLAST= |
Ned Deily | b8f944f | 2013-11-21 22:42:25 -0800 | [diff] [blame] | 3131 | FRAMEWORKPYTHONW= |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 3132 | if test "x${prefix}" = "xNONE"; then |
| 3133 | FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}" |
| 3134 | else |
| 3135 | FRAMEWORKUNIXTOOLSPREFIX="${prefix}" |
| 3136 | fi |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3137 | enable_framework= |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3138 | ;; |
| 3139 | *) |
Ronald Oussoren | 86b33c8 | 2010-04-30 11:41:56 +0000 | [diff] [blame] | 3140 | PYTHONFRAMEWORKPREFIX="${enableval}" |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3141 | PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3142 | FRAMEWORKINSTALLFIRST="frameworkinstallstructure" |
Ronald Oussoren | f6ccbf6 | 2009-06-02 10:55:56 +0000 | [diff] [blame] | 3143 | FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure " |
Ronald Oussoren | 6f6c562 | 2009-12-24 14:03:19 +0000 | [diff] [blame] | 3144 | FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools" |
| 3145 | FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools" |
Ned Deily | b8f944f | 2013-11-21 22:42:25 -0800 | [diff] [blame] | 3146 | FRAMEWORKPYTHONW="frameworkpythonw" |
Ronald Oussoren | 86b33c8 | 2010-04-30 11:41:56 +0000 | [diff] [blame] | 3147 | FRAMEWORKINSTALLAPPSPREFIX="/Applications" |
Benjamin Peterson | 14ae959 | 2008-07-16 02:20:15 +0000 | [diff] [blame] | 3148 | |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 3149 | if test "x${prefix}" = "xNONE" ; then |
| 3150 | FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}" |
Ronald Oussoren | 86b33c8 | 2010-04-30 11:41:56 +0000 | [diff] [blame] | 3151 | |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 3152 | else |
| 3153 | FRAMEWORKUNIXTOOLSPREFIX="${prefix}" |
| 3154 | fi |
Ronald Oussoren | 86b33c8 | 2010-04-30 11:41:56 +0000 | [diff] [blame] | 3155 | |
| 3156 | case "${enableval}" in |
| 3157 | /System*) |
| 3158 | FRAMEWORKINSTALLAPPSPREFIX="/Applications" |
| 3159 | if test "${prefix}" = "NONE" ; then |
| 3160 | # See below |
| 3161 | FRAMEWORKUNIXTOOLSPREFIX="/usr" |
| 3162 | fi |
| 3163 | ;; |
| 3164 | |
| 3165 | /Library*) |
| 3166 | FRAMEWORKINSTALLAPPSPREFIX="/Applications" |
| 3167 | ;; |
| 3168 | |
| 3169 | */Library/Frameworks) |
| 3170 | MDIR="`dirname "${enableval}"`" |
| 3171 | MDIR="`dirname "${MDIR}"`" |
| 3172 | FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications" |
| 3173 | |
| 3174 | if test "${prefix}" = "NONE"; then |
| 3175 | # User hasn't specified the |
| 3176 | # --prefix option, but wants to install |
| 3177 | # the framework in a non-default location, |
| 3178 | # ensure that the compatibility links get |
| 3179 | # installed relative to that prefix as well |
| 3180 | # instead of in /usr/local. |
| 3181 | FRAMEWORKUNIXTOOLSPREFIX="${MDIR}" |
| 3182 | fi |
| 3183 | ;; |
| 3184 | |
| 3185 | *) |
| 3186 | FRAMEWORKINSTALLAPPSPREFIX="/Applications" |
| 3187 | ;; |
| 3188 | esac |
| 3189 | |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3190 | prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3191 | |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 3192 | # Add files for Mac specific code to the list of output |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3193 | # files: |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3194 | ac_config_files="$ac_config_files Mac/Makefile" |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3195 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3196 | ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile" |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3197 | |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 3198 | ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist" |
| 3199 | |
| 3200 | ac_config_files="$ac_config_files Mac/Resources/app/Info.plist" |
| 3201 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3202 | esac |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3203 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3204 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3205 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3206 | PYTHONFRAMEWORK= |
Jack Jansen | 127e56e | 2001-09-11 14:41:54 +0000 | [diff] [blame] | 3207 | PYTHONFRAMEWORKDIR=no-framework |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3208 | PYTHONFRAMEWORKPREFIX= |
| 3209 | PYTHONFRAMEWORKINSTALLDIR= |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3210 | FRAMEWORKINSTALLFIRST= |
| 3211 | FRAMEWORKINSTALLLAST= |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 3212 | FRAMEWORKALTINSTALLFIRST= |
| 3213 | FRAMEWORKALTINSTALLLAST= |
Ned Deily | b8f944f | 2013-11-21 22:42:25 -0800 | [diff] [blame] | 3214 | FRAMEWORKPYTHONW= |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 3215 | if test "x${prefix}" = "xNONE" ; then |
| 3216 | FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}" |
| 3217 | else |
| 3218 | FRAMEWORKUNIXTOOLSPREFIX="${prefix}" |
| 3219 | fi |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3220 | enable_framework= |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3221 | |
Benjamin Peterson | 14ae959 | 2008-07-16 02:20:15 +0000 | [diff] [blame] | 3222 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3223 | fi |
| 3224 | |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3225 | |
| 3226 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3227 | |
| 3228 | |
| 3229 | |
| 3230 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3231 | |
Thomas Wouters | 73e5a5b | 2006-06-08 15:35:45 +0000 | [diff] [blame] | 3232 | |
| 3233 | |
| 3234 | |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 3235 | |
Ronald Oussoren | 86b33c8 | 2010-04-30 11:41:56 +0000 | [diff] [blame] | 3236 | |
Ned Deily | b8f944f | 2013-11-21 22:42:25 -0800 | [diff] [blame] | 3237 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3238 | ##AC_ARG_WITH(dyld, |
Matthias Klose | 2b8733f | 2010-04-25 18:34:36 +0000 | [diff] [blame] | 3239 | ## AS_HELP_STRING([--with-dyld], |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 3240 | ## [Use (OpenStep|Rhapsody) dynamic linker])) |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 3241 | ## |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3242 | # Set name for machine-dependent library files |
| 3243 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3244 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5 |
| 3245 | $as_echo_n "checking MACHDEP... " >&6; } |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3246 | if test -z "$MACHDEP" |
| 3247 | then |
Matthias Klose | df2aecb | 2012-03-15 22:19:28 +0100 | [diff] [blame] | 3248 | # avoid using uname for cross builds |
| 3249 | if test "$cross_compiling" = yes; then |
doko@python.org | 44bbbda | 2013-01-25 14:44:00 +0100 | [diff] [blame] | 3250 | # ac_sys_system and ac_sys_release are used for setting |
| 3251 | # a lot of different things including 'define_xopen_source' |
| 3252 | # in the case statement below. |
Matthias Klose | df2aecb | 2012-03-15 22:19:28 +0100 | [diff] [blame] | 3253 | case "$host" in |
Xavier de Gaye | 2a352b6 | 2017-01-04 21:51:16 +0100 | [diff] [blame] | 3254 | *-*-linux-android*) |
| 3255 | ac_sys_system=Linux-android |
| 3256 | ;; |
Matthias Klose | df2aecb | 2012-03-15 22:19:28 +0100 | [diff] [blame] | 3257 | *-*-linux*) |
| 3258 | ac_sys_system=Linux |
| 3259 | ;; |
| 3260 | *-*-cygwin*) |
| 3261 | ac_sys_system=Cygwin |
| 3262 | ;; |
| 3263 | *) |
| 3264 | # for now, limit cross builds to known configurations |
| 3265 | MACHDEP="unknown" |
| 3266 | as_fn_error $? "cross build not supported for $host" "$LINENO" 5 |
| 3267 | esac |
| 3268 | ac_sys_release= |
| 3269 | else |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3270 | ac_sys_system=`uname -s` |
Benjamin Peterson | 8719ad5 | 2009-09-11 22:24:02 +0000 | [diff] [blame] | 3271 | if test "$ac_sys_system" = "AIX" \ |
Martin v. Löwis | 21ee409 | 2002-09-30 16:19:48 +0000 | [diff] [blame] | 3272 | -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3273 | ac_sys_release=`uname -v` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3274 | else |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3275 | ac_sys_release=`uname -r` |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3276 | fi |
Matthias Klose | df2aecb | 2012-03-15 22:19:28 +0100 | [diff] [blame] | 3277 | fi |
| 3278 | ac_md_system=`echo $ac_sys_system | |
| 3279 | tr -d '/ ' | tr '[A-Z]' '[a-z]'` |
| 3280 | ac_md_release=`echo $ac_sys_release | |
| 3281 | tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'` |
| 3282 | MACHDEP="$ac_md_system$ac_md_release" |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 3283 | |
Matthias Klose | df2aecb | 2012-03-15 22:19:28 +0100 | [diff] [blame] | 3284 | case $MACHDEP in |
Victor Stinner | 7209ff2 | 2011-08-21 00:00:16 +0200 | [diff] [blame] | 3285 | linux*) MACHDEP="linux";; |
Andrew M. Kuchling | 5a3e4cb | 2001-07-20 19:29:04 +0000 | [diff] [blame] | 3286 | cygwin*) MACHDEP="cygwin";; |
Jack Jansen | 8a97f4a | 2001-12-05 23:27:32 +0000 | [diff] [blame] | 3287 | darwin*) MACHDEP="darwin";; |
doko@ubuntu.com | ba01583 | 2012-06-30 16:52:05 +0200 | [diff] [blame] | 3288 | irix646) MACHDEP="irix6";; |
Guido van Rossum | b97ef17 | 1997-09-28 05:44:03 +0000 | [diff] [blame] | 3289 | '') MACHDEP="unknown";; |
Matthias Klose | df2aecb | 2012-03-15 22:19:28 +0100 | [diff] [blame] | 3290 | esac |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3291 | fi |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 3292 | |
doko@ubuntu.com | 1abe1c5 | 2012-06-30 20:42:45 +0200 | [diff] [blame] | 3293 | |
| 3294 | if test "$cross_compiling" = yes; then |
| 3295 | case "$host" in |
| 3296 | *-*-linux*) |
| 3297 | case "$host_cpu" in |
| 3298 | arm*) |
| 3299 | _host_cpu=arm |
| 3300 | ;; |
| 3301 | *) |
| 3302 | _host_cpu=$host_cpu |
| 3303 | esac |
| 3304 | ;; |
| 3305 | *-*-cygwin*) |
| 3306 | _host_cpu= |
| 3307 | ;; |
| 3308 | *) |
| 3309 | # for now, limit cross builds to known configurations |
| 3310 | MACHDEP="unknown" |
| 3311 | as_fn_error $? "cross build not supported for $host" "$LINENO" 5 |
| 3312 | esac |
| 3313 | _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}" |
| 3314 | fi |
| 3315 | |
Martin v. Löwis | 35195ad | 2002-11-11 13:26:51 +0000 | [diff] [blame] | 3316 | # Some systems cannot stand _XOPEN_SOURCE being defined at all; they |
| 3317 | # disable features if it is defined, without any means to access these |
| 3318 | # features as extensions. For these systems, we skip the definition of |
| 3319 | # _XOPEN_SOURCE. Before adding a system to the list to gain access to |
| 3320 | # some feature, make sure there is no alternative way to access this |
| 3321 | # feature. Also, when using wildcards, make sure you have verified the |
| 3322 | # need for not defining _XOPEN_SOURCE on all systems matching the |
| 3323 | # wildcard, and that the wildcard does not include future systems |
| 3324 | # (which may remove their limitations). |
| 3325 | case $ac_sys_system/$ac_sys_release in |
| 3326 | # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined, |
| 3327 | # 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] | 3328 | # 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] | 3329 | # In addition, Stefan Krah confirms that issue #1244610 exists through |
| 3330 | # OpenBSD 4.6, but is fixed in 4.7. |
Charles-François Natali | 54ef40b | 2011-07-22 23:52:02 +0200 | [diff] [blame] | 3331 | OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456]) |
Christian Heimes | 5b5e81c | 2007-12-31 16:14:33 +0000 | [diff] [blame] | 3332 | define_xopen_source=no |
| 3333 | # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is |
| 3334 | # also defined. This can be overridden by defining _BSD_SOURCE |
| 3335 | # As this has a different meaning on Linux, only define it on OpenBSD |
| 3336 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3337 | $as_echo "#define _BSD_SOURCE 1" >>confdefs.h |
Christian Heimes | 5b5e81c | 2007-12-31 16:14:33 +0000 | [diff] [blame] | 3338 | |
| 3339 | ;; |
Charles-François Natali | 54ef40b | 2011-07-22 23:52:02 +0200 | [diff] [blame] | 3340 | OpenBSD/*) |
Martin v. Löwis | 7671efc | 2010-02-15 08:35:16 +0000 | [diff] [blame] | 3341 | # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is |
| 3342 | # also defined. This can be overridden by defining _BSD_SOURCE |
| 3343 | # As this has a different meaning on Linux, only define it on OpenBSD |
| 3344 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3345 | $as_echo "#define _BSD_SOURCE 1" >>confdefs.h |
Martin v. Löwis | 7671efc | 2010-02-15 08:35:16 +0000 | [diff] [blame] | 3346 | |
| 3347 | ;; |
Thomas Wouters | 89f507f | 2006-12-13 04:49:30 +0000 | [diff] [blame] | 3348 | # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of |
| 3349 | # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by |
| 3350 | # Marc Recht |
Benjamin Peterson | f608c61 | 2008-11-16 18:33:53 +0000 | [diff] [blame] | 3351 | 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] | 3352 | define_xopen_source=no;; |
Martin v. Löwis | 1a41576 | 2010-05-28 15:44:20 +0000 | [diff] [blame] | 3353 | # From the perspective of Solaris, _XOPEN_SOURCE is not so much a |
| 3354 | # request to enable features supported by the standard as a request |
| 3355 | # to disable features not supported by the standard. The best way |
| 3356 | # for Python to use Solaris is simply to leave _XOPEN_SOURCE out |
| 3357 | # entirely and define __EXTENSIONS__ instead. |
| 3358 | SunOS/*) |
Martin v. Löwis | a9d7142 | 2003-03-28 18:43:31 +0000 | [diff] [blame] | 3359 | define_xopen_source=no;; |
Martin v. Löwis | c2409b4 | 2003-05-11 05:53:41 +0000 | [diff] [blame] | 3360 | # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE, |
| 3361 | # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice. |
Jack Jansen | 6b08a40 | 2004-06-03 12:41:45 +0000 | [diff] [blame] | 3362 | # Reconfirmed for 7.1.4 by Martin v. Loewis. |
Martin v. Löwis | 253d1f4 | 2004-05-07 19:14:14 +0000 | [diff] [blame] | 3363 | OpenUNIX/8.0.0| UnixWare/7.1.[0-4]) |
Martin v. Löwis | c2409b4 | 2003-05-11 05:53:41 +0000 | [diff] [blame] | 3364 | define_xopen_source=no;; |
| 3365 | # 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] | 3366 | # 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] | 3367 | SCO_SV/3.2) |
Martin v. Löwis | 53e73c3 | 2003-05-05 05:13:18 +0000 | [diff] [blame] | 3368 | define_xopen_source=no;; |
Martin v. Löwis | b37509b | 2008-11-04 20:45:29 +0000 | [diff] [blame] | 3369 | # On FreeBSD 4, the math functions C89 does not cover are never defined |
| 3370 | # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them. |
| 3371 | FreeBSD/4.*) |
| 3372 | define_xopen_source=no;; |
| 3373 | # On MacOS X 10.2, a bug in ncurses.h means that it craps out if |
| 3374 | # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which |
| 3375 | # identifies itself as Darwin/7.* |
| 3376 | # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE |
| 3377 | # disables platform specific features beyond repair. |
| 3378 | # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE |
| 3379 | # has no effect, don't bother defining them |
| 3380 | Darwin/[6789].*) |
Anthony Baxter | 6169c6b | 2003-10-04 07:46:23 +0000 | [diff] [blame] | 3381 | define_xopen_source=no;; |
Ronald Oussoren | 92fb941 | 2010-03-09 06:40:19 +0000 | [diff] [blame] | 3382 | Darwin/1[0-9].*) |
Ronald Oussoren | b8f11a6 | 2010-03-08 07:02:03 +0000 | [diff] [blame] | 3383 | define_xopen_source=no;; |
Trent Mick | c5625ba | 2004-08-25 23:59:39 +0000 | [diff] [blame] | 3384 | # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but |
| 3385 | # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined |
| 3386 | # 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] | 3387 | AIX/4) |
| 3388 | define_xopen_source=no;; |
Trent Mick | c5625ba | 2004-08-25 23:59:39 +0000 | [diff] [blame] | 3389 | AIX/5) |
| 3390 | if test `uname -r` -eq 1; then |
| 3391 | define_xopen_source=no |
| 3392 | fi |
| 3393 | ;; |
Benjamin Peterson | de9c869 | 2008-07-01 18:23:09 +0000 | [diff] [blame] | 3394 | # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from |
| 3395 | # defining NI_NUMERICHOST. |
| 3396 | QNX/6.3.2) |
| 3397 | define_xopen_source=no |
| 3398 | ;; |
Bob Ippolito | 7026a0a | 2005-03-28 23:23:47 +0000 | [diff] [blame] | 3399 | |
Martin v. Löwis | 35195ad | 2002-11-11 13:26:51 +0000 | [diff] [blame] | 3400 | esac |
| 3401 | |
| 3402 | if test $define_xopen_source = yes |
| 3403 | then |
Victor Stinner | 14d098d | 2011-09-07 22:29:43 +0200 | [diff] [blame] | 3404 | # X/Open 7, incorporating POSIX.1-2008 |
Martin v. Löwis | 678fc1e | 2002-11-12 06:04:39 +0000 | [diff] [blame] | 3405 | |
Victor Stinner | 14d098d | 2011-09-07 22:29:43 +0200 | [diff] [blame] | 3406 | $as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h |
Martin v. Löwis | 35195ad | 2002-11-11 13:26:51 +0000 | [diff] [blame] | 3407 | |
Martin v. Löwis | 678fc1e | 2002-11-12 06:04:39 +0000 | [diff] [blame] | 3408 | |
| 3409 | # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires |
| 3410 | # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else |
| 3411 | # several APIs are not declared. Since this is also needed in some |
| 3412 | # cases for HP-UX, we define it globally. |
Martin v. Löwis | 678fc1e | 2002-11-12 06:04:39 +0000 | [diff] [blame] | 3413 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3414 | $as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h |
Martin v. Löwis | 678fc1e | 2002-11-12 06:04:39 +0000 | [diff] [blame] | 3415 | |
| 3416 | |
Bob Ippolito | 7026a0a | 2005-03-28 23:23:47 +0000 | [diff] [blame] | 3417 | |
Victor Stinner | d169fdc | 2011-09-08 00:56:17 +0200 | [diff] [blame] | 3418 | $as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h |
Martin v. Löwis | 678fc1e | 2002-11-12 06:04:39 +0000 | [diff] [blame] | 3419 | |
Martin v. Löwis | 35195ad | 2002-11-11 13:26:51 +0000 | [diff] [blame] | 3420 | fi |
| 3421 | |
Christian Heimes | 647cd87 | 2013-12-07 23:39:33 +0100 | [diff] [blame] | 3422 | # On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE |
| 3423 | case $ac_sys_system in |
Christian Heimes | b02bcae | 2013-12-08 15:21:08 +0100 | [diff] [blame] | 3424 | hp*|HP*) |
| 3425 | define_stdc_a1=yes;; |
| 3426 | *) |
| 3427 | define_stdc_a1=no;; |
| 3428 | esac |
| 3429 | |
| 3430 | if test $define_stdc_a1 = yes |
| 3431 | then |
Christian Heimes | 647cd87 | 2013-12-07 23:39:33 +0100 | [diff] [blame] | 3432 | |
| 3433 | $as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h |
| 3434 | |
Christian Heimes | b02bcae | 2013-12-08 15:21:08 +0100 | [diff] [blame] | 3435 | fi |
Christian Heimes | 647cd87 | 2013-12-07 23:39:33 +0100 | [diff] [blame] | 3436 | |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 3437 | # |
| 3438 | # SGI compilers allow the specification of the both the ABI and the |
| 3439 | # ISA on the command line. Depending on the values of these switches, |
Martin Panter | 46f5072 | 2016-05-26 05:35:26 +0000 | [diff] [blame] | 3440 | # different and often incompatible code will be generated. |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 3441 | # |
| 3442 | # The SGI_ABI variable can be used to modify the CC and LDFLAGS and |
| 3443 | # thus supply support for various ABI/ISA combinations. The MACHDEP |
| 3444 | # variable is also adjusted. |
| 3445 | # |
| 3446 | |
| 3447 | if test ! -z "$SGI_ABI" |
| 3448 | then |
| 3449 | CC="cc $SGI_ABI" |
| 3450 | LDFLAGS="$SGI_ABI $LDFLAGS" |
| 3451 | MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'` |
| 3452 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3453 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5 |
| 3454 | $as_echo "$MACHDEP" >&6; } |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3455 | |
Jack Jansen | 6b08a40 | 2004-06-03 12:41:45 +0000 | [diff] [blame] | 3456 | # Record the configure-time value of MACOSX_DEPLOYMENT_TARGET, |
| 3457 | # it may influence the way we can build extensions, so distutils |
| 3458 | # needs to check it |
| 3459 | |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3460 | |
Jack Jansen | 6b08a40 | 2004-06-03 12:41:45 +0000 | [diff] [blame] | 3461 | CONFIGURE_MACOSX_DEPLOYMENT_TARGET= |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 3462 | EXPORT_MACOSX_DEPLOYMENT_TARGET='#' |
Jack Jansen | 6b08a40 | 2004-06-03 12:41:45 +0000 | [diff] [blame] | 3463 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 3464 | # checks for alternative programs |
Skip Montanaro | decc6a4 | 2003-01-01 20:07:49 +0000 | [diff] [blame] | 3465 | |
| 3466 | # compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just |
| 3467 | # for debug/optimization stuff. BASECFLAGS is for flags that are required |
| 3468 | # just to get things to compile and link. Users are free to override OPT |
| 3469 | # when running configure or make. The build should not break if they do. |
| 3470 | # BASECFLAGS should generally not be messed with, however. |
| 3471 | |
| 3472 | # XXX shouldn't some/most/all of this code be merged with the stuff later |
| 3473 | # on that fiddles with OPT and BASECFLAGS? |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3474 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5 |
| 3475 | $as_echo_n "checking for --without-gcc... " >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3476 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3477 | # Check whether --with-gcc was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3478 | if test "${with_gcc+set}" = set; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3479 | withval=$with_gcc; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3480 | case $withval in |
Antoine Pitrou | b52ec78 | 2009-01-25 16:34:23 +0000 | [diff] [blame] | 3481 | no) CC=${CC:-cc} |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3482 | without_gcc=yes;; |
| 3483 | yes) CC=gcc |
| 3484 | without_gcc=no;; |
| 3485 | *) CC=$withval |
| 3486 | without_gcc=$withval;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 3487 | esac |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 3488 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3489 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 3490 | case $ac_sys_system in |
Antoine Pitrou | f6350d2 | 2010-09-21 15:19:14 +0000 | [diff] [blame] | 3491 | AIX*) CC=${CC:-xlc_r} |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 3492 | without_gcc=;; |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 3493 | *) without_gcc=no;; |
Guido van Rossum | e77438c | 1995-09-13 18:59:59 +0000 | [diff] [blame] | 3494 | esac |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3495 | fi |
| 3496 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3497 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5 |
| 3498 | $as_echo "$without_gcc" >&6; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3499 | |
Zachary Ware | 5af8564 | 2015-12-21 12:09:17 -0600 | [diff] [blame] | 3500 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5 |
| 3501 | $as_echo_n "checking for --with-icc... " >&6; } |
| 3502 | |
| 3503 | # Check whether --with-icc was given. |
| 3504 | if test "${with_icc+set}" = set; then : |
| 3505 | withval=$with_icc; |
| 3506 | case $withval in |
| 3507 | no) CC=${CC:-cc} |
| 3508 | with_icc=no;; |
| 3509 | yes) CC=icc |
| 3510 | CXX=icpc |
| 3511 | with_icc=yes;; |
| 3512 | *) CC=$withval |
| 3513 | with_icc=$withval;; |
| 3514 | esac |
| 3515 | else |
| 3516 | |
| 3517 | with_icc=no |
| 3518 | fi |
| 3519 | |
| 3520 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5 |
| 3521 | $as_echo "$with_icc" >&6; } |
| 3522 | |
Guido van Rossum | 8b131c5 | 1995-03-09 14:10:13 +0000 | [diff] [blame] | 3523 | # If the user switches compilers, we can't believe the cache |
| 3524 | if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC" |
| 3525 | then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 3526 | as_fn_error $? "cached CC is different -- throw away $cache_file |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3527 | (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] | 3528 | fi |
| 3529 | |
Jeffrey Yasskin | d4fcdb1 | 2010-07-09 16:30:58 +0000 | [diff] [blame] | 3530 | # Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2 |
| 3531 | # when the compiler supports them, but we don't always want -O2, and |
| 3532 | # we set -g later. |
| 3533 | if test -z "$CFLAGS"; then |
| 3534 | CFLAGS= |
| 3535 | fi |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 3536 | |
| 3537 | if test "$ac_sys_system" = "Darwin" |
| 3538 | then |
| 3539 | # Compiler selection on MacOSX is more complicated than |
| 3540 | # AC_PROG_CC can handle, see Mac/README.txt for more |
| 3541 | # information |
| 3542 | if test -z "${CC}" |
| 3543 | then |
| 3544 | found_gcc= |
| 3545 | found_clang= |
| 3546 | as_save_IFS=$IFS; IFS=: |
| 3547 | for as_dir in $PATH |
| 3548 | do |
| 3549 | IFS=$as_save_IFS |
| 3550 | if test -x $as_dir/gcc; then |
| 3551 | if test -z "${found_gcc}"; then |
| 3552 | found_gcc=$as_dir/gcc |
| 3553 | fi |
| 3554 | fi |
| 3555 | if test -x $as_dir/clang; then |
| 3556 | if test -z "${found_clang}"; then |
| 3557 | found_clang=$as_dir/clang |
| 3558 | fi |
| 3559 | fi |
| 3560 | done |
| 3561 | IFS=$as_save_IFS |
| 3562 | |
| 3563 | if test -n "$found_gcc" -a -n "$found_clang" |
| 3564 | then |
| 3565 | if test -n "`"$found_gcc" --version | grep llvm-gcc`" |
| 3566 | then |
| 3567 | { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5 |
| 3568 | $as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;} |
| 3569 | CC="$found_clang" |
| 3570 | CXX="$found_clang++" |
| 3571 | fi |
| 3572 | |
| 3573 | |
| 3574 | elif test -z "$found_gcc" -a -n "$found_clang" |
| 3575 | then |
| 3576 | { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5 |
| 3577 | $as_echo "$as_me: No GCC found, use CLANG" >&6;} |
| 3578 | CC="$found_clang" |
| 3579 | CXX="$found_clang++" |
| 3580 | |
| 3581 | elif test -z "$found_gcc" -a -z "$found_clang" |
| 3582 | then |
| 3583 | found_clang=`/usr/bin/xcrun -find clang 2>/dev/null` |
| 3584 | if test -n "${found_clang}" |
| 3585 | then |
| 3586 | { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5 |
| 3587 | $as_echo "$as_me: Using clang from Xcode.app" >&6;} |
| 3588 | CC="${found_clang}" |
| 3589 | CXX="`/usr/bin/xcrun -find clang++`" |
| 3590 | |
| 3591 | # else: use default behaviour |
| 3592 | fi |
| 3593 | fi |
| 3594 | fi |
| 3595 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3596 | ac_ext=c |
| 3597 | ac_cpp='$CPP $CPPFLAGS' |
| 3598 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 3599 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 3600 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
| 3601 | if test -n "$ac_tool_prefix"; then |
| 3602 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. |
| 3603 | set dummy ${ac_tool_prefix}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_CC+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3607 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3608 | else |
| 3609 | if test -n "$CC"; then |
| 3610 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 3611 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 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_CC="${ac_tool_prefix}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 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 3627 | fi |
| 3628 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3629 | CC=$ac_cv_prog_CC |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 3630 | if test -n "$CC"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3631 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
| 3632 | $as_echo "$CC" >&6; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +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 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3639 | fi |
| 3640 | if test -z "$ac_cv_prog_CC"; then |
| 3641 | ac_ct_CC=$CC |
| 3642 | # Extract the first word of "gcc", so it can be a program name with args. |
| 3643 | set dummy gcc; ac_word=$2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3644 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 3645 | $as_echo_n "checking for $ac_word... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 3646 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3647 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3648 | else |
| 3649 | if test -n "$ac_ct_CC"; then |
| 3650 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. |
| 3651 | else |
| 3652 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 3653 | for as_dir in $PATH |
| 3654 | do |
| 3655 | IFS=$as_save_IFS |
| 3656 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3657 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 3658 | 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] | 3659 | ac_cv_prog_ac_ct_CC="gcc" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3660 | $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] | 3661 | break 2 |
| 3662 | fi |
| 3663 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3664 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3665 | IFS=$as_save_IFS |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3666 | |
| 3667 | fi |
| 3668 | fi |
| 3669 | ac_ct_CC=$ac_cv_prog_ac_ct_CC |
| 3670 | if test -n "$ac_ct_CC"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3671 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
| 3672 | $as_echo "$ac_ct_CC" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3673 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3674 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3675 | $as_echo "no" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3676 | fi |
| 3677 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3678 | if test "x$ac_ct_CC" = x; then |
| 3679 | CC="" |
| 3680 | else |
| 3681 | case $cross_compiling:$ac_tool_warned in |
| 3682 | yes:) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3683 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 3684 | $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] | 3685 | ac_tool_warned=yes ;; |
| 3686 | esac |
| 3687 | CC=$ac_ct_CC |
| 3688 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3689 | else |
| 3690 | CC="$ac_cv_prog_CC" |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 3691 | fi |
| 3692 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 3693 | if test -z "$CC"; then |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3694 | if test -n "$ac_tool_prefix"; then |
| 3695 | # 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] | 3696 | set dummy ${ac_tool_prefix}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 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +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 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3705 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 3706 | for as_dir in $PATH |
| 3707 | do |
| 3708 | IFS=$as_save_IFS |
| 3709 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3710 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 3711 | 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] | 3712 | ac_cv_prog_CC="${ac_tool_prefix}cc" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3713 | $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] | 3714 | break 2 |
| 3715 | fi |
| 3716 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3717 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3718 | IFS=$as_save_IFS |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3719 | |
| 3720 | fi |
| 3721 | fi |
| 3722 | CC=$ac_cv_prog_CC |
| 3723 | if test -n "$CC"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3724 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
| 3725 | $as_echo "$CC" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3726 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3727 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3728 | $as_echo "no" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3729 | fi |
| 3730 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3731 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3732 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3733 | fi |
| 3734 | if test -z "$CC"; then |
| 3735 | # Extract the first word of "cc", so it can be a program name with args. |
| 3736 | set dummy cc; ac_word=$2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3737 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 3738 | $as_echo_n "checking for $ac_word... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 3739 | if ${ac_cv_prog_CC+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3740 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3741 | else |
| 3742 | if test -n "$CC"; then |
| 3743 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 3744 | else |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3745 | ac_prog_rejected=no |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3746 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 3747 | for as_dir in $PATH |
| 3748 | do |
| 3749 | IFS=$as_save_IFS |
| 3750 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3751 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 3752 | 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] | 3753 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then |
| 3754 | ac_prog_rejected=yes |
| 3755 | continue |
| 3756 | fi |
| 3757 | ac_cv_prog_CC="cc" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3758 | $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] | 3759 | break 2 |
| 3760 | fi |
| 3761 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3762 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3763 | IFS=$as_save_IFS |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3764 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3765 | if test $ac_prog_rejected = yes; then |
| 3766 | # We found a bogon in the path, so make sure we never use it. |
| 3767 | set dummy $ac_cv_prog_CC |
| 3768 | shift |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3769 | if test $# != 0; then |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3770 | # We chose a different compiler from the bogus one. |
| 3771 | # However, it has the same basename, so the bogon will be chosen |
| 3772 | # first if we set CC to just the basename; use the full file name. |
| 3773 | shift |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 3774 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3775 | fi |
| 3776 | fi |
| 3777 | fi |
| 3778 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3779 | CC=$ac_cv_prog_CC |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3780 | if test -n "$CC"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3781 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
| 3782 | $as_echo "$CC" >&6; } |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3783 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3784 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3785 | $as_echo "no" >&6; } |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 3786 | fi |
| 3787 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3788 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3789 | fi |
| 3790 | if test -z "$CC"; then |
| 3791 | if test -n "$ac_tool_prefix"; then |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3792 | for ac_prog in cl.exe |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3793 | do |
| 3794 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. |
| 3795 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3796 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 3797 | $as_echo_n "checking for $ac_word... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 3798 | if ${ac_cv_prog_CC+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3799 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 3800 | else |
| 3801 | if test -n "$CC"; then |
| 3802 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 3803 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3804 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 3805 | for as_dir in $PATH |
| 3806 | do |
| 3807 | IFS=$as_save_IFS |
| 3808 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3809 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 3810 | 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] | 3811 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3812 | $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] | 3813 | break 2 |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 3814 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3815 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3816 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3817 | IFS=$as_save_IFS |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3818 | |
| 3819 | fi |
| 3820 | fi |
| 3821 | CC=$ac_cv_prog_CC |
| 3822 | if test -n "$CC"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3823 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
| 3824 | $as_echo "$CC" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3825 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3826 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3827 | $as_echo "no" >&6; } |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 3828 | fi |
| 3829 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3830 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3831 | test -n "$CC" && break |
| 3832 | done |
| 3833 | fi |
| 3834 | if test -z "$CC"; then |
| 3835 | ac_ct_CC=$CC |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3836 | for ac_prog in cl.exe |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3837 | do |
| 3838 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 3839 | set dummy $ac_prog; ac_word=$2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3840 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 3841 | $as_echo_n "checking for $ac_word... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 3842 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3843 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3844 | else |
| 3845 | if test -n "$ac_ct_CC"; then |
| 3846 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. |
| 3847 | else |
| 3848 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 3849 | for as_dir in $PATH |
| 3850 | do |
| 3851 | IFS=$as_save_IFS |
| 3852 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3853 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 3854 | 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] | 3855 | ac_cv_prog_ac_ct_CC="$ac_prog" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3856 | $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] | 3857 | break 2 |
| 3858 | fi |
| 3859 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3860 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3861 | IFS=$as_save_IFS |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 3862 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3863 | fi |
| 3864 | fi |
| 3865 | ac_ct_CC=$ac_cv_prog_ac_ct_CC |
| 3866 | if test -n "$ac_ct_CC"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3867 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
| 3868 | $as_echo "$ac_ct_CC" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3869 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3870 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3871 | $as_echo "no" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3872 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3873 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3874 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3875 | test -n "$ac_ct_CC" && break |
| 3876 | done |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 3877 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3878 | if test "x$ac_ct_CC" = x; then |
| 3879 | CC="" |
| 3880 | else |
| 3881 | case $cross_compiling:$ac_tool_warned in |
| 3882 | yes:) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3883 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 3884 | $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] | 3885 | ac_tool_warned=yes ;; |
| 3886 | esac |
| 3887 | CC=$ac_ct_CC |
| 3888 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3889 | fi |
| 3890 | |
| 3891 | fi |
| 3892 | |
| 3893 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3894 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 3895 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 3896 | as_fn_error $? "no acceptable C compiler found in \$PATH |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 3897 | See \`config.log' for more details" "$LINENO" 5; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3898 | |
| 3899 | # Provide some information about the compiler. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3900 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
| 3901 | set X $ac_compile |
| 3902 | ac_compiler=$2 |
| 3903 | for ac_option in --version -v -V -qversion; do |
| 3904 | { { ac_try="$ac_compiler $ac_option >&5" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3905 | case "(($ac_try" in |
| 3906 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 3907 | *) ac_try_echo=$ac_try;; |
| 3908 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3909 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 3910 | $as_echo "$ac_try_echo"; } >&5 |
| 3911 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3912 | ac_status=$? |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3913 | if test -s conftest.err; then |
| 3914 | sed '10a\ |
| 3915 | ... rest of stderr output deleted ... |
| 3916 | 10q' conftest.err >conftest.er1 |
| 3917 | cat conftest.er1 >&5 |
| 3918 | fi |
| 3919 | rm -f conftest.er1 conftest.err |
| 3920 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 3921 | test $ac_status = 0; } |
| 3922 | done |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3923 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3924 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 3925 | /* end confdefs.h. */ |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 3926 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3927 | int |
| 3928 | main () |
| 3929 | { |
| 3930 | |
| 3931 | ; |
| 3932 | return 0; |
| 3933 | } |
| 3934 | _ACEOF |
| 3935 | ac_clean_files_save=$ac_clean_files |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3936 | 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] | 3937 | # Try to create an executable without -o first, disregard a.out. |
| 3938 | # It will help us diagnose broken compilers, and finding out an intuition |
| 3939 | # of exeext. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3940 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
| 3941 | $as_echo_n "checking whether the C compiler works... " >&6; } |
| 3942 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
| 3943 | |
| 3944 | # The possible output files: |
| 3945 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" |
| 3946 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3947 | ac_rmfiles= |
| 3948 | for ac_file in $ac_files |
| 3949 | do |
| 3950 | case $ac_file in |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3951 | *.$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] | 3952 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; |
| 3953 | esac |
| 3954 | done |
| 3955 | rm -f $ac_rmfiles |
| 3956 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3957 | if { { ac_try="$ac_link_default" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3958 | case "(($ac_try" in |
| 3959 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 3960 | *) ac_try_echo=$ac_try;; |
| 3961 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3962 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 3963 | $as_echo "$ac_try_echo"; } >&5 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3964 | (eval "$ac_link_default") 2>&5 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3965 | ac_status=$? |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3966 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 3967 | test $ac_status = 0; }; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3968 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. |
| 3969 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' |
| 3970 | # in a Makefile. We should not override ac_cv_exeext if it was cached, |
| 3971 | # so that the user can short-circuit this test for compilers unknown to |
| 3972 | # Autoconf. |
| 3973 | for ac_file in $ac_files '' |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 3974 | do |
| 3975 | test -f "$ac_file" || continue |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3976 | case $ac_file in |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3977 | *.$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] | 3978 | ;; |
| 3979 | [ab].out ) |
| 3980 | # We found the default executable, but exeext='' is most |
| 3981 | # certainly right. |
| 3982 | break;; |
| 3983 | *.* ) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 3984 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3985 | then :; else |
| 3986 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
| 3987 | fi |
| 3988 | # We set ac_cv_exeext here because the later test for it is not |
| 3989 | # safe: cross compilers may not add the suffix if given an `-o' |
| 3990 | # argument, so we may need to know it at that point already. |
| 3991 | # Even if this section looks crufty: it has the advantage of |
| 3992 | # actually working. |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 3993 | break;; |
| 3994 | * ) |
| 3995 | break;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 3996 | esac |
| 3997 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 3998 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
| 3999 | |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 4000 | else |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4001 | ac_file='' |
| 4002 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4003 | if test -z "$ac_file"; then : |
| 4004 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 4005 | $as_echo "no" >&6; } |
| 4006 | $as_echo "$as_me: failed program was:" >&5 |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4007 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 4008 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4009 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 4010 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 4011 | as_fn_error 77 "C compiler cannot create executables |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 4012 | See \`config.log' for more details" "$LINENO" 5; } |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4013 | else |
| 4014 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 4015 | $as_echo "yes" >&6; } |
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 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
| 4018 | $as_echo_n "checking for C compiler default output file name... " >&6; } |
| 4019 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 |
| 4020 | $as_echo "$ac_file" >&6; } |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 4021 | ac_exeext=$ac_cv_exeext |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 4022 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4023 | 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] | 4024 | ac_clean_files=$ac_clean_files_save |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4025 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 |
| 4026 | $as_echo_n "checking for suffix of executables... " >&6; } |
| 4027 | if { { ac_try="$ac_link" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4028 | case "(($ac_try" in |
| 4029 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 4030 | *) ac_try_echo=$ac_try;; |
| 4031 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4032 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 4033 | $as_echo "$ac_try_echo"; } >&5 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4034 | (eval "$ac_link") 2>&5 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4035 | ac_status=$? |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4036 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 4037 | test $ac_status = 0; }; then : |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 4038 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
| 4039 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will |
| 4040 | # work properly (i.e., refer to `conftest.exe'), while it won't with |
| 4041 | # `rm'. |
| 4042 | for ac_file in conftest.exe conftest conftest.*; do |
| 4043 | test -f "$ac_file" || continue |
| 4044 | case $ac_file in |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4045 | *.$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] | 4046 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
| 4047 | break;; |
| 4048 | * ) break;; |
| 4049 | esac |
| 4050 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4051 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4052 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 4053 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 4054 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 4055 | See \`config.log' for more details" "$LINENO" 5; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 4056 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4057 | rm -f conftest conftest$ac_cv_exeext |
| 4058 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
| 4059 | $as_echo "$ac_cv_exeext" >&6; } |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 4060 | |
| 4061 | rm -f conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4062 | EXEEXT=$ac_cv_exeext |
| 4063 | ac_exeext=$EXEEXT |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4064 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4065 | /* end confdefs.h. */ |
| 4066 | #include <stdio.h> |
| 4067 | int |
| 4068 | main () |
| 4069 | { |
| 4070 | FILE *f = fopen ("conftest.out", "w"); |
| 4071 | return ferror (f) || fclose (f) != 0; |
| 4072 | |
| 4073 | ; |
| 4074 | return 0; |
| 4075 | } |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 4076 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4077 | ac_clean_files="$ac_clean_files conftest.out" |
| 4078 | # Check that the compiler produces executables we can run. If not, either |
| 4079 | # the compiler is broken, or we cross compile. |
| 4080 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
| 4081 | $as_echo_n "checking whether we are cross compiling... " >&6; } |
| 4082 | if test "$cross_compiling" != yes; then |
| 4083 | { { ac_try="$ac_link" |
| 4084 | case "(($ac_try" in |
| 4085 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 4086 | *) ac_try_echo=$ac_try;; |
| 4087 | esac |
| 4088 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 4089 | $as_echo "$ac_try_echo"; } >&5 |
| 4090 | (eval "$ac_link") 2>&5 |
| 4091 | ac_status=$? |
| 4092 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 4093 | test $ac_status = 0; } |
| 4094 | if { ac_try='./conftest$ac_cv_exeext' |
| 4095 | { { case "(($ac_try" in |
| 4096 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 4097 | *) ac_try_echo=$ac_try;; |
| 4098 | esac |
| 4099 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 4100 | $as_echo "$ac_try_echo"; } >&5 |
| 4101 | (eval "$ac_try") 2>&5 |
| 4102 | ac_status=$? |
| 4103 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 4104 | test $ac_status = 0; }; }; then |
| 4105 | cross_compiling=no |
| 4106 | else |
| 4107 | if test "$cross_compiling" = maybe; then |
| 4108 | cross_compiling=yes |
| 4109 | else |
| 4110 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 4111 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 4112 | as_fn_error $? "cannot run C compiled programs. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4113 | If you meant to cross compile, use \`--host'. |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 4114 | See \`config.log' for more details" "$LINENO" 5; } |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4115 | fi |
| 4116 | fi |
| 4117 | fi |
| 4118 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 |
| 4119 | $as_echo "$cross_compiling" >&6; } |
| 4120 | |
| 4121 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out |
| 4122 | ac_clean_files=$ac_clean_files_save |
| 4123 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
| 4124 | $as_echo_n "checking for suffix of object files... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 4125 | if ${ac_cv_objext+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4126 | $as_echo_n "(cached) " >&6 |
| 4127 | else |
| 4128 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 4129 | /* end confdefs.h. */ |
| 4130 | |
| 4131 | int |
| 4132 | main () |
| 4133 | { |
| 4134 | |
| 4135 | ; |
| 4136 | return 0; |
| 4137 | } |
| 4138 | _ACEOF |
| 4139 | rm -f conftest.o conftest.obj |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4140 | if { { ac_try="$ac_compile" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4141 | case "(($ac_try" in |
| 4142 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 4143 | *) ac_try_echo=$ac_try;; |
| 4144 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4145 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 4146 | $as_echo "$ac_try_echo"; } >&5 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4147 | (eval "$ac_compile") 2>&5 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4148 | ac_status=$? |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4149 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 4150 | test $ac_status = 0; }; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4151 | for ac_file in conftest.o conftest.obj conftest.*; do |
| 4152 | test -f "$ac_file" || continue; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4153 | case $ac_file in |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4154 | *.$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] | 4155 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
| 4156 | break;; |
| 4157 | esac |
| 4158 | done |
| 4159 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4160 | $as_echo "$as_me: failed program was:" >&5 |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4161 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 4162 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4163 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 4164 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 4165 | as_fn_error $? "cannot compute suffix of object files: cannot compile |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 4166 | See \`config.log' for more details" "$LINENO" 5; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4167 | fi |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 4168 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4169 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4170 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
| 4171 | $as_echo "$ac_cv_objext" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4172 | OBJEXT=$ac_cv_objext |
| 4173 | ac_objext=$OBJEXT |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4174 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
| 4175 | $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] | 4176 | if ${ac_cv_c_compiler_gnu+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4177 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4178 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4179 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4180 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4181 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4182 | int |
| 4183 | main () |
| 4184 | { |
| 4185 | #ifndef __GNUC__ |
| 4186 | choke me |
| 4187 | #endif |
| 4188 | |
| 4189 | ; |
| 4190 | return 0; |
| 4191 | } |
| 4192 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4193 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4194 | ac_compiler_gnu=yes |
| 4195 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4196 | ac_compiler_gnu=no |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4197 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4198 | 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] | 4199 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
| 4200 | |
| 4201 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4202 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
| 4203 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } |
| 4204 | if test $ac_compiler_gnu = yes; then |
| 4205 | GCC=yes |
| 4206 | else |
| 4207 | GCC= |
| 4208 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4209 | ac_test_CFLAGS=${CFLAGS+set} |
| 4210 | ac_save_CFLAGS=$CFLAGS |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4211 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
| 4212 | $as_echo_n "checking whether $CC accepts -g... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 4213 | if ${ac_cv_prog_cc_g+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4214 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4215 | else |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4216 | ac_save_c_werror_flag=$ac_c_werror_flag |
| 4217 | ac_c_werror_flag=yes |
| 4218 | ac_cv_prog_cc_g=no |
| 4219 | CFLAGS="-g" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4220 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4221 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4222 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4223 | int |
| 4224 | main () |
| 4225 | { |
| 4226 | |
| 4227 | ; |
| 4228 | return 0; |
| 4229 | } |
| 4230 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4231 | if ac_fn_c_try_compile "$LINENO"; then : |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4232 | ac_cv_prog_cc_g=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4233 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4234 | CFLAGS="" |
| 4235 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4236 | /* end confdefs.h. */ |
| 4237 | |
| 4238 | int |
| 4239 | main () |
| 4240 | { |
| 4241 | |
| 4242 | ; |
| 4243 | return 0; |
| 4244 | } |
| 4245 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4246 | if ac_fn_c_try_compile "$LINENO"; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4247 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4248 | else |
| 4249 | ac_c_werror_flag=$ac_save_c_werror_flag |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4250 | CFLAGS="-g" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4251 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4252 | /* end confdefs.h. */ |
| 4253 | |
| 4254 | int |
| 4255 | main () |
| 4256 | { |
| 4257 | |
| 4258 | ; |
| 4259 | return 0; |
| 4260 | } |
| 4261 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4262 | if ac_fn_c_try_compile "$LINENO"; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4263 | ac_cv_prog_cc_g=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 4264 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4265 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4266 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4267 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 4268 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4269 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 4270 | ac_c_werror_flag=$ac_save_c_werror_flag |
| 4271 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4272 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
| 4273 | $as_echo "$ac_cv_prog_cc_g" >&6; } |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 4274 | if test "$ac_test_CFLAGS" = set; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4275 | CFLAGS=$ac_save_CFLAGS |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 4276 | elif test $ac_cv_prog_cc_g = yes; then |
| 4277 | if test "$GCC" = yes; then |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 4278 | CFLAGS="-g -O2" |
| 4279 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 4280 | CFLAGS="-g" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4281 | fi |
| 4282 | else |
Guido van Rossum | e6c2cf1 | 1999-01-08 21:08:33 +0000 | [diff] [blame] | 4283 | if test "$GCC" = yes; then |
| 4284 | CFLAGS="-O2" |
| 4285 | else |
| 4286 | CFLAGS= |
| 4287 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4288 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4289 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
| 4290 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 4291 | if ${ac_cv_prog_cc_c89+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4292 | $as_echo_n "(cached) " >&6 |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4293 | else |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4294 | ac_cv_prog_cc_c89=no |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4295 | ac_save_CC=$CC |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4296 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4297 | /* end confdefs.h. */ |
| 4298 | #include <stdarg.h> |
| 4299 | #include <stdio.h> |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 4300 | struct stat; |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4301 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ |
| 4302 | struct buf { int x; }; |
| 4303 | FILE * (*rcsopen) (struct buf *, struct stat *, int); |
| 4304 | static char *e (p, i) |
| 4305 | char **p; |
| 4306 | int i; |
| 4307 | { |
| 4308 | return p[i]; |
| 4309 | } |
| 4310 | static char *f (char * (*g) (char **, int), char **p, ...) |
| 4311 | { |
| 4312 | char *s; |
| 4313 | va_list v; |
| 4314 | va_start (v,p); |
| 4315 | s = g (p, va_arg (v,int)); |
| 4316 | va_end (v); |
| 4317 | return s; |
| 4318 | } |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 4319 | |
| 4320 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has |
| 4321 | function prototypes and stuff, but not '\xHH' hex character constants. |
| 4322 | These don't provoke an error unfortunately, instead are silently treated |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4323 | 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] | 4324 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
| 4325 | 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] | 4326 | that's true only with -std. */ |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 4327 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
| 4328 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4329 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
| 4330 | inside strings and character constants. */ |
| 4331 | #define FOO(x) 'x' |
| 4332 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; |
| 4333 | |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4334 | int test (int i, double x); |
| 4335 | struct s1 {int (*f) (int a);}; |
| 4336 | struct s2 {int (*f) (double a);}; |
| 4337 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); |
| 4338 | int argc; |
| 4339 | char **argv; |
| 4340 | int |
| 4341 | main () |
| 4342 | { |
| 4343 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
| 4344 | ; |
| 4345 | return 0; |
| 4346 | } |
| 4347 | _ACEOF |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4348 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
| 4349 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4350 | do |
| 4351 | CC="$ac_save_CC $ac_arg" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4352 | if ac_fn_c_try_compile "$LINENO"; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4353 | ac_cv_prog_cc_c89=$ac_arg |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4354 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4355 | rm -f core conftest.err conftest.$ac_objext |
| 4356 | test "x$ac_cv_prog_cc_c89" != "xno" && break |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4357 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4358 | rm -f conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4359 | CC=$ac_save_CC |
| 4360 | |
| 4361 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4362 | # AC_CACHE_VAL |
| 4363 | case "x$ac_cv_prog_cc_c89" in |
| 4364 | x) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4365 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
| 4366 | $as_echo "none needed" >&6; } ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4367 | xno) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4368 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 |
| 4369 | $as_echo "unsupported" >&6; } ;; |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4370 | *) |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4371 | CC="$CC $ac_cv_prog_cc_c89" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4372 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 |
| 4373 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4374 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4375 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4376 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4377 | fi |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 4378 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 4379 | ac_ext=c |
| 4380 | ac_cpp='$CPP $CPPFLAGS' |
| 4381 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 4382 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 4383 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 4384 | |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 4385 | ac_ext=c |
| 4386 | ac_cpp='$CPP $CPPFLAGS' |
| 4387 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 4388 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 4389 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
| 4390 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
| 4391 | $as_echo_n "checking how to run the C preprocessor... " >&6; } |
| 4392 | # On Suns, sometimes $CPP names a directory. |
| 4393 | if test -n "$CPP" && test -d "$CPP"; then |
| 4394 | CPP= |
| 4395 | fi |
| 4396 | if test -z "$CPP"; then |
| 4397 | if ${ac_cv_prog_CPP+:} false; then : |
| 4398 | $as_echo_n "(cached) " >&6 |
| 4399 | else |
| 4400 | # Double quotes because CPP needs to be expanded |
| 4401 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" |
| 4402 | do |
| 4403 | ac_preproc_ok=false |
| 4404 | for ac_c_preproc_warn_flag in '' yes |
| 4405 | do |
| 4406 | # Use a header file that comes with gcc, so configuring glibc |
| 4407 | # with a fresh cross-compiler works. |
| 4408 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
| 4409 | # <limits.h> exists even on freestanding compilers. |
| 4410 | # On the NeXT, cc -E runs the code through the compiler's parser, |
| 4411 | # not just through cpp. "Syntax error" is here to catch this case. |
| 4412 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4413 | /* end confdefs.h. */ |
| 4414 | #ifdef __STDC__ |
| 4415 | # include <limits.h> |
| 4416 | #else |
| 4417 | # include <assert.h> |
| 4418 | #endif |
| 4419 | Syntax error |
| 4420 | _ACEOF |
| 4421 | if ac_fn_c_try_cpp "$LINENO"; then : |
| 4422 | |
| 4423 | else |
| 4424 | # Broken: fails on valid input. |
| 4425 | continue |
| 4426 | fi |
| 4427 | rm -f conftest.err conftest.i conftest.$ac_ext |
| 4428 | |
| 4429 | # OK, works on sane cases. Now check whether nonexistent headers |
| 4430 | # can be detected and how. |
| 4431 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4432 | /* end confdefs.h. */ |
| 4433 | #include <ac_nonexistent.h> |
| 4434 | _ACEOF |
| 4435 | if ac_fn_c_try_cpp "$LINENO"; then : |
| 4436 | # Broken: success on invalid input. |
| 4437 | continue |
| 4438 | else |
| 4439 | # Passes both tests. |
| 4440 | ac_preproc_ok=: |
| 4441 | break |
| 4442 | fi |
| 4443 | rm -f conftest.err conftest.i conftest.$ac_ext |
| 4444 | |
| 4445 | done |
| 4446 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. |
| 4447 | rm -f conftest.i conftest.err conftest.$ac_ext |
| 4448 | if $ac_preproc_ok; then : |
| 4449 | break |
| 4450 | fi |
| 4451 | |
| 4452 | done |
| 4453 | ac_cv_prog_CPP=$CPP |
| 4454 | |
| 4455 | fi |
| 4456 | CPP=$ac_cv_prog_CPP |
| 4457 | else |
| 4458 | ac_cv_prog_CPP=$CPP |
| 4459 | fi |
| 4460 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
| 4461 | $as_echo "$CPP" >&6; } |
| 4462 | ac_preproc_ok=false |
| 4463 | for ac_c_preproc_warn_flag in '' yes |
| 4464 | do |
| 4465 | # Use a header file that comes with gcc, so configuring glibc |
| 4466 | # with a fresh cross-compiler works. |
| 4467 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
| 4468 | # <limits.h> exists even on freestanding compilers. |
| 4469 | # On the NeXT, cc -E runs the code through the compiler's parser, |
| 4470 | # not just through cpp. "Syntax error" is here to catch this case. |
| 4471 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4472 | /* end confdefs.h. */ |
| 4473 | #ifdef __STDC__ |
| 4474 | # include <limits.h> |
| 4475 | #else |
| 4476 | # include <assert.h> |
| 4477 | #endif |
| 4478 | Syntax error |
| 4479 | _ACEOF |
| 4480 | if ac_fn_c_try_cpp "$LINENO"; then : |
| 4481 | |
| 4482 | else |
| 4483 | # Broken: fails on valid input. |
| 4484 | continue |
| 4485 | fi |
| 4486 | rm -f conftest.err conftest.i conftest.$ac_ext |
| 4487 | |
| 4488 | # OK, works on sane cases. Now check whether nonexistent headers |
| 4489 | # can be detected and how. |
| 4490 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4491 | /* end confdefs.h. */ |
| 4492 | #include <ac_nonexistent.h> |
| 4493 | _ACEOF |
| 4494 | if ac_fn_c_try_cpp "$LINENO"; then : |
| 4495 | # Broken: success on invalid input. |
| 4496 | continue |
| 4497 | else |
| 4498 | # Passes both tests. |
| 4499 | ac_preproc_ok=: |
| 4500 | break |
| 4501 | fi |
| 4502 | rm -f conftest.err conftest.i conftest.$ac_ext |
| 4503 | |
| 4504 | done |
| 4505 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. |
| 4506 | rm -f conftest.i conftest.err conftest.$ac_ext |
| 4507 | if $ac_preproc_ok; then : |
| 4508 | |
| 4509 | else |
| 4510 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 4511 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 4512 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
| 4513 | See \`config.log' for more details" "$LINENO" 5; } |
| 4514 | fi |
| 4515 | |
| 4516 | ac_ext=c |
| 4517 | ac_cpp='$CPP $CPPFLAGS' |
| 4518 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 4519 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 4520 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
| 4521 | |
| 4522 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
| 4523 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } |
| 4524 | if ${ac_cv_path_GREP+:} false; then : |
| 4525 | $as_echo_n "(cached) " >&6 |
| 4526 | else |
| 4527 | if test -z "$GREP"; then |
| 4528 | ac_path_GREP_found=false |
| 4529 | # Loop through the user's path and test for each of PROGNAME-LIST |
| 4530 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 4531 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin |
| 4532 | do |
| 4533 | IFS=$as_save_IFS |
| 4534 | test -z "$as_dir" && as_dir=. |
| 4535 | for ac_prog in grep ggrep; do |
| 4536 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 4537 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" |
| 4538 | as_fn_executable_p "$ac_path_GREP" || continue |
| 4539 | # Check for GNU ac_path_GREP and select it if it is found. |
| 4540 | # Check for GNU $ac_path_GREP |
| 4541 | case `"$ac_path_GREP" --version 2>&1` in |
| 4542 | *GNU*) |
| 4543 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; |
| 4544 | *) |
| 4545 | ac_count=0 |
| 4546 | $as_echo_n 0123456789 >"conftest.in" |
| 4547 | while : |
| 4548 | do |
| 4549 | cat "conftest.in" "conftest.in" >"conftest.tmp" |
| 4550 | mv "conftest.tmp" "conftest.in" |
| 4551 | cp "conftest.in" "conftest.nl" |
| 4552 | $as_echo 'GREP' >> "conftest.nl" |
| 4553 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break |
| 4554 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break |
| 4555 | as_fn_arith $ac_count + 1 && ac_count=$as_val |
| 4556 | if test $ac_count -gt ${ac_path_GREP_max-0}; then |
| 4557 | # Best one so far, save it but keep looking for a better one |
| 4558 | ac_cv_path_GREP="$ac_path_GREP" |
| 4559 | ac_path_GREP_max=$ac_count |
| 4560 | fi |
| 4561 | # 10*(2^10) chars as input seems more than enough |
| 4562 | test $ac_count -gt 10 && break |
| 4563 | done |
| 4564 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; |
| 4565 | esac |
| 4566 | |
| 4567 | $ac_path_GREP_found && break 3 |
| 4568 | done |
| 4569 | done |
| 4570 | done |
| 4571 | IFS=$as_save_IFS |
| 4572 | if test -z "$ac_cv_path_GREP"; then |
| 4573 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
| 4574 | fi |
| 4575 | else |
| 4576 | ac_cv_path_GREP=$GREP |
| 4577 | fi |
| 4578 | |
| 4579 | fi |
| 4580 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 |
| 4581 | $as_echo "$ac_cv_path_GREP" >&6; } |
| 4582 | GREP="$ac_cv_path_GREP" |
| 4583 | |
| 4584 | |
Łukasz Langa | a785c87 | 2016-09-09 17:37:37 -0700 | [diff] [blame] | 4585 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 |
| 4586 | $as_echo_n "checking for a sed that does not truncate output... " >&6; } |
| 4587 | if ${ac_cv_path_SED+:} false; then : |
| 4588 | $as_echo_n "(cached) " >&6 |
| 4589 | else |
| 4590 | ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ |
| 4591 | for ac_i in 1 2 3 4 5 6 7; do |
| 4592 | ac_script="$ac_script$as_nl$ac_script" |
| 4593 | done |
| 4594 | echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed |
| 4595 | { ac_script=; unset ac_script;} |
| 4596 | if test -z "$SED"; then |
| 4597 | ac_path_SED_found=false |
| 4598 | # Loop through the user's path and test for each of PROGNAME-LIST |
| 4599 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 4600 | for as_dir in $PATH |
| 4601 | do |
| 4602 | IFS=$as_save_IFS |
| 4603 | test -z "$as_dir" && as_dir=. |
| 4604 | for ac_prog in sed gsed; do |
| 4605 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 4606 | ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" |
| 4607 | as_fn_executable_p "$ac_path_SED" || continue |
| 4608 | # Check for GNU ac_path_SED and select it if it is found. |
| 4609 | # Check for GNU $ac_path_SED |
| 4610 | case `"$ac_path_SED" --version 2>&1` in |
| 4611 | *GNU*) |
| 4612 | ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; |
| 4613 | *) |
| 4614 | ac_count=0 |
| 4615 | $as_echo_n 0123456789 >"conftest.in" |
| 4616 | while : |
| 4617 | do |
| 4618 | cat "conftest.in" "conftest.in" >"conftest.tmp" |
| 4619 | mv "conftest.tmp" "conftest.in" |
| 4620 | cp "conftest.in" "conftest.nl" |
| 4621 | $as_echo '' >> "conftest.nl" |
| 4622 | "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break |
| 4623 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break |
| 4624 | as_fn_arith $ac_count + 1 && ac_count=$as_val |
| 4625 | if test $ac_count -gt ${ac_path_SED_max-0}; then |
| 4626 | # Best one so far, save it but keep looking for a better one |
| 4627 | ac_cv_path_SED="$ac_path_SED" |
| 4628 | ac_path_SED_max=$ac_count |
| 4629 | fi |
| 4630 | # 10*(2^10) chars as input seems more than enough |
| 4631 | test $ac_count -gt 10 && break |
| 4632 | done |
| 4633 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; |
| 4634 | esac |
| 4635 | |
| 4636 | $ac_path_SED_found && break 3 |
| 4637 | done |
| 4638 | done |
| 4639 | done |
| 4640 | IFS=$as_save_IFS |
| 4641 | if test -z "$ac_cv_path_SED"; then |
| 4642 | as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 |
| 4643 | fi |
| 4644 | else |
| 4645 | ac_cv_path_SED=$SED |
| 4646 | fi |
| 4647 | |
| 4648 | fi |
| 4649 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 |
| 4650 | $as_echo "$ac_cv_path_SED" >&6; } |
| 4651 | SED="$ac_cv_path_SED" |
| 4652 | rm -f conftest.sed |
| 4653 | |
Martin v. Löwis | 1d5ecb7 | 2001-08-09 10:29:44 +0000 | [diff] [blame] | 4654 | |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4655 | |
| 4656 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4657 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5 |
| 4658 | $as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; } |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4659 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4660 | # Check whether --with-cxx_main was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4661 | if test "${with_cxx_main+set}" = set; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4662 | withval=$with_cxx_main; |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4663 | |
| 4664 | case $withval in |
| 4665 | no) with_cxx_main=no |
| 4666 | MAINCC='$(CC)';; |
| 4667 | yes) with_cxx_main=yes |
| 4668 | MAINCC='$(CXX)';; |
| 4669 | *) with_cxx_main=yes |
| 4670 | MAINCC=$withval |
| 4671 | if test -z "$CXX" |
| 4672 | then |
| 4673 | CXX=$withval |
| 4674 | fi;; |
| 4675 | esac |
| 4676 | else |
| 4677 | |
| 4678 | with_cxx_main=no |
| 4679 | MAINCC='$(CC)' |
| 4680 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4681 | fi |
| 4682 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4683 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5 |
| 4684 | $as_echo "$with_cxx_main" >&6; } |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4685 | |
| 4686 | preset_cxx="$CXX" |
| 4687 | if test -z "$CXX" |
| 4688 | then |
| 4689 | case "$CC" in |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4690 | gcc) if test -n "$ac_tool_prefix"; then |
| 4691 | # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args. |
| 4692 | set dummy ${ac_tool_prefix}g++; ac_word=$2 |
| 4693 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 4694 | $as_echo_n "checking for $ac_word... " >&6; } |
| 4695 | if ${ac_cv_path_CXX+:} false; then : |
| 4696 | $as_echo_n "(cached) " >&6 |
| 4697 | else |
| 4698 | case $CXX in |
| 4699 | [\\/]* | ?:[\\/]*) |
| 4700 | ac_cv_path_CXX="$CXX" # Let the user override the test with a path. |
| 4701 | ;; |
| 4702 | *) |
| 4703 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 4704 | for as_dir in notfound |
| 4705 | do |
| 4706 | IFS=$as_save_IFS |
| 4707 | test -z "$as_dir" && as_dir=. |
| 4708 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 646eb1e | 2012-10-29 17:35:57 +0000 | [diff] [blame] | 4709 | 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] | 4710 | ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext" |
| 4711 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 4712 | break 2 |
| 4713 | fi |
| 4714 | done |
| 4715 | done |
| 4716 | IFS=$as_save_IFS |
| 4717 | |
| 4718 | ;; |
| 4719 | esac |
| 4720 | fi |
| 4721 | CXX=$ac_cv_path_CXX |
| 4722 | if test -n "$CXX"; then |
| 4723 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 |
| 4724 | $as_echo "$CXX" >&6; } |
| 4725 | else |
| 4726 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 4727 | $as_echo "no" >&6; } |
| 4728 | fi |
| 4729 | |
| 4730 | |
| 4731 | fi |
| 4732 | if test -z "$ac_cv_path_CXX"; then |
| 4733 | ac_pt_CXX=$CXX |
| 4734 | # 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] | 4735 | set dummy g++; ac_word=$2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4736 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 4737 | $as_echo_n "checking for $ac_word... " >&6; } |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4738 | if ${ac_cv_path_ac_pt_CXX+:} false; then : |
| 4739 | $as_echo_n "(cached) " >&6 |
| 4740 | else |
| 4741 | case $ac_pt_CXX in |
| 4742 | [\\/]* | ?:[\\/]*) |
| 4743 | ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path. |
| 4744 | ;; |
| 4745 | *) |
| 4746 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 4747 | for as_dir in notfound |
| 4748 | do |
| 4749 | IFS=$as_save_IFS |
| 4750 | test -z "$as_dir" && as_dir=. |
| 4751 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 4752 | 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] | 4753 | ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext" |
| 4754 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 4755 | break 2 |
| 4756 | fi |
| 4757 | done |
| 4758 | done |
| 4759 | IFS=$as_save_IFS |
| 4760 | |
| 4761 | ;; |
| 4762 | esac |
| 4763 | fi |
| 4764 | ac_pt_CXX=$ac_cv_path_ac_pt_CXX |
| 4765 | if test -n "$ac_pt_CXX"; then |
| 4766 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5 |
| 4767 | $as_echo "$ac_pt_CXX" >&6; } |
| 4768 | else |
| 4769 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 4770 | $as_echo "no" >&6; } |
| 4771 | fi |
| 4772 | |
| 4773 | if test "x$ac_pt_CXX" = x; then |
| 4774 | CXX="g++" |
| 4775 | else |
| 4776 | case $cross_compiling:$ac_tool_warned in |
| 4777 | yes:) |
| 4778 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 4779 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 4780 | ac_tool_warned=yes ;; |
| 4781 | esac |
| 4782 | CXX=$ac_pt_CXX |
| 4783 | fi |
| 4784 | else |
| 4785 | CXX="$ac_cv_path_CXX" |
| 4786 | fi |
| 4787 | ;; |
| 4788 | cc) if test -n "$ac_tool_prefix"; then |
| 4789 | # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args. |
| 4790 | set dummy ${ac_tool_prefix}c++; ac_word=$2 |
| 4791 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 4792 | $as_echo_n "checking for $ac_word... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 4793 | if ${ac_cv_path_CXX+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4794 | $as_echo_n "(cached) " >&6 |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4795 | else |
| 4796 | case $CXX in |
| 4797 | [\\/]* | ?:[\\/]*) |
| 4798 | ac_cv_path_CXX="$CXX" # Let the user override the test with a path. |
| 4799 | ;; |
| 4800 | *) |
| 4801 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 4802 | for as_dir in notfound |
| 4803 | do |
| 4804 | IFS=$as_save_IFS |
| 4805 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4806 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 4807 | 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] | 4808 | ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4809 | $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] | 4810 | break 2 |
| 4811 | fi |
| 4812 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4813 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4814 | IFS=$as_save_IFS |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4815 | |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4816 | ;; |
| 4817 | esac |
| 4818 | fi |
| 4819 | CXX=$ac_cv_path_CXX |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 4820 | if test -n "$CXX"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4821 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 |
| 4822 | $as_echo "$CXX" >&6; } |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 4823 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4824 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 4825 | $as_echo "no" >&6; } |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 4826 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4827 | |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4828 | |
| 4829 | fi |
| 4830 | if test -z "$ac_cv_path_CXX"; then |
| 4831 | ac_pt_CXX=$CXX |
| 4832 | # 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] | 4833 | set dummy c++; ac_word=$2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4834 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 4835 | $as_echo_n "checking for $ac_word... " >&6; } |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4836 | if ${ac_cv_path_ac_pt_CXX+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4837 | $as_echo_n "(cached) " >&6 |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4838 | else |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4839 | case $ac_pt_CXX in |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4840 | [\\/]* | ?:[\\/]*) |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4841 | 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] | 4842 | ;; |
| 4843 | *) |
| 4844 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 4845 | for as_dir in notfound |
| 4846 | do |
| 4847 | IFS=$as_save_IFS |
| 4848 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4849 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 646eb1e | 2012-10-29 17:35:57 +0000 | [diff] [blame] | 4850 | 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] | 4851 | 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] | 4852 | $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] | 4853 | break 2 |
| 4854 | fi |
| 4855 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4856 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4857 | IFS=$as_save_IFS |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4858 | |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4859 | ;; |
| 4860 | esac |
| 4861 | fi |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4862 | ac_pt_CXX=$ac_cv_path_ac_pt_CXX |
| 4863 | if test -n "$ac_pt_CXX"; then |
| 4864 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5 |
| 4865 | $as_echo "$ac_pt_CXX" >&6; } |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 4866 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 4867 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 4868 | $as_echo "no" >&6; } |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 4869 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 4870 | |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4871 | if test "x$ac_pt_CXX" = x; then |
| 4872 | CXX="c++" |
| 4873 | else |
| 4874 | case $cross_compiling:$ac_tool_warned in |
| 4875 | yes:) |
| 4876 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 4877 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 4878 | ac_tool_warned=yes ;; |
| 4879 | esac |
| 4880 | CXX=$ac_pt_CXX |
| 4881 | fi |
| 4882 | else |
| 4883 | CXX="$ac_cv_path_CXX" |
| 4884 | fi |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 4885 | ;; |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4886 | clang|*/clang) if test -n "$ac_tool_prefix"; then |
| 4887 | # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args. |
| 4888 | set dummy ${ac_tool_prefix}clang++; ac_word=$2 |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 4889 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 4890 | $as_echo_n "checking for $ac_word... " >&6; } |
| 4891 | if ${ac_cv_path_CXX+:} false; then : |
| 4892 | $as_echo_n "(cached) " >&6 |
| 4893 | else |
| 4894 | case $CXX in |
| 4895 | [\\/]* | ?:[\\/]*) |
| 4896 | ac_cv_path_CXX="$CXX" # Let the user override the test with a path. |
| 4897 | ;; |
| 4898 | *) |
| 4899 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 4900 | for as_dir in notfound |
| 4901 | do |
| 4902 | IFS=$as_save_IFS |
| 4903 | test -z "$as_dir" && as_dir=. |
| 4904 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 646eb1e | 2012-10-29 17:35:57 +0000 | [diff] [blame] | 4905 | 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] | 4906 | ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext" |
| 4907 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 4908 | break 2 |
| 4909 | fi |
| 4910 | done |
| 4911 | done |
| 4912 | IFS=$as_save_IFS |
| 4913 | |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 4914 | ;; |
| 4915 | esac |
| 4916 | fi |
| 4917 | CXX=$ac_cv_path_CXX |
| 4918 | if test -n "$CXX"; then |
| 4919 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 |
| 4920 | $as_echo "$CXX" >&6; } |
| 4921 | else |
| 4922 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 4923 | $as_echo "no" >&6; } |
| 4924 | fi |
| 4925 | |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 4926 | |
| 4927 | fi |
| 4928 | if test -z "$ac_cv_path_CXX"; then |
| 4929 | ac_pt_CXX=$CXX |
| 4930 | # Extract the first word of "clang++", so it can be a program name with args. |
| 4931 | set dummy clang++; ac_word=$2 |
| 4932 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 4933 | $as_echo_n "checking for $ac_word... " >&6; } |
| 4934 | if ${ac_cv_path_ac_pt_CXX+:} false; then : |
| 4935 | $as_echo_n "(cached) " >&6 |
| 4936 | else |
| 4937 | case $ac_pt_CXX in |
| 4938 | [\\/]* | ?:[\\/]*) |
| 4939 | ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path. |
| 4940 | ;; |
| 4941 | *) |
| 4942 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 4943 | for as_dir in notfound |
| 4944 | do |
| 4945 | IFS=$as_save_IFS |
| 4946 | test -z "$as_dir" && as_dir=. |
| 4947 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 646eb1e | 2012-10-29 17:35:57 +0000 | [diff] [blame] | 4948 | 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] | 4949 | ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext" |
| 4950 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 4951 | break 2 |
| 4952 | fi |
| 4953 | done |
| 4954 | done |
| 4955 | IFS=$as_save_IFS |
| 4956 | |
| 4957 | ;; |
| 4958 | esac |
| 4959 | fi |
| 4960 | ac_pt_CXX=$ac_cv_path_ac_pt_CXX |
| 4961 | if test -n "$ac_pt_CXX"; then |
| 4962 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5 |
| 4963 | $as_echo "$ac_pt_CXX" >&6; } |
| 4964 | else |
| 4965 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 4966 | $as_echo "no" >&6; } |
| 4967 | fi |
| 4968 | |
| 4969 | if test "x$ac_pt_CXX" = x; then |
| 4970 | CXX="clang++" |
| 4971 | else |
| 4972 | case $cross_compiling:$ac_tool_warned in |
| 4973 | yes:) |
| 4974 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 4975 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 4976 | ac_tool_warned=yes ;; |
| 4977 | esac |
| 4978 | CXX=$ac_pt_CXX |
| 4979 | fi |
| 4980 | else |
| 4981 | CXX="$ac_cv_path_CXX" |
| 4982 | fi |
Ned Deily | cbfb9a5 | 2012-06-23 16:02:19 -0700 | [diff] [blame] | 4983 | ;; |
Zachary Ware | 5af8564 | 2015-12-21 12:09:17 -0600 | [diff] [blame] | 4984 | icc|*/icc) if test -n "$ac_tool_prefix"; then |
| 4985 | # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args. |
| 4986 | set dummy ${ac_tool_prefix}icpc; ac_word=$2 |
| 4987 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 4988 | $as_echo_n "checking for $ac_word... " >&6; } |
| 4989 | if ${ac_cv_path_CXX+:} false; then : |
| 4990 | $as_echo_n "(cached) " >&6 |
| 4991 | else |
| 4992 | case $CXX in |
| 4993 | [\\/]* | ?:[\\/]*) |
| 4994 | ac_cv_path_CXX="$CXX" # Let the user override the test with a path. |
| 4995 | ;; |
| 4996 | *) |
| 4997 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 4998 | for as_dir in notfound |
| 4999 | do |
| 5000 | IFS=$as_save_IFS |
| 5001 | test -z "$as_dir" && as_dir=. |
| 5002 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 5003 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 5004 | ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext" |
| 5005 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 5006 | break 2 |
| 5007 | fi |
| 5008 | done |
| 5009 | done |
| 5010 | IFS=$as_save_IFS |
| 5011 | |
| 5012 | ;; |
| 5013 | esac |
| 5014 | fi |
| 5015 | CXX=$ac_cv_path_CXX |
| 5016 | if test -n "$CXX"; then |
| 5017 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 |
| 5018 | $as_echo "$CXX" >&6; } |
| 5019 | else |
| 5020 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 5021 | $as_echo "no" >&6; } |
| 5022 | fi |
| 5023 | |
| 5024 | |
| 5025 | fi |
| 5026 | if test -z "$ac_cv_path_CXX"; then |
| 5027 | ac_pt_CXX=$CXX |
| 5028 | # Extract the first word of "icpc", so it can be a program name with args. |
| 5029 | set dummy icpc; ac_word=$2 |
| 5030 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 5031 | $as_echo_n "checking for $ac_word... " >&6; } |
| 5032 | if ${ac_cv_path_ac_pt_CXX+:} false; then : |
| 5033 | $as_echo_n "(cached) " >&6 |
| 5034 | else |
| 5035 | case $ac_pt_CXX in |
| 5036 | [\\/]* | ?:[\\/]*) |
| 5037 | ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path. |
| 5038 | ;; |
| 5039 | *) |
| 5040 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 5041 | for as_dir in notfound |
| 5042 | do |
| 5043 | IFS=$as_save_IFS |
| 5044 | test -z "$as_dir" && as_dir=. |
| 5045 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 5046 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 5047 | ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext" |
| 5048 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 5049 | break 2 |
| 5050 | fi |
| 5051 | done |
| 5052 | done |
| 5053 | IFS=$as_save_IFS |
| 5054 | |
| 5055 | ;; |
| 5056 | esac |
| 5057 | fi |
| 5058 | ac_pt_CXX=$ac_cv_path_ac_pt_CXX |
| 5059 | if test -n "$ac_pt_CXX"; then |
| 5060 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5 |
| 5061 | $as_echo "$ac_pt_CXX" >&6; } |
| 5062 | else |
| 5063 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 5064 | $as_echo "no" >&6; } |
| 5065 | fi |
| 5066 | |
| 5067 | if test "x$ac_pt_CXX" = x; then |
| 5068 | CXX="icpc" |
| 5069 | else |
| 5070 | case $cross_compiling:$ac_tool_warned in |
| 5071 | yes:) |
| 5072 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 5073 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 5074 | ac_tool_warned=yes ;; |
| 5075 | esac |
| 5076 | CXX=$ac_pt_CXX |
| 5077 | fi |
| 5078 | else |
| 5079 | CXX="$ac_cv_path_CXX" |
| 5080 | fi |
| 5081 | ;; |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 5082 | esac |
| 5083 | if test "$CXX" = "notfound" |
| 5084 | then |
| 5085 | CXX="" |
| 5086 | fi |
| 5087 | fi |
| 5088 | if test -z "$CXX" |
| 5089 | then |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 5090 | if test -n "$ac_tool_prefix"; then |
| 5091 | for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl |
| 5092 | do |
| 5093 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. |
| 5094 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5095 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 5096 | $as_echo_n "checking for $ac_word... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 5097 | if ${ac_cv_prog_CXX+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5098 | $as_echo_n "(cached) " >&6 |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 5099 | else |
| 5100 | if test -n "$CXX"; then |
| 5101 | ac_cv_prog_CXX="$CXX" # Let the user override the test. |
| 5102 | else |
| 5103 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 5104 | for as_dir in $PATH |
| 5105 | do |
| 5106 | IFS=$as_save_IFS |
| 5107 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5108 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 5109 | 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] | 5110 | ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5111 | $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] | 5112 | break 2 |
| 5113 | fi |
| 5114 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5115 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5116 | IFS=$as_save_IFS |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 5117 | |
| 5118 | fi |
| 5119 | fi |
| 5120 | CXX=$ac_cv_prog_CXX |
| 5121 | if test -n "$CXX"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5122 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 |
| 5123 | $as_echo "$CXX" >&6; } |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 5124 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5125 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 5126 | $as_echo "no" >&6; } |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 5127 | fi |
| 5128 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5129 | |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 5130 | test -n "$CXX" && break |
| 5131 | done |
| 5132 | fi |
| 5133 | if test -z "$CXX"; then |
| 5134 | ac_ct_CXX=$CXX |
| 5135 | for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl |
| 5136 | do |
| 5137 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 5138 | set dummy $ac_prog; ac_word=$2 |
| 5139 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 5140 | $as_echo_n "checking for $ac_word... " >&6; } |
| 5141 | if ${ac_cv_prog_ac_ct_CXX+:} false; then : |
| 5142 | $as_echo_n "(cached) " >&6 |
| 5143 | else |
| 5144 | if test -n "$ac_ct_CXX"; then |
| 5145 | ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. |
| 5146 | else |
| 5147 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 5148 | for as_dir in $PATH |
| 5149 | do |
| 5150 | IFS=$as_save_IFS |
| 5151 | test -z "$as_dir" && as_dir=. |
| 5152 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 646eb1e | 2012-10-29 17:35:57 +0000 | [diff] [blame] | 5153 | 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] | 5154 | ac_cv_prog_ac_ct_CXX="$ac_prog" |
| 5155 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 5156 | break 2 |
| 5157 | fi |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 5158 | done |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 5159 | done |
| 5160 | IFS=$as_save_IFS |
| 5161 | |
| 5162 | fi |
| 5163 | fi |
| 5164 | ac_ct_CXX=$ac_cv_prog_ac_ct_CXX |
| 5165 | if test -n "$ac_ct_CXX"; then |
| 5166 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 |
| 5167 | $as_echo "$ac_ct_CXX" >&6; } |
| 5168 | else |
| 5169 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 5170 | $as_echo "no" >&6; } |
| 5171 | fi |
| 5172 | |
| 5173 | |
| 5174 | test -n "$ac_ct_CXX" && break |
| 5175 | done |
| 5176 | |
| 5177 | if test "x$ac_ct_CXX" = x; then |
| 5178 | CXX="notfound" |
| 5179 | else |
| 5180 | case $cross_compiling:$ac_tool_warned in |
| 5181 | yes:) |
| 5182 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 5183 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 5184 | ac_tool_warned=yes ;; |
| 5185 | esac |
| 5186 | CXX=$ac_ct_CXX |
| 5187 | fi |
| 5188 | fi |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 5189 | |
| 5190 | if test "$CXX" = "notfound" |
| 5191 | then |
| 5192 | CXX="" |
| 5193 | fi |
| 5194 | fi |
| 5195 | if test "$preset_cxx" != "$CXX" |
| 5196 | then |
Christian Heimes | fe32aec | 2013-11-20 01:18:26 +0100 | [diff] [blame] | 5197 | { $as_echo "$as_me:${as_lineno-$LINENO}: |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 5198 | |
| 5199 | By default, distutils will build C++ extension modules with \"$CXX\". |
| 5200 | If this is not intended, then set CXX on the configure command line. |
| 5201 | " >&5 |
Christian Heimes | fe32aec | 2013-11-20 01:18:26 +0100 | [diff] [blame] | 5202 | $as_echo "$as_me: |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 5203 | |
| 5204 | By default, distutils will build C++ extension modules with \"$CXX\". |
| 5205 | 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] | 5206 | " >&6;} |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 5207 | fi |
| 5208 | |
| 5209 | |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 5210 | MULTIARCH=$($CC --print-multiarch 2>/dev/null) |
| 5211 | |
| 5212 | |
| 5213 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5 |
| 5214 | $as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; } |
| 5215 | cat >> conftest.c <<EOF |
doko@ubuntu.com | 5cc9c4f | 2015-04-19 14:44:05 +0200 | [diff] [blame] | 5216 | #undef bfin |
| 5217 | #undef cris |
| 5218 | #undef fr30 |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 5219 | #undef linux |
doko@ubuntu.com | 5cc9c4f | 2015-04-19 14:44:05 +0200 | [diff] [blame] | 5220 | #undef hppa |
| 5221 | #undef hpux |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 5222 | #undef i386 |
doko@ubuntu.com | 5cc9c4f | 2015-04-19 14:44:05 +0200 | [diff] [blame] | 5223 | #undef mips |
doko@ubuntu.com | 9abe049 | 2015-04-15 23:31:02 +0200 | [diff] [blame] | 5224 | #undef powerpc |
doko@ubuntu.com | 5cc9c4f | 2015-04-19 14:44:05 +0200 | [diff] [blame] | 5225 | #undef sparc |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 5226 | #undef unix |
doko@ubuntu.com | 5c38cb2 | 2016-09-01 22:05:20 +0200 | [diff] [blame] | 5227 | #if defined(__ANDROID__) |
Xavier de Gaye | 32cf1ac | 2016-12-10 17:31:28 +0100 | [diff] [blame] | 5228 | # Android is not a multiarch system. |
doko@ubuntu.com | 5c38cb2 | 2016-09-01 22:05:20 +0200 | [diff] [blame] | 5229 | #elif defined(__linux__) |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 5230 | # if defined(__x86_64__) && defined(__LP64__) |
| 5231 | x86_64-linux-gnu |
| 5232 | # elif defined(__x86_64__) && defined(__ILP32__) |
| 5233 | x86_64-linux-gnux32 |
| 5234 | # elif defined(__i386__) |
| 5235 | i386-linux-gnu |
| 5236 | # elif defined(__aarch64__) && defined(__AARCH64EL__) |
| 5237 | # if defined(__ILP32__) |
| 5238 | aarch64_ilp32-linux-gnu |
| 5239 | # else |
| 5240 | aarch64-linux-gnu |
| 5241 | # endif |
| 5242 | # elif defined(__aarch64__) && defined(__AARCH64EB__) |
| 5243 | # if defined(__ILP32__) |
| 5244 | aarch64_be_ilp32-linux-gnu |
| 5245 | # else |
| 5246 | aarch64_be-linux-gnu |
| 5247 | # endif |
| 5248 | # elif defined(__alpha__) |
| 5249 | alpha-linux-gnu |
| 5250 | # elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP) |
| 5251 | # if defined(__ARMEL__) |
| 5252 | arm-linux-gnueabihf |
| 5253 | # else |
| 5254 | armeb-linux-gnueabihf |
| 5255 | # endif |
| 5256 | # elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP) |
| 5257 | # if defined(__ARMEL__) |
| 5258 | arm-linux-gnueabi |
| 5259 | # else |
| 5260 | armeb-linux-gnueabi |
| 5261 | # endif |
| 5262 | # elif defined(__hppa__) |
| 5263 | hppa-linux-gnu |
| 5264 | # elif defined(__ia64__) |
| 5265 | ia64-linux-gnu |
| 5266 | # elif defined(__m68k__) && !defined(__mcoldfire__) |
| 5267 | m68k-linux-gnu |
| 5268 | # elif defined(__mips_hard_float) && defined(_MIPSEL) |
| 5269 | # if _MIPS_SIM == _ABIO32 |
| 5270 | mipsel-linux-gnu |
| 5271 | # elif _MIPS_SIM == _ABIN32 |
| 5272 | mips64el-linux-gnuabin32 |
| 5273 | # elif _MIPS_SIM == _ABI64 |
| 5274 | mips64el-linux-gnuabi64 |
| 5275 | # else |
| 5276 | # error unknown platform triplet |
| 5277 | # endif |
| 5278 | # elif defined(__mips_hard_float) |
| 5279 | # if _MIPS_SIM == _ABIO32 |
| 5280 | mips-linux-gnu |
| 5281 | # elif _MIPS_SIM == _ABIN32 |
| 5282 | mips64-linux-gnuabin32 |
| 5283 | # elif _MIPS_SIM == _ABI64 |
| 5284 | mips64-linux-gnuabi64 |
| 5285 | # else |
| 5286 | # error unknown platform triplet |
| 5287 | # endif |
| 5288 | # elif defined(__or1k__) |
| 5289 | or1k-linux-gnu |
| 5290 | # elif defined(__powerpc__) && defined(__SPE__) |
| 5291 | powerpc-linux-gnuspe |
| 5292 | # elif defined(__powerpc64__) |
| 5293 | # if defined(__LITTLE_ENDIAN__) |
| 5294 | powerpc64le-linux-gnu |
| 5295 | # else |
| 5296 | powerpc64-linux-gnu |
| 5297 | # endif |
| 5298 | # elif defined(__powerpc__) |
| 5299 | powerpc-linux-gnu |
| 5300 | # elif defined(__s390x__) |
| 5301 | s390x-linux-gnu |
| 5302 | # elif defined(__s390__) |
| 5303 | s390-linux-gnu |
| 5304 | # elif defined(__sh__) && defined(__LITTLE_ENDIAN__) |
| 5305 | sh4-linux-gnu |
| 5306 | # elif defined(__sparc__) && defined(__arch64__) |
| 5307 | sparc64-linux-gnu |
| 5308 | # elif defined(__sparc__) |
| 5309 | sparc-linux-gnu |
| 5310 | # else |
| 5311 | # error unknown platform triplet |
| 5312 | # endif |
| 5313 | #elif defined(__FreeBSD_kernel__) |
| 5314 | # if defined(__LP64__) |
| 5315 | x86_64-kfreebsd-gnu |
| 5316 | # elif defined(__i386__) |
| 5317 | i386-kfreebsd-gnu |
| 5318 | # else |
| 5319 | # error unknown platform triplet |
| 5320 | # endif |
| 5321 | #elif defined(__gnu_hurd__) |
| 5322 | i386-gnu |
Ned Deily | 3b81248 | 2015-04-15 17:11:47 -0700 | [diff] [blame] | 5323 | #elif defined(__APPLE__) |
| 5324 | darwin |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 5325 | #else |
| 5326 | # error unknown platform triplet |
| 5327 | #endif |
| 5328 | |
| 5329 | EOF |
| 5330 | |
Xavier de Gaye | 3a32bdf | 2016-07-30 11:28:35 +0200 | [diff] [blame] | 5331 | if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 5332 | PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '` |
| 5333 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5 |
| 5334 | $as_echo "$PLATFORM_TRIPLET" >&6; } |
| 5335 | else |
| 5336 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 |
| 5337 | $as_echo "none" >&6; } |
| 5338 | fi |
| 5339 | rm -f conftest.c conftest.out |
| 5340 | |
| 5341 | if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then |
| 5342 | if test x$PLATFORM_TRIPLET != x$MULTIARCH; then |
| 5343 | as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5 |
| 5344 | fi |
doko@ubuntu.com | 75b1cb1 | 2016-08-29 20:03:25 +0200 | [diff] [blame] | 5345 | elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then |
| 5346 | MULTIARCH=$PLATFORM_TRIPLET |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 5347 | fi |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 5348 | |
doko@ubuntu.com | 5553231 | 2016-06-14 08:55:19 +0200 | [diff] [blame] | 5349 | if test x$MULTIARCH != x; then |
| 5350 | MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\"" |
| 5351 | fi |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 5352 | |
| 5353 | |
Martin v. Löwis | 48e14d3 | 2011-05-09 07:37:45 +0200 | [diff] [blame] | 5354 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5 |
| 5355 | $as_echo_n "checking for -Wl,--no-as-needed... " >&6; } |
| 5356 | save_LDFLAGS="$LDFLAGS" |
| 5357 | LDFLAGS="$LDFLAGS -Wl,--no-as-needed" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 5358 | |
Martin v. Löwis | 48e14d3 | 2011-05-09 07:37:45 +0200 | [diff] [blame] | 5359 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 5360 | /* end confdefs.h. */ |
| 5361 | |
| 5362 | int |
| 5363 | main () |
| 5364 | { |
| 5365 | |
| 5366 | ; |
| 5367 | return 0; |
| 5368 | } |
| 5369 | _ACEOF |
| 5370 | if ac_fn_c_try_link "$LINENO"; then : |
| 5371 | NO_AS_NEEDED="-Wl,--no-as-needed" |
| 5372 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 5373 | $as_echo "yes" >&6; } |
| 5374 | else |
| 5375 | NO_AS_NEEDED="" |
| 5376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 5377 | $as_echo "no" >&6; } |
| 5378 | fi |
| 5379 | rm -f core conftest.err conftest.$ac_objext \ |
| 5380 | conftest$ac_exeext conftest.$ac_ext |
| 5381 | LDFLAGS="$save_LDFLAGS" |
| 5382 | |
| 5383 | |
| 5384 | |
| 5385 | # checks for UNIX variants that set C preprocessor variables |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5386 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5387 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
| 5388 | $as_echo_n "checking for egrep... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 5389 | if ${ac_cv_path_EGREP+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5390 | $as_echo_n "(cached) " >&6 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5391 | else |
| 5392 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
| 5393 | then ac_cv_path_EGREP="$GREP -E" |
| 5394 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5395 | if test -z "$EGREP"; then |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5396 | ac_path_EGREP_found=false |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5397 | # Loop through the user's path and test for each of PROGNAME-LIST |
| 5398 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5399 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin |
| 5400 | do |
| 5401 | IFS=$as_save_IFS |
| 5402 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5403 | for ac_prog in egrep; do |
| 5404 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 5405 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 5406 | as_fn_executable_p "$ac_path_EGREP" || continue |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5407 | # 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] | 5408 | # Check for GNU $ac_path_EGREP |
| 5409 | case `"$ac_path_EGREP" --version 2>&1` in |
| 5410 | *GNU*) |
| 5411 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; |
| 5412 | *) |
| 5413 | ac_count=0 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5414 | $as_echo_n 0123456789 >"conftest.in" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5415 | while : |
| 5416 | do |
| 5417 | cat "conftest.in" "conftest.in" >"conftest.tmp" |
| 5418 | mv "conftest.tmp" "conftest.in" |
| 5419 | cp "conftest.in" "conftest.nl" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5420 | $as_echo 'EGREP' >> "conftest.nl" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5421 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break |
| 5422 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5423 | as_fn_arith $ac_count + 1 && ac_count=$as_val |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5424 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then |
| 5425 | # Best one so far, save it but keep looking for a better one |
| 5426 | ac_cv_path_EGREP="$ac_path_EGREP" |
| 5427 | ac_path_EGREP_max=$ac_count |
| 5428 | fi |
| 5429 | # 10*(2^10) chars as input seems more than enough |
| 5430 | test $ac_count -gt 10 && break |
| 5431 | done |
| 5432 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; |
| 5433 | esac |
| 5434 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5435 | $ac_path_EGREP_found && break 3 |
| 5436 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5437 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5438 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5439 | IFS=$as_save_IFS |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5440 | if test -z "$ac_cv_path_EGREP"; then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 5441 | 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] | 5442 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5443 | else |
| 5444 | ac_cv_path_EGREP=$EGREP |
| 5445 | fi |
| 5446 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5447 | fi |
| 5448 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5449 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
| 5450 | $as_echo "$ac_cv_path_EGREP" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 5451 | EGREP="$ac_cv_path_EGREP" |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 5452 | |
| 5453 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5454 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
| 5455 | $as_echo_n "checking for ANSI C header files... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 5456 | if ${ac_cv_header_stdc+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5457 | $as_echo_n "(cached) " >&6 |
| 5458 | else |
| 5459 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Benjamin Peterson | 8719ad5 | 2009-09-11 22:24:02 +0000 | [diff] [blame] | 5460 | /* end confdefs.h. */ |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5461 | #include <stdlib.h> |
| 5462 | #include <stdarg.h> |
| 5463 | #include <string.h> |
| 5464 | #include <float.h> |
| 5465 | |
| 5466 | int |
| 5467 | main () |
| 5468 | { |
| 5469 | |
| 5470 | ; |
| 5471 | return 0; |
| 5472 | } |
| 5473 | _ACEOF |
| 5474 | if ac_fn_c_try_compile "$LINENO"; then : |
| 5475 | ac_cv_header_stdc=yes |
| 5476 | else |
| 5477 | ac_cv_header_stdc=no |
| 5478 | fi |
| 5479 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 5480 | |
| 5481 | if test $ac_cv_header_stdc = yes; then |
| 5482 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
| 5483 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 5484 | /* end confdefs.h. */ |
| 5485 | #include <string.h> |
Benjamin Peterson | 8719ad5 | 2009-09-11 22:24:02 +0000 | [diff] [blame] | 5486 | |
Benjamin Peterson | 8719ad5 | 2009-09-11 22:24:02 +0000 | [diff] [blame] | 5487 | _ACEOF |
Ronald Oussoren | 74f29b4 | 2009-09-20 20:09:26 +0000 | [diff] [blame] | 5488 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5489 | $EGREP "memchr" >/dev/null 2>&1; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5490 | |
Ronald Oussoren | 74f29b4 | 2009-09-20 20:09:26 +0000 | [diff] [blame] | 5491 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5492 | ac_cv_header_stdc=no |
Ronald Oussoren | 74f29b4 | 2009-09-20 20:09:26 +0000 | [diff] [blame] | 5493 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 5494 | rm -f conftest* |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5495 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5496 | fi |
| 5497 | |
| 5498 | if test $ac_cv_header_stdc = yes; then |
| 5499 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
| 5500 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 5501 | /* end confdefs.h. */ |
| 5502 | #include <stdlib.h> |
| 5503 | |
| 5504 | _ACEOF |
| 5505 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 5506 | $EGREP "free" >/dev/null 2>&1; then : |
| 5507 | |
| 5508 | else |
| 5509 | ac_cv_header_stdc=no |
| 5510 | fi |
| 5511 | rm -f conftest* |
| 5512 | |
| 5513 | fi |
| 5514 | |
| 5515 | if test $ac_cv_header_stdc = yes; then |
| 5516 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
| 5517 | if test "$cross_compiling" = yes; then : |
| 5518 | : |
| 5519 | else |
| 5520 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 5521 | /* end confdefs.h. */ |
| 5522 | #include <ctype.h> |
| 5523 | #include <stdlib.h> |
| 5524 | #if ((' ' & 0x0FF) == 0x020) |
| 5525 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 5526 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
| 5527 | #else |
| 5528 | # define ISLOWER(c) \ |
| 5529 | (('a' <= (c) && (c) <= 'i') \ |
| 5530 | || ('j' <= (c) && (c) <= 'r') \ |
| 5531 | || ('s' <= (c) && (c) <= 'z')) |
| 5532 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
| 5533 | #endif |
| 5534 | |
| 5535 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
| 5536 | int |
| 5537 | main () |
| 5538 | { |
| 5539 | int i; |
| 5540 | for (i = 0; i < 256; i++) |
| 5541 | if (XOR (islower (i), ISLOWER (i)) |
| 5542 | || toupper (i) != TOUPPER (i)) |
| 5543 | return 2; |
| 5544 | return 0; |
| 5545 | } |
| 5546 | _ACEOF |
| 5547 | if ac_fn_c_try_run "$LINENO"; then : |
| 5548 | |
| 5549 | else |
| 5550 | ac_cv_header_stdc=no |
| 5551 | fi |
| 5552 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 5553 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 5554 | fi |
| 5555 | |
| 5556 | fi |
| 5557 | fi |
| 5558 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
| 5559 | $as_echo "$ac_cv_header_stdc" >&6; } |
| 5560 | if test $ac_cv_header_stdc = yes; then |
| 5561 | |
| 5562 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
| 5563 | |
| 5564 | fi |
| 5565 | |
| 5566 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. |
| 5567 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
| 5568 | inttypes.h stdint.h unistd.h |
| 5569 | do : |
| 5570 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| 5571 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default |
| 5572 | " |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 5573 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5574 | cat >>confdefs.h <<_ACEOF |
| 5575 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
| 5576 | _ACEOF |
| 5577 | |
| 5578 | fi |
| 5579 | |
| 5580 | done |
| 5581 | |
| 5582 | |
| 5583 | |
| 5584 | 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] | 5585 | if test "x$ac_cv_header_minix_config_h" = xyes; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5586 | MINIX=yes |
| 5587 | else |
| 5588 | MINIX= |
| 5589 | fi |
| 5590 | |
| 5591 | |
| 5592 | if test "$MINIX" = yes; then |
| 5593 | |
| 5594 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
| 5595 | |
| 5596 | |
| 5597 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
| 5598 | |
| 5599 | |
| 5600 | $as_echo "#define _MINIX 1" >>confdefs.h |
| 5601 | |
| 5602 | fi |
| 5603 | |
| 5604 | |
| 5605 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
| 5606 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 5607 | if ${ac_cv_safe_to_define___extensions__+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5608 | $as_echo_n "(cached) " >&6 |
| 5609 | else |
| 5610 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 5611 | /* end confdefs.h. */ |
| 5612 | |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 5613 | # define __EXTENSIONS__ 1 |
| 5614 | $ac_includes_default |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5615 | int |
| 5616 | main () |
| 5617 | { |
| 5618 | |
| 5619 | ; |
| 5620 | return 0; |
| 5621 | } |
| 5622 | _ACEOF |
| 5623 | if ac_fn_c_try_compile "$LINENO"; then : |
| 5624 | ac_cv_safe_to_define___extensions__=yes |
| 5625 | else |
| 5626 | ac_cv_safe_to_define___extensions__=no |
| 5627 | fi |
| 5628 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 5629 | fi |
| 5630 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
| 5631 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } |
| 5632 | test $ac_cv_safe_to_define___extensions__ = yes && |
| 5633 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
| 5634 | |
| 5635 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
| 5636 | |
| 5637 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
| 5638 | |
| 5639 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
| 5640 | |
| 5641 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
| 5642 | |
| 5643 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5644 | |
Xavier de Gaye | 95750b1 | 2016-07-09 11:05:42 +0200 | [diff] [blame] | 5645 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5 |
| 5646 | $as_echo_n "checking for the Android API level... " >&6; } |
| 5647 | cat >> conftest.c <<EOF |
| 5648 | #ifdef __ANDROID__ |
| 5649 | #include <android/api-level.h> |
Xavier de Gaye | 2a352b6 | 2017-01-04 21:51:16 +0100 | [diff] [blame] | 5650 | android_api = __ANDROID_API__ |
| 5651 | arm_arch = __ARM_ARCH |
Xavier de Gaye | 95750b1 | 2016-07-09 11:05:42 +0200 | [diff] [blame] | 5652 | #else |
| 5653 | #error not Android |
| 5654 | #endif |
| 5655 | EOF |
| 5656 | |
| 5657 | if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then |
Xavier de Gaye | 2a352b6 | 2017-01-04 21:51:16 +0100 | [diff] [blame] | 5658 | ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out` |
| 5659 | _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] | 5660 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5 |
| 5661 | $as_echo "$ANDROID_API_LEVEL" >&6; } |
| 5662 | |
| 5663 | cat >>confdefs.h <<_ACEOF |
| 5664 | #define ANDROID_API_LEVEL $ANDROID_API_LEVEL |
| 5665 | _ACEOF |
| 5666 | |
Xavier de Gaye | 2a352b6 | 2017-01-04 21:51:16 +0100 | [diff] [blame] | 5667 | |
| 5668 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5 |
| 5669 | $as_echo_n "checking for the Android arm ABI... " >&6; } |
| 5670 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5 |
| 5671 | $as_echo "$_arm_arch" >&6; } |
| 5672 | if test "$_arm_arch" = 7; then |
| 5673 | BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16" |
| 5674 | LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8" |
| 5675 | fi |
Xavier de Gaye | 95750b1 | 2016-07-09 11:05:42 +0200 | [diff] [blame] | 5676 | else |
| 5677 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5 |
| 5678 | $as_echo "not Android" >&6; } |
| 5679 | fi |
| 5680 | rm -f conftest.c conftest.out |
| 5681 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5682 | # Check for unsupported systems |
| 5683 | case $ac_sys_system/$ac_sys_release in |
| 5684 | atheos*|Linux*/1*) |
| 5685 | echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported. |
| 5686 | echo See README for details. |
| 5687 | exit 1;; |
| 5688 | esac |
| 5689 | |
| 5690 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5691 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5 |
| 5692 | $as_echo_n "checking for --with-suffix... " >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5693 | |
| 5694 | # Check whether --with-suffix was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5695 | if test "${with_suffix+set}" = set; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5696 | withval=$with_suffix; |
| 5697 | case $withval in |
| 5698 | no) EXEEXT=;; |
| 5699 | yes) EXEEXT=.exe;; |
| 5700 | *) EXEEXT=$withval;; |
| 5701 | esac |
| 5702 | fi |
| 5703 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5704 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5 |
| 5705 | $as_echo "$EXEEXT" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5706 | |
| 5707 | # Test whether we're running on a non-case-sensitive system, in which |
| 5708 | # case we give a warning if no ext is given |
| 5709 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5710 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5 |
| 5711 | $as_echo_n "checking for case-insensitive build directory... " >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5712 | if test ! -d CaseSensitiveTestDir; then |
| 5713 | mkdir CaseSensitiveTestDir |
| 5714 | fi |
| 5715 | |
| 5716 | if test -d casesensitivetestdir |
| 5717 | then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5718 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 5719 | $as_echo "yes" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5720 | BUILDEXEEXT=.exe |
| 5721 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5722 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 5723 | $as_echo "no" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5724 | BUILDEXEEXT=$EXEEXT |
| 5725 | fi |
| 5726 | rmdir CaseSensitiveTestDir |
| 5727 | |
| 5728 | case $MACHDEP in |
| 5729 | bsdos*) |
| 5730 | case $CC in |
| 5731 | gcc) CC="$CC -D_HAVE_BSDI";; |
| 5732 | esac;; |
| 5733 | esac |
| 5734 | |
| 5735 | case $ac_sys_system in |
| 5736 | hp*|HP*) |
| 5737 | case $CC in |
| 5738 | cc|*/cc) CC="$CC -Ae";; |
| 5739 | esac;; |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5740 | esac |
| 5741 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5742 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5743 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5 |
| 5744 | $as_echo_n "checking LIBRARY... " >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5745 | if test -z "$LIBRARY" |
| 5746 | then |
Barry Warsaw | f040d7d | 2010-10-18 17:09:07 +0000 | [diff] [blame] | 5747 | LIBRARY='libpython$(VERSION)$(ABIFLAGS).a' |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5748 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5749 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5 |
| 5750 | $as_echo "$LIBRARY" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5751 | |
| 5752 | # LDLIBRARY is the name of the library to link against (as opposed to the |
| 5753 | # name of the library into which to insert object files). BLDLIBRARY is also |
| 5754 | # the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY |
| 5755 | # is blank as the main program is not linked directly against LDLIBRARY. |
| 5756 | # LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On |
| 5757 | # systems without shared libraries, LDLIBRARY is the same as LIBRARY |
| 5758 | # (defined in the Makefiles). On Cygwin LDLIBRARY is the import library, |
| 5759 | # DLLLIBRARY is the shared (i.e., DLL) library. |
| 5760 | # |
| 5761 | # RUNSHARED is used to run shared python without installed libraries |
| 5762 | # |
| 5763 | # INSTSONAME is the name of the shared library that will be use to install |
| 5764 | # on the system - some systems like version suffix, others don't |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 5765 | # |
| 5766 | # LDVERSION is the shared library version number, normally the Python version |
| 5767 | # with the ABI build flags appended. |
| 5768 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5769 | |
| 5770 | |
| 5771 | |
| 5772 | |
| 5773 | |
| 5774 | |
Martin v. Löwis | d1fc34d | 2010-12-30 14:55:47 +0000 | [diff] [blame] | 5775 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5776 | LDLIBRARY="$LIBRARY" |
| 5777 | BLDLIBRARY='$(LDLIBRARY)' |
| 5778 | INSTSONAME='$(LDLIBRARY)' |
| 5779 | DLLLIBRARY='' |
| 5780 | LDLIBRARYDIR='' |
| 5781 | RUNSHARED='' |
Barry Warsaw | 14d98ac | 2010-11-24 19:43:47 +0000 | [diff] [blame] | 5782 | LDVERSION="$VERSION" |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5783 | |
| 5784 | # LINKCC is the command that links the python executable -- default is $(CC). |
| 5785 | # If CXX is set, and if it is needed to link a main function that was |
| 5786 | # compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable: |
| 5787 | # python might then depend on the C++ runtime |
| 5788 | # This is altered for AIX in order to build the export list before |
| 5789 | # linking. |
| 5790 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5791 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5 |
| 5792 | $as_echo_n "checking LINKCC... " >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5793 | if test -z "$LINKCC" |
| 5794 | then |
| 5795 | LINKCC='$(PURIFY) $(MAINCC)' |
| 5796 | case $ac_sys_system in |
| 5797 | AIX*) |
| 5798 | exp_extra="\"\"" |
| 5799 | if test $ac_sys_release -ge 5 -o \ |
| 5800 | $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then |
| 5801 | exp_extra="." |
| 5802 | fi |
| 5803 | LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";; |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5804 | QNX*) |
| 5805 | # qcc must be used because the other compilers do not |
| 5806 | # support -N. |
| 5807 | LINKCC=qcc;; |
| 5808 | esac |
| 5809 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5810 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5 |
| 5811 | $as_echo "$LINKCC" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5812 | |
| 5813 | # GNULD is set to "yes" if the GNU linker is used. If this goes wrong |
| 5814 | # make sure we default having it set to "no": this is used by |
| 5815 | # distutils.unixccompiler to know if it should add --enable-new-dtags |
| 5816 | # to linker command lines, and failing to detect GNU ld simply results |
| 5817 | # in the same bahaviour as before. |
| 5818 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5819 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
| 5820 | $as_echo_n "checking for GNU ld... " >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5821 | ac_prog=ld |
| 5822 | if test "$GCC" = yes; then |
| 5823 | ac_prog=`$CC -print-prog-name=ld` |
| 5824 | fi |
| 5825 | case `"$ac_prog" -V 2>&1 < /dev/null` in |
| 5826 | *GNU*) |
| 5827 | GNULD=yes;; |
| 5828 | *) |
| 5829 | GNULD=no;; |
| 5830 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5831 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5 |
| 5832 | $as_echo "$GNULD" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5833 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5834 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5 |
| 5835 | $as_echo_n "checking for --enable-shared... " >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5836 | # Check whether --enable-shared was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5837 | if test "${enable_shared+set}" = set; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5838 | enableval=$enable_shared; |
| 5839 | fi |
| 5840 | |
| 5841 | |
| 5842 | if test -z "$enable_shared" |
| 5843 | then |
| 5844 | case $ac_sys_system in |
Antoine Pitrou | 6103ab1 | 2009-10-24 20:11:21 +0000 | [diff] [blame] | 5845 | CYGWIN*) |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5846 | enable_shared="yes";; |
| 5847 | *) |
| 5848 | enable_shared="no";; |
| 5849 | esac |
| 5850 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5851 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 |
| 5852 | $as_echo "$enable_shared" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5853 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5854 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5 |
| 5855 | $as_echo_n "checking for --enable-profiling... " >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5856 | # Check whether --enable-profiling was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5857 | if test "${enable_profiling+set}" = set; then : |
doko@ubuntu.com | ba01583 | 2012-06-30 16:52:05 +0200 | [diff] [blame] | 5858 | enableval=$enable_profiling; |
| 5859 | fi |
| 5860 | |
| 5861 | if test "x$enable_profiling" = xyes; then |
| 5862 | ac_save_cc="$CC" |
Benjamin Peterson | 615ea1a | 2013-03-26 08:55:37 -0400 | [diff] [blame] | 5863 | CC="$CC -pg" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5864 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5865 | /* end confdefs.h. */ |
| 5866 | int main() { return 0; } |
| 5867 | _ACEOF |
doko@ubuntu.com | ba01583 | 2012-06-30 16:52:05 +0200 | [diff] [blame] | 5868 | if ac_fn_c_try_link "$LINENO"; then : |
| 5869 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5870 | else |
doko@ubuntu.com | ba01583 | 2012-06-30 16:52:05 +0200 | [diff] [blame] | 5871 | enable_profiling=no |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5872 | fi |
doko@ubuntu.com | ba01583 | 2012-06-30 16:52:05 +0200 | [diff] [blame] | 5873 | rm -f core conftest.err conftest.$ac_objext \ |
| 5874 | conftest$ac_exeext conftest.$ac_ext |
| 5875 | CC="$ac_save_cc" |
| 5876 | else |
| 5877 | enable_profiling=no |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5878 | fi |
doko@ubuntu.com | ba01583 | 2012-06-30 16:52:05 +0200 | [diff] [blame] | 5879 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5 |
| 5880 | $as_echo "$enable_profiling" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5881 | |
doko@ubuntu.com | ba01583 | 2012-06-30 16:52:05 +0200 | [diff] [blame] | 5882 | if test "x$enable_profiling" = xyes; then |
| 5883 | BASECFLAGS="-pg $BASECFLAGS" |
| 5884 | LDFLAGS="-pg $LDFLAGS" |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5885 | fi |
| 5886 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5887 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5 |
| 5888 | $as_echo_n "checking LDLIBRARY... " >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5889 | |
| 5890 | # MacOSX framework builds need more magic. LDLIBRARY is the dynamic |
| 5891 | # library that we build, but we do not want to link against it (we |
| 5892 | # will find it with a -framework option). For this reason there is an |
| 5893 | # extra variable BLDLIBRARY against which Python and the extension |
| 5894 | # modules are linked, BLDLIBRARY. This is normally the same as |
| 5895 | # LDLIBRARY, but empty for MacOSX framework builds. |
| 5896 | if test "$enable_framework" |
| 5897 | then |
| 5898 | LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
doko@ubuntu.com | e5de66e | 2014-05-07 12:57:44 +0200 | [diff] [blame] | 5899 | RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}} |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5900 | BLDLIBRARY='' |
| 5901 | else |
| 5902 | BLDLIBRARY='$(LDLIBRARY)' |
| 5903 | fi |
| 5904 | |
| 5905 | # Other platforms follow |
| 5906 | if test $enable_shared = "yes"; then |
doko@python.org | 8742119 | 2013-01-26 11:39:31 +0100 | [diff] [blame] | 5907 | PY_ENABLE_SHARED=1 |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5908 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5909 | $as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5910 | |
| 5911 | case $ac_sys_system in |
| 5912 | CYGWIN*) |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 5913 | LDLIBRARY='libpython$(LDVERSION).dll.a' |
| 5914 | DLLLIBRARY='libpython$(LDVERSION).dll' |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5915 | ;; |
| 5916 | SunOS*) |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 5917 | LDLIBRARY='libpython$(LDVERSION).so' |
| 5918 | BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)' |
doko@ubuntu.com | e5de66e | 2014-05-07 12:57:44 +0200 | [diff] [blame] | 5919 | RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5920 | INSTSONAME="$LDLIBRARY".$SOVERSION |
Martin v. Löwis | 9b142aa | 2011-02-05 20:26:52 +0000 | [diff] [blame] | 5921 | if test "$with_pydebug" != yes |
Martin v. Löwis | d1fc34d | 2010-12-30 14:55:47 +0000 | [diff] [blame] | 5922 | then |
| 5923 | PY3LIBRARY=libpython3.so |
| 5924 | fi |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5925 | ;; |
Charles-François Natali | 749400a | 2011-07-24 22:41:18 +0200 | [diff] [blame] | 5926 | Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*) |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 5927 | LDLIBRARY='libpython$(LDVERSION).so' |
| 5928 | BLDLIBRARY='-L. -lpython$(LDVERSION)' |
doko@ubuntu.com | e5de66e | 2014-05-07 12:57:44 +0200 | [diff] [blame] | 5929 | RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5930 | INSTSONAME="$LDLIBRARY".$SOVERSION |
Martin v. Löwis | 9b142aa | 2011-02-05 20:26:52 +0000 | [diff] [blame] | 5931 | if test "$with_pydebug" != yes |
Martin v. Löwis | d1fc34d | 2010-12-30 14:55:47 +0000 | [diff] [blame] | 5932 | then |
| 5933 | PY3LIBRARY=libpython3.so |
| 5934 | fi |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5935 | ;; |
| 5936 | hp*|HP*) |
| 5937 | case `uname -m` in |
| 5938 | ia64) |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 5939 | LDLIBRARY='libpython$(LDVERSION).so' |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5940 | ;; |
| 5941 | *) |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 5942 | LDLIBRARY='libpython$(LDVERSION).sl' |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5943 | ;; |
| 5944 | esac |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 5945 | BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)' |
doko@ubuntu.com | e5de66e | 2014-05-07 12:57:44 +0200 | [diff] [blame] | 5946 | RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}} |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5947 | ;; |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5948 | Darwin*) |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 5949 | LDLIBRARY='libpython$(LDVERSION).dylib' |
| 5950 | BLDLIBRARY='-L. -lpython$(LDVERSION)' |
doko@ubuntu.com | e5de66e | 2014-05-07 12:57:44 +0200 | [diff] [blame] | 5951 | RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}} |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5952 | ;; |
Antoine Pitrou | 8e6b407 | 2010-09-10 19:44:44 +0000 | [diff] [blame] | 5953 | AIX*) |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 5954 | LDLIBRARY='libpython$(LDVERSION).so' |
doko@ubuntu.com | e5de66e | 2014-05-07 12:57:44 +0200 | [diff] [blame] | 5955 | RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}} |
Antoine Pitrou | 8e6b407 | 2010-09-10 19:44:44 +0000 | [diff] [blame] | 5956 | ;; |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5957 | |
| 5958 | esac |
| 5959 | else # shared is disabled |
doko@python.org | 8742119 | 2013-01-26 11:39:31 +0100 | [diff] [blame] | 5960 | PY_ENABLE_SHARED=0 |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5961 | case $ac_sys_system in |
| 5962 | CYGWIN*) |
| 5963 | BLDLIBRARY='$(LIBRARY)' |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 5964 | LDLIBRARY='libpython$(LDVERSION).dll.a' |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5965 | ;; |
| 5966 | esac |
| 5967 | fi |
| 5968 | |
doko@ubuntu.com | 1abe1c5 | 2012-06-30 20:42:45 +0200 | [diff] [blame] | 5969 | if test "$cross_compiling" = yes; then |
| 5970 | RUNSHARED= |
| 5971 | fi |
| 5972 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5973 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5 |
| 5974 | $as_echo "$LDLIBRARY" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5975 | |
| 5976 | if test -n "$ac_tool_prefix"; then |
| 5977 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. |
| 5978 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5979 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 5980 | $as_echo_n "checking for $ac_word... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 5981 | if ${ac_cv_prog_RANLIB+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5982 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5983 | else |
| 5984 | if test -n "$RANLIB"; then |
| 5985 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. |
| 5986 | else |
| 5987 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 5988 | for as_dir in $PATH |
| 5989 | do |
| 5990 | IFS=$as_save_IFS |
| 5991 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5992 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 5993 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 5994 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5995 | $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] | 5996 | break 2 |
| 5997 | fi |
| 5998 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 5999 | done |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6000 | IFS=$as_save_IFS |
| 6001 | |
| 6002 | fi |
| 6003 | fi |
| 6004 | RANLIB=$ac_cv_prog_RANLIB |
| 6005 | if test -n "$RANLIB"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6006 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
| 6007 | $as_echo "$RANLIB" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6008 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6009 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6010 | $as_echo "no" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6011 | fi |
| 6012 | |
| 6013 | |
| 6014 | fi |
| 6015 | if test -z "$ac_cv_prog_RANLIB"; then |
| 6016 | ac_ct_RANLIB=$RANLIB |
| 6017 | # Extract the first word of "ranlib", so it can be a program name with args. |
| 6018 | set dummy ranlib; ac_word=$2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6019 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 6020 | $as_echo_n "checking for $ac_word... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 6021 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6022 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6023 | else |
| 6024 | if test -n "$ac_ct_RANLIB"; then |
| 6025 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. |
| 6026 | else |
| 6027 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 6028 | for as_dir in $PATH |
| 6029 | do |
| 6030 | IFS=$as_save_IFS |
| 6031 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6032 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 6033 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6034 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6035 | $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] | 6036 | break 2 |
| 6037 | fi |
| 6038 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6039 | done |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6040 | IFS=$as_save_IFS |
| 6041 | |
| 6042 | fi |
| 6043 | fi |
| 6044 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB |
| 6045 | if test -n "$ac_ct_RANLIB"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6046 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
| 6047 | $as_echo "$ac_ct_RANLIB" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6048 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6049 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6050 | $as_echo "no" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6051 | fi |
| 6052 | |
| 6053 | if test "x$ac_ct_RANLIB" = x; then |
| 6054 | RANLIB=":" |
| 6055 | else |
| 6056 | case $cross_compiling:$ac_tool_warned in |
| 6057 | yes:) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6058 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 6059 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6060 | ac_tool_warned=yes ;; |
| 6061 | esac |
| 6062 | RANLIB=$ac_ct_RANLIB |
| 6063 | fi |
| 6064 | else |
| 6065 | RANLIB="$ac_cv_prog_RANLIB" |
| 6066 | fi |
| 6067 | |
| 6068 | |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 6069 | if test -n "$ac_tool_prefix"; then |
| 6070 | for ac_prog in ar aal |
| 6071 | do |
| 6072 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. |
| 6073 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6074 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 6075 | $as_echo_n "checking for $ac_word... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 6076 | if ${ac_cv_prog_AR+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6077 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6078 | else |
| 6079 | if test -n "$AR"; then |
| 6080 | ac_cv_prog_AR="$AR" # Let the user override the test. |
| 6081 | else |
| 6082 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 6083 | for as_dir in $PATH |
| 6084 | do |
| 6085 | IFS=$as_save_IFS |
| 6086 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6087 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 6088 | 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] | 6089 | ac_cv_prog_AR="$ac_tool_prefix$ac_prog" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6090 | $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] | 6091 | break 2 |
| 6092 | fi |
| 6093 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6094 | done |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6095 | IFS=$as_save_IFS |
| 6096 | |
| 6097 | fi |
| 6098 | fi |
| 6099 | AR=$ac_cv_prog_AR |
| 6100 | if test -n "$AR"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6101 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
| 6102 | $as_echo "$AR" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6103 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6104 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6105 | $as_echo "no" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6106 | fi |
| 6107 | |
| 6108 | |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 6109 | test -n "$AR" && break |
| 6110 | done |
| 6111 | fi |
| 6112 | if test -z "$AR"; then |
| 6113 | ac_ct_AR=$AR |
| 6114 | for ac_prog in ar aal |
| 6115 | do |
| 6116 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 6117 | set dummy $ac_prog; ac_word=$2 |
| 6118 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 6119 | $as_echo_n "checking for $ac_word... " >&6; } |
| 6120 | if ${ac_cv_prog_ac_ct_AR+:} false; then : |
| 6121 | $as_echo_n "(cached) " >&6 |
| 6122 | else |
| 6123 | if test -n "$ac_ct_AR"; then |
| 6124 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. |
| 6125 | else |
| 6126 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 6127 | for as_dir in $PATH |
| 6128 | do |
| 6129 | IFS=$as_save_IFS |
| 6130 | test -z "$as_dir" && as_dir=. |
| 6131 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 646eb1e | 2012-10-29 17:35:57 +0000 | [diff] [blame] | 6132 | 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] | 6133 | ac_cv_prog_ac_ct_AR="$ac_prog" |
| 6134 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 6135 | break 2 |
| 6136 | fi |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6137 | done |
doko@ubuntu.com | 51f6594 | 2012-06-30 14:42:46 +0200 | [diff] [blame] | 6138 | done |
| 6139 | IFS=$as_save_IFS |
| 6140 | |
| 6141 | fi |
| 6142 | fi |
| 6143 | ac_ct_AR=$ac_cv_prog_ac_ct_AR |
| 6144 | if test -n "$ac_ct_AR"; then |
| 6145 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
| 6146 | $as_echo "$ac_ct_AR" >&6; } |
| 6147 | else |
| 6148 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6149 | $as_echo "no" >&6; } |
| 6150 | fi |
| 6151 | |
| 6152 | |
| 6153 | test -n "$ac_ct_AR" && break |
| 6154 | done |
| 6155 | |
| 6156 | if test "x$ac_ct_AR" = x; then |
| 6157 | AR="ar" |
| 6158 | else |
| 6159 | case $cross_compiling:$ac_tool_warned in |
| 6160 | yes:) |
| 6161 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 6162 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 6163 | ac_tool_warned=yes ;; |
| 6164 | esac |
| 6165 | AR=$ac_ct_AR |
| 6166 | fi |
| 6167 | fi |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6168 | |
| 6169 | |
| 6170 | # tweak ARFLAGS only if the user didn't set it on the command line |
| 6171 | |
| 6172 | if test -z "$ARFLAGS" |
| 6173 | then |
| 6174 | ARFLAGS="rc" |
| 6175 | fi |
| 6176 | |
doko@ubuntu.com | 5884449 | 2012-06-30 18:25:32 +0200 | [diff] [blame] | 6177 | if test -n "$ac_tool_prefix"; then |
| 6178 | for ac_prog in readelf |
| 6179 | do |
| 6180 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. |
| 6181 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 |
| 6182 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 6183 | $as_echo_n "checking for $ac_word... " >&6; } |
| 6184 | if ${ac_cv_prog_READELF+:} false; then : |
| 6185 | $as_echo_n "(cached) " >&6 |
| 6186 | else |
| 6187 | if test -n "$READELF"; then |
| 6188 | ac_cv_prog_READELF="$READELF" # Let the user override the test. |
| 6189 | else |
| 6190 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 6191 | for as_dir in $PATH |
| 6192 | do |
| 6193 | IFS=$as_save_IFS |
| 6194 | test -z "$as_dir" && as_dir=. |
| 6195 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 6196 | 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] | 6197 | ac_cv_prog_READELF="$ac_tool_prefix$ac_prog" |
| 6198 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 6199 | break 2 |
| 6200 | fi |
| 6201 | done |
| 6202 | done |
| 6203 | IFS=$as_save_IFS |
| 6204 | |
| 6205 | fi |
| 6206 | fi |
| 6207 | READELF=$ac_cv_prog_READELF |
| 6208 | if test -n "$READELF"; then |
| 6209 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5 |
| 6210 | $as_echo "$READELF" >&6; } |
| 6211 | else |
| 6212 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6213 | $as_echo "no" >&6; } |
| 6214 | fi |
| 6215 | |
| 6216 | |
| 6217 | test -n "$READELF" && break |
| 6218 | done |
| 6219 | fi |
| 6220 | if test -z "$READELF"; then |
| 6221 | ac_ct_READELF=$READELF |
| 6222 | for ac_prog in readelf |
| 6223 | do |
| 6224 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 6225 | set dummy $ac_prog; ac_word=$2 |
| 6226 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 6227 | $as_echo_n "checking for $ac_word... " >&6; } |
| 6228 | if ${ac_cv_prog_ac_ct_READELF+:} false; then : |
| 6229 | $as_echo_n "(cached) " >&6 |
| 6230 | else |
| 6231 | if test -n "$ac_ct_READELF"; then |
| 6232 | ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test. |
| 6233 | else |
| 6234 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 6235 | for as_dir in $PATH |
| 6236 | do |
| 6237 | IFS=$as_save_IFS |
| 6238 | test -z "$as_dir" && as_dir=. |
| 6239 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 6240 | 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] | 6241 | ac_cv_prog_ac_ct_READELF="$ac_prog" |
| 6242 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 6243 | break 2 |
| 6244 | fi |
| 6245 | done |
| 6246 | done |
| 6247 | IFS=$as_save_IFS |
| 6248 | |
| 6249 | fi |
| 6250 | fi |
| 6251 | ac_ct_READELF=$ac_cv_prog_ac_ct_READELF |
| 6252 | if test -n "$ac_ct_READELF"; then |
| 6253 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5 |
| 6254 | $as_echo "$ac_ct_READELF" >&6; } |
| 6255 | else |
| 6256 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6257 | $as_echo "no" >&6; } |
| 6258 | fi |
| 6259 | |
| 6260 | |
| 6261 | test -n "$ac_ct_READELF" && break |
| 6262 | done |
| 6263 | |
| 6264 | if test "x$ac_ct_READELF" = x; then |
| 6265 | READELF=":" |
| 6266 | else |
| 6267 | case $cross_compiling:$ac_tool_warned in |
| 6268 | yes:) |
| 6269 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 6270 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 6271 | ac_tool_warned=yes ;; |
| 6272 | esac |
| 6273 | READELF=$ac_ct_READELF |
| 6274 | fi |
| 6275 | fi |
| 6276 | |
| 6277 | if test "$cross_compiling" = yes; then |
| 6278 | case "$READELF" in |
| 6279 | readelf|:) |
| 6280 | as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5 |
| 6281 | ;; |
| 6282 | esac |
| 6283 | fi |
| 6284 | |
| 6285 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6286 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6287 | case $MACHDEP in |
| 6288 | bsdos*|hp*|HP*) |
| 6289 | # install -d does not work on BSDI or HP-UX |
| 6290 | if test -z "$INSTALL" |
| 6291 | then |
| 6292 | INSTALL="${srcdir}/install-sh -c" |
| 6293 | fi |
| 6294 | esac |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6295 | # Find a good install program. We prefer a C program (faster), |
| 6296 | # so one script is as good as another. But avoid the broken or |
| 6297 | # incompatible versions: |
| 6298 | # SysV /etc/install, /usr/sbin/install |
| 6299 | # SunOS /usr/etc/install |
| 6300 | # IRIX /sbin/install |
| 6301 | # AIX /bin/install |
| 6302 | # AmigaOS /C/install, which installs bootblocks on floppy discs |
| 6303 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
| 6304 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
| 6305 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
| 6306 | # OS/2's system install, which has a completely different semantic |
| 6307 | # ./install, which can be erroneously created by make from ./install.sh. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6308 | # Reject install programs that cannot install multiple files. |
| 6309 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 |
| 6310 | $as_echo_n "checking for a BSD-compatible install... " >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6311 | if test -z "$INSTALL"; then |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 6312 | if ${ac_cv_path_install+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6313 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6314 | else |
| 6315 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 6316 | for as_dir in $PATH |
| 6317 | do |
| 6318 | IFS=$as_save_IFS |
| 6319 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6320 | # Account for people who put trailing slashes in PATH elements. |
| 6321 | case $as_dir/ in #(( |
| 6322 | ./ | .// | /[cC]/* | \ |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6323 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6324 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6325 | /usr/ucb/* ) ;; |
| 6326 | *) |
| 6327 | # OSF1 and SCO ODT 3.0 have their own names for install. |
| 6328 | # Don't use installbsd from OSF since it installs stuff as root |
| 6329 | # by default. |
| 6330 | for ac_prog in ginstall scoinst install; do |
| 6331 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 6332 | 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] | 6333 | if test $ac_prog = install && |
| 6334 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then |
| 6335 | # AIX install. It has an incompatible calling convention. |
| 6336 | : |
| 6337 | elif test $ac_prog = install && |
| 6338 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then |
| 6339 | # program-specific install script used by HP pwplus--don't use. |
| 6340 | : |
| 6341 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6342 | rm -rf conftest.one conftest.two conftest.dir |
| 6343 | echo one > conftest.one |
| 6344 | echo two > conftest.two |
| 6345 | mkdir conftest.dir |
| 6346 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && |
| 6347 | test -s conftest.one && test -s conftest.two && |
| 6348 | test -s conftest.dir/conftest.one && |
| 6349 | test -s conftest.dir/conftest.two |
| 6350 | then |
| 6351 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" |
| 6352 | break 3 |
| 6353 | fi |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6354 | fi |
| 6355 | fi |
| 6356 | done |
| 6357 | done |
| 6358 | ;; |
| 6359 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6360 | |
| 6361 | done |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6362 | IFS=$as_save_IFS |
| 6363 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6364 | rm -rf conftest.one conftest.two conftest.dir |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6365 | |
| 6366 | fi |
| 6367 | if test "${ac_cv_path_install+set}" = set; then |
| 6368 | INSTALL=$ac_cv_path_install |
| 6369 | else |
| 6370 | # As a last resort, use the slow shell script. Don't cache a |
| 6371 | # value for INSTALL within a source directory, because that will |
| 6372 | # break other packages using the cache if that directory is |
| 6373 | # removed, or if the value is a relative name. |
| 6374 | INSTALL=$ac_install_sh |
| 6375 | fi |
| 6376 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6377 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
| 6378 | $as_echo "$INSTALL" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6379 | |
| 6380 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
| 6381 | # It thinks the first close brace ends the variable substitution. |
| 6382 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' |
| 6383 | |
| 6384 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' |
| 6385 | |
| 6386 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
| 6387 | |
Matthias Klose | 93a0ef1 | 2012-03-15 18:08:34 +0100 | [diff] [blame] | 6388 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 |
| 6389 | $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } |
| 6390 | if test -z "$MKDIR_P"; then |
| 6391 | if ${ac_cv_path_mkdir+:} false; then : |
| 6392 | $as_echo_n "(cached) " >&6 |
| 6393 | else |
| 6394 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 6395 | for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin |
| 6396 | do |
| 6397 | IFS=$as_save_IFS |
| 6398 | test -z "$as_dir" && as_dir=. |
| 6399 | for ac_prog in mkdir gmkdir; do |
| 6400 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 6401 | as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue |
Matthias Klose | 93a0ef1 | 2012-03-15 18:08:34 +0100 | [diff] [blame] | 6402 | case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( |
| 6403 | 'mkdir (GNU coreutils) '* | \ |
| 6404 | 'mkdir (coreutils) '* | \ |
| 6405 | 'mkdir (fileutils) '4.1*) |
| 6406 | ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext |
| 6407 | break 3;; |
| 6408 | esac |
| 6409 | done |
| 6410 | done |
| 6411 | done |
| 6412 | IFS=$as_save_IFS |
| 6413 | |
| 6414 | fi |
| 6415 | |
| 6416 | test -d ./--version && rmdir ./--version |
| 6417 | if test "${ac_cv_path_mkdir+set}" = set; then |
| 6418 | MKDIR_P="$ac_cv_path_mkdir -p" |
| 6419 | else |
| 6420 | # As a last resort, use the slow shell script. Don't cache a |
| 6421 | # value for MKDIR_P within a source directory, because that will |
| 6422 | # break other packages using the cache if that directory is |
| 6423 | # removed, or if the value is a relative name. |
| 6424 | MKDIR_P="$ac_install_sh -d" |
| 6425 | fi |
| 6426 | fi |
| 6427 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 |
| 6428 | $as_echo "$MKDIR_P" >&6; } |
| 6429 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6430 | |
| 6431 | # Not every filesystem supports hard links |
| 6432 | |
| 6433 | if test -z "$LN" ; then |
| 6434 | case $ac_sys_system in |
| 6435 | CYGWIN*) LN="ln -s";; |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6436 | *) LN=ln;; |
| 6437 | esac |
| 6438 | fi |
| 6439 | |
Barry Warsaw | 35f3a2c | 2010-09-03 18:30:30 +0000 | [diff] [blame] | 6440 | # For calculating the .so ABI tag. |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 6441 | |
| 6442 | ABIFLAGS="" |
Barry Warsaw | 35f3a2c | 2010-09-03 18:30:30 +0000 | [diff] [blame] | 6443 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6444 | # Check for --with-pydebug |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6445 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5 |
| 6446 | $as_echo_n "checking for --with-pydebug... " >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6447 | |
| 6448 | # Check whether --with-pydebug was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6449 | if test "${with_pydebug+set}" = set; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6450 | withval=$with_pydebug; |
| 6451 | if test "$withval" != no |
| 6452 | then |
| 6453 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6454 | $as_echo "#define Py_DEBUG 1" >>confdefs.h |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6455 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6456 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 6457 | $as_echo "yes" >&6; }; |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6458 | Py_DEBUG='true' |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 6459 | ABIFLAGS="${ABIFLAGS}d" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6460 | else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6461 | $as_echo "no" >&6; }; Py_DEBUG='false' |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6462 | fi |
| 6463 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6464 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6465 | $as_echo "no" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6466 | fi |
| 6467 | |
| 6468 | |
T. Wouters | ddbfa2c | 2017-05-23 01:30:49 +0200 | [diff] [blame] | 6469 | # Check for --with-assertions. Py_DEBUG implies assertions, but also changes |
| 6470 | # the ABI. This allows enabling assertions without changing the ABI. |
| 6471 | assertions='false' |
| 6472 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-assertions" >&5 |
| 6473 | $as_echo_n "checking for --with-assertions... " >&6; } |
| 6474 | |
| 6475 | # Check whether --with-assertions was given. |
| 6476 | if test "${with_assertions+set}" = set; then : |
| 6477 | withval=$with_assertions; |
| 6478 | if test "$withval" != no |
| 6479 | then |
| 6480 | assertions='true' |
| 6481 | fi |
| 6482 | fi |
| 6483 | |
| 6484 | if test "$assertions" = 'true'; then |
| 6485 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 6486 | $as_echo "yes" >&6; } |
| 6487 | elif test "$Py_DEBUG" = 'true'; then |
| 6488 | assertions='true' |
| 6489 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: implied by --with-pydebug" >&5 |
| 6490 | $as_echo "implied by --with-pydebug" >&6; } |
| 6491 | else |
| 6492 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6493 | $as_echo "no" >&6; } |
| 6494 | fi |
| 6495 | |
Brett Cannon | 63d98bc | 2016-09-06 17:12:40 -0700 | [diff] [blame] | 6496 | # Enable optimization flags |
| 6497 | |
| 6498 | |
| 6499 | Py_OPT='false' |
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 1016b2f | 2016-11-20 21:07:42 +0000 | [diff] [blame] | 6500 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5 |
| 6501 | $as_echo_n "checking for --enable-optimizations... " >&6; } |
| 6502 | # Check whether --enable-optimizations was given. |
| 6503 | if test "${enable_optimizations+set}" = set; then : |
| 6504 | enableval=$enable_optimizations; |
Alex Wang | 8cea592 | 2017-03-28 08:50:51 -0400 | [diff] [blame] | 6505 | if test "$enableval" != no |
Brett Cannon | 63d98bc | 2016-09-06 17:12:40 -0700 | [diff] [blame] | 6506 | then |
| 6507 | Py_OPT='true' |
| 6508 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 6509 | $as_echo "yes" >&6; }; |
| 6510 | else |
| 6511 | Py_OPT='false' |
| 6512 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6513 | $as_echo "no" >&6; }; |
| 6514 | fi |
| 6515 | else |
| 6516 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6517 | $as_echo "no" >&6; } |
| 6518 | fi |
| 6519 | |
| 6520 | if test "$Py_OPT" = 'true' ; then |
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 14c7f71 | 2016-09-08 22:38:46 +0000 | [diff] [blame] | 6521 | # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not |
| 6522 | # 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] | 6523 | # 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] | 6524 | # who want LTO need to use --with-lto themselves. |
Brett Cannon | 63d98bc | 2016-09-06 17:12:40 -0700 | [diff] [blame] | 6525 | DEF_MAKE_ALL_RULE="profile-opt" |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6526 | REQUIRE_PGO="yes" |
Brett Cannon | 63d98bc | 2016-09-06 17:12:40 -0700 | [diff] [blame] | 6527 | DEF_MAKE_RULE="build_all" |
| 6528 | else |
| 6529 | DEF_MAKE_ALL_RULE="build_all" |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6530 | REQUIRE_PGO="no" |
Brett Cannon | 63d98bc | 2016-09-06 17:12:40 -0700 | [diff] [blame] | 6531 | DEF_MAKE_RULE="all" |
| 6532 | fi |
| 6533 | |
Gregory P. Smith | d82da9f | 2016-04-15 16:57:04 -0700 | [diff] [blame] | 6534 | # Enable LTO flags |
| 6535 | |
| 6536 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5 |
| 6537 | $as_echo_n "checking for --with-lto... " >&6; } |
| 6538 | |
| 6539 | # Check whether --with-lto was given. |
| 6540 | if test "${with_lto+set}" = set; then : |
| 6541 | withval=$with_lto; |
| 6542 | if test "$withval" != no |
| 6543 | then |
| 6544 | Py_LTO='true' |
| 6545 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 6546 | $as_echo "yes" >&6; }; |
| 6547 | else |
| 6548 | Py_LTO='false' |
| 6549 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6550 | $as_echo "no" >&6; }; |
| 6551 | fi |
| 6552 | else |
| 6553 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6554 | $as_echo "no" >&6; } |
| 6555 | fi |
| 6556 | |
| 6557 | if test "$Py_LTO" = 'true' ; then |
| 6558 | case $CC in |
| 6559 | *clang*) |
Ned Deily | 8482ce4 | 2016-09-06 15:09:20 -0700 | [diff] [blame] | 6560 | case $ac_sys_system in |
| 6561 | Darwin*) |
| 6562 | # Any changes made here should be reflected in the GCC+Darwin case below |
| 6563 | LTOFLAGS="-flto -Wl,-export_dynamic" |
| 6564 | ;; |
| 6565 | *) |
| 6566 | LTOFLAGS="-flto" |
| 6567 | ;; |
| 6568 | esac |
Gregory P. Smith | d82da9f | 2016-04-15 16:57:04 -0700 | [diff] [blame] | 6569 | ;; |
| 6570 | *gcc*) |
| 6571 | case $ac_sys_system in |
| 6572 | Darwin*) |
Ned Deily | 8482ce4 | 2016-09-06 15:09:20 -0700 | [diff] [blame] | 6573 | LTOFLAGS="-flto -Wl,-export_dynamic" |
Gregory P. Smith | d82da9f | 2016-04-15 16:57:04 -0700 | [diff] [blame] | 6574 | ;; |
| 6575 | *) |
| 6576 | LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none" |
| 6577 | ;; |
| 6578 | esac |
| 6579 | ;; |
| 6580 | esac |
| 6581 | fi |
| 6582 | |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6583 | # Enable PGO flags. |
Zachary Ware | 5af8564 | 2015-12-21 12:09:17 -0600 | [diff] [blame] | 6584 | |
| 6585 | |
| 6586 | |
| 6587 | |
| 6588 | |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6589 | # Make this work on systems where llvm tools are not installed with their |
| 6590 | # normal names in the default $PATH (ie: Ubuntu). They exist under the |
| 6591 | # non-suffixed name in their versioned llvm directory. |
| 6592 | llvm_bin_dir='' |
| 6593 | llvm_path="${PATH}" |
| 6594 | if test "${CC}" = "clang" |
| 6595 | then |
| 6596 | clang_bin=`which clang` |
| 6597 | # Some systems install clang elsewhere as a symlink to the real path |
| 6598 | # which is where the related llvm tools are located. |
| 6599 | if test -L "${clang_bin}" |
| 6600 | then |
| 6601 | clang_dir=`dirname "${clang_bin}"` |
| 6602 | clang_bin=`readlink "${clang_bin}"` |
| 6603 | llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"` |
| 6604 | llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}" |
| 6605 | fi |
| 6606 | fi |
Zachary Ware | 5af8564 | 2015-12-21 12:09:17 -0600 | [diff] [blame] | 6607 | |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6608 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 |
| 6609 | $as_echo_n "checking target system type... " >&6; } |
| 6610 | if ${ac_cv_target+:} false; then : |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6611 | $as_echo_n "(cached) " >&6 |
| 6612 | else |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6613 | if test "x$target_alias" = x; then |
| 6614 | ac_cv_target=$ac_cv_host |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6615 | else |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6616 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || |
| 6617 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 |
| 6618 | fi |
| 6619 | |
| 6620 | fi |
| 6621 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 |
| 6622 | $as_echo "$ac_cv_target" >&6; } |
| 6623 | case $ac_cv_target in |
| 6624 | *-*-*) ;; |
| 6625 | *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; |
| 6626 | esac |
| 6627 | target=$ac_cv_target |
| 6628 | ac_save_IFS=$IFS; IFS='-' |
| 6629 | set x $ac_cv_target |
| 6630 | shift |
| 6631 | target_cpu=$1 |
| 6632 | target_vendor=$2 |
| 6633 | shift; shift |
| 6634 | # Remember, the first character of IFS is used to create $*, |
| 6635 | # except with old shells: |
| 6636 | target_os=$* |
| 6637 | IFS=$ac_save_IFS |
| 6638 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac |
| 6639 | |
| 6640 | |
| 6641 | # The aliases save the names the user supplied, while $host etc. |
| 6642 | # will get canonicalized. |
| 6643 | test -n "$target_alias" && |
| 6644 | test "$program_prefix$program_suffix$program_transform_name" = \ |
| 6645 | NONENONEs,x,x, && |
| 6646 | program_prefix=${target_alias}- |
| 6647 | # Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args. |
| 6648 | set dummy $target_alias-llvm-profdata; ac_word=$2 |
| 6649 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 6650 | $as_echo_n "checking for $ac_word... " >&6; } |
| 6651 | if ${ac_cv_path_LLVM_PROFDATA+:} false; then : |
| 6652 | $as_echo_n "(cached) " >&6 |
| 6653 | else |
| 6654 | case $LLVM_PROFDATA in |
| 6655 | [\\/]* | ?:[\\/]*) |
| 6656 | ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path. |
| 6657 | ;; |
| 6658 | *) |
| 6659 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 6660 | for as_dir in ${llvm_path} |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6661 | do |
| 6662 | IFS=$as_save_IFS |
| 6663 | test -z "$as_dir" && as_dir=. |
| 6664 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 6665 | 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] | 6666 | ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext" |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6667 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 6668 | break 2 |
| 6669 | fi |
| 6670 | done |
| 6671 | done |
| 6672 | IFS=$as_save_IFS |
| 6673 | |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6674 | ;; |
| 6675 | esac |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6676 | fi |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6677 | LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA |
| 6678 | if test -n "$LLVM_PROFDATA"; then |
| 6679 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5 |
| 6680 | $as_echo "$LLVM_PROFDATA" >&6; } |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6681 | else |
| 6682 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6683 | $as_echo "no" >&6; } |
| 6684 | fi |
| 6685 | |
| 6686 | |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6687 | if test -z "$ac_cv_path_LLVM_PROFDATA"; then |
| 6688 | if test "$build" = "$target"; then |
| 6689 | ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA |
| 6690 | # Extract the first word of "llvm-profdata", so it can be a program name with args. |
| 6691 | set dummy llvm-profdata; ac_word=$2 |
| 6692 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 6693 | $as_echo_n "checking for $ac_word... " >&6; } |
| 6694 | if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then : |
| 6695 | $as_echo_n "(cached) " >&6 |
| 6696 | else |
| 6697 | case $ac_pt_LLVM_PROFDATA in |
| 6698 | [\\/]* | ?:[\\/]*) |
| 6699 | ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path. |
| 6700 | ;; |
| 6701 | *) |
| 6702 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 6703 | for as_dir in ${llvm_path} |
| 6704 | do |
| 6705 | IFS=$as_save_IFS |
| 6706 | test -z "$as_dir" && as_dir=. |
| 6707 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 6708 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 6709 | ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext" |
| 6710 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 6711 | break 2 |
| 6712 | fi |
| 6713 | done |
| 6714 | done |
| 6715 | IFS=$as_save_IFS |
| 6716 | |
| 6717 | test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''" |
| 6718 | ;; |
| 6719 | esac |
| 6720 | fi |
| 6721 | ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA |
| 6722 | if test -n "$ac_pt_LLVM_PROFDATA"; then |
| 6723 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5 |
| 6724 | $as_echo "$ac_pt_LLVM_PROFDATA" >&6; } |
| 6725 | else |
| 6726 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6727 | $as_echo "no" >&6; } |
| 6728 | fi |
| 6729 | |
| 6730 | LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA |
| 6731 | else |
| 6732 | LLVM_PROFDATA="''" |
| 6733 | fi |
| 6734 | else |
| 6735 | LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA" |
| 6736 | fi |
| 6737 | |
| 6738 | |
| 6739 | if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}" |
| 6740 | then |
| 6741 | LLVM_PROF_FOUND="found" |
| 6742 | else |
| 6743 | LLVM_PROF_FOUND="not-found" |
| 6744 | fi |
| 6745 | if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found" |
| 6746 | then |
| 6747 | found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null` |
| 6748 | if test -n "${found_llvm_profdata}" |
| 6749 | then |
| 6750 | # llvm-profdata isn't directly in $PATH in some cases. |
| 6751 | # https://apple.stackexchange.com/questions/197053/ |
| 6752 | LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata' |
| 6753 | LLVM_PROF_FOUND=found |
| 6754 | { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5 |
| 6755 | $as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;} |
| 6756 | fi |
| 6757 | fi |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6758 | LLVM_PROF_ERR=no |
| 6759 | case $CC in |
| 6760 | *clang*) |
| 6761 | # Any changes made here should be reflected in the GCC+Darwin case below |
| 6762 | PGO_PROF_GEN_FLAG="-fprofile-instr-generate" |
| 6763 | PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd" |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6764 | LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr" |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6765 | LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\"" |
| 6766 | if test $LLVM_PROF_FOUND = not-found |
| 6767 | then |
| 6768 | LLVM_PROF_ERR=yes |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6769 | if test "${REQUIRE_PGO}" = "yes" |
| 6770 | then |
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 1016b2f | 2016-11-20 21:07:42 +0000 | [diff] [blame] | 6771 | 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] | 6772 | fi |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6773 | fi |
| 6774 | ;; |
| 6775 | *gcc*) |
| 6776 | case $ac_sys_system in |
| 6777 | Darwin*) |
| 6778 | PGO_PROF_GEN_FLAG="-fprofile-instr-generate" |
| 6779 | PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd" |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6780 | LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr" |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6781 | LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\"" |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6782 | if test "${LLVM_PROF_FOUND}" = "not-found" |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6783 | then |
| 6784 | LLVM_PROF_ERR=yes |
Gregory P. Smith | 799520c | 2016-09-07 16:10:00 -0700 | [diff] [blame] | 6785 | if test "${REQUIRE_PGO}" = "yes" |
| 6786 | then |
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 1016b2f | 2016-11-20 21:07:42 +0000 | [diff] [blame] | 6787 | 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] | 6788 | fi |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6789 | fi |
| 6790 | ;; |
| 6791 | *) |
| 6792 | PGO_PROF_GEN_FLAG="-fprofile-generate" |
| 6793 | PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction" |
| 6794 | LLVM_PROF_MERGER="true" |
| 6795 | LLVM_PROF_FILE="" |
| 6796 | ;; |
| 6797 | esac |
| 6798 | ;; |
Zachary Ware | 5af8564 | 2015-12-21 12:09:17 -0600 | [diff] [blame] | 6799 | *icc*) |
| 6800 | PGO_PROF_GEN_FLAG="-prof-gen" |
| 6801 | PGO_PROF_USE_FLAG="-prof-use" |
| 6802 | LLVM_PROF_MERGER="true" |
| 6803 | LLVM_PROF_FILE="" |
| 6804 | ;; |
Brett Cannon | 7188a3e | 2015-09-18 15:13:44 -0700 | [diff] [blame] | 6805 | esac |
| 6806 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6807 | # XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be |
| 6808 | # merged with this chunk of code? |
| 6809 | |
| 6810 | # Optimizer/debugger flags |
| 6811 | # ------------------------ |
| 6812 | # (The following bit of code is complicated enough - please keep things |
| 6813 | # indented properly. Just pretend you're editing Python code. ;-) |
| 6814 | |
| 6815 | # There are two parallel sets of case statements below, one that checks to |
| 6816 | # see if OPT was set and one that does BASECFLAGS setting based upon |
| 6817 | # compiler and platform. BASECFLAGS tweaks need to be made even if the |
| 6818 | # user set OPT. |
| 6819 | |
| 6820 | # tweak OPT based on compiler and platform, only if the user didn't set |
| 6821 | # it on the command line |
| 6822 | |
Victor Stinner | 9ed34a8 | 2017-05-02 22:35:58 +0200 | [diff] [blame] | 6823 | |
Benjamin Peterson | 65b4ec5 | 2010-03-23 21:02:34 +0000 | [diff] [blame] | 6824 | if test "${OPT-unset}" = "unset" |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6825 | then |
| 6826 | case $GCC in |
| 6827 | yes) |
| 6828 | if test "$CC" != 'g++' ; then |
| 6829 | STRICT_PROTO="-Wstrict-prototypes" |
| 6830 | fi |
| 6831 | # For gcc 4.x we need to use -fwrapv so lets check if its supported |
| 6832 | if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then |
| 6833 | WRAP="-fwrapv" |
| 6834 | fi |
Stefan Krah | 962055d | 2011-09-14 15:14:08 +0200 | [diff] [blame] | 6835 | |
Stefan Krah | af04ff2 | 2011-12-08 22:20:31 +0100 | [diff] [blame] | 6836 | case $CC in |
Victor Stinner | 28205b2 | 2017-04-21 11:24:34 +0200 | [diff] [blame] | 6837 | *clang*) |
Victor Stinner | 35f3d24 | 2017-04-21 12:35:24 +0200 | [diff] [blame] | 6838 | cc_is_clang=1 |
Victor Stinner | 28205b2 | 2017-04-21 11:24:34 +0200 | [diff] [blame] | 6839 | ;; |
Victor Stinner | 35f3d24 | 2017-04-21 12:35:24 +0200 | [diff] [blame] | 6840 | *) |
| 6841 | if $CC --version 2>&1 | grep -q clang |
| 6842 | then |
| 6843 | cc_is_clang=1 |
| 6844 | else |
| 6845 | cc_is_clang= |
| 6846 | fi |
Stefan Krah | af04ff2 | 2011-12-08 22:20:31 +0100 | [diff] [blame] | 6847 | esac |
Stefan Krah | 962055d | 2011-09-14 15:14:08 +0200 | [diff] [blame] | 6848 | |
Victor Stinner | 35f3d24 | 2017-04-21 12:35:24 +0200 | [diff] [blame] | 6849 | if test -n "${cc_is_clang}" |
| 6850 | then |
| 6851 | # Clang also needs -fwrapv |
| 6852 | WRAP="-fwrapv" |
Victor Stinner | 9ed34a8 | 2017-05-02 22:35:58 +0200 | [diff] [blame] | 6853 | # bpo-30104: disable strict aliasing to compile correctly dtoa.c, |
| 6854 | # see Makefile.pre.in for more information |
Victor Stinner | 826f83f | 2017-04-28 15:07:10 +0200 | [diff] [blame] | 6855 | CFLAGS_ALIASING="-fno-strict-aliasing" |
Victor Stinner | 35f3d24 | 2017-04-21 12:35:24 +0200 | [diff] [blame] | 6856 | fi |
| 6857 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6858 | case $ac_cv_prog_cc_g in |
| 6859 | yes) |
| 6860 | if test "$Py_DEBUG" = 'true' ; then |
| 6861 | # Optimization messes up debuggers, so turn it off for |
| 6862 | # debug builds. |
Antoine Pitrou | 3d6c784 | 2015-02-11 19:39:16 +0100 | [diff] [blame] | 6863 | if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then |
Victor Stinner | 28205b2 | 2017-04-21 11:24:34 +0200 | [diff] [blame] | 6864 | OPT="-g -Og -Wall" |
Antoine Pitrou | 3d6c784 | 2015-02-11 19:39:16 +0100 | [diff] [blame] | 6865 | else |
Victor Stinner | 28205b2 | 2017-04-21 11:24:34 +0200 | [diff] [blame] | 6866 | OPT="-g -O0 -Wall" |
Antoine Pitrou | 3d6c784 | 2015-02-11 19:39:16 +0100 | [diff] [blame] | 6867 | fi |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6868 | else |
Victor Stinner | 28205b2 | 2017-04-21 11:24:34 +0200 | [diff] [blame] | 6869 | OPT="-g $WRAP -O3 -Wall" |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6870 | fi |
| 6871 | ;; |
| 6872 | *) |
Victor Stinner | 28205b2 | 2017-04-21 11:24:34 +0200 | [diff] [blame] | 6873 | OPT="-O3 -Wall" |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6874 | ;; |
| 6875 | esac |
Victor Stinner | 28205b2 | 2017-04-21 11:24:34 +0200 | [diff] [blame] | 6876 | |
Victor Stinner | 826f83f | 2017-04-28 15:07:10 +0200 | [diff] [blame] | 6877 | OPT="$OPT $STRICT_PROTO" |
Victor Stinner | 28205b2 | 2017-04-21 11:24:34 +0200 | [diff] [blame] | 6878 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6879 | case $ac_sys_system in |
| 6880 | SCO_SV*) OPT="$OPT -m486 -DSCO5" |
| 6881 | ;; |
| 6882 | esac |
| 6883 | ;; |
| 6884 | |
| 6885 | *) |
| 6886 | OPT="-O" |
| 6887 | ;; |
| 6888 | esac |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6889 | fi |
| 6890 | |
| 6891 | |
| 6892 | |
Benjamin Peterson | acb8c52 | 2014-08-09 20:01:49 -0700 | [diff] [blame] | 6893 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6894 | # The -arch flags for universal builds on OSX |
| 6895 | UNIVERSAL_ARCH_FLAGS= |
| 6896 | |
| 6897 | |
| 6898 | # tweak BASECFLAGS based on compiler and platform |
| 6899 | case $GCC in |
| 6900 | yes) |
Benjamin Peterson | 050af5d | 2016-09-10 17:53:13 -0700 | [diff] [blame] | 6901 | CFLAGS_NODIST="$CFLAGS_NODIST -std=c99" |
Benjamin Peterson | d170256 | 2016-09-07 12:00:06 -0700 | [diff] [blame] | 6902 | |
Serhiy Storchaka | ea80ffb | 2016-09-11 21:56:32 +0300 | [diff] [blame] | 6903 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5 |
| 6904 | $as_echo_n "checking for -Wextra... " >&6; } |
| 6905 | ac_save_cc="$CC" |
| 6906 | CC="$CC -Wextra -Werror" |
| 6907 | if ${ac_cv_extra_warnings+:} false; then : |
| 6908 | $as_echo_n "(cached) " >&6 |
| 6909 | else |
| 6910 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 6911 | /* end confdefs.h. */ |
| 6912 | |
| 6913 | |
| 6914 | int |
| 6915 | main () |
| 6916 | { |
| 6917 | |
| 6918 | ; |
| 6919 | return 0; |
| 6920 | } |
| 6921 | |
| 6922 | _ACEOF |
| 6923 | if ac_fn_c_try_compile "$LINENO"; then : |
| 6924 | |
| 6925 | ac_cv_extra_warnings=yes |
| 6926 | |
| 6927 | else |
| 6928 | |
| 6929 | ac_cv_extra_warnings=no |
| 6930 | |
| 6931 | fi |
| 6932 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 6933 | fi |
| 6934 | |
| 6935 | CC="$ac_save_cc" |
| 6936 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5 |
| 6937 | $as_echo "$ac_cv_extra_warnings" >&6; } |
| 6938 | |
| 6939 | if test $ac_cv_extra_warnings = yes |
| 6940 | then |
| 6941 | CFLAGS_NODIST="$CFLAGS_NODIST -Wextra" |
| 6942 | fi |
| 6943 | |
Benjamin Peterson | e6c9d24 | 2010-03-30 17:34:47 +0000 | [diff] [blame] | 6944 | # Python doesn't violate C99 aliasing rules, but older versions of |
| 6945 | # GCC produce warnings for legal Python code. Enable |
| 6946 | # -fno-strict-aliasing on versions of GCC that support but produce |
| 6947 | # warnings. See Issue3326 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6948 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5 |
| 6949 | $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] | 6950 | ac_save_cc="$CC" |
| 6951 | CC="$CC -fno-strict-aliasing" |
Benjamin Peterson | e6c9d24 | 2010-03-30 17:34:47 +0000 | [diff] [blame] | 6952 | save_CFLAGS="$CFLAGS" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 6953 | if ${ac_cv_no_strict_aliasing+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6954 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 6955 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6956 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6957 | /* end confdefs.h. */ |
Gregory P. Smith | e0450c6 | 2009-11-01 21:11:36 +0000 | [diff] [blame] | 6958 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 6959 | |
Gregory P. Smith | e0450c6 | 2009-11-01 21:11:36 +0000 | [diff] [blame] | 6960 | int |
| 6961 | main () |
| 6962 | { |
Mark Dickinson | 8c2b6f1 | 2010-05-11 09:23:07 +0000 | [diff] [blame] | 6963 | |
Gregory P. Smith | e0450c6 | 2009-11-01 21:11:36 +0000 | [diff] [blame] | 6964 | ; |
| 6965 | return 0; |
| 6966 | } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 6967 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6968 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6969 | if ac_fn_c_try_compile "$LINENO"; then : |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 6970 | |
| 6971 | CC="$ac_save_cc -fstrict-aliasing" |
| 6972 | CFLAGS="$CFLAGS -Werror -Wstrict-aliasing" |
| 6973 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Benjamin Peterson | e6c9d24 | 2010-03-30 17:34:47 +0000 | [diff] [blame] | 6974 | /* end confdefs.h. */ |
| 6975 | |
Mark Dickinson | 8c2b6f1 | 2010-05-11 09:23:07 +0000 | [diff] [blame] | 6976 | void f(int **x) {} |
Benjamin Peterson | e6c9d24 | 2010-03-30 17:34:47 +0000 | [diff] [blame] | 6977 | int |
| 6978 | main () |
| 6979 | { |
Mark Dickinson | 8c2b6f1 | 2010-05-11 09:23:07 +0000 | [diff] [blame] | 6980 | double *x; f((int **) &x); |
Benjamin Peterson | e6c9d24 | 2010-03-30 17:34:47 +0000 | [diff] [blame] | 6981 | ; |
| 6982 | return 0; |
| 6983 | } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 6984 | |
Benjamin Peterson | e6c9d24 | 2010-03-30 17:34:47 +0000 | [diff] [blame] | 6985 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 6986 | if ac_fn_c_try_compile "$LINENO"; then : |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 6987 | |
| 6988 | ac_cv_no_strict_aliasing=no |
| 6989 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 6990 | else |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 6991 | |
| 6992 | ac_cv_no_strict_aliasing=yes |
| 6993 | |
Benjamin Peterson | e6c9d24 | 2010-03-30 17:34:47 +0000 | [diff] [blame] | 6994 | fi |
Benjamin Peterson | e6c9d24 | 2010-03-30 17:34:47 +0000 | [diff] [blame] | 6995 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 6996 | |
Benjamin Peterson | e6c9d24 | 2010-03-30 17:34:47 +0000 | [diff] [blame] | 6997 | else |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 6998 | |
| 6999 | ac_cv_no_strict_aliasing=no |
| 7000 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7001 | fi |
Gregory P. Smith | e0450c6 | 2009-11-01 21:11:36 +0000 | [diff] [blame] | 7002 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 7003 | fi |
| 7004 | |
Benjamin Peterson | e6c9d24 | 2010-03-30 17:34:47 +0000 | [diff] [blame] | 7005 | CFLAGS="$save_CFLAGS" |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7006 | CC="$ac_save_cc" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7007 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5 |
| 7008 | $as_echo "$ac_cv_no_strict_aliasing" >&6; } |
Benjamin Peterson | e6c9d24 | 2010-03-30 17:34:47 +0000 | [diff] [blame] | 7009 | if test $ac_cv_no_strict_aliasing = yes |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7010 | then |
| 7011 | BASECFLAGS="$BASECFLAGS -fno-strict-aliasing" |
| 7012 | fi |
| 7013 | |
Zachary Ware | 5af8564 | 2015-12-21 12:09:17 -0600 | [diff] [blame] | 7014 | # ICC doesn't recognize the option, but only emits a warning |
| 7015 | ## XXX does it emit an unused result warning and can it be disabled? |
| 7016 | case "$CC" in |
| 7017 | *icc*) |
| 7018 | ac_cv_disable_unused_result_warning=no |
| 7019 | ;; |
| 7020 | *) |
Benjamin Peterson | 7ddbf10 | 2011-09-23 13:23:22 -0400 | [diff] [blame] | 7021 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5 |
| 7022 | $as_echo_n "checking if we can turn off $CC unused result warning... " >&6; } |
| 7023 | ac_save_cc="$CC" |
| 7024 | CC="$CC -Wunused-result -Werror" |
| 7025 | save_CFLAGS="$CFLAGS" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 7026 | if ${ac_cv_disable_unused_result_warning+:} false; then : |
Benjamin Peterson | 7ddbf10 | 2011-09-23 13:23:22 -0400 | [diff] [blame] | 7027 | $as_echo_n "(cached) " >&6 |
| 7028 | else |
| 7029 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7030 | /* end confdefs.h. */ |
| 7031 | |
| 7032 | |
| 7033 | int |
| 7034 | main () |
| 7035 | { |
| 7036 | |
| 7037 | ; |
| 7038 | return 0; |
| 7039 | } |
| 7040 | |
| 7041 | _ACEOF |
| 7042 | if ac_fn_c_try_compile "$LINENO"; then : |
| 7043 | |
| 7044 | ac_cv_disable_unused_result_warning=yes |
| 7045 | |
| 7046 | else |
| 7047 | |
| 7048 | ac_cv_disable_unused_result_warning=no |
| 7049 | |
| 7050 | fi |
| 7051 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 7052 | fi |
| 7053 | |
| 7054 | CFLAGS="$save_CFLAGS" |
| 7055 | CC="$ac_save_cc" |
| 7056 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5 |
| 7057 | $as_echo "$ac_cv_disable_unused_result_warning" >&6; } |
Zachary Ware | 5af8564 | 2015-12-21 12:09:17 -0600 | [diff] [blame] | 7058 | ;; |
| 7059 | esac |
Benjamin Peterson | 7ddbf10 | 2011-09-23 13:23:22 -0400 | [diff] [blame] | 7060 | |
| 7061 | if test $ac_cv_disable_unused_result_warning = yes |
| 7062 | then |
| 7063 | BASECFLAGS="$BASECFLAGS -Wno-unused-result" |
Serhiy Storchaka | ea80ffb | 2016-09-11 21:56:32 +0300 | [diff] [blame] | 7064 | CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result" |
| 7065 | fi |
| 7066 | |
| 7067 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5 |
| 7068 | $as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; } |
| 7069 | ac_save_cc="$CC" |
| 7070 | CC="$CC -Wunused-parameter -Werror" |
| 7071 | if ${ac_cv_disable_unused_parameter_warning+:} false; then : |
| 7072 | $as_echo_n "(cached) " >&6 |
| 7073 | else |
| 7074 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7075 | /* end confdefs.h. */ |
| 7076 | |
| 7077 | |
| 7078 | int |
| 7079 | main () |
| 7080 | { |
| 7081 | |
| 7082 | ; |
| 7083 | return 0; |
| 7084 | } |
| 7085 | |
| 7086 | _ACEOF |
| 7087 | if ac_fn_c_try_compile "$LINENO"; then : |
| 7088 | |
| 7089 | ac_cv_disable_unused_parameter_warning=yes |
| 7090 | |
| 7091 | else |
| 7092 | |
| 7093 | ac_cv_disable_unused_parameter_warning=no |
| 7094 | |
| 7095 | fi |
| 7096 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 7097 | fi |
| 7098 | |
| 7099 | CC="$ac_save_cc" |
| 7100 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5 |
| 7101 | $as_echo "$ac_cv_disable_unused_parameter_warning" >&6; } |
| 7102 | |
| 7103 | if test $ac_cv_disable_unused_parameter_warning = yes |
| 7104 | then |
| 7105 | CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter" |
| 7106 | fi |
| 7107 | |
| 7108 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5 |
| 7109 | $as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; } |
| 7110 | ac_save_cc="$CC" |
| 7111 | CC="$CC -Wmissing-field-initializers -Werror" |
| 7112 | if ${ac_cv_disable_missing_field_initializers+:} false; then : |
| 7113 | $as_echo_n "(cached) " >&6 |
| 7114 | else |
| 7115 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7116 | /* end confdefs.h. */ |
| 7117 | |
| 7118 | |
| 7119 | int |
| 7120 | main () |
| 7121 | { |
| 7122 | |
| 7123 | ; |
| 7124 | return 0; |
| 7125 | } |
| 7126 | |
| 7127 | _ACEOF |
| 7128 | if ac_fn_c_try_compile "$LINENO"; then : |
| 7129 | |
| 7130 | ac_cv_disable_missing_field_initializers=yes |
| 7131 | |
| 7132 | else |
| 7133 | |
| 7134 | ac_cv_disable_missing_field_initializers=no |
| 7135 | |
| 7136 | fi |
| 7137 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 7138 | fi |
| 7139 | |
| 7140 | CC="$ac_save_cc" |
| 7141 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5 |
| 7142 | $as_echo "$ac_cv_disable_missing_field_initializers" >&6; } |
| 7143 | |
| 7144 | if test $ac_cv_disable_missing_field_initializers = yes |
| 7145 | then |
| 7146 | CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers" |
Benjamin Peterson | 7ddbf10 | 2011-09-23 13:23:22 -0400 | [diff] [blame] | 7147 | fi |
| 7148 | |
Charles-François Natali | 7f9cc93 | 2014-08-01 21:57:49 +0100 | [diff] [blame] | 7149 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5 |
| 7150 | $as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; } |
| 7151 | ac_save_cc="$CC" |
| 7152 | CC="$CC -Wsign-compare" |
| 7153 | save_CFLAGS="$CFLAGS" |
| 7154 | if ${ac_cv_enable_sign_compare_warning+:} false; then : |
| 7155 | $as_echo_n "(cached) " >&6 |
| 7156 | else |
| 7157 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7158 | /* end confdefs.h. */ |
| 7159 | |
| 7160 | |
| 7161 | int |
| 7162 | main () |
| 7163 | { |
| 7164 | |
| 7165 | ; |
| 7166 | return 0; |
| 7167 | } |
| 7168 | |
| 7169 | _ACEOF |
| 7170 | if ac_fn_c_try_compile "$LINENO"; then : |
| 7171 | |
| 7172 | ac_cv_enable_sign_compare_warning=yes |
| 7173 | |
| 7174 | else |
| 7175 | |
| 7176 | ac_cv_enable_sign_compare_warning=no |
| 7177 | |
| 7178 | fi |
| 7179 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 7180 | fi |
| 7181 | |
| 7182 | CFLAGS="$save_CFLAGS" |
| 7183 | CC="$ac_save_cc" |
| 7184 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5 |
| 7185 | $as_echo "$ac_cv_enable_sign_compare_warning" >&6; } |
| 7186 | |
| 7187 | if test $ac_cv_enable_sign_compare_warning = yes |
| 7188 | then |
| 7189 | BASECFLAGS="$BASECFLAGS -Wsign-compare" |
| 7190 | fi |
| 7191 | |
| 7192 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5 |
| 7193 | $as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; } |
| 7194 | ac_save_cc="$CC" |
| 7195 | CC="$CC -Wunreachable-code" |
| 7196 | save_CFLAGS="$CFLAGS" |
| 7197 | if ${ac_cv_enable_unreachable_code_warning+:} false; then : |
| 7198 | $as_echo_n "(cached) " >&6 |
| 7199 | else |
| 7200 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7201 | /* end confdefs.h. */ |
| 7202 | |
| 7203 | |
| 7204 | int |
| 7205 | main () |
| 7206 | { |
| 7207 | |
| 7208 | ; |
| 7209 | return 0; |
| 7210 | } |
| 7211 | |
| 7212 | _ACEOF |
| 7213 | if ac_fn_c_try_compile "$LINENO"; then : |
| 7214 | |
| 7215 | ac_cv_enable_unreachable_code_warning=yes |
| 7216 | |
| 7217 | else |
| 7218 | |
| 7219 | ac_cv_enable_unreachable_code_warning=no |
| 7220 | |
| 7221 | fi |
| 7222 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 7223 | fi |
| 7224 | |
| 7225 | CFLAGS="$save_CFLAGS" |
| 7226 | CC="$ac_save_cc" |
Charles-François Natali | 7f9cc93 | 2014-08-01 21:57:49 +0100 | [diff] [blame] | 7227 | |
| 7228 | # Don't enable unreachable code warning in debug mode, since it usually |
| 7229 | # results in non-standard code paths. |
Ned Deily | bec699e | 2016-03-08 00:28:37 -0500 | [diff] [blame] | 7230 | # Issue #24324: Unfortunately, the unreachable code warning does not work |
| 7231 | # correctly on gcc and has been silently removed from the compiler. |
| 7232 | # It is supported on clang but on OS X systems gcc may be an alias |
| 7233 | # for clang. Try to determine if the compiler is not really gcc and, |
| 7234 | # if so, only then enable the warning. |
| 7235 | if test $ac_cv_enable_unreachable_code_warning = yes && \ |
| 7236 | test "$Py_DEBUG" != "true" && \ |
| 7237 | 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] | 7238 | then |
| 7239 | BASECFLAGS="$BASECFLAGS -Wunreachable-code" |
Ned Deily | bec699e | 2016-03-08 00:28:37 -0500 | [diff] [blame] | 7240 | else |
| 7241 | ac_cv_enable_unreachable_code_warning=no |
Charles-François Natali | 7f9cc93 | 2014-08-01 21:57:49 +0100 | [diff] [blame] | 7242 | fi |
Ned Deily | bec699e | 2016-03-08 00:28:37 -0500 | [diff] [blame] | 7243 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5 |
| 7244 | $as_echo "$ac_cv_enable_unreachable_code_warning" >&6; } |
Charles-François Natali | 7f9cc93 | 2014-08-01 21:57:49 +0100 | [diff] [blame] | 7245 | |
Victor Stinner | 193ee0a | 2017-02-06 14:24:00 +0100 | [diff] [blame] | 7246 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5 |
| 7247 | $as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; } |
| 7248 | ac_save_cc="$CC" |
| 7249 | CC="$CC -Werror=implicit-function-declaration" |
| 7250 | if ${ac_cv_enable_implicit_function_declaration_error+:} false; then : |
| 7251 | $as_echo_n "(cached) " >&6 |
| 7252 | else |
| 7253 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7254 | /* end confdefs.h. */ |
| 7255 | |
| 7256 | |
| 7257 | int |
| 7258 | main () |
| 7259 | { |
| 7260 | |
| 7261 | ; |
| 7262 | return 0; |
| 7263 | } |
| 7264 | |
| 7265 | _ACEOF |
| 7266 | if ac_fn_c_try_compile "$LINENO"; then : |
| 7267 | |
| 7268 | ac_cv_enable_implicit_function_declaration_error=yes |
| 7269 | |
| 7270 | else |
| 7271 | |
| 7272 | ac_cv_enable_implicit_function_declaration_error=no |
| 7273 | |
| 7274 | fi |
| 7275 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 7276 | fi |
| 7277 | |
| 7278 | CC="$ac_save_cc" |
| 7279 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5 |
| 7280 | $as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; } |
| 7281 | |
| 7282 | if test $ac_cv_enable_implicit_function_declaration_error = yes |
| 7283 | then |
| 7284 | CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration" |
| 7285 | fi |
| 7286 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7287 | # if using gcc on alpha, use -mieee to get (near) full IEEE 754 |
| 7288 | # support. Without this, treatment of subnormals doesn't follow |
| 7289 | # the standard. |
Matthias Klose | df2aecb | 2012-03-15 22:19:28 +0100 | [diff] [blame] | 7290 | case $host in |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7291 | alpha*) |
| 7292 | BASECFLAGS="$BASECFLAGS -mieee" |
| 7293 | ;; |
| 7294 | esac |
| 7295 | |
| 7296 | case $ac_sys_system in |
| 7297 | SCO_SV*) |
| 7298 | BASECFLAGS="$BASECFLAGS -m486 -DSCO5" |
| 7299 | ;; |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7300 | |
| 7301 | # is there any other compiler on Darwin besides gcc? |
| 7302 | Darwin*) |
| 7303 | # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd |
| 7304 | # used to be here, but non-Apple gcc doesn't accept them. |
| 7305 | if test "${CC}" = gcc |
| 7306 | then |
| 7307 | { $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] | 7308 | $as_echo_n "checking which compiler should be used... " >&6; } |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7309 | case "${UNIVERSALSDK}" in |
| 7310 | */MacOSX10.4u.sdk) |
| 7311 | # Build using 10.4 SDK, force usage of gcc when the |
| 7312 | # compiler is gcc, otherwise the user will get very |
| 7313 | # confusing error messages when building on OSX 10.6 |
| 7314 | CC=gcc-4.0 |
| 7315 | CPP=cpp-4.0 |
| 7316 | ;; |
| 7317 | esac |
| 7318 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7319 | $as_echo "$CC" >&6; } |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7320 | fi |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7321 | |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7322 | if test "${enable_universalsdk}" |
| 7323 | then |
| 7324 | case "$UNIVERSAL_ARCHS" in |
| 7325 | 32-bit) |
| 7326 | UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386" |
| 7327 | LIPO_32BIT_FLAGS="" |
| 7328 | ARCH_RUN_32BIT="" |
| 7329 | ;; |
| 7330 | 64-bit) |
| 7331 | UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64" |
| 7332 | LIPO_32BIT_FLAGS="" |
| 7333 | ARCH_RUN_32BIT="true" |
| 7334 | ;; |
| 7335 | all) |
| 7336 | UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64" |
| 7337 | LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386" |
| 7338 | ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc" |
| 7339 | ;; |
| 7340 | intel) |
| 7341 | UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64" |
| 7342 | LIPO_32BIT_FLAGS="-extract i386" |
| 7343 | ARCH_RUN_32BIT="/usr/bin/arch -i386" |
| 7344 | ;; |
| 7345 | intel-32) |
| 7346 | UNIVERSAL_ARCH_FLAGS="-arch i386" |
| 7347 | LIPO_32BIT_FLAGS="" |
| 7348 | ARCH_RUN_32BIT="" |
| 7349 | ;; |
| 7350 | 3-way) |
| 7351 | UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64" |
| 7352 | LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386" |
| 7353 | ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc" |
| 7354 | ;; |
| 7355 | *) |
| 7356 | as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5 |
| 7357 | ;; |
| 7358 | esac |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7359 | |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7360 | CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}" |
| 7361 | LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}" |
| 7362 | if test "${UNIVERSALSDK}" != "/" |
| 7363 | then |
| 7364 | CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}" |
| 7365 | fi |
| 7366 | fi |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7367 | |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7368 | # Calculate an appropriate deployment target for this build: |
| 7369 | # The deployment target value is used explicitly to enable certain |
| 7370 | # features are enabled (such as builtin libedit support for readline) |
Raymond Hettinger | 15f44ab | 2016-08-30 10:47:49 -0700 | [diff] [blame] | 7371 | # 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] | 7372 | # component of the string returned by distutils.get_platform(). |
| 7373 | # |
| 7374 | # Use the value from: |
| 7375 | # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified |
| 7376 | # 2. the operating system version of the build machine if >= 10.6 |
| 7377 | # 3. If running on OS X 10.3 through 10.5, use the legacy tests |
| 7378 | # below to pick either 10.3, 10.4, or 10.5 as the target. |
| 7379 | # 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] | 7380 | |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7381 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5 |
| 7382 | $as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; } |
Ned Deily | 36820b6 | 2014-06-25 13:44:22 -0700 | [diff] [blame] | 7383 | cur_target_major=`sw_vers -productVersion | \ |
| 7384 | sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'` |
| 7385 | cur_target_minor=`sw_vers -productVersion | \ |
| 7386 | sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'` |
| 7387 | cur_target="${cur_target_major}.${cur_target_minor}" |
| 7388 | if test ${cur_target_major} -eq 10 && \ |
| 7389 | test ${cur_target_minor} -ge 3 && \ |
| 7390 | test ${cur_target_minor} -le 5 |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7391 | then |
Ned Deily | 36820b6 | 2014-06-25 13:44:22 -0700 | [diff] [blame] | 7392 | # OS X 10.3 through 10.5 |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7393 | cur_target=10.3 |
| 7394 | if test ${enable_universalsdk} |
| 7395 | then |
| 7396 | case "$UNIVERSAL_ARCHS" in |
| 7397 | all|3-way|intel|64-bit) |
| 7398 | # These configurations were first supported in 10.5 |
| 7399 | cur_target='10.5' |
| 7400 | ;; |
| 7401 | esac |
| 7402 | else |
| 7403 | if test `/usr/bin/arch` = "i386" |
| 7404 | then |
| 7405 | # 10.4 was the first release to support Intel archs |
| 7406 | cur_target="10.4" |
| 7407 | fi |
| 7408 | fi |
| 7409 | fi |
| 7410 | CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}} |
Ronald Oussoren | 3c064c1 | 2009-09-08 07:12:42 +0000 | [diff] [blame] | 7411 | |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7412 | # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the |
| 7413 | # environment with a value that is the same as what we'll use |
| 7414 | # in the Makefile to ensure that we'll get the same compiler |
| 7415 | # environment during configure and build time. |
| 7416 | MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET" |
| 7417 | export MACOSX_DEPLOYMENT_TARGET |
| 7418 | EXPORT_MACOSX_DEPLOYMENT_TARGET='' |
| 7419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5 |
| 7420 | $as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; } |
Ronald Oussoren | 3c064c1 | 2009-09-08 07:12:42 +0000 | [diff] [blame] | 7421 | |
Ned Deily | 87adb6e | 2013-10-18 21:09:56 -0700 | [diff] [blame] | 7422 | # end of Darwin* tests |
| 7423 | ;; |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7424 | esac |
| 7425 | ;; |
| 7426 | |
| 7427 | *) |
| 7428 | case $ac_sys_system in |
| 7429 | OpenUNIX*|UnixWare*) |
| 7430 | BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca " |
| 7431 | ;; |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7432 | SCO_SV*) |
| 7433 | BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5" |
| 7434 | ;; |
| 7435 | esac |
| 7436 | ;; |
| 7437 | esac |
| 7438 | |
Zachary Ware | 5af8564 | 2015-12-21 12:09:17 -0600 | [diff] [blame] | 7439 | # ICC needs -fp-model strict or floats behave badly |
| 7440 | case "$CC" in |
| 7441 | *icc*) |
| 7442 | CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict" |
| 7443 | ;; |
| 7444 | esac |
| 7445 | |
T. Wouters | ddbfa2c | 2017-05-23 01:30:49 +0200 | [diff] [blame] | 7446 | if test "$assertions" = 'true'; then |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7447 | : |
| 7448 | else |
| 7449 | OPT="-DNDEBUG $OPT" |
| 7450 | fi |
| 7451 | |
| 7452 | if test "$ac_arch_flags" |
| 7453 | then |
| 7454 | BASECFLAGS="$BASECFLAGS $ac_arch_flags" |
| 7455 | fi |
| 7456 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7457 | # On some compilers, pthreads are available without further options |
| 7458 | # (e.g. MacOS X). On some of these systems, the compiler will not |
| 7459 | # complain if unaccepted options are passed (e.g. gcc on Mac OS X). |
| 7460 | # So we have to see first whether pthreads are available without |
| 7461 | # options before we can check whether -Kpthread improves anything. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7462 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5 |
| 7463 | $as_echo_n "checking whether pthreads are available without options... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 7464 | if ${ac_cv_pthread_is_default+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7465 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7466 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7467 | if test "$cross_compiling" = yes; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7468 | ac_cv_pthread_is_default=no |
| 7469 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7470 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7471 | /* end confdefs.h. */ |
| 7472 | |
Stefan Krah | 7dba594 | 2012-11-22 22:49:11 +0100 | [diff] [blame] | 7473 | #include <stdio.h> |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7474 | #include <pthread.h> |
| 7475 | |
| 7476 | void* routine(void* p){return NULL;} |
| 7477 | |
| 7478 | int main(){ |
| 7479 | pthread_t p; |
| 7480 | if(pthread_create(&p,NULL,routine,NULL)!=0) |
| 7481 | return 1; |
| 7482 | (void)pthread_detach(p); |
| 7483 | return 0; |
| 7484 | } |
| 7485 | |
| 7486 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7487 | if ac_fn_c_try_run "$LINENO"; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7488 | |
| 7489 | ac_cv_pthread_is_default=yes |
| 7490 | ac_cv_kthread=no |
| 7491 | ac_cv_pthread=no |
| 7492 | |
| 7493 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7494 | ac_cv_pthread_is_default=no |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7495 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7496 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 7497 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7498 | fi |
| 7499 | |
| 7500 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7501 | fi |
| 7502 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7503 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5 |
| 7504 | $as_echo "$ac_cv_pthread_is_default" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7505 | |
| 7506 | |
| 7507 | if test $ac_cv_pthread_is_default = yes |
| 7508 | then |
| 7509 | ac_cv_kpthread=no |
| 7510 | else |
| 7511 | # -Kpthread, if available, provides the right #defines |
| 7512 | # and linker options to make pthread_create available |
| 7513 | # Some compilers won't report that they do not support -Kpthread, |
| 7514 | # so we need to run a program to see whether it really made the |
| 7515 | # function available. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7516 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5 |
| 7517 | $as_echo_n "checking whether $CC accepts -Kpthread... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 7518 | if ${ac_cv_kpthread+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7519 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7520 | else |
| 7521 | ac_save_cc="$CC" |
| 7522 | CC="$CC -Kpthread" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7523 | if test "$cross_compiling" = yes; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7524 | ac_cv_kpthread=no |
| 7525 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7526 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7527 | /* end confdefs.h. */ |
| 7528 | |
Stefan Krah | 7dba594 | 2012-11-22 22:49:11 +0100 | [diff] [blame] | 7529 | #include <stdio.h> |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7530 | #include <pthread.h> |
| 7531 | |
| 7532 | void* routine(void* p){return NULL;} |
| 7533 | |
| 7534 | int main(){ |
| 7535 | pthread_t p; |
| 7536 | if(pthread_create(&p,NULL,routine,NULL)!=0) |
| 7537 | return 1; |
| 7538 | (void)pthread_detach(p); |
| 7539 | return 0; |
| 7540 | } |
| 7541 | |
| 7542 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7543 | if ac_fn_c_try_run "$LINENO"; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7544 | ac_cv_kpthread=yes |
| 7545 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7546 | ac_cv_kpthread=no |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7547 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7548 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 7549 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7550 | fi |
| 7551 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7552 | CC="$ac_save_cc" |
| 7553 | fi |
| 7554 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7555 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5 |
| 7556 | $as_echo "$ac_cv_kpthread" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7557 | fi |
| 7558 | |
| 7559 | if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no |
| 7560 | then |
| 7561 | # -Kthread, if available, provides the right #defines |
| 7562 | # and linker options to make pthread_create available |
| 7563 | # Some compilers won't report that they do not support -Kthread, |
| 7564 | # so we need to run a program to see whether it really made the |
| 7565 | # function available. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7566 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5 |
| 7567 | $as_echo_n "checking whether $CC accepts -Kthread... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 7568 | if ${ac_cv_kthread+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7569 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7570 | else |
| 7571 | ac_save_cc="$CC" |
| 7572 | CC="$CC -Kthread" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7573 | if test "$cross_compiling" = yes; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7574 | ac_cv_kthread=no |
| 7575 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7576 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7577 | /* end confdefs.h. */ |
| 7578 | |
Stefan Krah | 7dba594 | 2012-11-22 22:49:11 +0100 | [diff] [blame] | 7579 | #include <stdio.h> |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7580 | #include <pthread.h> |
| 7581 | |
| 7582 | void* routine(void* p){return NULL;} |
| 7583 | |
| 7584 | int main(){ |
| 7585 | pthread_t p; |
| 7586 | if(pthread_create(&p,NULL,routine,NULL)!=0) |
| 7587 | return 1; |
| 7588 | (void)pthread_detach(p); |
| 7589 | return 0; |
| 7590 | } |
| 7591 | |
| 7592 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7593 | if ac_fn_c_try_run "$LINENO"; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7594 | ac_cv_kthread=yes |
| 7595 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7596 | ac_cv_kthread=no |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7597 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7598 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 7599 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7600 | fi |
| 7601 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7602 | CC="$ac_save_cc" |
| 7603 | fi |
| 7604 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7605 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5 |
| 7606 | $as_echo "$ac_cv_kthread" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7607 | fi |
| 7608 | |
| 7609 | if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no |
| 7610 | then |
| 7611 | # -pthread, if available, provides the right #defines |
| 7612 | # and linker options to make pthread_create available |
| 7613 | # Some compilers won't report that they do not support -pthread, |
| 7614 | # so we need to run a program to see whether it really made the |
| 7615 | # function available. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7616 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5 |
| 7617 | $as_echo_n "checking whether $CC accepts -pthread... " >&6; } |
doko@python.org | 7981f20 | 2013-01-25 15:33:25 +0100 | [diff] [blame] | 7618 | if ${ac_cv_pthread+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7619 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7620 | else |
| 7621 | ac_save_cc="$CC" |
| 7622 | CC="$CC -pthread" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7623 | if test "$cross_compiling" = yes; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7624 | ac_cv_pthread=no |
| 7625 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7626 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7627 | /* end confdefs.h. */ |
| 7628 | |
Stefan Krah | 7dba594 | 2012-11-22 22:49:11 +0100 | [diff] [blame] | 7629 | #include <stdio.h> |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7630 | #include <pthread.h> |
| 7631 | |
| 7632 | void* routine(void* p){return NULL;} |
| 7633 | |
| 7634 | int main(){ |
| 7635 | pthread_t p; |
| 7636 | if(pthread_create(&p,NULL,routine,NULL)!=0) |
| 7637 | return 1; |
| 7638 | (void)pthread_detach(p); |
| 7639 | return 0; |
| 7640 | } |
| 7641 | |
| 7642 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7643 | if ac_fn_c_try_run "$LINENO"; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7644 | ac_cv_pthread=yes |
| 7645 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7646 | ac_cv_pthread=no |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7647 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7648 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 7649 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7650 | fi |
| 7651 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7652 | CC="$ac_save_cc" |
| 7653 | fi |
| 7654 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7655 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5 |
| 7656 | $as_echo "$ac_cv_pthread" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7657 | fi |
| 7658 | |
| 7659 | # If we have set a CC compiler flag for thread support then |
| 7660 | # check if it works for CXX, too. |
| 7661 | ac_cv_cxx_thread=no |
| 7662 | if test ! -z "$CXX" |
| 7663 | then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7664 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5 |
| 7665 | $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] | 7666 | ac_save_cxx="$CXX" |
| 7667 | |
| 7668 | if test "$ac_cv_kpthread" = "yes" |
| 7669 | then |
| 7670 | CXX="$CXX -Kpthread" |
| 7671 | ac_cv_cxx_thread=yes |
| 7672 | elif test "$ac_cv_kthread" = "yes" |
| 7673 | then |
| 7674 | CXX="$CXX -Kthread" |
| 7675 | ac_cv_cxx_thread=yes |
| 7676 | elif test "$ac_cv_pthread" = "yes" |
| 7677 | then |
| 7678 | CXX="$CXX -pthread" |
| 7679 | ac_cv_cxx_thread=yes |
| 7680 | fi |
| 7681 | |
| 7682 | if test $ac_cv_cxx_thread = yes |
| 7683 | then |
| 7684 | echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext |
| 7685 | $CXX -c conftest.$ac_ext 2>&5 |
| 7686 | if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \ |
| 7687 | && test -s conftest$ac_exeext && ./conftest$ac_exeext |
| 7688 | then |
| 7689 | ac_cv_cxx_thread=yes |
| 7690 | else |
| 7691 | ac_cv_cxx_thread=no |
| 7692 | fi |
| 7693 | rm -fr conftest* |
| 7694 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7695 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5 |
| 7696 | $as_echo "$ac_cv_cxx_thread" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7697 | fi |
| 7698 | CXX="$ac_save_cxx" |
| 7699 | |
| 7700 | |
| 7701 | # checks for header files |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7702 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
| 7703 | $as_echo_n "checking for ANSI C header files... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 7704 | if ${ac_cv_header_stdc+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7705 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7706 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7707 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7708 | /* end confdefs.h. */ |
| 7709 | #include <stdlib.h> |
| 7710 | #include <stdarg.h> |
| 7711 | #include <string.h> |
| 7712 | #include <float.h> |
| 7713 | |
| 7714 | int |
| 7715 | main () |
| 7716 | { |
| 7717 | |
| 7718 | ; |
| 7719 | return 0; |
| 7720 | } |
| 7721 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7722 | if ac_fn_c_try_compile "$LINENO"; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7723 | ac_cv_header_stdc=yes |
| 7724 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7725 | ac_cv_header_stdc=no |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7726 | fi |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7727 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 7728 | |
| 7729 | if test $ac_cv_header_stdc = yes; then |
| 7730 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7731 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7732 | /* end confdefs.h. */ |
| 7733 | #include <string.h> |
| 7734 | |
| 7735 | _ACEOF |
| 7736 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7737 | $EGREP "memchr" >/dev/null 2>&1; then : |
| 7738 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7739 | else |
| 7740 | ac_cv_header_stdc=no |
| 7741 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 7742 | rm -f conftest* |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7743 | |
| 7744 | fi |
| 7745 | |
| 7746 | if test $ac_cv_header_stdc = yes; then |
| 7747 | # 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] | 7748 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7749 | /* end confdefs.h. */ |
| 7750 | #include <stdlib.h> |
| 7751 | |
| 7752 | _ACEOF |
| 7753 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7754 | $EGREP "free" >/dev/null 2>&1; then : |
| 7755 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7756 | else |
| 7757 | ac_cv_header_stdc=no |
| 7758 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 7759 | rm -f conftest* |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7760 | |
| 7761 | fi |
| 7762 | |
| 7763 | if test $ac_cv_header_stdc = yes; then |
| 7764 | # /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] | 7765 | if test "$cross_compiling" = yes; then : |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7766 | : |
| 7767 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7768 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7769 | /* end confdefs.h. */ |
| 7770 | #include <ctype.h> |
| 7771 | #include <stdlib.h> |
| 7772 | #if ((' ' & 0x0FF) == 0x020) |
| 7773 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 7774 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
| 7775 | #else |
| 7776 | # define ISLOWER(c) \ |
| 7777 | (('a' <= (c) && (c) <= 'i') \ |
| 7778 | || ('j' <= (c) && (c) <= 'r') \ |
| 7779 | || ('s' <= (c) && (c) <= 'z')) |
| 7780 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
| 7781 | #endif |
| 7782 | |
| 7783 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
| 7784 | int |
| 7785 | main () |
| 7786 | { |
| 7787 | int i; |
| 7788 | for (i = 0; i < 256; i++) |
| 7789 | if (XOR (islower (i), ISLOWER (i)) |
| 7790 | || toupper (i) != TOUPPER (i)) |
| 7791 | return 2; |
| 7792 | return 0; |
| 7793 | } |
| 7794 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7795 | if ac_fn_c_try_run "$LINENO"; then : |
| 7796 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7797 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7798 | ac_cv_header_stdc=no |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7799 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7800 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 7801 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7802 | fi |
| 7803 | |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7804 | fi |
| 7805 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7806 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
| 7807 | $as_echo "$ac_cv_header_stdc" >&6; } |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7808 | if test $ac_cv_header_stdc = yes; then |
| 7809 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7810 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 7811 | |
| 7812 | fi |
| 7813 | |
doko@ubuntu.com | 1a4f561 | 2014-04-17 20:13:44 +0200 | [diff] [blame] | 7814 | for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \ |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 7815 | fcntl.h grp.h \ |
doko@ubuntu.com | 1a4f561 | 2014-04-17 20:13:44 +0200 | [diff] [blame] | 7816 | ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \ |
Benjamin Peterson | 4fe5510 | 2016-09-06 11:58:01 -0700 | [diff] [blame] | 7817 | sched.h shadow.h signal.h stropts.h termios.h \ |
Martin v. Löwis | 14e73b1 | 2003-01-01 09:51:12 +0000 | [diff] [blame] | 7818 | unistd.h utime.h \ |
Jesus Cea | d8b9ae6 | 2011-11-14 19:07:41 +0100 | [diff] [blame] | 7819 | poll.h sys/devpoll.h sys/epoll.h sys/poll.h \ |
Antoine Pitrou | bcf2b59 | 2012-02-08 23:28:36 +0100 | [diff] [blame] | 7820 | 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] | 7821 | 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] | 7822 | 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] | 7823 | 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] | 7824 | 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] | 7825 | libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ |
Benjamin Peterson | 93b2dee | 2016-09-09 10:22:45 -0700 | [diff] [blame] | 7826 | linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \ |
Christian Heimes | 985ecdc | 2013-11-20 11:46:18 +0100 | [diff] [blame] | 7827 | sys/endian.h |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7828 | do : |
| 7829 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| 7830 | 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] | 7831 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7832 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7833 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7834 | _ACEOF |
| 7835 | |
| 7836 | fi |
| 7837 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7838 | done |
| 7839 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7840 | ac_header_dirent=no |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7841 | 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] | 7842 | as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` |
| 7843 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 |
| 7844 | $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 7845 | if eval \${$as_ac_Header+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7846 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7847 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7848 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 7849 | /* end confdefs.h. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7850 | #include <sys/types.h> |
| 7851 | #include <$ac_hdr> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7852 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7853 | int |
| 7854 | main () |
| 7855 | { |
| 7856 | if ((DIR *) 0) |
| 7857 | return 0; |
| 7858 | ; |
| 7859 | return 0; |
| 7860 | } |
| 7861 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7862 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7863 | eval "$as_ac_Header=yes" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7864 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7865 | eval "$as_ac_Header=no" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7866 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 7867 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7868 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7869 | eval ac_res=\$$as_ac_Header |
| 7870 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 7871 | $as_echo "$ac_res" >&6; } |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 7872 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7873 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7874 | #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7875 | _ACEOF |
| 7876 | |
| 7877 | ac_header_dirent=$ac_hdr; break |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7878 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7879 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7880 | done |
| 7881 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. |
| 7882 | if test $ac_header_dirent = dirent.h; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7883 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 |
| 7884 | $as_echo_n "checking for library containing opendir... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 7885 | if ${ac_cv_search_opendir+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7886 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7887 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7888 | ac_func_search_save_LIBS=$LIBS |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7889 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 7890 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7891 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 7892 | /* Override any GCC internal prototype to avoid an error. |
| 7893 | Use char because int might match the return type of a GCC |
| 7894 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7895 | #ifdef __cplusplus |
| 7896 | extern "C" |
| 7897 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7898 | char opendir (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7899 | int |
| 7900 | main () |
| 7901 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 7902 | return opendir (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7903 | ; |
| 7904 | return 0; |
| 7905 | } |
| 7906 | _ACEOF |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 7907 | for ac_lib in '' dir; do |
| 7908 | if test -z "$ac_lib"; then |
| 7909 | ac_res="none required" |
| 7910 | else |
| 7911 | ac_res=-l$ac_lib |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 7912 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 7913 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7914 | if ac_fn_c_try_link "$LINENO"; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 7915 | ac_cv_search_opendir=$ac_res |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 7916 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7917 | rm -f core conftest.err conftest.$ac_objext \ |
| 7918 | conftest$ac_exeext |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 7919 | if ${ac_cv_search_opendir+:} false; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 7920 | break |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 7921 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 7922 | done |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 7923 | if ${ac_cv_search_opendir+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7924 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 7925 | else |
| 7926 | ac_cv_search_opendir=no |
| 7927 | fi |
| 7928 | rm conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7929 | LIBS=$ac_func_search_save_LIBS |
| 7930 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7931 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 |
| 7932 | $as_echo "$ac_cv_search_opendir" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 7933 | ac_res=$ac_cv_search_opendir |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7934 | if test "$ac_res" != no; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 7935 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7936 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7937 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7938 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 7939 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7940 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 |
| 7941 | $as_echo_n "checking for library containing opendir... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 7942 | if ${ac_cv_search_opendir+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7943 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7944 | else |
| 7945 | ac_func_search_save_LIBS=$LIBS |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7946 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 7947 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7948 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 7949 | /* Override any GCC internal prototype to avoid an error. |
| 7950 | Use char because int might match the return type of a GCC |
| 7951 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7952 | #ifdef __cplusplus |
| 7953 | extern "C" |
| 7954 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7955 | char opendir (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7956 | int |
| 7957 | main () |
| 7958 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 7959 | return opendir (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7960 | ; |
| 7961 | return 0; |
| 7962 | } |
| 7963 | _ACEOF |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 7964 | for ac_lib in '' x; do |
| 7965 | if test -z "$ac_lib"; then |
| 7966 | ac_res="none required" |
| 7967 | else |
| 7968 | ac_res=-l$ac_lib |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 7969 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 7970 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7971 | if ac_fn_c_try_link "$LINENO"; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 7972 | ac_cv_search_opendir=$ac_res |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 7973 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7974 | rm -f core conftest.err conftest.$ac_objext \ |
| 7975 | conftest$ac_exeext |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 7976 | if ${ac_cv_search_opendir+:} false; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 7977 | break |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 7978 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 7979 | done |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 7980 | if ${ac_cv_search_opendir+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7981 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 7982 | else |
| 7983 | ac_cv_search_opendir=no |
| 7984 | fi |
| 7985 | rm conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7986 | LIBS=$ac_func_search_save_LIBS |
| 7987 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7988 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 |
| 7989 | $as_echo "$ac_cv_search_opendir" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 7990 | ac_res=$ac_cv_search_opendir |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7991 | if test "$ac_res" != no; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 7992 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 7993 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 7994 | fi |
| 7995 | |
| 7996 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 7997 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 7998 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5 |
| 7999 | $as_echo_n "checking whether sys/types.h defines makedev... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8000 | if ${ac_cv_header_sys_types_h_makedev+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8001 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 8002 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8003 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8004 | /* end confdefs.h. */ |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 8005 | #include <sys/types.h> |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 8006 | int |
| 8007 | main () |
| 8008 | { |
| 8009 | return makedev(0, 0); |
| 8010 | ; |
| 8011 | return 0; |
| 8012 | } |
| 8013 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8014 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 8015 | ac_cv_header_sys_types_h_makedev=yes |
| 8016 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8017 | ac_cv_header_sys_types_h_makedev=no |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 8018 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8019 | rm -f core conftest.err conftest.$ac_objext \ |
| 8020 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 8021 | |
| 8022 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8023 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5 |
| 8024 | $as_echo "$ac_cv_header_sys_types_h_makedev" >&6; } |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 8025 | |
| 8026 | if test $ac_cv_header_sys_types_h_makedev = no; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8027 | 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] | 8028 | if test "x$ac_cv_header_sys_mkdev_h" = xyes; then : |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8029 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8030 | $as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 8031 | |
| 8032 | fi |
| 8033 | |
| 8034 | |
| 8035 | |
| 8036 | if test $ac_cv_header_sys_mkdev_h = no; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8037 | 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] | 8038 | if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then : |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8039 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8040 | $as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 8041 | |
| 8042 | fi |
| 8043 | |
| 8044 | |
| 8045 | fi |
| 8046 | fi |
| 8047 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8048 | |
Benjamin Peterson | 93b2dee | 2016-09-09 10:22:45 -0700 | [diff] [blame] | 8049 | # bluetooth/bluetooth.h has been known to not compile with -std=c99. |
| 8050 | # http://permalink.gmane.org/gmane.linux.bluez.kernel/22294 |
| 8051 | SAVE_CFLAGS=$CFLAGS |
| 8052 | CFLAGS="-std=c99 $CFLAGS" |
| 8053 | for ac_header in bluetooth/bluetooth.h |
| 8054 | do : |
| 8055 | ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default" |
| 8056 | if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then : |
| 8057 | cat >>confdefs.h <<_ACEOF |
| 8058 | #define HAVE_BLUETOOTH_BLUETOOTH_H 1 |
| 8059 | _ACEOF |
| 8060 | |
| 8061 | fi |
| 8062 | |
| 8063 | done |
| 8064 | |
| 8065 | CFLAGS=$SAVE_CFLAGS |
| 8066 | |
Gregory P. Smith | 3b1f2c3 | 2011-05-15 12:18:23 -0700 | [diff] [blame] | 8067 | # On Darwin (OS X) net/if.h requires sys/socket.h to be imported first. |
| 8068 | for ac_header in net/if.h |
| 8069 | do : |
| 8070 | ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h> |
| 8071 | #ifdef STDC_HEADERS |
| 8072 | # include <stdlib.h> |
| 8073 | # include <stddef.h> |
| 8074 | #else |
| 8075 | # ifdef HAVE_STDLIB_H |
| 8076 | # include <stdlib.h> |
| 8077 | # endif |
| 8078 | #endif |
| 8079 | #ifdef HAVE_SYS_SOCKET_H |
| 8080 | # include <sys/socket.h> |
| 8081 | #endif |
| 8082 | |
| 8083 | " |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8084 | if test "x$ac_cv_header_net_if_h" = xyes; then : |
Gregory P. Smith | 3b1f2c3 | 2011-05-15 12:18:23 -0700 | [diff] [blame] | 8085 | cat >>confdefs.h <<_ACEOF |
| 8086 | #define HAVE_NET_IF_H 1 |
| 8087 | _ACEOF |
| 8088 | |
| 8089 | fi |
| 8090 | |
| 8091 | done |
| 8092 | |
| 8093 | |
Martin v. Löwis | 11017b1 | 2006-01-14 18:12:57 +0000 | [diff] [blame] | 8094 | # On Linux, netlink.h requires asm/types.h |
Martin v. Löwis | 11017b1 | 2006-01-14 18:12:57 +0000 | [diff] [blame] | 8095 | for ac_header in linux/netlink.h |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8096 | do : |
| 8097 | 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] | 8098 | #ifdef HAVE_ASM_TYPES_H |
| 8099 | #include <asm/types.h> |
| 8100 | #endif |
| 8101 | #ifdef HAVE_SYS_SOCKET_H |
| 8102 | #include <sys/socket.h> |
| 8103 | #endif |
| 8104 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8105 | " |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8106 | 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] | 8107 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8108 | #define HAVE_LINUX_NETLINK_H 1 |
Martin v. Löwis | 11017b1 | 2006-01-14 18:12:57 +0000 | [diff] [blame] | 8109 | _ACEOF |
| 8110 | |
| 8111 | fi |
| 8112 | |
| 8113 | done |
| 8114 | |
| 8115 | |
Charles-François Natali | 47413c1 | 2011-10-06 19:47:44 +0200 | [diff] [blame] | 8116 | # 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] | 8117 | 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] | 8118 | do : |
| 8119 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| 8120 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " |
| 8121 | #ifdef HAVE_SYS_SOCKET_H |
| 8122 | #include <sys/socket.h> |
| 8123 | #endif |
| 8124 | |
| 8125 | " |
| 8126 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
| 8127 | cat >>confdefs.h <<_ACEOF |
| 8128 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
| 8129 | _ACEOF |
| 8130 | |
| 8131 | fi |
| 8132 | |
| 8133 | done |
| 8134 | |
| 8135 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8136 | # checks for typedefs |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 8137 | was_it_defined=no |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8138 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5 |
| 8139 | $as_echo_n "checking for clock_t in time.h... " >&6; } |
| 8140 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8141 | /* end confdefs.h. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8142 | #include <time.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8143 | |
| 8144 | _ACEOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8145 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8146 | $EGREP "clock_t" >/dev/null 2>&1; then : |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 8147 | was_it_defined=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8148 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8149 | |
| 8150 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8151 | $as_echo "#define clock_t long" >>confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8152 | |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 8153 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8154 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 8155 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8156 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8157 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5 |
| 8158 | $as_echo "$was_it_defined" >&6; } |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 8159 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8160 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5 |
| 8161 | $as_echo_n "checking for makedev... " >&6; } |
| 8162 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8163 | /* end confdefs.h. */ |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 8164 | |
Jesus Cea | 740f53a | 2010-04-28 11:35:30 +0000 | [diff] [blame] | 8165 | #if defined(MAJOR_IN_MKDEV) |
| 8166 | #include <sys/mkdev.h> |
| 8167 | #elif defined(MAJOR_IN_SYSMACROS) |
| 8168 | #include <sys/sysmacros.h> |
| 8169 | #else |
| 8170 | #include <sys/types.h> |
| 8171 | #endif |
| 8172 | |
Neal Norwitz | 1169011 | 2002-07-30 01:08:28 +0000 | [diff] [blame] | 8173 | int |
| 8174 | main () |
| 8175 | { |
Jesus Cea | 740f53a | 2010-04-28 11:35:30 +0000 | [diff] [blame] | 8176 | |
| 8177 | makedev(0, 0) |
Neal Norwitz | 1169011 | 2002-07-30 01:08:28 +0000 | [diff] [blame] | 8178 | ; |
| 8179 | return 0; |
| 8180 | } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 8181 | |
Neal Norwitz | 1169011 | 2002-07-30 01:08:28 +0000 | [diff] [blame] | 8182 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8183 | if ac_fn_c_try_link "$LINENO"; then : |
Neal Norwitz | 1169011 | 2002-07-30 01:08:28 +0000 | [diff] [blame] | 8184 | ac_cv_has_makedev=yes |
| 8185 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8186 | ac_cv_has_makedev=no |
Neal Norwitz | 1169011 | 2002-07-30 01:08:28 +0000 | [diff] [blame] | 8187 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8188 | rm -f core conftest.err conftest.$ac_objext \ |
| 8189 | conftest$ac_exeext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8190 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5 |
| 8191 | $as_echo "$ac_cv_has_makedev" >&6; } |
Neal Norwitz | 1169011 | 2002-07-30 01:08:28 +0000 | [diff] [blame] | 8192 | if test "$ac_cv_has_makedev" = "yes"; then |
| 8193 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8194 | $as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h |
Neal Norwitz | 1169011 | 2002-07-30 01:08:28 +0000 | [diff] [blame] | 8195 | |
| 8196 | fi |
| 8197 | |
Christian Heimes | 985ecdc | 2013-11-20 11:46:18 +0100 | [diff] [blame] | 8198 | # byte swapping |
| 8199 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5 |
| 8200 | $as_echo_n "checking for le64toh... " >&6; } |
| 8201 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 8202 | /* end confdefs.h. */ |
| 8203 | |
| 8204 | #ifdef HAVE_ENDIAN_H |
| 8205 | #include <endian.h> |
| 8206 | #elif defined(HAVE_SYS_ENDIAN_H) |
| 8207 | #include <sys/endian.h> |
| 8208 | #endif |
| 8209 | |
| 8210 | int |
| 8211 | main () |
| 8212 | { |
| 8213 | |
| 8214 | le64toh(1) |
| 8215 | ; |
| 8216 | return 0; |
| 8217 | } |
| 8218 | |
| 8219 | _ACEOF |
| 8220 | if ac_fn_c_try_link "$LINENO"; then : |
| 8221 | ac_cv_has_le64toh=yes |
| 8222 | else |
| 8223 | ac_cv_has_le64toh=no |
| 8224 | fi |
| 8225 | rm -f core conftest.err conftest.$ac_objext \ |
| 8226 | conftest$ac_exeext conftest.$ac_ext |
| 8227 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5 |
| 8228 | $as_echo "$ac_cv_has_le64toh" >&6; } |
| 8229 | if test "$ac_cv_has_le64toh" = "yes"; then |
| 8230 | |
| 8231 | $as_echo "#define HAVE_HTOLE64 1" >>confdefs.h |
| 8232 | |
| 8233 | fi |
| 8234 | |
Martin v. Löwis | 399a689 | 2002-10-04 10:22:02 +0000 | [diff] [blame] | 8235 | # Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in |
| 8236 | # the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are |
| 8237 | # defined, but the compiler does not support pragma redefine_extname, |
| 8238 | # and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit |
| 8239 | # structures (such as rlimit64) without declaring them. As a |
| 8240 | # work-around, disable LFS on such configurations |
| 8241 | |
| 8242 | use_lfs=yes |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8243 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5 |
| 8244 | $as_echo_n "checking Solaris LFS bug... " >&6; } |
| 8245 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8246 | /* end confdefs.h. */ |
Martin v. Löwis | 399a689 | 2002-10-04 10:22:02 +0000 | [diff] [blame] | 8247 | |
| 8248 | #define _LARGEFILE_SOURCE 1 |
| 8249 | #define _FILE_OFFSET_BITS 64 |
| 8250 | #include <sys/resource.h> |
| 8251 | |
Martin v. Löwis | 399a689 | 2002-10-04 10:22:02 +0000 | [diff] [blame] | 8252 | int |
| 8253 | main () |
| 8254 | { |
| 8255 | struct rlimit foo; |
| 8256 | ; |
| 8257 | return 0; |
| 8258 | } |
| 8259 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8260 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 399a689 | 2002-10-04 10:22:02 +0000 | [diff] [blame] | 8261 | sol_lfs_bug=no |
| 8262 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8263 | sol_lfs_bug=yes |
Martin v. Löwis | 399a689 | 2002-10-04 10:22:02 +0000 | [diff] [blame] | 8264 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8265 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8266 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5 |
| 8267 | $as_echo "$sol_lfs_bug" >&6; } |
Martin v. Löwis | 399a689 | 2002-10-04 10:22:02 +0000 | [diff] [blame] | 8268 | if test "$sol_lfs_bug" = "yes"; then |
| 8269 | use_lfs=no |
| 8270 | fi |
| 8271 | |
doko@ubuntu.com | 006a56c | 2016-06-14 10:15:25 +0200 | [diff] [blame] | 8272 | # Don't use largefile support for GNU/Hurd |
| 8273 | case $ac_sys_system in GNU*) |
| 8274 | use_lfs=no |
| 8275 | esac |
| 8276 | |
Martin v. Löwis | 399a689 | 2002-10-04 10:22:02 +0000 | [diff] [blame] | 8277 | if test "$use_lfs" = "yes"; then |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 8278 | # Two defines needed to enable largefile support on various platforms |
| 8279 | # These may affect some typedefs |
Georg Brandl | 216e404 | 2011-02-19 08:58:23 +0000 | [diff] [blame] | 8280 | case $ac_sys_system/$ac_sys_release in |
| 8281 | AIX*) |
| 8282 | |
| 8283 | $as_echo "#define _LARGE_FILES 1" >>confdefs.h |
| 8284 | |
| 8285 | ;; |
| 8286 | esac |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 8287 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8288 | $as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8289 | |
| 8290 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8291 | $as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h |
Guido van Rossum | 810cc51 | 2001-09-09 23:51:39 +0000 | [diff] [blame] | 8292 | |
Martin v. Löwis | 399a689 | 2002-10-04 10:22:02 +0000 | [diff] [blame] | 8293 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8294 | |
Guido van Rossum | 84e7b24 | 1996-08-19 21:59:00 +0000 | [diff] [blame] | 8295 | # Add some code to confdefs.h so that the test for off_t works on SCO |
| 8296 | cat >> confdefs.h <<\EOF |
| 8297 | #if defined(SCO_DS) |
| 8298 | #undef _OFF_T |
| 8299 | #endif |
| 8300 | EOF |
| 8301 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 8302 | # Type availability checks |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8303 | 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] | 8304 | if test "x$ac_cv_type_mode_t" = xyes; then : |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8305 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8306 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8307 | |
| 8308 | cat >>confdefs.h <<_ACEOF |
| 8309 | #define mode_t int |
| 8310 | _ACEOF |
| 8311 | |
| 8312 | fi |
| 8313 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8314 | 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] | 8315 | if test "x$ac_cv_type_off_t" = xyes; then : |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8316 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8317 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8318 | |
| 8319 | cat >>confdefs.h <<_ACEOF |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8320 | #define off_t long int |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8321 | _ACEOF |
| 8322 | |
| 8323 | fi |
| 8324 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8325 | 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] | 8326 | if test "x$ac_cv_type_pid_t" = xyes; then : |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8327 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8328 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8329 | |
| 8330 | cat >>confdefs.h <<_ACEOF |
| 8331 | #define pid_t int |
| 8332 | _ACEOF |
| 8333 | |
| 8334 | fi |
| 8335 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 8336 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8337 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | bada4c3 | 2010-04-25 21:18:48 +0000 | [diff] [blame] | 8338 | #define RETSIGTYPE void |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8339 | _ACEOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8340 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8341 | 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] | 8342 | if test "x$ac_cv_type_size_t" = xyes; then : |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8343 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8344 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8345 | |
| 8346 | cat >>confdefs.h <<_ACEOF |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8347 | #define size_t unsigned int |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8348 | _ACEOF |
| 8349 | |
| 8350 | fi |
| 8351 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8352 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 |
| 8353 | $as_echo_n "checking for uid_t in sys/types.h... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8354 | if ${ac_cv_type_uid_t+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8355 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8356 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8357 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8358 | /* end confdefs.h. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8359 | #include <sys/types.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8360 | |
| 8361 | _ACEOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8362 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8363 | $EGREP "uid_t" >/dev/null 2>&1; then : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8364 | ac_cv_type_uid_t=yes |
| 8365 | else |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8366 | ac_cv_type_uid_t=no |
| 8367 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 8368 | rm -f conftest* |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 8369 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8370 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8371 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 |
| 8372 | $as_echo "$ac_cv_type_uid_t" >&6; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8373 | if test $ac_cv_type_uid_t = no; then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8374 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8375 | $as_echo "#define uid_t int" >>confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8376 | |
| 8377 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8378 | $as_echo "#define gid_t int" >>confdefs.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 8379 | |
| 8380 | fi |
| 8381 | |
Mark Dickinson | 983bc16 | 2012-12-02 12:11:38 +0000 | [diff] [blame] | 8382 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8383 | 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] | 8384 | if test "x$ac_cv_type_ssize_t" = xyes; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8385 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8386 | $as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h |
Martin v. Löwis | 18e1655 | 2006-02-15 17:27:45 +0000 | [diff] [blame] | 8387 | |
| 8388 | fi |
| 8389 | |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 8390 | ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default" |
| 8391 | if test "x$ac_cv_type___uint128_t" = xyes; then : |
| 8392 | |
| 8393 | $as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h |
| 8394 | |
| 8395 | fi |
| 8396 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 8397 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8398 | # Sizes of various common basic types |
Skip Montanaro | b9820a3 | 2004-01-17 00:16:12 +0000 | [diff] [blame] | 8399 | # ANSI C requires sizeof(char) == 1, so no need to check it |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8400 | # The cast to long int works around a bug in the HP C Compiler |
| 8401 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8402 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8403 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8404 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 |
| 8405 | $as_echo_n "checking size of int... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8406 | if ${ac_cv_sizeof_int+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8407 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8408 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8409 | 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] | 8410 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8411 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8412 | if test "$ac_cv_type_int" = yes; then |
| 8413 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8414 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8415 | as_fn_error 77 "cannot compute sizeof (int) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8416 | See \`config.log' for more details" "$LINENO" 5; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8417 | else |
| 8418 | ac_cv_sizeof_int=0 |
| 8419 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8420 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8421 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8422 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8423 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 |
| 8424 | $as_echo "$ac_cv_sizeof_int" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8425 | |
| 8426 | |
| 8427 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8428 | cat >>confdefs.h <<_ACEOF |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 8429 | #define SIZEOF_INT $ac_cv_sizeof_int |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8430 | _ACEOF |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 8431 | |
| 8432 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8433 | # The cast to long int works around a bug in the HP C Compiler |
| 8434 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8435 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8436 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8437 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 |
| 8438 | $as_echo_n "checking size of long... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8439 | if ${ac_cv_sizeof_long+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8440 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8441 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8442 | 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] | 8443 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8444 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8445 | if test "$ac_cv_type_long" = yes; then |
| 8446 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8447 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8448 | as_fn_error 77 "cannot compute sizeof (long) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8449 | See \`config.log' for more details" "$LINENO" 5; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8450 | else |
| 8451 | ac_cv_sizeof_long=0 |
| 8452 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8453 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8454 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8455 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8456 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
| 8457 | $as_echo "$ac_cv_sizeof_long" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8458 | |
| 8459 | |
| 8460 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8461 | cat >>confdefs.h <<_ACEOF |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 8462 | #define SIZEOF_LONG $ac_cv_sizeof_long |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8463 | _ACEOF |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 8464 | |
| 8465 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8466 | # The cast to long int works around a bug in the HP C Compiler |
| 8467 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8468 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8469 | # This bug is HP SR number 8606223364. |
Benjamin Peterson | ed4aa83 | 2016-09-05 17:44:18 -0700 | [diff] [blame] | 8470 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 |
| 8471 | $as_echo_n "checking size of long long... " >&6; } |
| 8472 | if ${ac_cv_sizeof_long_long+:} false; then : |
| 8473 | $as_echo_n "(cached) " >&6 |
| 8474 | else |
| 8475 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : |
| 8476 | |
| 8477 | else |
| 8478 | if test "$ac_cv_type_long_long" = yes; then |
| 8479 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8480 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 8481 | as_fn_error 77 "cannot compute sizeof (long long) |
| 8482 | See \`config.log' for more details" "$LINENO" 5; } |
| 8483 | else |
| 8484 | ac_cv_sizeof_long_long=0 |
| 8485 | fi |
| 8486 | fi |
| 8487 | |
| 8488 | fi |
| 8489 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 |
| 8490 | $as_echo "$ac_cv_sizeof_long_long" >&6; } |
| 8491 | |
| 8492 | |
| 8493 | |
| 8494 | cat >>confdefs.h <<_ACEOF |
| 8495 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
| 8496 | _ACEOF |
| 8497 | |
| 8498 | |
| 8499 | # The cast to long int works around a bug in the HP C Compiler |
| 8500 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8501 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8502 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8503 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 |
| 8504 | $as_echo_n "checking size of void *... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8505 | if ${ac_cv_sizeof_void_p+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8506 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8507 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8508 | 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] | 8509 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8510 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8511 | if test "$ac_cv_type_void_p" = yes; then |
| 8512 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8513 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8514 | as_fn_error 77 "cannot compute sizeof (void *) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8515 | See \`config.log' for more details" "$LINENO" 5; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8516 | else |
| 8517 | ac_cv_sizeof_void_p=0 |
| 8518 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8519 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8520 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8521 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8522 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 |
| 8523 | $as_echo "$ac_cv_sizeof_void_p" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8524 | |
| 8525 | |
| 8526 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8527 | cat >>confdefs.h <<_ACEOF |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 8528 | #define SIZEOF_VOID_P $ac_cv_sizeof_void_p |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8529 | _ACEOF |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 8530 | |
| 8531 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8532 | # The cast to long int works around a bug in the HP C Compiler |
| 8533 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8534 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8535 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8536 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 |
| 8537 | $as_echo_n "checking size of short... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8538 | if ${ac_cv_sizeof_short+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8539 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8540 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8541 | 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] | 8542 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8543 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8544 | if test "$ac_cv_type_short" = yes; then |
| 8545 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8546 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8547 | as_fn_error 77 "cannot compute sizeof (short) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8548 | See \`config.log' for more details" "$LINENO" 5; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8549 | else |
| 8550 | ac_cv_sizeof_short=0 |
| 8551 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8552 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8553 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8554 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8555 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 |
| 8556 | $as_echo "$ac_cv_sizeof_short" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8557 | |
| 8558 | |
| 8559 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8560 | cat >>confdefs.h <<_ACEOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 8561 | #define SIZEOF_SHORT $ac_cv_sizeof_short |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8562 | _ACEOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 8563 | |
| 8564 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8565 | # The cast to long int works around a bug in the HP C Compiler |
| 8566 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8567 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8568 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8569 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5 |
| 8570 | $as_echo_n "checking size of float... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8571 | if ${ac_cv_sizeof_float+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8572 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8573 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8574 | 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] | 8575 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8576 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8577 | if test "$ac_cv_type_float" = yes; then |
| 8578 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8579 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8580 | as_fn_error 77 "cannot compute sizeof (float) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8581 | See \`config.log' for more details" "$LINENO" 5; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8582 | else |
| 8583 | ac_cv_sizeof_float=0 |
| 8584 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8585 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8586 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8587 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8588 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5 |
| 8589 | $as_echo "$ac_cv_sizeof_float" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8590 | |
| 8591 | |
| 8592 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8593 | cat >>confdefs.h <<_ACEOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 8594 | #define SIZEOF_FLOAT $ac_cv_sizeof_float |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8595 | _ACEOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 8596 | |
| 8597 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8598 | # The cast to long int works around a bug in the HP C Compiler |
| 8599 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8600 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8601 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8602 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5 |
| 8603 | $as_echo_n "checking size of double... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8604 | if ${ac_cv_sizeof_double+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8605 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8606 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8607 | 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] | 8608 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8609 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8610 | if test "$ac_cv_type_double" = yes; then |
| 8611 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8612 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8613 | as_fn_error 77 "cannot compute sizeof (double) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8614 | See \`config.log' for more details" "$LINENO" 5; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8615 | else |
| 8616 | ac_cv_sizeof_double=0 |
| 8617 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8618 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8619 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8620 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8621 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5 |
| 8622 | $as_echo "$ac_cv_sizeof_double" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8623 | |
| 8624 | |
| 8625 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8626 | cat >>confdefs.h <<_ACEOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 8627 | #define SIZEOF_DOUBLE $ac_cv_sizeof_double |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8628 | _ACEOF |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 8629 | |
| 8630 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8631 | # The cast to long int works around a bug in the HP C Compiler |
| 8632 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8633 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8634 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8635 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5 |
| 8636 | $as_echo_n "checking size of fpos_t... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8637 | if ${ac_cv_sizeof_fpos_t+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8638 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8639 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8640 | 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] | 8641 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8642 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8643 | if test "$ac_cv_type_fpos_t" = yes; then |
| 8644 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8645 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8646 | as_fn_error 77 "cannot compute sizeof (fpos_t) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8647 | See \`config.log' for more details" "$LINENO" 5; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8648 | else |
| 8649 | ac_cv_sizeof_fpos_t=0 |
| 8650 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8651 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8652 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8653 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8654 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5 |
| 8655 | $as_echo "$ac_cv_sizeof_fpos_t" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8656 | |
| 8657 | |
| 8658 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8659 | cat >>confdefs.h <<_ACEOF |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 8660 | #define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8661 | _ACEOF |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 8662 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8663 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8664 | # The cast to long int works around a bug in the HP C Compiler |
| 8665 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8666 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8667 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8668 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 |
| 8669 | $as_echo_n "checking size of size_t... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8670 | if ${ac_cv_sizeof_size_t+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8671 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 18e1655 | 2006-02-15 17:27:45 +0000 | [diff] [blame] | 8672 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8673 | 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] | 8674 | |
Martin v. Löwis | 18e1655 | 2006-02-15 17:27:45 +0000 | [diff] [blame] | 8675 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8676 | if test "$ac_cv_type_size_t" = yes; then |
| 8677 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8678 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8679 | as_fn_error 77 "cannot compute sizeof (size_t) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8680 | See \`config.log' for more details" "$LINENO" 5; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8681 | else |
| 8682 | ac_cv_sizeof_size_t=0 |
| 8683 | fi |
Martin v. Löwis | 18e1655 | 2006-02-15 17:27:45 +0000 | [diff] [blame] | 8684 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8685 | |
Martin v. Löwis | 18e1655 | 2006-02-15 17:27:45 +0000 | [diff] [blame] | 8686 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8687 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 |
| 8688 | $as_echo "$ac_cv_sizeof_size_t" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8689 | |
| 8690 | |
| 8691 | |
Martin v. Löwis | 18e1655 | 2006-02-15 17:27:45 +0000 | [diff] [blame] | 8692 | cat >>confdefs.h <<_ACEOF |
| 8693 | #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t |
| 8694 | _ACEOF |
| 8695 | |
| 8696 | |
Christian Heimes | 400adb0 | 2008-02-01 08:12:03 +0000 | [diff] [blame] | 8697 | # The cast to long int works around a bug in the HP C Compiler |
| 8698 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8699 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8700 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8701 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5 |
| 8702 | $as_echo_n "checking size of pid_t... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8703 | if ${ac_cv_sizeof_pid_t+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8704 | $as_echo_n "(cached) " >&6 |
Christian Heimes | 400adb0 | 2008-02-01 08:12:03 +0000 | [diff] [blame] | 8705 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8706 | 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] | 8707 | |
Christian Heimes | 400adb0 | 2008-02-01 08:12:03 +0000 | [diff] [blame] | 8708 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8709 | if test "$ac_cv_type_pid_t" = yes; then |
| 8710 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8711 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8712 | as_fn_error 77 "cannot compute sizeof (pid_t) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8713 | See \`config.log' for more details" "$LINENO" 5; } |
Christian Heimes | 400adb0 | 2008-02-01 08:12:03 +0000 | [diff] [blame] | 8714 | else |
| 8715 | ac_cv_sizeof_pid_t=0 |
| 8716 | fi |
| 8717 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8718 | |
Christian Heimes | 400adb0 | 2008-02-01 08:12:03 +0000 | [diff] [blame] | 8719 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8720 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5 |
| 8721 | $as_echo "$ac_cv_sizeof_pid_t" >&6; } |
Christian Heimes | 400adb0 | 2008-02-01 08:12:03 +0000 | [diff] [blame] | 8722 | |
| 8723 | |
| 8724 | |
| 8725 | cat >>confdefs.h <<_ACEOF |
| 8726 | #define SIZEOF_PID_T $ac_cv_sizeof_pid_t |
| 8727 | _ACEOF |
| 8728 | |
| 8729 | |
Benjamin Peterson | df6ff7b | 2016-09-06 13:53:14 -0700 | [diff] [blame] | 8730 | # The cast to long int works around a bug in the HP C Compiler |
| 8731 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8732 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8733 | # This bug is HP SR number 8606223364. |
| 8734 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5 |
| 8735 | $as_echo_n "checking size of uintptr_t... " >&6; } |
| 8736 | if ${ac_cv_sizeof_uintptr_t+:} false; then : |
| 8737 | $as_echo_n "(cached) " >&6 |
| 8738 | else |
| 8739 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then : |
| 8740 | |
| 8741 | else |
| 8742 | if test "$ac_cv_type_uintptr_t" = yes; then |
| 8743 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8744 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 8745 | as_fn_error 77 "cannot compute sizeof (uintptr_t) |
| 8746 | See \`config.log' for more details" "$LINENO" 5; } |
| 8747 | else |
| 8748 | ac_cv_sizeof_uintptr_t=0 |
| 8749 | fi |
| 8750 | fi |
| 8751 | |
| 8752 | fi |
| 8753 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5 |
| 8754 | $as_echo "$ac_cv_sizeof_uintptr_t" >&6; } |
| 8755 | |
| 8756 | |
| 8757 | |
| 8758 | cat >>confdefs.h <<_ACEOF |
| 8759 | #define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t |
| 8760 | _ACEOF |
| 8761 | |
| 8762 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8763 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8764 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5 |
| 8765 | $as_echo_n "checking for long double support... " >&6; } |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8766 | have_long_double=no |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8767 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8768 | /* end confdefs.h. */ |
| 8769 | |
| 8770 | int |
| 8771 | main () |
| 8772 | { |
| 8773 | long double x; x = (long double)0; |
| 8774 | ; |
| 8775 | return 0; |
| 8776 | } |
| 8777 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8778 | if ac_fn_c_try_compile "$LINENO"; then : |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8779 | |
| 8780 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8781 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8782 | |
| 8783 | have_long_double=yes |
| 8784 | |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8785 | fi |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8786 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8787 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5 |
| 8788 | $as_echo "$have_long_double" >&6; } |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8789 | if test "$have_long_double" = yes ; then |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8790 | # The cast to long int works around a bug in the HP C Compiler |
| 8791 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8792 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8793 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8794 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5 |
| 8795 | $as_echo_n "checking size of long double... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8796 | if ${ac_cv_sizeof_long_double+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8797 | $as_echo_n "(cached) " >&6 |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8798 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8799 | 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] | 8800 | |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8801 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8802 | if test "$ac_cv_type_long_double" = yes; then |
| 8803 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8804 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8805 | as_fn_error 77 "cannot compute sizeof (long double) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8806 | See \`config.log' for more details" "$LINENO" 5; } |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8807 | else |
| 8808 | ac_cv_sizeof_long_double=0 |
| 8809 | fi |
| 8810 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8811 | |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8812 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8813 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5 |
| 8814 | $as_echo "$ac_cv_sizeof_long_double" >&6; } |
Travis E. Oliphant | 9b30784 | 2007-10-12 22:06:37 +0000 | [diff] [blame] | 8815 | |
| 8816 | |
| 8817 | |
| 8818 | cat >>confdefs.h <<_ACEOF |
| 8819 | #define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double |
| 8820 | _ACEOF |
| 8821 | |
| 8822 | |
| 8823 | fi |
| 8824 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8825 | # The cast to long int works around a bug in the HP C Compiler |
| 8826 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8827 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8828 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8829 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5 |
| 8830 | $as_echo_n "checking size of _Bool... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8831 | if ${ac_cv_sizeof__Bool+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8832 | $as_echo_n "(cached) " >&6 |
Thomas Wouters | b213704 | 2007-02-01 18:02:27 +0000 | [diff] [blame] | 8833 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8834 | 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] | 8835 | |
Thomas Wouters | b213704 | 2007-02-01 18:02:27 +0000 | [diff] [blame] | 8836 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8837 | if test "$ac_cv_type__Bool" = yes; then |
| 8838 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8839 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8840 | as_fn_error 77 "cannot compute sizeof (_Bool) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8841 | See \`config.log' for more details" "$LINENO" 5; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8842 | else |
| 8843 | ac_cv_sizeof__Bool=0 |
| 8844 | fi |
Thomas Wouters | b213704 | 2007-02-01 18:02:27 +0000 | [diff] [blame] | 8845 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8846 | |
Thomas Wouters | b213704 | 2007-02-01 18:02:27 +0000 | [diff] [blame] | 8847 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8848 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5 |
| 8849 | $as_echo "$ac_cv_sizeof__Bool" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8850 | |
| 8851 | |
| 8852 | |
Thomas Wouters | b213704 | 2007-02-01 18:02:27 +0000 | [diff] [blame] | 8853 | cat >>confdefs.h <<_ACEOF |
| 8854 | #define SIZEOF__BOOL $ac_cv_sizeof__Bool |
| 8855 | _ACEOF |
| 8856 | |
| 8857 | |
Thomas Wouters | b213704 | 2007-02-01 18:02:27 +0000 | [diff] [blame] | 8858 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 8859 | # The cast to long int works around a bug in the HP C Compiler |
| 8860 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8861 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8862 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8863 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 |
| 8864 | $as_echo_n "checking size of off_t... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8865 | if ${ac_cv_sizeof_off_t+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8866 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 8867 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8868 | 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] | 8869 | #ifdef HAVE_SYS_TYPES_H |
| 8870 | #include <sys/types.h> |
| 8871 | #endif |
| 8872 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8873 | "; then : |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 8874 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 8875 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8876 | if test "$ac_cv_type_off_t" = yes; then |
| 8877 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8878 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8879 | as_fn_error 77 "cannot compute sizeof (off_t) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8880 | See \`config.log' for more details" "$LINENO" 5; } |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 8881 | else |
| 8882 | ac_cv_sizeof_off_t=0 |
| 8883 | fi |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 8884 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8885 | |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 8886 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8887 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 |
| 8888 | $as_echo "$ac_cv_sizeof_off_t" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8889 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 8890 | |
| 8891 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8892 | cat >>confdefs.h <<_ACEOF |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 8893 | #define SIZEOF_OFF_T $ac_cv_sizeof_off_t |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8894 | _ACEOF |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 8895 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8896 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 8897 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8898 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5 |
| 8899 | $as_echo_n "checking whether to enable large file support... " >&6; } |
Mark Dickinson | 2df5d28 | 2009-12-31 21:22:50 +0000 | [diff] [blame] | 8900 | 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] | 8901 | "$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] | 8902 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8903 | $as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8904 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8905 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 8906 | $as_echo "yes" >&6; } |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 8907 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8908 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 8909 | $as_echo "no" >&6; } |
Guido van Rossum | f98e2a7 | 1999-01-06 18:53:34 +0000 | [diff] [blame] | 8910 | fi |
| 8911 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 8912 | # The cast to long int works around a bug in the HP C Compiler |
| 8913 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8914 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8915 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8916 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 |
| 8917 | $as_echo_n "checking size of time_t... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8918 | if ${ac_cv_sizeof_time_t+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8919 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 8920 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8921 | 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] | 8922 | #ifdef HAVE_SYS_TYPES_H |
| 8923 | #include <sys/types.h> |
| 8924 | #endif |
| 8925 | #ifdef HAVE_TIME_H |
| 8926 | #include <time.h> |
| 8927 | #endif |
| 8928 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8929 | "; then : |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 8930 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 8931 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8932 | if test "$ac_cv_type_time_t" = yes; then |
| 8933 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 8934 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 8935 | as_fn_error 77 "cannot compute sizeof (time_t) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8936 | See \`config.log' for more details" "$LINENO" 5; } |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 8937 | else |
| 8938 | ac_cv_sizeof_time_t=0 |
| 8939 | fi |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 8940 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8941 | |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 8942 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8943 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5 |
| 8944 | $as_echo "$ac_cv_sizeof_time_t" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8945 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 8946 | |
| 8947 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8948 | cat >>confdefs.h <<_ACEOF |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 8949 | #define SIZEOF_TIME_T $ac_cv_sizeof_time_t |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8950 | _ACEOF |
Guido van Rossum | b9a22a1 | 2000-06-30 02:48:53 +0000 | [diff] [blame] | 8951 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 8952 | |
| 8953 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 8954 | # if have pthread_t then define SIZEOF_PTHREAD_T |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 8955 | ac_save_cc="$CC" |
| 8956 | if test "$ac_cv_kpthread" = "yes" |
| 8957 | then CC="$CC -Kpthread" |
Martin v. Löwis | 5f433f0 | 2003-05-05 05:05:30 +0000 | [diff] [blame] | 8958 | elif test "$ac_cv_kthread" = "yes" |
| 8959 | then CC="$CC -Kthread" |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 8960 | elif test "$ac_cv_pthread" = "yes" |
| 8961 | then CC="$CC -pthread" |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 8962 | fi |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 8963 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8964 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5 |
| 8965 | $as_echo_n "checking for pthread_t... " >&6; } |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 8966 | have_pthread_t=no |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8967 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 8968 | /* end confdefs.h. */ |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 8969 | |
| 8970 | #include <pthread.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8971 | int |
| 8972 | main () |
| 8973 | { |
Guido van Rossum | 1258049 | 2000-09-24 16:47:19 +0000 | [diff] [blame] | 8974 | pthread_t x; x = *(pthread_t*)0; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8975 | ; |
| 8976 | return 0; |
| 8977 | } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 8978 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 8979 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8980 | if ac_fn_c_try_compile "$LINENO"; then : |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 8981 | have_pthread_t=yes |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 8982 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 8983 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8984 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5 |
| 8985 | $as_echo "$have_pthread_t" >&6; } |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 8986 | if test "$have_pthread_t" = yes ; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8987 | # 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] | 8988 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 8989 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 8990 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8991 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5 |
| 8992 | $as_echo_n "checking size of pthread_t... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 8993 | if ${ac_cv_sizeof_pthread_t+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8994 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 8995 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 8996 | 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] | 8997 | #ifdef HAVE_PTHREAD_H |
| 8998 | #include <pthread.h> |
| 8999 | #endif |
| 9000 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9001 | "; then : |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9002 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9003 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9004 | if test "$ac_cv_type_pthread_t" = yes; then |
| 9005 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 9006 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 9007 | as_fn_error 77 "cannot compute sizeof (pthread_t) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9008 | See \`config.log' for more details" "$LINENO" 5; } |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9009 | else |
| 9010 | ac_cv_sizeof_pthread_t=0 |
| 9011 | fi |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 9012 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9013 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 9014 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9015 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5 |
| 9016 | $as_echo "$ac_cv_sizeof_pthread_t" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9017 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9018 | |
| 9019 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9020 | cat >>confdefs.h <<_ACEOF |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 9021 | #define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9022 | _ACEOF |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 9023 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 9024 | |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 9025 | fi |
Martin v. Löwis | 123cbd2 | 2001-07-19 14:21:10 +0000 | [diff] [blame] | 9026 | CC="$ac_save_cc" |
Trent Mick | 635f6fb | 2000-08-23 21:33:05 +0000 | [diff] [blame] | 9027 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 9028 | |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9029 | case $ac_sys_system/$ac_sys_release in |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 9030 | Darwin/[01567]\..*) |
Bob Ippolito | 7026a0a | 2005-03-28 23:23:47 +0000 | [diff] [blame] | 9031 | OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000" |
| 9032 | ;; |
| 9033 | Darwin/*) |
| 9034 | OTHER_LIBTOOL_OPT="" |
| 9035 | ;; |
| 9036 | esac |
| 9037 | |
| 9038 | |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9039 | |
Bob Ippolito | 7026a0a | 2005-03-28 23:23:47 +0000 | [diff] [blame] | 9040 | case $ac_sys_system/$ac_sys_release in |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 9041 | Darwin/[01567]\..*) |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 9042 | LIBTOOL_CRUFT="-framework System -lcc_dynamic" |
| 9043 | if test "${enable_universalsdk}"; then |
| 9044 | : |
| 9045 | else |
Ronald Oussoren | e3da75a | 2010-02-11 13:38:58 +0000 | [diff] [blame] | 9046 | LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`" |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 9047 | fi |
Jack Jansen | b36687a | 2004-07-16 08:43:47 +0000 | [diff] [blame] | 9048 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 9049 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 5839e58 | 2000-10-09 19:52:35 +0000 | [diff] [blame] | 9050 | Darwin/*) |
Ronald Oussoren | 9812a6c | 2010-02-07 11:53:18 +0000 | [diff] [blame] | 9051 | gcc_version=`gcc -dumpversion` |
Bob Ippolito | 7026a0a | 2005-03-28 23:23:47 +0000 | [diff] [blame] | 9052 | if test ${gcc_version} '<' 4.0 |
| 9053 | then |
| 9054 | LIBTOOL_CRUFT="-lcc_dynamic" |
| 9055 | else |
| 9056 | LIBTOOL_CRUFT="" |
| 9057 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9058 | if test "$cross_compiling" = yes; then : |
Ronald Oussoren | 3c064c1 | 2009-09-08 07:12:42 +0000 | [diff] [blame] | 9059 | ac_osx_32bit=yes |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9060 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9061 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9062 | /* end confdefs.h. */ |
Ronald Oussoren | 3c064c1 | 2009-09-08 07:12:42 +0000 | [diff] [blame] | 9063 | |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9064 | #include <unistd.h> |
| 9065 | int main(int argc, char*argv[]) |
| 9066 | { |
| 9067 | if (sizeof(long) == 4) { |
| 9068 | return 0; |
| 9069 | } else { |
| 9070 | return 1; |
| 9071 | } |
Ronald Oussoren | 3c064c1 | 2009-09-08 07:12:42 +0000 | [diff] [blame] | 9072 | } |
| 9073 | |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9074 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9075 | if ac_fn_c_try_run "$LINENO"; then : |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9076 | ac_osx_32bit=yes |
| 9077 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9078 | ac_osx_32bit=no |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9079 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9080 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 9081 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9082 | fi |
| 9083 | |
| 9084 | |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9085 | if test "${ac_osx_32bit}" = "yes"; then |
Ronald Oussoren | e3da75a | 2010-02-11 13:38:58 +0000 | [diff] [blame] | 9086 | case `/usr/bin/arch` in |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9087 | i386) |
| 9088 | MACOSX_DEFAULT_ARCH="i386" |
| 9089 | ;; |
| 9090 | ppc) |
| 9091 | MACOSX_DEFAULT_ARCH="ppc" |
| 9092 | ;; |
| 9093 | *) |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 9094 | as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5 |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9095 | ;; |
| 9096 | esac |
| 9097 | else |
Ronald Oussoren | e3da75a | 2010-02-11 13:38:58 +0000 | [diff] [blame] | 9098 | case `/usr/bin/arch` in |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9099 | i386) |
| 9100 | MACOSX_DEFAULT_ARCH="x86_64" |
| 9101 | ;; |
| 9102 | ppc) |
| 9103 | MACOSX_DEFAULT_ARCH="ppc64" |
| 9104 | ;; |
| 9105 | *) |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 9106 | as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5 |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9107 | ;; |
| 9108 | esac |
| 9109 | |
Ronald Oussoren | 5bbab3e | 2009-09-06 11:01:15 +0000 | [diff] [blame] | 9110 | fi |
| 9111 | |
| 9112 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}" |
Jack Jansen | b36687a | 2004-07-16 08:43:47 +0000 | [diff] [blame] | 9113 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 9114 | LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9115 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9116 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5 |
| 9117 | $as_echo_n "checking for --enable-framework... " >&6; } |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 9118 | if test "$enable_framework" |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9119 | then |
Skip Montanaro | decc6a4 | 2003-01-01 20:07:49 +0000 | [diff] [blame] | 9120 | BASECFLAGS="$BASECFLAGS -fno-common -dynamic" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9121 | # -F. is needed to allow linking to the framework while |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 9122 | # in the build location. |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9123 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9124 | $as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9125 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9126 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 9127 | $as_echo "yes" >&6; } |
Ronald Oussoren | 99aab65 | 2009-06-08 21:22:57 +0000 | [diff] [blame] | 9128 | if test $enable_shared = "yes" |
| 9129 | then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 9130 | 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] | 9131 | fi |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9132 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9133 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9134 | $as_echo "no" >&6; } |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9135 | fi |
| 9136 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9137 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5 |
| 9138 | $as_echo_n "checking for dyld... " >&6; } |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 9139 | case $ac_sys_system/$ac_sys_release in |
| 9140 | Darwin/*) |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9141 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9142 | $as_echo "#define WITH_DYLD 1" >>confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9143 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9144 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5 |
| 9145 | $as_echo "always on for Darwin" >&6; } |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 9146 | ;; |
| 9147 | *) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9148 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9149 | $as_echo "no" >&6; } |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 9150 | ;; |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 9151 | esac |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9152 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9153 | # Set info about shared libraries. |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9154 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 9155 | |
| 9156 | |
| 9157 | |
| 9158 | |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9159 | |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 9160 | |
doko@ubuntu.com | d5537d0 | 2013-03-21 13:21:49 -0700 | [diff] [blame] | 9161 | # SHLIB_SUFFIX is the extension of shared libraries `(including the dot!) |
| 9162 | # -- usually .so, .sl on HP-UX, .dll on Cygwin |
| 9163 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5 |
| 9164 | $as_echo_n "checking the extension of shared libraries... " >&6; } |
| 9165 | if test -z "$SHLIB_SUFFIX"; then |
| 9166 | case $ac_sys_system in |
| 9167 | hp*|HP*) |
| 9168 | case `uname -m` in |
| 9169 | ia64) SHLIB_SUFFIX=.so;; |
| 9170 | *) SHLIB_SUFFIX=.sl;; |
| 9171 | esac |
| 9172 | ;; |
| 9173 | CYGWIN*) SHLIB_SUFFIX=.dll;; |
| 9174 | *) SHLIB_SUFFIX=.so;; |
| 9175 | esac |
| 9176 | fi |
| 9177 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5 |
| 9178 | $as_echo "$SHLIB_SUFFIX" >&6; } |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 9179 | |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9180 | # LDSHARED is the ld *command* used to create shared library |
Martin v. Löwis | 12af048 | 2004-01-31 12:34:17 +0000 | [diff] [blame] | 9181 | # -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5 |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9182 | # (Shared libraries in this instance are shared modules to be loaded into |
| 9183 | # Python, as opposed to building Python itself as a shared library.) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9184 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5 |
| 9185 | $as_echo_n "checking LDSHARED... " >&6; } |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9186 | if test -z "$LDSHARED" |
| 9187 | then |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 9188 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 9189 | AIX*) |
Martin Panter | 395733d | 2016-11-20 07:56:37 +0000 | [diff] [blame] | 9190 | BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp" |
Martin Panter | 5de141f | 2016-08-27 04:00:19 +0000 | [diff] [blame] | 9191 | LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp" |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 9192 | ;; |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 9193 | IRIX/5*) LDSHARED="ld -shared";; |
Guido van Rossum | 9192267 | 1997-10-09 20:24:13 +0000 | [diff] [blame] | 9194 | IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9195 | SunOS/5*) |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9196 | if test "$GCC" = "yes" ; then |
| 9197 | LDSHARED='$(CC) -shared' |
| 9198 | LDCXXSHARED='$(CXX) -shared' |
| 9199 | else |
| 9200 | LDSHARED='$(CC) -G' |
| 9201 | LDCXXSHARED='$(CXX) -G' |
Greg Ward | 57c9a663 | 2000-05-26 12:22:54 +0000 | [diff] [blame] | 9202 | fi ;; |
Thomas Heller | f44b9a1 | 2008-04-04 10:18:23 +0000 | [diff] [blame] | 9203 | hp*|HP*) |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9204 | if test "$GCC" = "yes" ; then |
| 9205 | LDSHARED='$(CC) -shared' |
| 9206 | LDCXXSHARED='$(CXX) -shared' |
| 9207 | else |
| 9208 | LDSHARED='ld -b' |
Thomas Heller | f44b9a1 | 2008-04-04 10:18:23 +0000 | [diff] [blame] | 9209 | fi ;; |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 9210 | Darwin/1.3*) |
Antoine Pitrou | d4958c2 | 2010-10-13 17:01:10 +0000 | [diff] [blame] | 9211 | LDSHARED='$(CC) -bundle' |
| 9212 | LDCXXSHARED='$(CXX) -bundle' |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 9213 | if test "$enable_framework" ; then |
| 9214 | # Link against the framework. All externals should be defined. |
Jack Jansen | da49e19 | 2005-01-07 13:08:22 +0000 | [diff] [blame] | 9215 | BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
| 9216 | LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9217 | LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 9218 | else |
| 9219 | # No framework. Ignore undefined symbols, assuming they come from Python |
Jack Jansen | 418c3b1 | 2001-11-14 10:59:57 +0000 | [diff] [blame] | 9220 | LDSHARED="$LDSHARED -undefined suppress" |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9221 | LDCXXSHARED="$LDCXXSHARED -undefined suppress" |
Jack Jansen | a3891ea | 2001-09-07 14:25:12 +0000 | [diff] [blame] | 9222 | fi ;; |
Jack Jansen | 6b08a40 | 2004-06-03 12:41:45 +0000 | [diff] [blame] | 9223 | Darwin/1.4*|Darwin/5.*|Darwin/6.*) |
Antoine Pitrou | d4958c2 | 2010-10-13 17:01:10 +0000 | [diff] [blame] | 9224 | LDSHARED='$(CC) -bundle' |
| 9225 | LDCXXSHARED='$(CXX) -bundle' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 9226 | if test "$enable_framework" ; then |
| 9227 | # Link against the framework. All externals should be defined. |
Jack Jansen | da49e19 | 2005-01-07 13:08:22 +0000 | [diff] [blame] | 9228 | BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
| 9229 | LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9230 | LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 9231 | else |
Michael W. Hudson | 594bc80 | 2002-03-07 09:59:15 +0000 | [diff] [blame] | 9232 | # No framework, use the Python app as bundle-loader |
| 9233 | BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)' |
Jack Jansen | c28fc37 | 2003-02-25 13:14:43 +0000 | [diff] [blame] | 9234 | LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)' |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9235 | LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)' |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9236 | fi ;; |
Jack Jansen | 6b08a40 | 2004-06-03 12:41:45 +0000 | [diff] [blame] | 9237 | Darwin/*) |
| 9238 | # Use -undefined dynamic_lookup whenever possible (10.3 and later). |
| 9239 | # This allows an extension to be used in any Python |
Thomas Wouters | 89d996e | 2007-09-08 17:39:28 +0000 | [diff] [blame] | 9240 | |
Ned Deily | 36820b6 | 2014-06-25 13:44:22 -0700 | [diff] [blame] | 9241 | dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \ |
| 9242 | sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'` |
| 9243 | dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \ |
| 9244 | sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'` |
| 9245 | if test ${dep_target_major} -eq 10 && \ |
| 9246 | test ${dep_target_minor} -le 2 |
Jack Jansen | 6b08a40 | 2004-06-03 12:41:45 +0000 | [diff] [blame] | 9247 | then |
Ned Deily | 36820b6 | 2014-06-25 13:44:22 -0700 | [diff] [blame] | 9248 | # building for OS X 10.0 through 10.2 |
Antoine Pitrou | d4958c2 | 2010-10-13 17:01:10 +0000 | [diff] [blame] | 9249 | LDSHARED='$(CC) -bundle' |
| 9250 | LDCXXSHARED='$(CXX) -bundle' |
Jack Jansen | 6b08a40 | 2004-06-03 12:41:45 +0000 | [diff] [blame] | 9251 | if test "$enable_framework" ; then |
| 9252 | # Link against the framework. All externals should be defined. |
Jack Jansen | da49e19 | 2005-01-07 13:08:22 +0000 | [diff] [blame] | 9253 | BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
| 9254 | LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9255 | LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
Jack Jansen | 6b08a40 | 2004-06-03 12:41:45 +0000 | [diff] [blame] | 9256 | else |
| 9257 | # No framework, use the Python app as bundle-loader |
| 9258 | BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)' |
| 9259 | LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)' |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9260 | LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)' |
Jack Jansen | 6b08a40 | 2004-06-03 12:41:45 +0000 | [diff] [blame] | 9261 | fi |
Ned Deily | 36820b6 | 2014-06-25 13:44:22 -0700 | [diff] [blame] | 9262 | else |
| 9263 | # building for OS X 10.3 and later |
| 9264 | LDSHARED='$(CC) -bundle -undefined dynamic_lookup' |
| 9265 | LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup' |
| 9266 | BLDSHARED="$LDSHARED" |
Jack Jansen | 6b08a40 | 2004-06-03 12:41:45 +0000 | [diff] [blame] | 9267 | fi |
| 9268 | ;; |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9269 | Linux*|GNU*|QNX*) |
| 9270 | LDSHARED='$(CC) -shared' |
| 9271 | LDCXXSHARED='$(CXX) -shared';; |
| 9272 | BSD/OS*/4*) |
| 9273 | LDSHARED="gcc -shared" |
| 9274 | LDCXXSHARED="g++ -shared";; |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 9275 | FreeBSD*) |
Jeremy Hylton | 4bcc7c5 | 2000-08-31 17:45:35 +0000 | [diff] [blame] | 9276 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 9277 | then |
Antoine Pitrou | d4958c2 | 2010-10-13 17:01:10 +0000 | [diff] [blame] | 9278 | LDSHARED='$(CC) -shared' |
| 9279 | LDCXXSHARED='$(CXX) -shared' |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 9280 | else |
Antoine Pitrou | d4958c2 | 2010-10-13 17:01:10 +0000 | [diff] [blame] | 9281 | LDSHARED="ld -Bshareable" |
Guido van Rossum | 0286ae8 | 2000-08-29 15:06:49 +0000 | [diff] [blame] | 9282 | fi;; |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 9283 | OpenBSD*) |
| 9284 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 9285 | then |
Antoine Pitrou | d4958c2 | 2010-10-13 17:01:10 +0000 | [diff] [blame] | 9286 | LDSHARED='$(CC) -shared $(CCSHARED)' |
| 9287 | LDCXXSHARED='$(CXX) -shared $(CCSHARED)' |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 9288 | else |
| 9289 | case `uname -r` in |
| 9290 | [01].* | 2.[0-7] | 2.[0-7].*) |
| 9291 | LDSHARED="ld -Bshareable ${LDFLAGS}" |
| 9292 | ;; |
| 9293 | *) |
Antoine Pitrou | d4958c2 | 2010-10-13 17:01:10 +0000 | [diff] [blame] | 9294 | LDSHARED='$(CC) -shared $(CCSHARED)' |
| 9295 | LDCXXSHARED='$(CXX) -shared $(CCSHARED)' |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 9296 | ;; |
| 9297 | esac |
| 9298 | fi;; |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9299 | NetBSD*|DragonFly*) |
Antoine Pitrou | ece919e | 2011-01-02 20:45:21 +0000 | [diff] [blame] | 9300 | LDSHARED='$(CC) -shared' |
| 9301 | LDCXXSHARED='$(CXX) -shared';; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 9302 | OpenUNIX*|UnixWare*) |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9303 | if test "$GCC" = "yes" ; then |
| 9304 | LDSHARED='$(CC) -shared' |
| 9305 | LDCXXSHARED='$(CXX) -shared' |
| 9306 | else |
| 9307 | LDSHARED='$(CC) -G' |
| 9308 | LDCXXSHARED='$(CXX) -G' |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 9309 | fi;; |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9310 | SCO_SV*) |
| 9311 | LDSHARED='$(CC) -Wl,-G,-Bexport' |
| 9312 | LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';; |
| 9313 | CYGWIN*) |
| 9314 | LDSHARED="gcc -shared -Wl,--enable-auto-image-base" |
| 9315 | LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9316 | *) LDSHARED="ld";; |
| 9317 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9318 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9319 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5 |
| 9320 | $as_echo "$LDSHARED" >&6; } |
Benjamin Peterson | 99f0376 | 2010-04-11 22:15:28 +0000 | [diff] [blame] | 9321 | LDCXXSHARED=${LDCXXSHARED-$LDSHARED} |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 9322 | BLDSHARED=${BLDSHARED-$LDSHARED} |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9323 | # 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] | 9324 | # library (module) -- this is only needed for a few systems |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9325 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5 |
| 9326 | $as_echo_n "checking CCSHARED... " >&6; } |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9327 | if test -z "$CCSHARED" |
| 9328 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 9329 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 9330 | SunOS*) if test "$GCC" = yes; |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 9331 | then CCSHARED="-fPIC"; |
| 9332 | elif test `uname -p` = sparc; |
| 9333 | then CCSHARED="-xcode=pic32"; |
| 9334 | else CCSHARED="-Kpic"; |
| 9335 | fi;; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 9336 | hp*|HP*) if test "$GCC" = yes; |
Martin v. Löwis | 703ad70 | 2001-09-05 08:36:52 +0000 | [diff] [blame] | 9337 | then CCSHARED="-fPIC"; |
Guido van Rossum | af07a44 | 1995-02-13 19:45:27 +0000 | [diff] [blame] | 9338 | else CCSHARED="+z"; |
| 9339 | fi;; |
Xavier de Gaye | 2a352b6 | 2017-01-04 21:51:16 +0100 | [diff] [blame] | 9340 | Linux-android*) ;; |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 9341 | Linux*|GNU*) CCSHARED="-fPIC";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 9342 | BSD/OS*/4*) CCSHARED="-fpic";; |
Martin v. Löwis | 86d6626 | 2006-02-17 08:40:11 +0000 | [diff] [blame] | 9343 | FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 9344 | OpenUNIX*|UnixWare*) |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 9345 | if test "$GCC" = "yes" |
| 9346 | then CCSHARED="-fPIC" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 9347 | else CCSHARED="-KPIC" |
Martin v. Löwis | bec1958 | 2001-03-21 15:57:54 +0000 | [diff] [blame] | 9348 | fi;; |
Martin v. Löwis | 21ee409 | 2002-09-30 16:19:48 +0000 | [diff] [blame] | 9349 | SCO_SV*) |
| 9350 | if test "$GCC" = "yes" |
| 9351 | then CCSHARED="-fPIC" |
| 9352 | else CCSHARED="-Kpic -belf" |
| 9353 | fi;; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 9354 | IRIX*/6*) case $CC in |
| 9355 | *gcc*) CCSHARED="-shared";; |
Guido van Rossum | ee21f41 | 1998-04-20 18:51:54 +0000 | [diff] [blame] | 9356 | *) CCSHARED="";; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 9357 | esac;; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9358 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9359 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9360 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5 |
| 9361 | $as_echo "$CCSHARED" >&6; } |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9362 | # LINKFORSHARED are the flags passed to the $(CC) command that links |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 9363 | # the python executable -- this is only needed for a few systems |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9364 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5 |
| 9365 | $as_echo_n "checking LINKFORSHARED... " >&6; } |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9366 | if test -z "$LINKFORSHARED" |
| 9367 | then |
Guido van Rossum | 0739797 | 1997-04-29 21:49:50 +0000 | [diff] [blame] | 9368 | case $ac_sys_system/$ac_sys_release in |
Neil Schemenauer | 4a7bbcb | 2001-02-16 03:37:54 +0000 | [diff] [blame] | 9369 | AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';; |
Guido van Rossum | ccaf3b6 | 1996-12-06 21:19:16 +0000 | [diff] [blame] | 9370 | hp*|HP*) |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 9371 | LINKFORSHARED="-Wl,-E -Wl,+s";; |
| 9372 | # LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; |
Guido van Rossum | f5957ea | 1999-10-05 21:59:33 +0000 | [diff] [blame] | 9373 | BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Xavier de Gaye | 2a352b6 | 2017-01-04 21:51:16 +0100 | [diff] [blame] | 9374 | Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; |
Martin v. Löwis | a6e9758 | 2002-01-01 18:41:33 +0000 | [diff] [blame] | 9375 | Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 9376 | # -u libsys_s pulls in all symbols in libsys |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9377 | Darwin/*) |
Benjamin Peterson | 9c80cac | 2009-05-23 16:34:23 +0000 | [diff] [blame] | 9378 | LINKFORSHARED="$extra_undefs -framework CoreFoundation" |
Łukasz Langa | 335ab5b | 2013-05-30 20:58:53 +0200 | [diff] [blame] | 9379 | |
| 9380 | # Issue #18075: the default maximum stack size (8MBytes) is too |
| 9381 | # small for the default recursion limit. Increase the stack size |
| 9382 | # to ensure that tests don't crash |
| 9383 | LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED" |
| 9384 | |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 9385 | if test "$enable_framework" |
| 9386 | then |
Jack Jansen | da49e19 | 2005-01-07 13:08:22 +0000 | [diff] [blame] | 9387 | LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 9388 | fi |
Anthony Baxter | eef2d3b | 2004-11-06 04:45:33 +0000 | [diff] [blame] | 9389 | LINKFORSHARED="$LINKFORSHARED";; |
Martin v. Löwis | 25ae43b | 2001-10-07 08:39:18 +0000 | [diff] [blame] | 9390 | OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";; |
Martin v. Löwis | 21ee409 | 2002-09-30 16:19:48 +0000 | [diff] [blame] | 9391 | SCO_SV*) LINKFORSHARED="-Wl,-Bexport";; |
Fred Drake | 02706f5 | 2000-09-25 15:08:46 +0000 | [diff] [blame] | 9392 | ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; |
Martin v. Löwis | 86d6626 | 2006-02-17 08:40:11 +0000 | [diff] [blame] | 9393 | FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) |
Guido van Rossum | df69365 | 1999-01-07 21:50:41 +0000 | [diff] [blame] | 9394 | if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ] |
| 9395 | then |
| 9396 | LINKFORSHARED="-Wl,--export-dynamic" |
| 9397 | fi;; |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 9398 | SunOS/5*) case $CC in |
| 9399 | *gcc*) |
Martin v. Löwis | a454857 | 2002-04-18 14:51:36 +0000 | [diff] [blame] | 9400 | if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null |
Guido van Rossum | 8f4ceb1 | 1997-12-18 23:42:19 +0000 | [diff] [blame] | 9401 | then |
| 9402 | LINKFORSHARED="-Xlinker --export-dynamic" |
Guido van Rossum | 2b5ca00 | 1998-03-05 15:41:09 +0000 | [diff] [blame] | 9403 | fi;; |
| 9404 | esac;; |
Jason Tishler | 3076559 | 2003-09-04 11:04:06 +0000 | [diff] [blame] | 9405 | CYGWIN*) |
| 9406 | if test $enable_shared = "no" |
| 9407 | then |
| 9408 | LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)' |
| 9409 | fi;; |
Benjamin Peterson | de9c869 | 2008-07-01 18:23:09 +0000 | [diff] [blame] | 9410 | QNX*) |
| 9411 | # -Wl,-E causes the symbols to be added to the dynamic |
| 9412 | # symbol table so that they can be found when a module |
| 9413 | # is loaded. -N 2048K causes the stack size to be set |
| 9414 | # to 2048 kilobytes so that the stack doesn't overflow |
| 9415 | # when running test_compile.py. |
| 9416 | LINKFORSHARED='-Wl,-E -N 2048K';; |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9417 | esac |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9418 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5 |
| 9420 | $as_echo "$LINKFORSHARED" >&6; } |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 9421 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 9422 | |
Benjamin Peterson | 8f95cc2 | 2008-07-16 02:23:25 +0000 | [diff] [blame] | 9423 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9424 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5 |
| 9425 | $as_echo_n "checking CFLAGSFORSHARED... " >&6; } |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 9426 | if test ! "$LIBRARY" = "$LDLIBRARY" |
| 9427 | then |
Neil Schemenauer | 0c6141f | 2001-01-27 21:40:54 +0000 | [diff] [blame] | 9428 | case $ac_sys_system in |
| 9429 | CYGWIN*) |
| 9430 | # Cygwin needs CCSHARED when building extension DLLs |
| 9431 | # but not when building the interpreter DLL. |
| 9432 | CFLAGSFORSHARED='';; |
| 9433 | *) |
| 9434 | CFLAGSFORSHARED='$(CCSHARED)' |
| 9435 | esac |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 9436 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9437 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5 |
| 9438 | $as_echo "$CFLAGSFORSHARED" >&6; } |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 9439 | |
Martin v. Löwis | f90ae20 | 2002-06-11 06:22:31 +0000 | [diff] [blame] | 9440 | # SHLIBS are libraries (except -lc and -lm) to link to the python shared |
| 9441 | # library (with --enable-shared). |
| 9442 | # 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] | 9443 | # symbols, this must be set to $(LIBS) (expanded by make). We do this even |
| 9444 | # if it is not required, since it creates a dependency of the shared library |
| 9445 | # to LIBS. This, in turn, means that applications linking the shared libpython |
| 9446 | # don't need to link LIBS explicitly. The default should be only changed |
| 9447 | # on systems where this approach causes problems. |
Martin v. Löwis | f90ae20 | 2002-06-11 06:22:31 +0000 | [diff] [blame] | 9448 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9449 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5 |
| 9450 | $as_echo_n "checking SHLIBS... " >&6; } |
Martin v. Löwis | f90ae20 | 2002-06-11 06:22:31 +0000 | [diff] [blame] | 9451 | case "$ac_sys_system" in |
Martin v. Löwis | f90ae20 | 2002-06-11 06:22:31 +0000 | [diff] [blame] | 9452 | *) |
Martin v. Löwis | d6359c5 | 2002-08-04 12:38:50 +0000 | [diff] [blame] | 9453 | SHLIBS='$(LIBS)';; |
Martin v. Löwis | f90ae20 | 2002-06-11 06:22:31 +0000 | [diff] [blame] | 9454 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9455 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5 |
| 9456 | $as_echo "$SHLIBS" >&6; } |
Martin v. Löwis | f90ae20 | 2002-06-11 06:22:31 +0000 | [diff] [blame] | 9457 | |
| 9458 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 9459 | # checks for libraries |
Georg Brandl | 941f956 | 2011-02-25 15:21:47 +0000 | [diff] [blame] | 9460 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5 |
| 9461 | $as_echo_n "checking for sendfile in -lsendfile... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9462 | if ${ac_cv_lib_sendfile_sendfile+:} false; then : |
Georg Brandl | 941f956 | 2011-02-25 15:21:47 +0000 | [diff] [blame] | 9463 | $as_echo_n "(cached) " >&6 |
| 9464 | else |
| 9465 | ac_check_lib_save_LIBS=$LIBS |
| 9466 | LIBS="-lsendfile $LIBS" |
| 9467 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9468 | /* end confdefs.h. */ |
| 9469 | |
| 9470 | /* Override any GCC internal prototype to avoid an error. |
| 9471 | Use char because int might match the return type of a GCC |
| 9472 | builtin and then its argument prototype would still apply. */ |
| 9473 | #ifdef __cplusplus |
| 9474 | extern "C" |
| 9475 | #endif |
| 9476 | char sendfile (); |
| 9477 | int |
| 9478 | main () |
| 9479 | { |
| 9480 | return sendfile (); |
| 9481 | ; |
| 9482 | return 0; |
| 9483 | } |
| 9484 | _ACEOF |
| 9485 | if ac_fn_c_try_link "$LINENO"; then : |
| 9486 | ac_cv_lib_sendfile_sendfile=yes |
| 9487 | else |
| 9488 | ac_cv_lib_sendfile_sendfile=no |
| 9489 | fi |
| 9490 | rm -f core conftest.err conftest.$ac_objext \ |
| 9491 | conftest$ac_exeext conftest.$ac_ext |
| 9492 | LIBS=$ac_check_lib_save_LIBS |
| 9493 | fi |
| 9494 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5 |
| 9495 | $as_echo "$ac_cv_lib_sendfile_sendfile" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9496 | if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then : |
Georg Brandl | 941f956 | 2011-02-25 15:21:47 +0000 | [diff] [blame] | 9497 | cat >>confdefs.h <<_ACEOF |
| 9498 | #define HAVE_LIBSENDFILE 1 |
| 9499 | _ACEOF |
| 9500 | |
| 9501 | LIBS="-lsendfile $LIBS" |
| 9502 | |
| 9503 | fi |
| 9504 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9505 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 |
| 9506 | $as_echo_n "checking for dlopen in -ldl... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9507 | if ${ac_cv_lib_dl_dlopen+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9508 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 9509 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9510 | ac_check_lib_save_LIBS=$LIBS |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 9511 | LIBS="-ldl $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9512 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 9513 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9514 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9515 | /* Override any GCC internal prototype to avoid an error. |
| 9516 | Use char because int might match the return type of a GCC |
| 9517 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9518 | #ifdef __cplusplus |
| 9519 | extern "C" |
| 9520 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9521 | char dlopen (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9522 | int |
| 9523 | main () |
| 9524 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9525 | return dlopen (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9526 | ; |
| 9527 | return 0; |
| 9528 | } |
| 9529 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9530 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9531 | ac_cv_lib_dl_dlopen=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 9532 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9533 | ac_cv_lib_dl_dlopen=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 9534 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9535 | rm -f core conftest.err conftest.$ac_objext \ |
| 9536 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9537 | LIBS=$ac_check_lib_save_LIBS |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 9538 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9539 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 |
| 9540 | $as_echo "$ac_cv_lib_dl_dlopen" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9541 | if test "x$ac_cv_lib_dl_dlopen" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9542 | cat >>confdefs.h <<_ACEOF |
| 9543 | #define HAVE_LIBDL 1 |
| 9544 | _ACEOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 9545 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 9546 | LIBS="-ldl $LIBS" |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 9547 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 9548 | fi |
| 9549 | # Dynamic linking for SunOS/Solaris and SYSV |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9550 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 |
| 9551 | $as_echo_n "checking for shl_load in -ldld... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9552 | if ${ac_cv_lib_dld_shl_load+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9553 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 9554 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9555 | ac_check_lib_save_LIBS=$LIBS |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 9556 | LIBS="-ldld $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9557 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 9558 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9559 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9560 | /* Override any GCC internal prototype to avoid an error. |
| 9561 | Use char because int might match the return type of a GCC |
| 9562 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9563 | #ifdef __cplusplus |
| 9564 | extern "C" |
| 9565 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9566 | char shl_load (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9567 | int |
| 9568 | main () |
| 9569 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9570 | return shl_load (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9571 | ; |
| 9572 | return 0; |
| 9573 | } |
| 9574 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9575 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9576 | ac_cv_lib_dld_shl_load=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 9577 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9578 | ac_cv_lib_dld_shl_load=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 9579 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9580 | rm -f core conftest.err conftest.$ac_objext \ |
| 9581 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9582 | LIBS=$ac_check_lib_save_LIBS |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 9583 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9584 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 |
| 9585 | $as_echo "$ac_cv_lib_dld_shl_load" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9586 | 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] | 9587 | cat >>confdefs.h <<_ACEOF |
| 9588 | #define HAVE_LIBDLD 1 |
| 9589 | _ACEOF |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 9590 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 9591 | LIBS="-ldld $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 9592 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 9593 | fi |
| 9594 | # Dynamic linking for HP-UX |
Martin v. Löwis | 519adae | 2003-09-20 10:47:47 +0000 | [diff] [blame] | 9595 | |
Georg Brandl | b1441c7 | 2009-01-03 22:33:39 +0000 | [diff] [blame] | 9596 | # only check for sem_init if thread support is requested |
Martin v. Löwis | 519adae | 2003-09-20 10:47:47 +0000 | [diff] [blame] | 9597 | if test "$with_threads" = "yes" -o -z "$with_threads"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9598 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5 |
| 9599 | $as_echo_n "checking for library containing sem_init... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9600 | if ${ac_cv_search_sem_init+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9601 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 41933dd | 2002-03-21 15:10:58 +0000 | [diff] [blame] | 9602 | else |
Martin v. Löwis | 82c19a7 | 2002-10-06 11:48:09 +0000 | [diff] [blame] | 9603 | ac_func_search_save_LIBS=$LIBS |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9604 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 9605 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9606 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9607 | /* Override any GCC internal prototype to avoid an error. |
| 9608 | Use char because int might match the return type of a GCC |
| 9609 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9610 | #ifdef __cplusplus |
| 9611 | extern "C" |
| 9612 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9613 | char sem_init (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9614 | int |
| 9615 | main () |
| 9616 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9617 | return sem_init (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9618 | ; |
| 9619 | return 0; |
| 9620 | } |
| 9621 | _ACEOF |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9622 | for ac_lib in '' pthread rt posix4; do |
| 9623 | if test -z "$ac_lib"; then |
| 9624 | ac_res="none required" |
| 9625 | else |
| 9626 | ac_res=-l$ac_lib |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 9627 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9628 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9629 | if ac_fn_c_try_link "$LINENO"; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9630 | ac_cv_search_sem_init=$ac_res |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 9631 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9632 | rm -f core conftest.err conftest.$ac_objext \ |
| 9633 | conftest$ac_exeext |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9634 | if ${ac_cv_search_sem_init+:} false; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9635 | break |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 9636 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9637 | done |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9638 | if ${ac_cv_search_sem_init+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9639 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9640 | else |
| 9641 | ac_cv_search_sem_init=no |
| 9642 | fi |
| 9643 | rm conftest.$ac_ext |
Martin v. Löwis | 82c19a7 | 2002-10-06 11:48:09 +0000 | [diff] [blame] | 9644 | LIBS=$ac_func_search_save_LIBS |
| 9645 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9646 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5 |
| 9647 | $as_echo "$ac_cv_search_sem_init" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9648 | ac_res=$ac_cv_search_sem_init |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9649 | if test "$ac_res" != no; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9650 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
Martin v. Löwis | 41933dd | 2002-03-21 15:10:58 +0000 | [diff] [blame] | 9651 | |
Martin v. Löwis | 41933dd | 2002-03-21 15:10:58 +0000 | [diff] [blame] | 9652 | fi |
Martin v. Löwis | d3545ec | 2003-05-03 11:25:43 +0000 | [diff] [blame] | 9653 | # 'Real Time' functions on Solaris |
Martin v. Löwis | 519adae | 2003-09-20 10:47:47 +0000 | [diff] [blame] | 9654 | # posix4 on Solaris 2.6 |
| 9655 | # pthread (first!) on Linux |
| 9656 | fi |
| 9657 | |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9658 | # check if we need libintl for locale functions |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9659 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5 |
| 9660 | $as_echo_n "checking for textdomain in -lintl... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9661 | if ${ac_cv_lib_intl_textdomain+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9662 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9663 | else |
| 9664 | ac_check_lib_save_LIBS=$LIBS |
| 9665 | LIBS="-lintl $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9666 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 9667 | /* end confdefs.h. */ |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9668 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 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. */ |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9672 | #ifdef __cplusplus |
| 9673 | extern "C" |
| 9674 | #endif |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9675 | char textdomain (); |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9676 | int |
| 9677 | main () |
| 9678 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9679 | return textdomain (); |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9680 | ; |
| 9681 | return 0; |
| 9682 | } |
| 9683 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9684 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9685 | ac_cv_lib_intl_textdomain=yes |
| 9686 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9687 | ac_cv_lib_intl_textdomain=no |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9688 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9689 | rm -f core conftest.err conftest.$ac_objext \ |
| 9690 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9691 | LIBS=$ac_check_lib_save_LIBS |
| 9692 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9693 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5 |
| 9694 | $as_echo "$ac_cv_lib_intl_textdomain" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9695 | if test "x$ac_cv_lib_intl_textdomain" = xyes; then : |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9696 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9697 | $as_echo "#define WITH_LIBINTL 1" >>confdefs.h |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9698 | |
Brett Cannon | c6d936e | 2009-06-07 20:09:53 +0000 | [diff] [blame] | 9699 | LIBS="-lintl $LIBS" |
Martin v. Löwis | 19d1734 | 2003-06-14 21:03:05 +0000 | [diff] [blame] | 9700 | fi |
| 9701 | |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 9702 | |
| 9703 | # checks for system dependent C++ extensions support |
| 9704 | case "$ac_sys_system" in |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9705 | AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5 |
| 9706 | $as_echo_n "checking for genuine AIX C++ extensions support... " >&6; } |
| 9707 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 9708 | /* end confdefs.h. */ |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 9709 | |
Georg Brandl | 59e87bd | 2011-02-15 19:48:59 +0000 | [diff] [blame] | 9710 | #include <load.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9711 | int |
| 9712 | main () |
| 9713 | { |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 9714 | loadAndInit("", 0, "") |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9715 | ; |
| 9716 | return 0; |
| 9717 | } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 9718 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9719 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9720 | if ac_fn_c_try_link "$LINENO"; then : |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 9721 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 9722 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9723 | $as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9724 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 9725 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9726 | $as_echo "yes" >&6; } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 9727 | |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 9728 | else |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 9729 | |
| 9730 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9731 | $as_echo "no" >&6; } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 9732 | |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +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;; |
Guido van Rossum | 0eefa3f | 1999-11-16 15:57:37 +0000 | [diff] [blame] | 9736 | *) ;; |
| 9737 | esac |
| 9738 | |
Christian Heimes | 985ecdc | 2013-11-20 11:46:18 +0100 | [diff] [blame] | 9739 | # check for systems that require aligned memory access |
| 9740 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5 |
| 9741 | $as_echo_n "checking aligned memory access is required... " >&6; } |
Benjamin Peterson | e4f961b | 2017-04-14 09:36:45 -0700 | [diff] [blame] | 9742 | if ${ac_cv_aligned_required+:} false; then : |
| 9743 | $as_echo_n "(cached) " >&6 |
| 9744 | else |
| 9745 | if test "$cross_compiling" = yes; then : |
| 9746 | ac_cv_aligned_required=yes |
Christian Heimes | 985ecdc | 2013-11-20 11:46:18 +0100 | [diff] [blame] | 9747 | else |
| 9748 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9749 | /* end confdefs.h. */ |
| 9750 | |
| 9751 | int main() |
| 9752 | { |
| 9753 | char s[16]; |
| 9754 | int i, *p1, *p2; |
| 9755 | for (i=0; i < 16; i++) |
| 9756 | s[i] = i; |
| 9757 | p1 = (int*)(s+1); |
| 9758 | p2 = (int*)(s+2); |
| 9759 | if (*p1 == *p2) |
| 9760 | return 1; |
| 9761 | return 0; |
| 9762 | } |
Christian Heimes | 985ecdc | 2013-11-20 11:46:18 +0100 | [diff] [blame] | 9763 | _ACEOF |
| 9764 | if ac_fn_c_try_run "$LINENO"; then : |
Benjamin Peterson | e4f961b | 2017-04-14 09:36:45 -0700 | [diff] [blame] | 9765 | ac_cv_aligned_required=no |
Christian Heimes | 985ecdc | 2013-11-20 11:46:18 +0100 | [diff] [blame] | 9766 | else |
Benjamin Peterson | e4f961b | 2017-04-14 09:36:45 -0700 | [diff] [blame] | 9767 | ac_cv_aligned_required=yes |
Christian Heimes | 985ecdc | 2013-11-20 11:46:18 +0100 | [diff] [blame] | 9768 | fi |
| 9769 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 9770 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 9771 | fi |
| 9772 | |
| 9773 | |
Benjamin Peterson | e4f961b | 2017-04-14 09:36:45 -0700 | [diff] [blame] | 9774 | fi |
| 9775 | |
| 9776 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5 |
| 9777 | $as_echo "$ac_cv_aligned_required" >&6; } |
| 9778 | if test "$ac_cv_aligned_required" = yes ; then |
Christian Heimes | 985ecdc | 2013-11-20 11:46:18 +0100 | [diff] [blame] | 9779 | |
| 9780 | $as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h |
| 9781 | |
| 9782 | fi |
Christian Heimes | 985ecdc | 2013-11-20 11:46:18 +0100 | [diff] [blame] | 9783 | |
| 9784 | # str, bytes and memoryview hash algorithm |
| 9785 | |
| 9786 | |
| 9787 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5 |
| 9788 | $as_echo_n "checking for --with-hash-algorithm... " >&6; } |
| 9789 | |
| 9790 | # Check whether --with-hash_algorithm was given. |
| 9791 | if test "${with_hash_algorithm+set}" = set; then : |
| 9792 | withval=$with_hash_algorithm; |
| 9793 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 |
| 9794 | $as_echo "$withval" >&6; } |
| 9795 | case "$withval" in |
| 9796 | siphash24) |
| 9797 | $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h |
| 9798 | |
| 9799 | ;; |
| 9800 | fnv) |
| 9801 | $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h |
| 9802 | |
| 9803 | ;; |
| 9804 | *) |
| 9805 | as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5 |
| 9806 | ;; |
| 9807 | esac |
| 9808 | |
| 9809 | else |
| 9810 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5 |
| 9811 | $as_echo "default" >&6; } |
| 9812 | fi |
| 9813 | |
| 9814 | |
Charles-François Natali | d30b022 | 2014-05-08 23:08:51 +0100 | [diff] [blame] | 9815 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5 |
| 9816 | $as_echo_n "checking for --with-address-sanitizer... " >&6; } |
| 9817 | |
| 9818 | # Check whether --with-address_sanitizer was given. |
| 9819 | if test "${with_address_sanitizer+set}" = set; then : |
| 9820 | withval=$with_address_sanitizer; |
| 9821 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 |
| 9822 | $as_echo "$withval" >&6; } |
| 9823 | BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS" |
| 9824 | LDFLAGS="-fsanitize=address $LDFLAGS" |
| 9825 | |
| 9826 | else |
| 9827 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9828 | $as_echo "no" >&6; } |
| 9829 | fi |
| 9830 | |
| 9831 | |
Guido van Rossum | 70c7f48 | 1998-03-26 18:44:10 +0000 | [diff] [blame] | 9832 | # Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9833 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5 |
| 9834 | $as_echo_n "checking for t_open in -lnsl... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9835 | if ${ac_cv_lib_nsl_t_open+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9836 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 9837 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9838 | ac_check_lib_save_LIBS=$LIBS |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 9839 | LIBS="-lnsl $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9840 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 9841 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9842 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9843 | /* Override any GCC internal prototype to avoid an error. |
| 9844 | Use char because int might match the return type of a GCC |
| 9845 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9846 | #ifdef __cplusplus |
| 9847 | extern "C" |
| 9848 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9849 | char t_open (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9850 | int |
| 9851 | main () |
| 9852 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9853 | return t_open (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9854 | ; |
| 9855 | return 0; |
| 9856 | } |
| 9857 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9858 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9859 | ac_cv_lib_nsl_t_open=yes |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 9860 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9861 | ac_cv_lib_nsl_t_open=no |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 9862 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9863 | rm -f core conftest.err conftest.$ac_objext \ |
| 9864 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9865 | LIBS=$ac_check_lib_save_LIBS |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 9866 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9867 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5 |
| 9868 | $as_echo "$ac_cv_lib_nsl_t_open" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9869 | if test "x$ac_cv_lib_nsl_t_open" = xyes; then : |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 9870 | LIBS="-lnsl $LIBS" |
Guido van Rossum | 79dddcb | 1995-01-12 12:25:42 +0000 | [diff] [blame] | 9871 | fi |
Guido van Rossum | 0ddb028 | 1995-01-17 16:46:14 +0000 | [diff] [blame] | 9872 | # SVR4 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9873 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 |
| 9874 | $as_echo_n "checking for socket in -lsocket... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9875 | if ${ac_cv_lib_socket_socket+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9876 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 9877 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9878 | ac_check_lib_save_LIBS=$LIBS |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 9879 | LIBS="-lsocket $LIBS $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9880 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 9881 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9882 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9883 | /* Override any GCC internal prototype to avoid an error. |
| 9884 | Use char because int might match the return type of a GCC |
| 9885 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9886 | #ifdef __cplusplus |
| 9887 | extern "C" |
| 9888 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9889 | char socket (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9890 | int |
| 9891 | main () |
| 9892 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9893 | return socket (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9894 | ; |
| 9895 | return 0; |
| 9896 | } |
| 9897 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9898 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9899 | ac_cv_lib_socket_socket=yes |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 9900 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9901 | ac_cv_lib_socket_socket=no |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 9902 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9903 | rm -f core conftest.err conftest.$ac_objext \ |
| 9904 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9905 | LIBS=$ac_check_lib_save_LIBS |
Guido van Rossum | ec95c7b | 1998-08-04 17:59:56 +0000 | [diff] [blame] | 9906 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9907 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 |
| 9908 | $as_echo "$ac_cv_lib_socket_socket" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 9909 | if test "x$ac_cv_lib_socket_socket" = xyes; then : |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 9910 | LIBS="-lsocket $LIBS" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 9911 | fi |
| 9912 | # SVR4 sockets |
Skip Montanaro | b9949db | 2004-01-17 04:04:13 +0000 | [diff] [blame] | 9913 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9914 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5 |
| 9915 | $as_echo_n "checking for --with-libs... " >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 9916 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9917 | # Check whether --with-libs was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9918 | if test "${with_libs+set}" = set; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9919 | withval=$with_libs; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9920 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5 |
| 9921 | $as_echo "$withval" >&6; } |
Guido van Rossum | a68acba | 1996-07-31 17:36:39 +0000 | [diff] [blame] | 9922 | LIBS="$withval $LIBS" |
| 9923 | |
| 9924 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 9925 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9926 | $as_echo "no" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 9927 | fi |
| 9928 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 9929 | |
Victor Stinner | 8291b5e | 2015-03-20 16:03:14 +0100 | [diff] [blame] | 9930 | |
| 9931 | |
| 9932 | |
| 9933 | |
| 9934 | |
| 9935 | |
| 9936 | |
| 9937 | if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then |
| 9938 | if test -n "$ac_tool_prefix"; then |
| 9939 | # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. |
| 9940 | set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 |
| 9941 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 9942 | $as_echo_n "checking for $ac_word... " >&6; } |
| 9943 | if ${ac_cv_path_PKG_CONFIG+:} false; then : |
| 9944 | $as_echo_n "(cached) " >&6 |
| 9945 | else |
| 9946 | case $PKG_CONFIG in |
| 9947 | [\\/]* | ?:[\\/]*) |
| 9948 | ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. |
| 9949 | ;; |
| 9950 | *) |
| 9951 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 9952 | for as_dir in $PATH |
| 9953 | do |
| 9954 | IFS=$as_save_IFS |
| 9955 | test -z "$as_dir" && as_dir=. |
| 9956 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 9957 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 9958 | ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" |
| 9959 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 9960 | break 2 |
| 9961 | fi |
| 9962 | done |
| 9963 | done |
| 9964 | IFS=$as_save_IFS |
| 9965 | |
| 9966 | ;; |
| 9967 | esac |
| 9968 | fi |
| 9969 | PKG_CONFIG=$ac_cv_path_PKG_CONFIG |
| 9970 | if test -n "$PKG_CONFIG"; then |
| 9971 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 |
| 9972 | $as_echo "$PKG_CONFIG" >&6; } |
| 9973 | else |
| 9974 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9975 | $as_echo "no" >&6; } |
| 9976 | fi |
| 9977 | |
| 9978 | |
| 9979 | fi |
| 9980 | if test -z "$ac_cv_path_PKG_CONFIG"; then |
| 9981 | ac_pt_PKG_CONFIG=$PKG_CONFIG |
| 9982 | # Extract the first word of "pkg-config", so it can be a program name with args. |
| 9983 | set dummy pkg-config; ac_word=$2 |
| 9984 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 9985 | $as_echo_n "checking for $ac_word... " >&6; } |
| 9986 | if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : |
| 9987 | $as_echo_n "(cached) " >&6 |
| 9988 | else |
| 9989 | case $ac_pt_PKG_CONFIG in |
| 9990 | [\\/]* | ?:[\\/]*) |
| 9991 | ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. |
| 9992 | ;; |
| 9993 | *) |
| 9994 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 9995 | for as_dir in $PATH |
| 9996 | do |
| 9997 | IFS=$as_save_IFS |
| 9998 | test -z "$as_dir" && as_dir=. |
| 9999 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 10000 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 10001 | ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" |
| 10002 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 10003 | break 2 |
| 10004 | fi |
| 10005 | done |
| 10006 | done |
| 10007 | IFS=$as_save_IFS |
| 10008 | |
| 10009 | ;; |
| 10010 | esac |
| 10011 | fi |
| 10012 | ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG |
| 10013 | if test -n "$ac_pt_PKG_CONFIG"; then |
| 10014 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 |
| 10015 | $as_echo "$ac_pt_PKG_CONFIG" >&6; } |
| 10016 | else |
| 10017 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 10018 | $as_echo "no" >&6; } |
| 10019 | fi |
| 10020 | |
| 10021 | if test "x$ac_pt_PKG_CONFIG" = x; then |
| 10022 | PKG_CONFIG="" |
| 10023 | else |
| 10024 | case $cross_compiling:$ac_tool_warned in |
| 10025 | yes:) |
| 10026 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 10027 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 10028 | ac_tool_warned=yes ;; |
| 10029 | esac |
| 10030 | PKG_CONFIG=$ac_pt_PKG_CONFIG |
| 10031 | fi |
| 10032 | else |
| 10033 | PKG_CONFIG="$ac_cv_path_PKG_CONFIG" |
| 10034 | fi |
| 10035 | |
| 10036 | fi |
| 10037 | if test -n "$PKG_CONFIG"; then |
| 10038 | _pkg_min_version=0.9.0 |
| 10039 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 |
| 10040 | $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } |
| 10041 | if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then |
| 10042 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 10043 | $as_echo "yes" >&6; } |
| 10044 | else |
| 10045 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 10046 | $as_echo "no" >&6; } |
| 10047 | PKG_CONFIG="" |
| 10048 | fi |
| 10049 | fi |
Benjamin Peterson | 0f64b0b | 2010-03-09 21:49:52 +0000 | [diff] [blame] | 10050 | |
| 10051 | # Check for use of the system expat library |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10052 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5 |
| 10053 | $as_echo_n "checking for --with-system-expat... " >&6; } |
Benjamin Peterson | 0f64b0b | 2010-03-09 21:49:52 +0000 | [diff] [blame] | 10054 | |
| 10055 | # Check whether --with-system_expat was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10056 | if test "${with_system_expat+set}" = set; then : |
Benjamin Peterson | 0f64b0b | 2010-03-09 21:49:52 +0000 | [diff] [blame] | 10057 | withval=$with_system_expat; |
Benjamin Peterson | 7926325 | 2010-10-31 16:50:44 +0000 | [diff] [blame] | 10058 | else |
| 10059 | with_system_expat="no" |
Benjamin Peterson | 0f64b0b | 2010-03-09 21:49:52 +0000 | [diff] [blame] | 10060 | fi |
| 10061 | |
| 10062 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10063 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5 |
| 10064 | $as_echo "$with_system_expat" >&6; } |
Benjamin Peterson | 0f64b0b | 2010-03-09 21:49:52 +0000 | [diff] [blame] | 10065 | |
| 10066 | # Check for use of the system libffi library |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10067 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5 |
| 10068 | $as_echo_n "checking for --with-system-ffi... " >&6; } |
Benjamin Peterson | 0f64b0b | 2010-03-09 21:49:52 +0000 | [diff] [blame] | 10069 | |
| 10070 | # Check whether --with-system_ffi was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10071 | if test "${with_system_ffi+set}" = set; then : |
Benjamin Peterson | 0f64b0b | 2010-03-09 21:49:52 +0000 | [diff] [blame] | 10072 | withval=$with_system_ffi; |
| 10073 | fi |
| 10074 | |
| 10075 | |
Zachary Ware | f40d4dd | 2016-09-17 01:25:24 -0500 | [diff] [blame] | 10076 | if test "$ac_sys_system" = "Darwin" |
| 10077 | then |
| 10078 | case "$with_system_ffi" in |
| 10079 | "") |
| 10080 | with_system_ffi="no" |
| 10081 | ;; |
| 10082 | yes|no) |
| 10083 | ;; |
| 10084 | *) |
| 10085 | as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5 |
| 10086 | ;; |
| 10087 | esac |
| 10088 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5 |
| 10089 | $as_echo "$with_system_ffi" >&6; } |
| 10090 | else |
| 10091 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 10092 | $as_echo "yes" >&6; } |
| 10093 | if test "$with_system_ffi" != "" |
| 10094 | then |
| 10095 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5 |
| 10096 | $as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;} |
| 10097 | fi |
| 10098 | with_system_ffi="yes" |
| 10099 | fi |
Zachary Ware | 935043d | 2016-09-09 17:01:21 -0700 | [diff] [blame] | 10100 | |
Benjamin Peterson | 0f64b0b | 2010-03-09 21:49:52 +0000 | [diff] [blame] | 10101 | if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then |
Benjamin Peterson | d78735d | 2010-01-01 16:04:23 +0000 | [diff] [blame] | 10102 | LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`" |
| 10103 | else |
| 10104 | LIBFFI_INCLUDEDIR="" |
| 10105 | fi |
| 10106 | |
| 10107 | |
Stefan Krah | 60187b5 | 2012-03-23 19:06:27 +0100 | [diff] [blame] | 10108 | # Check for use of the system libmpdec library |
| 10109 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5 |
| 10110 | $as_echo_n "checking for --with-system-libmpdec... " >&6; } |
| 10111 | |
| 10112 | # Check whether --with-system_libmpdec was given. |
| 10113 | if test "${with_system_libmpdec+set}" = set; then : |
| 10114 | withval=$with_system_libmpdec; |
| 10115 | else |
| 10116 | with_system_libmpdec="no" |
| 10117 | fi |
| 10118 | |
| 10119 | |
| 10120 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5 |
| 10121 | $as_echo "$with_system_libmpdec" >&6; } |
| 10122 | |
Benjamin Peterson | 076ed00 | 2010-10-31 17:11:02 +0000 | [diff] [blame] | 10123 | # Check for support for loadable sqlite extensions |
| 10124 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5 |
| 10125 | $as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; } |
| 10126 | # Check whether --enable-loadable-sqlite-extensions was given. |
| 10127 | if test "${enable_loadable_sqlite_extensions+set}" = set; then : |
| 10128 | enableval=$enable_loadable_sqlite_extensions; |
| 10129 | else |
| 10130 | enable_loadable_sqlite_extensions="no" |
| 10131 | fi |
| 10132 | |
| 10133 | |
| 10134 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5 |
| 10135 | $as_echo "$enable_loadable_sqlite_extensions" >&6; } |
| 10136 | |
Ned Deily | d819b93 | 2013-09-06 01:07:05 -0700 | [diff] [blame] | 10137 | # Check for --with-tcltk-includes=path and --with-tcltk-libs=path |
| 10138 | |
| 10139 | |
| 10140 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5 |
| 10141 | $as_echo_n "checking for --with-tcltk-includes... " >&6; } |
| 10142 | |
| 10143 | # Check whether --with-tcltk-includes was given. |
| 10144 | if test "${with_tcltk_includes+set}" = set; then : |
| 10145 | withval=$with_tcltk_includes; |
| 10146 | else |
| 10147 | with_tcltk_includes="default" |
| 10148 | fi |
| 10149 | |
| 10150 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5 |
| 10151 | $as_echo "$with_tcltk_includes" >&6; } |
| 10152 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5 |
| 10153 | $as_echo_n "checking for --with-tcltk-libs... " >&6; } |
| 10154 | |
| 10155 | # Check whether --with-tcltk-libs was given. |
| 10156 | if test "${with_tcltk_libs+set}" = set; then : |
| 10157 | withval=$with_tcltk_libs; |
| 10158 | else |
| 10159 | with_tcltk_libs="default" |
| 10160 | fi |
| 10161 | |
| 10162 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5 |
| 10163 | $as_echo "$with_tcltk_libs" >&6; } |
| 10164 | if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault |
| 10165 | then |
| 10166 | if test "x$with_tcltk_includes" != "x$with_tcltk_libs" |
| 10167 | then |
| 10168 | as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5 |
| 10169 | fi |
| 10170 | TCLTK_INCLUDES="" |
| 10171 | TCLTK_LIBS="" |
| 10172 | else |
| 10173 | TCLTK_INCLUDES="$with_tcltk_includes" |
| 10174 | TCLTK_LIBS="$with_tcltk_libs" |
| 10175 | fi |
| 10176 | |
Matthias Klose | 55708cc | 2009-04-30 08:06:49 +0000 | [diff] [blame] | 10177 | # Check for --with-dbmliborder |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10178 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5 |
| 10179 | $as_echo_n "checking for --with-dbmliborder... " >&6; } |
Matthias Klose | 55708cc | 2009-04-30 08:06:49 +0000 | [diff] [blame] | 10180 | |
| 10181 | # Check whether --with-dbmliborder was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10182 | if test "${with_dbmliborder+set}" = set; then : |
Matthias Klose | 55708cc | 2009-04-30 08:06:49 +0000 | [diff] [blame] | 10183 | withval=$with_dbmliborder; |
| 10184 | if test x$with_dbmliborder = xyes |
| 10185 | then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 10186 | as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5 |
Matthias Klose | 55708cc | 2009-04-30 08:06:49 +0000 | [diff] [blame] | 10187 | else |
| 10188 | for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do |
| 10189 | if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb |
| 10190 | then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 10191 | as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5 |
Matthias Klose | 55708cc | 2009-04-30 08:06:49 +0000 | [diff] [blame] | 10192 | fi |
| 10193 | done |
| 10194 | fi |
| 10195 | fi |
| 10196 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10197 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5 |
| 10198 | $as_echo "$with_dbmliborder" >&6; } |
Matthias Klose | 55708cc | 2009-04-30 08:06:49 +0000 | [diff] [blame] | 10199 | |
Guido van Rossum | 3d15bd8 | 2001-01-10 18:53:48 +0000 | [diff] [blame] | 10200 | # This is used to generate Setup.config |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 10201 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 10202 | USE_THREAD_MODULE="" |
Guido van Rossum | 009f787 | 1997-12-04 00:51:42 +0000 | [diff] [blame] | 10203 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10204 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10205 | |
| 10206 | # Templates for things AC_DEFINEd more than once. |
| 10207 | # For a single AC_DEFINE, no template is needed. |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 10208 | |
| 10209 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10210 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10211 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5 |
| 10212 | $as_echo_n "checking for --with-threads... " >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10213 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10214 | # Check whether --with-threads was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10215 | if test "${with_threads+set}" = set; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10216 | withval=$with_threads; |
| 10217 | fi |
Guido van Rossum | ec2f073 | 1997-01-22 20:54:01 +0000 | [diff] [blame] | 10218 | |
| 10219 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 10220 | # --with-thread is deprecated, but check for it anyway |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10221 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10222 | # Check whether --with-thread was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10223 | if test "${with_thread+set}" = set; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10224 | withval=$with_thread; with_threads=$with_thread |
| 10225 | fi |
| 10226 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 10227 | |
| 10228 | if test -z "$with_threads" |
| 10229 | then with_threads="yes" |
| 10230 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10231 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5 |
| 10232 | $as_echo "$with_threads" >&6; } |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 10233 | |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 10234 | |
Barry Warsaw | c0d24d8b | 2000-06-29 16:12:00 +0000 | [diff] [blame] | 10235 | if test "$with_threads" = "no" |
| 10236 | then |
| 10237 | USE_THREAD_MODULE="#" |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 10238 | elif test "$ac_cv_pthread_is_default" = yes |
| 10239 | then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10240 | $as_echo "#define WITH_THREAD 1" >>confdefs.h |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 10241 | |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 10242 | # Defining _REENTRANT on system with POSIX threads should not hurt. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10243 | $as_echo "#define _REENTRANT 1" >>confdefs.h |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 10244 | |
| 10245 | posix_threads=yes |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10246 | THREADOBJ="Python/thread.o" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 10247 | elif test "$ac_cv_kpthread" = "yes" |
| 10248 | then |
| 10249 | CC="$CC -Kpthread" |
Martin v. Löwis | 519adae | 2003-09-20 10:47:47 +0000 | [diff] [blame] | 10250 | if test "$ac_cv_cxx_thread" = "yes"; then |
| 10251 | CXX="$CXX -Kpthread" |
| 10252 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10253 | $as_echo "#define WITH_THREAD 1" >>confdefs.h |
Guido van Rossum | 2242f2f | 2001-04-11 20:58:20 +0000 | [diff] [blame] | 10254 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 10255 | posix_threads=yes |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 10256 | THREADOBJ="Python/thread.o" |
Martin v. Löwis | 5f433f0 | 2003-05-05 05:05:30 +0000 | [diff] [blame] | 10257 | elif test "$ac_cv_kthread" = "yes" |
| 10258 | then |
| 10259 | CC="$CC -Kthread" |
Martin v. Löwis | 519adae | 2003-09-20 10:47:47 +0000 | [diff] [blame] | 10260 | if test "$ac_cv_cxx_thread" = "yes"; then |
| 10261 | CXX="$CXX -Kthread" |
| 10262 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10263 | $as_echo "#define WITH_THREAD 1" >>confdefs.h |
Martin v. Löwis | 5f433f0 | 2003-05-05 05:05:30 +0000 | [diff] [blame] | 10264 | |
| 10265 | posix_threads=yes |
| 10266 | THREADOBJ="Python/thread.o" |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10267 | elif test "$ac_cv_pthread" = "yes" |
| 10268 | then |
| 10269 | CC="$CC -pthread" |
Martin v. Löwis | 519adae | 2003-09-20 10:47:47 +0000 | [diff] [blame] | 10270 | if test "$ac_cv_cxx_thread" = "yes"; then |
| 10271 | CXX="$CXX -pthread" |
| 10272 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10273 | $as_echo "#define WITH_THREAD 1" >>confdefs.h |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10274 | |
| 10275 | posix_threads=yes |
| 10276 | THREADOBJ="Python/thread.o" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 10277 | else |
| 10278 | if test ! -z "$with_threads" -a -d "$with_threads" |
| 10279 | then LDFLAGS="$LDFLAGS -L$with_threads" |
| 10280 | fi |
| 10281 | if test ! -z "$withval" -a -d "$withval" |
| 10282 | then LDFLAGS="$LDFLAGS -L$withval" |
| 10283 | fi |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 10284 | |
| 10285 | # According to the POSIX spec, a pthreads implementation must |
Matthias Klose | a2542be | 2004-08-16 11:35:51 +0000 | [diff] [blame] | 10286 | # define _POSIX_THREADS in unistd.h. Some apparently don't |
| 10287 | # (e.g. gnu pth with pthread emulation) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10288 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5 |
| 10289 | $as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; } |
| 10290 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10291 | /* end confdefs.h. */ |
Neal Norwitz | 6eb37f0 | 2003-02-23 23:28:15 +0000 | [diff] [blame] | 10292 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 10293 | #include <unistd.h> |
Neal Norwitz | 6eb37f0 | 2003-02-23 23:28:15 +0000 | [diff] [blame] | 10294 | #ifdef _POSIX_THREADS |
| 10295 | yes |
| 10296 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10297 | |
| 10298 | _ACEOF |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 10299 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10300 | $EGREP "yes" >/dev/null 2>&1; then : |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 10301 | unistd_defines_pthreads=yes |
| 10302 | else |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 10303 | unistd_defines_pthreads=no |
| 10304 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 10305 | rm -f conftest* |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 10306 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10307 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5 |
| 10308 | $as_echo "$unistd_defines_pthreads" >&6; } |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 10309 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10310 | $as_echo "#define _REENTRANT 1" >>confdefs.h |
Guido van Rossum | 9caf77a | 1996-08-01 00:52:26 +0000 | [diff] [blame] | 10311 | |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 10312 | # Just looking for pthread_create in libpthread is not enough: |
| 10313 | # on HP/UX, pthread.h renames pthread_create to a different symbol name. |
| 10314 | # So we really have to include pthread.h, and then link. |
| 10315 | _libs=$LIBS |
| 10316 | LIBS="$LIBS -lpthread" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10317 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 |
| 10318 | $as_echo_n "checking for pthread_create in -lpthread... " >&6; } |
| 10319 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10320 | /* end confdefs.h. */ |
Stefan Krah | 7dba594 | 2012-11-22 22:49:11 +0100 | [diff] [blame] | 10321 | |
| 10322 | #include <stdio.h> |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 10323 | #include <pthread.h> |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 10324 | |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 10325 | void * start_routine (void *arg) { exit (0); } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10326 | int |
| 10327 | main () |
| 10328 | { |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 10329 | |
| 10330 | pthread_create (NULL, NULL, start_routine, NULL) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10331 | ; |
| 10332 | return 0; |
| 10333 | } |
| 10334 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10335 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10336 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10337 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 10338 | $as_echo "yes" >&6; } |
| 10339 | $as_echo "#define WITH_THREAD 1" >>confdefs.h |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 10340 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 10341 | posix_threads=yes |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 10342 | THREADOBJ="Python/thread.o" |
Guido van Rossum | 02a1c40 | 2000-02-25 19:26:31 +0000 | [diff] [blame] | 10343 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10344 | |
Martin v. Löwis | 8158b5a | 2001-10-08 13:17:28 +0000 | [diff] [blame] | 10345 | LIBS=$_libs |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10346 | 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] | 10347 | if test "x$ac_cv_func_pthread_detach" = xyes; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10348 | $as_echo "#define WITH_THREAD 1" >>confdefs.h |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 10349 | |
Martin v. Löwis | 69c0ff3 | 2001-10-15 14:34:42 +0000 | [diff] [blame] | 10350 | posix_threads=yes |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 10351 | THREADOBJ="Python/thread.o" |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 10352 | else |
Guido van Rossum | ad678af | 1998-10-02 14:42:15 +0000 | [diff] [blame] | 10353 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10354 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5 |
| 10355 | $as_echo_n "checking for pthread_create in -lpthreads... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10356 | if ${ac_cv_lib_pthreads_pthread_create+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10357 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 10358 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10359 | ac_check_lib_save_LIBS=$LIBS |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 10360 | LIBS="-lpthreads $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10361 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10362 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10363 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10364 | /* Override any GCC internal prototype to avoid an error. |
| 10365 | Use char because int might match the return type of a GCC |
| 10366 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10367 | #ifdef __cplusplus |
| 10368 | extern "C" |
| 10369 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10370 | char pthread_create (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10371 | int |
| 10372 | main () |
| 10373 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10374 | return pthread_create (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10375 | ; |
| 10376 | return 0; |
| 10377 | } |
| 10378 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10379 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10380 | ac_cv_lib_pthreads_pthread_create=yes |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 10381 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10382 | ac_cv_lib_pthreads_pthread_create=no |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 10383 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10384 | rm -f core conftest.err conftest.$ac_objext \ |
| 10385 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10386 | LIBS=$ac_check_lib_save_LIBS |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 10387 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10388 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5 |
| 10389 | $as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10390 | if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10391 | $as_echo "#define WITH_THREAD 1" >>confdefs.h |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 10392 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 10393 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 10394 | LIBS="$LIBS -lpthreads" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 10395 | THREADOBJ="Python/thread.o" |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 10396 | else |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 10397 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10398 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5 |
| 10399 | $as_echo_n "checking for pthread_create in -lc_r... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10400 | if ${ac_cv_lib_c_r_pthread_create+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10401 | $as_echo_n "(cached) " >&6 |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 10402 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10403 | ac_check_lib_save_LIBS=$LIBS |
Greg Stein | adf63d6 | 2000-07-05 10:38:09 +0000 | [diff] [blame] | 10404 | LIBS="-lc_r $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10405 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10406 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10407 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10408 | /* Override any GCC internal prototype to avoid an error. |
| 10409 | Use char because int might match the return type of a GCC |
| 10410 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10411 | #ifdef __cplusplus |
| 10412 | extern "C" |
| 10413 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10414 | char pthread_create (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10415 | int |
| 10416 | main () |
| 10417 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10418 | return pthread_create (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10419 | ; |
| 10420 | return 0; |
| 10421 | } |
| 10422 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10423 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10424 | ac_cv_lib_c_r_pthread_create=yes |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 10425 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10426 | ac_cv_lib_c_r_pthread_create=no |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 10427 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10428 | rm -f core conftest.err conftest.$ac_objext \ |
| 10429 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10430 | LIBS=$ac_check_lib_save_LIBS |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 10431 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10432 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5 |
| 10433 | $as_echo "$ac_cv_lib_c_r_pthread_create" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10434 | if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10435 | $as_echo "#define WITH_THREAD 1" >>confdefs.h |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 10436 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 10437 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 10438 | LIBS="$LIBS -lc_r" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 10439 | THREADOBJ="Python/thread.o" |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 10440 | else |
Guido van Rossum | 07bd90e | 2000-05-08 13:41:38 +0000 | [diff] [blame] | 10441 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10442 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5 |
| 10443 | $as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10444 | if ${ac_cv_lib_pthread___pthread_create_system+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10445 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 10446 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10447 | ac_check_lib_save_LIBS=$LIBS |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 10448 | LIBS="-lpthread $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10449 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10450 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10451 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10452 | /* Override any GCC internal prototype to avoid an error. |
| 10453 | Use char because int might match the return type of a GCC |
| 10454 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10455 | #ifdef __cplusplus |
| 10456 | extern "C" |
| 10457 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10458 | char __pthread_create_system (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10459 | int |
| 10460 | main () |
| 10461 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10462 | return __pthread_create_system (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10463 | ; |
| 10464 | return 0; |
| 10465 | } |
| 10466 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10467 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10468 | ac_cv_lib_pthread___pthread_create_system=yes |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 10469 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10470 | ac_cv_lib_pthread___pthread_create_system=no |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 10471 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10472 | rm -f core conftest.err conftest.$ac_objext \ |
| 10473 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10474 | LIBS=$ac_check_lib_save_LIBS |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 10475 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10476 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5 |
| 10477 | $as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10478 | if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10479 | $as_echo "#define WITH_THREAD 1" >>confdefs.h |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 10480 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 10481 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 10482 | LIBS="$LIBS -lpthread" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 10483 | THREADOBJ="Python/thread.o" |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 10484 | else |
Guido van Rossum | 8d6e8af | 2000-10-30 17:45:07 +0000 | [diff] [blame] | 10485 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10486 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5 |
| 10487 | $as_echo_n "checking for pthread_create in -lcma... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10488 | if ${ac_cv_lib_cma_pthread_create+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10489 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 10490 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10491 | ac_check_lib_save_LIBS=$LIBS |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 10492 | LIBS="-lcma $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10493 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10494 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10495 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10496 | /* Override any GCC internal prototype to avoid an error. |
| 10497 | Use char because int might match the return type of a GCC |
| 10498 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10499 | #ifdef __cplusplus |
| 10500 | extern "C" |
| 10501 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10502 | char pthread_create (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10503 | int |
| 10504 | main () |
| 10505 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10506 | return pthread_create (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10507 | ; |
| 10508 | return 0; |
| 10509 | } |
| 10510 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10511 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10512 | ac_cv_lib_cma_pthread_create=yes |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 10513 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10514 | ac_cv_lib_cma_pthread_create=no |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 10515 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10516 | rm -f core conftest.err conftest.$ac_objext \ |
| 10517 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10518 | LIBS=$ac_check_lib_save_LIBS |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 10519 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10520 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5 |
| 10521 | $as_echo "$ac_cv_lib_cma_pthread_create" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10522 | if test "x$ac_cv_lib_cma_pthread_create" = xyes; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10523 | $as_echo "#define WITH_THREAD 1" >>confdefs.h |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 10524 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 10525 | posix_threads=yes |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 10526 | LIBS="$LIBS -lcma" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 10527 | THREADOBJ="Python/thread.o" |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 10528 | else |
Thomas Wouters | 0db2b2b | 2000-08-26 11:33:43 +0000 | [diff] [blame] | 10529 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 10530 | USE_THREAD_MODULE="#" |
Guido van Rossum | 2d38f91 | 1996-06-26 19:47:01 +0000 | [diff] [blame] | 10531 | fi |
| 10532 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 10533 | |
Guido van Rossum | 7b3853f | 1996-07-30 18:09:35 +0000 | [diff] [blame] | 10534 | fi |
| 10535 | |
Guido van Rossum | 0be3e49 | 1997-05-22 20:33:33 +0000 | [diff] [blame] | 10536 | fi |
| 10537 | |
Guido van Rossum | 4954595 | 1997-12-02 19:28:29 +0000 | [diff] [blame] | 10538 | fi |
| 10539 | |
Guido van Rossum | b93a862 | 1998-05-07 13:27:32 +0000 | [diff] [blame] | 10540 | fi |
| 10541 | |
Martin v. Löwis | f90ae20 | 2002-06-11 06:22:31 +0000 | [diff] [blame] | 10542 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10543 | rm -f core conftest.err conftest.$ac_objext \ |
| 10544 | conftest$ac_exeext conftest.$ac_ext |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 10545 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10546 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5 |
| 10547 | $as_echo_n "checking for usconfig in -lmpc... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10548 | if ${ac_cv_lib_mpc_usconfig+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10549 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 10550 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10551 | ac_check_lib_save_LIBS=$LIBS |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 10552 | LIBS="-lmpc $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10553 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10554 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10555 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10556 | /* Override any GCC internal prototype to avoid an error. |
| 10557 | Use char because int might match the return type of a GCC |
| 10558 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10559 | #ifdef __cplusplus |
| 10560 | extern "C" |
| 10561 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10562 | char usconfig (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10563 | int |
| 10564 | main () |
| 10565 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10566 | return usconfig (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10567 | ; |
| 10568 | return 0; |
| 10569 | } |
| 10570 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10571 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10572 | ac_cv_lib_mpc_usconfig=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 10573 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10574 | ac_cv_lib_mpc_usconfig=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 10575 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10576 | rm -f core conftest.err conftest.$ac_objext \ |
| 10577 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10578 | LIBS=$ac_check_lib_save_LIBS |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 10579 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10580 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5 |
| 10581 | $as_echo "$ac_cv_lib_mpc_usconfig" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10582 | if test "x$ac_cv_lib_mpc_usconfig" = xyes; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10583 | $as_echo "#define WITH_THREAD 1" >>confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 10584 | |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 10585 | LIBS="$LIBS -lmpc" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 10586 | THREADOBJ="Python/thread.o" |
Martin v. Löwis | 130fb17 | 2001-07-19 11:00:41 +0000 | [diff] [blame] | 10587 | USE_THREAD_MODULE="" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 10588 | fi |
| 10589 | |
Martin v. Löwis | 3d2b549 | 2002-03-15 13:48:21 +0000 | [diff] [blame] | 10590 | |
Neal Norwitz | a978ab0 | 2002-11-02 16:58:05 +0000 | [diff] [blame] | 10591 | if test "$posix_threads" != "yes"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10592 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5 |
| 10593 | $as_echo_n "checking for thr_create in -lthread... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10594 | if ${ac_cv_lib_thread_thr_create+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10595 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 10596 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10597 | ac_check_lib_save_LIBS=$LIBS |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 10598 | LIBS="-lthread $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10599 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10600 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10601 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10602 | /* Override any GCC internal prototype to avoid an error. |
| 10603 | Use char because int might match the return type of a GCC |
| 10604 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10605 | #ifdef __cplusplus |
| 10606 | extern "C" |
| 10607 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10608 | char thr_create (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10609 | int |
| 10610 | main () |
| 10611 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10612 | return thr_create (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10613 | ; |
| 10614 | return 0; |
| 10615 | } |
| 10616 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10617 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10618 | ac_cv_lib_thread_thr_create=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 10619 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10620 | ac_cv_lib_thread_thr_create=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 10621 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10622 | rm -f core conftest.err conftest.$ac_objext \ |
| 10623 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10624 | LIBS=$ac_check_lib_save_LIBS |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 10625 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10626 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5 |
| 10627 | $as_echo "$ac_cv_lib_thread_thr_create" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10628 | if test "x$ac_cv_lib_thread_thr_create" = xyes; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10629 | $as_echo "#define WITH_THREAD 1" >>confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 10630 | |
Martin v. Löwis | 3d2b549 | 2002-03-15 13:48:21 +0000 | [diff] [blame] | 10631 | LIBS="$LIBS -lthread" |
Martin v. Löwis | 2d7e264 | 2002-04-05 16:50:53 +0000 | [diff] [blame] | 10632 | THREADOBJ="Python/thread.o" |
Martin v. Löwis | 3d2b549 | 2002-03-15 13:48:21 +0000 | [diff] [blame] | 10633 | USE_THREAD_MODULE="" |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 10634 | fi |
| 10635 | |
Martin v. Löwis | 3d2b549 | 2002-03-15 13:48:21 +0000 | [diff] [blame] | 10636 | fi |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10637 | fi |
Martin v. Löwis | a7a76d3 | 2002-10-04 07:21:24 +0000 | [diff] [blame] | 10638 | |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10639 | if test "$posix_threads" = "yes"; then |
| 10640 | if test "$unistd_defines_pthreads" = "no"; then |
Martin v. Löwis | a7a76d3 | 2002-10-04 07:21:24 +0000 | [diff] [blame] | 10641 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10642 | $as_echo "#define _POSIX_THREADS 1" >>confdefs.h |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10643 | |
| 10644 | fi |
| 10645 | |
| 10646 | # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8. |
| 10647 | case $ac_sys_system/$ac_sys_release in |
Charles-François Natali | 996f606 | 2011-07-21 19:45:31 +0200 | [diff] [blame] | 10648 | SunOS/5.6) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10649 | $as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h |
Martin v. Löwis | a7a76d3 | 2002-10-04 07:21:24 +0000 | [diff] [blame] | 10650 | |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10651 | ;; |
| 10652 | SunOS/5.8) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10653 | $as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10654 | |
| 10655 | ;; |
Charles-François Natali | 996f606 | 2011-07-21 19:45:31 +0200 | [diff] [blame] | 10656 | AIX/*) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10657 | $as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h |
Christian Heimes | 7b3ce6a | 2008-01-31 14:31:45 +0000 | [diff] [blame] | 10658 | |
| 10659 | ;; |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10660 | esac |
| 10661 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10662 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5 |
| 10663 | $as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 10664 | if ${ac_cv_pthread_system_supported+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10665 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10666 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10667 | if test "$cross_compiling" = yes; then : |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10668 | ac_cv_pthread_system_supported=no |
| 10669 | else |
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. */ |
Stefan Krah | 7dba594 | 2012-11-22 22:49:11 +0100 | [diff] [blame] | 10672 | |
| 10673 | #include <stdio.h> |
| 10674 | #include <pthread.h> |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10675 | void *foo(void *parm) { |
| 10676 | return NULL; |
| 10677 | } |
| 10678 | main() { |
| 10679 | pthread_attr_t attr; |
| 10680 | pthread_t id; |
| 10681 | if (pthread_attr_init(&attr)) exit(-1); |
| 10682 | if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1); |
| 10683 | if (pthread_create(&id, &attr, foo, NULL)) exit(-1); |
| 10684 | exit(0); |
| 10685 | } |
| 10686 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10687 | if ac_fn_c_try_run "$LINENO"; then : |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10688 | ac_cv_pthread_system_supported=yes |
| 10689 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10690 | ac_cv_pthread_system_supported=no |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10691 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10692 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 10693 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10694 | fi |
Martin v. Löwis | a7a76d3 | 2002-10-04 07:21:24 +0000 | [diff] [blame] | 10695 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10696 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 10697 | fi |
| 10698 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10699 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5 |
| 10700 | $as_echo "$ac_cv_pthread_system_supported" >&6; } |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10701 | if test "$ac_cv_pthread_system_supported" = "yes"; then |
| 10702 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10703 | $as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10704 | |
| 10705 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10706 | for ac_func in pthread_sigmask |
| 10707 | do : |
| 10708 | 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] | 10709 | if test "x$ac_cv_func_pthread_sigmask" = xyes; then : |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10710 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10711 | #define HAVE_PTHREAD_SIGMASK 1 |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10712 | _ACEOF |
Jason Tishler | fac083d | 2003-07-22 15:20:49 +0000 | [diff] [blame] | 10713 | case $ac_sys_system in |
| 10714 | CYGWIN*) |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10715 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10716 | $as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h |
Jason Tishler | fac083d | 2003-07-22 15:20:49 +0000 | [diff] [blame] | 10717 | |
| 10718 | ;; |
| 10719 | esac |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10720 | fi |
| 10721 | done |
| 10722 | |
Christian Heimes | f77b4b2 | 2013-08-21 13:26:05 +0200 | [diff] [blame] | 10723 | for ac_func in pthread_atfork |
| 10724 | do : |
| 10725 | ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork" |
| 10726 | if test "x$ac_cv_func_pthread_atfork" = xyes; then : |
| 10727 | cat >>confdefs.h <<_ACEOF |
| 10728 | #define HAVE_PTHREAD_ATFORK 1 |
| 10729 | _ACEOF |
| 10730 | |
| 10731 | fi |
| 10732 | done |
| 10733 | |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 10734 | fi |
| 10735 | |
| 10736 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10737 | # Check for enable-ipv6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10738 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10739 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5 |
| 10740 | $as_echo_n "checking if --enable-ipv6 is specified... " >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10741 | # Check whether --enable-ipv6 was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10742 | if test "${enable_ipv6+set}" = set; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10743 | enableval=$enable_ipv6; case "$enableval" in |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10744 | no) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10745 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 10746 | $as_echo "no" >&6; } |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10747 | ipv6=no |
| 10748 | ;; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10749 | *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 10750 | $as_echo "yes" >&6; } |
| 10751 | $as_echo "#define ENABLE_IPV6 1" >>confdefs.h |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10752 | |
| 10753 | ipv6=yes |
| 10754 | ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10755 | esac |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10756 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10757 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10758 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10759 | /* end confdefs.h. */ |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10760 | /* AF_INET6 available check */ |
| 10761 | #include <sys/types.h> |
| 10762 | #include <sys/socket.h> |
Charles-François Natali | f6fd794 | 2013-01-08 19:49:42 +0100 | [diff] [blame] | 10763 | int |
| 10764 | main () |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10765 | { |
Charles-François Natali | f6fd794 | 2013-01-08 19:49:42 +0100 | [diff] [blame] | 10766 | int domain = AF_INET6; |
| 10767 | ; |
| 10768 | return 0; |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10769 | } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10770 | _ACEOF |
Charles-François Natali | f6fd794 | 2013-01-08 19:49:42 +0100 | [diff] [blame] | 10771 | if ac_fn_c_try_compile "$LINENO"; then : |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 10772 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10773 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 10774 | $as_echo "yes" >&6; } |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10775 | ipv6=yes |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 10776 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10777 | else |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 10778 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10779 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 10780 | $as_echo "no" >&6; } |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10781 | ipv6=no |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 10782 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10783 | fi |
Charles-François Natali | f6fd794 | 2013-01-08 19:49:42 +0100 | [diff] [blame] | 10784 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10785 | |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 10786 | if test "$ipv6" = "yes"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10787 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5 |
| 10788 | $as_echo_n "checking if RFC2553 API is available... " >&6; } |
| 10789 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10790 | /* end confdefs.h. */ |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 10791 | |
| 10792 | #include <sys/types.h> |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 10793 | #include <netinet/in.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10794 | int |
| 10795 | main () |
| 10796 | { |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 10797 | struct sockaddr_in6 x; |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 10798 | x.sin6_scope_id; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10799 | ; |
| 10800 | return 0; |
| 10801 | } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 10802 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10803 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10804 | if ac_fn_c_try_compile "$LINENO"; then : |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 10805 | |
| 10806 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10807 | $as_echo "yes" >&6; } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 10808 | ipv6=yes |
| 10809 | |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 10810 | else |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 10811 | |
| 10812 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10813 | $as_echo "no" >&6; } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 10814 | ipv6=no |
| 10815 | |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 10816 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10817 | 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] | 10818 | fi |
| 10819 | |
| 10820 | if test "$ipv6" = "yes"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10821 | $as_echo "#define ENABLE_IPV6 1" >>confdefs.h |
Martin v. Löwis | a5f8bb5 | 2001-09-05 08:22:34 +0000 | [diff] [blame] | 10822 | |
| 10823 | fi |
| 10824 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 10825 | fi |
| 10826 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10827 | |
| 10828 | ipv6type=unknown |
| 10829 | ipv6lib=none |
| 10830 | ipv6trylibc=no |
| 10831 | |
| 10832 | if test "$ipv6" = "yes"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10833 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5 |
| 10834 | $as_echo_n "checking ipv6 stack type... " >&6; } |
Guido van Rossum | b855216 | 2001-09-05 14:58:11 +0000 | [diff] [blame] | 10835 | for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta; |
| 10836 | do |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10837 | case $i in |
| 10838 | inria) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10839 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10840 | /* end confdefs.h. */ |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 10841 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10842 | #include <netinet/in.h> |
| 10843 | #ifdef IPV6_INRIA_VERSION |
| 10844 | yes |
| 10845 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10846 | _ACEOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10847 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10848 | $EGREP "yes" >/dev/null 2>&1; then : |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 10849 | ipv6type=$i |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10850 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 10851 | rm -f conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10852 | |
| 10853 | ;; |
| 10854 | kame) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10855 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10856 | /* end confdefs.h. */ |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 10857 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10858 | #include <netinet/in.h> |
| 10859 | #ifdef __KAME__ |
| 10860 | yes |
| 10861 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10862 | _ACEOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10863 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10864 | $EGREP "yes" >/dev/null 2>&1; then : |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10865 | ipv6type=$i; |
| 10866 | ipv6lib=inet6 |
| 10867 | ipv6libdir=/usr/local/v6/lib |
| 10868 | ipv6trylibc=yes |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10869 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 10870 | rm -f conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10871 | |
| 10872 | ;; |
| 10873 | linux-glibc) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10874 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10875 | /* end confdefs.h. */ |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 10876 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10877 | #include <features.h> |
| 10878 | #if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)) |
| 10879 | yes |
| 10880 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10881 | _ACEOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10882 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10883 | $EGREP "yes" >/dev/null 2>&1; then : |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10884 | ipv6type=$i; |
| 10885 | ipv6trylibc=yes |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10886 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 10887 | rm -f conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10888 | |
| 10889 | ;; |
| 10890 | linux-inet6) |
| 10891 | if test -d /usr/inet6; then |
| 10892 | ipv6type=$i |
| 10893 | ipv6lib=inet6 |
| 10894 | ipv6libdir=/usr/inet6/lib |
Skip Montanaro | decc6a4 | 2003-01-01 20:07:49 +0000 | [diff] [blame] | 10895 | BASECFLAGS="-I/usr/inet6/include $BASECFLAGS" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10896 | fi |
| 10897 | ;; |
| 10898 | solaris) |
| 10899 | if test -f /etc/netconfig; then |
Antoine Pitrou | f3fcd9f | 2011-01-03 18:53:50 +0000 | [diff] [blame] | 10900 | if $GREP -q tcp6 /etc/netconfig; then |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10901 | ipv6type=$i |
| 10902 | ipv6trylibc=yes |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10903 | fi |
| 10904 | fi |
| 10905 | ;; |
| 10906 | toshiba) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10907 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10908 | /* end confdefs.h. */ |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 10909 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10910 | #include <sys/param.h> |
| 10911 | #ifdef _TOSHIBA_INET6 |
| 10912 | yes |
| 10913 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10914 | _ACEOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10915 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10916 | $EGREP "yes" >/dev/null 2>&1; then : |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10917 | ipv6type=$i; |
| 10918 | ipv6lib=inet6; |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 10919 | ipv6libdir=/usr/local/v6/lib |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10920 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 10921 | rm -f conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10922 | |
| 10923 | ;; |
| 10924 | v6d) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10925 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10926 | /* end confdefs.h. */ |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 10927 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10928 | #include </usr/local/v6/include/sys/v6config.h> |
| 10929 | #ifdef __V6D__ |
| 10930 | yes |
| 10931 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10932 | _ACEOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10933 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10934 | $EGREP "yes" >/dev/null 2>&1; then : |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10935 | ipv6type=$i; |
| 10936 | ipv6lib=v6; |
| 10937 | ipv6libdir=/usr/local/v6/lib; |
Skip Montanaro | decc6a4 | 2003-01-01 20:07:49 +0000 | [diff] [blame] | 10938 | BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS" |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10939 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 10940 | rm -f conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10941 | |
| 10942 | ;; |
| 10943 | zeta) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10944 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 10945 | /* end confdefs.h. */ |
Martin v. Löwis | a5f73f9 | 2001-10-15 08:06:29 +0000 | [diff] [blame] | 10946 | |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10947 | #include <sys/param.h> |
| 10948 | #ifdef _ZETA_MINAMI_INET6 |
| 10949 | yes |
| 10950 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 10951 | _ACEOF |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10952 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10953 | $EGREP "yes" >/dev/null 2>&1; then : |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10954 | ipv6type=$i; |
| 10955 | ipv6lib=inet6; |
Martin v. Löwis | 44ddbde | 2001-12-02 10:15:37 +0000 | [diff] [blame] | 10956 | ipv6libdir=/usr/local/v6/lib |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10957 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 10958 | rm -f conftest* |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10959 | |
| 10960 | ;; |
| 10961 | esac |
| 10962 | if test "$ipv6type" != "unknown"; then |
| 10963 | break |
| 10964 | fi |
| 10965 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 10966 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5 |
| 10967 | $as_echo "$ipv6type" >&6; } |
Martin v. Löwis | a2ac602 | 2001-08-09 11:40:14 +0000 | [diff] [blame] | 10968 | fi |
| 10969 | |
| 10970 | if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then |
| 10971 | if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then |
| 10972 | LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" |
| 10973 | echo "using lib$ipv6lib" |
| 10974 | else |
| 10975 | if test $ipv6trylibc = "yes"; then |
| 10976 | echo "using libc" |
| 10977 | else |
| 10978 | echo 'Fatal: no $ipv6lib library found. cannot continue.' |
| 10979 | echo "You need to fetch lib$ipv6lib.a from appropriate" |
| 10980 | echo 'ipv6 kit and compile beforehand.' |
| 10981 | exit 1 |
| 10982 | fi |
| 10983 | fi |
| 10984 | fi |
| 10985 | |
Larry Hastings | a6cc551 | 2015-04-13 17:48:40 -0400 | [diff] [blame] | 10986 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5 |
| 10987 | $as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; } |
| 10988 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 10989 | /* end confdefs.h. */ |
| 10990 | /* CAN_RAW_FD_FRAMES available check */ |
| 10991 | #include <linux/can/raw.h> |
| 10992 | int |
| 10993 | main () |
| 10994 | { |
| 10995 | int can_raw_fd_frames = CAN_RAW_FD_FRAMES; |
| 10996 | ; |
| 10997 | return 0; |
| 10998 | } |
| 10999 | _ACEOF |
| 11000 | if ac_fn_c_try_compile "$LINENO"; then : |
| 11001 | |
| 11002 | |
| 11003 | $as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h |
| 11004 | |
| 11005 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 11006 | $as_echo "yes" >&6; } |
| 11007 | |
| 11008 | else |
| 11009 | |
| 11010 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11011 | $as_echo "no" >&6; } |
| 11012 | |
| 11013 | fi |
| 11014 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 11015 | |
Martin v. Löwis | a3fb4f7 | 2002-06-09 13:33:54 +0000 | [diff] [blame] | 11016 | # Check for --with-doc-strings |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11017 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5 |
| 11018 | $as_echo_n "checking for --with-doc-strings... " >&6; } |
Martin v. Löwis | a3fb4f7 | 2002-06-09 13:33:54 +0000 | [diff] [blame] | 11019 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11020 | # Check whether --with-doc-strings was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11021 | if test "${with_doc_strings+set}" = set; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11022 | withval=$with_doc_strings; |
| 11023 | fi |
Martin v. Löwis | a3fb4f7 | 2002-06-09 13:33:54 +0000 | [diff] [blame] | 11024 | |
Martin v. Löwis | a3fb4f7 | 2002-06-09 13:33:54 +0000 | [diff] [blame] | 11025 | |
| 11026 | if test -z "$with_doc_strings" |
| 11027 | then with_doc_strings="yes" |
| 11028 | fi |
| 11029 | if test "$with_doc_strings" != "no" |
| 11030 | then |
| 11031 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11032 | $as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h |
Martin v. Löwis | a3fb4f7 | 2002-06-09 13:33:54 +0000 | [diff] [blame] | 11033 | |
| 11034 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11035 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5 |
| 11036 | $as_echo "$with_doc_strings" >&6; } |
Martin v. Löwis | a3fb4f7 | 2002-06-09 13:33:54 +0000 | [diff] [blame] | 11037 | |
Martin v. Löwis | f30d60e | 2004-06-08 08:17:44 +0000 | [diff] [blame] | 11038 | # Check for Python-specific malloc support |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11039 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5 |
| 11040 | $as_echo_n "checking for --with-pymalloc... " >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11041 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11042 | # Check whether --with-pymalloc was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11043 | if test "${with_pymalloc+set}" = set; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11044 | withval=$with_pymalloc; |
| 11045 | fi |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 11046 | |
Neil Schemenauer | a35c688 | 2001-02-27 04:45:05 +0000 | [diff] [blame] | 11047 | |
Neil Schemenauer | 16c2297 | 2002-03-22 15:34:49 +0000 | [diff] [blame] | 11048 | if test -z "$with_pymalloc" |
Barry Warsaw | 35f3a2c | 2010-09-03 18:30:30 +0000 | [diff] [blame] | 11049 | then |
| 11050 | with_pymalloc="yes" |
Neil Schemenauer | 16c2297 | 2002-03-22 15:34:49 +0000 | [diff] [blame] | 11051 | fi |
| 11052 | if test "$with_pymalloc" != "no" |
| 11053 | then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11054 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11055 | $as_echo "#define WITH_PYMALLOC 1" >>confdefs.h |
Neil Schemenauer | 16c2297 | 2002-03-22 15:34:49 +0000 | [diff] [blame] | 11056 | |
doko@ubuntu.com | 9c7817e | 2012-06-30 17:05:13 +0200 | [diff] [blame] | 11057 | ABIFLAGS="${ABIFLAGS}m" |
Neil Schemenauer | 16c2297 | 2002-03-22 15:34:49 +0000 | [diff] [blame] | 11058 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11059 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5 |
| 11060 | $as_echo "$with_pymalloc" >&6; } |
Neil Schemenauer | 16c2297 | 2002-03-22 15:34:49 +0000 | [diff] [blame] | 11061 | |
Benjamin Peterson | 05159c4 | 2009-12-03 03:01:27 +0000 | [diff] [blame] | 11062 | # Check for Valgrind support |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11063 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5 |
| 11064 | $as_echo_n "checking for --with-valgrind... " >&6; } |
Benjamin Peterson | 05159c4 | 2009-12-03 03:01:27 +0000 | [diff] [blame] | 11065 | |
| 11066 | # Check whether --with-valgrind was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11067 | if test "${with_valgrind+set}" = set; then : |
Benjamin Peterson | 05159c4 | 2009-12-03 03:01:27 +0000 | [diff] [blame] | 11068 | withval=$with_valgrind; |
| 11069 | else |
| 11070 | with_valgrind=no |
| 11071 | fi |
| 11072 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11073 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5 |
| 11074 | $as_echo "$with_valgrind" >&6; } |
Benjamin Peterson | 05159c4 | 2009-12-03 03:01:27 +0000 | [diff] [blame] | 11075 | if test "$with_valgrind" != no; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11076 | 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] | 11077 | if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then : |
Benjamin Peterson | 05159c4 | 2009-12-03 03:01:27 +0000 | [diff] [blame] | 11078 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11079 | $as_echo "#define WITH_VALGRIND 1" >>confdefs.h |
Benjamin Peterson | 05159c4 | 2009-12-03 03:01:27 +0000 | [diff] [blame] | 11080 | |
| 11081 | else |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 11082 | as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5 |
Benjamin Peterson | 05159c4 | 2009-12-03 03:01:27 +0000 | [diff] [blame] | 11083 | |
| 11084 | fi |
| 11085 | |
| 11086 | |
Jeffrey Yasskin | 3937083 | 2010-05-03 19:29:34 +0000 | [diff] [blame] | 11087 | OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT" |
Benjamin Peterson | 05159c4 | 2009-12-03 03:01:27 +0000 | [diff] [blame] | 11088 | fi |
| 11089 | |
Łukasz Langa | a785c87 | 2016-09-09 17:37:37 -0700 | [diff] [blame] | 11090 | # Check for DTrace support |
| 11091 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5 |
| 11092 | $as_echo_n "checking for --with-dtrace... " >&6; } |
| 11093 | |
| 11094 | # Check whether --with-dtrace was given. |
| 11095 | if test "${with_dtrace+set}" = set; then : |
| 11096 | withval=$with_dtrace; |
| 11097 | else |
| 11098 | with_dtrace=no |
| 11099 | fi |
| 11100 | |
| 11101 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5 |
| 11102 | $as_echo "$with_dtrace" >&6; } |
| 11103 | |
| 11104 | |
| 11105 | |
| 11106 | |
| 11107 | |
| 11108 | DTRACE= |
| 11109 | DFLAGS= |
| 11110 | DTRACE_HEADERS= |
| 11111 | DTRACE_OBJS= |
| 11112 | |
| 11113 | if test "$with_dtrace" = "yes" |
| 11114 | then |
| 11115 | # Extract the first word of "dtrace", so it can be a program name with args. |
| 11116 | set dummy dtrace; ac_word=$2 |
| 11117 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 11118 | $as_echo_n "checking for $ac_word... " >&6; } |
| 11119 | if ${ac_cv_path_DTRACE+:} false; then : |
| 11120 | $as_echo_n "(cached) " >&6 |
| 11121 | else |
| 11122 | case $DTRACE in |
| 11123 | [\\/]* | ?:[\\/]*) |
| 11124 | ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path. |
| 11125 | ;; |
| 11126 | *) |
| 11127 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 11128 | for as_dir in $PATH |
| 11129 | do |
| 11130 | IFS=$as_save_IFS |
| 11131 | test -z "$as_dir" && as_dir=. |
| 11132 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 11133 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 11134 | ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext" |
| 11135 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 11136 | break 2 |
| 11137 | fi |
| 11138 | done |
| 11139 | done |
| 11140 | IFS=$as_save_IFS |
| 11141 | |
| 11142 | test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found" |
| 11143 | ;; |
| 11144 | esac |
| 11145 | fi |
| 11146 | DTRACE=$ac_cv_path_DTRACE |
| 11147 | if test -n "$DTRACE"; then |
| 11148 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5 |
| 11149 | $as_echo "$DTRACE" >&6; } |
| 11150 | else |
| 11151 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11152 | $as_echo "no" >&6; } |
| 11153 | fi |
| 11154 | |
| 11155 | |
| 11156 | if test "$DTRACE" = "not found"; then |
| 11157 | as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5 |
| 11158 | fi |
| 11159 | |
| 11160 | $as_echo "#define WITH_DTRACE 1" >>confdefs.h |
| 11161 | |
| 11162 | DTRACE_HEADERS="Include/pydtrace_probes.h" |
| 11163 | |
| 11164 | # On OS X, DTrace providers do not need to be explicitly compiled and |
| 11165 | # linked into the binary. Correspondingly, dtrace(1) is missing the ELF |
| 11166 | # generation flag '-G'. We check for presence of this flag, rather than |
| 11167 | # hardcoding support by OS, in the interest of robustness. |
| 11168 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5 |
| 11169 | $as_echo_n "checking whether DTrace probes require linking... " >&6; } |
| 11170 | if ${ac_cv_dtrace_link+:} false; then : |
| 11171 | $as_echo_n "(cached) " >&6 |
| 11172 | else |
| 11173 | ac_cv_dtrace_link=no |
| 11174 | echo 'BEGIN' > conftest.d |
| 11175 | "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \ |
| 11176 | ac_cv_dtrace_link=yes |
| 11177 | |
| 11178 | fi |
| 11179 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5 |
| 11180 | $as_echo "$ac_cv_dtrace_link" >&6; } |
| 11181 | if test "$ac_cv_dtrace_link" = "yes"; then |
| 11182 | DTRACE_OBJS="Python/pydtrace.o" |
| 11183 | fi |
| 11184 | fi |
| 11185 | |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 11186 | # -I${DLINCLDIR} is added to the compile rule for importdl.o |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 11187 | |
Guido van Rossum | 98935bf | 2001-09-05 19:13:16 +0000 | [diff] [blame] | 11188 | DLINCLDIR=. |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 11189 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 11190 | # the dlopen() function means we might want to use dynload_shlib.o. some |
| 11191 | # 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] | 11192 | for ac_func in dlopen |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11193 | do : |
| 11194 | ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 11195 | if test "x$ac_cv_func_dlopen" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11196 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11197 | #define HAVE_DLOPEN 1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11198 | _ACEOF |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 11199 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 11200 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 11201 | done |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 11202 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 11203 | |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 11204 | # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic |
| 11205 | # loading of modules. |
| 11206 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11207 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5 |
| 11208 | $as_echo_n "checking DYNLOADFILE... " >&6; } |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 11209 | if test -z "$DYNLOADFILE" |
| 11210 | then |
| 11211 | case $ac_sys_system/$ac_sys_release in |
Martin v. Löwis | c19c5a6 | 2003-11-18 20:00:44 +0000 | [diff] [blame] | 11212 | AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c |
| 11213 | if test "$ac_cv_func_dlopen" = yes |
| 11214 | then DYNLOADFILE="dynload_shlib.o" |
| 11215 | else DYNLOADFILE="dynload_aix.o" |
| 11216 | fi |
| 11217 | ;; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 11218 | hp*|HP*) DYNLOADFILE="dynload_hpux.o";; |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 11219 | # Use dynload_next.c only on 10.2 and below, which don't have native dlopen() |
| 11220 | Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";; |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 11221 | *) |
| 11222 | # use dynload_shlib.c and dlopen() if we have it; otherwise stub |
| 11223 | # out any dynamic loading |
| 11224 | if test "$ac_cv_func_dlopen" = yes |
| 11225 | then DYNLOADFILE="dynload_shlib.o" |
| 11226 | else DYNLOADFILE="dynload_stub.o" |
| 11227 | fi |
| 11228 | ;; |
| 11229 | esac |
| 11230 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11231 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5 |
| 11232 | $as_echo "$DYNLOADFILE" >&6; } |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 11233 | if test "$DYNLOADFILE" != "dynload_stub.o" |
| 11234 | then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11235 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11236 | $as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h |
Guido van Rossum | e97ee18 | 1999-12-20 21:27:22 +0000 | [diff] [blame] | 11237 | |
| 11238 | fi |
| 11239 | |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 11240 | # MACHDEP_OBJS can be set to platform-specific object files needed by Python |
| 11241 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 11242 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11243 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5 |
| 11244 | $as_echo_n "checking MACHDEP_OBJS... " >&6; } |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 11245 | if test -z "$MACHDEP_OBJS" |
| 11246 | then |
Jack Jansen | e578a63 | 2001-08-15 01:27:14 +0000 | [diff] [blame] | 11247 | MACHDEP_OBJS=$extra_machdep_objs |
| 11248 | else |
| 11249 | MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs" |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 11250 | fi |
doko@ubuntu.com | 9c7817e | 2012-06-30 17:05:13 +0200 | [diff] [blame] | 11251 | if test -z "$MACHDEP_OBJS"; then |
| 11252 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 |
| 11253 | $as_echo "none" >&6; } |
| 11254 | else |
| 11255 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5 |
| 11256 | $as_echo "$MACHDEP_OBJS" >&6; } |
| 11257 | fi |
Neil Schemenauer | 4e42561 | 2001-06-19 15:44:15 +0000 | [diff] [blame] | 11258 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 11259 | # checks for library functions |
Antoine Pitrou | b1c5496 | 2010-10-14 15:05:38 +0000 | [diff] [blame] | 11260 | for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \ |
Victor Stinner | daf4555 | 2013-08-28 00:53:59 +0200 | [diff] [blame] | 11261 | clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \ |
Ross Lagerwall | 7807c35 | 2011-03-17 20:20:30 +0200 | [diff] [blame] | 11262 | fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \ |
Victor Stinner | 4d6a3d6 | 2014-12-21 01:16:38 +0100 | [diff] [blame] | 11263 | futimens futimes gai_strerror getentropy \ |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 11264 | getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \ |
Martin v. Löwis | 7aed61a | 2009-11-27 14:09:49 +0000 | [diff] [blame] | 11265 | getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \ |
Xavier de Gaye | bdf0d0f | 2016-12-22 10:38:59 +0100 | [diff] [blame] | 11266 | initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \ |
Antoine Pitrou | f0effe6 | 2011-11-26 01:11:02 +0100 | [diff] [blame] | 11267 | memrchr mbrtowc mkdirat mkfifo \ |
Charles-François Natali | daafdd5 | 2011-05-29 20:07:40 +0200 | [diff] [blame] | 11268 | mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \ |
Ross Lagerwall | 7807c35 | 2011-03-17 20:20:30 +0200 | [diff] [blame] | 11269 | posix_fallocate posix_fadvise pread \ |
Victor Stinner | b3e7219 | 2011-05-08 01:46:11 +0200 | [diff] [blame] | 11270 | pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \ |
Georg Brandl | 941f956 | 2011-02-25 15:21:47 +0000 | [diff] [blame] | 11271 | select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \ |
Antoine Pitrou | 061cfb5 | 2011-02-28 22:25:22 +0000 | [diff] [blame] | 11272 | setgid sethostname \ |
Giampaolo Rodolà | 18e8bcb | 2011-02-25 20:57:54 +0000 | [diff] [blame] | 11273 | 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] | 11274 | sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \ |
| 11275 | sched_rr_get_interval \ |
Ross Lagerwall | bc80822 | 2011-06-25 12:13:40 +0200 | [diff] [blame] | 11276 | sigaction sigaltstack siginterrupt sigpending sigrelse \ |
| 11277 | sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \ |
Michael W. Hudson | 34f20ea | 2002-05-27 15:08:24 +0000 | [diff] [blame] | 11278 | sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ |
Ross Lagerwall | 7807c35 | 2011-03-17 20:20:30 +0200 | [diff] [blame] | 11279 | truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \ |
Victor Stinner | cd777ea | 2013-04-08 22:43:44 +0200 | [diff] [blame] | 11280 | wcscoll wcsftime wcsxfrm wmemcmp writev _getpty |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11281 | do : |
| 11282 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
| 11283 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 11284 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11285 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11286 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 11287 | _ACEOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 11288 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 11289 | fi |
| 11290 | done |
| 11291 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 11292 | |
Gregory P. Smith | df300d5 | 2012-01-21 18:20:15 -0800 | [diff] [blame] | 11293 | ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h> |
| 11294 | #include <dirent.h> |
| 11295 | " |
| 11296 | if test "x$ac_cv_have_decl_dirfd" = xyes; then : |
| 11297 | |
| 11298 | $as_echo "#define HAVE_DIRFD 1" >>confdefs.h |
| 11299 | |
| 11300 | fi |
| 11301 | |
| 11302 | |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11303 | # For some functions, having a definition is not sufficient, since |
| 11304 | # we want to take their address. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11305 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5 |
| 11306 | $as_echo_n "checking for chroot... " >&6; } |
| 11307 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11308 | /* end confdefs.h. */ |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11309 | #include <unistd.h> |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11310 | int |
| 11311 | main () |
| 11312 | { |
| 11313 | void *x=chroot |
| 11314 | ; |
| 11315 | return 0; |
| 11316 | } |
| 11317 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11318 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11319 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11320 | $as_echo "#define HAVE_CHROOT 1" >>confdefs.h |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11321 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11322 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11323 | $as_echo "yes" >&6; } |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11324 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11325 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11326 | $as_echo "no" >&6; } |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11327 | |
| 11328 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11329 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11330 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5 |
| 11331 | $as_echo_n "checking for link... " >&6; } |
| 11332 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11333 | /* end confdefs.h. */ |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11334 | #include <unistd.h> |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11335 | int |
| 11336 | main () |
| 11337 | { |
| 11338 | void *x=link |
| 11339 | ; |
| 11340 | return 0; |
| 11341 | } |
| 11342 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11343 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11344 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11345 | $as_echo "#define HAVE_LINK 1" >>confdefs.h |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11346 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11347 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11348 | $as_echo "yes" >&6; } |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11349 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11350 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11351 | $as_echo "no" >&6; } |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11352 | |
| 11353 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11354 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11355 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5 |
| 11356 | $as_echo_n "checking for symlink... " >&6; } |
| 11357 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11358 | /* end confdefs.h. */ |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11359 | #include <unistd.h> |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11360 | int |
| 11361 | main () |
| 11362 | { |
| 11363 | void *x=symlink |
| 11364 | ; |
| 11365 | return 0; |
| 11366 | } |
| 11367 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11368 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11369 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11370 | $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11371 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11372 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11373 | $as_echo "yes" >&6; } |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11374 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11375 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11376 | $as_echo "no" >&6; } |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11377 | |
| 11378 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11379 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11380 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5 |
| 11381 | $as_echo_n "checking for fchdir... " >&6; } |
| 11382 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11383 | /* end confdefs.h. */ |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11384 | #include <unistd.h> |
| 11385 | int |
| 11386 | main () |
| 11387 | { |
| 11388 | void *x=fchdir |
| 11389 | ; |
| 11390 | return 0; |
| 11391 | } |
| 11392 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11393 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11394 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11395 | $as_echo "#define HAVE_FCHDIR 1" >>confdefs.h |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11396 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11397 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11398 | $as_echo "yes" >&6; } |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11399 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11400 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11401 | $as_echo "no" >&6; } |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11402 | |
| 11403 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11404 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11405 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5 |
| 11406 | $as_echo_n "checking for fsync... " >&6; } |
| 11407 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11408 | /* end confdefs.h. */ |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11409 | #include <unistd.h> |
| 11410 | int |
| 11411 | main () |
| 11412 | { |
| 11413 | void *x=fsync |
| 11414 | ; |
| 11415 | return 0; |
| 11416 | } |
| 11417 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11418 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11419 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11420 | $as_echo "#define HAVE_FSYNC 1" >>confdefs.h |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11421 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11422 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11423 | $as_echo "yes" >&6; } |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11424 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11425 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11426 | $as_echo "no" >&6; } |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11427 | |
| 11428 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11429 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11430 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5 |
| 11431 | $as_echo_n "checking for fdatasync... " >&6; } |
| 11432 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11433 | /* end confdefs.h. */ |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11434 | #include <unistd.h> |
| 11435 | int |
| 11436 | main () |
| 11437 | { |
| 11438 | void *x=fdatasync |
| 11439 | ; |
| 11440 | return 0; |
| 11441 | } |
| 11442 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11443 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11444 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11445 | $as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11446 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11447 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11448 | $as_echo "yes" >&6; } |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11449 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11450 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11451 | $as_echo "no" >&6; } |
Martin v. Löwis | a64988c | 2003-09-20 15:30:20 +0000 | [diff] [blame] | 11452 | |
| 11453 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11454 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11455 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5 |
| 11456 | $as_echo_n "checking for epoll... " >&6; } |
| 11457 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Christian Heimes | 4fbc72b | 2008-03-22 00:47:35 +0000 | [diff] [blame] | 11458 | /* end confdefs.h. */ |
| 11459 | #include <sys/epoll.h> |
| 11460 | int |
| 11461 | main () |
| 11462 | { |
| 11463 | void *x=epoll_create |
| 11464 | ; |
| 11465 | return 0; |
| 11466 | } |
| 11467 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11468 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | c8ad7cc | 2002-11-11 13:23:45 +0000 | [diff] [blame] | 11469 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11470 | $as_echo "#define HAVE_EPOLL 1" >>confdefs.h |
Christian Heimes | 4fbc72b | 2008-03-22 00:47:35 +0000 | [diff] [blame] | 11471 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11472 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11473 | $as_echo "yes" >&6; } |
Christian Heimes | 4fbc72b | 2008-03-22 00:47:35 +0000 | [diff] [blame] | 11474 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11475 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11476 | $as_echo "no" >&6; } |
Christian Heimes | 4fbc72b | 2008-03-22 00:47:35 +0000 | [diff] [blame] | 11477 | |
| 11478 | fi |
Christian Heimes | 4fbc72b | 2008-03-22 00:47:35 +0000 | [diff] [blame] | 11479 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Benjamin Peterson | 95c1662 | 2011-12-27 15:36:32 -0600 | [diff] [blame] | 11480 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5 |
| 11481 | $as_echo_n "checking for epoll_create1... " >&6; } |
| 11482 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 11483 | /* end confdefs.h. */ |
| 11484 | #include <sys/epoll.h> |
| 11485 | int |
| 11486 | main () |
| 11487 | { |
| 11488 | void *x=epoll_create1 |
| 11489 | ; |
| 11490 | return 0; |
| 11491 | } |
| 11492 | _ACEOF |
| 11493 | if ac_fn_c_try_compile "$LINENO"; then : |
| 11494 | |
| 11495 | $as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h |
| 11496 | |
| 11497 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 11498 | $as_echo "yes" >&6; } |
| 11499 | else |
| 11500 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11501 | $as_echo "no" >&6; } |
| 11502 | |
| 11503 | fi |
| 11504 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11505 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5 |
| 11506 | $as_echo_n "checking for kqueue... " >&6; } |
| 11507 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Christian Heimes | 4fbc72b | 2008-03-22 00:47:35 +0000 | [diff] [blame] | 11508 | /* end confdefs.h. */ |
| 11509 | |
| 11510 | #include <sys/types.h> |
| 11511 | #include <sys/event.h> |
| 11512 | |
| 11513 | int |
| 11514 | main () |
| 11515 | { |
| 11516 | int x=kqueue() |
| 11517 | ; |
| 11518 | return 0; |
| 11519 | } |
| 11520 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11521 | if ac_fn_c_try_compile "$LINENO"; then : |
Christian Heimes | 4fbc72b | 2008-03-22 00:47:35 +0000 | [diff] [blame] | 11522 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11523 | $as_echo "#define HAVE_KQUEUE 1" >>confdefs.h |
Christian Heimes | 4fbc72b | 2008-03-22 00:47:35 +0000 | [diff] [blame] | 11524 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11525 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11526 | $as_echo "yes" >&6; } |
Christian Heimes | 4fbc72b | 2008-03-22 00:47:35 +0000 | [diff] [blame] | 11527 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11528 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11529 | $as_echo "no" >&6; } |
Christian Heimes | 4fbc72b | 2008-03-22 00:47:35 +0000 | [diff] [blame] | 11530 | |
| 11531 | fi |
Christian Heimes | 4fbc72b | 2008-03-22 00:47:35 +0000 | [diff] [blame] | 11532 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Christian Heimes | b7bd5df | 2013-10-22 11:21:54 +0200 | [diff] [blame] | 11533 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5 |
| 11534 | $as_echo_n "checking for prlimit... " >&6; } |
| 11535 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 11536 | /* end confdefs.h. */ |
| 11537 | |
| 11538 | #include <sys/time.h> |
| 11539 | #include <sys/resource.h> |
| 11540 | |
| 11541 | int |
| 11542 | main () |
| 11543 | { |
| 11544 | void *x=prlimit |
| 11545 | ; |
| 11546 | return 0; |
| 11547 | } |
| 11548 | _ACEOF |
| 11549 | if ac_fn_c_try_compile "$LINENO"; then : |
| 11550 | |
| 11551 | $as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h |
| 11552 | |
| 11553 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 11554 | $as_echo "yes" >&6; } |
| 11555 | else |
| 11556 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11557 | $as_echo "no" >&6; } |
| 11558 | |
| 11559 | fi |
| 11560 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 11561 | |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 11562 | # On some systems (eg. FreeBSD 5), we would find a definition of the |
| 11563 | # functions ctermid_r, setgroups in the library, but no prototype |
| 11564 | # (e.g. because we use _XOPEN_SOURCE). See whether we can take their |
| 11565 | # address to avoid compiler warnings and potential miscompilations |
| 11566 | # because of the missing prototypes. |
| 11567 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11568 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5 |
| 11569 | $as_echo_n "checking for ctermid_r... " >&6; } |
| 11570 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11571 | /* end confdefs.h. */ |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 11572 | |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 11573 | #include <stdio.h> |
| 11574 | |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 11575 | int |
| 11576 | main () |
| 11577 | { |
| 11578 | void* p = ctermid_r |
| 11579 | ; |
| 11580 | return 0; |
| 11581 | } |
| 11582 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11583 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 11584 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11585 | $as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 11586 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11587 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11588 | $as_echo "yes" >&6; } |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 11589 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11590 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11591 | $as_echo "no" >&6; } |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 11592 | |
| 11593 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11594 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 11595 | |
Antoine Pitrou | a4e4ae2 | 2010-09-10 18:39:00 +0000 | [diff] [blame] | 11596 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5 |
| 11597 | $as_echo_n "checking for flock declaration... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 11598 | if ${ac_cv_flock_decl+:} false; then : |
Antoine Pitrou | a4e4ae2 | 2010-09-10 18:39:00 +0000 | [diff] [blame] | 11599 | $as_echo_n "(cached) " >&6 |
| 11600 | else |
| 11601 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11602 | /* end confdefs.h. */ |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 11603 | #include <sys/file.h> |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 11604 | int |
| 11605 | main () |
| 11606 | { |
| 11607 | void* p = flock |
Antoine Pitrou | a4e4ae2 | 2010-09-10 18:39:00 +0000 | [diff] [blame] | 11608 | |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 11609 | ; |
| 11610 | return 0; |
| 11611 | } |
| 11612 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11613 | if ac_fn_c_try_compile "$LINENO"; then : |
Antoine Pitrou | a4e4ae2 | 2010-09-10 18:39:00 +0000 | [diff] [blame] | 11614 | ac_cv_flock_decl=yes |
| 11615 | else |
| 11616 | ac_cv_flock_decl=no |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 11617 | |
| 11618 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11619 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Antoine Pitrou | a300007 | 2010-09-07 14:52:42 +0000 | [diff] [blame] | 11620 | |
Antoine Pitrou | a4e4ae2 | 2010-09-10 18:39:00 +0000 | [diff] [blame] | 11621 | fi |
| 11622 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5 |
| 11623 | $as_echo "$ac_cv_flock_decl" >&6; } |
| 11624 | if test "x${ac_cv_flock_decl}" = xyes; then |
| 11625 | for ac_func in flock |
| 11626 | do : |
| 11627 | ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 11628 | if test "x$ac_cv_func_flock" = xyes; then : |
Antoine Pitrou | a4e4ae2 | 2010-09-10 18:39:00 +0000 | [diff] [blame] | 11629 | cat >>confdefs.h <<_ACEOF |
| 11630 | #define HAVE_FLOCK 1 |
Antoine Pitrou | a300007 | 2010-09-07 14:52:42 +0000 | [diff] [blame] | 11631 | _ACEOF |
Antoine Pitrou | a4e4ae2 | 2010-09-10 18:39:00 +0000 | [diff] [blame] | 11632 | |
Antoine Pitrou | a300007 | 2010-09-07 14:52:42 +0000 | [diff] [blame] | 11633 | else |
Antoine Pitrou | a4e4ae2 | 2010-09-10 18:39:00 +0000 | [diff] [blame] | 11634 | { $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] | 11635 | $as_echo_n "checking for flock in -lbsd... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 11636 | if ${ac_cv_lib_bsd_flock+:} false; then : |
Antoine Pitrou | a300007 | 2010-09-07 14:52:42 +0000 | [diff] [blame] | 11637 | $as_echo_n "(cached) " >&6 |
| 11638 | else |
| 11639 | ac_check_lib_save_LIBS=$LIBS |
| 11640 | LIBS="-lbsd $LIBS" |
| 11641 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 11642 | /* end confdefs.h. */ |
| 11643 | |
| 11644 | /* Override any GCC internal prototype to avoid an error. |
| 11645 | Use char because int might match the return type of a GCC |
| 11646 | builtin and then its argument prototype would still apply. */ |
| 11647 | #ifdef __cplusplus |
| 11648 | extern "C" |
| 11649 | #endif |
| 11650 | char flock (); |
| 11651 | int |
| 11652 | main () |
| 11653 | { |
| 11654 | return flock (); |
| 11655 | ; |
| 11656 | return 0; |
| 11657 | } |
| 11658 | _ACEOF |
| 11659 | if ac_fn_c_try_link "$LINENO"; then : |
| 11660 | ac_cv_lib_bsd_flock=yes |
| 11661 | else |
| 11662 | ac_cv_lib_bsd_flock=no |
| 11663 | fi |
| 11664 | rm -f core conftest.err conftest.$ac_objext \ |
| 11665 | conftest$ac_exeext conftest.$ac_ext |
| 11666 | LIBS=$ac_check_lib_save_LIBS |
| 11667 | fi |
| 11668 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5 |
| 11669 | $as_echo "$ac_cv_lib_bsd_flock" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 11670 | if test "x$ac_cv_lib_bsd_flock" = xyes; then : |
Antoine Pitrou | a4e4ae2 | 2010-09-10 18:39:00 +0000 | [diff] [blame] | 11671 | $as_echo "#define HAVE_FLOCK 1" >>confdefs.h |
Antoine Pitrou | a300007 | 2010-09-07 14:52:42 +0000 | [diff] [blame] | 11672 | |
| 11673 | |
| 11674 | $as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h |
| 11675 | |
| 11676 | |
| 11677 | fi |
| 11678 | |
| 11679 | |
| 11680 | fi |
Antoine Pitrou | a4e4ae2 | 2010-09-10 18:39:00 +0000 | [diff] [blame] | 11681 | done |
| 11682 | |
Antoine Pitrou | a300007 | 2010-09-07 14:52:42 +0000 | [diff] [blame] | 11683 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11684 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11685 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5 |
| 11686 | $as_echo_n "checking for getpagesize... " >&6; } |
| 11687 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11688 | /* end confdefs.h. */ |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 11689 | |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 11690 | #include <unistd.h> |
| 11691 | |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 11692 | int |
| 11693 | main () |
| 11694 | { |
| 11695 | void* p = getpagesize |
| 11696 | ; |
| 11697 | return 0; |
| 11698 | } |
| 11699 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11700 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 11701 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11702 | $as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 11703 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 11704 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11705 | $as_echo "yes" >&6; } |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 11706 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11707 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11708 | $as_echo "no" >&6; } |
Martin v. Löwis | f26d63b | 2003-03-30 17:23:49 +0000 | [diff] [blame] | 11709 | |
| 11710 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11711 | 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] | 11712 | |
Victor Stinner | 984890f | 2011-11-24 13:53:38 +0100 | [diff] [blame] | 11713 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5 |
| 11714 | $as_echo_n "checking for broken unsetenv... " >&6; } |
| 11715 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 11716 | /* end confdefs.h. */ |
| 11717 | |
| 11718 | #include <stdlib.h> |
| 11719 | |
| 11720 | int |
| 11721 | main () |
| 11722 | { |
| 11723 | int res = unsetenv("DUMMY") |
| 11724 | ; |
| 11725 | return 0; |
| 11726 | } |
| 11727 | _ACEOF |
| 11728 | if ac_fn_c_try_compile "$LINENO"; then : |
| 11729 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11730 | $as_echo "no" >&6; } |
| 11731 | else |
| 11732 | |
| 11733 | $as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h |
| 11734 | |
| 11735 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 11736 | $as_echo "yes" >&6; } |
| 11737 | |
| 11738 | fi |
| 11739 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 11740 | |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 11741 | for ac_prog in true |
| 11742 | do |
| 11743 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 11744 | set dummy $ac_prog; ac_word=$2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11745 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 11746 | $as_echo_n "checking for $ac_word... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 11747 | if ${ac_cv_prog_TRUE+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11748 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 11749 | else |
| 11750 | if test -n "$TRUE"; then |
| 11751 | ac_cv_prog_TRUE="$TRUE" # Let the user override the test. |
| 11752 | else |
| 11753 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 11754 | for as_dir in $PATH |
| 11755 | do |
| 11756 | IFS=$as_save_IFS |
| 11757 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11758 | for ac_exec_ext in '' $ac_executable_extensions; do |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 11759 | 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] | 11760 | ac_cv_prog_TRUE="$ac_prog" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11761 | $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] | 11762 | break 2 |
| 11763 | fi |
| 11764 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11765 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11766 | IFS=$as_save_IFS |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 11767 | |
| 11768 | fi |
| 11769 | fi |
| 11770 | TRUE=$ac_cv_prog_TRUE |
| 11771 | if test -n "$TRUE"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11772 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5 |
| 11773 | $as_echo "$TRUE" >&6; } |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 11774 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11775 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11776 | $as_echo "no" >&6; } |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 11777 | fi |
| 11778 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11779 | |
Martin v. Löwis | 4ee6eef | 2003-05-26 05:37:51 +0000 | [diff] [blame] | 11780 | test -n "$TRUE" && break |
| 11781 | done |
| 11782 | test -n "$TRUE" || TRUE="/bin/true" |
| 11783 | |
| 11784 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11785 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5 |
| 11786 | $as_echo_n "checking for inet_aton in -lc... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 11787 | if ${ac_cv_lib_c_inet_aton+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11788 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 11789 | else |
| 11790 | ac_check_lib_save_LIBS=$LIBS |
| 11791 | LIBS="-lc $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11792 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11793 | /* end confdefs.h. */ |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 11794 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11795 | /* Override any GCC internal prototype to avoid an error. |
| 11796 | Use char because int might match the return type of a GCC |
| 11797 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 11798 | #ifdef __cplusplus |
| 11799 | extern "C" |
| 11800 | #endif |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 11801 | char inet_aton (); |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 11802 | int |
| 11803 | main () |
| 11804 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11805 | return inet_aton (); |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 11806 | ; |
| 11807 | return 0; |
| 11808 | } |
| 11809 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11810 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 11811 | ac_cv_lib_c_inet_aton=yes |
| 11812 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11813 | ac_cv_lib_c_inet_aton=no |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 11814 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11815 | rm -f core conftest.err conftest.$ac_objext \ |
| 11816 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 11817 | LIBS=$ac_check_lib_save_LIBS |
| 11818 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11819 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5 |
| 11820 | $as_echo "$ac_cv_lib_c_inet_aton" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 11821 | 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] | 11822 | $ac_cv_prog_TRUE |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 11823 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11824 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5 |
| 11825 | $as_echo_n "checking for inet_aton in -lresolv... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 11826 | if ${ac_cv_lib_resolv_inet_aton+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11827 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 11828 | else |
| 11829 | ac_check_lib_save_LIBS=$LIBS |
| 11830 | LIBS="-lresolv $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11831 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 11832 | /* end confdefs.h. */ |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 11833 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11834 | /* Override any GCC internal prototype to avoid an error. |
| 11835 | Use char because int might match the return type of a GCC |
| 11836 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 11837 | #ifdef __cplusplus |
| 11838 | extern "C" |
| 11839 | #endif |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 11840 | char inet_aton (); |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 11841 | int |
| 11842 | main () |
| 11843 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11844 | return inet_aton (); |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 11845 | ; |
| 11846 | return 0; |
| 11847 | } |
| 11848 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11849 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 11850 | ac_cv_lib_resolv_inet_aton=yes |
| 11851 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11852 | ac_cv_lib_resolv_inet_aton=no |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 11853 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11854 | rm -f core conftest.err conftest.$ac_objext \ |
| 11855 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 11856 | LIBS=$ac_check_lib_save_LIBS |
| 11857 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11858 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5 |
| 11859 | $as_echo "$ac_cv_lib_resolv_inet_aton" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 11860 | 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] | 11861 | cat >>confdefs.h <<_ACEOF |
| 11862 | #define HAVE_LIBRESOLV 1 |
| 11863 | _ACEOF |
| 11864 | |
| 11865 | LIBS="-lresolv $LIBS" |
| 11866 | |
| 11867 | fi |
| 11868 | |
| 11869 | |
| 11870 | fi |
| 11871 | |
| 11872 | |
Christian Heimes | d0764e2 | 2007-12-04 15:00:33 +0000 | [diff] [blame] | 11873 | # On Tru64, chflags seems to be present, but calling it will |
| 11874 | # exit Python |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11875 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5 |
| 11876 | $as_echo_n "checking for chflags... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 11877 | if ${ac_cv_have_chflags+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11878 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 11879 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11880 | if test "$cross_compiling" = yes; then : |
Benjamin Peterson | ed68afa | 2010-01-30 19:36:43 +0000 | [diff] [blame] | 11881 | ac_cv_have_chflags=cross |
Christian Heimes | d0764e2 | 2007-12-04 15:00:33 +0000 | [diff] [blame] | 11882 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11883 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Christian Heimes | d0764e2 | 2007-12-04 15:00:33 +0000 | [diff] [blame] | 11884 | /* end confdefs.h. */ |
Ned Deily | 3eb67d5 | 2011-06-28 00:00:28 -0700 | [diff] [blame] | 11885 | |
Christian Heimes | d0764e2 | 2007-12-04 15:00:33 +0000 | [diff] [blame] | 11886 | #include <sys/stat.h> |
| 11887 | #include <unistd.h> |
| 11888 | int main(int argc, char*argv[]) |
| 11889 | { |
| 11890 | if(chflags(argv[0], 0) != 0) |
| 11891 | return 1; |
| 11892 | return 0; |
| 11893 | } |
Ned Deily | 3eb67d5 | 2011-06-28 00:00:28 -0700 | [diff] [blame] | 11894 | |
Christian Heimes | d0764e2 | 2007-12-04 15:00:33 +0000 | [diff] [blame] | 11895 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11896 | if ac_fn_c_try_run "$LINENO"; then : |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 11897 | ac_cv_have_chflags=yes |
Alexandre Vassalotti | 1914228 | 2009-07-17 23:11:52 +0000 | [diff] [blame] | 11898 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11899 | ac_cv_have_chflags=no |
Alexandre Vassalotti | 1914228 | 2009-07-17 23:11:52 +0000 | [diff] [blame] | 11900 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11901 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 11902 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 11903 | fi |
| 11904 | |
Alexandre Vassalotti | 1914228 | 2009-07-17 23:11:52 +0000 | [diff] [blame] | 11905 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 11906 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11907 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5 |
| 11908 | $as_echo "$ac_cv_have_chflags" >&6; } |
Benjamin Peterson | ed68afa | 2010-01-30 19:36:43 +0000 | [diff] [blame] | 11909 | if test "$ac_cv_have_chflags" = cross ; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11910 | ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 11911 | if test "x$ac_cv_func_chflags" = xyes; then : |
Benjamin Peterson | ed68afa | 2010-01-30 19:36:43 +0000 | [diff] [blame] | 11912 | ac_cv_have_chflags="yes" |
| 11913 | else |
| 11914 | ac_cv_have_chflags="no" |
| 11915 | fi |
| 11916 | |
| 11917 | fi |
| 11918 | if test "$ac_cv_have_chflags" = yes ; then |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 11919 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11920 | $as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 11921 | |
| 11922 | fi |
| 11923 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11924 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5 |
| 11925 | $as_echo_n "checking for lchflags... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 11926 | if ${ac_cv_have_lchflags+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11927 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 11928 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11929 | if test "$cross_compiling" = yes; then : |
Benjamin Peterson | ed68afa | 2010-01-30 19:36:43 +0000 | [diff] [blame] | 11930 | ac_cv_have_lchflags=cross |
Christian Heimes | d0764e2 | 2007-12-04 15:00:33 +0000 | [diff] [blame] | 11931 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11932 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Christian Heimes | d0764e2 | 2007-12-04 15:00:33 +0000 | [diff] [blame] | 11933 | /* end confdefs.h. */ |
Ned Deily | 3eb67d5 | 2011-06-28 00:00:28 -0700 | [diff] [blame] | 11934 | |
Christian Heimes | d0764e2 | 2007-12-04 15:00:33 +0000 | [diff] [blame] | 11935 | #include <sys/stat.h> |
| 11936 | #include <unistd.h> |
| 11937 | int main(int argc, char*argv[]) |
| 11938 | { |
| 11939 | if(lchflags(argv[0], 0) != 0) |
| 11940 | return 1; |
| 11941 | return 0; |
| 11942 | } |
Ned Deily | 3eb67d5 | 2011-06-28 00:00:28 -0700 | [diff] [blame] | 11943 | |
Christian Heimes | d0764e2 | 2007-12-04 15:00:33 +0000 | [diff] [blame] | 11944 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11945 | if ac_fn_c_try_run "$LINENO"; then : |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 11946 | ac_cv_have_lchflags=yes |
Alexandre Vassalotti | 1914228 | 2009-07-17 23:11:52 +0000 | [diff] [blame] | 11947 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11948 | ac_cv_have_lchflags=no |
Christian Heimes | d0764e2 | 2007-12-04 15:00:33 +0000 | [diff] [blame] | 11949 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11950 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 11951 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Alexandre Vassalotti | 1914228 | 2009-07-17 23:11:52 +0000 | [diff] [blame] | 11952 | fi |
| 11953 | |
| 11954 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 11955 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11956 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5 |
| 11957 | $as_echo "$ac_cv_have_lchflags" >&6; } |
Benjamin Peterson | ed68afa | 2010-01-30 19:36:43 +0000 | [diff] [blame] | 11958 | if test "$ac_cv_have_lchflags" = cross ; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11959 | ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 11960 | if test "x$ac_cv_func_lchflags" = xyes; then : |
Benjamin Peterson | ed68afa | 2010-01-30 19:36:43 +0000 | [diff] [blame] | 11961 | ac_cv_have_lchflags="yes" |
| 11962 | else |
| 11963 | ac_cv_have_lchflags="no" |
| 11964 | fi |
| 11965 | |
| 11966 | fi |
| 11967 | if test "$ac_cv_have_lchflags" = yes ; then |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 11968 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11969 | $as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 11970 | |
| 11971 | fi |
| 11972 | |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 11973 | case $ac_sys_system/$ac_sys_release in |
| 11974 | Darwin/*) |
| 11975 | _CUR_CFLAGS="${CFLAGS}" |
| 11976 | _CUR_LDFLAGS="${LDFLAGS}" |
| 11977 | CFLAGS="${CFLAGS} -Wl,-search_paths_first" |
| 11978 | LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib" |
| 11979 | ;; |
| 11980 | esac |
| 11981 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11982 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5 |
| 11983 | $as_echo_n "checking for inflateCopy in -lz... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 11984 | if ${ac_cv_lib_z_inflateCopy+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11985 | $as_echo_n "(cached) " >&6 |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 11986 | else |
| 11987 | ac_check_lib_save_LIBS=$LIBS |
| 11988 | LIBS="-lz $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 11989 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 11990 | /* end confdefs.h. */ |
| 11991 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 11992 | /* Override any GCC internal prototype to avoid an error. |
| 11993 | Use char because int might match the return type of a GCC |
| 11994 | builtin and then its argument prototype would still apply. */ |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 11995 | #ifdef __cplusplus |
| 11996 | extern "C" |
| 11997 | #endif |
| 11998 | char inflateCopy (); |
| 11999 | int |
| 12000 | main () |
| 12001 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12002 | return inflateCopy (); |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 12003 | ; |
| 12004 | return 0; |
| 12005 | } |
| 12006 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12007 | if ac_fn_c_try_link "$LINENO"; then : |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 12008 | ac_cv_lib_z_inflateCopy=yes |
| 12009 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12010 | ac_cv_lib_z_inflateCopy=no |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 12011 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12012 | rm -f core conftest.err conftest.$ac_objext \ |
| 12013 | conftest$ac_exeext conftest.$ac_ext |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 12014 | LIBS=$ac_check_lib_save_LIBS |
| 12015 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12016 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5 |
| 12017 | $as_echo "$ac_cv_lib_z_inflateCopy" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12018 | if test "x$ac_cv_lib_z_inflateCopy" = xyes; then : |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 12019 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12020 | $as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 12021 | |
| 12022 | fi |
| 12023 | |
| 12024 | |
| 12025 | case $ac_sys_system/$ac_sys_release in |
| 12026 | Darwin/*) |
| 12027 | CFLAGS="${_CUR_CFLAGS}" |
| 12028 | LDFLAGS="${_CUR_LDFLAGS}" |
| 12029 | ;; |
| 12030 | esac |
| 12031 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12032 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5 |
| 12033 | $as_echo_n "checking for hstrerror... " >&6; } |
| 12034 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12035 | /* end confdefs.h. */ |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12036 | |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12037 | #include <netdb.h> |
| 12038 | |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12039 | int |
| 12040 | main () |
| 12041 | { |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12042 | void* p = hstrerror; hstrerror(0) |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12043 | ; |
| 12044 | return 0; |
| 12045 | } |
| 12046 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12047 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12048 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12049 | $as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12050 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 12051 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12052 | $as_echo "yes" >&6; } |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12053 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12054 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 12055 | $as_echo "no" >&6; } |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12056 | |
| 12057 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12058 | rm -f core conftest.err conftest.$ac_objext \ |
| 12059 | conftest$ac_exeext conftest.$ac_ext |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12060 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12061 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5 |
| 12062 | $as_echo_n "checking for inet_aton... " >&6; } |
| 12063 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12064 | /* end confdefs.h. */ |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12065 | |
Martin v. Löwis | 86d6626 | 2006-02-17 08:40:11 +0000 | [diff] [blame] | 12066 | #include <sys/types.h> |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12067 | #include <sys/socket.h> |
| 12068 | #include <netinet/in.h> |
| 12069 | #include <arpa/inet.h> |
| 12070 | |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12071 | int |
| 12072 | main () |
| 12073 | { |
Martin v. Löwis | 95c419b | 2003-05-03 12:10:48 +0000 | [diff] [blame] | 12074 | void* p = inet_aton;inet_aton(0,0) |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12075 | ; |
| 12076 | return 0; |
| 12077 | } |
| 12078 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12079 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12080 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12081 | $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12082 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 12083 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12084 | $as_echo "yes" >&6; } |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12085 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12086 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 12087 | $as_echo "no" >&6; } |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12088 | |
| 12089 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12090 | rm -f core conftest.err conftest.$ac_objext \ |
| 12091 | conftest$ac_exeext conftest.$ac_ext |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12092 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12093 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5 |
| 12094 | $as_echo_n "checking for inet_pton... " >&6; } |
| 12095 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12096 | /* end confdefs.h. */ |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12097 | |
Martin v. Löwis | f2e488d | 2003-05-05 22:00:11 +0000 | [diff] [blame] | 12098 | #include <sys/types.h> |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12099 | #include <sys/socket.h> |
| 12100 | #include <netinet/in.h> |
| 12101 | #include <arpa/inet.h> |
| 12102 | |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12103 | int |
| 12104 | main () |
| 12105 | { |
| 12106 | void* p = inet_pton |
| 12107 | ; |
| 12108 | return 0; |
| 12109 | } |
| 12110 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12111 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12112 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12113 | $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12114 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 12115 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12116 | $as_echo "yes" >&6; } |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12117 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12118 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 12119 | $as_echo "no" >&6; } |
Martin v. Löwis | e941617 | 2003-05-03 10:12:45 +0000 | [diff] [blame] | 12120 | |
| 12121 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12122 | 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] | 12123 | |
Martin v. Löwis | d6640d4 | 2003-07-06 09:29:52 +0000 | [diff] [blame] | 12124 | # 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] | 12125 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5 |
| 12126 | $as_echo_n "checking for setgroups... " >&6; } |
| 12127 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12128 | /* end confdefs.h. */ |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 12129 | |
Martin v. Löwis | f2e488d | 2003-05-05 22:00:11 +0000 | [diff] [blame] | 12130 | #include <unistd.h> |
Martin v. Löwis | d6640d4 | 2003-07-06 09:29:52 +0000 | [diff] [blame] | 12131 | #ifdef HAVE_GRP_H |
| 12132 | #include <grp.h> |
| 12133 | #endif |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 12134 | |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 12135 | int |
| 12136 | main () |
| 12137 | { |
| 12138 | void* p = setgroups |
| 12139 | ; |
| 12140 | return 0; |
| 12141 | } |
| 12142 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12143 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 12144 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12145 | $as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 12146 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 12147 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12148 | $as_echo "yes" >&6; } |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 12149 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12150 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 12151 | $as_echo "no" >&6; } |
Martin v. Löwis | d584368 | 2002-11-21 20:41:28 +0000 | [diff] [blame] | 12152 | |
| 12153 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12154 | 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] | 12155 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 12156 | # check for openpty and forkpty |
| 12157 | |
| 12158 | for ac_func in openpty |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12159 | do : |
| 12160 | ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12161 | if test "x$ac_cv_func_openpty" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12162 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12163 | #define HAVE_OPENPTY 1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12164 | _ACEOF |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 12165 | |
Guido van Rossum | d0b69ec | 2001-09-10 14:10:54 +0000 | [diff] [blame] | 12166 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12167 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5 |
| 12168 | $as_echo_n "checking for openpty in -lutil... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12169 | if ${ac_cv_lib_util_openpty+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12170 | $as_echo_n "(cached) " >&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12171 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12172 | ac_check_lib_save_LIBS=$LIBS |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12173 | LIBS="-lutil $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12174 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12175 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12176 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12177 | /* Override any GCC internal prototype to avoid an error. |
| 12178 | Use char because int might match the return type of a GCC |
| 12179 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12180 | #ifdef __cplusplus |
| 12181 | extern "C" |
| 12182 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12183 | char openpty (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12184 | int |
| 12185 | main () |
| 12186 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12187 | return openpty (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12188 | ; |
| 12189 | return 0; |
| 12190 | } |
| 12191 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12192 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12193 | ac_cv_lib_util_openpty=yes |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12194 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12195 | ac_cv_lib_util_openpty=no |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12196 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12197 | rm -f core conftest.err conftest.$ac_objext \ |
| 12198 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12199 | LIBS=$ac_check_lib_save_LIBS |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12200 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12201 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5 |
| 12202 | $as_echo "$ac_cv_lib_util_openpty" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12203 | if test "x$ac_cv_lib_util_openpty" = xyes; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12204 | $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12205 | LIBS="$LIBS -lutil" |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12206 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12207 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5 |
| 12208 | $as_echo_n "checking for openpty in -lbsd... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12209 | if ${ac_cv_lib_bsd_openpty+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12210 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12211 | else |
| 12212 | ac_check_lib_save_LIBS=$LIBS |
| 12213 | LIBS="-lbsd $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12214 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12215 | /* end confdefs.h. */ |
| 12216 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12217 | /* Override any GCC internal prototype to avoid an error. |
| 12218 | Use char because int might match the return type of a GCC |
| 12219 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12220 | #ifdef __cplusplus |
| 12221 | extern "C" |
| 12222 | #endif |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12223 | char openpty (); |
| 12224 | int |
| 12225 | main () |
| 12226 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12227 | return openpty (); |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12228 | ; |
| 12229 | return 0; |
| 12230 | } |
| 12231 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12232 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12233 | ac_cv_lib_bsd_openpty=yes |
| 12234 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12235 | ac_cv_lib_bsd_openpty=no |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12236 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12237 | rm -f core conftest.err conftest.$ac_objext \ |
| 12238 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12239 | LIBS=$ac_check_lib_save_LIBS |
| 12240 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12241 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5 |
| 12242 | $as_echo "$ac_cv_lib_bsd_openpty" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12243 | if test "x$ac_cv_lib_bsd_openpty" = xyes; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12244 | $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12245 | LIBS="$LIBS -lbsd" |
| 12246 | fi |
| 12247 | |
| 12248 | |
| 12249 | fi |
| 12250 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12251 | |
| 12252 | fi |
| 12253 | done |
| 12254 | |
| 12255 | for ac_func in forkpty |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12256 | do : |
| 12257 | ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12258 | if test "x$ac_cv_func_forkpty" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12259 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12260 | #define HAVE_FORKPTY 1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12261 | _ACEOF |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12262 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12263 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12264 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5 |
| 12265 | $as_echo_n "checking for forkpty in -lutil... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12266 | if ${ac_cv_lib_util_forkpty+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12267 | $as_echo_n "(cached) " >&6 |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12268 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12269 | ac_check_lib_save_LIBS=$LIBS |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12270 | LIBS="-lutil $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12271 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12272 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12273 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12274 | /* Override any GCC internal prototype to avoid an error. |
| 12275 | Use char because int might match the return type of a GCC |
| 12276 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12277 | #ifdef __cplusplus |
| 12278 | extern "C" |
| 12279 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12280 | char forkpty (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12281 | int |
| 12282 | main () |
| 12283 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12284 | return forkpty (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12285 | ; |
| 12286 | return 0; |
| 12287 | } |
| 12288 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12289 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12290 | ac_cv_lib_util_forkpty=yes |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12291 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12292 | ac_cv_lib_util_forkpty=no |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12293 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12294 | rm -f core conftest.err conftest.$ac_objext \ |
| 12295 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12296 | LIBS=$ac_check_lib_save_LIBS |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12297 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12298 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5 |
| 12299 | $as_echo "$ac_cv_lib_util_forkpty" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12300 | if test "x$ac_cv_lib_util_forkpty" = xyes; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12301 | $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12302 | LIBS="$LIBS -lutil" |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12303 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12304 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5 |
| 12305 | $as_echo_n "checking for forkpty in -lbsd... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12306 | if ${ac_cv_lib_bsd_forkpty+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12307 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12308 | else |
| 12309 | ac_check_lib_save_LIBS=$LIBS |
| 12310 | LIBS="-lbsd $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12311 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12312 | /* end confdefs.h. */ |
| 12313 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12314 | /* Override any GCC internal prototype to avoid an error. |
| 12315 | Use char because int might match the return type of a GCC |
| 12316 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12317 | #ifdef __cplusplus |
| 12318 | extern "C" |
| 12319 | #endif |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12320 | char forkpty (); |
| 12321 | int |
| 12322 | main () |
| 12323 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12324 | return forkpty (); |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12325 | ; |
| 12326 | return 0; |
| 12327 | } |
| 12328 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12329 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12330 | ac_cv_lib_bsd_forkpty=yes |
| 12331 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12332 | ac_cv_lib_bsd_forkpty=no |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12333 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12334 | rm -f core conftest.err conftest.$ac_objext \ |
| 12335 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12336 | LIBS=$ac_check_lib_save_LIBS |
| 12337 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12338 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5 |
| 12339 | $as_echo "$ac_cv_lib_bsd_forkpty" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12340 | if test "x$ac_cv_lib_bsd_forkpty" = xyes; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12341 | $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h |
Martin v. Löwis | fd9a72a | 2006-01-08 10:07:33 +0000 | [diff] [blame] | 12342 | LIBS="$LIBS -lbsd" |
| 12343 | fi |
| 12344 | |
| 12345 | |
| 12346 | fi |
| 12347 | |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12348 | |
| 12349 | fi |
| 12350 | done |
| 12351 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 12352 | |
Christian Heimes | b186d00 | 2008-03-18 15:15:01 +0000 | [diff] [blame] | 12353 | # Stuff for expat. |
Christian Heimes | b186d00 | 2008-03-18 15:15:01 +0000 | [diff] [blame] | 12354 | for ac_func in memmove |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12355 | do : |
| 12356 | ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12357 | if test "x$ac_cv_func_memmove" = xyes; then : |
Christian Heimes | b186d00 | 2008-03-18 15:15:01 +0000 | [diff] [blame] | 12358 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12359 | #define HAVE_MEMMOVE 1 |
Christian Heimes | b186d00 | 2008-03-18 15:15:01 +0000 | [diff] [blame] | 12360 | _ACEOF |
| 12361 | |
| 12362 | fi |
| 12363 | done |
| 12364 | |
| 12365 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 12366 | # check for long file support functions |
Fred Drake | 8cef4cf | 2000-06-28 16:40:38 +0000 | [diff] [blame] | 12367 | for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12368 | do : |
| 12369 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
| 12370 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 12371 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12372 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12373 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12374 | _ACEOF |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 12375 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 12376 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 12377 | done |
| 12378 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 12379 | |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 12380 | ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12381 | if test "x$ac_cv_func_dup2" = xyes; then : |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 12382 | $as_echo "#define HAVE_DUP2 1" >>confdefs.h |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 12383 | |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 12384 | else |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12385 | case " $LIBOBJS " in |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 12386 | *" dup2.$ac_objext "* ) ;; |
| 12387 | *) LIBOBJS="$LIBOBJS dup2.$ac_objext" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12388 | ;; |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 12389 | esac |
| 12390 | |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 12391 | fi |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 12392 | |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 12393 | ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12394 | if test "x$ac_cv_func_strdup" = xyes; then : |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 12395 | $as_echo "#define HAVE_STRDUP 1" >>confdefs.h |
| 12396 | |
| 12397 | else |
| 12398 | case " $LIBOBJS " in |
| 12399 | *" strdup.$ac_objext "* ) ;; |
| 12400 | *) LIBOBJS="$LIBOBJS strdup.$ac_objext" |
| 12401 | ;; |
| 12402 | esac |
| 12403 | |
| 12404 | fi |
Martin v. Löwis | 1142de3 | 2002-03-29 16:28:31 +0000 | [diff] [blame] | 12405 | |
| 12406 | |
| 12407 | for ac_func in getpgrp |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12408 | do : |
| 12409 | ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12410 | if test "x$ac_cv_func_getpgrp" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12411 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12412 | #define HAVE_GETPGRP 1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12413 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12414 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12415 | /* end confdefs.h. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 12416 | #include <unistd.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12417 | int |
| 12418 | main () |
| 12419 | { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 12420 | getpgrp(0); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12421 | ; |
| 12422 | return 0; |
| 12423 | } |
| 12424 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12425 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12426 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12427 | $as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12428 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 12429 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12430 | 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] | 12431 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 12432 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 12433 | done |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 12434 | |
Jack Jansen | 150753c | 2003-03-29 22:07:47 +0000 | [diff] [blame] | 12435 | for ac_func in setpgrp |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12436 | do : |
| 12437 | ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12438 | if test "x$ac_cv_func_setpgrp" = xyes; then : |
Jack Jansen | 150753c | 2003-03-29 22:07:47 +0000 | [diff] [blame] | 12439 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12440 | #define HAVE_SETPGRP 1 |
Jack Jansen | 150753c | 2003-03-29 22:07:47 +0000 | [diff] [blame] | 12441 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12442 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12443 | /* end confdefs.h. */ |
Jack Jansen | 150753c | 2003-03-29 22:07:47 +0000 | [diff] [blame] | 12444 | #include <unistd.h> |
Jack Jansen | 150753c | 2003-03-29 22:07:47 +0000 | [diff] [blame] | 12445 | int |
| 12446 | main () |
| 12447 | { |
| 12448 | setpgrp(0,0); |
| 12449 | ; |
| 12450 | return 0; |
| 12451 | } |
| 12452 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12453 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12454 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12455 | $as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12456 | |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 12457 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12458 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Jack Jansen | 150753c | 2003-03-29 22:07:47 +0000 | [diff] [blame] | 12459 | |
| 12460 | fi |
| 12461 | done |
Guido van Rossum | 8eee56f | 1994-10-20 22:18:37 +0000 | [diff] [blame] | 12462 | |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 12463 | for ac_func in gettimeofday |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12464 | do : |
| 12465 | ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12466 | if test "x$ac_cv_func_gettimeofday" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12467 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12468 | #define HAVE_GETTIMEOFDAY 1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12469 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12470 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12471 | /* end confdefs.h. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 12472 | #include <sys/time.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12473 | int |
| 12474 | main () |
| 12475 | { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 12476 | gettimeofday((struct timeval*)0,(struct timezone*)0); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12477 | ; |
| 12478 | return 0; |
| 12479 | } |
| 12480 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12481 | if ac_fn_c_try_compile "$LINENO"; then : |
| 12482 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 12483 | else |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12484 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12485 | $as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 12486 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12487 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 12488 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12489 | 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] | 12490 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 12491 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 12492 | done |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 12493 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 12494 | |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12495 | for ac_func in clock_gettime |
| 12496 | do : |
| 12497 | ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" |
| 12498 | if test "x$ac_cv_func_clock_gettime" = xyes; then : |
| 12499 | cat >>confdefs.h <<_ACEOF |
| 12500 | #define HAVE_CLOCK_GETTIME 1 |
| 12501 | _ACEOF |
| 12502 | |
| 12503 | else |
| 12504 | |
| 12505 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 |
| 12506 | $as_echo_n "checking for clock_gettime in -lrt... " >&6; } |
| 12507 | if ${ac_cv_lib_rt_clock_gettime+:} false; then : |
| 12508 | $as_echo_n "(cached) " >&6 |
| 12509 | else |
| 12510 | ac_check_lib_save_LIBS=$LIBS |
| 12511 | LIBS="-lrt $LIBS" |
| 12512 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12513 | /* end confdefs.h. */ |
| 12514 | |
| 12515 | /* Override any GCC internal prototype to avoid an error. |
| 12516 | Use char because int might match the return type of a GCC |
| 12517 | builtin and then its argument prototype would still apply. */ |
| 12518 | #ifdef __cplusplus |
| 12519 | extern "C" |
| 12520 | #endif |
| 12521 | char clock_gettime (); |
| 12522 | int |
| 12523 | main () |
| 12524 | { |
| 12525 | return clock_gettime (); |
| 12526 | ; |
| 12527 | return 0; |
| 12528 | } |
| 12529 | _ACEOF |
| 12530 | if ac_fn_c_try_link "$LINENO"; then : |
| 12531 | ac_cv_lib_rt_clock_gettime=yes |
| 12532 | else |
| 12533 | ac_cv_lib_rt_clock_gettime=no |
| 12534 | fi |
| 12535 | rm -f core conftest.err conftest.$ac_objext \ |
| 12536 | conftest$ac_exeext conftest.$ac_ext |
| 12537 | LIBS=$ac_check_lib_save_LIBS |
| 12538 | fi |
| 12539 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 |
| 12540 | $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } |
| 12541 | if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : |
| 12542 | |
Victor Stinner | 7efb833 | 2014-08-29 15:41:08 +0200 | [diff] [blame] | 12543 | LIBS="$LIBS -lrt" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12544 | $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h |
| 12545 | |
| 12546 | |
| 12547 | $as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h |
| 12548 | |
| 12549 | |
| 12550 | fi |
| 12551 | |
| 12552 | |
| 12553 | fi |
| 12554 | done |
| 12555 | |
| 12556 | |
| 12557 | for ac_func in clock_getres |
| 12558 | do : |
| 12559 | ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres" |
| 12560 | if test "x$ac_cv_func_clock_getres" = xyes; then : |
| 12561 | cat >>confdefs.h <<_ACEOF |
| 12562 | #define HAVE_CLOCK_GETRES 1 |
| 12563 | _ACEOF |
| 12564 | |
| 12565 | else |
| 12566 | |
| 12567 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5 |
| 12568 | $as_echo_n "checking for clock_getres in -lrt... " >&6; } |
| 12569 | if ${ac_cv_lib_rt_clock_getres+:} false; then : |
| 12570 | $as_echo_n "(cached) " >&6 |
| 12571 | else |
| 12572 | ac_check_lib_save_LIBS=$LIBS |
| 12573 | LIBS="-lrt $LIBS" |
| 12574 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12575 | /* end confdefs.h. */ |
| 12576 | |
| 12577 | /* Override any GCC internal prototype to avoid an error. |
| 12578 | Use char because int might match the return type of a GCC |
| 12579 | builtin and then its argument prototype would still apply. */ |
| 12580 | #ifdef __cplusplus |
| 12581 | extern "C" |
| 12582 | #endif |
| 12583 | char clock_getres (); |
| 12584 | int |
| 12585 | main () |
| 12586 | { |
| 12587 | return clock_getres (); |
| 12588 | ; |
| 12589 | return 0; |
| 12590 | } |
| 12591 | _ACEOF |
| 12592 | if ac_fn_c_try_link "$LINENO"; then : |
| 12593 | ac_cv_lib_rt_clock_getres=yes |
| 12594 | else |
| 12595 | ac_cv_lib_rt_clock_getres=no |
| 12596 | fi |
| 12597 | rm -f core conftest.err conftest.$ac_objext \ |
| 12598 | conftest$ac_exeext conftest.$ac_ext |
| 12599 | LIBS=$ac_check_lib_save_LIBS |
| 12600 | fi |
| 12601 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5 |
| 12602 | $as_echo "$ac_cv_lib_rt_clock_getres" >&6; } |
| 12603 | if test "x$ac_cv_lib_rt_clock_getres" = xyes; then : |
| 12604 | |
| 12605 | $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h |
| 12606 | |
| 12607 | |
| 12608 | fi |
| 12609 | |
| 12610 | |
| 12611 | fi |
| 12612 | done |
| 12613 | |
| 12614 | |
Benjamin Peterson | 37098cd | 2016-09-13 22:55:09 -0700 | [diff] [blame] | 12615 | for ac_func in clock_settime |
| 12616 | do : |
| 12617 | ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime" |
| 12618 | if test "x$ac_cv_func_clock_settime" = xyes; then : |
| 12619 | cat >>confdefs.h <<_ACEOF |
| 12620 | #define HAVE_CLOCK_SETTIME 1 |
| 12621 | _ACEOF |
| 12622 | |
| 12623 | else |
| 12624 | |
| 12625 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5 |
| 12626 | $as_echo_n "checking for clock_settime in -lrt... " >&6; } |
| 12627 | if ${ac_cv_lib_rt_clock_settime+:} false; then : |
| 12628 | $as_echo_n "(cached) " >&6 |
| 12629 | else |
| 12630 | ac_check_lib_save_LIBS=$LIBS |
| 12631 | LIBS="-lrt $LIBS" |
| 12632 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12633 | /* end confdefs.h. */ |
| 12634 | |
| 12635 | /* Override any GCC internal prototype to avoid an error. |
| 12636 | Use char because int might match the return type of a GCC |
| 12637 | builtin and then its argument prototype would still apply. */ |
| 12638 | #ifdef __cplusplus |
| 12639 | extern "C" |
| 12640 | #endif |
| 12641 | char clock_settime (); |
| 12642 | int |
| 12643 | main () |
| 12644 | { |
| 12645 | return clock_settime (); |
| 12646 | ; |
| 12647 | return 0; |
| 12648 | } |
| 12649 | _ACEOF |
| 12650 | if ac_fn_c_try_link "$LINENO"; then : |
| 12651 | ac_cv_lib_rt_clock_settime=yes |
| 12652 | else |
| 12653 | ac_cv_lib_rt_clock_settime=no |
| 12654 | fi |
| 12655 | rm -f core conftest.err conftest.$ac_objext \ |
| 12656 | conftest$ac_exeext conftest.$ac_ext |
| 12657 | LIBS=$ac_check_lib_save_LIBS |
| 12658 | fi |
| 12659 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5 |
| 12660 | $as_echo "$ac_cv_lib_rt_clock_settime" >&6; } |
| 12661 | if test "x$ac_cv_lib_rt_clock_settime" = xyes; then : |
| 12662 | |
| 12663 | $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h |
| 12664 | |
| 12665 | |
| 12666 | fi |
| 12667 | |
| 12668 | |
| 12669 | fi |
| 12670 | done |
| 12671 | |
| 12672 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12673 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5 |
| 12674 | $as_echo_n "checking for major... " >&6; } |
| 12675 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12676 | /* end confdefs.h. */ |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 12677 | |
Neal Norwitz | 6eb37f0 | 2003-02-23 23:28:15 +0000 | [diff] [blame] | 12678 | #if defined(MAJOR_IN_MKDEV) |
| 12679 | #include <sys/mkdev.h> |
| 12680 | #elif defined(MAJOR_IN_SYSMACROS) |
| 12681 | #include <sys/sysmacros.h> |
| 12682 | #else |
| 12683 | #include <sys/types.h> |
| 12684 | #endif |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 12685 | |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 12686 | int |
| 12687 | main () |
| 12688 | { |
| 12689 | |
| 12690 | makedev(major(0),minor(0)); |
| 12691 | |
| 12692 | ; |
| 12693 | return 0; |
| 12694 | } |
| 12695 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12696 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 12697 | |
| 12698 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12699 | $as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 12700 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12701 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 12702 | $as_echo "yes" >&6; } |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 12703 | |
| 12704 | else |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12705 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12706 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 12707 | $as_echo "no" >&6; } |
Martin v. Löwis | dbe3f76 | 2002-10-10 14:27:30 +0000 | [diff] [blame] | 12708 | |
| 12709 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12710 | rm -f core conftest.err conftest.$ac_objext \ |
| 12711 | conftest$ac_exeext conftest.$ac_ext |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 12712 | |
Xavier de Gaye | 40e320b | 2016-12-21 17:29:59 +0100 | [diff] [blame] | 12713 | # On Android API level 24 with android-ndk-r13, if_nameindex() is available, |
| 12714 | # but the if_nameindex structure is not defined. |
Xavier de Gaye | 7087842 | 2016-12-21 12:46:36 +0100 | [diff] [blame] | 12715 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5 |
| 12716 | $as_echo_n "checking for if_nameindex... " >&6; } |
| 12717 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12718 | /* end confdefs.h. */ |
| 12719 | |
Xavier de Gaye | 40e320b | 2016-12-21 17:29:59 +0100 | [diff] [blame] | 12720 | #include <stdio.h> |
| 12721 | #ifdef STDC_HEADERS |
| 12722 | # include <stdlib.h> |
| 12723 | # include <stddef.h> |
| 12724 | #else |
| 12725 | # ifdef HAVE_STDLIB_H |
| 12726 | # include <stdlib.h> |
| 12727 | # endif |
| 12728 | #endif |
| 12729 | #ifdef HAVE_SYS_SOCKET_H |
| 12730 | # include <sys/socket.h> |
| 12731 | #endif |
Xavier de Gaye | 7087842 | 2016-12-21 12:46:36 +0100 | [diff] [blame] | 12732 | #ifdef HAVE_NET_IF_H |
| 12733 | # include <net/if.h> |
| 12734 | #endif |
| 12735 | |
| 12736 | int |
| 12737 | main () |
| 12738 | { |
| 12739 | struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index; |
| 12740 | ; |
| 12741 | return 0; |
| 12742 | } |
| 12743 | _ACEOF |
| 12744 | if ac_fn_c_try_link "$LINENO"; then : |
| 12745 | |
| 12746 | $as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h |
| 12747 | |
| 12748 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 12749 | $as_echo "yes" >&6; } |
| 12750 | else |
| 12751 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 12752 | $as_echo "no" >&6; } |
| 12753 | |
| 12754 | fi |
| 12755 | rm -f core conftest.err conftest.$ac_objext \ |
| 12756 | conftest$ac_exeext conftest.$ac_ext |
| 12757 | |
Xavier de Gaye | bdf0d0f | 2016-12-22 10:38:59 +0100 | [diff] [blame] | 12758 | # Issue #28762: lockf() is available on Android API level 24, but the F_LOCK |
| 12759 | # macro is not defined in android-ndk-r13. |
| 12760 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5 |
| 12761 | $as_echo_n "checking for lockf... " >&6; } |
| 12762 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12763 | /* end confdefs.h. */ |
| 12764 | #include <unistd.h> |
| 12765 | int |
| 12766 | main () |
| 12767 | { |
| 12768 | lockf(0, F_LOCK, 0); |
| 12769 | ; |
| 12770 | return 0; |
| 12771 | } |
| 12772 | _ACEOF |
| 12773 | if ac_fn_c_try_link "$LINENO"; then : |
| 12774 | |
| 12775 | $as_echo "#define HAVE_LOCKF 1" >>confdefs.h |
| 12776 | |
| 12777 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 12778 | $as_echo "yes" >&6; } |
| 12779 | else |
| 12780 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 12781 | $as_echo "no" >&6; } |
| 12782 | |
| 12783 | fi |
| 12784 | rm -f core conftest.err conftest.$ac_objext \ |
| 12785 | conftest$ac_exeext conftest.$ac_ext |
| 12786 | |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 12787 | # 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] | 12788 | # for [no]getaddrinfo in netdb.h. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12789 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5 |
| 12790 | $as_echo_n "checking for getaddrinfo... " >&6; } |
| 12791 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12792 | /* end confdefs.h. */ |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 12793 | |
Martin v. Löwis | c010b6d | 2001-11-09 17:50:52 +0000 | [diff] [blame] | 12794 | #include <sys/types.h> |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 12795 | #include <sys/socket.h> |
| 12796 | #include <netdb.h> |
Martin v. Löwis | c010b6d | 2001-11-09 17:50:52 +0000 | [diff] [blame] | 12797 | #include <stdio.h> |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 12798 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12799 | int |
| 12800 | main () |
| 12801 | { |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 12802 | getaddrinfo(NULL, NULL, NULL, NULL); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12803 | ; |
| 12804 | return 0; |
| 12805 | } |
| 12806 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12807 | if ac_fn_c_try_link "$LINENO"; then : |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 12808 | have_getaddrinfo=yes |
| 12809 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12810 | have_getaddrinfo=no |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 12811 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12812 | rm -f core conftest.err conftest.$ac_objext \ |
| 12813 | conftest$ac_exeext conftest.$ac_ext |
| 12814 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5 |
| 12815 | $as_echo "$have_getaddrinfo" >&6; } |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 12816 | if test $have_getaddrinfo = yes |
| 12817 | then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12818 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5 |
| 12819 | $as_echo_n "checking getaddrinfo bug... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12820 | if ${ac_cv_buggy_getaddrinfo+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12821 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 12822 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12823 | if test "$cross_compiling" = yes; then : |
Matthias Klose | 9635013 | 2012-03-15 20:42:23 +0100 | [diff] [blame] | 12824 | |
| 12825 | if test "${enable_ipv6+set}" = set; then |
| 12826 | ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6" |
| 12827 | else |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 12828 | ac_cv_buggy_getaddrinfo=yes |
Matthias Klose | 9635013 | 2012-03-15 20:42:23 +0100 | [diff] [blame] | 12829 | fi |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 12830 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12831 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12832 | /* end confdefs.h. */ |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 12833 | |
Stefan Krah | 19c2139 | 2012-11-22 23:47:32 +0100 | [diff] [blame] | 12834 | #include <stdio.h> |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 12835 | #include <sys/types.h> |
| 12836 | #include <netdb.h> |
| 12837 | #include <string.h> |
| 12838 | #include <sys/socket.h> |
| 12839 | #include <netinet/in.h> |
| 12840 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 12841 | int main() |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 12842 | { |
| 12843 | int passive, gaierr, inet4 = 0, inet6 = 0; |
| 12844 | struct addrinfo hints, *ai, *aitop; |
| 12845 | char straddr[INET6_ADDRSTRLEN], strport[16]; |
| 12846 | |
| 12847 | for (passive = 0; passive <= 1; passive++) { |
| 12848 | memset(&hints, 0, sizeof(hints)); |
| 12849 | hints.ai_family = AF_UNSPEC; |
| 12850 | hints.ai_flags = passive ? AI_PASSIVE : 0; |
| 12851 | hints.ai_socktype = SOCK_STREAM; |
Hye-Shik Chang | 54f9439 | 2004-04-14 07:55:31 +0000 | [diff] [blame] | 12852 | hints.ai_protocol = IPPROTO_TCP; |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 12853 | if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) { |
| 12854 | (void)gai_strerror(gaierr); |
| 12855 | goto bad; |
| 12856 | } |
| 12857 | for (ai = aitop; ai; ai = ai->ai_next) { |
| 12858 | if (ai->ai_addr == NULL || |
| 12859 | ai->ai_addrlen == 0 || |
| 12860 | getnameinfo(ai->ai_addr, ai->ai_addrlen, |
| 12861 | straddr, sizeof(straddr), strport, sizeof(strport), |
| 12862 | NI_NUMERICHOST|NI_NUMERICSERV) != 0) { |
| 12863 | goto bad; |
| 12864 | } |
| 12865 | switch (ai->ai_family) { |
| 12866 | case AF_INET: |
| 12867 | if (strcmp(strport, "54321") != 0) { |
| 12868 | goto bad; |
| 12869 | } |
| 12870 | if (passive) { |
| 12871 | if (strcmp(straddr, "0.0.0.0") != 0) { |
| 12872 | goto bad; |
| 12873 | } |
| 12874 | } else { |
| 12875 | if (strcmp(straddr, "127.0.0.1") != 0) { |
| 12876 | goto bad; |
| 12877 | } |
| 12878 | } |
| 12879 | inet4++; |
| 12880 | break; |
| 12881 | case AF_INET6: |
| 12882 | if (strcmp(strport, "54321") != 0) { |
| 12883 | goto bad; |
| 12884 | } |
| 12885 | if (passive) { |
| 12886 | if (strcmp(straddr, "::") != 0) { |
| 12887 | goto bad; |
| 12888 | } |
| 12889 | } else { |
| 12890 | if (strcmp(straddr, "::1") != 0) { |
| 12891 | goto bad; |
| 12892 | } |
| 12893 | } |
| 12894 | inet6++; |
| 12895 | break; |
| 12896 | case AF_UNSPEC: |
| 12897 | goto bad; |
| 12898 | break; |
| 12899 | default: |
| 12900 | /* another family support? */ |
| 12901 | break; |
| 12902 | } |
| 12903 | } |
Benjamin Peterson | 01c340d | 2016-09-06 15:54:24 -0700 | [diff] [blame] | 12904 | freeaddrinfo(aitop); |
| 12905 | aitop = NULL; |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 12906 | } |
| 12907 | |
| 12908 | if (!(inet4 == 0 || inet4 == 2)) |
| 12909 | goto bad; |
| 12910 | if (!(inet6 == 0 || inet6 == 2)) |
| 12911 | goto bad; |
| 12912 | |
| 12913 | if (aitop) |
| 12914 | freeaddrinfo(aitop); |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 12915 | return 0; |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 12916 | |
| 12917 | bad: |
| 12918 | if (aitop) |
| 12919 | freeaddrinfo(aitop); |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 12920 | return 1; |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 12921 | } |
| 12922 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12923 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12924 | if ac_fn_c_try_run "$LINENO"; then : |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 12925 | ac_cv_buggy_getaddrinfo=no |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 12926 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12927 | ac_cv_buggy_getaddrinfo=yes |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 12928 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12929 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 12930 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 12931 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12932 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 12933 | fi |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 12934 | |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 12935 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12936 | |
Benjamin Peterson | d4694ed | 2010-11-01 01:44:30 +0000 | [diff] [blame] | 12937 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5 |
| 12938 | $as_echo "$ac_cv_buggy_getaddrinfo" >&6; } |
| 12939 | |
doko@ubuntu.com | 9c7817e | 2012-06-30 17:05:13 +0200 | [diff] [blame] | 12940 | if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 12941 | then |
| 12942 | if test $ipv6 = yes |
| 12943 | then |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 12944 | echo 'Fatal: You must get working getaddrinfo() function.' |
| 12945 | echo ' or you can specify "--disable-ipv6"'. |
| 12946 | exit 1 |
| 12947 | fi |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 12948 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12949 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12950 | $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h |
Martin v. Löwis | 861a65b | 2001-10-24 14:36:00 +0000 | [diff] [blame] | 12951 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 12952 | fi |
Benjamin Peterson | d4694ed | 2010-11-01 01:44:30 +0000 | [diff] [blame] | 12953 | |
Jack Jansen | 9a66b6d | 2001-08-08 13:56:14 +0000 | [diff] [blame] | 12954 | for ac_func in getnameinfo |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12955 | do : |
| 12956 | ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 12957 | if test "x$ac_cv_func_getnameinfo" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12958 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12959 | #define HAVE_GETNAMEINFO 1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12960 | _ACEOF |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 12961 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 12962 | fi |
| 12963 | done |
| 12964 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 12965 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 12966 | # checks for structures |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12967 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 |
| 12968 | $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] | 12969 | if ${ac_cv_header_time+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12970 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 12971 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12972 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 12973 | /* end confdefs.h. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 12974 | #include <sys/types.h> |
| 12975 | #include <sys/time.h> |
| 12976 | #include <time.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12977 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12978 | int |
| 12979 | main () |
| 12980 | { |
| 12981 | if ((struct tm *) 0) |
| 12982 | return 0; |
| 12983 | ; |
| 12984 | return 0; |
| 12985 | } |
| 12986 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12987 | if ac_fn_c_try_compile "$LINENO"; then : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 12988 | ac_cv_header_time=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 12989 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12990 | ac_cv_header_time=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 12991 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 12992 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 12993 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12994 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 |
| 12995 | $as_echo "$ac_cv_header_time" >&6; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 12996 | if test $ac_cv_header_time = yes; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 12997 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 12998 | $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 12999 | |
| 13000 | fi |
| 13001 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13002 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 |
| 13003 | $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] | 13004 | if ${ac_cv_struct_tm+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13005 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13006 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13007 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13008 | /* end confdefs.h. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13009 | #include <sys/types.h> |
| 13010 | #include <time.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13011 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13012 | int |
| 13013 | main () |
| 13014 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13015 | struct tm tm; |
| 13016 | int *p = &tm.tm_sec; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13017 | return !p; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13018 | ; |
| 13019 | return 0; |
| 13020 | } |
| 13021 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13022 | if ac_fn_c_try_compile "$LINENO"; then : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13023 | ac_cv_struct_tm=time.h |
| 13024 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13025 | ac_cv_struct_tm=sys/time.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13026 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13027 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13028 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13029 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 |
| 13030 | $as_echo "$ac_cv_struct_tm" >&6; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 13031 | if test $ac_cv_struct_tm = sys/time.h; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13032 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13033 | $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13034 | |
| 13035 | fi |
| 13036 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13037 | 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] | 13038 | #include <$ac_cv_struct_tm> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13039 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13040 | " |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13041 | 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] | 13042 | |
| 13043 | cat >>confdefs.h <<_ACEOF |
| 13044 | #define HAVE_STRUCT_TM_TM_ZONE 1 |
| 13045 | _ACEOF |
| 13046 | |
| 13047 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13048 | fi |
Guido van Rossum | 48bdbfc | 1996-05-28 22:53:48 +0000 | [diff] [blame] | 13049 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13050 | if test "$ac_cv_member_struct_tm_tm_zone" = yes; then |
| 13051 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13052 | $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13053 | |
| 13054 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13055 | ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h> |
| 13056 | " |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13057 | if test "x$ac_cv_have_decl_tzname" = xyes; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13058 | ac_have_decl=1 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13059 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13060 | ac_have_decl=0 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13061 | fi |
| 13062 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13063 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13064 | #define HAVE_DECL_TZNAME $ac_have_decl |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13065 | _ACEOF |
| 13066 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13067 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 |
| 13068 | $as_echo_n "checking for tzname... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13069 | if ${ac_cv_var_tzname+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13070 | $as_echo_n "(cached) " >&6 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13071 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13072 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13073 | /* end confdefs.h. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13074 | #include <time.h> |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13075 | #if !HAVE_DECL_TZNAME |
| 13076 | extern char *tzname[]; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13077 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13078 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13079 | int |
| 13080 | main () |
| 13081 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13082 | return tzname[0][0]; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13083 | ; |
| 13084 | return 0; |
| 13085 | } |
| 13086 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13087 | if ac_fn_c_try_link "$LINENO"; then : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13088 | ac_cv_var_tzname=yes |
| 13089 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13090 | ac_cv_var_tzname=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13091 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13092 | rm -f core conftest.err conftest.$ac_objext \ |
| 13093 | conftest$ac_exeext conftest.$ac_ext |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13094 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13095 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 |
| 13096 | $as_echo "$ac_cv_var_tzname" >&6; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 13097 | if test $ac_cv_var_tzname = yes; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13098 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13099 | $as_echo "#define HAVE_TZNAME 1" >>confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13100 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13101 | fi |
| 13102 | fi |
| 13103 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13104 | 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] | 13105 | 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] | 13106 | |
| 13107 | cat >>confdefs.h <<_ACEOF |
| 13108 | #define HAVE_STRUCT_STAT_ST_RDEV 1 |
| 13109 | _ACEOF |
| 13110 | |
| 13111 | |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 13112 | fi |
| 13113 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13114 | 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] | 13115 | if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 13116 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13117 | cat >>confdefs.h <<_ACEOF |
| 13118 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 |
| 13119 | _ACEOF |
| 13120 | |
| 13121 | |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 13122 | fi |
| 13123 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13124 | 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] | 13125 | 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] | 13126 | |
| 13127 | cat >>confdefs.h <<_ACEOF |
| 13128 | #define HAVE_STRUCT_STAT_ST_FLAGS 1 |
| 13129 | _ACEOF |
| 13130 | |
| 13131 | |
| 13132 | fi |
| 13133 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13134 | 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] | 13135 | 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] | 13136 | |
| 13137 | cat >>confdefs.h <<_ACEOF |
| 13138 | #define HAVE_STRUCT_STAT_ST_GEN 1 |
| 13139 | _ACEOF |
| 13140 | |
| 13141 | |
| 13142 | fi |
| 13143 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13144 | 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] | 13145 | 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] | 13146 | |
| 13147 | cat >>confdefs.h <<_ACEOF |
| 13148 | #define HAVE_STRUCT_STAT_ST_BIRTHTIME 1 |
| 13149 | _ACEOF |
| 13150 | |
| 13151 | |
| 13152 | fi |
| 13153 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13154 | 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] | 13155 | if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 13156 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13157 | cat >>confdefs.h <<_ACEOF |
| 13158 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 |
| 13159 | _ACEOF |
| 13160 | |
| 13161 | |
Guido van Rossum | 98bf58f | 2001-10-18 20:34:25 +0000 | [diff] [blame] | 13162 | fi |
| 13163 | |
Stefan Krah | 267b639 | 2016-04-26 01:09:18 +0200 | [diff] [blame] | 13164 | ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" " |
| 13165 | #include <sys/types.h> |
| 13166 | #include <pwd.h> |
| 13167 | |
| 13168 | " |
| 13169 | if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then : |
| 13170 | |
| 13171 | cat >>confdefs.h <<_ACEOF |
| 13172 | #define HAVE_STRUCT_PASSWD_PW_GECOS 1 |
| 13173 | _ACEOF |
| 13174 | |
| 13175 | |
| 13176 | fi |
| 13177 | ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" " |
| 13178 | #include <sys/types.h> |
| 13179 | #include <pwd.h> |
| 13180 | |
| 13181 | " |
| 13182 | if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then : |
| 13183 | |
| 13184 | cat >>confdefs.h <<_ACEOF |
| 13185 | #define HAVE_STRUCT_PASSWD_PW_PASSWD 1 |
| 13186 | _ACEOF |
| 13187 | |
| 13188 | |
| 13189 | fi |
| 13190 | |
Zachary Ware | 6a6967e | 2016-10-01 00:47:27 -0500 | [diff] [blame] | 13191 | # Issue #21085: In Cygwin, siginfo_t does not have si_band field. |
| 13192 | ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h> |
| 13193 | " |
| 13194 | if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then : |
| 13195 | |
| 13196 | cat >>confdefs.h <<_ACEOF |
| 13197 | #define HAVE_SIGINFO_T_SI_BAND 1 |
| 13198 | _ACEOF |
| 13199 | |
| 13200 | |
| 13201 | fi |
| 13202 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 13203 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13204 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5 |
| 13205 | $as_echo_n "checking for time.h that defines altzone... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13206 | if ${ac_cv_header_time_altzone+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13207 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13208 | else |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 13209 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13210 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13211 | /* end confdefs.h. */ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13212 | #include <time.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13213 | int |
| 13214 | main () |
| 13215 | { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13216 | return altzone; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13217 | ; |
| 13218 | return 0; |
| 13219 | } |
| 13220 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13221 | if ac_fn_c_try_compile "$LINENO"; then : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13222 | ac_cv_header_time_altzone=yes |
| 13223 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13224 | ac_cv_header_time_altzone=no |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13225 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13226 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 13227 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13228 | fi |
| 13229 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13230 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5 |
| 13231 | $as_echo "$ac_cv_header_time_altzone" >&6; } |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13232 | if test $ac_cv_header_time_altzone = yes; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13233 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13234 | $as_echo "#define HAVE_ALTZONE 1" >>confdefs.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13235 | |
| 13236 | fi |
| 13237 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 13238 | was_it_defined=no |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13239 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5 |
| 13240 | $as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; } |
| 13241 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13242 | /* end confdefs.h. */ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13243 | |
| 13244 | #include <sys/types.h> |
| 13245 | #include <sys/select.h> |
| 13246 | #include <sys/time.h> |
| 13247 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13248 | int |
| 13249 | main () |
| 13250 | { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13251 | ; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13252 | ; |
| 13253 | return 0; |
| 13254 | } |
| 13255 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13256 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13257 | |
| 13258 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13259 | $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] | 13260 | |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 13261 | was_it_defined=yes |
| 13262 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13263 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13264 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13265 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5 |
| 13266 | $as_echo "$was_it_defined" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13267 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13268 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5 |
| 13269 | $as_echo_n "checking for addrinfo... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13270 | if ${ac_cv_struct_addrinfo+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13271 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13272 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13273 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13274 | /* end confdefs.h. */ |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 13275 | #include <netdb.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13276 | int |
| 13277 | main () |
| 13278 | { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13279 | struct addrinfo a |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13280 | ; |
| 13281 | return 0; |
| 13282 | } |
| 13283 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13284 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13285 | ac_cv_struct_addrinfo=yes |
| 13286 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13287 | ac_cv_struct_addrinfo=no |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13288 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13289 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 13290 | fi |
| 13291 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13292 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5 |
| 13293 | $as_echo "$ac_cv_struct_addrinfo" >&6; } |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13294 | if test $ac_cv_struct_addrinfo = yes; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13295 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13296 | $as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13297 | |
| 13298 | fi |
| 13299 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13300 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5 |
| 13301 | $as_echo_n "checking for sockaddr_storage... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13302 | if ${ac_cv_struct_sockaddr_storage+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13303 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13304 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13305 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13306 | /* end confdefs.h. */ |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13307 | |
| 13308 | # include <sys/types.h> |
| 13309 | # include <sys/socket.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13310 | int |
| 13311 | main () |
| 13312 | { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13313 | struct sockaddr_storage s |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13314 | ; |
| 13315 | return 0; |
| 13316 | } |
| 13317 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13318 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13319 | ac_cv_struct_sockaddr_storage=yes |
| 13320 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13321 | ac_cv_struct_sockaddr_storage=no |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13322 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13323 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 13324 | fi |
| 13325 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13326 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5 |
| 13327 | $as_echo "$ac_cv_struct_sockaddr_storage" >&6; } |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13328 | if test $ac_cv_struct_sockaddr_storage = yes; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13329 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13330 | $as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13331 | |
| 13332 | fi |
| 13333 | |
Christian Heimes | dffa394 | 2016-09-05 23:54:41 +0200 | [diff] [blame] | 13334 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5 |
| 13335 | $as_echo_n "checking for sockaddr_alg... " >&6; } |
| 13336 | if ${ac_cv_struct_sockaddr_alg+:} false; then : |
| 13337 | $as_echo_n "(cached) " >&6 |
| 13338 | else |
| 13339 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 13340 | /* end confdefs.h. */ |
| 13341 | |
| 13342 | # include <sys/types.h> |
| 13343 | # include <sys/socket.h> |
| 13344 | # include <linux/if_alg.h> |
| 13345 | int |
| 13346 | main () |
| 13347 | { |
| 13348 | struct sockaddr_alg s |
| 13349 | ; |
| 13350 | return 0; |
| 13351 | } |
| 13352 | _ACEOF |
| 13353 | if ac_fn_c_try_compile "$LINENO"; then : |
| 13354 | ac_cv_struct_sockaddr_alg=yes |
| 13355 | else |
| 13356 | ac_cv_struct_sockaddr_alg=no |
| 13357 | fi |
| 13358 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 13359 | fi |
| 13360 | |
| 13361 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5 |
| 13362 | $as_echo "$ac_cv_struct_sockaddr_alg" >&6; } |
| 13363 | if test $ac_cv_struct_sockaddr_alg = yes; then |
| 13364 | |
| 13365 | $as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h |
| 13366 | |
| 13367 | fi |
| 13368 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13369 | # checks for compiler characteristics |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13370 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13371 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5 |
| 13372 | $as_echo_n "checking whether char is unsigned... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13373 | if ${ac_cv_c_char_unsigned+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13374 | $as_echo_n "(cached) " >&6 |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 13375 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13376 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13377 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13378 | $ac_includes_default |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13379 | int |
| 13380 | main () |
| 13381 | { |
| 13382 | static int test_array [1 - 2 * !(((char) -1) < 0)]; |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 13383 | test_array [0] = 0; |
| 13384 | return test_array [0]; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13385 | |
| 13386 | ; |
| 13387 | return 0; |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 13388 | } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13389 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13390 | if ac_fn_c_try_compile "$LINENO"; then : |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 13391 | ac_cv_c_char_unsigned=no |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13392 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13393 | ac_cv_c_char_unsigned=yes |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13394 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13395 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 13396 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13397 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5 |
| 13398 | $as_echo "$ac_cv_c_char_unsigned" >&6; } |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13399 | if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13400 | $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13401 | |
| 13402 | fi |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13403 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13404 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
| 13405 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13406 | if ${ac_cv_c_const+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13407 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13408 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13409 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13410 | /* end confdefs.h. */ |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13411 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13412 | int |
| 13413 | main () |
| 13414 | { |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 13415 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13416 | #ifndef __cplusplus |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 13417 | /* Ultrix mips cc rejects this sort of thing. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13418 | typedef int charset[2]; |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 13419 | const charset cs = { 0, 0 }; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13420 | /* SunOS 4.1.1 cc rejects this. */ |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13421 | char const *const *pcpcc; |
| 13422 | char **ppc; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13423 | /* NEC SVR4.0.2 mips cc rejects this. */ |
| 13424 | struct point {int x, y;}; |
| 13425 | static struct point const zero = {0,0}; |
| 13426 | /* AIX XL C 1.02.0.0 rejects this. |
| 13427 | It does not let you subtract one const X* pointer from another in |
| 13428 | an arm of an if-expression whose if-part is not a constant |
| 13429 | expression */ |
| 13430 | const char *g = "string"; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13431 | pcpcc = &g + (g ? g-g : 0); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13432 | /* HPUX 7.0 cc rejects these. */ |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13433 | ++pcpcc; |
| 13434 | ppc = (char**) pcpcc; |
| 13435 | pcpcc = (char const *const *) ppc; |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 13436 | { /* SCO 3.2v4 cc rejects this sort of thing. */ |
| 13437 | char tx; |
| 13438 | char *t = &tx; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13439 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13440 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13441 | *t++ = 0; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13442 | if (s) return 0; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13443 | } |
| 13444 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
| 13445 | int x[] = {25, 17}; |
| 13446 | const int *foo = &x[0]; |
| 13447 | ++foo; |
| 13448 | } |
| 13449 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 13450 | typedef const int *iptr; |
| 13451 | iptr p = 0; |
| 13452 | ++p; |
| 13453 | } |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 13454 | { /* 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] | 13455 | "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] | 13456 | struct s { int j; const int *ap[3]; } bx; |
| 13457 | struct s *b = &bx; b->j = 5; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13458 | } |
| 13459 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 13460 | const int foo = 10; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13461 | if (!foo) return 0; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13462 | } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13463 | return !cs[0] && !zero.x; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13464 | #endif |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13465 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13466 | ; |
| 13467 | return 0; |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13468 | } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13469 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13470 | if ac_fn_c_try_compile "$LINENO"; then : |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13471 | ac_cv_c_const=yes |
| 13472 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13473 | ac_cv_c_const=no |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13474 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13475 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13476 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13477 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
| 13478 | $as_echo "$ac_cv_c_const" >&6; } |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13479 | if test $ac_cv_c_const = no; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13480 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13481 | $as_echo "#define const /**/" >>confdefs.h |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13482 | |
| 13483 | fi |
| 13484 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 13485 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 13486 | works=no |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13487 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 |
| 13488 | $as_echo_n "checking for working volatile... " >&6; } |
| 13489 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13490 | /* end confdefs.h. */ |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13491 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13492 | int |
| 13493 | main () |
| 13494 | { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13495 | volatile int x; x = 0; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13496 | ; |
| 13497 | return 0; |
| 13498 | } |
| 13499 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13500 | if ac_fn_c_try_compile "$LINENO"; then : |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 13501 | works=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13502 | else |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13503 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13504 | $as_echo "#define volatile /**/" >>confdefs.h |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13505 | |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 13506 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13507 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13508 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13509 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5 |
| 13510 | $as_echo "$works" >&6; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13511 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 13512 | works=no |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13513 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5 |
| 13514 | $as_echo_n "checking for working signed char... " >&6; } |
| 13515 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13516 | /* end confdefs.h. */ |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 13517 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13518 | int |
| 13519 | main () |
| 13520 | { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13521 | signed char c; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13522 | ; |
| 13523 | return 0; |
| 13524 | } |
| 13525 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13526 | if ac_fn_c_try_compile "$LINENO"; then : |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 13527 | works=yes |
Guido van Rossum | dabb11b | 1994-10-11 15:04:27 +0000 | [diff] [blame] | 13528 | else |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13529 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13530 | $as_echo "#define signed /**/" >>confdefs.h |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13531 | |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 13532 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13533 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13534 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13535 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5 |
| 13536 | $as_echo "$works" >&6; } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13537 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 13538 | have_prototypes=no |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13539 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5 |
| 13540 | $as_echo_n "checking for prototypes... " >&6; } |
| 13541 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13542 | /* end confdefs.h. */ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13543 | int foo(int x) { return 0; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13544 | int |
| 13545 | main () |
| 13546 | { |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13547 | return foo(10); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13548 | ; |
| 13549 | return 0; |
| 13550 | } |
| 13551 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13552 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13553 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13554 | $as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13555 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 13556 | have_prototypes=yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13557 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13558 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13559 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5 |
| 13560 | $as_echo "$have_prototypes" >&6; } |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13561 | |
Guido van Rossum | da88dad | 1995-01-26 00:46:29 +0000 | [diff] [blame] | 13562 | works=no |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13563 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5 |
| 13564 | $as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; } |
| 13565 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13566 | /* end confdefs.h. */ |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13567 | |
| 13568 | #include <stdarg.h> |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 13569 | int foo(int x, ...) { |
| 13570 | va_list va; |
| 13571 | va_start(va, x); |
| 13572 | va_arg(va, int); |
| 13573 | va_arg(va, char *); |
| 13574 | va_arg(va, double); |
| 13575 | return 0; |
| 13576 | } |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13577 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13578 | int |
| 13579 | main () |
| 13580 | { |
Guido van Rossum | 90eea07 | 1996-08-30 20:58:57 +0000 | [diff] [blame] | 13581 | return foo(10, "", 3.14); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13582 | ; |
| 13583 | return 0; |
| 13584 | } |
| 13585 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13586 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13587 | |
| 13588 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13589 | $as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13590 | |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 13591 | works=yes |
| 13592 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13593 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13594 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13595 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5 |
| 13596 | $as_echo "$works" >&6; } |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13597 | |
Martin v. Löwis | d632050 | 2004-08-12 13:45:08 +0000 | [diff] [blame] | 13598 | # check for socketpair |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13599 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5 |
| 13600 | $as_echo_n "checking for socketpair... " >&6; } |
| 13601 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Martin v. Löwis | d632050 | 2004-08-12 13:45:08 +0000 | [diff] [blame] | 13602 | /* end confdefs.h. */ |
| 13603 | |
| 13604 | #include <sys/types.h> |
| 13605 | #include <sys/socket.h> |
| 13606 | |
| 13607 | int |
| 13608 | main () |
| 13609 | { |
| 13610 | void *x=socketpair |
| 13611 | ; |
| 13612 | return 0; |
| 13613 | } |
| 13614 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13615 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | d632050 | 2004-08-12 13:45:08 +0000 | [diff] [blame] | 13616 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13617 | $as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h |
Martin v. Löwis | d632050 | 2004-08-12 13:45:08 +0000 | [diff] [blame] | 13618 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 13619 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13620 | $as_echo "yes" >&6; } |
Martin v. Löwis | d632050 | 2004-08-12 13:45:08 +0000 | [diff] [blame] | 13621 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13622 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 13623 | $as_echo "no" >&6; } |
Martin v. Löwis | d632050 | 2004-08-12 13:45:08 +0000 | [diff] [blame] | 13624 | |
| 13625 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13626 | 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] | 13627 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13628 | # check if sockaddr has sa_len member |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13629 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5 |
| 13630 | $as_echo_n "checking if sockaddr has sa_len member... " >&6; } |
| 13631 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13632 | /* end confdefs.h. */ |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13633 | #include <sys/types.h> |
| 13634 | #include <sys/socket.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13635 | int |
| 13636 | main () |
| 13637 | { |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13638 | struct sockaddr x; |
| 13639 | x.sa_len = 0; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13640 | ; |
| 13641 | return 0; |
| 13642 | } |
| 13643 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13644 | if ac_fn_c_try_compile "$LINENO"; then : |
| 13645 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 13646 | $as_echo "yes" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13647 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13648 | $as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13649 | |
| 13650 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13651 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 13652 | $as_echo "no" >&6; } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 13653 | |
Martin v. Löwis | 01dfdb3 | 2001-06-23 16:30:13 +0000 | [diff] [blame] | 13654 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13655 | 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] | 13656 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13657 | # 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] | 13658 | |
| 13659 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13660 | 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] | 13661 | if test "x$ac_cv_func_gethostbyname_r" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13662 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13663 | $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h |
Martin v. Löwis | 4ddc78a | 2006-01-29 09:53:44 +0000 | [diff] [blame] | 13664 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13665 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5 |
| 13666 | $as_echo_n "checking gethostbyname_r with 6 args... " >&6; } |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13667 | OLD_CFLAGS=$CFLAGS |
| 13668 | CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13669 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13670 | /* end confdefs.h. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13671 | |
| 13672 | # include <netdb.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13673 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13674 | int |
| 13675 | main () |
| 13676 | { |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13677 | |
| 13678 | char *name; |
| 13679 | struct hostent *he, *res; |
| 13680 | char buffer[2048]; |
| 13681 | int buflen = 2048; |
| 13682 | int h_errnop; |
| 13683 | |
| 13684 | (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13685 | |
| 13686 | ; |
| 13687 | return 0; |
| 13688 | } |
| 13689 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13690 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13691 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13692 | $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 13693 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13694 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13695 | $as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13696 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13697 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 13698 | $as_echo "yes" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13699 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13700 | else |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13701 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13702 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 13703 | $as_echo "no" >&6; } |
| 13704 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5 |
| 13705 | $as_echo_n "checking gethostbyname_r with 5 args... " >&6; } |
| 13706 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13707 | /* end confdefs.h. */ |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13708 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13709 | # include <netdb.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13710 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13711 | int |
| 13712 | main () |
| 13713 | { |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13714 | |
| 13715 | char *name; |
| 13716 | struct hostent *he; |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 13717 | char buffer[2048]; |
| 13718 | int buflen = 2048; |
| 13719 | int h_errnop; |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13720 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 13721 | (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13722 | |
| 13723 | ; |
| 13724 | return 0; |
| 13725 | } |
| 13726 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13727 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13728 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13729 | $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h |
Guido van Rossum | 8db7d8b | 1999-03-23 16:40:33 +0000 | [diff] [blame] | 13730 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13731 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 13732 | $as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13733 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13734 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 13735 | $as_echo "yes" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13736 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13737 | else |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13738 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13739 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 13740 | $as_echo "no" >&6; } |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 13741 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5 |
| 13742 | $as_echo_n "checking gethostbyname_r with 3 args... " >&6; } |
| 13743 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 13744 | /* end confdefs.h. */ |
| 13745 | |
| 13746 | # include <netdb.h> |
| 13747 | |
| 13748 | int |
| 13749 | main () |
| 13750 | { |
| 13751 | |
| 13752 | char *name; |
| 13753 | struct hostent *he; |
| 13754 | struct hostent_data data; |
| 13755 | |
| 13756 | (void) gethostbyname_r(name, he, &data); |
| 13757 | |
| 13758 | ; |
| 13759 | return 0; |
| 13760 | } |
| 13761 | _ACEOF |
| 13762 | if ac_fn_c_try_compile "$LINENO"; then : |
| 13763 | |
| 13764 | $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h |
| 13765 | |
| 13766 | |
| 13767 | $as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h |
| 13768 | |
| 13769 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 13770 | $as_echo "yes" >&6; } |
| 13771 | |
| 13772 | else |
| 13773 | |
| 13774 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 13775 | $as_echo "no" >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13776 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13777 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13778 | 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] | 13779 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13780 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13781 | 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] | 13782 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13783 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13784 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13785 | CFLAGS=$OLD_CFLAGS |
| 13786 | |
| 13787 | else |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13788 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13789 | for ac_func in gethostbyname |
| 13790 | do : |
| 13791 | ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13792 | if test "x$ac_cv_func_gethostbyname" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13793 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13794 | #define HAVE_GETHOSTBYNAME 1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13795 | _ACEOF |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13796 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13797 | fi |
Thomas Wouters | 3a58420 | 2000-08-05 23:28:51 +0000 | [diff] [blame] | 13798 | done |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13799 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 13800 | |
Guido van Rossum | a96f0ba | 1999-03-22 21:49:51 +0000 | [diff] [blame] | 13801 | fi |
| 13802 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 13803 | |
| 13804 | |
| 13805 | |
| 13806 | |
| 13807 | |
| 13808 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13809 | # checks for system services |
| 13810 | # (none yet) |
| 13811 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13812 | # Linux requires this for correct f.p. operations |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13813 | 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] | 13814 | if test "x$ac_cv_func___fpu_control" = xyes; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13815 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 13816 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13817 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5 |
| 13818 | $as_echo_n "checking for __fpu_control in -lieee... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13819 | if ${ac_cv_lib_ieee___fpu_control+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13820 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13821 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13822 | ac_check_lib_save_LIBS=$LIBS |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 13823 | LIBS="-lieee $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13824 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 13825 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13826 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13827 | /* Override any GCC internal prototype to avoid an error. |
| 13828 | Use char because int might match the return type of a GCC |
| 13829 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13830 | #ifdef __cplusplus |
| 13831 | extern "C" |
| 13832 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13833 | char __fpu_control (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13834 | int |
| 13835 | main () |
| 13836 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13837 | return __fpu_control (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13838 | ; |
| 13839 | return 0; |
| 13840 | } |
| 13841 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13842 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13843 | ac_cv_lib_ieee___fpu_control=yes |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13844 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13845 | ac_cv_lib_ieee___fpu_control=no |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13846 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13847 | rm -f core conftest.err conftest.$ac_objext \ |
| 13848 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13849 | LIBS=$ac_check_lib_save_LIBS |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13850 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13851 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5 |
| 13852 | $as_echo "$ac_cv_lib_ieee___fpu_control" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13853 | 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] | 13854 | cat >>confdefs.h <<_ACEOF |
| 13855 | #define HAVE_LIBIEEE 1 |
| 13856 | _ACEOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13857 | |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 13858 | LIBS="-lieee $LIBS" |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 13859 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 13860 | fi |
| 13861 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 13862 | |
Jeremy Hylton | be28f5b | 2000-07-27 21:03:04 +0000 | [diff] [blame] | 13863 | fi |
| 13864 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 13865 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 13866 | # Check for --with-fpectl |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13867 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5 |
| 13868 | $as_echo_n "checking for --with-fpectl... " >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13869 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13870 | # Check whether --with-fpectl was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13871 | if test "${with_fpectl+set}" = set; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13872 | withval=$with_fpectl; |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 13873 | if test "$withval" != no |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13874 | then |
| 13875 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13876 | $as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13877 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13878 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 13879 | $as_echo "yes" >&6; } |
| 13880 | else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 13881 | $as_echo "no" >&6; } |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 13882 | fi |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 13883 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13884 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 13885 | $as_echo "no" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13886 | fi |
| 13887 | |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 13888 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13889 | # check for --with-libm=... |
| 13890 | |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 13891 | case $ac_sys_system in |
Guido van Rossum | 3dc0a51 | 2000-10-05 18:00:06 +0000 | [diff] [blame] | 13892 | Darwin) ;; |
Guido van Rossum | 563e708 | 1996-09-10 18:20:48 +0000 | [diff] [blame] | 13893 | *) LIBM=-lm |
| 13894 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13895 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5 |
| 13896 | $as_echo_n "checking for --with-libm=STRING... " >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13897 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13898 | # Check whether --with-libm was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13899 | if test "${with_libm+set}" = set; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13900 | withval=$with_libm; |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 13901 | if test "$withval" = no |
| 13902 | then LIBM= |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13903 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5 |
| 13904 | $as_echo "force LIBM empty" >&6; } |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 13905 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13906 | then LIBM=$withval |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13907 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5 |
| 13908 | $as_echo "set LIBM=\"$withval\"" >&6; } |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 13909 | 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] | 13910 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 13911 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13912 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5 |
| 13913 | $as_echo "default LIBM=\"$LIBM\"" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13914 | fi |
| 13915 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13916 | |
| 13917 | # check for --with-libc=... |
| 13918 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13919 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5 |
| 13920 | $as_echo_n "checking for --with-libc=STRING... " >&6; } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 13921 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13922 | # Check whether --with-libc was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13923 | if test "${with_libc+set}" = set; then : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13924 | withval=$with_libc; |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 13925 | if test "$withval" = no |
| 13926 | then LIBC= |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13927 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5 |
| 13928 | $as_echo "force LIBC empty" >&6; } |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 13929 | elif test "$withval" != yes |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13930 | then LIBC=$withval |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13931 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5 |
| 13932 | $as_echo "set LIBC=\"$withval\"" >&6; } |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 13933 | 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] | 13934 | fi |
Guido van Rossum | 7f25391 | 1997-05-09 02:42:48 +0000 | [diff] [blame] | 13935 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13936 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5 |
| 13937 | $as_echo "default LIBC=\"$LIBC\"" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 13938 | fi |
| 13939 | |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 13940 | |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 13941 | # ************************************** |
| 13942 | # * Check for gcc x64 inline assembler * |
| 13943 | # ************************************** |
| 13944 | |
| 13945 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5 |
| 13946 | $as_echo_n "checking for x64 gcc inline assembler... " >&6; } |
| 13947 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 13948 | /* end confdefs.h. */ |
| 13949 | |
| 13950 | int |
| 13951 | main () |
| 13952 | { |
| 13953 | |
| 13954 | __asm__ __volatile__ ("movq %rcx, %rax"); |
| 13955 | |
| 13956 | ; |
| 13957 | return 0; |
| 13958 | } |
| 13959 | _ACEOF |
Stefan Krah | e31db2a | 2015-07-02 20:27:56 +0200 | [diff] [blame] | 13960 | if ac_fn_c_try_link "$LINENO"; then : |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 13961 | have_gcc_asm_for_x64=yes |
| 13962 | else |
| 13963 | have_gcc_asm_for_x64=no |
| 13964 | fi |
Stefan Krah | e31db2a | 2015-07-02 20:27:56 +0200 | [diff] [blame] | 13965 | rm -f core conftest.err conftest.$ac_objext \ |
| 13966 | conftest$ac_exeext conftest.$ac_ext |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 13967 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5 |
| 13968 | $as_echo "$have_gcc_asm_for_x64" >&6; } |
| 13969 | if test "$have_gcc_asm_for_x64" = yes |
| 13970 | then |
| 13971 | |
| 13972 | $as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h |
| 13973 | |
| 13974 | fi |
| 13975 | |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 13976 | # ************************************************** |
| 13977 | # * Check for various properties of floating point * |
| 13978 | # ************************************************** |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 13979 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13980 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5 |
| 13981 | $as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 13982 | if ${ac_cv_little_endian_double+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13983 | $as_echo_n "(cached) " >&6 |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 13984 | else |
| 13985 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13986 | if test "$cross_compiling" = yes; then : |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 13987 | ac_cv_little_endian_double=no |
| 13988 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 13989 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 13990 | /* end confdefs.h. */ |
| 13991 | |
| 13992 | #include <string.h> |
| 13993 | int main() { |
| 13994 | double x = 9006104071832581.0; |
| 13995 | if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0) |
| 13996 | return 0; |
| 13997 | else |
| 13998 | return 1; |
| 13999 | } |
| 14000 | |
| 14001 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14002 | if ac_fn_c_try_run "$LINENO"; then : |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14003 | ac_cv_little_endian_double=yes |
| 14004 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14005 | ac_cv_little_endian_double=no |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14006 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14007 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 14008 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14009 | fi |
| 14010 | |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14011 | fi |
| 14012 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14013 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5 |
| 14014 | $as_echo "$ac_cv_little_endian_double" >&6; } |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14015 | if test "$ac_cv_little_endian_double" = yes |
| 14016 | then |
| 14017 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14018 | $as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14019 | |
| 14020 | fi |
| 14021 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14022 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5 |
| 14023 | $as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14024 | if ${ac_cv_big_endian_double+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14025 | $as_echo_n "(cached) " >&6 |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14026 | else |
| 14027 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14028 | if test "$cross_compiling" = yes; then : |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14029 | ac_cv_big_endian_double=no |
| 14030 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14031 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14032 | /* end confdefs.h. */ |
| 14033 | |
| 14034 | #include <string.h> |
| 14035 | int main() { |
| 14036 | double x = 9006104071832581.0; |
| 14037 | if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0) |
| 14038 | return 0; |
| 14039 | else |
| 14040 | return 1; |
| 14041 | } |
| 14042 | |
| 14043 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14044 | if ac_fn_c_try_run "$LINENO"; then : |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14045 | ac_cv_big_endian_double=yes |
| 14046 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14047 | ac_cv_big_endian_double=no |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14048 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14049 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 14050 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14051 | fi |
| 14052 | |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14053 | fi |
| 14054 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14055 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5 |
| 14056 | $as_echo "$ac_cv_big_endian_double" >&6; } |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14057 | if test "$ac_cv_big_endian_double" = yes |
| 14058 | then |
| 14059 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14060 | $as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14061 | |
| 14062 | fi |
| 14063 | |
| 14064 | # Some ARM platforms use a mixed-endian representation for doubles. |
| 14065 | # While Python doesn't currently have full support for these platforms |
| 14066 | # (see e.g., issue 1762561), we can at least make sure that float <-> string |
| 14067 | # conversions work. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14068 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5 |
| 14069 | $as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14070 | if ${ac_cv_mixed_endian_double+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14071 | $as_echo_n "(cached) " >&6 |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14072 | else |
| 14073 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14074 | if test "$cross_compiling" = yes; then : |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14075 | ac_cv_mixed_endian_double=no |
| 14076 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14077 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14078 | /* end confdefs.h. */ |
| 14079 | |
| 14080 | #include <string.h> |
| 14081 | int main() { |
| 14082 | double x = 9006104071832581.0; |
| 14083 | if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0) |
| 14084 | return 0; |
| 14085 | else |
| 14086 | return 1; |
| 14087 | } |
| 14088 | |
| 14089 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14090 | if ac_fn_c_try_run "$LINENO"; then : |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14091 | ac_cv_mixed_endian_double=yes |
| 14092 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14093 | ac_cv_mixed_endian_double=no |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14094 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14095 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 14096 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14097 | fi |
| 14098 | |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14099 | fi |
| 14100 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14101 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5 |
| 14102 | $as_echo "$ac_cv_mixed_endian_double" >&6; } |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14103 | if test "$ac_cv_mixed_endian_double" = yes |
| 14104 | then |
| 14105 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14106 | $as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14107 | |
| 14108 | fi |
| 14109 | |
Mark Dickinson | 7abf8d4 | 2009-04-18 20:17:52 +0000 | [diff] [blame] | 14110 | # The short float repr introduced in Python 3.1 requires the |
Mark Dickinson | 1068307 | 2009-04-18 21:18:19 +0000 | [diff] [blame] | 14111 | # correctly-rounded string <-> double conversion functions from |
Mark Dickinson | 7abf8d4 | 2009-04-18 20:17:52 +0000 | [diff] [blame] | 14112 | # 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] | 14113 | # 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] | 14114 | # 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] | 14115 | # using inline assembler to get and set the x87 FPU control word. |
Mark Dickinson | f4243f6 | 2009-11-15 13:47:27 +0000 | [diff] [blame] | 14116 | |
| 14117 | # This inline assembler syntax may also work for suncc and icc, |
| 14118 | # so we try it on all platforms. |
| 14119 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14120 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5 |
| 14121 | $as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; } |
| 14122 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14123 | /* end confdefs.h. */ |
| 14124 | |
| 14125 | int |
| 14126 | main () |
| 14127 | { |
| 14128 | |
Mark Dickinson | f4243f6 | 2009-11-15 13:47:27 +0000 | [diff] [blame] | 14129 | unsigned short cw; |
| 14130 | __asm__ __volatile__ ("fnstcw %0" : "=m" (cw)); |
| 14131 | __asm__ __volatile__ ("fldcw %0" : : "m" (cw)); |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14132 | |
| 14133 | ; |
| 14134 | return 0; |
| 14135 | } |
| 14136 | _ACEOF |
Stefan Krah | e31db2a | 2015-07-02 20:27:56 +0200 | [diff] [blame] | 14137 | if ac_fn_c_try_link "$LINENO"; then : |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14138 | have_gcc_asm_for_x87=yes |
| 14139 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14140 | have_gcc_asm_for_x87=no |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14141 | fi |
Stefan Krah | e31db2a | 2015-07-02 20:27:56 +0200 | [diff] [blame] | 14142 | rm -f core conftest.err conftest.$ac_objext \ |
| 14143 | conftest$ac_exeext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14144 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5 |
| 14145 | $as_echo "$have_gcc_asm_for_x87" >&6; } |
Mark Dickinson | f4243f6 | 2009-11-15 13:47:27 +0000 | [diff] [blame] | 14146 | if test "$have_gcc_asm_for_x87" = yes |
| 14147 | then |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14148 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14149 | $as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14150 | |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14151 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14152 | |
Benjamin Peterson | 8bdeb16 | 2014-04-17 00:00:31 -0400 | [diff] [blame] | 14153 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5 |
| 14154 | $as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; } |
| 14155 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14156 | /* end confdefs.h. */ |
| 14157 | |
| 14158 | int |
| 14159 | main () |
| 14160 | { |
| 14161 | |
| 14162 | unsigned int fpcr; |
| 14163 | __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr)); |
| 14164 | __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr)); |
| 14165 | |
| 14166 | ; |
| 14167 | return 0; |
| 14168 | } |
| 14169 | _ACEOF |
Stefan Krah | e31db2a | 2015-07-02 20:27:56 +0200 | [diff] [blame] | 14170 | if ac_fn_c_try_link "$LINENO"; then : |
Benjamin Peterson | 8bdeb16 | 2014-04-17 00:00:31 -0400 | [diff] [blame] | 14171 | have_gcc_asm_for_mc68881=yes |
| 14172 | else |
| 14173 | have_gcc_asm_for_mc68881=no |
| 14174 | fi |
Stefan Krah | e31db2a | 2015-07-02 20:27:56 +0200 | [diff] [blame] | 14175 | rm -f core conftest.err conftest.$ac_objext \ |
| 14176 | conftest$ac_exeext conftest.$ac_ext |
Benjamin Peterson | 8bdeb16 | 2014-04-17 00:00:31 -0400 | [diff] [blame] | 14177 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5 |
| 14178 | $as_echo "$have_gcc_asm_for_mc68881" >&6; } |
| 14179 | if test "$have_gcc_asm_for_mc68881" = yes |
| 14180 | then |
| 14181 | |
| 14182 | $as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h |
| 14183 | |
| 14184 | fi |
| 14185 | |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14186 | # Detect whether system arithmetic is subject to x87-style double |
| 14187 | # rounding issues. The result of this test has little meaning on non |
| 14188 | # IEEE 754 platforms. On IEEE 754, test should return 1 if rounding |
| 14189 | # mode is round-to-nearest and double rounding issues are present, and |
| 14190 | # 0 otherwise. See http://bugs.python.org/issue2937 for more info. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14191 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5 |
| 14192 | $as_echo_n "checking for x87-style double rounding... " >&6; } |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14193 | # $BASECFLAGS may affect the result |
| 14194 | ac_save_cc="$CC" |
| 14195 | CC="$CC $BASECFLAGS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14196 | if test "$cross_compiling" = yes; then : |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14197 | ac_cv_x87_double_rounding=no |
| 14198 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14199 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14200 | /* end confdefs.h. */ |
| 14201 | |
| 14202 | #include <stdlib.h> |
| 14203 | #include <math.h> |
| 14204 | int main() { |
| 14205 | volatile double x, y, z; |
| 14206 | /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */ |
| 14207 | x = 0.99999999999999989; /* 1-2**-53 */ |
| 14208 | y = 1./x; |
| 14209 | if (y != 1.) |
| 14210 | exit(0); |
| 14211 | /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */ |
| 14212 | x = 1e16; |
| 14213 | y = 2.99999; |
| 14214 | z = x + y; |
| 14215 | if (z != 1e16+4.) |
| 14216 | exit(0); |
| 14217 | /* both tests show evidence of double rounding */ |
| 14218 | exit(1); |
| 14219 | } |
| 14220 | |
| 14221 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14222 | if ac_fn_c_try_run "$LINENO"; then : |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14223 | ac_cv_x87_double_rounding=no |
| 14224 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14225 | ac_cv_x87_double_rounding=yes |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14226 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14227 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 14228 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14229 | fi |
| 14230 | |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14231 | CC="$ac_save_cc" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14232 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5 |
| 14233 | $as_echo "$ac_cv_x87_double_rounding" >&6; } |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14234 | if test "$ac_cv_x87_double_rounding" = yes |
| 14235 | then |
| 14236 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14237 | $as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14238 | |
| 14239 | fi |
| 14240 | |
Mark Dickinson | b08a53a | 2009-04-16 19:52:09 +0000 | [diff] [blame] | 14241 | # ************************************ |
| 14242 | # * Check for mathematical functions * |
| 14243 | # ************************************ |
| 14244 | |
| 14245 | LIBS_SAVE=$LIBS |
| 14246 | LIBS="$LIBS $LIBM" |
| 14247 | |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14248 | for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma |
| 14249 | do : |
| 14250 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
| 14251 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 14252 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14253 | cat >>confdefs.h <<_ACEOF |
| 14254 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
| 14255 | _ACEOF |
| 14256 | |
| 14257 | fi |
| 14258 | done |
| 14259 | |
Victor Stinner | 8f9f8d6 | 2011-05-09 12:45:41 +0200 | [diff] [blame] | 14260 | for ac_func in hypot lgamma log1p log2 round tgamma |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14261 | do : |
| 14262 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
| 14263 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 14264 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14265 | cat >>confdefs.h <<_ACEOF |
| 14266 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
| 14267 | _ACEOF |
| 14268 | |
| 14269 | fi |
| 14270 | done |
| 14271 | |
| 14272 | ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h> |
| 14273 | " |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14274 | if test "x$ac_cv_have_decl_isinf" = xyes; then : |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14275 | ac_have_decl=1 |
| 14276 | else |
| 14277 | ac_have_decl=0 |
| 14278 | fi |
| 14279 | |
| 14280 | cat >>confdefs.h <<_ACEOF |
| 14281 | #define HAVE_DECL_ISINF $ac_have_decl |
| 14282 | _ACEOF |
| 14283 | ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h> |
| 14284 | " |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14285 | if test "x$ac_cv_have_decl_isnan" = xyes; then : |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14286 | ac_have_decl=1 |
| 14287 | else |
| 14288 | ac_have_decl=0 |
| 14289 | fi |
| 14290 | |
| 14291 | cat >>confdefs.h <<_ACEOF |
| 14292 | #define HAVE_DECL_ISNAN $ac_have_decl |
| 14293 | _ACEOF |
| 14294 | ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h> |
| 14295 | " |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14296 | if test "x$ac_cv_have_decl_isfinite" = xyes; then : |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14297 | ac_have_decl=1 |
| 14298 | else |
| 14299 | ac_have_decl=0 |
| 14300 | fi |
| 14301 | |
| 14302 | cat >>confdefs.h <<_ACEOF |
| 14303 | #define HAVE_DECL_ISFINITE $ac_have_decl |
| 14304 | _ACEOF |
| 14305 | |
| 14306 | |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 14307 | # On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of |
| 14308 | # -0. on some architectures. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14309 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5 |
| 14310 | $as_echo_n "checking whether tanh preserves the sign of zero... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14311 | if ${ac_cv_tanh_preserves_zero_sign+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14312 | $as_echo_n "(cached) " >&6 |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 14313 | else |
| 14314 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14315 | if test "$cross_compiling" = yes; then : |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 14316 | ac_cv_tanh_preserves_zero_sign=no |
| 14317 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14318 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 14319 | /* end confdefs.h. */ |
| 14320 | |
| 14321 | #include <math.h> |
| 14322 | #include <stdlib.h> |
| 14323 | int main() { |
| 14324 | /* return 0 if either negative zeros don't exist |
| 14325 | on this platform or if negative zeros exist |
| 14326 | and tanh(-0.) == -0. */ |
| 14327 | if (atan2(0., -1.) == atan2(-0., -1.) || |
| 14328 | atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0); |
| 14329 | else exit(1); |
| 14330 | } |
| 14331 | |
| 14332 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14333 | if ac_fn_c_try_run "$LINENO"; then : |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 14334 | ac_cv_tanh_preserves_zero_sign=yes |
| 14335 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14336 | ac_cv_tanh_preserves_zero_sign=no |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 14337 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14338 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 14339 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 14340 | fi |
| 14341 | |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 14342 | fi |
| 14343 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14344 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5 |
| 14345 | $as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; } |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 14346 | if test "$ac_cv_tanh_preserves_zero_sign" = yes |
| 14347 | then |
| 14348 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14349 | $as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 14350 | |
| 14351 | fi |
| 14352 | |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14353 | if test "$ac_cv_func_log1p" = yes |
| 14354 | then |
| 14355 | # On some versions of AIX, log1p(-0.) returns 0. instead of |
| 14356 | # -0. See issue #9920. |
| 14357 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5 |
| 14358 | $as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14359 | if ${ac_cv_log1p_drops_zero_sign+:} false; then : |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14360 | $as_echo_n "(cached) " >&6 |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14361 | else |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14362 | |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14363 | if test "$cross_compiling" = yes; then : |
| 14364 | ac_cv_log1p_drops_zero_sign=no |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14365 | else |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14366 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14367 | /* end confdefs.h. */ |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14368 | |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14369 | #include <math.h> |
| 14370 | #include <stdlib.h> |
| 14371 | int main() { |
| 14372 | /* Fail if the signs of log1p(-0.) and -0. can be |
| 14373 | distinguished. */ |
| 14374 | if (atan2(log1p(-0.), -1.) == atan2(-0., -1.)) |
| 14375 | return 0; |
| 14376 | else |
| 14377 | return 1; |
| 14378 | } |
| 14379 | |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14380 | _ACEOF |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14381 | if ac_fn_c_try_run "$LINENO"; then : |
| 14382 | ac_cv_log1p_drops_zero_sign=no |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14383 | else |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14384 | ac_cv_log1p_drops_zero_sign=yes |
| 14385 | fi |
| 14386 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 14387 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14388 | fi |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14389 | |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14390 | fi |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14391 | |
Mark Dickinson | ec0d355 | 2010-11-20 10:29:12 +0000 | [diff] [blame] | 14392 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5 |
| 14393 | $as_echo "$ac_cv_log1p_drops_zero_sign" >&6; } |
| 14394 | fi |
| 14395 | if test "$ac_cv_log1p_drops_zero_sign" = yes |
| 14396 | then |
| 14397 | |
| 14398 | $as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h |
| 14399 | |
| 14400 | fi |
Mark Dickinson | 3dc7c6a | 2009-01-04 15:09:02 +0000 | [diff] [blame] | 14401 | |
Guido van Rossum | af5b83e | 1995-01-04 19:02:35 +0000 | [diff] [blame] | 14402 | LIBS=$LIBS_SAVE |
| 14403 | |
Mark Dickinson | a614f04 | 2009-11-28 12:48:43 +0000 | [diff] [blame] | 14404 | # For multiprocessing module, check that sem_open |
| 14405 | # actually works. For FreeBSD versions <= 7.2, |
| 14406 | # the kernel module that provides POSIX semaphores |
| 14407 | # isn't loaded by default, so an attempt to call |
| 14408 | # sem_open results in a 'Signal 12' error. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14409 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5 |
| 14410 | $as_echo_n "checking whether POSIX semaphores are enabled... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14411 | if ${ac_cv_posix_semaphores_enabled+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14412 | $as_echo_n "(cached) " >&6 |
Mark Dickinson | a614f04 | 2009-11-28 12:48:43 +0000 | [diff] [blame] | 14413 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14414 | if test "$cross_compiling" = yes; then : |
Mark Dickinson | a614f04 | 2009-11-28 12:48:43 +0000 | [diff] [blame] | 14415 | ac_cv_posix_semaphores_enabled=yes |
| 14416 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14417 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Mark Dickinson | a614f04 | 2009-11-28 12:48:43 +0000 | [diff] [blame] | 14418 | /* end confdefs.h. */ |
| 14419 | |
| 14420 | #include <unistd.h> |
| 14421 | #include <fcntl.h> |
| 14422 | #include <stdio.h> |
| 14423 | #include <semaphore.h> |
| 14424 | #include <sys/stat.h> |
| 14425 | |
| 14426 | int main(void) { |
| 14427 | sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0); |
| 14428 | if (a == SEM_FAILED) { |
| 14429 | perror("sem_open"); |
| 14430 | return 1; |
| 14431 | } |
| 14432 | sem_close(a); |
Mark Dickinson | ba79b35 | 2009-12-13 21:10:57 +0000 | [diff] [blame] | 14433 | sem_unlink("/autoconf"); |
Mark Dickinson | a614f04 | 2009-11-28 12:48:43 +0000 | [diff] [blame] | 14434 | return 0; |
| 14435 | } |
| 14436 | |
| 14437 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14438 | if ac_fn_c_try_run "$LINENO"; then : |
Mark Dickinson | a614f04 | 2009-11-28 12:48:43 +0000 | [diff] [blame] | 14439 | ac_cv_posix_semaphores_enabled=yes |
| 14440 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14441 | ac_cv_posix_semaphores_enabled=no |
Mark Dickinson | a614f04 | 2009-11-28 12:48:43 +0000 | [diff] [blame] | 14442 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14443 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 14444 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Mark Dickinson | a614f04 | 2009-11-28 12:48:43 +0000 | [diff] [blame] | 14445 | fi |
| 14446 | |
| 14447 | |
Mark Dickinson | a614f04 | 2009-11-28 12:48:43 +0000 | [diff] [blame] | 14448 | fi |
| 14449 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14450 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5 |
| 14451 | $as_echo "$ac_cv_posix_semaphores_enabled" >&6; } |
Mark Dickinson | a614f04 | 2009-11-28 12:48:43 +0000 | [diff] [blame] | 14452 | if test $ac_cv_posix_semaphores_enabled = no |
| 14453 | then |
| 14454 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14455 | $as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h |
Mark Dickinson | a614f04 | 2009-11-28 12:48:43 +0000 | [diff] [blame] | 14456 | |
| 14457 | fi |
| 14458 | |
Mark Dickinson | 1068307 | 2009-04-18 21:18:19 +0000 | [diff] [blame] | 14459 | # Multiprocessing check for broken sem_getvalue |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14460 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5 |
| 14461 | $as_echo_n "checking for broken sem_getvalue... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14462 | if ${ac_cv_broken_sem_getvalue+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14463 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 14464 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14465 | if test "$cross_compiling" = yes; then : |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 14466 | ac_cv_broken_sem_getvalue=yes |
Mark Dickinson | 1068307 | 2009-04-18 21:18:19 +0000 | [diff] [blame] | 14467 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14468 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Mark Dickinson | 1068307 | 2009-04-18 21:18:19 +0000 | [diff] [blame] | 14469 | /* end confdefs.h. */ |
| 14470 | |
| 14471 | #include <unistd.h> |
| 14472 | #include <fcntl.h> |
| 14473 | #include <stdio.h> |
| 14474 | #include <semaphore.h> |
| 14475 | #include <sys/stat.h> |
| 14476 | |
| 14477 | int main(void){ |
Mark Dickinson | ba79b35 | 2009-12-13 21:10:57 +0000 | [diff] [blame] | 14478 | 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] | 14479 | int count; |
| 14480 | int res; |
| 14481 | if(a==SEM_FAILED){ |
| 14482 | perror("sem_open"); |
| 14483 | return 1; |
| 14484 | |
| 14485 | } |
| 14486 | res = sem_getvalue(a, &count); |
| 14487 | sem_close(a); |
Mark Dickinson | ba79b35 | 2009-12-13 21:10:57 +0000 | [diff] [blame] | 14488 | sem_unlink("/autocftw"); |
Mark Dickinson | 1068307 | 2009-04-18 21:18:19 +0000 | [diff] [blame] | 14489 | return res==-1 ? 1 : 0; |
| 14490 | } |
| 14491 | |
Mark Dickinson | 1068307 | 2009-04-18 21:18:19 +0000 | [diff] [blame] | 14492 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14493 | if ac_fn_c_try_run "$LINENO"; then : |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 14494 | ac_cv_broken_sem_getvalue=no |
Mark Dickinson | 1068307 | 2009-04-18 21:18:19 +0000 | [diff] [blame] | 14495 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14496 | ac_cv_broken_sem_getvalue=yes |
Alexandre Vassalotti | 1914228 | 2009-07-17 23:11:52 +0000 | [diff] [blame] | 14497 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14498 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 14499 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 14500 | fi |
| 14501 | |
Alexandre Vassalotti | 1914228 | 2009-07-17 23:11:52 +0000 | [diff] [blame] | 14502 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 14503 | fi |
| 14504 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14505 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5 |
| 14506 | $as_echo "$ac_cv_broken_sem_getvalue" >&6; } |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 14507 | if test $ac_cv_broken_sem_getvalue = yes |
| 14508 | then |
| 14509 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14510 | $as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 14511 | |
| 14512 | fi |
| 14513 | |
Serhiy Storchaka | c2f7d87 | 2016-05-04 09:44:44 +0300 | [diff] [blame] | 14514 | ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h> |
| 14515 | " |
| 14516 | if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then : |
| 14517 | ac_have_decl=1 |
| 14518 | else |
| 14519 | ac_have_decl=0 |
| 14520 | fi |
| 14521 | |
| 14522 | cat >>confdefs.h <<_ACEOF |
| 14523 | #define HAVE_DECL_RTLD_LAZY $ac_have_decl |
| 14524 | _ACEOF |
| 14525 | ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h> |
| 14526 | " |
| 14527 | if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then : |
| 14528 | ac_have_decl=1 |
| 14529 | else |
| 14530 | ac_have_decl=0 |
| 14531 | fi |
| 14532 | |
| 14533 | cat >>confdefs.h <<_ACEOF |
| 14534 | #define HAVE_DECL_RTLD_NOW $ac_have_decl |
| 14535 | _ACEOF |
| 14536 | ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h> |
| 14537 | " |
| 14538 | if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then : |
| 14539 | ac_have_decl=1 |
| 14540 | else |
| 14541 | ac_have_decl=0 |
| 14542 | fi |
| 14543 | |
| 14544 | cat >>confdefs.h <<_ACEOF |
| 14545 | #define HAVE_DECL_RTLD_GLOBAL $ac_have_decl |
| 14546 | _ACEOF |
| 14547 | ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h> |
| 14548 | " |
| 14549 | if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then : |
| 14550 | ac_have_decl=1 |
| 14551 | else |
| 14552 | ac_have_decl=0 |
| 14553 | fi |
| 14554 | |
| 14555 | cat >>confdefs.h <<_ACEOF |
| 14556 | #define HAVE_DECL_RTLD_LOCAL $ac_have_decl |
| 14557 | _ACEOF |
| 14558 | ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h> |
| 14559 | " |
| 14560 | if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then : |
| 14561 | ac_have_decl=1 |
| 14562 | else |
| 14563 | ac_have_decl=0 |
| 14564 | fi |
| 14565 | |
| 14566 | cat >>confdefs.h <<_ACEOF |
| 14567 | #define HAVE_DECL_RTLD_NODELETE $ac_have_decl |
| 14568 | _ACEOF |
| 14569 | ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h> |
| 14570 | " |
| 14571 | if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then : |
| 14572 | ac_have_decl=1 |
| 14573 | else |
| 14574 | ac_have_decl=0 |
| 14575 | fi |
| 14576 | |
| 14577 | cat >>confdefs.h <<_ACEOF |
| 14578 | #define HAVE_DECL_RTLD_NOLOAD $ac_have_decl |
| 14579 | _ACEOF |
| 14580 | ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h> |
| 14581 | " |
| 14582 | if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then : |
| 14583 | ac_have_decl=1 |
| 14584 | else |
| 14585 | ac_have_decl=0 |
| 14586 | fi |
| 14587 | |
| 14588 | cat >>confdefs.h <<_ACEOF |
| 14589 | #define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl |
| 14590 | _ACEOF |
| 14591 | |
| 14592 | |
Mark Dickinson | bd79264 | 2009-03-18 20:06:12 +0000 | [diff] [blame] | 14593 | # determine what size digit to use for Python's longs |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14594 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5 |
| 14595 | $as_echo_n "checking digit size for Python's longs... " >&6; } |
Mark Dickinson | bd79264 | 2009-03-18 20:06:12 +0000 | [diff] [blame] | 14596 | # Check whether --enable-big-digits was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14597 | if test "${enable_big_digits+set}" = set; then : |
Mark Dickinson | bd79264 | 2009-03-18 20:06:12 +0000 | [diff] [blame] | 14598 | enableval=$enable_big_digits; case $enable_big_digits in |
| 14599 | yes) |
| 14600 | enable_big_digits=30 ;; |
| 14601 | no) |
| 14602 | enable_big_digits=15 ;; |
| 14603 | 15|30) |
| 14604 | ;; |
| 14605 | *) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14606 | 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] | 14607 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14608 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5 |
| 14609 | $as_echo "$enable_big_digits" >&6; } |
Mark Dickinson | bd79264 | 2009-03-18 20:06:12 +0000 | [diff] [blame] | 14610 | |
| 14611 | cat >>confdefs.h <<_ACEOF |
| 14612 | #define PYLONG_BITS_IN_DIGIT $enable_big_digits |
| 14613 | _ACEOF |
| 14614 | |
| 14615 | |
| 14616 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14617 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5 |
| 14618 | $as_echo "no value specified" >&6; } |
Mark Dickinson | bd79264 | 2009-03-18 20:06:12 +0000 | [diff] [blame] | 14619 | fi |
| 14620 | |
| 14621 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14622 | # check for wchar.h |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14623 | 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] | 14624 | if test "x$ac_cv_header_wchar_h" = xyes; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14625 | |
| 14626 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14627 | $as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14628 | |
Martin v. Löwis | c45929e | 2002-04-06 10:10:49 +0000 | [diff] [blame] | 14629 | wchar_h="yes" |
| 14630 | |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14631 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14632 | wchar_h="no" |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14633 | |
| 14634 | fi |
| 14635 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 14636 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14637 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 14638 | # determine wchar_t size |
| 14639 | if test "$wchar_h" = yes |
| 14640 | then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14641 | # 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] | 14642 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 14643 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 14644 | # This bug is HP SR number 8606223364. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14645 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5 |
| 14646 | $as_echo_n "checking size of wchar_t... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14647 | if ${ac_cv_sizeof_wchar_t+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14648 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14649 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14650 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h> |
| 14651 | "; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14652 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14653 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14654 | if test "$ac_cv_type_wchar_t" = yes; then |
| 14655 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 14656 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 14657 | as_fn_error 77 "cannot compute sizeof (wchar_t) |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14658 | See \`config.log' for more details" "$LINENO" 5; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14659 | else |
| 14660 | ac_cv_sizeof_wchar_t=0 |
| 14661 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14662 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14663 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14664 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14665 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5 |
| 14666 | $as_echo "$ac_cv_sizeof_wchar_t" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14667 | |
| 14668 | |
| 14669 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14670 | cat >>confdefs.h <<_ACEOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 14671 | #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14672 | _ACEOF |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 14673 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 14674 | |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 14675 | fi |
| 14676 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14677 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5 |
| 14678 | $as_echo_n "checking for UCS-4 tcl... " >&6; } |
Martin v. Löwis | fa3bdea | 2003-09-04 18:50:54 +0000 | [diff] [blame] | 14679 | have_ucs4_tcl=no |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14680 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 14681 | /* end confdefs.h. */ |
Martin v. Löwis | fa3bdea | 2003-09-04 18:50:54 +0000 | [diff] [blame] | 14682 | |
| 14683 | #include <tcl.h> |
| 14684 | #if TCL_UTF_MAX != 6 |
| 14685 | # error "NOT UCS4_TCL" |
| 14686 | #endif |
| 14687 | int |
| 14688 | main () |
| 14689 | { |
| 14690 | |
| 14691 | ; |
| 14692 | return 0; |
| 14693 | } |
| 14694 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14695 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | fa3bdea | 2003-09-04 18:50:54 +0000 | [diff] [blame] | 14696 | |
| 14697 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14698 | $as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h |
Martin v. Löwis | fa3bdea | 2003-09-04 18:50:54 +0000 | [diff] [blame] | 14699 | |
| 14700 | have_ucs4_tcl=yes |
| 14701 | |
Martin v. Löwis | fa3bdea | 2003-09-04 18:50:54 +0000 | [diff] [blame] | 14702 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14703 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14704 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5 |
| 14705 | $as_echo "$have_ucs4_tcl" >&6; } |
Martin v. Löwis | fa3bdea | 2003-09-04 18:50:54 +0000 | [diff] [blame] | 14706 | |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 14707 | # check whether wchar_t is signed or not |
Marc-André Lemburg | d7160f8 | 2003-09-22 11:14:40 +0000 | [diff] [blame] | 14708 | if test "$wchar_h" = yes |
| 14709 | then |
| 14710 | # check whether wchar_t is signed or not |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14711 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5 |
| 14712 | $as_echo_n "checking whether wchar_t is signed... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14713 | if ${ac_cv_wchar_t_signed+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14714 | $as_echo_n "(cached) " >&6 |
Marc-André Lemburg | d7160f8 | 2003-09-22 11:14:40 +0000 | [diff] [blame] | 14715 | else |
| 14716 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14717 | if test "$cross_compiling" = yes; then : |
Marc-André Lemburg | d7160f8 | 2003-09-22 11:14:40 +0000 | [diff] [blame] | 14718 | ac_cv_wchar_t_signed=yes |
| 14719 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14720 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 14721 | /* end confdefs.h. */ |
Marc-André Lemburg | d7160f8 | 2003-09-22 11:14:40 +0000 | [diff] [blame] | 14722 | |
| 14723 | #include <wchar.h> |
| 14724 | int main() |
| 14725 | { |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 14726 | /* Success: exit code 0 */ |
| 14727 | exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1); |
Marc-André Lemburg | d7160f8 | 2003-09-22 11:14:40 +0000 | [diff] [blame] | 14728 | } |
| 14729 | |
| 14730 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14731 | if ac_fn_c_try_run "$LINENO"; then : |
Marc-André Lemburg | d7160f8 | 2003-09-22 11:14:40 +0000 | [diff] [blame] | 14732 | ac_cv_wchar_t_signed=yes |
| 14733 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14734 | ac_cv_wchar_t_signed=no |
Marc-André Lemburg | d7160f8 | 2003-09-22 11:14:40 +0000 | [diff] [blame] | 14735 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14736 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 14737 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Marc-André Lemburg | d7160f8 | 2003-09-22 11:14:40 +0000 | [diff] [blame] | 14738 | fi |
| 14739 | |
Marc-André Lemburg | d7160f8 | 2003-09-22 11:14:40 +0000 | [diff] [blame] | 14740 | fi |
| 14741 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14742 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5 |
| 14743 | $as_echo "$ac_cv_wchar_t_signed" >&6; } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14744 | fi |
| 14745 | |
Georg Brandl | 52d168a | 2008-01-07 18:10:24 +0000 | [diff] [blame] | 14746 | # 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] | 14747 | if test "$ac_cv_sizeof_wchar_t" -ge 2 \ |
Matthias Klose | 7dbeed7 | 2004-12-24 08:22:17 +0000 | [diff] [blame] | 14748 | -a "$ac_cv_wchar_t_signed" = "no" |
Georg Brandl | 52d168a | 2008-01-07 18:10:24 +0000 | [diff] [blame] | 14749 | then |
Martin v. Löwis | d63a3b8 | 2011-09-28 07:41:54 +0200 | [diff] [blame] | 14750 | HAVE_USABLE_WCHAR_T="yes" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 14751 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14752 | $as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14753 | |
Georg Brandl | 52d168a | 2008-01-07 18:10:24 +0000 | [diff] [blame] | 14754 | else |
Martin v. Löwis | d63a3b8 | 2011-09-28 07:41:54 +0200 | [diff] [blame] | 14755 | HAVE_USABLE_WCHAR_T="no usable wchar_t found" |
Martin v. Löwis | 0ba70cc | 2001-06-26 22:22:37 +0000 | [diff] [blame] | 14756 | fi |
Martin v. Löwis | d63a3b8 | 2011-09-28 07:41:54 +0200 | [diff] [blame] | 14757 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5 |
| 14758 | $as_echo "$HAVE_USABLE_WCHAR_T" >&6; } |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14759 | |
| 14760 | # check for endianness |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14761 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
| 14762 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14763 | if ${ac_cv_c_bigendian+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14764 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14765 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14766 | ac_cv_c_bigendian=unknown |
| 14767 | # See if we're dealing with a universal compiler. |
| 14768 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14769 | /* end confdefs.h. */ |
| 14770 | #ifndef __APPLE_CC__ |
| 14771 | not a universal capable compiler |
| 14772 | #endif |
| 14773 | typedef int dummy; |
| 14774 | |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 14775 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14776 | if ac_fn_c_try_compile "$LINENO"; then : |
| 14777 | |
| 14778 | # Check for potential -arch flags. It is not universal unless |
| 14779 | # there are at least two -arch flags with different values. |
| 14780 | ac_arch= |
| 14781 | ac_prev= |
| 14782 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do |
| 14783 | if test -n "$ac_prev"; then |
| 14784 | case $ac_word in |
| 14785 | i?86 | x86_64 | ppc | ppc64) |
| 14786 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then |
| 14787 | ac_arch=$ac_word |
| 14788 | else |
| 14789 | ac_cv_c_bigendian=universal |
| 14790 | break |
| 14791 | fi |
| 14792 | ;; |
| 14793 | esac |
| 14794 | ac_prev= |
| 14795 | elif test "x$ac_word" = "x-arch"; then |
| 14796 | ac_prev=arch |
| 14797 | fi |
| 14798 | done |
| 14799 | fi |
| 14800 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 14801 | if test $ac_cv_c_bigendian = unknown; then |
| 14802 | # See if sys/param.h defines the BYTE_ORDER macro. |
| 14803 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 14804 | /* end confdefs.h. */ |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14805 | #include <sys/types.h> |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14806 | #include <sys/param.h> |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14807 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14808 | int |
| 14809 | main () |
| 14810 | { |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14811 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
| 14812 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ |
| 14813 | && LITTLE_ENDIAN) |
| 14814 | bogus endian macros |
| 14815 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14816 | |
| 14817 | ; |
| 14818 | return 0; |
| 14819 | } |
| 14820 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14821 | if ac_fn_c_try_compile "$LINENO"; then : |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14822 | # It does; now see whether it defined to BIG_ENDIAN or not. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14823 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 14824 | /* end confdefs.h. */ |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14825 | #include <sys/types.h> |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14826 | #include <sys/param.h> |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14827 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14828 | int |
| 14829 | main () |
| 14830 | { |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14831 | #if BYTE_ORDER != BIG_ENDIAN |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14832 | not big endian |
| 14833 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14834 | |
| 14835 | ; |
| 14836 | return 0; |
| 14837 | } |
| 14838 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14839 | if ac_fn_c_try_compile "$LINENO"; then : |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14840 | ac_cv_c_bigendian=yes |
| 14841 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14842 | ac_cv_c_bigendian=no |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14843 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14844 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14845 | fi |
| 14846 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 14847 | fi |
| 14848 | if test $ac_cv_c_bigendian = unknown; then |
| 14849 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). |
| 14850 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 14851 | /* end confdefs.h. */ |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14852 | #include <limits.h> |
| 14853 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14854 | int |
| 14855 | main () |
| 14856 | { |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14857 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) |
| 14858 | bogus endian macros |
| 14859 | #endif |
| 14860 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14861 | ; |
| 14862 | return 0; |
| 14863 | } |
| 14864 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14865 | if ac_fn_c_try_compile "$LINENO"; then : |
| 14866 | # It does; now see whether it defined to _BIG_ENDIAN or not. |
| 14867 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14868 | /* end confdefs.h. */ |
| 14869 | #include <limits.h> |
| 14870 | |
| 14871 | int |
| 14872 | main () |
| 14873 | { |
| 14874 | #ifndef _BIG_ENDIAN |
| 14875 | not big endian |
| 14876 | #endif |
| 14877 | |
| 14878 | ; |
| 14879 | return 0; |
| 14880 | } |
| 14881 | _ACEOF |
| 14882 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14883 | ac_cv_c_bigendian=yes |
Benjamin Peterson | 8719ad5 | 2009-09-11 22:24:02 +0000 | [diff] [blame] | 14884 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14885 | ac_cv_c_bigendian=no |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14886 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14887 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 14888 | fi |
| 14889 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 14890 | fi |
| 14891 | if test $ac_cv_c_bigendian = unknown; then |
| 14892 | # Compile a test program. |
| 14893 | if test "$cross_compiling" = yes; then : |
| 14894 | # Try to guess by grepping values from an object file. |
| 14895 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14896 | /* end confdefs.h. */ |
| 14897 | short int ascii_mm[] = |
| 14898 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; |
| 14899 | short int ascii_ii[] = |
| 14900 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; |
| 14901 | int use_ascii (int i) { |
| 14902 | return ascii_mm[i] + ascii_ii[i]; |
| 14903 | } |
| 14904 | short int ebcdic_ii[] = |
| 14905 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; |
| 14906 | short int ebcdic_mm[] = |
| 14907 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; |
| 14908 | int use_ebcdic (int i) { |
| 14909 | return ebcdic_mm[i] + ebcdic_ii[i]; |
| 14910 | } |
| 14911 | extern int foo; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14912 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14913 | int |
| 14914 | main () |
| 14915 | { |
| 14916 | return use_ascii (foo) == use_ebcdic (foo); |
| 14917 | ; |
| 14918 | return 0; |
| 14919 | } |
| 14920 | _ACEOF |
| 14921 | if ac_fn_c_try_compile "$LINENO"; then : |
| 14922 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then |
| 14923 | ac_cv_c_bigendian=yes |
| 14924 | fi |
| 14925 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then |
| 14926 | if test "$ac_cv_c_bigendian" = unknown; then |
| 14927 | ac_cv_c_bigendian=no |
| 14928 | else |
| 14929 | # finding both strings is unlikely to happen, but who knows? |
| 14930 | ac_cv_c_bigendian=unknown |
| 14931 | fi |
| 14932 | fi |
| 14933 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14934 | 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] | 14935 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14936 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 14937 | /* end confdefs.h. */ |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14938 | $ac_includes_default |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14939 | int |
| 14940 | main () |
| 14941 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14942 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14943 | /* Are we little or big endian? From Harbison&Steele. */ |
| 14944 | union |
| 14945 | { |
| 14946 | long int l; |
| 14947 | char c[sizeof (long int)]; |
| 14948 | } u; |
| 14949 | u.l = 1; |
| 14950 | return u.c[sizeof (long int) - 1] == 1; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14951 | |
| 14952 | ; |
| 14953 | return 0; |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14954 | } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14955 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14956 | if ac_fn_c_try_run "$LINENO"; then : |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14957 | ac_cv_c_bigendian=no |
| 14958 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14959 | ac_cv_c_bigendian=yes |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14960 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14961 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 14962 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14963 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 14964 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14965 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 14966 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14967 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 |
| 14968 | $as_echo "$ac_cv_c_bigendian" >&6; } |
| 14969 | case $ac_cv_c_bigendian in #( |
| 14970 | yes) |
| 14971 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h |
| 14972 | ;; #( |
| 14973 | no) |
| 14974 | ;; #( |
| 14975 | universal) |
Ronald Oussoren | 74f29b4 | 2009-09-20 20:09:26 +0000 | [diff] [blame] | 14976 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14977 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h |
Benjamin Peterson | 8719ad5 | 2009-09-11 22:24:02 +0000 | [diff] [blame] | 14978 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14979 | ;; #( |
| 14980 | *) |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 14981 | as_fn_error $? "unknown endianness |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 14982 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 14983 | esac |
Guido van Rossum | ef2255b | 2000-03-10 22:30:29 +0000 | [diff] [blame] | 14984 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 14985 | |
Barry Warsaw | 35f3a2c | 2010-09-03 18:30:30 +0000 | [diff] [blame] | 14986 | # ABI version string for Python extension modules. This appears between the |
| 14987 | # periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated |
| 14988 | # from the following attributes which affect the ABI of this Python build (in |
| 14989 | # this order): |
| 14990 | # |
| 14991 | # * The Python implementation (always 'cpython-' for us) |
| 14992 | # * The major and minor version numbers |
| 14993 | # * --with-pydebug (adds a 'd') |
| 14994 | # * --with-pymalloc (adds a 'm') |
| 14995 | # * --with-wide-unicode (adds a 'u') |
| 14996 | # |
| 14997 | # 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] | 14998 | # would get a shared library ABI version tag of 'cpython-32dmu' and shared |
| 14999 | # libraries would be named 'foo.cpython-32dmu.so'. |
Barry Warsaw | 35f3a2c | 2010-09-03 18:30:30 +0000 | [diff] [blame] | 15000 | |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 15001 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5 |
| 15002 | $as_echo_n "checking ABIFLAGS... " >&6; } |
| 15003 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5 |
| 15004 | $as_echo "$ABIFLAGS" >&6; } |
Barry Warsaw | 35f3a2c | 2010-09-03 18:30:30 +0000 | [diff] [blame] | 15005 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5 |
| 15006 | $as_echo_n "checking SOABI... " >&6; } |
doko@ubuntu.com | d3899c1 | 2015-04-15 20:23:14 +0200 | [diff] [blame] | 15007 | SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET} |
Barry Warsaw | 35f3a2c | 2010-09-03 18:30:30 +0000 | [diff] [blame] | 15008 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5 |
| 15009 | $as_echo "$SOABI" >&6; } |
| 15010 | |
doko@ubuntu.com | d5537d0 | 2013-03-21 13:21:49 -0700 | [diff] [blame] | 15011 | |
| 15012 | case $ac_sys_system in |
Ned Deily | 3b81248 | 2015-04-15 17:11:47 -0700 | [diff] [blame] | 15013 | Linux*|GNU*|Darwin) |
doko@ubuntu.com | d5537d0 | 2013-03-21 13:21:49 -0700 | [diff] [blame] | 15014 | EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};; |
| 15015 | *) |
| 15016 | EXT_SUFFIX=${SHLIB_SUFFIX};; |
| 15017 | esac |
| 15018 | |
Barry Warsaw | 8cf4eae | 2010-10-16 01:04:07 +0000 | [diff] [blame] | 15019 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5 |
| 15020 | $as_echo_n "checking LDVERSION... " >&6; } |
| 15021 | LDVERSION='$(VERSION)$(ABIFLAGS)' |
| 15022 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5 |
| 15023 | $as_echo "$LDVERSION" >&6; } |
| 15024 | |
doko@python.org | 8742119 | 2013-01-26 11:39:31 +0100 | [diff] [blame] | 15025 | |
doko@ubuntu.com | 5553231 | 2016-06-14 08:55:19 +0200 | [diff] [blame] | 15026 | if test x$PLATFORM_TRIPLET = x; then |
| 15027 | LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}" |
| 15028 | else |
| 15029 | LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" |
| 15030 | fi |
doko@python.org | 8742119 | 2013-01-26 11:39:31 +0100 | [diff] [blame] | 15031 | |
| 15032 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 15033 | # Check whether right shifting a negative integer extends the sign bit |
| 15034 | # or fills with zeros (like the Cray J90, according to Tim Peters). |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15035 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5 |
| 15036 | $as_echo_n "checking whether right shift extends the sign bit... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15037 | if ${ac_cv_rshift_extends_sign+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15038 | $as_echo_n "(cached) " >&6 |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 15039 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15040 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15041 | if test "$cross_compiling" = yes; then : |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 15042 | ac_cv_rshift_extends_sign=yes |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 15043 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15044 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15045 | /* end confdefs.h. */ |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 15046 | |
| 15047 | int main() |
| 15048 | { |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 15049 | exit(((-1)>>3 == -1) ? 0 : 1); |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 15050 | } |
| 15051 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15052 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15053 | if ac_fn_c_try_run "$LINENO"; then : |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 15054 | ac_cv_rshift_extends_sign=yes |
| 15055 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15056 | ac_cv_rshift_extends_sign=no |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 15057 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15058 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 15059 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 15060 | fi |
| 15061 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15062 | fi |
| 15063 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15064 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5 |
| 15065 | $as_echo "$ac_cv_rshift_extends_sign" >&6; } |
Vladimir Marangozov | a618028 | 2000-07-12 05:05:06 +0000 | [diff] [blame] | 15066 | if test "$ac_cv_rshift_extends_sign" = no |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 15067 | then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15068 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15069 | $as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 15070 | |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 15071 | fi |
| 15072 | |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 15073 | # check for getc_unlocked and related locking functions |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15074 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5 |
| 15075 | $as_echo_n "checking for getc_unlocked() and friends... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15076 | if ${ac_cv_have_getc_unlocked+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15077 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 15078 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15079 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15080 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15081 | /* end confdefs.h. */ |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 15082 | #include <stdio.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15083 | int |
| 15084 | main () |
| 15085 | { |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 15086 | |
| 15087 | FILE *f = fopen("/dev/null", "r"); |
| 15088 | flockfile(f); |
| 15089 | getc_unlocked(f); |
| 15090 | funlockfile(f); |
| 15091 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15092 | ; |
| 15093 | return 0; |
| 15094 | } |
| 15095 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15096 | if ac_fn_c_try_link "$LINENO"; then : |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 15097 | ac_cv_have_getc_unlocked=yes |
| 15098 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15099 | ac_cv_have_getc_unlocked=no |
| 15100 | fi |
| 15101 | rm -f core conftest.err conftest.$ac_objext \ |
| 15102 | conftest$ac_exeext conftest.$ac_ext |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 15103 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15104 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15105 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5 |
| 15106 | $as_echo "$ac_cv_have_getc_unlocked" >&6; } |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 15107 | if test "$ac_cv_have_getc_unlocked" = yes |
| 15108 | then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15109 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15110 | $as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h |
Guido van Rossum | cadfaec | 2001-01-05 14:45:49 +0000 | [diff] [blame] | 15111 | |
| 15112 | fi |
Vladimir Marangozov | 676aa88 | 2000-07-12 03:02:43 +0000 | [diff] [blame] | 15113 | |
Neal Norwitz | fe8e3d9 | 2006-01-07 21:07:20 +0000 | [diff] [blame] | 15114 | # check where readline lives |
Martin v. Löwis | 82bca63 | 2006-02-10 20:49:30 +0000 | [diff] [blame] | 15115 | # save the value of LIBS so we don't actually link Python with readline |
| 15116 | LIBS_no_readline=$LIBS |
Neal Norwitz | fe8e3d9 | 2006-01-07 21:07:20 +0000 | [diff] [blame] | 15117 | |
Gregory P. Smith | 1882094 | 2008-09-07 06:24:49 +0000 | [diff] [blame] | 15118 | # On some systems we need to link readline to a termcap compatible |
| 15119 | # library. NOTE: Keep the precedence of listed libraries synchronised |
| 15120 | # with setup.py. |
| 15121 | py_cv_lib_readline=no |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15122 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5 |
| 15123 | $as_echo_n "checking how to link readline libs... " >&6; } |
doko@ubuntu.com | f2967c7 | 2012-06-30 17:32:23 +0200 | [diff] [blame] | 15124 | for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do |
Gregory P. Smith | 1882094 | 2008-09-07 06:24:49 +0000 | [diff] [blame] | 15125 | if test -z "$py_libtermcap"; then |
| 15126 | READLINE_LIBS="-lreadline" |
| 15127 | else |
| 15128 | READLINE_LIBS="-lreadline -l$py_libtermcap" |
| 15129 | fi |
| 15130 | LIBS="$READLINE_LIBS $LIBS_no_readline" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15131 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Neal Norwitz | fe8e3d9 | 2006-01-07 21:07:20 +0000 | [diff] [blame] | 15132 | /* end confdefs.h. */ |
| 15133 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15134 | /* Override any GCC internal prototype to avoid an error. |
| 15135 | Use char because int might match the return type of a GCC |
| 15136 | builtin and then its argument prototype would still apply. */ |
Neal Norwitz | fe8e3d9 | 2006-01-07 21:07:20 +0000 | [diff] [blame] | 15137 | #ifdef __cplusplus |
| 15138 | extern "C" |
| 15139 | #endif |
Neal Norwitz | fe8e3d9 | 2006-01-07 21:07:20 +0000 | [diff] [blame] | 15140 | char readline (); |
| 15141 | int |
| 15142 | main () |
| 15143 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15144 | return readline (); |
Neal Norwitz | fe8e3d9 | 2006-01-07 21:07:20 +0000 | [diff] [blame] | 15145 | ; |
| 15146 | return 0; |
| 15147 | } |
| 15148 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15149 | if ac_fn_c_try_link "$LINENO"; then : |
Gregory P. Smith | 1882094 | 2008-09-07 06:24:49 +0000 | [diff] [blame] | 15150 | py_cv_lib_readline=yes |
Neal Norwitz | fe8e3d9 | 2006-01-07 21:07:20 +0000 | [diff] [blame] | 15151 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15152 | rm -f core conftest.err conftest.$ac_objext \ |
| 15153 | conftest$ac_exeext conftest.$ac_ext |
Gregory P. Smith | 1882094 | 2008-09-07 06:24:49 +0000 | [diff] [blame] | 15154 | if test $py_cv_lib_readline = yes; then |
| 15155 | break |
| 15156 | fi |
| 15157 | done |
| 15158 | # Uncomment this line if you want to use READINE_LIBS in Makefile or scripts |
| 15159 | #AC_SUBST([READLINE_LIBS]) |
Gregory P. Smith | 3856c37 | 2008-09-07 19:24:00 +0000 | [diff] [blame] | 15160 | if test $py_cv_lib_readline = no; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15161 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 |
| 15162 | $as_echo "none" >&6; } |
Gregory P. Smith | 1882094 | 2008-09-07 06:24:49 +0000 | [diff] [blame] | 15163 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15164 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5 |
| 15165 | $as_echo "$READLINE_LIBS" >&6; } |
Gregory P. Smith | 1882094 | 2008-09-07 06:24:49 +0000 | [diff] [blame] | 15166 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15167 | $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h |
Neal Norwitz | fe8e3d9 | 2006-01-07 21:07:20 +0000 | [diff] [blame] | 15168 | |
Neal Norwitz | fe8e3d9 | 2006-01-07 21:07:20 +0000 | [diff] [blame] | 15169 | fi |
| 15170 | |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15171 | # check for readline 2.1 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15172 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5 |
| 15173 | $as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15174 | if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15175 | $as_echo_n "(cached) " >&6 |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15176 | else |
| 15177 | ac_check_lib_save_LIBS=$LIBS |
Gregory P. Smith | 1882094 | 2008-09-07 06:24:49 +0000 | [diff] [blame] | 15178 | LIBS="-lreadline $READLINE_LIBS $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15179 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15180 | /* end confdefs.h. */ |
| 15181 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15182 | /* Override any GCC internal prototype to avoid an error. |
| 15183 | Use char because int might match the return type of a GCC |
| 15184 | builtin and then its argument prototype would still apply. */ |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15185 | #ifdef __cplusplus |
| 15186 | extern "C" |
| 15187 | #endif |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15188 | char rl_callback_handler_install (); |
| 15189 | int |
| 15190 | main () |
| 15191 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15192 | return rl_callback_handler_install (); |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15193 | ; |
| 15194 | return 0; |
| 15195 | } |
| 15196 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15197 | if ac_fn_c_try_link "$LINENO"; then : |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15198 | ac_cv_lib_readline_rl_callback_handler_install=yes |
| 15199 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15200 | ac_cv_lib_readline_rl_callback_handler_install=no |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15201 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15202 | rm -f core conftest.err conftest.$ac_objext \ |
| 15203 | conftest$ac_exeext conftest.$ac_ext |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15204 | LIBS=$ac_check_lib_save_LIBS |
| 15205 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15206 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5 |
| 15207 | $as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15208 | if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then : |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15209 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15210 | $as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15211 | |
| 15212 | fi |
| 15213 | |
| 15214 | |
Guido van Rossum | faf5e4d | 2002-12-30 16:25:41 +0000 | [diff] [blame] | 15215 | # check for readline 2.2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15216 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15217 | /* end confdefs.h. */ |
Guido van Rossum | faf5e4d | 2002-12-30 16:25:41 +0000 | [diff] [blame] | 15218 | #include <readline/readline.h> |
| 15219 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15220 | if ac_fn_c_try_cpp "$LINENO"; then : |
Guido van Rossum | faf5e4d | 2002-12-30 16:25:41 +0000 | [diff] [blame] | 15221 | have_readline=yes |
| 15222 | else |
Guido van Rossum | faf5e4d | 2002-12-30 16:25:41 +0000 | [diff] [blame] | 15223 | have_readline=no |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 15224 | |
Guido van Rossum | faf5e4d | 2002-12-30 16:25:41 +0000 | [diff] [blame] | 15225 | fi |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 15226 | rm -f conftest.err conftest.i conftest.$ac_ext |
Guido van Rossum | faf5e4d | 2002-12-30 16:25:41 +0000 | [diff] [blame] | 15227 | if test $have_readline = yes |
| 15228 | then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15229 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15230 | /* end confdefs.h. */ |
Guido van Rossum | faf5e4d | 2002-12-30 16:25:41 +0000 | [diff] [blame] | 15231 | #include <readline/readline.h> |
| 15232 | |
| 15233 | _ACEOF |
| 15234 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15235 | $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] | 15236 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15237 | $as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h |
Guido van Rossum | faf5e4d | 2002-12-30 16:25:41 +0000 | [diff] [blame] | 15238 | |
| 15239 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 15240 | rm -f conftest* |
Guido van Rossum | faf5e4d | 2002-12-30 16:25:41 +0000 | [diff] [blame] | 15241 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15242 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Antoine Pitrou | d513177 | 2009-10-26 19:22:14 +0000 | [diff] [blame] | 15243 | /* end confdefs.h. */ |
| 15244 | #include <readline/readline.h> |
| 15245 | |
| 15246 | _ACEOF |
| 15247 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15248 | $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then : |
Antoine Pitrou | d513177 | 2009-10-26 19:22:14 +0000 | [diff] [blame] | 15249 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15250 | $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h |
Antoine Pitrou | d513177 | 2009-10-26 19:22:14 +0000 | [diff] [blame] | 15251 | |
| 15252 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 15253 | rm -f conftest* |
Antoine Pitrou | d513177 | 2009-10-26 19:22:14 +0000 | [diff] [blame] | 15254 | |
Guido van Rossum | faf5e4d | 2002-12-30 16:25:41 +0000 | [diff] [blame] | 15255 | fi |
| 15256 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 15257 | # check for readline 4.0 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15258 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5 |
| 15259 | $as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15260 | if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15261 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 15262 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15263 | ac_check_lib_save_LIBS=$LIBS |
Gregory P. Smith | 1882094 | 2008-09-07 06:24:49 +0000 | [diff] [blame] | 15264 | LIBS="-lreadline $READLINE_LIBS $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15265 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15266 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15267 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15268 | /* Override any GCC internal prototype to avoid an error. |
| 15269 | Use char because int might match the return type of a GCC |
| 15270 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15271 | #ifdef __cplusplus |
| 15272 | extern "C" |
| 15273 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15274 | char rl_pre_input_hook (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15275 | int |
| 15276 | main () |
| 15277 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15278 | return rl_pre_input_hook (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15279 | ; |
| 15280 | return 0; |
| 15281 | } |
| 15282 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15283 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15284 | ac_cv_lib_readline_rl_pre_input_hook=yes |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 15285 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15286 | ac_cv_lib_readline_rl_pre_input_hook=no |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 15287 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15288 | rm -f core conftest.err conftest.$ac_objext \ |
| 15289 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15290 | LIBS=$ac_check_lib_save_LIBS |
| 15291 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15292 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5 |
| 15293 | $as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15294 | 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] | 15295 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15296 | $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] | 15297 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 15298 | fi |
| 15299 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 15300 | |
Thomas Wouters | 89d996e | 2007-09-08 17:39:28 +0000 | [diff] [blame] | 15301 | # also in 4.0 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15302 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5 |
| 15303 | $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] | 15304 | if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15305 | $as_echo_n "(cached) " >&6 |
Thomas Wouters | 89d996e | 2007-09-08 17:39:28 +0000 | [diff] [blame] | 15306 | else |
| 15307 | ac_check_lib_save_LIBS=$LIBS |
Gregory P. Smith | 1882094 | 2008-09-07 06:24:49 +0000 | [diff] [blame] | 15308 | LIBS="-lreadline $READLINE_LIBS $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15309 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Thomas Wouters | 89d996e | 2007-09-08 17:39:28 +0000 | [diff] [blame] | 15310 | /* end confdefs.h. */ |
| 15311 | |
| 15312 | /* Override any GCC internal prototype to avoid an error. |
| 15313 | Use char because int might match the return type of a GCC |
| 15314 | builtin and then its argument prototype would still apply. */ |
| 15315 | #ifdef __cplusplus |
| 15316 | extern "C" |
| 15317 | #endif |
| 15318 | char rl_completion_display_matches_hook (); |
| 15319 | int |
| 15320 | main () |
| 15321 | { |
| 15322 | return rl_completion_display_matches_hook (); |
| 15323 | ; |
| 15324 | return 0; |
| 15325 | } |
| 15326 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15327 | if ac_fn_c_try_link "$LINENO"; then : |
Thomas Wouters | 89d996e | 2007-09-08 17:39:28 +0000 | [diff] [blame] | 15328 | ac_cv_lib_readline_rl_completion_display_matches_hook=yes |
| 15329 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15330 | ac_cv_lib_readline_rl_completion_display_matches_hook=no |
Thomas Wouters | 89d996e | 2007-09-08 17:39:28 +0000 | [diff] [blame] | 15331 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15332 | rm -f core conftest.err conftest.$ac_objext \ |
| 15333 | conftest$ac_exeext conftest.$ac_ext |
Thomas Wouters | 89d996e | 2007-09-08 17:39:28 +0000 | [diff] [blame] | 15334 | LIBS=$ac_check_lib_save_LIBS |
| 15335 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15336 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5 |
| 15337 | $as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15338 | 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] | 15339 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15340 | $as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h |
Thomas Wouters | 89d996e | 2007-09-08 17:39:28 +0000 | [diff] [blame] | 15341 | |
| 15342 | fi |
| 15343 | |
| 15344 | |
Martin Panter | 5dbbf1a | 2016-04-03 02:54:58 +0000 | [diff] [blame] | 15345 | # also in 4.0, but not in editline |
| 15346 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5 |
| 15347 | $as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; } |
| 15348 | if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then : |
| 15349 | $as_echo_n "(cached) " >&6 |
| 15350 | else |
| 15351 | ac_check_lib_save_LIBS=$LIBS |
| 15352 | LIBS="-lreadline $READLINE_LIBS $LIBS" |
| 15353 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15354 | /* end confdefs.h. */ |
| 15355 | |
| 15356 | /* Override any GCC internal prototype to avoid an error. |
| 15357 | Use char because int might match the return type of a GCC |
| 15358 | builtin and then its argument prototype would still apply. */ |
| 15359 | #ifdef __cplusplus |
| 15360 | extern "C" |
| 15361 | #endif |
| 15362 | char rl_resize_terminal (); |
| 15363 | int |
| 15364 | main () |
| 15365 | { |
| 15366 | return rl_resize_terminal (); |
| 15367 | ; |
| 15368 | return 0; |
| 15369 | } |
| 15370 | _ACEOF |
| 15371 | if ac_fn_c_try_link "$LINENO"; then : |
| 15372 | ac_cv_lib_readline_rl_resize_terminal=yes |
| 15373 | else |
| 15374 | ac_cv_lib_readline_rl_resize_terminal=no |
| 15375 | fi |
| 15376 | rm -f core conftest.err conftest.$ac_objext \ |
| 15377 | conftest$ac_exeext conftest.$ac_ext |
| 15378 | LIBS=$ac_check_lib_save_LIBS |
| 15379 | fi |
| 15380 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5 |
| 15381 | $as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; } |
| 15382 | if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then : |
| 15383 | |
| 15384 | $as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h |
| 15385 | |
| 15386 | fi |
| 15387 | |
| 15388 | |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 15389 | # check for readline 4.2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15390 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5 |
| 15391 | $as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15392 | if ${ac_cv_lib_readline_rl_completion_matches+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15393 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 0daad59 | 2001-09-30 21:09:59 +0000 | [diff] [blame] | 15394 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15395 | ac_check_lib_save_LIBS=$LIBS |
Gregory P. Smith | 1882094 | 2008-09-07 06:24:49 +0000 | [diff] [blame] | 15396 | LIBS="-lreadline $READLINE_LIBS $LIBS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15397 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15398 | /* end confdefs.h. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15399 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15400 | /* Override any GCC internal prototype to avoid an error. |
| 15401 | Use char because int might match the return type of a GCC |
| 15402 | builtin and then its argument prototype would still apply. */ |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15403 | #ifdef __cplusplus |
| 15404 | extern "C" |
| 15405 | #endif |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15406 | char rl_completion_matches (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15407 | int |
| 15408 | main () |
| 15409 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15410 | return rl_completion_matches (); |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15411 | ; |
| 15412 | return 0; |
| 15413 | } |
| 15414 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15415 | if ac_fn_c_try_link "$LINENO"; then : |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15416 | ac_cv_lib_readline_rl_completion_matches=yes |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 15417 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15418 | ac_cv_lib_readline_rl_completion_matches=no |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 15419 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15420 | rm -f core conftest.err conftest.$ac_objext \ |
| 15421 | conftest$ac_exeext conftest.$ac_ext |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15422 | LIBS=$ac_check_lib_save_LIBS |
| 15423 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15424 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5 |
| 15425 | $as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15426 | 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] | 15427 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15428 | $as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 15429 | |
Guido van Rossum | 353ae58 | 2001-07-10 16:45:32 +0000 | [diff] [blame] | 15430 | fi |
| 15431 | |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 15432 | |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15433 | # also in readline 4.2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15434 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15435 | /* end confdefs.h. */ |
| 15436 | #include <readline/readline.h> |
| 15437 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15438 | if ac_fn_c_try_cpp "$LINENO"; then : |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15439 | have_readline=yes |
| 15440 | else |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15441 | have_readline=no |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 15442 | |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15443 | fi |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 15444 | rm -f conftest.err conftest.i conftest.$ac_ext |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15445 | if test $have_readline = yes |
| 15446 | then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15447 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15448 | /* end confdefs.h. */ |
| 15449 | #include <readline/readline.h> |
| 15450 | |
| 15451 | _ACEOF |
| 15452 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15453 | $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then : |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15454 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15455 | $as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15456 | |
| 15457 | fi |
Matthias Klose | c80c93f | 2010-04-24 17:04:35 +0000 | [diff] [blame] | 15458 | rm -f conftest* |
Michael W. Hudson | 30ea2f2 | 2004-07-07 17:44:12 +0000 | [diff] [blame] | 15459 | |
| 15460 | fi |
| 15461 | |
Benjamin Peterson | d1e22ba | 2014-11-26 14:35:12 -0600 | [diff] [blame] | 15462 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5 |
| 15463 | $as_echo_n "checking for append_history in -lreadline... " >&6; } |
| 15464 | if ${ac_cv_lib_readline_append_history+:} false; then : |
| 15465 | $as_echo_n "(cached) " >&6 |
| 15466 | else |
| 15467 | ac_check_lib_save_LIBS=$LIBS |
| 15468 | LIBS="-lreadline $READLINE_LIBS $LIBS" |
| 15469 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15470 | /* end confdefs.h. */ |
| 15471 | |
| 15472 | /* Override any GCC internal prototype to avoid an error. |
| 15473 | Use char because int might match the return type of a GCC |
| 15474 | builtin and then its argument prototype would still apply. */ |
| 15475 | #ifdef __cplusplus |
| 15476 | extern "C" |
| 15477 | #endif |
| 15478 | char append_history (); |
| 15479 | int |
| 15480 | main () |
| 15481 | { |
| 15482 | return append_history (); |
| 15483 | ; |
| 15484 | return 0; |
| 15485 | } |
| 15486 | _ACEOF |
| 15487 | if ac_fn_c_try_link "$LINENO"; then : |
| 15488 | ac_cv_lib_readline_append_history=yes |
| 15489 | else |
| 15490 | ac_cv_lib_readline_append_history=no |
| 15491 | fi |
| 15492 | rm -f core conftest.err conftest.$ac_objext \ |
| 15493 | conftest$ac_exeext conftest.$ac_ext |
| 15494 | LIBS=$ac_check_lib_save_LIBS |
| 15495 | fi |
| 15496 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5 |
| 15497 | $as_echo "$ac_cv_lib_readline_append_history" >&6; } |
| 15498 | if test "x$ac_cv_lib_readline_append_history" = xyes; then : |
| 15499 | |
| 15500 | $as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h |
| 15501 | |
| 15502 | fi |
| 15503 | |
| 15504 | |
Martin v. Löwis | 82bca63 | 2006-02-10 20:49:30 +0000 | [diff] [blame] | 15505 | # End of readline checks: restore LIBS |
| 15506 | LIBS=$LIBS_no_readline |
| 15507 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15508 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5 |
| 15509 | $as_echo_n "checking for broken nice()... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15510 | if ${ac_cv_broken_nice+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15511 | $as_echo_n "(cached) " >&6 |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 15512 | else |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15513 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15514 | if test "$cross_compiling" = yes; then : |
Guido van Rossum | 3065c94 | 2001-09-17 04:03:14 +0000 | [diff] [blame] | 15515 | ac_cv_broken_nice=no |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 15516 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15517 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15518 | /* end confdefs.h. */ |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 15519 | |
| 15520 | int main() |
| 15521 | { |
| 15522 | int val1 = nice(1); |
| 15523 | if (val1 != -1 && val1 == nice(2)) |
| 15524 | exit(0); |
| 15525 | exit(1); |
| 15526 | } |
| 15527 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15528 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15529 | if ac_fn_c_try_run "$LINENO"; then : |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 15530 | ac_cv_broken_nice=yes |
| 15531 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15532 | ac_cv_broken_nice=no |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 15533 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15534 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 15535 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 15536 | fi |
| 15537 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15538 | fi |
| 15539 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15540 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5 |
| 15541 | $as_echo "$ac_cv_broken_nice" >&6; } |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 15542 | if test "$ac_cv_broken_nice" = yes |
| 15543 | then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15544 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15545 | $as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h |
Thomas Wouters | e38b2f1 | 2001-07-11 22:35:31 +0000 | [diff] [blame] | 15546 | |
| 15547 | fi |
| 15548 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15549 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5 |
| 15550 | $as_echo_n "checking for broken poll()... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15551 | if ${ac_cv_broken_poll+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15552 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 15553 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15554 | if test "$cross_compiling" = yes; then : |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15555 | ac_cv_broken_poll=no |
| 15556 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15557 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15558 | /* end confdefs.h. */ |
| 15559 | |
| 15560 | #include <poll.h> |
| 15561 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 15562 | int main() |
| 15563 | { |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15564 | struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 }; |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 15565 | int poll_test; |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15566 | |
| 15567 | close (42); |
| 15568 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 15569 | poll_test = poll(&poll_struct, 1, 0); |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15570 | if (poll_test < 0) |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 15571 | return 0; |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15572 | else if (poll_test == 0 && poll_struct.revents != POLLNVAL) |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 15573 | return 0; |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15574 | else |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 15575 | return 1; |
| 15576 | } |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15577 | |
| 15578 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15579 | if ac_fn_c_try_run "$LINENO"; then : |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15580 | ac_cv_broken_poll=yes |
| 15581 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15582 | ac_cv_broken_poll=no |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15583 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15584 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 15585 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15586 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15587 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 15588 | fi |
| 15589 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15590 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5 |
| 15591 | $as_echo "$ac_cv_broken_poll" >&6; } |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15592 | if test "$ac_cv_broken_poll" = yes |
| 15593 | then |
| 15594 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15595 | $as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15596 | |
| 15597 | fi |
| 15598 | |
Brett Cannon | 4380242 | 2005-02-10 20:48:03 +0000 | [diff] [blame] | 15599 | # Before we can test tzset, we need to check if struct tm has a tm_zone |
Martin v. Löwis | 1d45906 | 2005-03-14 21:23:33 +0000 | [diff] [blame] | 15600 | # (which is not required by ISO C or UNIX spec) and/or if we support |
| 15601 | # tzname[] |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15602 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h> |
Brett Cannon | 4380242 | 2005-02-10 20:48:03 +0000 | [diff] [blame] | 15603 | #include <$ac_cv_struct_tm> |
| 15604 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15605 | " |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15606 | if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : |
Brett Cannon | 4380242 | 2005-02-10 20:48:03 +0000 | [diff] [blame] | 15607 | |
| 15608 | cat >>confdefs.h <<_ACEOF |
| 15609 | #define HAVE_STRUCT_TM_TM_ZONE 1 |
| 15610 | _ACEOF |
| 15611 | |
| 15612 | |
| 15613 | fi |
| 15614 | |
| 15615 | if test "$ac_cv_member_struct_tm_tm_zone" = yes; then |
| 15616 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15617 | $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h |
Brett Cannon | 4380242 | 2005-02-10 20:48:03 +0000 | [diff] [blame] | 15618 | |
| 15619 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15620 | ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h> |
| 15621 | " |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15622 | if test "x$ac_cv_have_decl_tzname" = xyes; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15623 | ac_have_decl=1 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15624 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15625 | ac_have_decl=0 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15626 | fi |
| 15627 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15628 | cat >>confdefs.h <<_ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15629 | #define HAVE_DECL_TZNAME $ac_have_decl |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15630 | _ACEOF |
| 15631 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15632 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 |
| 15633 | $as_echo_n "checking for tzname... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15634 | if ${ac_cv_var_tzname+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15635 | $as_echo_n "(cached) " >&6 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15636 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15637 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Brett Cannon | 4380242 | 2005-02-10 20:48:03 +0000 | [diff] [blame] | 15638 | /* end confdefs.h. */ |
| 15639 | #include <time.h> |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15640 | #if !HAVE_DECL_TZNAME |
| 15641 | extern char *tzname[]; |
Brett Cannon | 4380242 | 2005-02-10 20:48:03 +0000 | [diff] [blame] | 15642 | #endif |
| 15643 | |
| 15644 | int |
| 15645 | main () |
| 15646 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15647 | return tzname[0][0]; |
Brett Cannon | 4380242 | 2005-02-10 20:48:03 +0000 | [diff] [blame] | 15648 | ; |
| 15649 | return 0; |
| 15650 | } |
| 15651 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15652 | if ac_fn_c_try_link "$LINENO"; then : |
Brett Cannon | 4380242 | 2005-02-10 20:48:03 +0000 | [diff] [blame] | 15653 | ac_cv_var_tzname=yes |
| 15654 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15655 | ac_cv_var_tzname=no |
Brett Cannon | 4380242 | 2005-02-10 20:48:03 +0000 | [diff] [blame] | 15656 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15657 | rm -f core conftest.err conftest.$ac_objext \ |
| 15658 | conftest$ac_exeext conftest.$ac_ext |
Brett Cannon | 4380242 | 2005-02-10 20:48:03 +0000 | [diff] [blame] | 15659 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15660 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 |
| 15661 | $as_echo "$ac_cv_var_tzname" >&6; } |
Brett Cannon | 4380242 | 2005-02-10 20:48:03 +0000 | [diff] [blame] | 15662 | if test $ac_cv_var_tzname = yes; then |
| 15663 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15664 | $as_echo "#define HAVE_TZNAME 1" >>confdefs.h |
Brett Cannon | 4380242 | 2005-02-10 20:48:03 +0000 | [diff] [blame] | 15665 | |
| 15666 | fi |
| 15667 | fi |
| 15668 | |
Nicholas Bastin | e62c5c8 | 2004-03-21 23:45:42 +0000 | [diff] [blame] | 15669 | |
Martin v. Löwis | 1d45906 | 2005-03-14 21:23:33 +0000 | [diff] [blame] | 15670 | # check tzset(3) exists and works like we expect it to |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15671 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5 |
| 15672 | $as_echo_n "checking for working tzset()... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15673 | if ${ac_cv_working_tzset+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15674 | $as_echo_n "(cached) " >&6 |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15675 | else |
| 15676 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15677 | if test "$cross_compiling" = yes; then : |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15678 | ac_cv_working_tzset=no |
| 15679 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15680 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15681 | /* end confdefs.h. */ |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15682 | |
| 15683 | #include <stdlib.h> |
| 15684 | #include <time.h> |
Brett Cannon | 1836781 | 2003-09-19 00:59:16 +0000 | [diff] [blame] | 15685 | #include <string.h> |
Brett Cannon | 4380242 | 2005-02-10 20:48:03 +0000 | [diff] [blame] | 15686 | |
| 15687 | #if HAVE_TZNAME |
| 15688 | extern char *tzname[]; |
| 15689 | #endif |
| 15690 | |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15691 | int main() |
| 15692 | { |
Brett Cannon | 1836781 | 2003-09-19 00:59:16 +0000 | [diff] [blame] | 15693 | /* Note that we need to ensure that not only does tzset(3) |
| 15694 | do 'something' with localtime, but it works as documented |
| 15695 | 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] | 15696 | This includes making sure that tzname is set properly if |
| 15697 | tm->tm_zone does not exist since it is the alternative way |
| 15698 | of getting timezone info. |
Brett Cannon | 1836781 | 2003-09-19 00:59:16 +0000 | [diff] [blame] | 15699 | |
| 15700 | Red Hat 6.2 doesn't understand the southern hemisphere |
Martin v. Löwis | 1d45906 | 2005-03-14 21:23:33 +0000 | [diff] [blame] | 15701 | after New Year's Day. |
Brett Cannon | 1836781 | 2003-09-19 00:59:16 +0000 | [diff] [blame] | 15702 | */ |
| 15703 | |
Martin v. Löwis | 1d45906 | 2005-03-14 21:23:33 +0000 | [diff] [blame] | 15704 | time_t groundhogday = 1044144000; /* GMT-based */ |
Brett Cannon | 1836781 | 2003-09-19 00:59:16 +0000 | [diff] [blame] | 15705 | time_t midyear = groundhogday + (365 * 24 * 3600 / 2); |
| 15706 | |
Neal Norwitz | 7f2588c | 2003-04-11 15:35:53 +0000 | [diff] [blame] | 15707 | putenv("TZ=UTC+0"); |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15708 | tzset(); |
Brett Cannon | 1836781 | 2003-09-19 00:59:16 +0000 | [diff] [blame] | 15709 | if (localtime(&groundhogday)->tm_hour != 0) |
| 15710 | exit(1); |
Brett Cannon | 4380242 | 2005-02-10 20:48:03 +0000 | [diff] [blame] | 15711 | #if HAVE_TZNAME |
| 15712 | /* For UTC, tzname[1] is sometimes "", sometimes " " */ |
| 15713 | if (strcmp(tzname[0], "UTC") || |
| 15714 | (tzname[1][0] != 0 && tzname[1][0] != ' ')) |
| 15715 | exit(1); |
| 15716 | #endif |
Brett Cannon | 1836781 | 2003-09-19 00:59:16 +0000 | [diff] [blame] | 15717 | |
Neal Norwitz | 7f2588c | 2003-04-11 15:35:53 +0000 | [diff] [blame] | 15718 | putenv("TZ=EST+5EDT,M4.1.0,M10.5.0"); |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15719 | tzset(); |
Brett Cannon | 1836781 | 2003-09-19 00:59:16 +0000 | [diff] [blame] | 15720 | if (localtime(&groundhogday)->tm_hour != 19) |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15721 | exit(1); |
Brett Cannon | 4380242 | 2005-02-10 20:48:03 +0000 | [diff] [blame] | 15722 | #if HAVE_TZNAME |
| 15723 | if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT")) |
| 15724 | exit(1); |
| 15725 | #endif |
Brett Cannon | 1836781 | 2003-09-19 00:59:16 +0000 | [diff] [blame] | 15726 | |
| 15727 | putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0"); |
| 15728 | tzset(); |
| 15729 | if (localtime(&groundhogday)->tm_hour != 11) |
| 15730 | exit(1); |
Brett Cannon | 4380242 | 2005-02-10 20:48:03 +0000 | [diff] [blame] | 15731 | #if HAVE_TZNAME |
| 15732 | if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT")) |
| 15733 | exit(1); |
| 15734 | #endif |
| 15735 | |
| 15736 | #if HAVE_STRUCT_TM_TM_ZONE |
Brett Cannon | 1836781 | 2003-09-19 00:59:16 +0000 | [diff] [blame] | 15737 | if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT")) |
| 15738 | exit(1); |
| 15739 | if (strcmp(localtime(&midyear)->tm_zone, "AEST")) |
| 15740 | exit(1); |
Brett Cannon | 4380242 | 2005-02-10 20:48:03 +0000 | [diff] [blame] | 15741 | #endif |
Brett Cannon | 1836781 | 2003-09-19 00:59:16 +0000 | [diff] [blame] | 15742 | |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15743 | exit(0); |
| 15744 | } |
| 15745 | |
| 15746 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15747 | if ac_fn_c_try_run "$LINENO"; then : |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15748 | ac_cv_working_tzset=yes |
| 15749 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15750 | ac_cv_working_tzset=no |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15751 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15752 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 15753 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15754 | fi |
| 15755 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15756 | fi |
| 15757 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15758 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5 |
| 15759 | $as_echo "$ac_cv_working_tzset" >&6; } |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15760 | if test "$ac_cv_working_tzset" = yes |
| 15761 | then |
| 15762 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15763 | $as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h |
Guido van Rossum | d11b62e | 2003-03-14 21:51:36 +0000 | [diff] [blame] | 15764 | |
| 15765 | fi |
| 15766 | |
Martin v. Löwis | 94717ed | 2002-09-09 14:24:16 +0000 | [diff] [blame] | 15767 | # Look for subsecond timestamps in struct stat |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15768 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5 |
| 15769 | $as_echo_n "checking for tv_nsec in struct stat... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15770 | if ${ac_cv_stat_tv_nsec+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15771 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | 94717ed | 2002-09-09 14:24:16 +0000 | [diff] [blame] | 15772 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15773 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15774 | /* end confdefs.h. */ |
Martin v. Löwis | 94717ed | 2002-09-09 14:24:16 +0000 | [diff] [blame] | 15775 | #include <sys/stat.h> |
Martin v. Löwis | 94717ed | 2002-09-09 14:24:16 +0000 | [diff] [blame] | 15776 | int |
| 15777 | main () |
| 15778 | { |
| 15779 | |
| 15780 | struct stat st; |
| 15781 | st.st_mtim.tv_nsec = 1; |
| 15782 | |
| 15783 | ; |
| 15784 | return 0; |
| 15785 | } |
| 15786 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15787 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | a32c994 | 2002-09-09 16:17:47 +0000 | [diff] [blame] | 15788 | ac_cv_stat_tv_nsec=yes |
Martin v. Löwis | 94717ed | 2002-09-09 14:24:16 +0000 | [diff] [blame] | 15789 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15790 | ac_cv_stat_tv_nsec=no |
Martin v. Löwis | 94717ed | 2002-09-09 14:24:16 +0000 | [diff] [blame] | 15791 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15792 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15793 | fi |
| 15794 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15795 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5 |
| 15796 | $as_echo "$ac_cv_stat_tv_nsec" >&6; } |
Martin v. Löwis | 94717ed | 2002-09-09 14:24:16 +0000 | [diff] [blame] | 15797 | if test "$ac_cv_stat_tv_nsec" = yes |
| 15798 | then |
| 15799 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15800 | $as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h |
Martin v. Löwis | 94717ed | 2002-09-09 14:24:16 +0000 | [diff] [blame] | 15801 | |
| 15802 | fi |
| 15803 | |
Martin v. Löwis | ebd9d5b | 2005-08-09 15:00:59 +0000 | [diff] [blame] | 15804 | # Look for BSD style subsecond timestamps in struct stat |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15805 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5 |
| 15806 | $as_echo_n "checking for tv_nsec2 in struct stat... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15807 | if ${ac_cv_stat_tv_nsec2+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15808 | $as_echo_n "(cached) " >&6 |
Martin v. Löwis | ebd9d5b | 2005-08-09 15:00:59 +0000 | [diff] [blame] | 15809 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15810 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Martin v. Löwis | ebd9d5b | 2005-08-09 15:00:59 +0000 | [diff] [blame] | 15811 | /* end confdefs.h. */ |
| 15812 | #include <sys/stat.h> |
| 15813 | int |
| 15814 | main () |
| 15815 | { |
| 15816 | |
| 15817 | struct stat st; |
| 15818 | st.st_mtimespec.tv_nsec = 1; |
| 15819 | |
| 15820 | ; |
| 15821 | return 0; |
| 15822 | } |
| 15823 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15824 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | ebd9d5b | 2005-08-09 15:00:59 +0000 | [diff] [blame] | 15825 | ac_cv_stat_tv_nsec2=yes |
| 15826 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15827 | ac_cv_stat_tv_nsec2=no |
Martin v. Löwis | ebd9d5b | 2005-08-09 15:00:59 +0000 | [diff] [blame] | 15828 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15829 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15830 | fi |
| 15831 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15832 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5 |
| 15833 | $as_echo "$ac_cv_stat_tv_nsec2" >&6; } |
Martin v. Löwis | ebd9d5b | 2005-08-09 15:00:59 +0000 | [diff] [blame] | 15834 | if test "$ac_cv_stat_tv_nsec2" = yes |
| 15835 | then |
| 15836 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15837 | $as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h |
Martin v. Löwis | ebd9d5b | 2005-08-09 15:00:59 +0000 | [diff] [blame] | 15838 | |
| 15839 | fi |
| 15840 | |
doko@ubuntu.com | 1a4f561 | 2014-04-17 20:13:44 +0200 | [diff] [blame] | 15841 | # first curses header check |
doko@ubuntu.com | 9dc823d | 2012-07-07 03:06:42 +0200 | [diff] [blame] | 15842 | ac_save_cppflags="$CPPFLAGS" |
Xavier de Gaye | e13c320 | 2016-12-13 16:04:14 +0100 | [diff] [blame] | 15843 | if test "$cross_compiling" = no; then |
| 15844 | CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw" |
| 15845 | fi |
doko@ubuntu.com | 1a4f561 | 2014-04-17 20:13:44 +0200 | [diff] [blame] | 15846 | |
| 15847 | for ac_header in curses.h ncurses.h |
| 15848 | do : |
| 15849 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| 15850 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" |
| 15851 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
| 15852 | cat >>confdefs.h <<_ACEOF |
| 15853 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
| 15854 | _ACEOF |
| 15855 | |
| 15856 | fi |
| 15857 | |
| 15858 | done |
| 15859 | |
| 15860 | |
| 15861 | # On Solaris, term.h requires curses.h |
| 15862 | for ac_header in term.h |
| 15863 | do : |
| 15864 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" " |
| 15865 | #ifdef HAVE_CURSES_H |
| 15866 | #include <curses.h> |
| 15867 | #endif |
| 15868 | |
| 15869 | " |
| 15870 | if test "x$ac_cv_header_term_h" = xyes; then : |
| 15871 | cat >>confdefs.h <<_ACEOF |
| 15872 | #define HAVE_TERM_H 1 |
| 15873 | _ACEOF |
| 15874 | |
| 15875 | fi |
| 15876 | |
| 15877 | done |
| 15878 | |
| 15879 | |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15880 | # 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] | 15881 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5 |
| 15882 | $as_echo_n "checking whether mvwdelch is an expression... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15883 | if ${ac_cv_mvwdelch_is_expression+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15884 | $as_echo_n "(cached) " >&6 |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15885 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15886 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15887 | /* end confdefs.h. */ |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15888 | #include <curses.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15889 | int |
| 15890 | main () |
| 15891 | { |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15892 | |
| 15893 | int rtn; |
| 15894 | rtn = mvwdelch(0,0,0); |
| 15895 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15896 | ; |
| 15897 | return 0; |
| 15898 | } |
| 15899 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15900 | if ac_fn_c_try_compile "$LINENO"; then : |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15901 | ac_cv_mvwdelch_is_expression=yes |
| 15902 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15903 | ac_cv_mvwdelch_is_expression=no |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15904 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15905 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15906 | fi |
| 15907 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15908 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5 |
| 15909 | $as_echo "$ac_cv_mvwdelch_is_expression" >&6; } |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15910 | |
| 15911 | if test "$ac_cv_mvwdelch_is_expression" = yes |
| 15912 | then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15913 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15914 | $as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15915 | |
| 15916 | fi |
| 15917 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15918 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5 |
| 15919 | $as_echo_n "checking whether WINDOW has _flags... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 15920 | if ${ac_cv_window_has_flags+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15921 | $as_echo_n "(cached) " >&6 |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15922 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15923 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 15924 | /* end confdefs.h. */ |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15925 | #include <curses.h> |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15926 | int |
| 15927 | main () |
| 15928 | { |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15929 | |
| 15930 | WINDOW *w; |
| 15931 | w->_flags = 0; |
| 15932 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15933 | ; |
| 15934 | return 0; |
| 15935 | } |
| 15936 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15937 | if ac_fn_c_try_compile "$LINENO"; then : |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15938 | ac_cv_window_has_flags=yes |
| 15939 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15940 | ac_cv_window_has_flags=no |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15941 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15942 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15943 | fi |
| 15944 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15945 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5 |
| 15946 | $as_echo "$ac_cv_window_has_flags" >&6; } |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 15947 | |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15948 | |
| 15949 | if test "$ac_cv_window_has_flags" = yes |
| 15950 | then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 15951 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15952 | $as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h |
Jack Jansen | 666b1e7 | 2001-10-31 12:11:48 +0000 | [diff] [blame] | 15953 | |
| 15954 | fi |
| 15955 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15956 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5 |
| 15957 | $as_echo_n "checking for is_term_resized... " >&6; } |
| 15958 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 15959 | /* end confdefs.h. */ |
| 15960 | #include <curses.h> |
| 15961 | int |
| 15962 | main () |
| 15963 | { |
| 15964 | void *x=is_term_resized |
| 15965 | ; |
| 15966 | return 0; |
| 15967 | } |
| 15968 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15969 | if ac_fn_c_try_compile "$LINENO"; then : |
Martin v. Löwis | 24a880b | 2002-12-31 12:55:15 +0000 | [diff] [blame] | 15970 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15971 | $as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 15972 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 15973 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15974 | $as_echo "yes" >&6; } |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 15975 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15976 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 15977 | $as_echo "no" >&6; } |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 15978 | |
| 15979 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 15980 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15981 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15982 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5 |
| 15983 | $as_echo_n "checking for resize_term... " >&6; } |
| 15984 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 15985 | /* end confdefs.h. */ |
| 15986 | #include <curses.h> |
| 15987 | int |
| 15988 | main () |
| 15989 | { |
| 15990 | void *x=resize_term |
| 15991 | ; |
| 15992 | return 0; |
| 15993 | } |
| 15994 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15995 | if ac_fn_c_try_compile "$LINENO"; then : |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 15996 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 15997 | $as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 15998 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 15999 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16000 | $as_echo "yes" >&6; } |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 16001 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16002 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 16003 | $as_echo "no" >&6; } |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 16004 | |
| 16005 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16006 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 16007 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16008 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5 |
| 16009 | $as_echo_n "checking for resizeterm... " >&6; } |
| 16010 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 16011 | /* end confdefs.h. */ |
| 16012 | #include <curses.h> |
| 16013 | int |
| 16014 | main () |
| 16015 | { |
| 16016 | void *x=resizeterm |
| 16017 | ; |
| 16018 | return 0; |
| 16019 | } |
| 16020 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16021 | if ac_fn_c_try_compile "$LINENO"; then : |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 16022 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16023 | $as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 16024 | |
Matthias Klose | b159a55 | 2010-04-25 21:00:44 +0000 | [diff] [blame] | 16025 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16026 | $as_echo "yes" >&6; } |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 16027 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16028 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 16029 | $as_echo "no" >&6; } |
Thomas Wouters | 0e3f591 | 2006-08-11 14:57:12 +0000 | [diff] [blame] | 16030 | |
| 16031 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16032 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
doko@ubuntu.com | 9dc823d | 2012-07-07 03:06:42 +0200 | [diff] [blame] | 16033 | # last curses configure check |
| 16034 | CPPFLAGS=$ac_save_cppflags |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16035 | |
doko@ubuntu.com | b457b9b | 2012-06-30 19:28:16 +0200 | [diff] [blame] | 16036 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5 |
| 16037 | $as_echo "$as_me: checking for device files" >&6;} |
| 16038 | |
| 16039 | if test "x$cross_compiling" = xyes; then |
| 16040 | if test "${ac_cv_file__dev_ptmx+set}" != set; then |
| 16041 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5 |
| 16042 | $as_echo_n "checking for /dev/ptmx... " >&6; } |
| 16043 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5 |
| 16044 | $as_echo "not set" >&6; } |
| 16045 | as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5 |
| 16046 | fi |
| 16047 | if test "${ac_cv_file__dev_ptc+set}" != set; then |
| 16048 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5 |
| 16049 | $as_echo_n "checking for /dev/ptc... " >&6; } |
| 16050 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5 |
| 16051 | $as_echo "not set" >&6; } |
| 16052 | as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5 |
| 16053 | fi |
| 16054 | fi |
| 16055 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16056 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5 |
| 16057 | $as_echo_n "checking for /dev/ptmx... " >&6; } |
doko@ubuntu.com | b457b9b | 2012-06-30 19:28:16 +0200 | [diff] [blame] | 16058 | if ${ac_cv_file__dev_ptmx+:} false; then : |
| 16059 | $as_echo_n "(cached) " >&6 |
| 16060 | else |
| 16061 | test "$cross_compiling" = yes && |
| 16062 | as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 |
| 16063 | if test -r "/dev/ptmx"; then |
| 16064 | ac_cv_file__dev_ptmx=yes |
| 16065 | else |
| 16066 | ac_cv_file__dev_ptmx=no |
| 16067 | fi |
| 16068 | fi |
| 16069 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5 |
| 16070 | $as_echo "$ac_cv_file__dev_ptmx" >&6; } |
| 16071 | if test "x$ac_cv_file__dev_ptmx" = xyes; then : |
Thomas Wouters | 89f507f | 2006-12-13 04:49:30 +0000 | [diff] [blame] | 16072 | |
doko@ubuntu.com | b457b9b | 2012-06-30 19:28:16 +0200 | [diff] [blame] | 16073 | fi |
| 16074 | |
| 16075 | if test "x$ac_cv_file__dev_ptmx" = xyes; then |
Martin v. Löwis | 24a880b | 2002-12-31 12:55:15 +0000 | [diff] [blame] | 16076 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16077 | $as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h |
Martin v. Löwis | 24a880b | 2002-12-31 12:55:15 +0000 | [diff] [blame] | 16078 | |
Martin v. Löwis | 24a880b | 2002-12-31 12:55:15 +0000 | [diff] [blame] | 16079 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16080 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5 |
| 16081 | $as_echo_n "checking for /dev/ptc... " >&6; } |
doko@ubuntu.com | b457b9b | 2012-06-30 19:28:16 +0200 | [diff] [blame] | 16082 | if ${ac_cv_file__dev_ptc+:} false; then : |
| 16083 | $as_echo_n "(cached) " >&6 |
| 16084 | else |
| 16085 | test "$cross_compiling" = yes && |
| 16086 | as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 |
| 16087 | if test -r "/dev/ptc"; then |
| 16088 | ac_cv_file__dev_ptc=yes |
| 16089 | else |
| 16090 | ac_cv_file__dev_ptc=no |
| 16091 | fi |
| 16092 | fi |
| 16093 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5 |
| 16094 | $as_echo "$ac_cv_file__dev_ptc" >&6; } |
| 16095 | if test "x$ac_cv_file__dev_ptc" = xyes; then : |
Thomas Wouters | 89f507f | 2006-12-13 04:49:30 +0000 | [diff] [blame] | 16096 | |
doko@ubuntu.com | b457b9b | 2012-06-30 19:28:16 +0200 | [diff] [blame] | 16097 | fi |
| 16098 | |
| 16099 | if test "x$ac_cv_file__dev_ptc" = xyes; then |
Neal Norwitz | 865400f | 2003-03-21 01:42:58 +0000 | [diff] [blame] | 16100 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16101 | $as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h |
Neal Norwitz | 865400f | 2003-03-21 01:42:58 +0000 | [diff] [blame] | 16102 | |
Neal Norwitz | 865400f | 2003-03-21 01:42:58 +0000 | [diff] [blame] | 16103 | fi |
| 16104 | |
Ronald Oussoren | 3c1928a | 2009-11-19 17:15:31 +0000 | [diff] [blame] | 16105 | if test $ac_sys_system = Darwin |
| 16106 | then |
| 16107 | LIBS="$LIBS -framework CoreFoundation" |
| 16108 | fi |
Mark Dickinson | 6ce4a9a | 2009-11-16 17:00:11 +0000 | [diff] [blame] | 16109 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16110 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5 |
| 16111 | $as_echo_n "checking for %zd printf() format support... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 16112 | if ${ac_cv_have_size_t_format+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16113 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 16114 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16115 | if test "$cross_compiling" = yes; then : |
Benjamin Peterson | 8f326b2 | 2009-12-13 02:10:36 +0000 | [diff] [blame] | 16116 | ac_cv_have_size_t_format="cross -- assuming yes" |
| 16117 | |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 16118 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16119 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 16120 | /* end confdefs.h. */ |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 16121 | |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 16122 | #include <stdio.h> |
| 16123 | #include <stddef.h> |
| 16124 | #include <string.h> |
| 16125 | |
Christian Heimes | 2c18161 | 2007-12-17 20:04:13 +0000 | [diff] [blame] | 16126 | #ifdef HAVE_SYS_TYPES_H |
| 16127 | #include <sys/types.h> |
| 16128 | #endif |
Thomas Wouters | 89f507f | 2006-12-13 04:49:30 +0000 | [diff] [blame] | 16129 | |
| 16130 | #ifdef HAVE_SSIZE_T |
| 16131 | typedef ssize_t Py_ssize_t; |
| 16132 | #elif SIZEOF_VOID_P == SIZEOF_LONG |
| 16133 | typedef long Py_ssize_t; |
| 16134 | #else |
| 16135 | typedef int Py_ssize_t; |
| 16136 | #endif |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 16137 | |
Christian Heimes | 2c18161 | 2007-12-17 20:04:13 +0000 | [diff] [blame] | 16138 | int main() |
| 16139 | { |
| 16140 | char buffer[256]; |
| 16141 | |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 16142 | if(sprintf(buffer, "%zd", (size_t)123) < 0) |
| 16143 | return 1; |
| 16144 | |
Thomas Wouters | 89f507f | 2006-12-13 04:49:30 +0000 | [diff] [blame] | 16145 | if (strcmp(buffer, "123")) |
| 16146 | return 1; |
| 16147 | |
| 16148 | if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0) |
| 16149 | return 1; |
| 16150 | |
| 16151 | if (strcmp(buffer, "-123")) |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 16152 | return 1; |
| 16153 | |
| 16154 | return 0; |
| 16155 | } |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 16156 | |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 16157 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16158 | if ac_fn_c_try_run "$LINENO"; then : |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 16159 | ac_cv_have_size_t_format=yes |
Alexandre Vassalotti | 1914228 | 2009-07-17 23:11:52 +0000 | [diff] [blame] | 16160 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16161 | ac_cv_have_size_t_format=no |
Alexandre Vassalotti | 1914228 | 2009-07-17 23:11:52 +0000 | [diff] [blame] | 16162 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16163 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 16164 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Alexandre Vassalotti | 302825b | 2009-07-17 07:49:53 +0000 | [diff] [blame] | 16165 | fi |
| 16166 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 16167 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16168 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5 |
| 16169 | $as_echo "$ac_cv_have_size_t_format" >&6; } |
Benjamin Peterson | 8f326b2 | 2009-12-13 02:10:36 +0000 | [diff] [blame] | 16170 | if test "$ac_cv_have_size_t_format" != no ; then |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 16171 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16172 | $as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 16173 | |
| 16174 | fi |
| 16175 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16176 | 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] | 16177 | #ifdef HAVE_SYS_TYPES_H |
| 16178 | #include <sys/types.h> |
| 16179 | #endif |
| 16180 | #ifdef HAVE_SYS_SOCKET_H |
| 16181 | #include <sys/socket.h> |
| 16182 | #endif |
| 16183 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16184 | " |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 16185 | if test "x$ac_cv_type_socklen_t" = xyes; then : |
Martin v. Löwis | 01c0401 | 2002-11-11 14:58:44 +0000 | [diff] [blame] | 16186 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16187 | else |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 16188 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16189 | $as_echo "#define socklen_t int" >>confdefs.h |
Guido van Rossum | 95713eb | 2000-05-18 20:53:31 +0000 | [diff] [blame] | 16190 | |
| 16191 | fi |
| 16192 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 16193 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16194 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5 |
| 16195 | $as_echo_n "checking for broken mbstowcs... " >&6; } |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 16196 | if ${ac_cv_broken_mbstowcs+:} false; then : |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16197 | $as_echo_n "(cached) " >&6 |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 16198 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16199 | if test "$cross_compiling" = yes; then : |
Antoine Pitrou | fff9530 | 2008-09-03 18:58:51 +0000 | [diff] [blame] | 16200 | ac_cv_broken_mbstowcs=no |
| 16201 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16202 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
Antoine Pitrou | fff9530 | 2008-09-03 18:58:51 +0000 | [diff] [blame] | 16203 | /* end confdefs.h. */ |
| 16204 | |
Stefan Krah | 19c2139 | 2012-11-22 23:47:32 +0100 | [diff] [blame] | 16205 | #include <stdio.h> |
Antoine Pitrou | fff9530 | 2008-09-03 18:58:51 +0000 | [diff] [blame] | 16206 | #include<stdlib.h> |
| 16207 | int main() { |
| 16208 | size_t len = -1; |
| 16209 | const char *str = "text"; |
| 16210 | len = mbstowcs(NULL, str, 0); |
| 16211 | return (len != 4); |
| 16212 | } |
| 16213 | |
| 16214 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16215 | if ac_fn_c_try_run "$LINENO"; then : |
Antoine Pitrou | fff9530 | 2008-09-03 18:58:51 +0000 | [diff] [blame] | 16216 | ac_cv_broken_mbstowcs=no |
| 16217 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16218 | ac_cv_broken_mbstowcs=yes |
Antoine Pitrou | fff9530 | 2008-09-03 18:58:51 +0000 | [diff] [blame] | 16219 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16220 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 16221 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
Antoine Pitrou | fff9530 | 2008-09-03 18:58:51 +0000 | [diff] [blame] | 16222 | fi |
| 16223 | |
Alexandre Vassalotti | b0a61d7 | 2009-07-17 23:19:37 +0000 | [diff] [blame] | 16224 | fi |
| 16225 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16226 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5 |
| 16227 | $as_echo "$ac_cv_broken_mbstowcs" >&6; } |
Antoine Pitrou | fff9530 | 2008-09-03 18:58:51 +0000 | [diff] [blame] | 16228 | if test "$ac_cv_broken_mbstowcs" = yes |
| 16229 | then |
| 16230 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16231 | $as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h |
Antoine Pitrou | fff9530 | 2008-09-03 18:58:51 +0000 | [diff] [blame] | 16232 | |
| 16233 | fi |
| 16234 | |
Antoine Pitrou | b52ec78 | 2009-01-25 16:34:23 +0000 | [diff] [blame] | 16235 | # Check for --with-computed-gotos |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16236 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5 |
| 16237 | $as_echo_n "checking for --with-computed-gotos... " >&6; } |
Antoine Pitrou | b52ec78 | 2009-01-25 16:34:23 +0000 | [diff] [blame] | 16238 | |
| 16239 | # Check whether --with-computed-gotos was given. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16240 | if test "${with_computed_gotos+set}" = set; then : |
Antoine Pitrou | b52ec78 | 2009-01-25 16:34:23 +0000 | [diff] [blame] | 16241 | withval=$with_computed_gotos; |
Antoine Pitrou | 042b128 | 2010-08-13 21:15:58 +0000 | [diff] [blame] | 16242 | if test "$withval" = yes |
Antoine Pitrou | b52ec78 | 2009-01-25 16:34:23 +0000 | [diff] [blame] | 16243 | then |
| 16244 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16245 | $as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h |
Antoine Pitrou | b52ec78 | 2009-01-25 16:34:23 +0000 | [diff] [blame] | 16246 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16247 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 16248 | $as_echo "yes" >&6; } |
Antoine Pitrou | b52ec78 | 2009-01-25 16:34:23 +0000 | [diff] [blame] | 16249 | fi |
Antoine Pitrou | 042b128 | 2010-08-13 21:15:58 +0000 | [diff] [blame] | 16250 | if test "$withval" = no |
| 16251 | then |
| 16252 | |
| 16253 | $as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h |
| 16254 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16255 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 16256 | $as_echo "no" >&6; } |
Antoine Pitrou | b52ec78 | 2009-01-25 16:34:23 +0000 | [diff] [blame] | 16257 | fi |
| 16258 | |
Antoine Pitrou | 042b128 | 2010-08-13 21:15:58 +0000 | [diff] [blame] | 16259 | else |
| 16260 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5 |
| 16261 | $as_echo "no value specified" >&6; } |
| 16262 | fi |
| 16263 | |
Antoine Pitrou | b52ec78 | 2009-01-25 16:34:23 +0000 | [diff] [blame] | 16264 | |
Matthias Klose | b17289e | 2012-03-15 19:51:34 +0100 | [diff] [blame] | 16265 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5 |
| 16266 | $as_echo_n "checking whether $CC supports computed gotos... " >&6; } |
| 16267 | if ${ac_cv_computed_gotos+:} false; then : |
| 16268 | $as_echo_n "(cached) " >&6 |
| 16269 | else |
| 16270 | if test "$cross_compiling" = yes; then : |
| 16271 | if test "${with_computed_gotos+set}" = set; then |
| 16272 | ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos" |
| 16273 | else |
| 16274 | ac_cv_computed_gotos=no |
| 16275 | fi |
| 16276 | else |
| 16277 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16278 | /* end confdefs.h. */ |
| 16279 | |
| 16280 | int main(int argc, char **argv) |
| 16281 | { |
| 16282 | static void *targets[1] = { &&LABEL1 }; |
| 16283 | goto LABEL2; |
| 16284 | LABEL1: |
| 16285 | return 0; |
| 16286 | LABEL2: |
| 16287 | goto *targets[0]; |
| 16288 | return 1; |
| 16289 | } |
| 16290 | |
| 16291 | _ACEOF |
| 16292 | if ac_fn_c_try_run "$LINENO"; then : |
| 16293 | ac_cv_computed_gotos=yes |
| 16294 | else |
| 16295 | ac_cv_computed_gotos=no |
| 16296 | fi |
| 16297 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 16298 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 16299 | fi |
| 16300 | |
| 16301 | fi |
| 16302 | |
| 16303 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5 |
| 16304 | $as_echo "$ac_cv_computed_gotos" >&6; } |
| 16305 | case "$ac_cv_computed_gotos" in yes*) |
| 16306 | |
| 16307 | $as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h |
| 16308 | |
| 16309 | esac |
| 16310 | |
Benjamin Peterson | d8d835b | 2010-10-15 23:14:46 +0000 | [diff] [blame] | 16311 | case $ac_sys_system in |
| 16312 | AIX*) |
| 16313 | |
| 16314 | $as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h |
| 16315 | ;; |
| 16316 | esac |
Antoine Pitrou | b52ec78 | 2009-01-25 16:34:23 +0000 | [diff] [blame] | 16317 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 16318 | |
Mark Dickinson | b2153e9 | 2010-05-05 22:31:36 +0000 | [diff] [blame] | 16319 | |
| 16320 | |
Martin v. Löwis | 06f15bb | 2001-12-02 13:02:32 +0000 | [diff] [blame] | 16321 | for h in `(cd $srcdir;echo Python/thread_*.h)` |
| 16322 | do |
| 16323 | THREADHEADERS="$THREADHEADERS \$(srcdir)/$h" |
| 16324 | done |
| 16325 | |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 16326 | |
Alex Dzyoba | 8a543c0 | 2017-03-24 11:23:43 +0300 | [diff] [blame] | 16327 | SRCDIRS="Parser Objects Python Modules Programs" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16328 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5 |
| 16329 | $as_echo_n "checking for build directories... " >&6; } |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 16330 | for dir in $SRCDIRS; do |
| 16331 | if test ! -d $dir; then |
| 16332 | mkdir $dir |
Guido van Rossum | 262cf20 | 2000-11-02 19:33:53 +0000 | [diff] [blame] | 16333 | fi |
Neil Schemenauer | d32c249 | 2001-01-24 17:25:28 +0000 | [diff] [blame] | 16334 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16335 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 |
| 16336 | $as_echo "done" >&6; } |
Fred Drake | 036144d | 2000-10-26 17:09:35 +0000 | [diff] [blame] | 16337 | |
Stefan Krah | 1919b7e | 2012-03-21 18:25:23 +0100 | [diff] [blame] | 16338 | # Availability of -O2: |
| 16339 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5 |
| 16340 | $as_echo_n "checking for -O2... " >&6; } |
| 16341 | saved_cflags="$CFLAGS" |
| 16342 | CFLAGS="-O2" |
| 16343 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16344 | /* end confdefs.h. */ |
| 16345 | |
| 16346 | int |
| 16347 | main () |
| 16348 | { |
| 16349 | |
| 16350 | |
| 16351 | ; |
| 16352 | return 0; |
| 16353 | } |
| 16354 | _ACEOF |
| 16355 | if ac_fn_c_try_compile "$LINENO"; then : |
| 16356 | have_O2=yes |
| 16357 | else |
| 16358 | have_O2=no |
| 16359 | fi |
| 16360 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 16361 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5 |
| 16362 | $as_echo "$have_O2" >&6; } |
| 16363 | CFLAGS="$saved_cflags" |
| 16364 | |
| 16365 | # _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect: |
| 16366 | # http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html |
| 16367 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5 |
| 16368 | $as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; } |
| 16369 | saved_cflags="$CFLAGS" |
| 16370 | CFLAGS="-O2 -D_FORTIFY_SOURCE=2" |
| 16371 | if test "$have_O2" = no; then |
| 16372 | CFLAGS="" |
| 16373 | fi |
| 16374 | if test "$cross_compiling" = yes; then : |
| 16375 | have_glibc_memmove_bug=undefined |
| 16376 | else |
| 16377 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16378 | /* end confdefs.h. */ |
| 16379 | |
| 16380 | #include <stdio.h> |
| 16381 | #include <stdlib.h> |
| 16382 | #include <string.h> |
| 16383 | void foo(void *p, void *q) { memmove(p, q, 19); } |
| 16384 | int main() { |
| 16385 | char a[32] = "123456789000000000"; |
| 16386 | foo(&a[9], a); |
| 16387 | if (strcmp(a, "123456789123456789000000000") != 0) |
| 16388 | return 1; |
| 16389 | foo(a, &a[9]); |
| 16390 | if (strcmp(a, "123456789000000000") != 0) |
| 16391 | return 1; |
| 16392 | return 0; |
| 16393 | } |
| 16394 | |
| 16395 | _ACEOF |
| 16396 | if ac_fn_c_try_run "$LINENO"; then : |
| 16397 | have_glibc_memmove_bug=no |
| 16398 | else |
| 16399 | have_glibc_memmove_bug=yes |
| 16400 | fi |
| 16401 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 16402 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 16403 | fi |
| 16404 | |
| 16405 | CFLAGS="$saved_cflags" |
| 16406 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5 |
| 16407 | $as_echo "$have_glibc_memmove_bug" >&6; } |
| 16408 | if test "$have_glibc_memmove_bug" = yes; then |
| 16409 | |
| 16410 | $as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h |
| 16411 | |
| 16412 | fi |
| 16413 | |
| 16414 | if test "$have_gcc_asm_for_x87" = yes; then |
| 16415 | # Some versions of gcc miscompile inline asm: |
| 16416 | # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491 |
| 16417 | # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html |
| 16418 | case $CC in |
| 16419 | *gcc*) |
| 16420 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5 |
| 16421 | $as_echo_n "checking for gcc ipa-pure-const bug... " >&6; } |
| 16422 | saved_cflags="$CFLAGS" |
| 16423 | CFLAGS="-O2" |
| 16424 | if test "$cross_compiling" = yes; then : |
| 16425 | have_ipa_pure_const_bug=undefined |
| 16426 | else |
| 16427 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16428 | /* end confdefs.h. */ |
| 16429 | |
| 16430 | __attribute__((noinline)) int |
| 16431 | foo(int *p) { |
| 16432 | int r; |
| 16433 | asm ( "movl \$6, (%1)\n\t" |
| 16434 | "xorl %0, %0\n\t" |
| 16435 | : "=r" (r) : "r" (p) : "memory" |
| 16436 | ); |
| 16437 | return r; |
| 16438 | } |
| 16439 | int main() { |
| 16440 | int p = 8; |
| 16441 | if ((foo(&p) ? : p) != 6) |
| 16442 | return 1; |
| 16443 | return 0; |
| 16444 | } |
| 16445 | |
| 16446 | _ACEOF |
| 16447 | if ac_fn_c_try_run "$LINENO"; then : |
| 16448 | have_ipa_pure_const_bug=no |
| 16449 | else |
| 16450 | have_ipa_pure_const_bug=yes |
| 16451 | fi |
| 16452 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 16453 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 16454 | fi |
| 16455 | |
| 16456 | CFLAGS="$saved_cflags" |
| 16457 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5 |
| 16458 | $as_echo "$have_ipa_pure_const_bug" >&6; } |
| 16459 | if test "$have_ipa_pure_const_bug" = yes; then |
| 16460 | |
| 16461 | $as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h |
| 16462 | |
| 16463 | fi |
| 16464 | ;; |
| 16465 | esac |
| 16466 | fi |
| 16467 | |
Victor Stinner | 4f5366e | 2015-01-09 02:13:19 +0100 | [diff] [blame] | 16468 | # Check for stdatomic.h |
| 16469 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5 |
| 16470 | $as_echo_n "checking for stdatomic.h... " >&6; } |
| 16471 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16472 | /* end confdefs.h. */ |
| 16473 | |
| 16474 | |
| 16475 | #include <stdatomic.h> |
Victor Stinner | 923e06f | 2015-01-14 16:01:46 +0100 | [diff] [blame] | 16476 | atomic_int value = ATOMIC_VAR_INIT(1); |
| 16477 | _Atomic void *py_atomic_address = (void*) &value; |
Victor Stinner | 4f5366e | 2015-01-09 02:13:19 +0100 | [diff] [blame] | 16478 | int main() { |
| 16479 | int loaded_value = atomic_load(&value); |
| 16480 | return 0; |
| 16481 | } |
| 16482 | |
| 16483 | |
| 16484 | _ACEOF |
| 16485 | if ac_fn_c_try_link "$LINENO"; then : |
| 16486 | have_stdatomic_h=yes |
| 16487 | else |
| 16488 | have_stdatomic_h=no |
| 16489 | fi |
| 16490 | rm -f core conftest.err conftest.$ac_objext \ |
| 16491 | conftest$ac_exeext conftest.$ac_ext |
| 16492 | |
| 16493 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5 |
| 16494 | $as_echo "$have_stdatomic_h" >&6; } |
| 16495 | |
| 16496 | if test "$have_stdatomic_h" = yes; then |
| 16497 | |
| 16498 | $as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h |
| 16499 | |
| 16500 | fi |
| 16501 | |
| 16502 | # Check for GCC >= 4.7 __atomic builtins |
| 16503 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5 |
| 16504 | $as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; } |
| 16505 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16506 | /* end confdefs.h. */ |
| 16507 | |
| 16508 | |
| 16509 | volatile int val = 1; |
| 16510 | int main() { |
| 16511 | __atomic_load_n(&val, __ATOMIC_SEQ_CST); |
| 16512 | return 0; |
| 16513 | } |
| 16514 | |
| 16515 | |
| 16516 | _ACEOF |
| 16517 | if ac_fn_c_try_link "$LINENO"; then : |
| 16518 | have_builtin_atomic=yes |
| 16519 | else |
| 16520 | have_builtin_atomic=no |
| 16521 | fi |
| 16522 | rm -f core conftest.err conftest.$ac_objext \ |
| 16523 | conftest$ac_exeext conftest.$ac_ext |
| 16524 | |
| 16525 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5 |
| 16526 | $as_echo "$have_builtin_atomic" >&6; } |
| 16527 | |
| 16528 | if test "$have_builtin_atomic" = yes; then |
| 16529 | |
| 16530 | $as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h |
| 16531 | |
| 16532 | fi |
| 16533 | |
Ned Deily | 322f5ba | 2013-11-21 23:01:59 -0800 | [diff] [blame] | 16534 | # ensurepip option |
| 16535 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5 |
| 16536 | $as_echo_n "checking for ensurepip... " >&6; } |
| 16537 | |
| 16538 | # Check whether --with-ensurepip was given. |
| 16539 | if test "${with_ensurepip+set}" = set; then : |
| 16540 | withval=$with_ensurepip; |
| 16541 | else |
| 16542 | with_ensurepip=upgrade |
| 16543 | fi |
| 16544 | |
| 16545 | case $with_ensurepip in #( |
| 16546 | yes|upgrade) : |
| 16547 | ENSUREPIP=upgrade ;; #( |
| 16548 | install) : |
| 16549 | ENSUREPIP=install ;; #( |
| 16550 | no) : |
| 16551 | ENSUREPIP=no ;; #( |
| 16552 | *) : |
| 16553 | as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;; |
| 16554 | esac |
| 16555 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5 |
| 16556 | $as_echo "$ENSUREPIP" >&6; } |
| 16557 | |
| 16558 | |
Victor Stinner | 35a97c0 | 2015-03-08 02:59:09 +0100 | [diff] [blame] | 16559 | # check if the dirent structure of a d_type field and DT_UNKNOWN is defined |
| 16560 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5 |
| 16561 | $as_echo_n "checking if the dirent structure of a d_type field... " >&6; } |
| 16562 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16563 | /* end confdefs.h. */ |
| 16564 | |
| 16565 | |
| 16566 | #include <dirent.h> |
| 16567 | |
| 16568 | int main() { |
| 16569 | struct dirent entry; |
| 16570 | return entry.d_type == DT_UNKNOWN; |
| 16571 | } |
| 16572 | |
| 16573 | |
| 16574 | _ACEOF |
| 16575 | if ac_fn_c_try_link "$LINENO"; then : |
| 16576 | have_dirent_d_type=yes |
| 16577 | else |
| 16578 | have_dirent_d_type=no |
| 16579 | fi |
| 16580 | rm -f core conftest.err conftest.$ac_objext \ |
| 16581 | conftest$ac_exeext conftest.$ac_ext |
| 16582 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5 |
| 16583 | $as_echo "$have_dirent_d_type" >&6; } |
| 16584 | |
| 16585 | if test "$have_dirent_d_type" = yes; then |
| 16586 | |
| 16587 | $as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h |
| 16588 | |
| 16589 | fi |
| 16590 | |
Victor Stinner | 9eb57c5 | 2015-03-19 22:21:49 +0100 | [diff] [blame] | 16591 | # check if the Linux getrandom() syscall is available |
| 16592 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5 |
| 16593 | $as_echo_n "checking for the Linux getrandom() syscall... " >&6; } |
| 16594 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16595 | /* end confdefs.h. */ |
| 16596 | |
| 16597 | |
Victor Stinner | 1b80b24 | 2016-04-12 22:34:58 +0200 | [diff] [blame] | 16598 | #include <unistd.h> |
Victor Stinner | 9eb57c5 | 2015-03-19 22:21:49 +0100 | [diff] [blame] | 16599 | #include <sys/syscall.h> |
Victor Stinner | dddf484 | 2016-06-07 11:21:42 +0200 | [diff] [blame] | 16600 | #include <linux/random.h> |
Victor Stinner | 9eb57c5 | 2015-03-19 22:21:49 +0100 | [diff] [blame] | 16601 | |
| 16602 | int main() { |
Victor Stinner | 9eb57c5 | 2015-03-19 22:21:49 +0100 | [diff] [blame] | 16603 | char buffer[1]; |
Victor Stinner | 3abf44e | 2015-09-18 15:38:37 +0200 | [diff] [blame] | 16604 | const size_t buflen = sizeof(buffer); |
Victor Stinner | dddf484 | 2016-06-07 11:21:42 +0200 | [diff] [blame] | 16605 | const int flags = GRND_NONBLOCK; |
| 16606 | /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */ |
Victor Stinner | 3abf44e | 2015-09-18 15:38:37 +0200 | [diff] [blame] | 16607 | (void)syscall(SYS_getrandom, buffer, buflen, flags); |
Victor Stinner | 9eb57c5 | 2015-03-19 22:21:49 +0100 | [diff] [blame] | 16608 | return 0; |
| 16609 | } |
| 16610 | |
| 16611 | |
| 16612 | _ACEOF |
| 16613 | if ac_fn_c_try_link "$LINENO"; then : |
| 16614 | have_getrandom_syscall=yes |
| 16615 | else |
| 16616 | have_getrandom_syscall=no |
| 16617 | fi |
| 16618 | rm -f core conftest.err conftest.$ac_objext \ |
| 16619 | conftest$ac_exeext conftest.$ac_ext |
| 16620 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5 |
| 16621 | $as_echo "$have_getrandom_syscall" >&6; } |
| 16622 | |
| 16623 | if test "$have_getrandom_syscall" = yes; then |
| 16624 | |
| 16625 | $as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h |
| 16626 | |
| 16627 | fi |
| 16628 | |
Victor Stinner | 3abf44e | 2015-09-18 15:38:37 +0200 | [diff] [blame] | 16629 | # check if the getrandom() function is available |
| 16630 | # the test was written for the Solaris function of <sys/random.h> |
| 16631 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5 |
| 16632 | $as_echo_n "checking for the getrandom() function... " >&6; } |
| 16633 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16634 | /* end confdefs.h. */ |
| 16635 | |
| 16636 | |
| 16637 | #include <sys/random.h> |
| 16638 | |
| 16639 | int main() { |
| 16640 | char buffer[1]; |
| 16641 | const size_t buflen = sizeof(buffer); |
| 16642 | const int flags = 0; |
| 16643 | /* ignore the result, Python checks for ENOSYS at runtime */ |
| 16644 | (void)getrandom(buffer, buflen, flags); |
| 16645 | return 0; |
| 16646 | } |
| 16647 | |
| 16648 | |
| 16649 | _ACEOF |
| 16650 | if ac_fn_c_try_link "$LINENO"; then : |
| 16651 | have_getrandom=yes |
| 16652 | else |
| 16653 | have_getrandom=no |
| 16654 | fi |
| 16655 | rm -f core conftest.err conftest.$ac_objext \ |
| 16656 | conftest$ac_exeext conftest.$ac_ext |
| 16657 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5 |
| 16658 | $as_echo "$have_getrandom" >&6; } |
| 16659 | |
| 16660 | if test "$have_getrandom" = yes; then |
| 16661 | |
| 16662 | $as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h |
| 16663 | |
| 16664 | fi |
| 16665 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 16666 | # generate output files |
doko@python.org | 8742119 | 2013-01-26 11:39:31 +0100 | [diff] [blame] | 16667 | ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh" |
Martin v. Löwis | 88afe66 | 2002-10-26 13:47:44 +0000 | [diff] [blame] | 16668 | |
Antoine Pitrou | 8e6b407 | 2010-09-10 19:44:44 +0000 | [diff] [blame] | 16669 | ac_config_files="$ac_config_files Modules/ld_so_aix" |
| 16670 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16671 | cat >confcache <<\_ACEOF |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 16672 | # This file is a shell script that caches the results of configure |
| 16673 | # 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] | 16674 | # scripts and configure runs, see configure's option --config-cache. |
| 16675 | # It is not useful on other systems. If it contains results you don't |
| 16676 | # want to keep, you may remove or edit it. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 16677 | # |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16678 | # config.status only pays attention to the cache file if you give it |
| 16679 | # the --recheck option to rerun configure. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 16680 | # |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 16681 | # `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] | 16682 | # loading this file, other *unset* `ac_cv_foo' will be assigned the |
| 16683 | # following values. |
| 16684 | |
| 16685 | _ACEOF |
| 16686 | |
Guido van Rossum | f78abae | 1997-01-21 22:02:36 +0000 | [diff] [blame] | 16687 | # The following way of writing the cache mishandles newlines in values, |
| 16688 | # but we know of no workaround that is simple, portable, and efficient. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16689 | # So, we kill variables containing newlines. |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 16690 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 16691 | # 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] | 16692 | ( |
| 16693 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do |
| 16694 | eval ac_val=\$$ac_var |
| 16695 | case $ac_val in #( |
| 16696 | *${as_nl}*) |
| 16697 | case $ac_var in #( |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16698 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 |
| 16699 | $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] | 16700 | esac |
| 16701 | case $ac_var in #( |
| 16702 | _ | IFS | as_nl) ;; #( |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16703 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( |
| 16704 | *) { eval $ac_var=; unset $ac_var;} ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16705 | esac ;; |
| 16706 | esac |
| 16707 | done |
| 16708 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16709 | (set) 2>&1 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16710 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
| 16711 | *${as_nl}ac_space=\ *) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16712 | # `set' does not quote correctly, so add quotes: double-quote |
| 16713 | # substitution turns \\\\ into \\, and sed turns \\ into \. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16714 | sed -n \ |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 16715 | "s/'/'\\\\''/g; |
| 16716 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16717 | ;; #( |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16718 | *) |
| 16719 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16720 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16721 | ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16722 | esac | |
| 16723 | sort |
| 16724 | ) | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16725 | sed ' |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16726 | /^ac_cv_env_/b end |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16727 | t clear |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16728 | :clear |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16729 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
| 16730 | t end |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16731 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
| 16732 | :end' >>confcache |
| 16733 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else |
| 16734 | if test -w "$cache_file"; then |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 16735 | if test "x$cache_file" != "x/dev/null"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16736 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
| 16737 | $as_echo "$as_me: updating cache $cache_file" >&6;} |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 16738 | if test ! -f "$cache_file" || test -h "$cache_file"; then |
| 16739 | cat confcache >"$cache_file" |
| 16740 | else |
| 16741 | case $cache_file in #( |
| 16742 | */* | ?:*) |
| 16743 | mv -f confcache "$cache_file"$$ && |
| 16744 | mv -f "$cache_file"$$ "$cache_file" ;; #( |
| 16745 | *) |
| 16746 | mv -f confcache "$cache_file" ;; |
| 16747 | esac |
| 16748 | fi |
| 16749 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 16750 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16751 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
| 16752 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 16753 | fi |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 16754 | fi |
Guido van Rossum | 8ddd0ad | 1995-06-14 23:10:28 +0000 | [diff] [blame] | 16755 | rm -f confcache |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 16756 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 16757 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 16758 | # Let make expand exec_prefix. |
| 16759 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
Guido van Rossum | 0a516c9 | 1994-09-12 10:58:40 +0000 | [diff] [blame] | 16760 | |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 16761 | DEFS=-DHAVE_CONFIG_H |
| 16762 | |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 16763 | ac_libobjs= |
| 16764 | ac_ltlibobjs= |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 16765 | U= |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 16766 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue |
| 16767 | # 1. Remove the extension, and $U if already installed. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16768 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16769 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16770 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR |
| 16771 | # will be set to the directory where LIBOBJS objects are built. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16772 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" |
| 16773 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 16774 | done |
| 16775 | LIBOBJS=$ac_libobjs |
| 16776 | |
| 16777 | LTLIBOBJS=$ac_ltlibobjs |
| 16778 | |
| 16779 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16780 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16781 | |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 16782 | : "${CONFIG_STATUS=./config.status}" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16783 | ac_write_fail=0 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16784 | ac_clean_files_save=$ac_clean_files |
| 16785 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16786 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
| 16787 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} |
| 16788 | as_write_fail=0 |
| 16789 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16790 | #! $SHELL |
| 16791 | # Generated by $as_me. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 16792 | # Run this file to recreate the current configuration. |
Guido van Rossum | 76be6ed | 1995-01-02 18:33:54 +0000 | [diff] [blame] | 16793 | # Compiler output produced by configure, useful for debugging |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16794 | # configure, is in config.log if it exists. |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 16795 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16796 | debug=false |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 16797 | ac_cs_recheck=false |
| 16798 | ac_cs_silent=false |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 16799 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16800 | SHELL=\${CONFIG_SHELL-$SHELL} |
| 16801 | export SHELL |
| 16802 | _ASEOF |
| 16803 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 |
| 16804 | ## -------------------- ## |
| 16805 | ## M4sh Initialization. ## |
| 16806 | ## -------------------- ## |
Jack Jansen | dd19cf8 | 2001-12-06 22:36:17 +0000 | [diff] [blame] | 16807 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16808 | # Be more Bourne compatible |
| 16809 | DUALCASE=1; export DUALCASE # for MKS sh |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16810 | 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] | 16811 | emulate sh |
| 16812 | NULLCMD=: |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16813 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 16814 | # is contrary to our usage. Disable this feature. |
| 16815 | alias -g '${1+"$@"}'='"$@"' |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16816 | setopt NO_GLOB_SUBST |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 16817 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16818 | case `(set -o) 2>/dev/null` in #( |
| 16819 | *posix*) : |
| 16820 | set -o posix ;; #( |
| 16821 | *) : |
| 16822 | ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16823 | esac |
Michael W. Hudson | 5424113 | 2001-12-07 15:38:26 +0000 | [diff] [blame] | 16824 | fi |
Thomas Wouters | 89f507f | 2006-12-13 04:49:30 +0000 | [diff] [blame] | 16825 | |
| 16826 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16827 | as_nl=' |
| 16828 | ' |
| 16829 | export as_nl |
| 16830 | # Printing a long string crashes Solaris 7 /usr/bin/printf. |
| 16831 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' |
| 16832 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo |
| 16833 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo |
| 16834 | # Prefer a ksh shell builtin over an external printf program on Solaris, |
| 16835 | # but without wasting forks for bash or zsh. |
| 16836 | if test -z "$BASH_VERSION$ZSH_VERSION" \ |
| 16837 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then |
| 16838 | as_echo='print -r --' |
| 16839 | as_echo_n='print -rn --' |
| 16840 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then |
| 16841 | as_echo='printf %s\n' |
| 16842 | as_echo_n='printf %s' |
| 16843 | else |
| 16844 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then |
| 16845 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' |
| 16846 | as_echo_n='/usr/ucb/echo -n' |
| 16847 | else |
| 16848 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' |
| 16849 | as_echo_n_body='eval |
| 16850 | arg=$1; |
| 16851 | case $arg in #( |
| 16852 | *"$as_nl"*) |
| 16853 | expr "X$arg" : "X\\(.*\\)$as_nl"; |
| 16854 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; |
| 16855 | esac; |
| 16856 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" |
| 16857 | ' |
| 16858 | export as_echo_n_body |
| 16859 | as_echo_n='sh -c $as_echo_n_body as_echo' |
| 16860 | fi |
| 16861 | export as_echo_body |
| 16862 | as_echo='sh -c $as_echo_body as_echo' |
| 16863 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16864 | |
| 16865 | # The user is always right. |
| 16866 | if test "${PATH_SEPARATOR+set}" != set; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16867 | PATH_SEPARATOR=: |
| 16868 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { |
| 16869 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || |
| 16870 | PATH_SEPARATOR=';' |
| 16871 | } |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16872 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16873 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16874 | |
| 16875 | # IFS |
| 16876 | # We need space, tab and new line, in precisely that order. Quoting is |
| 16877 | # there to prevent editors from complaining about space-tab. |
| 16878 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word |
| 16879 | # splitting by setting IFS to empty value.) |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16880 | IFS=" "" $as_nl" |
| 16881 | |
| 16882 | # 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] | 16883 | as_myself= |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16884 | case $0 in #(( |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16885 | *[\\/]* ) as_myself=$0 ;; |
| 16886 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16887 | for as_dir in $PATH |
| 16888 | do |
| 16889 | IFS=$as_save_IFS |
| 16890 | test -z "$as_dir" && as_dir=. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16891 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break |
| 16892 | done |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16893 | IFS=$as_save_IFS |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 16894 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16895 | ;; |
| 16896 | esac |
| 16897 | # We did not find ourselves, most probably we were run as `sh COMMAND' |
| 16898 | # in which case we are not to be found in the path. |
| 16899 | if test "x$as_myself" = x; then |
| 16900 | as_myself=$0 |
| 16901 | fi |
| 16902 | if test ! -f "$as_myself"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16903 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 |
| 16904 | exit 1 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16905 | fi |
| 16906 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16907 | # Unset variables that we do not need and which cause bugs (e.g. in |
| 16908 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" |
| 16909 | # suppresses any "Segmentation fault" message there. '((' could |
| 16910 | # trigger a bug in pdksh 5.2.14. |
| 16911 | for as_var in BASH_ENV ENV MAIL MAILPATH |
| 16912 | do eval test x\${$as_var+set} = xset \ |
| 16913 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16914 | done |
| 16915 | PS1='$ ' |
| 16916 | PS2='> ' |
| 16917 | PS4='+ ' |
| 16918 | |
| 16919 | # NLS nuisances. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16920 | LC_ALL=C |
| 16921 | export LC_ALL |
| 16922 | LANGUAGE=C |
| 16923 | export LANGUAGE |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 16924 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16925 | # CDPATH. |
| 16926 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH |
| 16927 | |
| 16928 | |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 16929 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
| 16930 | # ---------------------------------------- |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16931 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
| 16932 | # 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] | 16933 | # script with STATUS, using 1 if that was 0. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16934 | as_fn_error () |
| 16935 | { |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 16936 | as_status=$1; test $as_status -eq 0 && as_status=1 |
| 16937 | if test "$4"; then |
| 16938 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 16939 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16940 | fi |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 16941 | $as_echo "$as_me: error: $2" >&2 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 16942 | as_fn_exit $as_status |
| 16943 | } # as_fn_error |
| 16944 | |
| 16945 | |
| 16946 | # as_fn_set_status STATUS |
| 16947 | # ----------------------- |
| 16948 | # Set $? to STATUS, without forking. |
| 16949 | as_fn_set_status () |
| 16950 | { |
| 16951 | return $1 |
| 16952 | } # as_fn_set_status |
| 16953 | |
| 16954 | # as_fn_exit STATUS |
| 16955 | # ----------------- |
| 16956 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. |
| 16957 | as_fn_exit () |
| 16958 | { |
| 16959 | set +e |
| 16960 | as_fn_set_status $1 |
| 16961 | exit $1 |
| 16962 | } # as_fn_exit |
| 16963 | |
| 16964 | # as_fn_unset VAR |
| 16965 | # --------------- |
| 16966 | # Portably unset VAR. |
| 16967 | as_fn_unset () |
| 16968 | { |
| 16969 | { eval $1=; unset $1;} |
| 16970 | } |
| 16971 | as_unset=as_fn_unset |
| 16972 | # as_fn_append VAR VALUE |
| 16973 | # ---------------------- |
| 16974 | # Append the text in VALUE to the end of the definition contained in VAR. Take |
| 16975 | # advantage of any shell optimizations that allow amortized linear growth over |
| 16976 | # repeated appends, instead of the typical quadratic growth present in naive |
| 16977 | # implementations. |
| 16978 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : |
| 16979 | eval 'as_fn_append () |
| 16980 | { |
| 16981 | eval $1+=\$2 |
| 16982 | }' |
| 16983 | else |
| 16984 | as_fn_append () |
| 16985 | { |
| 16986 | eval $1=\$$1\$2 |
| 16987 | } |
| 16988 | fi # as_fn_append |
| 16989 | |
| 16990 | # as_fn_arith ARG... |
| 16991 | # ------------------ |
| 16992 | # Perform arithmetic evaluation on the ARGs, and store the result in the |
| 16993 | # global $as_val. Take advantage of shells that can avoid forks. The arguments |
| 16994 | # must be portable across $(()) and expr. |
| 16995 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : |
| 16996 | eval 'as_fn_arith () |
| 16997 | { |
| 16998 | as_val=$(( $* )) |
| 16999 | }' |
| 17000 | else |
| 17001 | as_fn_arith () |
| 17002 | { |
| 17003 | as_val=`expr "$@" || test $? -eq 1` |
| 17004 | } |
| 17005 | fi # as_fn_arith |
| 17006 | |
| 17007 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17008 | if expr a : '\(a\)' >/dev/null 2>&1 && |
| 17009 | test "X`expr 00001 : '.*\(...\)'`" = X001; then |
| 17010 | as_expr=expr |
| 17011 | else |
| 17012 | as_expr=false |
| 17013 | fi |
| 17014 | |
| 17015 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
| 17016 | as_basename=basename |
| 17017 | else |
| 17018 | as_basename=false |
| 17019 | fi |
| 17020 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17021 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
| 17022 | as_dirname=dirname |
| 17023 | else |
| 17024 | as_dirname=false |
| 17025 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17026 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17027 | as_me=`$as_basename -- "$0" || |
| 17028 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
| 17029 | X"$0" : 'X\(//\)$' \| \ |
| 17030 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17031 | $as_echo X/"$0" | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17032 | sed '/^.*\/\([^/][^/]*\)\/*$/{ |
| 17033 | s//\1/ |
| 17034 | q |
| 17035 | } |
| 17036 | /^X\/\(\/\/\)$/{ |
| 17037 | s//\1/ |
| 17038 | q |
| 17039 | } |
| 17040 | /^X\/\(\/\).*/{ |
| 17041 | s//\1/ |
| 17042 | q |
| 17043 | } |
| 17044 | s/.*/./; q'` |
| 17045 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17046 | # Avoid depending upon Character Ranges. |
| 17047 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' |
| 17048 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' |
| 17049 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS |
| 17050 | as_cr_digits='0123456789' |
| 17051 | as_cr_alnum=$as_cr_Letters$as_cr_digits |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17052 | |
| 17053 | ECHO_C= ECHO_N= ECHO_T= |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17054 | case `echo -n x` in #((((( |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17055 | -n*) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17056 | case `echo 'xy\c'` in |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17057 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17058 | xy) ECHO_C='\c';; |
| 17059 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null |
| 17060 | ECHO_T=' ';; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17061 | esac;; |
| 17062 | *) |
| 17063 | ECHO_N='-n';; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17064 | esac |
Ronald Oussoren | 74f29b4 | 2009-09-20 20:09:26 +0000 | [diff] [blame] | 17065 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17066 | rm -f conf$$ conf$$.exe conf$$.file |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17067 | if test -d conf$$.dir; then |
| 17068 | rm -f conf$$.dir/conf$$.file |
| 17069 | else |
| 17070 | rm -f conf$$.dir |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17071 | mkdir conf$$.dir 2>/dev/null |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17072 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17073 | if (echo >conf$$.file) 2>/dev/null; then |
| 17074 | if ln -s conf$$.file conf$$ 2>/dev/null; then |
| 17075 | as_ln_s='ln -s' |
| 17076 | # ... but there are two gotchas: |
| 17077 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. |
| 17078 | # 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] | 17079 | # In both cases, we have to default to `cp -pR'. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17080 | 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] | 17081 | as_ln_s='cp -pR' |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17082 | elif ln conf$$.file conf$$ 2>/dev/null; then |
| 17083 | as_ln_s=ln |
| 17084 | else |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 17085 | as_ln_s='cp -pR' |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17086 | fi |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17087 | else |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 17088 | as_ln_s='cp -pR' |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17089 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17090 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
| 17091 | rmdir conf$$.dir 2>/dev/null |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17092 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17093 | |
| 17094 | # as_fn_mkdir_p |
| 17095 | # ------------- |
| 17096 | # Create "$as_dir" as a directory, including parents if necessary. |
| 17097 | as_fn_mkdir_p () |
| 17098 | { |
| 17099 | |
| 17100 | case $as_dir in #( |
| 17101 | -*) as_dir=./$as_dir;; |
| 17102 | esac |
| 17103 | test -d "$as_dir" || eval $as_mkdir_p || { |
| 17104 | as_dirs= |
| 17105 | while :; do |
| 17106 | case $as_dir in #( |
| 17107 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( |
| 17108 | *) as_qdir=$as_dir;; |
| 17109 | esac |
| 17110 | as_dirs="'$as_qdir' $as_dirs" |
| 17111 | as_dir=`$as_dirname -- "$as_dir" || |
| 17112 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
| 17113 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
| 17114 | X"$as_dir" : 'X\(//\)$' \| \ |
| 17115 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || |
| 17116 | $as_echo X"$as_dir" | |
| 17117 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
| 17118 | s//\1/ |
| 17119 | q |
| 17120 | } |
| 17121 | /^X\(\/\/\)[^/].*/{ |
| 17122 | s//\1/ |
| 17123 | q |
| 17124 | } |
| 17125 | /^X\(\/\/\)$/{ |
| 17126 | s//\1/ |
| 17127 | q |
| 17128 | } |
| 17129 | /^X\(\/\).*/{ |
| 17130 | s//\1/ |
| 17131 | q |
| 17132 | } |
| 17133 | s/.*/./; q'` |
| 17134 | test -d "$as_dir" && break |
| 17135 | done |
| 17136 | test -z "$as_dirs" || eval "mkdir $as_dirs" |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17137 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17138 | |
| 17139 | |
| 17140 | } # as_fn_mkdir_p |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17141 | if mkdir -p . 2>/dev/null; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17142 | as_mkdir_p='mkdir -p "$as_dir"' |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17143 | else |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 17144 | test -d ./-p && rmdir ./-p |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17145 | as_mkdir_p=false |
| 17146 | fi |
| 17147 | |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 17148 | |
| 17149 | # as_fn_executable_p FILE |
| 17150 | # ----------------------- |
| 17151 | # Test if FILE is an executable regular file. |
| 17152 | as_fn_executable_p () |
| 17153 | { |
| 17154 | test -f "$1" && test -x "$1" |
| 17155 | } # as_fn_executable_p |
| 17156 | as_test_x='test -x' |
| 17157 | as_executable_p=as_fn_executable_p |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17158 | |
| 17159 | # Sed expression to map a string onto a valid CPP name. |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 17160 | 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] | 17161 | |
| 17162 | # Sed expression to map a string onto a valid variable name. |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 17163 | 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] | 17164 | |
| 17165 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17166 | exec 6>&1 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17167 | ## ----------------------------------- ## |
| 17168 | ## Main body of $CONFIG_STATUS script. ## |
| 17169 | ## ----------------------------------- ## |
| 17170 | _ASEOF |
| 17171 | 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] | 17172 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17173 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 17174 | # 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] | 17175 | # report actual input values of CONFIG_FILES etc. instead of their |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17176 | # values after options handling. |
| 17177 | ac_log=" |
Ned Deily | 4829bc6 | 2016-09-12 17:29:04 -0400 | [diff] [blame] | 17178 | This file was extended by python $as_me 3.7, which was |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 17179 | generated by GNU Autoconf 2.69. Invocation command line was |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17180 | |
| 17181 | CONFIG_FILES = $CONFIG_FILES |
| 17182 | CONFIG_HEADERS = $CONFIG_HEADERS |
| 17183 | CONFIG_LINKS = $CONFIG_LINKS |
| 17184 | CONFIG_COMMANDS = $CONFIG_COMMANDS |
| 17185 | $ $0 $@ |
| 17186 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17187 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
| 17188 | " |
| 17189 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17190 | _ACEOF |
| 17191 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17192 | case $ac_config_files in *" |
| 17193 | "*) set x $ac_config_files; shift; ac_config_files=$*;; |
| 17194 | esac |
| 17195 | |
| 17196 | case $ac_config_headers in *" |
| 17197 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; |
| 17198 | esac |
| 17199 | |
| 17200 | |
| 17201 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17202 | # Files that config.status was made for. |
Charles-François Natali | 6613c18 | 2011-11-27 12:41:06 +0100 | [diff] [blame] | 17203 | config_files="$ac_config_files" |
| 17204 | config_headers="$ac_config_headers" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17205 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17206 | _ACEOF |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17207 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17208 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17209 | ac_cs_usage="\ |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17210 | \`$as_me' instantiates files and other configuration actions |
| 17211 | from templates according to the current configuration. Unless the files |
| 17212 | 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] | 17213 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17214 | Usage: $0 [OPTION]... [TAG]... |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17215 | |
| 17216 | -h, --help print this help, then exit |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17217 | -V, --version print version number and configuration settings, then exit |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17218 | --config print configuration, then exit |
| 17219 | -q, --quiet, --silent |
| 17220 | do not print progress messages |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17221 | -d, --debug don't remove temporary files |
| 17222 | --recheck update $as_me by reconfiguring in the same conditions |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17223 | --file=FILE[:TEMPLATE] |
| 17224 | instantiate the configuration file FILE |
| 17225 | --header=FILE[:TEMPLATE] |
| 17226 | instantiate the configuration header FILE |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17227 | |
| 17228 | Configuration files: |
| 17229 | $config_files |
| 17230 | |
| 17231 | Configuration headers: |
| 17232 | $config_headers |
| 17233 | |
Benjamin Peterson | c2fcbf4 | 2016-08-03 22:01:32 -0700 | [diff] [blame] | 17234 | Report bugs to <https://bugs.python.org/>." |
Skip Montanaro | eb33e5a | 2007-08-17 12:57:41 +0000 | [diff] [blame] | 17235 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17236 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17237 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 17238 | 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] | 17239 | ac_cs_version="\\ |
Ned Deily | 4829bc6 | 2016-09-12 17:29:04 -0400 | [diff] [blame] | 17240 | python config.status 3.7 |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 17241 | configured by $0, generated by GNU Autoconf 2.69, |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17242 | with options \\"\$ac_cs_config\\" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17243 | |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 17244 | Copyright (C) 2012 Free Software Foundation, Inc. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17245 | This config.status script is free software; the Free Software Foundation |
| 17246 | gives unlimited permission to copy, distribute and modify it." |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17247 | |
| 17248 | ac_pwd='$ac_pwd' |
| 17249 | srcdir='$srcdir' |
| 17250 | INSTALL='$INSTALL' |
Matthias Klose | 93a0ef1 | 2012-03-15 18:08:34 +0100 | [diff] [blame] | 17251 | MKDIR_P='$MKDIR_P' |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17252 | test -n "\$AWK" || AWK=awk |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17253 | _ACEOF |
| 17254 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17255 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 17256 | # 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] | 17257 | ac_need_defaults=: |
| 17258 | while test $# != 0 |
| 17259 | do |
| 17260 | case $1 in |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17261 | --*=?*) |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17262 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
| 17263 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17264 | ac_shift=: |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17265 | ;; |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17266 | --*=) |
| 17267 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
| 17268 | ac_optarg= |
| 17269 | ac_shift=: |
| 17270 | ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17271 | *) |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17272 | ac_option=$1 |
| 17273 | ac_optarg=$2 |
| 17274 | ac_shift=shift |
| 17275 | ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17276 | esac |
| 17277 | |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17278 | case $ac_option in |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17279 | # Handling of the options. |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17280 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
| 17281 | ac_cs_recheck=: ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17282 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17283 | $as_echo "$ac_cs_version"; exit ;; |
| 17284 | --config | --confi | --conf | --con | --co | --c ) |
| 17285 | $as_echo "$ac_cs_config"; exit ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17286 | --debug | --debu | --deb | --de | --d | -d ) |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17287 | debug=: ;; |
| 17288 | --file | --fil | --fi | --f ) |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17289 | $ac_shift |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17290 | case $ac_optarg in |
| 17291 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17292 | '') as_fn_error $? "missing file argument" ;; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17293 | esac |
| 17294 | as_fn_append CONFIG_FILES " '$ac_optarg'" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17295 | ac_need_defaults=false;; |
| 17296 | --header | --heade | --head | --hea ) |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17297 | $ac_shift |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17298 | case $ac_optarg in |
| 17299 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; |
| 17300 | esac |
| 17301 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17302 | ac_need_defaults=false;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17303 | --he | --h) |
| 17304 | # Conflict between --help and --header |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17305 | as_fn_error $? "ambiguous option: \`$1' |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17306 | Try \`$0 --help' for more information.";; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17307 | --help | --hel | -h ) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17308 | $as_echo "$ac_cs_usage"; exit ;; |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17309 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| 17310 | | -silent | --silent | --silen | --sile | --sil | --si | --s) |
| 17311 | ac_cs_silent=: ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17312 | |
| 17313 | # This is an error. |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17314 | -*) as_fn_error $? "unrecognized option: \`$1' |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17315 | Try \`$0 --help' for more information." ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17316 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17317 | *) as_fn_append ac_config_targets " $1" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17318 | ac_need_defaults=false ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17319 | |
| 17320 | esac |
| 17321 | shift |
| 17322 | done |
| 17323 | |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17324 | ac_configure_extra_args= |
| 17325 | |
| 17326 | if $ac_cs_silent; then |
| 17327 | exec 6>/dev/null |
| 17328 | ac_configure_extra_args="$ac_configure_extra_args --silent" |
| 17329 | fi |
| 17330 | |
| 17331 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17332 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17333 | if \$ac_cs_recheck; then |
Ross Lagerwall | 1b863eb | 2012-10-29 17:31:54 +0000 | [diff] [blame] | 17334 | 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] | 17335 | shift |
| 17336 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 |
| 17337 | CONFIG_SHELL='$SHELL' |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17338 | export CONFIG_SHELL |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17339 | exec "\$@" |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17340 | fi |
| 17341 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17342 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17343 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17344 | exec 5>>config.log |
| 17345 | { |
| 17346 | echo |
| 17347 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX |
| 17348 | ## Running $as_me. ## |
| 17349 | _ASBOX |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17350 | $as_echo "$ac_log" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17351 | } >&5 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17352 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17353 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17354 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17355 | _ACEOF |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17356 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17357 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17358 | |
| 17359 | # Handling of arguments. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17360 | for ac_config_target in $ac_config_targets |
| 17361 | do |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17362 | case $ac_config_target in |
| 17363 | "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;; |
| 17364 | "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;; |
| 17365 | "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;; |
Christian Heimes | 81ee3ef | 2008-05-04 22:42:01 +0000 | [diff] [blame] | 17366 | "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;; |
| 17367 | "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] | 17368 | "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;; |
| 17369 | "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;; |
Antoine Pitrou | 2032722 | 2009-05-24 20:39:11 +0000 | [diff] [blame] | 17370 | "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;; |
doko@python.org | 8742119 | 2013-01-26 11:39:31 +0100 | [diff] [blame] | 17371 | "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;; |
Antoine Pitrou | 8e6b407 | 2010-09-10 19:44:44 +0000 | [diff] [blame] | 17372 | "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17373 | |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17374 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17375 | esac |
| 17376 | done |
| 17377 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17378 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17379 | # If the user did not use the arguments to specify the items to instantiate, |
| 17380 | # then the envvar interface is used. Set only those that are not. |
| 17381 | # We use the long form for the default assignment because of an extremely |
| 17382 | # bizarre bug on SunOS 4.1.3. |
| 17383 | if $ac_need_defaults; then |
| 17384 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files |
| 17385 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers |
| 17386 | fi |
| 17387 | |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17388 | # Have a temporary directory for convenience. Make it in the build tree |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17389 | # 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] | 17390 | # creating and moving files from /tmp can sometimes cause problems. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17391 | # Hook for its removal unless debugging. |
| 17392 | # Note that there is a small window in which the directory will not be cleaned: |
| 17393 | # 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] | 17394 | $debug || |
| 17395 | { |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17396 | tmp= ac_tmp= |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17397 | trap 'exit_status=$? |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17398 | : "${ac_tmp:=$tmp}" |
| 17399 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17400 | ' 0 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17401 | trap 'as_fn_exit 1' 1 2 13 15 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17402 | } |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17403 | # Create a (secure) tmp directory for tmp files. |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17404 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17405 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17406 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17407 | test -d "$tmp" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17408 | } || |
| 17409 | { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17410 | tmp=./conf$$-$RANDOM |
| 17411 | (umask 077 && mkdir "$tmp") |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17412 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17413 | ac_tmp=$tmp |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17414 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17415 | # Set up the scripts for CONFIG_FILES section. |
| 17416 | # No need to generate them if there are no CONFIG_FILES. |
| 17417 | # This happens for instance with `./config.status config.h'. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17418 | if test -n "$CONFIG_FILES"; then |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17419 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17420 | |
| 17421 | ac_cr=`echo X | tr X '\015'` |
| 17422 | # On cygwin, bash can eat \r inside `` if the user requested igncr. |
| 17423 | # But we know of no other shell where ac_cr would be empty at this |
| 17424 | # point, so we can use a bashism as a fallback. |
| 17425 | if test "x$ac_cr" = x; then |
| 17426 | eval ac_cr=\$\'\\r\' |
| 17427 | fi |
| 17428 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` |
| 17429 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17430 | ac_cs_awk_cr='\\r' |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17431 | else |
| 17432 | ac_cs_awk_cr=$ac_cr |
| 17433 | fi |
| 17434 | |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17435 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17436 | _ACEOF |
| 17437 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17438 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17439 | { |
| 17440 | echo "cat >conf$$subs.awk <<_ACEOF" && |
| 17441 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && |
| 17442 | echo "_ACEOF" |
| 17443 | } >conf$$subs.sh || |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17444 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
| 17445 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17446 | ac_delim='%!_!# ' |
| 17447 | for ac_last_try in false false false false false :; do |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17448 | . ./conf$$subs.sh || |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17449 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17450 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17451 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` |
| 17452 | if test $ac_delim_n = $ac_delim_num; then |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17453 | break |
| 17454 | elif $ac_last_try; then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17455 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17456 | else |
| 17457 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17458 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17459 | done |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17460 | rm -f conf$$subs.sh |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17461 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17462 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17463 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17464 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17465 | sed -n ' |
| 17466 | h |
| 17467 | s/^/S["/; s/!.*/"]=/ |
| 17468 | p |
| 17469 | g |
| 17470 | s/^[^!]*!// |
| 17471 | :repl |
| 17472 | t repl |
| 17473 | s/'"$ac_delim"'$// |
| 17474 | t delim |
| 17475 | :nl |
| 17476 | h |
| 17477 | s/\(.\{148\}\)..*/\1/ |
| 17478 | t more1 |
| 17479 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ |
| 17480 | p |
| 17481 | n |
| 17482 | b repl |
| 17483 | :more1 |
| 17484 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ |
| 17485 | p |
| 17486 | g |
| 17487 | s/.\{148\}// |
| 17488 | t nl |
| 17489 | :delim |
| 17490 | h |
| 17491 | s/\(.\{148\}\)..*/\1/ |
| 17492 | t more2 |
| 17493 | s/["\\]/\\&/g; s/^/"/; s/$/"/ |
| 17494 | p |
| 17495 | b |
| 17496 | :more2 |
| 17497 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ |
| 17498 | p |
| 17499 | g |
| 17500 | s/.\{148\}// |
| 17501 | t delim |
| 17502 | ' <conf$$subs.awk | sed ' |
| 17503 | /^[^""]/{ |
| 17504 | N |
| 17505 | s/\n// |
| 17506 | } |
| 17507 | ' >>$CONFIG_STATUS || ac_write_fail=1 |
| 17508 | rm -f conf$$subs.awk |
| 17509 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 17510 | _ACAWK |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17511 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17512 | for (key in S) S_is_set[key] = 1 |
| 17513 | FS = "" |
| 17514 | |
| 17515 | } |
| 17516 | { |
| 17517 | line = $ 0 |
| 17518 | nfields = split(line, field, "@") |
| 17519 | substed = 0 |
| 17520 | len = length(field[1]) |
| 17521 | for (i = 2; i < nfields; i++) { |
| 17522 | key = field[i] |
| 17523 | keylen = length(key) |
| 17524 | if (S_is_set[key]) { |
| 17525 | value = S[key] |
| 17526 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) |
| 17527 | len += length(value) + length(field[++i]) |
| 17528 | substed = 1 |
| 17529 | } else |
| 17530 | len += 1 + keylen |
| 17531 | } |
| 17532 | |
| 17533 | print line |
| 17534 | } |
| 17535 | |
| 17536 | _ACAWK |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17537 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17538 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 17539 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then |
| 17540 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" |
| 17541 | else |
| 17542 | cat |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17543 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17544 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 |
Ronald Oussoren | 74f29b4 | 2009-09-20 20:09:26 +0000 | [diff] [blame] | 17545 | _ACEOF |
| 17546 | |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17547 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), |
| 17548 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17549 | # trailing colons and then remove the whole line if VPATH becomes empty |
| 17550 | # (actually we leave an empty line to preserve line numbers). |
| 17551 | if test "x$srcdir" = x.; then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17552 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ |
| 17553 | h |
| 17554 | s/// |
| 17555 | s/^/:/ |
| 17556 | s/[ ]*$/:/ |
| 17557 | s/:\$(srcdir):/:/g |
| 17558 | s/:\${srcdir}:/:/g |
| 17559 | s/:@srcdir@:/:/g |
| 17560 | s/^:*// |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17561 | s/:*$// |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17562 | x |
| 17563 | s/\(=[ ]*\).*/\1/ |
| 17564 | G |
| 17565 | s/\n// |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17566 | s/^[^=]*=[ ]*$// |
| 17567 | }' |
| 17568 | fi |
| 17569 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17570 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17571 | fi # test -n "$CONFIG_FILES" |
| 17572 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17573 | # Set up the scripts for CONFIG_HEADERS section. |
| 17574 | # No need to generate them if there are no CONFIG_HEADERS. |
| 17575 | # This happens for instance with `./config.status Makefile'. |
| 17576 | if test -n "$CONFIG_HEADERS"; then |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17577 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17578 | BEGIN { |
| 17579 | _ACEOF |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17580 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17581 | # Transform confdefs.h into an awk script `defines.awk', embedded as |
| 17582 | # here-document in config.status, that substitutes the proper values into |
| 17583 | # config.h.in to produce config.h. |
| 17584 | |
| 17585 | # Create a delimiter string that does not exist in confdefs.h, to ease |
| 17586 | # handling of long lines. |
| 17587 | ac_delim='%!_!# ' |
| 17588 | for ac_last_try in false false :; do |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17589 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` |
| 17590 | if test -z "$ac_tt"; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17591 | break |
| 17592 | elif $ac_last_try; then |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17593 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17594 | else |
| 17595 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " |
| 17596 | fi |
| 17597 | done |
| 17598 | |
| 17599 | # For the awk script, D is an array of macro values keyed by name, |
| 17600 | # likewise P contains macro parameters if any. Preserve backslash |
| 17601 | # newline sequences. |
| 17602 | |
| 17603 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* |
| 17604 | sed -n ' |
| 17605 | s/.\{148\}/&'"$ac_delim"'/g |
| 17606 | t rset |
| 17607 | :rset |
| 17608 | s/^[ ]*#[ ]*define[ ][ ]*/ / |
| 17609 | t def |
| 17610 | d |
| 17611 | :def |
| 17612 | s/\\$// |
| 17613 | t bsnl |
| 17614 | s/["\\]/\\&/g |
| 17615 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ |
| 17616 | D["\1"]=" \3"/p |
| 17617 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p |
| 17618 | d |
| 17619 | :bsnl |
| 17620 | s/["\\]/\\&/g |
| 17621 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ |
| 17622 | D["\1"]=" \3\\\\\\n"\\/p |
| 17623 | t cont |
| 17624 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p |
| 17625 | t cont |
| 17626 | d |
| 17627 | :cont |
| 17628 | n |
| 17629 | s/.\{148\}/&'"$ac_delim"'/g |
| 17630 | t clear |
| 17631 | :clear |
| 17632 | s/\\$// |
| 17633 | t bsnlc |
| 17634 | s/["\\]/\\&/g; s/^/"/; s/$/"/p |
| 17635 | d |
| 17636 | :bsnlc |
| 17637 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p |
| 17638 | b cont |
| 17639 | ' <confdefs.h | sed ' |
| 17640 | s/'"$ac_delim"'/"\\\ |
| 17641 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 |
| 17642 | |
| 17643 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 17644 | for (key in D) D_is_set[key] = 1 |
| 17645 | FS = "" |
| 17646 | } |
| 17647 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { |
| 17648 | line = \$ 0 |
| 17649 | split(line, arg, " ") |
| 17650 | if (arg[1] == "#") { |
| 17651 | defundef = arg[2] |
| 17652 | mac1 = arg[3] |
| 17653 | } else { |
| 17654 | defundef = substr(arg[1], 2) |
| 17655 | mac1 = arg[2] |
| 17656 | } |
| 17657 | split(mac1, mac2, "(") #) |
| 17658 | macro = mac2[1] |
| 17659 | prefix = substr(line, 1, index(line, defundef) - 1) |
| 17660 | if (D_is_set[macro]) { |
| 17661 | # Preserve the white space surrounding the "#". |
| 17662 | print prefix "define", macro P[macro] D[macro] |
| 17663 | next |
| 17664 | } else { |
| 17665 | # Replace #undef with comments. This is necessary, for example, |
| 17666 | # in the case of _POSIX_SOURCE, which is predefined and required |
| 17667 | # on some systems where configure will not decide to define it. |
| 17668 | if (defundef == "undef") { |
| 17669 | print "/*", prefix defundef, macro, "*/" |
| 17670 | next |
| 17671 | } |
| 17672 | } |
| 17673 | } |
| 17674 | { print } |
| 17675 | _ACAWK |
| 17676 | _ACEOF |
| 17677 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17678 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17679 | fi # test -n "$CONFIG_HEADERS" |
| 17680 | |
| 17681 | |
| 17682 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " |
| 17683 | shift |
| 17684 | for ac_tag |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17685 | do |
| 17686 | case $ac_tag in |
| 17687 | :[FHLC]) ac_mode=$ac_tag; continue;; |
| 17688 | esac |
| 17689 | case $ac_mode$ac_tag in |
| 17690 | :[FHL]*:*);; |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17691 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17692 | :[FH]-) ac_tag=-:-;; |
| 17693 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; |
| 17694 | esac |
| 17695 | ac_save_IFS=$IFS |
| 17696 | IFS=: |
| 17697 | set x $ac_tag |
| 17698 | IFS=$ac_save_IFS |
| 17699 | shift |
| 17700 | ac_file=$1 |
| 17701 | shift |
| 17702 | |
| 17703 | case $ac_mode in |
| 17704 | :L) ac_source=$1;; |
| 17705 | :[FH]) |
| 17706 | ac_file_inputs= |
| 17707 | for ac_f |
| 17708 | do |
| 17709 | case $ac_f in |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17710 | -) ac_f="$ac_tmp/stdin";; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17711 | *) # Look for the file first in the build tree, then in the source tree |
| 17712 | # (if the path is not absolute). The absolute path cannot be DOS-style, |
| 17713 | # because $ac_f cannot contain `:'. |
| 17714 | test -f "$ac_f" || |
| 17715 | case $ac_f in |
| 17716 | [\\/$]*) false;; |
| 17717 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; |
| 17718 | esac || |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17719 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17720 | esac |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17721 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac |
| 17722 | as_fn_append ac_file_inputs " '$ac_f'" |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17723 | done |
| 17724 | |
| 17725 | # Let's still pretend it is `configure' which instantiates (i.e., don't |
| 17726 | # use $as_me), people would be surprised to read: |
| 17727 | # /* config.h. Generated by config.status. */ |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17728 | configure_input='Generated from '` |
| 17729 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' |
| 17730 | `' by configure.' |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17731 | if test x"$ac_file" != x-; then |
| 17732 | configure_input="$ac_file. $configure_input" |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17733 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 |
| 17734 | $as_echo "$as_me: creating $ac_file" >&6;} |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17735 | fi |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17736 | # Neutralize special characters interpreted by sed in replacement strings. |
| 17737 | case $configure_input in #( |
| 17738 | *\&* | *\|* | *\\* ) |
| 17739 | ac_sed_conf_input=`$as_echo "$configure_input" | |
| 17740 | sed 's/[\\\\&|]/\\\\&/g'`;; #( |
| 17741 | *) ac_sed_conf_input=$configure_input;; |
| 17742 | esac |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17743 | |
| 17744 | case $ac_tag in |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17745 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ |
| 17746 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17747 | esac |
| 17748 | ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17749 | esac |
| 17750 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17751 | ac_dir=`$as_dirname -- "$ac_file" || |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17752 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 17753 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
| 17754 | X"$ac_file" : 'X\(//\)$' \| \ |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17755 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17756 | $as_echo X"$ac_file" | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17757 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
| 17758 | s//\1/ |
| 17759 | q |
| 17760 | } |
| 17761 | /^X\(\/\/\)[^/].*/{ |
| 17762 | s//\1/ |
| 17763 | q |
| 17764 | } |
| 17765 | /^X\(\/\/\)$/{ |
| 17766 | s//\1/ |
| 17767 | q |
| 17768 | } |
| 17769 | /^X\(\/\).*/{ |
| 17770 | s//\1/ |
| 17771 | q |
| 17772 | } |
| 17773 | s/.*/./; q'` |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17774 | as_dir="$ac_dir"; as_fn_mkdir_p |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17775 | ac_builddir=. |
| 17776 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17777 | case "$ac_dir" in |
| 17778 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; |
| 17779 | *) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17780 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17781 | # A ".." for each directory in $ac_dir_suffix. |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17782 | 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] | 17783 | case $ac_top_builddir_sub in |
| 17784 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; |
| 17785 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; |
| 17786 | esac ;; |
| 17787 | esac |
| 17788 | ac_abs_top_builddir=$ac_pwd |
| 17789 | ac_abs_builddir=$ac_pwd$ac_dir_suffix |
| 17790 | # for backward compatibility: |
| 17791 | ac_top_builddir=$ac_top_build_prefix |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17792 | |
| 17793 | case $srcdir in |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17794 | .) # We are building in place. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17795 | ac_srcdir=. |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17796 | ac_top_srcdir=$ac_top_builddir_sub |
| 17797 | ac_abs_top_srcdir=$ac_pwd ;; |
| 17798 | [\\/]* | ?:[\\/]* ) # Absolute name. |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17799 | ac_srcdir=$srcdir$ac_dir_suffix; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17800 | ac_top_srcdir=$srcdir |
| 17801 | ac_abs_top_srcdir=$srcdir ;; |
| 17802 | *) # Relative name. |
| 17803 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix |
| 17804 | ac_top_srcdir=$ac_top_build_prefix$srcdir |
| 17805 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17806 | esac |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17807 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
Skip Montanaro | f0d5f79 | 2004-08-15 14:08:23 +0000 | [diff] [blame] | 17808 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17809 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17810 | case $ac_mode in |
| 17811 | :F) |
| 17812 | # |
| 17813 | # CONFIG_FILE |
| 17814 | # |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17815 | |
| 17816 | case $INSTALL in |
| 17817 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17818 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17819 | esac |
Matthias Klose | 93a0ef1 | 2012-03-15 18:08:34 +0100 | [diff] [blame] | 17820 | ac_MKDIR_P=$MKDIR_P |
| 17821 | case $MKDIR_P in |
| 17822 | [\\/$]* | ?:[\\/]* ) ;; |
| 17823 | */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; |
| 17824 | esac |
Thomas Wouters | 477c8d5 | 2006-05-27 19:21:47 +0000 | [diff] [blame] | 17825 | _ACEOF |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17826 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17827 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17828 | # If the template does not know about datarootdir, expand it. |
| 17829 | # FIXME: This hack should be removed a few years after 2.60. |
| 17830 | ac_datarootdir_hack=; ac_datarootdir_seen= |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17831 | ac_sed_dataroot=' |
| 17832 | /datarootdir/ { |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17833 | p |
| 17834 | q |
| 17835 | } |
| 17836 | /@datadir@/p |
| 17837 | /@docdir@/p |
| 17838 | /@infodir@/p |
| 17839 | /@localedir@/p |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17840 | /@mandir@/p' |
| 17841 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17842 | *datarootdir*) ac_datarootdir_seen=yes;; |
| 17843 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17844 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 |
| 17845 | $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] | 17846 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17847 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17848 | ac_datarootdir_hack=' |
| 17849 | s&@datadir@&$datadir&g |
| 17850 | s&@docdir@&$docdir&g |
| 17851 | s&@infodir@&$infodir&g |
| 17852 | s&@localedir@&$localedir&g |
| 17853 | s&@mandir@&$mandir&g |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17854 | s&\\\${datarootdir}&$datarootdir&g' ;; |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17855 | esac |
| 17856 | _ACEOF |
| 17857 | |
| 17858 | # Neutralize VPATH when `$srcdir' = `.'. |
| 17859 | # Shell code in configure.ac might set extrasub. |
| 17860 | # FIXME: do we really want to maintain this feature? |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17861 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 17862 | ac_sed_extra="$ac_vpsub |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17863 | $extrasub |
| 17864 | _ACEOF |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17865 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17866 | :t |
| 17867 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17868 | s|@configure_input@|$ac_sed_conf_input|;t t |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17869 | s&@top_builddir@&$ac_top_builddir_sub&;t t |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17870 | s&@top_build_prefix@&$ac_top_build_prefix&;t t |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17871 | s&@srcdir@&$ac_srcdir&;t t |
| 17872 | s&@abs_srcdir@&$ac_abs_srcdir&;t t |
| 17873 | s&@top_srcdir@&$ac_top_srcdir&;t t |
| 17874 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t |
| 17875 | s&@builddir@&$ac_builddir&;t t |
| 17876 | s&@abs_builddir@&$ac_abs_builddir&;t t |
| 17877 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t |
| 17878 | s&@INSTALL@&$ac_INSTALL&;t t |
Matthias Klose | 93a0ef1 | 2012-03-15 18:08:34 +0100 | [diff] [blame] | 17879 | s&@MKDIR_P@&$ac_MKDIR_P&;t t |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17880 | $ac_datarootdir_hack |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17881 | " |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17882 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ |
| 17883 | >$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] | 17884 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17885 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17886 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && |
| 17887 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ |
| 17888 | "$ac_tmp/out"`; test -z "$ac_out"; } && |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17889 | { $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] | 17890 | which seems to be undefined. Please make sure it is defined" >&5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17891 | $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] | 17892 | which seems to be undefined. Please make sure it is defined" >&2;} |
Thomas Wouters | 1ba5b3b | 2006-06-08 14:52:47 +0000 | [diff] [blame] | 17893 | |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17894 | rm -f "$ac_tmp/stdin" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17895 | case $ac_file in |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17896 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; |
| 17897 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17898 | esac \ |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17899 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17900 | ;; |
| 17901 | :H) |
| 17902 | # |
| 17903 | # CONFIG_HEADER |
| 17904 | # |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17905 | if test x"$ac_file" != x-; then |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17906 | { |
| 17907 | $as_echo "/* $configure_input */" \ |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17908 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" |
| 17909 | } >"$ac_tmp/config.h" \ |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17910 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17911 | 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] | 17912 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
| 17913 | $as_echo "$as_me: $ac_file is unchanged" >&6;} |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17914 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17915 | rm -f "$ac_file" |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17916 | mv "$ac_tmp/config.h" "$ac_file" \ |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17917 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17918 | fi |
| 17919 | else |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17920 | $as_echo "/* $configure_input */" \ |
Victor Stinner | e0be423 | 2011-10-25 13:06:09 +0200 | [diff] [blame] | 17921 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17922 | || as_fn_error $? "could not create -" "$LINENO" 5 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17923 | fi |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17924 | ;; |
Guido van Rossum | 7f43da7 | 1994-08-01 12:15:30 +0000 | [diff] [blame] | 17925 | |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17926 | |
| 17927 | esac |
| 17928 | |
Antoine Pitrou | 8e6b407 | 2010-09-10 19:44:44 +0000 | [diff] [blame] | 17929 | |
| 17930 | case $ac_file$ac_mode in |
| 17931 | "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;; |
| 17932 | |
| 17933 | esac |
Thomas Wouters | 47b49bf | 2007-08-30 22:15:33 +0000 | [diff] [blame] | 17934 | done # for ac_tag |
| 17935 | |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 17936 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17937 | as_fn_exit 0 |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17938 | _ACEOF |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17939 | ac_clean_files=$ac_clean_files_save |
| 17940 | |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17941 | test $ac_write_fail = 0 || |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17942 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17943 | |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17944 | |
| 17945 | # configure is writing to config.log, and then calls config.status. |
| 17946 | # config.status does its own redirection, appending to config.log. |
| 17947 | # Unfortunately, on DOS this fails, as config.log is still kept open |
| 17948 | # by configure, so config.status won't be able to write to it; its |
| 17949 | # output is simply discarded. So we exec the FD to /dev/null, |
| 17950 | # effectively closing config.log, so it can be properly (re)opened and |
| 17951 | # appended to by config.status. When coming back to configure, we |
| 17952 | # need to make the FD available again. |
| 17953 | if test "$no_create" != yes; then |
| 17954 | ac_cs_success=: |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17955 | ac_config_status_args= |
| 17956 | test "$silent" = yes && |
| 17957 | ac_config_status_args="$ac_config_status_args --quiet" |
Martin v. Löwis | 1143799 | 2002-04-12 09:54:03 +0000 | [diff] [blame] | 17958 | exec 5>/dev/null |
Skip Montanaro | 6dead95 | 2003-09-25 14:50:04 +0000 | [diff] [blame] | 17959 | $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] | 17960 | exec 5>>config.log |
| 17961 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which |
| 17962 | # would make configure fail if this is the last instruction. |
Ross Lagerwall | b0ae53d | 2011-06-10 07:30:30 +0200 | [diff] [blame] | 17963 | $ac_cs_success || as_fn_exit 1 |
Matthias Klose | b962171 | 2010-04-24 17:59:49 +0000 | [diff] [blame] | 17964 | fi |
| 17965 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
| 17966 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 |
| 17967 | $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] | 17968 | fi |
Guido van Rossum | 627b2d7 | 1993-12-24 10:39:16 +0000 | [diff] [blame] | 17969 | |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 17970 | |
Christian Heimes | 75ed890 | 2013-11-20 01:11:18 +0100 | [diff] [blame] | 17971 | echo "creating Modules/Setup" >&6 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 17972 | if test ! -f Modules/Setup |
| 17973 | then |
| 17974 | cp $srcdir/Modules/Setup.dist Modules/Setup |
| 17975 | fi |
| 17976 | |
Christian Heimes | 75ed890 | 2013-11-20 01:11:18 +0100 | [diff] [blame] | 17977 | echo "creating Modules/Setup.local" >&6 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 17978 | if test ! -f Modules/Setup.local |
| 17979 | then |
| 17980 | echo "# Edit this file for local setup changes" >Modules/Setup.local |
| 17981 | fi |
| 17982 | |
Christian Heimes | 75ed890 | 2013-11-20 01:11:18 +0100 | [diff] [blame] | 17983 | echo "creating Makefile" >&6 |
Neil Schemenauer | 3ecf0aa | 2001-01-26 16:15:20 +0000 | [diff] [blame] | 17984 | $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ |
| 17985 | -s Modules Modules/Setup.config \ |
Neil Schemenauer | f8b71c5 | 2001-04-21 17:41:16 +0000 | [diff] [blame] | 17986 | Modules/Setup.local Modules/Setup |
Neil Schemenauer | c761fc8 | 2001-02-19 04:50:49 +0000 | [diff] [blame] | 17987 | mv config.c Modules |
Brett Cannon | 63d98bc | 2016-09-06 17:12:40 -0700 | [diff] [blame] | 17988 | |
| 17989 | if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then |
| 17990 | echo "" >&6 |
| 17991 | echo "" >&6 |
Christian Heimes | 938da64 | 2016-09-24 12:34:25 +0200 | [diff] [blame] | 17992 | echo "If you want a release build with all optimizations active (LTO, PGO, etc)," >&6 |
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D) | 1016b2f | 2016-11-20 21:07:42 +0000 | [diff] [blame] | 17993 | echo "please run ./configure --enable-optimizations" >&6 |
Brett Cannon | 63d98bc | 2016-09-06 17:12:40 -0700 | [diff] [blame] | 17994 | echo "" >&6 |
| 17995 | echo "" >&6 |
| 17996 | fi |
| 17997 | |