Debian Codegraph @

configure

raw symbols SCIP
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.72 for GAP 4.16.0.
4 #
5 # Report bugs to <[email protected]>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation,
9 # Inc.
10 #
11 #
12 # This configure script is free software; the Free Software Foundation
13 # gives unlimited permission to copy, distribute and modify it.
14 ## -------------------- ##
15 ## M4sh Initialization. ##
16 ## -------------------- ##
17
18 # Be more Bourne compatible
19 DUALCASE=1; export DUALCASE # for MKS sh
20 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
21 then :
22 emulate sh
23 NULLCMD=:
24 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
27 setopt NO_GLOB_SUBST
28 else case e in #(
29 e) case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
33 ;;
34 esac ;;
35 esac
36 fi
37
38
39
40 # Reset variables that may have inherited troublesome values from
41 # the environment.
42
43 # IFS needs to be set, to space, tab, and newline, in precisely that order.
44 # (If _AS_PATH_WALK were called with IFS unset, it would have the
45 # side effect of setting IFS to empty, thus disabling word splitting.)
46 # Quoting is to prevent editors from complaining about space-tab.
47 as_nl='
48 '
49 export as_nl
50 IFS=" "" $as_nl"
51
52 PS1='$ '
53 PS2='> '
54 PS4='+ '
55
56 # Ensure predictable behavior from utilities with locale-dependent output.
57 LC_ALL=C
58 export LC_ALL
59 LANGUAGE=C
60 export LANGUAGE
61
62 # We cannot yet rely on "unset" to work, but we need these variables
63 # to be unset--not just set to an empty or harmless value--now, to
64 # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
65 # also avoids known problems related to "unset" and subshell syntax
66 # in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
67 for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
68 do eval test \${$as_var+y} \
69 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
70 done
71
72 # Ensure that fds 0, 1, and 2 are open.
73 if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
74 if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
75 if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
76
77 # The user is always right.
78 if ${PATH_SEPARATOR+false} :; then
79 PATH_SEPARATOR=:
80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
84 fi
85
86
87 # Find who we are. Look in the path if we contain no directory separator.
88 as_myself=
89 case $0 in #((
90 *[\\/]* ) as_myself=$0 ;;
91 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
92 for as_dir in $PATH
93 do
94 IFS=$as_save_IFS
95 case $as_dir in #(((
96 '') as_dir=./ ;;
97 */) ;;
98 *) as_dir=$as_dir/ ;;
99 esac
100 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
101 done
102 IFS=$as_save_IFS
103
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
112 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
114 fi
115
116
117 # Use a proper internal environment variable to ensure we don't fall
118 # into an infinite loop, continuously re-executing ourselves.
119 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
120 _as_can_reexec=no; export _as_can_reexec;
121 # We cannot yet assume a decent shell, so we have to provide a
122 # neutralization value for shells without unset; and this also
123 # works around shells that cannot unset nonexistent variables.
124 # Preserve -v and -x to the replacement shell.
125 BASH_ENV=/dev/null
126 ENV=/dev/null
127 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
128 case $- in # ((((
129 *v*x* | *x*v* ) as_opts=-vx ;;
130 *v* ) as_opts=-v ;;
131 *x* ) as_opts=-x ;;
132 * ) as_opts= ;;
133 esac
134 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
135 # Admittedly, this is quite paranoid, since all the known shells bail
136 # out after a failed 'exec'.
137 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
138 exit 255
139 fi
140 # We don't want this to propagate to other subprocesses.
141 { _as_can_reexec=; unset _as_can_reexec;}
142 if test "x$CONFIG_SHELL" = x; then
143 as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
144 then :
145 emulate sh
146 NULLCMD=:
147 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
148 # is contrary to our usage. Disable this feature.
149 alias -g '\${1+\"\$@\"}'='\"\$@\"'
150 setopt NO_GLOB_SUBST
151 else case e in #(
152 e) case \`(set -o) 2>/dev/null\` in #(
153 *posix*) :
154 set -o posix ;; #(
155 *) :
156 ;;
157 esac ;;
158 esac
159 fi
160 "
161 as_required="as_fn_return () { (exit \$1); }
162 as_fn_success () { as_fn_return 0; }
163 as_fn_failure () { as_fn_return 1; }
164 as_fn_ret_success () { return 0; }
165 as_fn_ret_failure () { return 1; }
166
167 exitcode=0
168 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
169 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
170 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
171 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
172 if ( set x; as_fn_ret_success y && test x = \"\$1\" )
173 then :
174
175 else case e in #(
176 e) exitcode=1; echo positional parameters were not saved. ;;
177 esac
178 fi
179 test x\$exitcode = x0 || exit 1
180 blah=\$(echo \$(echo blah))
181 test x\"\$blah\" = xblah || exit 1
182 test -x / || exit 1"
183 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
184 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
185 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
186 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
187 test \$(( 1 + 1 )) = 2 || exit 1"
188 if (eval "$as_required") 2>/dev/null
189 then :
190 as_have_required=yes
191 else case e in #(
192 e) as_have_required=no ;;
193 esac
194 fi
195 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
196 then :
197
198 else case e in #(
199 e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
200 as_found=false
201 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
202 do
203 IFS=$as_save_IFS
204 case $as_dir in #(((
205 '') as_dir=./ ;;
206 */) ;;
207 *) as_dir=$as_dir/ ;;
208 esac
209 as_found=:
210 case $as_dir in #(
211 /*)
212 for as_base in sh bash ksh sh5; do
213 # Try only shells that exist, to save several forks.
214 as_shell=$as_dir$as_base
215 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
216 as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
217 then :
218 CONFIG_SHELL=$as_shell as_have_required=yes
219 if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
220 then :
221 break 2
222 fi
223 fi
224 done;;
225 esac
226 as_found=false
227 done
228 IFS=$as_save_IFS
229 if $as_found
230 then :
231
232 else case e in #(
233 e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
235 then :
236 CONFIG_SHELL=$SHELL as_have_required=yes
237 fi ;;
238 esac
239 fi
240
241
242 if test "x$CONFIG_SHELL" != x
243 then :
244 export CONFIG_SHELL
245 # We cannot yet assume a decent shell, so we have to provide a
246 # neutralization value for shells without unset; and this also
247 # works around shells that cannot unset nonexistent variables.
248 # Preserve -v and -x to the replacement shell.
249 BASH_ENV=/dev/null
250 ENV=/dev/null
251 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
252 case $- in # ((((
253 *v*x* | *x*v* ) as_opts=-vx ;;
254 *v* ) as_opts=-v ;;
255 *x* ) as_opts=-x ;;
256 * ) as_opts= ;;
257 esac
258 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
259 # Admittedly, this is quite paranoid, since all the known shells bail
260 # out after a failed 'exec'.
261 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
262 exit 255
263 fi
264
265 if test x$as_have_required = xno
266 then :
267 printf "%s\n" "$0: This script requires a shell more modern than all"
268 printf "%s\n" "$0: the shells that I found on your system."
269 if test ${ZSH_VERSION+y} ; then
270 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
271 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
272 else
273 printf "%s\n" "$0: Please tell [email protected] and
274 $0: [email protected] about your system, including any
275 $0: error possibly output before this message. Then install
276 $0: a modern shell, or manually run the script under such a
277 $0: shell if you do have one."
278 fi
279 exit 1
280 fi ;;
281 esac
282 fi
283 fi
284 SHELL=${CONFIG_SHELL-/bin/sh}
285 export SHELL
286 # Unset more variables known to interfere with behavior of common tools.
287 CLICOLOR_FORCE= GREP_OPTIONS=
288 unset CLICOLOR_FORCE GREP_OPTIONS
289
290 ## --------------------- ##
291 ## M4sh Shell Functions. ##
292 ## --------------------- ##
293 # as_fn_unset VAR
294 # ---------------
295 # Portably unset VAR.
296 as_fn_unset ()
297 {
298 { eval $1=; unset $1;}
299 }
300 as_unset=as_fn_unset
301
302
303 # as_fn_set_status STATUS
304 # -----------------------
305 # Set $? to STATUS, without forking.
306 as_fn_set_status ()
307 {
308 return $1
309 } # as_fn_set_status
310
311 # as_fn_exit STATUS
312 # -----------------
313 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314 as_fn_exit ()
315 {
316 set +e
317 as_fn_set_status $1
318 exit $1
319 } # as_fn_exit
320
321 # as_fn_mkdir_p
322 # -------------
323 # Create "$as_dir" as a directory, including parents if necessary.
324 as_fn_mkdir_p ()
325 {
326
327 case $as_dir in #(
328 -*) as_dir=./$as_dir;;
329 esac
330 test -d "$as_dir" || eval $as_mkdir_p || {
331 as_dirs=
332 while :; do
333 case $as_dir in #(
334 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335 *) as_qdir=$as_dir;;
336 esac
337 as_dirs="'$as_qdir' $as_dirs"
338 as_dir=`$as_dirname -- "$as_dir" ||
339 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340 X"$as_dir" : 'X\(//\)[^/]' \| \
341 X"$as_dir" : 'X\(//\)$' \| \
342 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343 printf "%s\n" X"$as_dir" |
344 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345 s//\1/
346 q
347 }
348 /^X\(\/\/\)[^/].*/{
349 s//\1/
350 q
351 }
352 /^X\(\/\/\)$/{
353 s//\1/
354 q
355 }
356 /^X\(\/\).*/{
357 s//\1/
358 q
359 }
360 s/.*/./; q'`
361 test -d "$as_dir" && break
362 done
363 test -z "$as_dirs" || eval "mkdir $as_dirs"
364 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367 } # as_fn_mkdir_p
368
369 # as_fn_executable_p FILE
370 # -----------------------
371 # Test if FILE is an executable regular file.
372 as_fn_executable_p ()
373 {
374 test -f "$1" && test -x "$1"
375 } # as_fn_executable_p
376 # as_fn_append VAR VALUE
377 # ----------------------
378 # Append the text in VALUE to the end of the definition contained in VAR. Take
379 # advantage of any shell optimizations that allow amortized linear growth over
380 # repeated appends, instead of the typical quadratic growth present in naive
381 # implementations.
382 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
383 then :
384 eval 'as_fn_append ()
385 {
386 eval $1+=\$2
387 }'
388 else case e in #(
389 e) as_fn_append ()
390 {
391 eval $1=\$$1\$2
392 } ;;
393 esac
394 fi # as_fn_append
395
396 # as_fn_arith ARG...
397 # ------------------
398 # Perform arithmetic evaluation on the ARGs, and store the result in the
399 # global $as_val. Take advantage of shells that can avoid forks. The arguments
400 # must be portable across $(()) and expr.
401 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
402 then :
403 eval 'as_fn_arith ()
404 {
405 as_val=$(( $* ))
406 }'
407 else case e in #(
408 e) as_fn_arith ()
409 {
410 as_val=`expr "$@" || test $? -eq 1`
411 } ;;
412 esac
413 fi # as_fn_arith
414
415
416 # as_fn_error STATUS ERROR [LINENO LOG_FD]
417 # ----------------------------------------
418 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
419 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
420 # script with STATUS, using 1 if that was 0.
421 as_fn_error ()
422 {
423 as_status=$1; test $as_status -eq 0 && as_status=1
424 if test "$4"; then
425 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
426 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
427 fi
428 printf "%s\n" "$as_me: error: $2" >&2
429 as_fn_exit $as_status
430 } # as_fn_error
431
432 if expr a : '\(a\)' >/dev/null 2>&1 &&
433 test "X`expr 00001 : '.*\(...\)'`" = X001; then
434 as_expr=expr
435 else
436 as_expr=false
437 fi
438
439 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
440 as_basename=basename
441 else
442 as_basename=false
443 fi
444
445 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
446 as_dirname=dirname
447 else
448 as_dirname=false
449 fi
450
451 as_me=`$as_basename -- "$0" ||
452 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
453 X"$0" : 'X\(//\)$' \| \
454 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
455 printf "%s\n" X/"$0" |
456 sed '/^.*\/\([^/][^/]*\)\/*$/{
457 s//\1/
458 q
459 }
460 /^X\/\(\/\/\)$/{
461 s//\1/
462 q
463 }
464 /^X\/\(\/\).*/{
465 s//\1/
466 q
467 }
468 s/.*/./; q'`
469
470 # Avoid depending upon Character Ranges.
471 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
472 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
473 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
474 as_cr_digits='0123456789'
475 as_cr_alnum=$as_cr_Letters$as_cr_digits
476
477
478 as_lineno_1=$LINENO as_lineno_1a=$LINENO
479 as_lineno_2=$LINENO as_lineno_2a=$LINENO
480 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
481 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
482 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
483 sed -n '
484 p
485 /[$]LINENO/=
486 ' <$as_myself |
487 sed '
488 t clear
489 :clear
490 s/[$]LINENO.*/&-/
491 t lineno
492 b
493 :lineno
494 N
495 :loop
496 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
497 t loop
498 s/-\n.*//
499 ' >$as_me.lineno &&
500 chmod +x "$as_me.lineno" ||
501 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
502
503 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
504 # already done that, so ensure we don't try to do so again and fall
505 # in an infinite loop. This has already happened in practice.
506 _as_can_reexec=no; export _as_can_reexec
507 # Don't try to exec as it changes $[0], causing all sort of problems
508 # (the dirname of $[0] is not the place where we might find the
509 # original and so on. Autoconf is especially sensitive to this).
510 . "./$as_me.lineno"
511 # Exit status is that of the last command.
512 exit
513 }
514
515
516 # Determine whether it's possible to make 'echo' print without a newline.
517 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
518 # for compatibility with existing Makefiles.
519 ECHO_C= ECHO_N= ECHO_T=
520 case `echo -n x` in #(((((
521 -n*)
522 case `echo 'xy\c'` in
523 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
524 xy) ECHO_C='\c';;
525 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
526 ECHO_T=' ';;
527 esac;;
528 *)
529 ECHO_N='-n';;
530 esac
531
532 # For backward compatibility with old third-party macros, we provide
533 # the shell variables $as_echo and $as_echo_n. New code should use
534 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
535 as_echo='printf %s\n'
536 as_echo_n='printf %s'
537
538 rm -f conf$$ conf$$.exe conf$$.file
539 if test -d conf$$.dir; then
540 rm -f conf$$.dir/conf$$.file
541 else
542 rm -f conf$$.dir
543 mkdir conf$$.dir 2>/dev/null
544 fi
545 if (echo >conf$$.file) 2>/dev/null; then
546 if ln -s conf$$.file conf$$ 2>/dev/null; then
547 as_ln_s='ln -s'
548 # ... but there are two gotchas:
549 # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
550 # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
551 # In both cases, we have to default to 'cp -pR'.
552 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
553 as_ln_s='cp -pR'
554 elif ln conf$$.file conf$$ 2>/dev/null; then
555 as_ln_s=ln
556 else
557 as_ln_s='cp -pR'
558 fi
559 else
560 as_ln_s='cp -pR'
561 fi
562 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
563 rmdir conf$$.dir 2>/dev/null
564
565 if mkdir -p . 2>/dev/null; then
566 as_mkdir_p='mkdir -p "$as_dir"'
567 else
568 test -d ./-p && rmdir ./-p
569 as_mkdir_p=false
570 fi
571
572 as_test_x='test -x'
573 as_executable_p=as_fn_executable_p
574
575 # Sed expression to map a string onto a valid CPP name.
576 as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
577 as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
578
579 # Sed expression to map a string onto a valid variable name.
580 as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
581 as_tr_sh="eval sed '$as_sed_sh'" # deprecated
582
583
584 test -n "$DJDIR" || exec 7<&0 </dev/null
585 exec 6>&1
586
587 # Name of the host.
588 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
589 # so uname gets run too.
590 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
591
592 #
593 # Initializations.
594 #
595 ac_default_prefix=/usr/local
596 ac_clean_files=
597 ac_config_libobj_dir=.
598 LIBOBJS=
599 cross_compiling=no
600 subdirs=
601 MFLAGS=
602 MAKEFLAGS=
603
604 # Identity of this package.
605 PACKAGE_NAME='GAP'
606 PACKAGE_TARNAME='gap-4.16.0'
607 PACKAGE_VERSION='4.16.0'
608 PACKAGE_STRING='GAP 4.16.0'
609 PACKAGE_BUGREPORT='[email protected]'
610 PACKAGE_URL='https://www.gap-system.org/'
611
612 ac_unique_file="src/gap.c"
613 # Factoring default headers for most tests.
614 ac_includes_default="\
615 #include <stddef.h>
616 #ifdef HAVE_STDIO_H
617 # include <stdio.h>
618 #endif
619 #ifdef HAVE_STDLIB_H
620 # include <stdlib.h>
621 #endif
622 #ifdef HAVE_STRING_H
623 # include <string.h>
624 #endif
625 #ifdef HAVE_INTTYPES_H
626 # include <inttypes.h>
627 #endif
628 #ifdef HAVE_STDINT_H
629 # include <stdint.h>
630 #endif
631 #ifdef HAVE_STRINGS_H
632 # include <strings.h>
633 #endif
634 #ifdef HAVE_SYS_TYPES_H
635 # include <sys/types.h>
636 #endif
637 #ifdef HAVE_SYS_STAT_H
638 # include <sys/stat.h>
639 #endif
640 #ifdef HAVE_UNISTD_H
641 # include <unistd.h>
642 #endif"
643
644 ac_header_c_list=
645 ac_func_c_list=
646 enable_year2038=no
647 ac_subst_vars='LTLIBOBJS
648 LIBOBJS
649 GAP_DEFINES
650 PTHREAD_CFLAGS
651 PTHREAD_LIBS
652 PTHREAD_CXX
653 PTHREAD_CC
654 ax_pthread_config
655 CPP
656 GAPARCH
657 gap_kernel_minor_version
658 gap_kernel_major_version
659 BOEHM_GC_LIBS
660 BOEHM_GC_LDFLAGS
661 BOEHM_GC_CPPFLAGS
662 BUILD_BOEHM_GC
663 LIBATOMIC_OPS_LIBS
664 LIBATOMIC_OPS_LDFLAGS
665 LIBATOMIC_OPS_CPPFLAGS
666 BUILD_LIBATOMIC_OPS
667 JULIA_LIBS
668 JULIA_LDFLAGS
669 JULIA_CFLAGS
670 JULIA_VERSION
671 JULIA
672 READLINE_LIBS
673 READLINE_LDFLAGS
674 READLINE_CPPFLAGS
675 ZLIB_LIBS
676 ZLIB_LDFLAGS
677 ZLIB_CPPFLAGS
678 BUILD_ZLIB
679 GMP_PREFIX
680 GMP_LIBS
681 GMP_LDFLAGS
682 GMP_CPPFLAGS
683 BUILD_GMP
684 WARN_CXXFLAGS
685 WARN_CFLAGS
686 SED
687 MAINTAINER_MODE
688 GC_SOURCES
689 HPCGAP
690 MKDIR_P
691 INSTALL_DATA
692 INSTALL_SCRIPT
693 INSTALL_PROGRAM
694 ABI_CFLAGS
695 ABI
696 HAVE_CXX11
697 ac_ct_CXX
698 CXXFLAGS
699 CXX
700 OBJEXT
701 EXEEXT
702 ac_ct_CC
703 CPPFLAGS
704 LDFLAGS
705 CFLAGS
706 CC
707 host_os
708 host_vendor
709 host_cpu
710 host
711 build_os
712 build_vendor
713 build_cpu
714 build
715 GAP_RELEASEYEAR
716 GAP_RELEASEDAY
717 GAP_VERSION
718 target_alias
719 host_alias
720 build_alias
721 LIBS
722 ECHO_T
723 ECHO_N
724 ECHO_C
725 DEFS
726 mandir
727 localedir
728 libdir
729 psdir
730 pdfdir
731 dvidir
732 htmldir
733 infodir
734 docdir
735 oldincludedir
736 includedir
737 runstatedir
738 localstatedir
739 sharedstatedir
740 sysconfdir
741 datadir
742 datarootdir
743 libexecdir
744 sbindir
745 bindir
746 program_transform_name
747 prefix
748 exec_prefix
749 PACKAGE_URL
750 PACKAGE_BUGREPORT
751 PACKAGE_STRING
752 PACKAGE_VERSION
753 PACKAGE_TARNAME
754 PACKAGE_NAME
755 PATH_SEPARATOR
756 SHELL'
757 ac_subst_files=''
758 ac_user_opts='
759 enable_option_checking
760 enable_hpcgap
761 with_gc
762 with_julia
763 enable_native_tls
764 enable_debug
765 enable_maintainer_mode
766 enable_memory_checking
767 enable_valgrind
768 enable_Werror
769 enable_popcnt
770 with_gmp
771 with_zlib
772 with_readline
773 enable_largefile
774 enable_year2038
775 '
776 ac_precious_vars='build_alias
777 host_alias
778 target_alias
779 CC
780 CFLAGS
781 LDFLAGS
782 LIBS
783 CPPFLAGS
784 CXX
785 CXXFLAGS
786 CCC
787 ABI
788 CPP'
789
790
791 # Initialize some variables set by options.
792 ac_init_help=
793 ac_init_version=false
794 ac_unrecognized_opts=
795 ac_unrecognized_sep=
796 # The variables have the same names as the options, with
797 # dashes changed to underlines.
798 cache_file=/dev/null
799 exec_prefix=NONE
800 no_create=
801 no_recursion=
802 prefix=NONE
803 program_prefix=NONE
804 program_suffix=NONE
805 program_transform_name=s,x,x,
806 silent=
807 site=
808 srcdir=
809 verbose=
810 x_includes=NONE
811 x_libraries=NONE
812
813 # Installation directory options.
814 # These are left unexpanded so users can "make install exec_prefix=/foo"
815 # and all the variables that are supposed to be based on exec_prefix
816 # by default will actually change.
817 # Use braces instead of parens because sh, perl, etc. also accept them.
818 # (The list follows the same order as the GNU Coding Standards.)
819 bindir='${exec_prefix}/bin'
820 sbindir='${exec_prefix}/sbin'
821 libexecdir='${exec_prefix}/libexec'
822 datarootdir='${prefix}/share'
823 datadir='${datarootdir}'
824 sysconfdir='${prefix}/etc'
825 sharedstatedir='${prefix}/com'
826 localstatedir='${prefix}/var'
827 runstatedir='${localstatedir}/run'
828 includedir='${prefix}/include'
829 oldincludedir='/usr/include'
830 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
831 infodir='${datarootdir}/info'
832 htmldir='${docdir}'
833 dvidir='${docdir}'
834 pdfdir='${docdir}'
835 psdir='${docdir}'
836 libdir='${exec_prefix}/lib'
837 localedir='${datarootdir}/locale'
838 mandir='${datarootdir}/man'
839
840 ac_prev=
841 ac_dashdash=
842 for ac_option
843 do
844 # If the previous option needs an argument, assign it.
845 if test -n "$ac_prev"; then
846 eval $ac_prev=\$ac_option
847 ac_prev=
848 continue
849 fi
850
851 case $ac_option in
852 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
853 *=) ac_optarg= ;;
854 *) ac_optarg=yes ;;
855 esac
856
857 case $ac_dashdash$ac_option in
858 --)
859 ac_dashdash=yes ;;
860
861 -bindir | --bindir | --bindi | --bind | --bin | --bi)
862 ac_prev=bindir ;;
863 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
864 bindir=$ac_optarg ;;
865
866 -build | --build | --buil | --bui | --bu)
867 ac_prev=build_alias ;;
868 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
869 build_alias=$ac_optarg ;;
870
871 -cache-file | --cache-file | --cache-fil | --cache-fi \
872 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
873 ac_prev=cache_file ;;
874 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
875 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
876 cache_file=$ac_optarg ;;
877
878 --config-cache | -C)
879 cache_file=config.cache ;;
880
881 -datadir | --datadir | --datadi | --datad)
882 ac_prev=datadir ;;
883 -datadir=* | --datadir=* | --datadi=* | --datad=*)
884 datadir=$ac_optarg ;;
885
886 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
887 | --dataroo | --dataro | --datar)
888 ac_prev=datarootdir ;;
889 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
890 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
891 datarootdir=$ac_optarg ;;
892
893 -disable-* | --disable-*)
894 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
895 # Reject names that are not valid shell variable names.
896 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
897 as_fn_error $? "invalid feature name: '$ac_useropt'"
898 ac_useropt_orig=$ac_useropt
899 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
900 case $ac_user_opts in
901 *"
902 "enable_$ac_useropt"
903 "*) ;;
904 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
905 ac_unrecognized_sep=', ';;
906 esac
907 eval enable_$ac_useropt=no ;;
908
909 -docdir | --docdir | --docdi | --doc | --do)
910 ac_prev=docdir ;;
911 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
912 docdir=$ac_optarg ;;
913
914 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
915 ac_prev=dvidir ;;
916 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
917 dvidir=$ac_optarg ;;
918
919 -enable-* | --enable-*)
920 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
921 # Reject names that are not valid shell variable names.
922 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
923 as_fn_error $? "invalid feature name: '$ac_useropt'"
924 ac_useropt_orig=$ac_useropt
925 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
926 case $ac_user_opts in
927 *"
928 "enable_$ac_useropt"
929 "*) ;;
930 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
931 ac_unrecognized_sep=', ';;
932 esac
933 eval enable_$ac_useropt=\$ac_optarg ;;
934
935 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
936 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
937 | --exec | --exe | --ex)
938 ac_prev=exec_prefix ;;
939 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
940 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
941 | --exec=* | --exe=* | --ex=*)
942 exec_prefix=$ac_optarg ;;
943
944 -gas | --gas | --ga | --g)
945 # Obsolete; use --with-gas.
946 with_gas=yes ;;
947
948 -help | --help | --hel | --he | -h)
949 ac_init_help=long ;;
950 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
951 ac_init_help=recursive ;;
952 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
953 ac_init_help=short ;;
954
955 -host | --host | --hos | --ho)
956 ac_prev=host_alias ;;
957 -host=* | --host=* | --hos=* | --ho=*)
958 host_alias=$ac_optarg ;;
959
960 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
961 ac_prev=htmldir ;;
962 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
963 | --ht=*)
964 htmldir=$ac_optarg ;;
965
966 -includedir | --includedir | --includedi | --included | --include \
967 | --includ | --inclu | --incl | --inc)
968 ac_prev=includedir ;;
969 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
970 | --includ=* | --inclu=* | --incl=* | --inc=*)
971 includedir=$ac_optarg ;;
972
973 -infodir | --infodir | --infodi | --infod | --info | --inf)
974 ac_prev=infodir ;;
975 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
976 infodir=$ac_optarg ;;
977
978 -libdir | --libdir | --libdi | --libd)
979 ac_prev=libdir ;;
980 -libdir=* | --libdir=* | --libdi=* | --libd=*)
981 libdir=$ac_optarg ;;
982
983 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
984 | --libexe | --libex | --libe)
985 ac_prev=libexecdir ;;
986 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
987 | --libexe=* | --libex=* | --libe=*)
988 libexecdir=$ac_optarg ;;
989
990 -localedir | --localedir | --localedi | --localed | --locale)
991 ac_prev=localedir ;;
992 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
993 localedir=$ac_optarg ;;
994
995 -localstatedir | --localstatedir | --localstatedi | --localstated \
996 | --localstate | --localstat | --localsta | --localst | --locals)
997 ac_prev=localstatedir ;;
998 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
999 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1000 localstatedir=$ac_optarg ;;
1001
1002 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1003 ac_prev=mandir ;;
1004 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1005 mandir=$ac_optarg ;;
1006
1007 -nfp | --nfp | --nf)
1008 # Obsolete; use --without-fp.
1009 with_fp=no ;;
1010
1011 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1012 | --no-cr | --no-c | -n)
1013 no_create=yes ;;
1014
1015 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1016 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1017 no_recursion=yes ;;
1018
1019 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1020 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1021 | --oldin | --oldi | --old | --ol | --o)
1022 ac_prev=oldincludedir ;;
1023 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1024 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1025 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1026 oldincludedir=$ac_optarg ;;
1027
1028 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1029 ac_prev=prefix ;;
1030 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1031 prefix=$ac_optarg ;;
1032
1033 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1034 | --program-pre | --program-pr | --program-p)
1035 ac_prev=program_prefix ;;
1036 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1037 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1038 program_prefix=$ac_optarg ;;
1039
1040 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1041 | --program-suf | --program-su | --program-s)
1042 ac_prev=program_suffix ;;
1043 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1044 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1045 program_suffix=$ac_optarg ;;
1046
1047 -program-transform-name | --program-transform-name \
1048 | --program-transform-nam | --program-transform-na \
1049 | --program-transform-n | --program-transform- \
1050 | --program-transform | --program-transfor \
1051 | --program-transfo | --program-transf \
1052 | --program-trans | --program-tran \
1053 | --progr-tra | --program-tr | --program-t)
1054 ac_prev=program_transform_name ;;
1055 -program-transform-name=* | --program-transform-name=* \
1056 | --program-transform-nam=* | --program-transform-na=* \
1057 | --program-transform-n=* | --program-transform-=* \
1058 | --program-transform=* | --program-transfor=* \
1059 | --program-transfo=* | --program-transf=* \
1060 | --program-trans=* | --program-tran=* \
1061 | --progr-tra=* | --program-tr=* | --program-t=*)
1062 program_transform_name=$ac_optarg ;;
1063
1064 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1065 ac_prev=pdfdir ;;
1066 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1067 pdfdir=$ac_optarg ;;
1068
1069 -psdir | --psdir | --psdi | --psd | --ps)
1070 ac_prev=psdir ;;
1071 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1072 psdir=$ac_optarg ;;
1073
1074 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1075 | -silent | --silent | --silen | --sile | --sil)
1076 silent=yes ;;
1077
1078 -runstatedir | --runstatedir | --runstatedi | --runstated \
1079 | --runstate | --runstat | --runsta | --runst | --runs \
1080 | --run | --ru | --r)
1081 ac_prev=runstatedir ;;
1082 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1083 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1084 | --run=* | --ru=* | --r=*)
1085 runstatedir=$ac_optarg ;;
1086
1087 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1088 ac_prev=sbindir ;;
1089 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1090 | --sbi=* | --sb=*)
1091 sbindir=$ac_optarg ;;
1092
1093 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1094 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1095 | --sharedst | --shareds | --shared | --share | --shar \
1096 | --sha | --sh)
1097 ac_prev=sharedstatedir ;;
1098 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1099 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1100 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1101 | --sha=* | --sh=*)
1102 sharedstatedir=$ac_optarg ;;
1103
1104 -site | --site | --sit)
1105 ac_prev=site ;;
1106 -site=* | --site=* | --sit=*)
1107 site=$ac_optarg ;;
1108
1109 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1110 ac_prev=srcdir ;;
1111 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1112 srcdir=$ac_optarg ;;
1113
1114 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1115 | --syscon | --sysco | --sysc | --sys | --sy)
1116 ac_prev=sysconfdir ;;
1117 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1118 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1119 sysconfdir=$ac_optarg ;;
1120
1121 -target | --target | --targe | --targ | --tar | --ta | --t)
1122 ac_prev=target_alias ;;
1123 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1124 target_alias=$ac_optarg ;;
1125
1126 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1127 verbose=yes ;;
1128
1129 -version | --version | --versio | --versi | --vers | -V)
1130 ac_init_version=: ;;
1131
1132 -with-* | --with-*)
1133 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1134 # Reject names that are not valid shell variable names.
1135 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1136 as_fn_error $? "invalid package name: '$ac_useropt'"
1137 ac_useropt_orig=$ac_useropt
1138 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1139 case $ac_user_opts in
1140 *"
1141 "with_$ac_useropt"
1142 "*) ;;
1143 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1144 ac_unrecognized_sep=', ';;
1145 esac
1146 eval with_$ac_useropt=\$ac_optarg ;;
1147
1148 -without-* | --without-*)
1149 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1150 # Reject names that are not valid shell variable names.
1151 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1152 as_fn_error $? "invalid package name: '$ac_useropt'"
1153 ac_useropt_orig=$ac_useropt
1154 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1155 case $ac_user_opts in
1156 *"
1157 "with_$ac_useropt"
1158 "*) ;;
1159 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1160 ac_unrecognized_sep=', ';;
1161 esac
1162 eval with_$ac_useropt=no ;;
1163
1164 --x)
1165 # Obsolete; use --with-x.
1166 with_x=yes ;;
1167
1168 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1169 | --x-incl | --x-inc | --x-in | --x-i)
1170 ac_prev=x_includes ;;
1171 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1172 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1173 x_includes=$ac_optarg ;;
1174
1175 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1176 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1177 ac_prev=x_libraries ;;
1178 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1179 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1180 x_libraries=$ac_optarg ;;
1181
1182 -*) as_fn_error $? "unrecognized option: '$ac_option'
1183 Try '$0 --help' for more information"
1184 ;;
1185
1186 *=*)
1187 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1188 # Reject names that are not valid shell variable names.
1189 case $ac_envvar in #(
1190 '' | [0-9]* | *[!_$as_cr_alnum]* )
1191 as_fn_error $? "invalid variable name: '$ac_envvar'" ;;
1192 esac
1193 eval $ac_envvar=\$ac_optarg
1194 export $ac_envvar ;;
1195
1196 *)
1197 # FIXME: should be removed in autoconf 3.0.
1198 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
1199 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1200 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
1201 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1202 ;;
1203
1204 esac
1205 done
1206
1207 if test -n "$ac_prev"; then
1208 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1209 as_fn_error $? "missing argument to $ac_option"
1210 fi
1211
1212 if test -n "$ac_unrecognized_opts"; then
1213 case $enable_option_checking in
1214 no) ;;
1215 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1216 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1217 esac
1218 fi
1219
1220 # Check all directory arguments for consistency.
1221 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1222 datadir sysconfdir sharedstatedir localstatedir includedir \
1223 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1224 libdir localedir mandir runstatedir
1225 do
1226 eval ac_val=\$$ac_var
1227 # Remove trailing slashes.
1228 case $ac_val in
1229 */ )
1230 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1231 eval $ac_var=\$ac_val;;
1232 esac
1233 # Be sure to have absolute directory names.
1234 case $ac_val in
1235 [\\/$]* | ?:[\\/]* ) continue;;
1236 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1237 esac
1238 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1239 done
1240
1241 # There might be people who depend on the old broken behavior: '$host'
1242 # used to hold the argument of --host etc.
1243 # FIXME: To remove some day.
1244 build=$build_alias
1245 host=$host_alias
1246 target=$target_alias
1247
1248 # FIXME: To remove some day.
1249 if test "x$host_alias" != x; then
1250 if test "x$build_alias" = x; then
1251 cross_compiling=maybe
1252 elif test "x$build_alias" != "x$host_alias"; then
1253 cross_compiling=yes
1254 fi
1255 fi
1256
1257 ac_tool_prefix=
1258 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1259
1260 test "$silent" = yes && exec 6>/dev/null
1261
1262
1263 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1264 ac_ls_di=`ls -di .` &&
1265 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1266 as_fn_error $? "working directory cannot be determined"
1267 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1268 as_fn_error $? "pwd does not report name of working directory"
1269
1270
1271 # Find the source files, if location was not specified.
1272 if test -z "$srcdir"; then
1273 ac_srcdir_defaulted=yes
1274 # Try the directory containing this script, then the parent directory.
1275 ac_confdir=`$as_dirname -- "$as_myself" ||
1276 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1277 X"$as_myself" : 'X\(//\)[^/]' \| \
1278 X"$as_myself" : 'X\(//\)$' \| \
1279 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1280 printf "%s\n" X"$as_myself" |
1281 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1282 s//\1/
1283 q
1284 }
1285 /^X\(\/\/\)[^/].*/{
1286 s//\1/
1287 q
1288 }
1289 /^X\(\/\/\)$/{
1290 s//\1/
1291 q
1292 }
1293 /^X\(\/\).*/{
1294 s//\1/
1295 q
1296 }
1297 s/.*/./; q'`
1298 srcdir=$ac_confdir
1299 if test ! -r "$srcdir/$ac_unique_file"; then
1300 srcdir=..
1301 fi
1302 else
1303 ac_srcdir_defaulted=no
1304 fi
1305 if test ! -r "$srcdir/$ac_unique_file"; then
1306 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1307 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1308 fi
1309 ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work"
1310 ac_abs_confdir=`(
1311 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1312 pwd)`
1313 # When building in place, set srcdir=.
1314 if test "$ac_abs_confdir" = "$ac_pwd"; then
1315 srcdir=.
1316 fi
1317 # Remove unnecessary trailing slashes from srcdir.
1318 # Double slashes in file names in object file debugging info
1319 # mess up M-x gdb in Emacs.
1320 case $srcdir in
1321 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1322 esac
1323 for ac_var in $ac_precious_vars; do
1324 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1325 eval ac_env_${ac_var}_value=\$${ac_var}
1326 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1327 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1328 done
1329
1330 #
1331 # Report the --help message.
1332 #
1333 if test "$ac_init_help" = "long"; then
1334 # Omit some internal or obsolete options to make the list less imposing.
1335 # This message is too long to be a string in the A/UX 3.1 sh.
1336 cat <<_ACEOF
1337 'configure' configures GAP 4.16.0 to adapt to many kinds of systems.
1338
1339 Usage: $0 [OPTION]... [VAR=VALUE]...
1340
1341 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1342 VAR=VALUE. See below for descriptions of some of the useful variables.
1343
1344 Defaults for the options are specified in brackets.
1345
1346 Configuration:
1347 -h, --help display this help and exit
1348 --help=short display options specific to this package
1349 --help=recursive display the short help of all the included packages
1350 -V, --version display version information and exit
1351 -q, --quiet, --silent do not print 'checking ...' messages
1352 --cache-file=FILE cache test results in FILE [disabled]
1353 -C, --config-cache alias for '--cache-file=config.cache'
1354 -n, --no-create do not create output files
1355 --srcdir=DIR find the sources in DIR [configure dir or '..']
1356
1357 Installation directories:
1358 --prefix=PREFIX install architecture-independent files in PREFIX
1359 [$ac_default_prefix]
1360 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1361 [PREFIX]
1362
1363 By default, 'make install' will install all the files in
1364 '$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify
1365 an installation prefix other than '$ac_default_prefix' using '--prefix',
1366 for instance '--prefix=\$HOME'.
1367
1368 For better control, use the options below.
1369
1370 Fine tuning of the installation directories:
1371 --bindir=DIR user executables [EPREFIX/bin]
1372 --sbindir=DIR system admin executables [EPREFIX/sbin]
1373 --libexecdir=DIR program executables [EPREFIX/libexec]
1374 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1375 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1376 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1377 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
1378 --libdir=DIR object code libraries [EPREFIX/lib]
1379 --includedir=DIR C header files [PREFIX/include]
1380 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1381 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1382 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1383 --infodir=DIR info documentation [DATAROOTDIR/info]
1384 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1385 --mandir=DIR man documentation [DATAROOTDIR/man]
1386 --docdir=DIR documentation root [DATAROOTDIR/doc/gap-4.16.0]
1387 --htmldir=DIR html documentation [DOCDIR]
1388 --dvidir=DIR dvi documentation [DOCDIR]
1389 --pdfdir=DIR pdf documentation [DOCDIR]
1390 --psdir=DIR ps documentation [DOCDIR]
1391 _ACEOF
1392
1393 cat <<\_ACEOF
1394
1395 System types:
1396 --build=BUILD configure for building on BUILD [guessed]
1397 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1398 _ACEOF
1399 fi
1400
1401 if test -n "$ac_init_help"; then
1402 case $ac_init_help in
1403 short | recursive ) echo "Configuration of GAP 4.16.0:";;
1404 esac
1405 cat <<\_ACEOF
1406
1407 Optional Features:
1408 --disable-option-checking ignore unrecognized --enable/--with options
1409 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1410 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1411 --enable-hpcgap enable HPC-GAP
1412 --enable-native-tls use native thread-local storage implementation
1413 --enable-debug enable debug mode
1414 --disable-maintainer-mode
1415 disable maintainer mode
1416 --enable-memory-checking
1417 enable memory checking
1418 --enable-valgrind enable valgrind extensions to GASMAN
1419 --enable-Werror treat compiler warnings as errors
1420 --enable-popcnt use __builtin_popcountl if available
1421 --disable-largefile omit support for large files
1422 --enable-year2038 support timestamps after 2038
1423
1424 Optional Packages:
1425 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1426 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1427 --with-gc[=default|gasman|boehm|julia]
1428 specify which garbage collector to use (default:
1429 gasman; for HPC-GAP: boehm)
1430 --with-julia[=PATH] specify a julia binary or a prefix for a julia
1431 binary
1432 --with-gmp[=builtin|PREFIX]
1433 prefix of GMP installation. e.g. /usr/local; specify
1434 `builtin' to let GAP builds its own version of GMP
1435 --with-zlib[=builtin|PREFIX]
1436 prefix of zlib installation. e.g. /usr/local;
1437 specify `builtin' to let GAP builds its own version
1438 of zlib
1439 --with-readline[=PREFIX]
1440 support fancy command line editing via GNU readline;
1441 optionally specify a prefix where it can be found
1442
1443 Some influential environment variables:
1444 CC C compiler command
1445 CFLAGS C compiler flags
1446 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1447 nonstandard directory <lib dir>
1448 LIBS libraries to pass to the linker, e.g. -l<library>
1449 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1450 you have headers in a nonstandard directory <include dir>
1451 CXX C++ compiler command
1452 CXXFLAGS C++ compiler flags
1453 ABI Set this equal to 32 or 64 to build GAP (and GMP provided you do
1454 not deselect it) in 32- or 64-bit mode. The default value for
1455 this option is determined by testing the behaviour of your
1456 compiler, so should be 32 on a 32-bit system and 64 on one which
1457 is 64-bit. If this is unset, the build system will set a value
1458 of 64 or 32 depending of the pointer size of the host.
1459 CPP C preprocessor
1460
1461 Use these variables to override the choices made by 'configure' or to help
1462 it to find libraries and programs with nonstandard names/locations.
1463
1464 Report bugs to <[email protected]>.
1465 GAP home page: <https://www.gap-system.org/>.
1466 _ACEOF
1467 ac_status=$?
1468 fi
1469
1470 if test "$ac_init_help" = "recursive"; then
1471 # If there are subdirs, report their specific --help.
1472 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1473 test -d "$ac_dir" ||
1474 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1475 continue
1476 ac_builddir=.
1477
1478 case "$ac_dir" in
1479 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1480 *)
1481 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
1482 # A ".." for each directory in $ac_dir_suffix.
1483 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1484 case $ac_top_builddir_sub in
1485 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1486 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1487 esac ;;
1488 esac
1489 ac_abs_top_builddir=$ac_pwd
1490 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1491 # for backward compatibility:
1492 ac_top_builddir=$ac_top_build_prefix
1493
1494 case $srcdir in
1495 .) # We are building in place.
1496 ac_srcdir=.
1497 ac_top_srcdir=$ac_top_builddir_sub
1498 ac_abs_top_srcdir=$ac_pwd ;;
1499 [\\/]* | ?:[\\/]* ) # Absolute name.
1500 ac_srcdir=$srcdir$ac_dir_suffix;
1501 ac_top_srcdir=$srcdir
1502 ac_abs_top_srcdir=$srcdir ;;
1503 *) # Relative name.
1504 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1505 ac_top_srcdir=$ac_top_build_prefix$srcdir
1506 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1507 esac
1508 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1509
1510 cd "$ac_dir" || { ac_status=$?; continue; }
1511 # Check for configure.gnu first; this name is used for a wrapper for
1512 # Metaconfig's "Configure" on case-insensitive file systems.
1513 if test -f "$ac_srcdir/configure.gnu"; then
1514 echo &&
1515 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1516 elif test -f "$ac_srcdir/configure"; then
1517 echo &&
1518 $SHELL "$ac_srcdir/configure" --help=recursive
1519 else
1520 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1521 fi || ac_status=$?
1522 cd "$ac_pwd" || { ac_status=$?; break; }
1523 done
1524 fi
1525
1526 test -n "$ac_init_help" && exit $ac_status
1527 if $ac_init_version; then
1528 cat <<\_ACEOF
1529 GAP configure 4.16.0
1530 generated by GNU Autoconf 2.72
1531
1532 Copyright (C) 2023 Free Software Foundation, Inc.
1533 This configure script is free software; the Free Software Foundation
1534 gives unlimited permission to copy, distribute and modify it.
1535 _ACEOF
1536 exit
1537 fi
1538
1539 ## ------------------------ ##
1540 ## Autoconf initialization. ##
1541 ## ------------------------ ##
1542
1543 # ac_fn_c_try_compile LINENO
1544 # --------------------------
1545 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1546 ac_fn_c_try_compile ()
1547 {
1548 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1549 rm -f conftest.$ac_objext conftest.beam
1550 if { { ac_try="$ac_compile"
1551 case "(($ac_try" in
1552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1553 *) ac_try_echo=$ac_try;;
1554 esac
1555 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1556 printf "%s\n" "$ac_try_echo"; } >&5
1557 (eval "$ac_compile") 2>conftest.err
1558 ac_status=$?
1559 if test -s conftest.err; then
1560 grep -v '^ *+' conftest.err >conftest.er1
1561 cat conftest.er1 >&5
1562 mv -f conftest.er1 conftest.err
1563 fi
1564 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1565 test $ac_status = 0; } && {
1566 test -z "$ac_c_werror_flag" ||
1567 test ! -s conftest.err
1568 } && test -s conftest.$ac_objext
1569 then :
1570 ac_retval=0
1571 else case e in #(
1572 e) printf "%s\n" "$as_me: failed program was:" >&5
1573 sed 's/^/| /' conftest.$ac_ext >&5
1574
1575 ac_retval=1 ;;
1576 esac
1577 fi
1578 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1579 as_fn_set_status $ac_retval
1580
1581 } # ac_fn_c_try_compile
1582
1583 # ac_fn_cxx_try_compile LINENO
1584 # ----------------------------
1585 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1586 ac_fn_cxx_try_compile ()
1587 {
1588 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1589 rm -f conftest.$ac_objext conftest.beam
1590 if { { ac_try="$ac_compile"
1591 case "(($ac_try" in
1592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1593 *) ac_try_echo=$ac_try;;
1594 esac
1595 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1596 printf "%s\n" "$ac_try_echo"; } >&5
1597 (eval "$ac_compile") 2>conftest.err
1598 ac_status=$?
1599 if test -s conftest.err; then
1600 grep -v '^ *+' conftest.err >conftest.er1
1601 cat conftest.er1 >&5
1602 mv -f conftest.er1 conftest.err
1603 fi
1604 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1605 test $ac_status = 0; } && {
1606 test -z "$ac_cxx_werror_flag" ||
1607 test ! -s conftest.err
1608 } && test -s conftest.$ac_objext
1609 then :
1610 ac_retval=0
1611 else case e in #(
1612 e) printf "%s\n" "$as_me: failed program was:" >&5
1613 sed 's/^/| /' conftest.$ac_ext >&5
1614
1615 ac_retval=1 ;;
1616 esac
1617 fi
1618 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1619 as_fn_set_status $ac_retval
1620
1621 } # ac_fn_cxx_try_compile
1622
1623 # ac_fn_c_try_link LINENO
1624 # -----------------------
1625 # Try to link conftest.$ac_ext, and return whether this succeeded.
1626 ac_fn_c_try_link ()
1627 {
1628 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1629 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
1630 if { { ac_try="$ac_link"
1631 case "(($ac_try" in
1632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1633 *) ac_try_echo=$ac_try;;
1634 esac
1635 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1636 printf "%s\n" "$ac_try_echo"; } >&5
1637 (eval "$ac_link") 2>conftest.err
1638 ac_status=$?
1639 if test -s conftest.err; then
1640 grep -v '^ *+' conftest.err >conftest.er1
1641 cat conftest.er1 >&5
1642 mv -f conftest.er1 conftest.err
1643 fi
1644 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1645 test $ac_status = 0; } && {
1646 test -z "$ac_c_werror_flag" ||
1647 test ! -s conftest.err
1648 } && test -s conftest$ac_exeext && {
1649 test "$cross_compiling" = yes ||
1650 test -x conftest$ac_exeext
1651 }
1652 then :
1653 ac_retval=0
1654 else case e in #(
1655 e) printf "%s\n" "$as_me: failed program was:" >&5
1656 sed 's/^/| /' conftest.$ac_ext >&5
1657
1658 ac_retval=1 ;;
1659 esac
1660 fi
1661 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1662 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1663 # interfere with the next link command; also delete a directory that is
1664 # left behind by Apple's compiler. We do this before executing the actions.
1665 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1666 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1667 as_fn_set_status $ac_retval
1668
1669 } # ac_fn_c_try_link
1670
1671 # ac_fn_c_try_run LINENO
1672 # ----------------------
1673 # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
1674 # executables *can* be run.
1675 ac_fn_c_try_run ()
1676 {
1677 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1678 if { { ac_try="$ac_link"
1679 case "(($ac_try" in
1680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1681 *) ac_try_echo=$ac_try;;
1682 esac
1683 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1684 printf "%s\n" "$ac_try_echo"; } >&5
1685 (eval "$ac_link") 2>&5
1686 ac_status=$?
1687 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1688 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1689 { { case "(($ac_try" in
1690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1691 *) ac_try_echo=$ac_try;;
1692 esac
1693 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1694 printf "%s\n" "$ac_try_echo"; } >&5
1695 (eval "$ac_try") 2>&5
1696 ac_status=$?
1697 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1698 test $ac_status = 0; }; }
1699 then :
1700 ac_retval=0
1701 else case e in #(
1702 e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5
1703 printf "%s\n" "$as_me: failed program was:" >&5
1704 sed 's/^/| /' conftest.$ac_ext >&5
1705
1706 ac_retval=$ac_status ;;
1707 esac
1708 fi
1709 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1710 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1711 as_fn_set_status $ac_retval
1712
1713 } # ac_fn_c_try_run
1714
1715 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1716 # --------------------------------------------
1717 # Tries to find the compile-time value of EXPR in a program that includes
1718 # INCLUDES, setting VAR accordingly. Returns whether the value could be
1719 # computed
1720 ac_fn_c_compute_int ()
1721 {
1722 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1723 if test "$cross_compiling" = yes; then
1724 # Depending upon the size, compute the lo and hi bounds.
1725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1726 /* end confdefs.h. */
1727 $4
1728 int
1729 main (void)
1730 {
1731 static int test_array [1 - 2 * !(($2) >= 0)];
1732 test_array [0] = 0;
1733 return test_array [0];
1734
1735 ;
1736 return 0;
1737 }
1738 _ACEOF
1739 if ac_fn_c_try_compile "$LINENO"
1740 then :
1741 ac_lo=0 ac_mid=0
1742 while :; do
1743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1744 /* end confdefs.h. */
1745 $4
1746 int
1747 main (void)
1748 {
1749 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1750 test_array [0] = 0;
1751 return test_array [0];
1752
1753 ;
1754 return 0;
1755 }
1756 _ACEOF
1757 if ac_fn_c_try_compile "$LINENO"
1758 then :
1759 ac_hi=$ac_mid; break
1760 else case e in #(
1761 e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1762 if test $ac_lo -le $ac_mid; then
1763 ac_lo= ac_hi=
1764 break
1765 fi
1766 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;;
1767 esac
1768 fi
1769 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1770 done
1771 else case e in #(
1772 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1773 /* end confdefs.h. */
1774 $4
1775 int
1776 main (void)
1777 {
1778 static int test_array [1 - 2 * !(($2) < 0)];
1779 test_array [0] = 0;
1780 return test_array [0];
1781
1782 ;
1783 return 0;
1784 }
1785 _ACEOF
1786 if ac_fn_c_try_compile "$LINENO"
1787 then :
1788 ac_hi=-1 ac_mid=-1
1789 while :; do
1790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1791 /* end confdefs.h. */
1792 $4
1793 int
1794 main (void)
1795 {
1796 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
1797 test_array [0] = 0;
1798 return test_array [0];
1799
1800 ;
1801 return 0;
1802 }
1803 _ACEOF
1804 if ac_fn_c_try_compile "$LINENO"
1805 then :
1806 ac_lo=$ac_mid; break
1807 else case e in #(
1808 e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1809 if test $ac_mid -le $ac_hi; then
1810 ac_lo= ac_hi=
1811 break
1812 fi
1813 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;;
1814 esac
1815 fi
1816 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1817 done
1818 else case e in #(
1819 e) ac_lo= ac_hi= ;;
1820 esac
1821 fi
1822 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
1823 esac
1824 fi
1825 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1826 # Binary search between lo and hi bounds.
1827 while test "x$ac_lo" != "x$ac_hi"; do
1828 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1830 /* end confdefs.h. */
1831 $4
1832 int
1833 main (void)
1834 {
1835 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1836 test_array [0] = 0;
1837 return test_array [0];
1838
1839 ;
1840 return 0;
1841 }
1842 _ACEOF
1843 if ac_fn_c_try_compile "$LINENO"
1844 then :
1845 ac_hi=$ac_mid
1846 else case e in #(
1847 e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;;
1848 esac
1849 fi
1850 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1851 done
1852 case $ac_lo in #((
1853 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
1854 '') ac_retval=1 ;;
1855 esac
1856 else
1857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1858 /* end confdefs.h. */
1859 $4
1860 static long int longval (void) { return $2; }
1861 static unsigned long int ulongval (void) { return $2; }
1862 #include <stdio.h>
1863 #include <stdlib.h>
1864 int
1865 main (void)
1866 {
1867
1868 FILE *f = fopen ("conftest.val", "w");
1869 if (! f)
1870 return 1;
1871 if (($2) < 0)
1872 {
1873 long int i = longval ();
1874 if (i != ($2))
1875 return 1;
1876 fprintf (f, "%ld", i);
1877 }
1878 else
1879 {
1880 unsigned long int i = ulongval ();
1881 if (i != ($2))
1882 return 1;
1883 fprintf (f, "%lu", i);
1884 }
1885 /* Do not output a trailing newline, as this causes \r\n confusion
1886 on some platforms. */
1887 return ferror (f) || fclose (f) != 0;
1888
1889 ;
1890 return 0;
1891 }
1892 _ACEOF
1893 if ac_fn_c_try_run "$LINENO"
1894 then :
1895 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
1896 else case e in #(
1897 e) ac_retval=1 ;;
1898 esac
1899 fi
1900 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1901 conftest.$ac_objext conftest.beam conftest.$ac_ext
1902 rm -f conftest.val
1903
1904 fi
1905 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1906 as_fn_set_status $ac_retval
1907
1908 } # ac_fn_c_compute_int
1909
1910 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1911 # -------------------------------------------------------
1912 # Tests whether HEADER exists and can be compiled using the include files in
1913 # INCLUDES, setting the cache variable VAR accordingly.
1914 ac_fn_c_check_header_compile ()
1915 {
1916 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1918 printf %s "checking for $2... " >&6; }
1919 if eval test \${$3+y}
1920 then :
1921 printf %s "(cached) " >&6
1922 else case e in #(
1923 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1924 /* end confdefs.h. */
1925 $4
1926 #include <$2>
1927 _ACEOF
1928 if ac_fn_c_try_compile "$LINENO"
1929 then :
1930 eval "$3=yes"
1931 else case e in #(
1932 e) eval "$3=no" ;;
1933 esac
1934 fi
1935 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
1936 esac
1937 fi
1938 eval ac_res=\$$3
1939 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1940 printf "%s\n" "$ac_res" >&6; }
1941 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1942
1943 } # ac_fn_c_check_header_compile
1944
1945 # ac_fn_c_check_func LINENO FUNC VAR
1946 # ----------------------------------
1947 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1948 ac_fn_c_check_func ()
1949 {
1950 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1952 printf %s "checking for $2... " >&6; }
1953 if eval test \${$3+y}
1954 then :
1955 printf %s "(cached) " >&6
1956 else case e in #(
1957 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1958 /* end confdefs.h. */
1959 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1960 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1961 #define $2 innocuous_$2
1962
1963 /* System header to define __stub macros and hopefully few prototypes,
1964 which can conflict with char $2 (void); below. */
1965
1966 #include <limits.h>
1967 #undef $2
1968
1969 /* Override any GCC internal prototype to avoid an error.
1970 Use char because int might match the return type of a GCC
1971 builtin and then its argument prototype would still apply. */
1972 #ifdef __cplusplus
1973 extern "C"
1974 #endif
1975 char $2 (void);
1976 /* The GNU C library defines this for functions which it implements
1977 to always fail with ENOSYS. Some functions are actually named
1978 something starting with __ and the normal name is an alias. */
1979 #if defined __stub_$2 || defined __stub___$2
1980 choke me
1981 #endif
1982
1983 int
1984 main (void)
1985 {
1986 return $2 ();
1987 ;
1988 return 0;
1989 }
1990 _ACEOF
1991 if ac_fn_c_try_link "$LINENO"
1992 then :
1993 eval "$3=yes"
1994 else case e in #(
1995 e) eval "$3=no" ;;
1996 esac
1997 fi
1998 rm -f core conftest.err conftest.$ac_objext conftest.beam \
1999 conftest$ac_exeext conftest.$ac_ext ;;
2000 esac
2001 fi
2002 eval ac_res=\$$3
2003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2004 printf "%s\n" "$ac_res" >&6; }
2005 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2006
2007 } # ac_fn_c_check_func
2008
2009 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2010 # -------------------------------------------
2011 # Tests whether TYPE exists after having included INCLUDES, setting cache
2012 # variable VAR accordingly.
2013 ac_fn_c_check_type ()
2014 {
2015 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2017 printf %s "checking for $2... " >&6; }
2018 if eval test \${$3+y}
2019 then :
2020 printf %s "(cached) " >&6
2021 else case e in #(
2022 e) eval "$3=no"
2023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2024 /* end confdefs.h. */
2025 $4
2026 int
2027 main (void)
2028 {
2029 if (sizeof ($2))
2030 return 0;
2031 ;
2032 return 0;
2033 }
2034 _ACEOF
2035 if ac_fn_c_try_compile "$LINENO"
2036 then :
2037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2038 /* end confdefs.h. */
2039 $4
2040 int
2041 main (void)
2042 {
2043 if (sizeof (($2)))
2044 return 0;
2045 ;
2046 return 0;
2047 }
2048 _ACEOF
2049 if ac_fn_c_try_compile "$LINENO"
2050 then :
2051
2052 else case e in #(
2053 e) eval "$3=yes" ;;
2054 esac
2055 fi
2056 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2057 fi
2058 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
2059 esac
2060 fi
2061 eval ac_res=\$$3
2062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2063 printf "%s\n" "$ac_res" >&6; }
2064 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2065
2066 } # ac_fn_c_check_type
2067
2068 # ac_fn_c_try_cpp LINENO
2069 # ----------------------
2070 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2071 ac_fn_c_try_cpp ()
2072 {
2073 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2074 if { { ac_try="$ac_cpp conftest.$ac_ext"
2075 case "(($ac_try" in
2076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2077 *) ac_try_echo=$ac_try;;
2078 esac
2079 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2080 printf "%s\n" "$ac_try_echo"; } >&5
2081 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2082 ac_status=$?
2083 if test -s conftest.err; then
2084 grep -v '^ *+' conftest.err >conftest.er1
2085 cat conftest.er1 >&5
2086 mv -f conftest.er1 conftest.err
2087 fi
2088 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2089 test $ac_status = 0; } > conftest.i && {
2090 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2091 test ! -s conftest.err
2092 }
2093 then :
2094 ac_retval=0
2095 else case e in #(
2096 e) printf "%s\n" "$as_me: failed program was:" >&5
2097 sed 's/^/| /' conftest.$ac_ext >&5
2098
2099 ac_retval=1 ;;
2100 esac
2101 fi
2102 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2103 as_fn_set_status $ac_retval
2104
2105 } # ac_fn_c_try_cpp
2106 ac_configure_args_raw=
2107 for ac_arg
2108 do
2109 case $ac_arg in
2110 *\'*)
2111 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2112 esac
2113 as_fn_append ac_configure_args_raw " '$ac_arg'"
2114 done
2115
2116 case $ac_configure_args_raw in
2117 *$as_nl*)
2118 ac_safe_unquote= ;;
2119 *)
2120 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
2121 ac_unsafe_a="$ac_unsafe_z#~"
2122 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2123 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2124 esac
2125
2126 cat >config.log <<_ACEOF
2127 This file contains any messages produced by compilers while
2128 running configure, to aid debugging if configure makes a mistake.
2129
2130 It was created by GAP $as_me 4.16.0, which was
2131 generated by GNU Autoconf 2.72. Invocation command line was
2132
2133 $ $0$ac_configure_args_raw
2134
2135 _ACEOF
2136 exec 5>>config.log
2137 {
2138 cat <<_ASUNAME
2139 ## --------- ##
2140 ## Platform. ##
2141 ## --------- ##
2142
2143 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2144 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2145 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2146 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2147 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2148
2149 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2150 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2151
2152 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2153 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2154 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2155 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2156 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2157 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2158 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2159
2160 _ASUNAME
2161
2162 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2163 for as_dir in $PATH
2164 do
2165 IFS=$as_save_IFS
2166 case $as_dir in #(((
2167 '') as_dir=./ ;;
2168 */) ;;
2169 *) as_dir=$as_dir/ ;;
2170 esac
2171 printf "%s\n" "PATH: $as_dir"
2172 done
2173 IFS=$as_save_IFS
2174
2175 } >&5
2176
2177 cat >&5 <<_ACEOF
2178
2179
2180 ## ----------- ##
2181 ## Core tests. ##
2182 ## ----------- ##
2183
2184 _ACEOF
2185
2186
2187 # Keep a trace of the command line.
2188 # Strip out --no-create and --no-recursion so they do not pile up.
2189 # Strip out --silent because we don't want to record it for future runs.
2190 # Also quote any args containing shell meta-characters.
2191 # Make two passes to allow for proper duplicate-argument suppression.
2192 ac_configure_args=
2193 ac_configure_args0=
2194 ac_configure_args1=
2195 ac_must_keep_next=false
2196 for ac_pass in 1 2
2197 do
2198 for ac_arg
2199 do
2200 case $ac_arg in
2201 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2202 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2203 | -silent | --silent | --silen | --sile | --sil)
2204 continue ;;
2205 *\'*)
2206 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2207 esac
2208 case $ac_pass in
2209 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2210 2)
2211 as_fn_append ac_configure_args1 " '$ac_arg'"
2212 if test $ac_must_keep_next = true; then
2213 ac_must_keep_next=false # Got value, back to normal.
2214 else
2215 case $ac_arg in
2216 *=* | --config-cache | -C | -disable-* | --disable-* \
2217 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2218 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2219 | -with-* | --with-* | -without-* | --without-* | --x)
2220 case "$ac_configure_args0 " in
2221 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2222 esac
2223 ;;
2224 -* ) ac_must_keep_next=true ;;
2225 esac
2226 fi
2227 as_fn_append ac_configure_args " '$ac_arg'"
2228 ;;
2229 esac
2230 done
2231 done
2232 { ac_configure_args0=; unset ac_configure_args0;}
2233 { ac_configure_args1=; unset ac_configure_args1;}
2234
2235 # When interrupted or exit'd, cleanup temporary files, and complete
2236 # config.log. We remove comments because anyway the quotes in there
2237 # would cause problems or look ugly.
2238 # WARNING: Use '\'' to represent an apostrophe within the trap.
2239 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2240 trap 'exit_status=$?
2241 # Sanitize IFS.
2242 IFS=" "" $as_nl"
2243 # Save into config.log some information that might help in debugging.
2244 {
2245 echo
2246
2247 printf "%s\n" "## ---------------- ##
2248 ## Cache variables. ##
2249 ## ---------------- ##"
2250 echo
2251 # The following way of writing the cache mishandles newlines in values,
2252 (
2253 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2254 eval ac_val=\$$ac_var
2255 case $ac_val in #(
2256 *${as_nl}*)
2257 case $ac_var in #(
2258 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2259 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2260 esac
2261 case $ac_var in #(
2262 _ | IFS | as_nl) ;; #(
2263 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2264 *) { eval $ac_var=; unset $ac_var;} ;;
2265 esac ;;
2266 esac
2267 done
2268 (set) 2>&1 |
2269 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2270 *${as_nl}ac_space=\ *)
2271 sed -n \
2272 "s/'\''/'\''\\\\'\'''\''/g;
2273 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2274 ;; #(
2275 *)
2276 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2277 ;;
2278 esac |
2279 sort
2280 )
2281 echo
2282
2283 printf "%s\n" "## ----------------- ##
2284 ## Output variables. ##
2285 ## ----------------- ##"
2286 echo
2287 for ac_var in $ac_subst_vars
2288 do
2289 eval ac_val=\$$ac_var
2290 case $ac_val in
2291 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2292 esac
2293 printf "%s\n" "$ac_var='\''$ac_val'\''"
2294 done | sort
2295 echo
2296
2297 if test -n "$ac_subst_files"; then
2298 printf "%s\n" "## ------------------- ##
2299 ## File substitutions. ##
2300 ## ------------------- ##"
2301 echo
2302 for ac_var in $ac_subst_files
2303 do
2304 eval ac_val=\$$ac_var
2305 case $ac_val in
2306 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2307 esac
2308 printf "%s\n" "$ac_var='\''$ac_val'\''"
2309 done | sort
2310 echo
2311 fi
2312
2313 if test -s confdefs.h; then
2314 printf "%s\n" "## ----------- ##
2315 ## confdefs.h. ##
2316 ## ----------- ##"
2317 echo
2318 cat confdefs.h
2319 echo
2320 fi
2321 test "$ac_signal" != 0 &&
2322 printf "%s\n" "$as_me: caught signal $ac_signal"
2323 printf "%s\n" "$as_me: exit $exit_status"
2324 } >&5
2325 rm -f core *.core core.conftest.* &&
2326 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2327 exit $exit_status
2328 ' 0
2329 for ac_signal in 1 2 13 15; do
2330 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2331 done
2332 ac_signal=0
2333
2334 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2335 rm -f -r conftest* confdefs.h
2336
2337 printf "%s\n" "/* confdefs.h */" > confdefs.h
2338
2339 # Predefined preprocessor variables.
2340
2341 printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
2342
2343 printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
2344
2345 printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
2346
2347 printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
2348
2349 printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
2350
2351 printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
2352
2353
2354 # Let the site file select an alternate cache file if it wants to.
2355 # Prefer an explicitly selected file to automatically selected ones.
2356 if test -n "$CONFIG_SITE"; then
2357 ac_site_files="$CONFIG_SITE"
2358 elif test "x$prefix" != xNONE; then
2359 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
2360 else
2361 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
2362 fi
2363
2364 for ac_site_file in $ac_site_files
2365 do
2366 case $ac_site_file in #(
2367 */*) :
2368 ;; #(
2369 *) :
2370 ac_site_file=./$ac_site_file ;;
2371 esac
2372 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2374 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
2375 sed 's/^/| /' "$ac_site_file" >&5
2376 . "$ac_site_file" \
2377 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
2378 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
2379 as_fn_error $? "failed to load site script $ac_site_file
2380 See 'config.log' for more details" "$LINENO" 5; }
2381 fi
2382 done
2383
2384 if test -r "$cache_file"; then
2385 # Some versions of bash will fail to source /dev/null (special files
2386 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2387 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2389 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
2390 case $cache_file in
2391 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2392 *) . "./$cache_file";;
2393 esac
2394 fi
2395 else
2396 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2397 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
2398 >$cache_file
2399 fi
2400
2401 # Test code for whether the C compiler supports C89 (global declarations)
2402 ac_c_conftest_c89_globals='
2403 /* Does the compiler advertise C89 conformance?
2404 Do not test the value of __STDC__, because some compilers set it to 0
2405 while being otherwise adequately conformant. */
2406 #if !defined __STDC__
2407 # error "Compiler does not advertise C89 conformance"
2408 #endif
2409
2410 #include <stddef.h>
2411 #include <stdarg.h>
2412 struct stat;
2413 /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
2414 struct buf { int x; };
2415 struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2416 static char *e (char **p, int i)
2417 {
2418 return p[i];
2419 }
2420 static char *f (char * (*g) (char **, int), char **p, ...)
2421 {
2422 char *s;
2423 va_list v;
2424 va_start (v,p);
2425 s = g (p, va_arg (v,int));
2426 va_end (v);
2427 return s;
2428 }
2429
2430 /* C89 style stringification. */
2431 #define noexpand_stringify(a) #a
2432 const char *stringified = noexpand_stringify(arbitrary+token=sequence);
2433
2434 /* C89 style token pasting. Exercises some of the corner cases that
2435 e.g. old MSVC gets wrong, but not very hard. */
2436 #define noexpand_concat(a,b) a##b
2437 #define expand_concat(a,b) noexpand_concat(a,b)
2438 extern int vA;
2439 extern int vbee;
2440 #define aye A
2441 #define bee B
2442 int *pvA = &expand_concat(v,aye);
2443 int *pvbee = &noexpand_concat(v,bee);
2444
2445 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2446 function prototypes and stuff, but not \xHH hex character constants.
2447 These do not provoke an error unfortunately, instead are silently treated
2448 as an "x". The following induces an error, until -std is added to get
2449 proper ANSI mode. Curiously \x00 != x always comes out true, for an
2450 array size at least. It is necessary to write \x00 == 0 to get something
2451 that is true only with -std. */
2452 int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2453
2454 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2455 inside strings and character constants. */
2456 #define FOO(x) '\''x'\''
2457 int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
2458
2459 int test (int i, double x);
2460 struct s1 {int (*f) (int a);};
2461 struct s2 {int (*f) (double a);};
2462 int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2463 int, int);'
2464
2465 # Test code for whether the C compiler supports C89 (body of main).
2466 ac_c_conftest_c89_main='
2467 ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2468 '
2469
2470 # Test code for whether the C compiler supports C99 (global declarations)
2471 ac_c_conftest_c99_globals='
2472 /* Does the compiler advertise C99 conformance? */
2473 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2474 # error "Compiler does not advertise C99 conformance"
2475 #endif
2476
2477 // See if C++-style comments work.
2478
2479 #include <stdbool.h>
2480 extern int puts (const char *);
2481 extern int printf (const char *, ...);
2482 extern int dprintf (int, const char *, ...);
2483 extern void *malloc (size_t);
2484 extern void free (void *);
2485
2486 // Check varargs macros. These examples are taken from C99 6.10.3.5.
2487 // dprintf is used instead of fprintf to avoid needing to declare
2488 // FILE and stderr.
2489 #define debug(...) dprintf (2, __VA_ARGS__)
2490 #define showlist(...) puts (#__VA_ARGS__)
2491 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2492 static void
2493 test_varargs_macros (void)
2494 {
2495 int x = 1234;
2496 int y = 5678;
2497 debug ("Flag");
2498 debug ("X = %d\n", x);
2499 showlist (The first, second, and third items.);
2500 report (x>y, "x is %d but y is %d", x, y);
2501 }
2502
2503 // Check long long types.
2504 #define BIG64 18446744073709551615ull
2505 #define BIG32 4294967295ul
2506 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2507 #if !BIG_OK
2508 #error "your preprocessor is broken"
2509 #endif
2510 #if BIG_OK
2511 #else
2512 #error "your preprocessor is broken"
2513 #endif
2514 static long long int bignum = -9223372036854775807LL;
2515 static unsigned long long int ubignum = BIG64;
2516
2517 struct incomplete_array
2518 {
2519 int datasize;
2520 double data[];
2521 };
2522
2523 struct named_init {
2524 int number;
2525 const wchar_t *name;
2526 double average;
2527 };
2528
2529 typedef const char *ccp;
2530
2531 static inline int
2532 test_restrict (ccp restrict text)
2533 {
2534 // Iterate through items via the restricted pointer.
2535 // Also check for declarations in for loops.
2536 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
2537 continue;
2538 return 0;
2539 }
2540
2541 // Check varargs and va_copy.
2542 static bool
2543 test_varargs (const char *format, ...)
2544 {
2545 va_list args;
2546 va_start (args, format);
2547 va_list args_copy;
2548 va_copy (args_copy, args);
2549
2550 const char *str = "";
2551 int number = 0;
2552 float fnumber = 0;
2553
2554 while (*format)
2555 {
2556 switch (*format++)
2557 {
2558 case '\''s'\'': // string
2559 str = va_arg (args_copy, const char *);
2560 break;
2561 case '\''d'\'': // int
2562 number = va_arg (args_copy, int);
2563 break;
2564 case '\''f'\'': // float
2565 fnumber = va_arg (args_copy, double);
2566 break;
2567 default:
2568 break;
2569 }
2570 }
2571 va_end (args_copy);
2572 va_end (args);
2573
2574 return *str && number && fnumber;
2575 }
2576 '
2577
2578 # Test code for whether the C compiler supports C99 (body of main).
2579 ac_c_conftest_c99_main='
2580 // Check bool.
2581 _Bool success = false;
2582 success |= (argc != 0);
2583
2584 // Check restrict.
2585 if (test_restrict ("String literal") == 0)
2586 success = true;
2587 char *restrict newvar = "Another string";
2588
2589 // Check varargs.
2590 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
2591 test_varargs_macros ();
2592
2593 // Check flexible array members.
2594 struct incomplete_array *ia =
2595 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2596 ia->datasize = 10;
2597 for (int i = 0; i < ia->datasize; ++i)
2598 ia->data[i] = i * 1.234;
2599 // Work around memory leak warnings.
2600 free (ia);
2601
2602 // Check named initializers.
2603 struct named_init ni = {
2604 .number = 34,
2605 .name = L"Test wide string",
2606 .average = 543.34343,
2607 };
2608
2609 ni.number = 58;
2610
2611 int dynamic_array[ni.number];
2612 dynamic_array[0] = argv[0][0];
2613 dynamic_array[ni.number - 1] = 543;
2614
2615 // work around unused variable warnings
2616 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2617 || dynamic_array[ni.number - 1] != 543);
2618 '
2619
2620 # Test code for whether the C compiler supports C11 (global declarations)
2621 ac_c_conftest_c11_globals='
2622 /* Does the compiler advertise C11 conformance? */
2623 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2624 # error "Compiler does not advertise C11 conformance"
2625 #endif
2626
2627 // Check _Alignas.
2628 char _Alignas (double) aligned_as_double;
2629 char _Alignas (0) no_special_alignment;
2630 extern char aligned_as_int;
2631 char _Alignas (0) _Alignas (int) aligned_as_int;
2632
2633 // Check _Alignof.
2634 enum
2635 {
2636 int_alignment = _Alignof (int),
2637 int_array_alignment = _Alignof (int[100]),
2638 char_alignment = _Alignof (char)
2639 };
2640 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2641
2642 // Check _Noreturn.
2643 int _Noreturn does_not_return (void) { for (;;) continue; }
2644
2645 // Check _Static_assert.
2646 struct test_static_assert
2647 {
2648 int x;
2649 _Static_assert (sizeof (int) <= sizeof (long int),
2650 "_Static_assert does not work in struct");
2651 long int y;
2652 };
2653
2654 // Check UTF-8 literals.
2655 #define u8 syntax error!
2656 char const utf8_literal[] = u8"happens to be ASCII" "another string";
2657
2658 // Check duplicate typedefs.
2659 typedef long *long_ptr;
2660 typedef long int *long_ptr;
2661 typedef long_ptr long_ptr;
2662
2663 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2664 struct anonymous
2665 {
2666 union {
2667 struct { int i; int j; };
2668 struct { int k; long int l; } w;
2669 };
2670 int m;
2671 } v1;
2672 '
2673
2674 # Test code for whether the C compiler supports C11 (body of main).
2675 ac_c_conftest_c11_main='
2676 _Static_assert ((offsetof (struct anonymous, i)
2677 == offsetof (struct anonymous, w.k)),
2678 "Anonymous union alignment botch");
2679 v1.i = 2;
2680 v1.w.k = 5;
2681 ok |= v1.i != 5;
2682 '
2683
2684 # Test code for whether the C compiler supports C11 (complete).
2685 ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
2686 ${ac_c_conftest_c99_globals}
2687 ${ac_c_conftest_c11_globals}
2688
2689 int
2690 main (int argc, char **argv)
2691 {
2692 int ok = 0;
2693 ${ac_c_conftest_c89_main}
2694 ${ac_c_conftest_c99_main}
2695 ${ac_c_conftest_c11_main}
2696 return ok;
2697 }
2698 "
2699
2700 # Test code for whether the C compiler supports C99 (complete).
2701 ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
2702 ${ac_c_conftest_c99_globals}
2703
2704 int
2705 main (int argc, char **argv)
2706 {
2707 int ok = 0;
2708 ${ac_c_conftest_c89_main}
2709 ${ac_c_conftest_c99_main}
2710 return ok;
2711 }
2712 "
2713
2714 # Test code for whether the C compiler supports C89 (complete).
2715 ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
2716
2717 int
2718 main (int argc, char **argv)
2719 {
2720 int ok = 0;
2721 ${ac_c_conftest_c89_main}
2722 return ok;
2723 }
2724 "
2725
2726 # Test code for whether the C++ compiler supports C++98 (global declarations)
2727 ac_cxx_conftest_cxx98_globals='
2728 // Does the compiler advertise C++98 conformance?
2729 #if !defined __cplusplus || __cplusplus < 199711L
2730 # error "Compiler does not advertise C++98 conformance"
2731 #endif
2732
2733 // These inclusions are to reject old compilers that
2734 // lack the unsuffixed header files.
2735 #include <cstdlib>
2736 #include <exception>
2737
2738 // <cassert> and <cstring> are *not* freestanding headers in C++98.
2739 extern void assert (int);
2740 namespace std {
2741 extern int strcmp (const char *, const char *);
2742 }
2743
2744 // Namespaces, exceptions, and templates were all added after "C++ 2.0".
2745 using std::exception;
2746 using std::strcmp;
2747
2748 namespace {
2749
2750 void test_exception_syntax()
2751 {
2752 try {
2753 throw "test";
2754 } catch (const char *s) {
2755 // Extra parentheses suppress a warning when building autoconf itself,
2756 // due to lint rules shared with more typical C programs.
2757 assert (!(strcmp) (s, "test"));
2758 }
2759 }
2760
2761 template <typename T> struct test_template
2762 {
2763 T const val;
2764 explicit test_template(T t) : val(t) {}
2765 template <typename U> T add(U u) { return static_cast<T>(u) + val; }
2766 };
2767
2768 } // anonymous namespace
2769 '
2770
2771 # Test code for whether the C++ compiler supports C++98 (body of main)
2772 ac_cxx_conftest_cxx98_main='
2773 assert (argc);
2774 assert (! argv[0]);
2775 {
2776 test_exception_syntax ();
2777 test_template<double> tt (2.0);
2778 assert (tt.add (4) == 6.0);
2779 assert (true && !false);
2780 }
2781 '
2782
2783 # Test code for whether the C++ compiler supports C++11 (global declarations)
2784 ac_cxx_conftest_cxx11_globals='
2785 // Does the compiler advertise C++ 2011 conformance?
2786 #if !defined __cplusplus || __cplusplus < 201103L
2787 # error "Compiler does not advertise C++11 conformance"
2788 #endif
2789
2790 namespace cxx11test
2791 {
2792 constexpr int get_val() { return 20; }
2793
2794 struct testinit
2795 {
2796 int i;
2797 double d;
2798 };
2799
2800 class delegate
2801 {
2802 public:
2803 delegate(int n) : n(n) {}
2804 delegate(): delegate(2354) {}
2805
2806 virtual int getval() { return this->n; };
2807 protected:
2808 int n;
2809 };
2810
2811 class overridden : public delegate
2812 {
2813 public:
2814 overridden(int n): delegate(n) {}
2815 virtual int getval() override final { return this->n * 2; }
2816 };
2817
2818 class nocopy
2819 {
2820 public:
2821 nocopy(int i): i(i) {}
2822 nocopy() = default;
2823 nocopy(const nocopy&) = delete;
2824 nocopy & operator=(const nocopy&) = delete;
2825 private:
2826 int i;
2827 };
2828
2829 // for testing lambda expressions
2830 template <typename Ret, typename Fn> Ret eval(Fn f, Ret v)
2831 {
2832 return f(v);
2833 }
2834
2835 // for testing variadic templates and trailing return types
2836 template <typename V> auto sum(V first) -> V
2837 {
2838 return first;
2839 }
2840 template <typename V, typename... Args> auto sum(V first, Args... rest) -> V
2841 {
2842 return first + sum(rest...);
2843 }
2844 }
2845 '
2846
2847 # Test code for whether the C++ compiler supports C++11 (body of main)
2848 ac_cxx_conftest_cxx11_main='
2849 {
2850 // Test auto and decltype
2851 auto a1 = 6538;
2852 auto a2 = 48573953.4;
2853 auto a3 = "String literal";
2854
2855 int total = 0;
2856 for (auto i = a3; *i; ++i) { total += *i; }
2857
2858 decltype(a2) a4 = 34895.034;
2859 }
2860 {
2861 // Test constexpr
2862 short sa[cxx11test::get_val()] = { 0 };
2863 }
2864 {
2865 // Test initializer lists
2866 cxx11test::testinit il = { 4323, 435234.23544 };
2867 }
2868 {
2869 // Test range-based for
2870 int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3,
2871 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
2872 for (auto &x : array) { x += 23; }
2873 }
2874 {
2875 // Test lambda expressions
2876 using cxx11test::eval;
2877 assert (eval ([](int x) { return x*2; }, 21) == 42);
2878 double d = 2.0;
2879 assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0);
2880 assert (d == 5.0);
2881 assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0);
2882 assert (d == 5.0);
2883 }
2884 {
2885 // Test use of variadic templates
2886 using cxx11test::sum;
2887 auto a = sum(1);
2888 auto b = sum(1, 2);
2889 auto c = sum(1.0, 2.0, 3.0);
2890 }
2891 {
2892 // Test constructor delegation
2893 cxx11test::delegate d1;
2894 cxx11test::delegate d2();
2895 cxx11test::delegate d3(45);
2896 }
2897 {
2898 // Test override and final
2899 cxx11test::overridden o1(55464);
2900 }
2901 {
2902 // Test nullptr
2903 char *c = nullptr;
2904 }
2905 {
2906 // Test template brackets
2907 test_template<::test_template<int>> v(test_template<int>(12));
2908 }
2909 {
2910 // Unicode literals
2911 char const *utf8 = u8"UTF-8 string \u2500";
2912 char16_t const *utf16 = u"UTF-8 string \u2500";
2913 char32_t const *utf32 = U"UTF-32 string \u2500";
2914 }
2915 '
2916
2917 # Test code for whether the C compiler supports C++11 (complete).
2918 ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals}
2919 ${ac_cxx_conftest_cxx11_globals}
2920
2921 int
2922 main (int argc, char **argv)
2923 {
2924 int ok = 0;
2925 ${ac_cxx_conftest_cxx98_main}
2926 ${ac_cxx_conftest_cxx11_main}
2927 return ok;
2928 }
2929 "
2930
2931 # Test code for whether the C compiler supports C++98 (complete).
2932 ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals}
2933 int
2934 main (int argc, char **argv)
2935 {
2936 int ok = 0;
2937 ${ac_cxx_conftest_cxx98_main}
2938 return ok;
2939 }
2940 "
2941
2942 as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
2943 as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2944 as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
2945 as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2946 as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
2947 as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
2948 as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2949 as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2950 as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
2951 as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H"
2952 as_fn_append ac_func_c_list " fork HAVE_FORK"
2953 as_fn_append ac_func_c_list " vfork HAVE_VFORK"
2954
2955 # Auxiliary files required by this configure script.
2956 ac_aux_files="install-sh config.guess config.sub"
2957
2958 # Locations in which to look for auxiliary files.
2959 ac_aux_dir_candidates="${srcdir}/cnf"
2960
2961 # Search for a directory containing all of the required auxiliary files,
2962 # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
2963 # If we don't find one directory that contains all the files we need,
2964 # we report the set of missing files from the *first* directory in
2965 # $ac_aux_dir_candidates and give up.
2966 ac_missing_aux_files=""
2967 ac_first_candidate=:
2968 printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
2969 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2970 as_found=false
2971 for as_dir in $ac_aux_dir_candidates
2972 do
2973 IFS=$as_save_IFS
2974 case $as_dir in #(((
2975 '') as_dir=./ ;;
2976 */) ;;
2977 *) as_dir=$as_dir/ ;;
2978 esac
2979 as_found=:
2980
2981 printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
2982 ac_aux_dir_found=yes
2983 ac_install_sh=
2984 for ac_aux in $ac_aux_files
2985 do
2986 # As a special case, if "install-sh" is required, that requirement
2987 # can be satisfied by any of "install-sh", "install.sh", or "shtool",
2988 # and $ac_install_sh is set appropriately for whichever one is found.
2989 if test x"$ac_aux" = x"install-sh"
2990 then
2991 if test -f "${as_dir}install-sh"; then
2992 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
2993 ac_install_sh="${as_dir}install-sh -c"
2994 elif test -f "${as_dir}install.sh"; then
2995 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
2996 ac_install_sh="${as_dir}install.sh -c"
2997 elif test -f "${as_dir}shtool"; then
2998 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
2999 ac_install_sh="${as_dir}shtool install -c"
3000 else
3001 ac_aux_dir_found=no
3002 if $ac_first_candidate; then
3003 ac_missing_aux_files="${ac_missing_aux_files} install-sh"
3004 else
3005 break
3006 fi
3007 fi
3008 else
3009 if test -f "${as_dir}${ac_aux}"; then
3010 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
3011 else
3012 ac_aux_dir_found=no
3013 if $ac_first_candidate; then
3014 ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
3015 else
3016 break
3017 fi
3018 fi
3019 fi
3020 done
3021 if test "$ac_aux_dir_found" = yes; then
3022 ac_aux_dir="$as_dir"
3023 break
3024 fi
3025 ac_first_candidate=false
3026
3027 as_found=false
3028 done
3029 IFS=$as_save_IFS
3030 if $as_found
3031 then :
3032
3033 else case e in #(
3034 e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;;
3035 esac
3036 fi
3037
3038
3039 # These three variables are undocumented and unsupported,
3040 # and are intended to be withdrawn in a future Autoconf release.
3041 # They can cause serious problems if a builder's source tree is in a directory
3042 # whose full name contains unusual characters.
3043 if test -f "${ac_aux_dir}config.guess"; then
3044 ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
3045 fi
3046 if test -f "${ac_aux_dir}config.sub"; then
3047 ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
3048 fi
3049 if test -f "$ac_aux_dir/configure"; then
3050 ac_configure="$SHELL ${ac_aux_dir}configure"
3051 fi
3052
3053 # Check that the precious variables saved in the cache have kept the same
3054 # value.
3055 ac_cache_corrupted=false
3056 for ac_var in $ac_precious_vars; do
3057 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3058 eval ac_new_set=\$ac_env_${ac_var}_set
3059 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3060 eval ac_new_val=\$ac_env_${ac_var}_value
3061 case $ac_old_set,$ac_new_set in
3062 set,)
3063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5
3064 printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;}
3065 ac_cache_corrupted=: ;;
3066 ,set)
3067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5
3068 printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;}
3069 ac_cache_corrupted=: ;;
3070 ,);;
3071 *)
3072 if test "x$ac_old_val" != "x$ac_new_val"; then
3073 # differences in whitespace do not lead to failure.
3074 ac_old_val_w=`echo x $ac_old_val`
3075 ac_new_val_w=`echo x $ac_new_val`
3076 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3077 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5
3078 printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;}
3079 ac_cache_corrupted=:
3080 else
3081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5
3082 printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;}
3083 eval $ac_var=\$ac_old_val
3084 fi
3085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5
3086 printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;}
3087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5
3088 printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;}
3089 fi;;
3090 esac
3091 # Pass precious variables to config.status.
3092 if test "$ac_new_set" = set; then
3093 case $ac_new_val in
3094 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3095 *) ac_arg=$ac_var=$ac_new_val ;;
3096 esac
3097 case " $ac_configure_args " in
3098 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3099 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3100 esac
3101 fi
3102 done
3103 if $ac_cache_corrupted; then
3104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3105 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
3106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3107 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3108 as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file'
3109 and start over" "$LINENO" 5
3110 fi
3111 ## -------------------- ##
3112 ## Main body of script. ##
3113 ## -------------------- ##
3114
3115 ac_ext=c
3116 ac_cpp='$CPP $CPPFLAGS'
3117 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3118 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3119 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3120
3121
3122
3123
3124
3125
3126
3127 ac_config_headers="$ac_config_headers build/config.h:src/config.h.in"
3128
3129 ac_config_commands="$ac_config_commands build/stamp-h"
3130
3131
3132 if test "x$srcdir" = x.
3133 then :
3134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: in-tree build" >&5
3135 printf "%s\n" "$as_me: in-tree build" >&6;}
3136 else case e in #(
3137 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: out-of-tree build" >&5
3138 printf "%s\n" "$as_me: out-of-tree build" >&6;} ;;
3139 esac
3140 fi
3141
3142 GAP_VERSION="4.16.0"
3143
3144 GAP_RELEASEDAY="2026-06-02"
3145
3146 GAP_RELEASEYEAR="2026"
3147
3148
3149
3150
3151
3152 # Make sure we can run config.sub.
3153 $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
3154 as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
3155
3156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3157 printf %s "checking build system type... " >&6; }
3158 if test ${ac_cv_build+y}
3159 then :
3160 printf %s "(cached) " >&6
3161 else case e in #(
3162 e) ac_build_alias=$build_alias
3163 test "x$ac_build_alias" = x &&
3164 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
3165 test "x$ac_build_alias" = x &&
3166 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3167 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
3168 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
3169 ;;
3170 esac
3171 fi
3172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3173 printf "%s\n" "$ac_cv_build" >&6; }
3174 case $ac_cv_build in
3175 *-*-*) ;;
3176 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3177 esac
3178 build=$ac_cv_build
3179 ac_save_IFS=$IFS; IFS='-'
3180 set x $ac_cv_build
3181 shift
3182 build_cpu=$1
3183 build_vendor=$2
3184 shift; shift
3185 # Remember, the first character of IFS is used to create $*,
3186 # except with old shells:
3187 build_os=$*
3188 IFS=$ac_save_IFS
3189 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3190
3191
3192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3193 printf %s "checking host system type... " >&6; }
3194 if test ${ac_cv_host+y}
3195 then :
3196 printf %s "(cached) " >&6
3197 else case e in #(
3198 e) if test "x$host_alias" = x; then
3199 ac_cv_host=$ac_cv_build
3200 else
3201 ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
3202 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
3203 fi
3204 ;;
3205 esac
3206 fi
3207 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3208 printf "%s\n" "$ac_cv_host" >&6; }
3209 case $ac_cv_host in
3210 *-*-*) ;;
3211 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3212 esac
3213 host=$ac_cv_host
3214 ac_save_IFS=$IFS; IFS='-'
3215 set x $ac_cv_host
3216 shift
3217 host_cpu=$1
3218 host_vendor=$2
3219 shift; shift
3220 # Remember, the first character of IFS is used to create $*,
3221 # except with old shells:
3222 host_os=$*
3223 IFS=$ac_save_IFS
3224 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238 ac_ext=c
3239 ac_cpp='$CPP $CPPFLAGS'
3240 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3241 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3242 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3243 if test -n "$ac_tool_prefix"; then
3244 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3245 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3246 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3247 printf %s "checking for $ac_word... " >&6; }
3248 if test ${ac_cv_prog_CC+y}
3249 then :
3250 printf %s "(cached) " >&6
3251 else case e in #(
3252 e) if test -n "$CC"; then
3253 ac_cv_prog_CC="$CC" # Let the user override the test.
3254 else
3255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3256 for as_dir in $PATH
3257 do
3258 IFS=$as_save_IFS
3259 case $as_dir in #(((
3260 '') as_dir=./ ;;
3261 */) ;;
3262 *) as_dir=$as_dir/ ;;
3263 esac
3264 for ac_exec_ext in '' $ac_executable_extensions; do
3265 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3266 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3267 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3268 break 2
3269 fi
3270 done
3271 done
3272 IFS=$as_save_IFS
3273
3274 fi ;;
3275 esac
3276 fi
3277 CC=$ac_cv_prog_CC
3278 if test -n "$CC"; then
3279 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3280 printf "%s\n" "$CC" >&6; }
3281 else
3282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3283 printf "%s\n" "no" >&6; }
3284 fi
3285
3286
3287 fi
3288 if test -z "$ac_cv_prog_CC"; then
3289 ac_ct_CC=$CC
3290 # Extract the first word of "gcc", so it can be a program name with args.
3291 set dummy gcc; ac_word=$2
3292 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3293 printf %s "checking for $ac_word... " >&6; }
3294 if test ${ac_cv_prog_ac_ct_CC+y}
3295 then :
3296 printf %s "(cached) " >&6
3297 else case e in #(
3298 e) if test -n "$ac_ct_CC"; then
3299 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3300 else
3301 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3302 for as_dir in $PATH
3303 do
3304 IFS=$as_save_IFS
3305 case $as_dir in #(((
3306 '') as_dir=./ ;;
3307 */) ;;
3308 *) as_dir=$as_dir/ ;;
3309 esac
3310 for ac_exec_ext in '' $ac_executable_extensions; do
3311 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3312 ac_cv_prog_ac_ct_CC="gcc"
3313 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3314 break 2
3315 fi
3316 done
3317 done
3318 IFS=$as_save_IFS
3319
3320 fi ;;
3321 esac
3322 fi
3323 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3324 if test -n "$ac_ct_CC"; then
3325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3326 printf "%s\n" "$ac_ct_CC" >&6; }
3327 else
3328 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3329 printf "%s\n" "no" >&6; }
3330 fi
3331
3332 if test "x$ac_ct_CC" = x; then
3333 CC=""
3334 else
3335 case $cross_compiling:$ac_tool_warned in
3336 yes:)
3337 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3338 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3339 ac_tool_warned=yes ;;
3340 esac
3341 CC=$ac_ct_CC
3342 fi
3343 else
3344 CC="$ac_cv_prog_CC"
3345 fi
3346
3347 if test -z "$CC"; then
3348 if test -n "$ac_tool_prefix"; then
3349 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3350 set dummy ${ac_tool_prefix}cc; ac_word=$2
3351 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3352 printf %s "checking for $ac_word... " >&6; }
3353 if test ${ac_cv_prog_CC+y}
3354 then :
3355 printf %s "(cached) " >&6
3356 else case e in #(
3357 e) if test -n "$CC"; then
3358 ac_cv_prog_CC="$CC" # Let the user override the test.
3359 else
3360 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3361 for as_dir in $PATH
3362 do
3363 IFS=$as_save_IFS
3364 case $as_dir in #(((
3365 '') as_dir=./ ;;
3366 */) ;;
3367 *) as_dir=$as_dir/ ;;
3368 esac
3369 for ac_exec_ext in '' $ac_executable_extensions; do
3370 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3371 ac_cv_prog_CC="${ac_tool_prefix}cc"
3372 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3373 break 2
3374 fi
3375 done
3376 done
3377 IFS=$as_save_IFS
3378
3379 fi ;;
3380 esac
3381 fi
3382 CC=$ac_cv_prog_CC
3383 if test -n "$CC"; then
3384 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3385 printf "%s\n" "$CC" >&6; }
3386 else
3387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3388 printf "%s\n" "no" >&6; }
3389 fi
3390
3391
3392 fi
3393 fi
3394 if test -z "$CC"; then
3395 # Extract the first word of "cc", so it can be a program name with args.
3396 set dummy cc; ac_word=$2
3397 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3398 printf %s "checking for $ac_word... " >&6; }
3399 if test ${ac_cv_prog_CC+y}
3400 then :
3401 printf %s "(cached) " >&6
3402 else case e in #(
3403 e) if test -n "$CC"; then
3404 ac_cv_prog_CC="$CC" # Let the user override the test.
3405 else
3406 ac_prog_rejected=no
3407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3408 for as_dir in $PATH
3409 do
3410 IFS=$as_save_IFS
3411 case $as_dir in #(((
3412 '') as_dir=./ ;;
3413 */) ;;
3414 *) as_dir=$as_dir/ ;;
3415 esac
3416 for ac_exec_ext in '' $ac_executable_extensions; do
3417 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3418 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3419 ac_prog_rejected=yes
3420 continue
3421 fi
3422 ac_cv_prog_CC="cc"
3423 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3424 break 2
3425 fi
3426 done
3427 done
3428 IFS=$as_save_IFS
3429
3430 if test $ac_prog_rejected = yes; then
3431 # We found a bogon in the path, so make sure we never use it.
3432 set dummy $ac_cv_prog_CC
3433 shift
3434 if test $# != 0; then
3435 # We chose a different compiler from the bogus one.
3436 # However, it has the same basename, so the bogon will be chosen
3437 # first if we set CC to just the basename; use the full file name.
3438 shift
3439 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
3440 fi
3441 fi
3442 fi ;;
3443 esac
3444 fi
3445 CC=$ac_cv_prog_CC
3446 if test -n "$CC"; then
3447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3448 printf "%s\n" "$CC" >&6; }
3449 else
3450 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3451 printf "%s\n" "no" >&6; }
3452 fi
3453
3454
3455 fi
3456 if test -z "$CC"; then
3457 if test -n "$ac_tool_prefix"; then
3458 for ac_prog in cl.exe
3459 do
3460 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3461 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3463 printf %s "checking for $ac_word... " >&6; }
3464 if test ${ac_cv_prog_CC+y}
3465 then :
3466 printf %s "(cached) " >&6
3467 else case e in #(
3468 e) if test -n "$CC"; then
3469 ac_cv_prog_CC="$CC" # Let the user override the test.
3470 else
3471 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3472 for as_dir in $PATH
3473 do
3474 IFS=$as_save_IFS
3475 case $as_dir in #(((
3476 '') as_dir=./ ;;
3477 */) ;;
3478 *) as_dir=$as_dir/ ;;
3479 esac
3480 for ac_exec_ext in '' $ac_executable_extensions; do
3481 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3482 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3483 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3484 break 2
3485 fi
3486 done
3487 done
3488 IFS=$as_save_IFS
3489
3490 fi ;;
3491 esac
3492 fi
3493 CC=$ac_cv_prog_CC
3494 if test -n "$CC"; then
3495 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3496 printf "%s\n" "$CC" >&6; }
3497 else
3498 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3499 printf "%s\n" "no" >&6; }
3500 fi
3501
3502
3503 test -n "$CC" && break
3504 done
3505 fi
3506 if test -z "$CC"; then
3507 ac_ct_CC=$CC
3508 for ac_prog in cl.exe
3509 do
3510 # Extract the first word of "$ac_prog", so it can be a program name with args.
3511 set dummy $ac_prog; ac_word=$2
3512 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3513 printf %s "checking for $ac_word... " >&6; }
3514 if test ${ac_cv_prog_ac_ct_CC+y}
3515 then :
3516 printf %s "(cached) " >&6
3517 else case e in #(
3518 e) if test -n "$ac_ct_CC"; then
3519 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3520 else
3521 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3522 for as_dir in $PATH
3523 do
3524 IFS=$as_save_IFS
3525 case $as_dir in #(((
3526 '') as_dir=./ ;;
3527 */) ;;
3528 *) as_dir=$as_dir/ ;;
3529 esac
3530 for ac_exec_ext in '' $ac_executable_extensions; do
3531 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3532 ac_cv_prog_ac_ct_CC="$ac_prog"
3533 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3534 break 2
3535 fi
3536 done
3537 done
3538 IFS=$as_save_IFS
3539
3540 fi ;;
3541 esac
3542 fi
3543 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3544 if test -n "$ac_ct_CC"; then
3545 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3546 printf "%s\n" "$ac_ct_CC" >&6; }
3547 else
3548 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3549 printf "%s\n" "no" >&6; }
3550 fi
3551
3552
3553 test -n "$ac_ct_CC" && break
3554 done
3555
3556 if test "x$ac_ct_CC" = x; then
3557 CC=""
3558 else
3559 case $cross_compiling:$ac_tool_warned in
3560 yes:)
3561 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3562 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3563 ac_tool_warned=yes ;;
3564 esac
3565 CC=$ac_ct_CC
3566 fi
3567 fi
3568
3569 fi
3570 if test -z "$CC"; then
3571 if test -n "$ac_tool_prefix"; then
3572 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
3573 set dummy ${ac_tool_prefix}clang; ac_word=$2
3574 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3575 printf %s "checking for $ac_word... " >&6; }
3576 if test ${ac_cv_prog_CC+y}
3577 then :
3578 printf %s "(cached) " >&6
3579 else case e in #(
3580 e) if test -n "$CC"; then
3581 ac_cv_prog_CC="$CC" # Let the user override the test.
3582 else
3583 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3584 for as_dir in $PATH
3585 do
3586 IFS=$as_save_IFS
3587 case $as_dir in #(((
3588 '') as_dir=./ ;;
3589 */) ;;
3590 *) as_dir=$as_dir/ ;;
3591 esac
3592 for ac_exec_ext in '' $ac_executable_extensions; do
3593 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3594 ac_cv_prog_CC="${ac_tool_prefix}clang"
3595 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3596 break 2
3597 fi
3598 done
3599 done
3600 IFS=$as_save_IFS
3601
3602 fi ;;
3603 esac
3604 fi
3605 CC=$ac_cv_prog_CC
3606 if test -n "$CC"; then
3607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3608 printf "%s\n" "$CC" >&6; }
3609 else
3610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3611 printf "%s\n" "no" >&6; }
3612 fi
3613
3614
3615 fi
3616 if test -z "$ac_cv_prog_CC"; then
3617 ac_ct_CC=$CC
3618 # Extract the first word of "clang", so it can be a program name with args.
3619 set dummy clang; ac_word=$2
3620 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3621 printf %s "checking for $ac_word... " >&6; }
3622 if test ${ac_cv_prog_ac_ct_CC+y}
3623 then :
3624 printf %s "(cached) " >&6
3625 else case e in #(
3626 e) if test -n "$ac_ct_CC"; then
3627 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3628 else
3629 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3630 for as_dir in $PATH
3631 do
3632 IFS=$as_save_IFS
3633 case $as_dir in #(((
3634 '') as_dir=./ ;;
3635 */) ;;
3636 *) as_dir=$as_dir/ ;;
3637 esac
3638 for ac_exec_ext in '' $ac_executable_extensions; do
3639 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3640 ac_cv_prog_ac_ct_CC="clang"
3641 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3642 break 2
3643 fi
3644 done
3645 done
3646 IFS=$as_save_IFS
3647
3648 fi ;;
3649 esac
3650 fi
3651 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3652 if test -n "$ac_ct_CC"; then
3653 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3654 printf "%s\n" "$ac_ct_CC" >&6; }
3655 else
3656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3657 printf "%s\n" "no" >&6; }
3658 fi
3659
3660 if test "x$ac_ct_CC" = x; then
3661 CC=""
3662 else
3663 case $cross_compiling:$ac_tool_warned in
3664 yes:)
3665 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3666 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3667 ac_tool_warned=yes ;;
3668 esac
3669 CC=$ac_ct_CC
3670 fi
3671 else
3672 CC="$ac_cv_prog_CC"
3673 fi
3674
3675 fi
3676
3677
3678 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3679 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
3680 as_fn_error $? "no acceptable C compiler found in \$PATH
3681 See 'config.log' for more details" "$LINENO" 5; }
3682
3683 # Provide some information about the compiler.
3684 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3685 set X $ac_compile
3686 ac_compiler=$2
3687 for ac_option in --version -v -V -qversion -version; do
3688 { { ac_try="$ac_compiler $ac_option >&5"
3689 case "(($ac_try" in
3690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3691 *) ac_try_echo=$ac_try;;
3692 esac
3693 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3694 printf "%s\n" "$ac_try_echo"; } >&5
3695 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3696 ac_status=$?
3697 if test -s conftest.err; then
3698 sed '10a\
3699 ... rest of stderr output deleted ...
3700 10q' conftest.err >conftest.er1
3701 cat conftest.er1 >&5
3702 fi
3703 rm -f conftest.er1 conftest.err
3704 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3705 test $ac_status = 0; }
3706 done
3707
3708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3709 /* end confdefs.h. */
3710
3711 int
3712 main (void)
3713 {
3714
3715 ;
3716 return 0;
3717 }
3718 _ACEOF
3719 ac_clean_files_save=$ac_clean_files
3720 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3721 # Try to create an executable without -o first, disregard a.out.
3722 # It will help us diagnose broken compilers, and finding out an intuition
3723 # of exeext.
3724 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3725 printf %s "checking whether the C compiler works... " >&6; }
3726 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3727
3728 # The possible output files:
3729 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3730
3731 ac_rmfiles=
3732 for ac_file in $ac_files
3733 do
3734 case $ac_file in
3735 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3736 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3737 esac
3738 done
3739 rm -f $ac_rmfiles
3740
3741 if { { ac_try="$ac_link_default"
3742 case "(($ac_try" in
3743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3744 *) ac_try_echo=$ac_try;;
3745 esac
3746 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3747 printf "%s\n" "$ac_try_echo"; } >&5
3748 (eval "$ac_link_default") 2>&5
3749 ac_status=$?
3750 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3751 test $ac_status = 0; }
3752 then :
3753 # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'.
3754 # So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no'
3755 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3756 # so that the user can short-circuit this test for compilers unknown to
3757 # Autoconf.
3758 for ac_file in $ac_files ''
3759 do
3760 test -f "$ac_file" || continue
3761 case $ac_file in
3762 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3763 ;;
3764 [ab].out )
3765 # We found the default executable, but exeext='' is most
3766 # certainly right.
3767 break;;
3768 *.* )
3769 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
3770 then :; else
3771 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3772 fi
3773 # We set ac_cv_exeext here because the later test for it is not
3774 # safe: cross compilers may not add the suffix if given an '-o'
3775 # argument, so we may need to know it at that point already.
3776 # Even if this section looks crufty: it has the advantage of
3777 # actually working.
3778 break;;
3779 * )
3780 break;;
3781 esac
3782 done
3783 test "$ac_cv_exeext" = no && ac_cv_exeext=
3784
3785 else case e in #(
3786 e) ac_file='' ;;
3787 esac
3788 fi
3789 if test -z "$ac_file"
3790 then :
3791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3792 printf "%s\n" "no" >&6; }
3793 printf "%s\n" "$as_me: failed program was:" >&5
3794 sed 's/^/| /' conftest.$ac_ext >&5
3795
3796 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3797 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
3798 as_fn_error 77 "C compiler cannot create executables
3799 See 'config.log' for more details" "$LINENO" 5; }
3800 else case e in #(
3801 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3802 printf "%s\n" "yes" >&6; } ;;
3803 esac
3804 fi
3805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3806 printf %s "checking for C compiler default output file name... " >&6; }
3807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3808 printf "%s\n" "$ac_file" >&6; }
3809 ac_exeext=$ac_cv_exeext
3810
3811 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3812 ac_clean_files=$ac_clean_files_save
3813 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3814 printf %s "checking for suffix of executables... " >&6; }
3815 if { { ac_try="$ac_link"
3816 case "(($ac_try" in
3817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3818 *) ac_try_echo=$ac_try;;
3819 esac
3820 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3821 printf "%s\n" "$ac_try_echo"; } >&5
3822 (eval "$ac_link") 2>&5
3823 ac_status=$?
3824 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3825 test $ac_status = 0; }
3826 then :
3827 # If both 'conftest.exe' and 'conftest' are 'present' (well, observable)
3828 # catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will
3829 # work properly (i.e., refer to 'conftest.exe'), while it won't with
3830 # 'rm'.
3831 for ac_file in conftest.exe conftest conftest.*; do
3832 test -f "$ac_file" || continue
3833 case $ac_file in
3834 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3835 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3836 break;;
3837 * ) break;;
3838 esac
3839 done
3840 else case e in #(
3841 e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3842 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
3843 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3844 See 'config.log' for more details" "$LINENO" 5; } ;;
3845 esac
3846 fi
3847 rm -f conftest conftest$ac_cv_exeext
3848 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3849 printf "%s\n" "$ac_cv_exeext" >&6; }
3850
3851 rm -f conftest.$ac_ext
3852 EXEEXT=$ac_cv_exeext
3853 ac_exeext=$EXEEXT
3854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3855 /* end confdefs.h. */
3856 #include <stdio.h>
3857 int
3858 main (void)
3859 {
3860 FILE *f = fopen ("conftest.out", "w");
3861 if (!f)
3862 return 1;
3863 return ferror (f) || fclose (f) != 0;
3864
3865 ;
3866 return 0;
3867 }
3868 _ACEOF
3869 ac_clean_files="$ac_clean_files conftest.out"
3870 # Check that the compiler produces executables we can run. If not, either
3871 # the compiler is broken, or we cross compile.
3872 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3873 printf %s "checking whether we are cross compiling... " >&6; }
3874 if test "$cross_compiling" != yes; then
3875 { { ac_try="$ac_link"
3876 case "(($ac_try" in
3877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3878 *) ac_try_echo=$ac_try;;
3879 esac
3880 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3881 printf "%s\n" "$ac_try_echo"; } >&5
3882 (eval "$ac_link") 2>&5
3883 ac_status=$?
3884 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3885 test $ac_status = 0; }
3886 if { ac_try='./conftest$ac_cv_exeext'
3887 { { case "(($ac_try" in
3888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3889 *) ac_try_echo=$ac_try;;
3890 esac
3891 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3892 printf "%s\n" "$ac_try_echo"; } >&5
3893 (eval "$ac_try") 2>&5
3894 ac_status=$?
3895 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3896 test $ac_status = 0; }; }; then
3897 cross_compiling=no
3898 else
3899 if test "$cross_compiling" = maybe; then
3900 cross_compiling=yes
3901 else
3902 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3903 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
3904 as_fn_error 77 "cannot run C compiled programs.
3905 If you meant to cross compile, use '--host'.
3906 See 'config.log' for more details" "$LINENO" 5; }
3907 fi
3908 fi
3909 fi
3910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3911 printf "%s\n" "$cross_compiling" >&6; }
3912
3913 rm -f conftest.$ac_ext conftest$ac_cv_exeext \
3914 conftest.o conftest.obj conftest.out
3915 ac_clean_files=$ac_clean_files_save
3916 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3917 printf %s "checking for suffix of object files... " >&6; }
3918 if test ${ac_cv_objext+y}
3919 then :
3920 printf %s "(cached) " >&6
3921 else case e in #(
3922 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3923 /* end confdefs.h. */
3924
3925 int
3926 main (void)
3927 {
3928
3929 ;
3930 return 0;
3931 }
3932 _ACEOF
3933 rm -f conftest.o conftest.obj
3934 if { { ac_try="$ac_compile"
3935 case "(($ac_try" in
3936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3937 *) ac_try_echo=$ac_try;;
3938 esac
3939 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3940 printf "%s\n" "$ac_try_echo"; } >&5
3941 (eval "$ac_compile") 2>&5
3942 ac_status=$?
3943 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3944 test $ac_status = 0; }
3945 then :
3946 for ac_file in conftest.o conftest.obj conftest.*; do
3947 test -f "$ac_file" || continue;
3948 case $ac_file in
3949 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3950 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3951 break;;
3952 esac
3953 done
3954 else case e in #(
3955 e) printf "%s\n" "$as_me: failed program was:" >&5
3956 sed 's/^/| /' conftest.$ac_ext >&5
3957
3958 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
3959 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
3960 as_fn_error $? "cannot compute suffix of object files: cannot compile
3961 See 'config.log' for more details" "$LINENO" 5; } ;;
3962 esac
3963 fi
3964 rm -f conftest.$ac_cv_objext conftest.$ac_ext ;;
3965 esac
3966 fi
3967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3968 printf "%s\n" "$ac_cv_objext" >&6; }
3969 OBJEXT=$ac_cv_objext
3970 ac_objext=$OBJEXT
3971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
3972 printf %s "checking whether the compiler supports GNU C... " >&6; }
3973 if test ${ac_cv_c_compiler_gnu+y}
3974 then :
3975 printf %s "(cached) " >&6
3976 else case e in #(
3977 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3978 /* end confdefs.h. */
3979
3980 int
3981 main (void)
3982 {
3983 #ifndef __GNUC__
3984 choke me
3985 #endif
3986
3987 ;
3988 return 0;
3989 }
3990 _ACEOF
3991 if ac_fn_c_try_compile "$LINENO"
3992 then :
3993 ac_compiler_gnu=yes
3994 else case e in #(
3995 e) ac_compiler_gnu=no ;;
3996 esac
3997 fi
3998 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3999 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4000 ;;
4001 esac
4002 fi
4003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4004 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
4005 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4006
4007 if test $ac_compiler_gnu = yes; then
4008 GCC=yes
4009 else
4010 GCC=
4011 fi
4012 ac_test_CFLAGS=${CFLAGS+y}
4013 ac_save_CFLAGS=$CFLAGS
4014 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4015 printf %s "checking whether $CC accepts -g... " >&6; }
4016 if test ${ac_cv_prog_cc_g+y}
4017 then :
4018 printf %s "(cached) " >&6
4019 else case e in #(
4020 e) ac_save_c_werror_flag=$ac_c_werror_flag
4021 ac_c_werror_flag=yes
4022 ac_cv_prog_cc_g=no
4023 CFLAGS="-g"
4024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4025 /* end confdefs.h. */
4026
4027 int
4028 main (void)
4029 {
4030
4031 ;
4032 return 0;
4033 }
4034 _ACEOF
4035 if ac_fn_c_try_compile "$LINENO"
4036 then :
4037 ac_cv_prog_cc_g=yes
4038 else case e in #(
4039 e) CFLAGS=""
4040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4041 /* end confdefs.h. */
4042
4043 int
4044 main (void)
4045 {
4046
4047 ;
4048 return 0;
4049 }
4050 _ACEOF
4051 if ac_fn_c_try_compile "$LINENO"
4052 then :
4053
4054 else case e in #(
4055 e) ac_c_werror_flag=$ac_save_c_werror_flag
4056 CFLAGS="-g"
4057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4058 /* end confdefs.h. */
4059
4060 int
4061 main (void)
4062 {
4063
4064 ;
4065 return 0;
4066 }
4067 _ACEOF
4068 if ac_fn_c_try_compile "$LINENO"
4069 then :
4070 ac_cv_prog_cc_g=yes
4071 fi
4072 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
4073 esac
4074 fi
4075 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
4076 esac
4077 fi
4078 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4079 ac_c_werror_flag=$ac_save_c_werror_flag ;;
4080 esac
4081 fi
4082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4083 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
4084 if test $ac_test_CFLAGS; then
4085 CFLAGS=$ac_save_CFLAGS
4086 elif test $ac_cv_prog_cc_g = yes; then
4087 if test "$GCC" = yes; then
4088 CFLAGS="-g -O2"
4089 else
4090 CFLAGS="-g"
4091 fi
4092 else
4093 if test "$GCC" = yes; then
4094 CFLAGS="-O2"
4095 else
4096 CFLAGS=
4097 fi
4098 fi
4099 ac_prog_cc_stdc=no
4100 if test x$ac_prog_cc_stdc = xno
4101 then :
4102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4103 printf %s "checking for $CC option to enable C11 features... " >&6; }
4104 if test ${ac_cv_prog_cc_c11+y}
4105 then :
4106 printf %s "(cached) " >&6
4107 else case e in #(
4108 e) ac_cv_prog_cc_c11=no
4109 ac_save_CC=$CC
4110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4111 /* end confdefs.h. */
4112 $ac_c_conftest_c11_program
4113 _ACEOF
4114 for ac_arg in '' -std=gnu11
4115 do
4116 CC="$ac_save_CC $ac_arg"
4117 if ac_fn_c_try_compile "$LINENO"
4118 then :
4119 ac_cv_prog_cc_c11=$ac_arg
4120 fi
4121 rm -f core conftest.err conftest.$ac_objext conftest.beam
4122 test "x$ac_cv_prog_cc_c11" != "xno" && break
4123 done
4124 rm -f conftest.$ac_ext
4125 CC=$ac_save_CC ;;
4126 esac
4127 fi
4128
4129 if test "x$ac_cv_prog_cc_c11" = xno
4130 then :
4131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4132 printf "%s\n" "unsupported" >&6; }
4133 else case e in #(
4134 e) if test "x$ac_cv_prog_cc_c11" = x
4135 then :
4136 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4137 printf "%s\n" "none needed" >&6; }
4138 else case e in #(
4139 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4140 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
4141 CC="$CC $ac_cv_prog_cc_c11" ;;
4142 esac
4143 fi
4144 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4145 ac_prog_cc_stdc=c11 ;;
4146 esac
4147 fi
4148 fi
4149 if test x$ac_prog_cc_stdc = xno
4150 then :
4151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4152 printf %s "checking for $CC option to enable C99 features... " >&6; }
4153 if test ${ac_cv_prog_cc_c99+y}
4154 then :
4155 printf %s "(cached) " >&6
4156 else case e in #(
4157 e) ac_cv_prog_cc_c99=no
4158 ac_save_CC=$CC
4159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4160 /* end confdefs.h. */
4161 $ac_c_conftest_c99_program
4162 _ACEOF
4163 for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
4164 do
4165 CC="$ac_save_CC $ac_arg"
4166 if ac_fn_c_try_compile "$LINENO"
4167 then :
4168 ac_cv_prog_cc_c99=$ac_arg
4169 fi
4170 rm -f core conftest.err conftest.$ac_objext conftest.beam
4171 test "x$ac_cv_prog_cc_c99" != "xno" && break
4172 done
4173 rm -f conftest.$ac_ext
4174 CC=$ac_save_CC ;;
4175 esac
4176 fi
4177
4178 if test "x$ac_cv_prog_cc_c99" = xno
4179 then :
4180 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4181 printf "%s\n" "unsupported" >&6; }
4182 else case e in #(
4183 e) if test "x$ac_cv_prog_cc_c99" = x
4184 then :
4185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4186 printf "%s\n" "none needed" >&6; }
4187 else case e in #(
4188 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4189 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
4190 CC="$CC $ac_cv_prog_cc_c99" ;;
4191 esac
4192 fi
4193 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4194 ac_prog_cc_stdc=c99 ;;
4195 esac
4196 fi
4197 fi
4198 if test x$ac_prog_cc_stdc = xno
4199 then :
4200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
4201 printf %s "checking for $CC option to enable C89 features... " >&6; }
4202 if test ${ac_cv_prog_cc_c89+y}
4203 then :
4204 printf %s "(cached) " >&6
4205 else case e in #(
4206 e) ac_cv_prog_cc_c89=no
4207 ac_save_CC=$CC
4208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4209 /* end confdefs.h. */
4210 $ac_c_conftest_c89_program
4211 _ACEOF
4212 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4213 do
4214 CC="$ac_save_CC $ac_arg"
4215 if ac_fn_c_try_compile "$LINENO"
4216 then :
4217 ac_cv_prog_cc_c89=$ac_arg
4218 fi
4219 rm -f core conftest.err conftest.$ac_objext conftest.beam
4220 test "x$ac_cv_prog_cc_c89" != "xno" && break
4221 done
4222 rm -f conftest.$ac_ext
4223 CC=$ac_save_CC ;;
4224 esac
4225 fi
4226
4227 if test "x$ac_cv_prog_cc_c89" = xno
4228 then :
4229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4230 printf "%s\n" "unsupported" >&6; }
4231 else case e in #(
4232 e) if test "x$ac_cv_prog_cc_c89" = x
4233 then :
4234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4235 printf "%s\n" "none needed" >&6; }
4236 else case e in #(
4237 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4238 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
4239 CC="$CC $ac_cv_prog_cc_c89" ;;
4240 esac
4241 fi
4242 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
4243 ac_prog_cc_stdc=c89 ;;
4244 esac
4245 fi
4246 fi
4247
4248 ac_ext=c
4249 ac_cpp='$CPP $CPPFLAGS'
4250 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4251 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4252 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4253
4254
4255
4256
4257
4258
4259
4260 ac_ext=cpp
4261 ac_cpp='$CXXCPP $CPPFLAGS'
4262 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4263 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4264 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4265 if test -z "$CXX"; then
4266 if test -n "$CCC"; then
4267 CXX=$CCC
4268 else
4269 if test -n "$ac_tool_prefix"; then
4270 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
4271 do
4272 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4273 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4275 printf %s "checking for $ac_word... " >&6; }
4276 if test ${ac_cv_prog_CXX+y}
4277 then :
4278 printf %s "(cached) " >&6
4279 else case e in #(
4280 e) if test -n "$CXX"; then
4281 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4282 else
4283 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4284 for as_dir in $PATH
4285 do
4286 IFS=$as_save_IFS
4287 case $as_dir in #(((
4288 '') as_dir=./ ;;
4289 */) ;;
4290 *) as_dir=$as_dir/ ;;
4291 esac
4292 for ac_exec_ext in '' $ac_executable_extensions; do
4293 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4294 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4295 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4296 break 2
4297 fi
4298 done
4299 done
4300 IFS=$as_save_IFS
4301
4302 fi ;;
4303 esac
4304 fi
4305 CXX=$ac_cv_prog_CXX
4306 if test -n "$CXX"; then
4307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4308 printf "%s\n" "$CXX" >&6; }
4309 else
4310 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4311 printf "%s\n" "no" >&6; }
4312 fi
4313
4314
4315 test -n "$CXX" && break
4316 done
4317 fi
4318 if test -z "$CXX"; then
4319 ac_ct_CXX=$CXX
4320 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
4321 do
4322 # Extract the first word of "$ac_prog", so it can be a program name with args.
4323 set dummy $ac_prog; ac_word=$2
4324 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4325 printf %s "checking for $ac_word... " >&6; }
4326 if test ${ac_cv_prog_ac_ct_CXX+y}
4327 then :
4328 printf %s "(cached) " >&6
4329 else case e in #(
4330 e) if test -n "$ac_ct_CXX"; then
4331 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4332 else
4333 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4334 for as_dir in $PATH
4335 do
4336 IFS=$as_save_IFS
4337 case $as_dir in #(((
4338 '') as_dir=./ ;;
4339 */) ;;
4340 *) as_dir=$as_dir/ ;;
4341 esac
4342 for ac_exec_ext in '' $ac_executable_extensions; do
4343 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4344 ac_cv_prog_ac_ct_CXX="$ac_prog"
4345 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4346 break 2
4347 fi
4348 done
4349 done
4350 IFS=$as_save_IFS
4351
4352 fi ;;
4353 esac
4354 fi
4355 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4356 if test -n "$ac_ct_CXX"; then
4357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4358 printf "%s\n" "$ac_ct_CXX" >&6; }
4359 else
4360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4361 printf "%s\n" "no" >&6; }
4362 fi
4363
4364
4365 test -n "$ac_ct_CXX" && break
4366 done
4367
4368 if test "x$ac_ct_CXX" = x; then
4369 CXX="g++"
4370 else
4371 case $cross_compiling:$ac_tool_warned in
4372 yes:)
4373 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4374 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4375 ac_tool_warned=yes ;;
4376 esac
4377 CXX=$ac_ct_CXX
4378 fi
4379 fi
4380
4381 fi
4382 fi
4383 # Provide some information about the compiler.
4384 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4385 set X $ac_compile
4386 ac_compiler=$2
4387 for ac_option in --version -v -V -qversion; do
4388 { { ac_try="$ac_compiler $ac_option >&5"
4389 case "(($ac_try" in
4390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4391 *) ac_try_echo=$ac_try;;
4392 esac
4393 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4394 printf "%s\n" "$ac_try_echo"; } >&5
4395 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4396 ac_status=$?
4397 if test -s conftest.err; then
4398 sed '10a\
4399 ... rest of stderr output deleted ...
4400 10q' conftest.err >conftest.er1
4401 cat conftest.er1 >&5
4402 fi
4403 rm -f conftest.er1 conftest.err
4404 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4405 test $ac_status = 0; }
4406 done
4407
4408 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5
4409 printf %s "checking whether the compiler supports GNU C++... " >&6; }
4410 if test ${ac_cv_cxx_compiler_gnu+y}
4411 then :
4412 printf %s "(cached) " >&6
4413 else case e in #(
4414 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4415 /* end confdefs.h. */
4416
4417 int
4418 main (void)
4419 {
4420 #ifndef __GNUC__
4421 choke me
4422 #endif
4423
4424 ;
4425 return 0;
4426 }
4427 _ACEOF
4428 if ac_fn_cxx_try_compile "$LINENO"
4429 then :
4430 ac_compiler_gnu=yes
4431 else case e in #(
4432 e) ac_compiler_gnu=no ;;
4433 esac
4434 fi
4435 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4436 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4437 ;;
4438 esac
4439 fi
4440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4441 printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; }
4442 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4443
4444 if test $ac_compiler_gnu = yes; then
4445 GXX=yes
4446 else
4447 GXX=
4448 fi
4449 ac_test_CXXFLAGS=${CXXFLAGS+y}
4450 ac_save_CXXFLAGS=$CXXFLAGS
4451 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4452 printf %s "checking whether $CXX accepts -g... " >&6; }
4453 if test ${ac_cv_prog_cxx_g+y}
4454 then :
4455 printf %s "(cached) " >&6
4456 else case e in #(
4457 e) ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4458 ac_cxx_werror_flag=yes
4459 ac_cv_prog_cxx_g=no
4460 CXXFLAGS="-g"
4461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4462 /* end confdefs.h. */
4463
4464 int
4465 main (void)
4466 {
4467
4468 ;
4469 return 0;
4470 }
4471 _ACEOF
4472 if ac_fn_cxx_try_compile "$LINENO"
4473 then :
4474 ac_cv_prog_cxx_g=yes
4475 else case e in #(
4476 e) CXXFLAGS=""
4477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4478 /* end confdefs.h. */
4479
4480 int
4481 main (void)
4482 {
4483
4484 ;
4485 return 0;
4486 }
4487 _ACEOF
4488 if ac_fn_cxx_try_compile "$LINENO"
4489 then :
4490
4491 else case e in #(
4492 e) ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4493 CXXFLAGS="-g"
4494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4495 /* end confdefs.h. */
4496
4497 int
4498 main (void)
4499 {
4500
4501 ;
4502 return 0;
4503 }
4504 _ACEOF
4505 if ac_fn_cxx_try_compile "$LINENO"
4506 then :
4507 ac_cv_prog_cxx_g=yes
4508 fi
4509 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
4510 esac
4511 fi
4512 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
4513 esac
4514 fi
4515 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4516 ac_cxx_werror_flag=$ac_save_cxx_werror_flag ;;
4517 esac
4518 fi
4519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4520 printf "%s\n" "$ac_cv_prog_cxx_g" >&6; }
4521 if test $ac_test_CXXFLAGS; then
4522 CXXFLAGS=$ac_save_CXXFLAGS
4523 elif test $ac_cv_prog_cxx_g = yes; then
4524 if test "$GXX" = yes; then
4525 CXXFLAGS="-g -O2"
4526 else
4527 CXXFLAGS="-g"
4528 fi
4529 else
4530 if test "$GXX" = yes; then
4531 CXXFLAGS="-O2"
4532 else
4533 CXXFLAGS=
4534 fi
4535 fi
4536 ac_prog_cxx_stdcxx=no
4537 if test x$ac_prog_cxx_stdcxx = xno
4538 then :
4539 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
4540 printf %s "checking for $CXX option to enable C++11 features... " >&6; }
4541 if test ${ac_cv_prog_cxx_cxx11+y}
4542 then :
4543 printf %s "(cached) " >&6
4544 else case e in #(
4545 e) ac_cv_prog_cxx_cxx11=no
4546 ac_save_CXX=$CXX
4547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4548 /* end confdefs.h. */
4549 $ac_cxx_conftest_cxx11_program
4550 _ACEOF
4551 for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA
4552 do
4553 CXX="$ac_save_CXX $ac_arg"
4554 if ac_fn_cxx_try_compile "$LINENO"
4555 then :
4556 ac_cv_prog_cxx_cxx11=$ac_arg
4557 fi
4558 rm -f core conftest.err conftest.$ac_objext conftest.beam
4559 test "x$ac_cv_prog_cxx_cxx11" != "xno" && break
4560 done
4561 rm -f conftest.$ac_ext
4562 CXX=$ac_save_CXX ;;
4563 esac
4564 fi
4565
4566 if test "x$ac_cv_prog_cxx_cxx11" = xno
4567 then :
4568 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4569 printf "%s\n" "unsupported" >&6; }
4570 else case e in #(
4571 e) if test "x$ac_cv_prog_cxx_cxx11" = x
4572 then :
4573 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4574 printf "%s\n" "none needed" >&6; }
4575 else case e in #(
4576 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
4577 printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; }
4578 CXX="$CXX $ac_cv_prog_cxx_cxx11" ;;
4579 esac
4580 fi
4581 ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
4582 ac_prog_cxx_stdcxx=cxx11 ;;
4583 esac
4584 fi
4585 fi
4586 if test x$ac_prog_cxx_stdcxx = xno
4587 then :
4588 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
4589 printf %s "checking for $CXX option to enable C++98 features... " >&6; }
4590 if test ${ac_cv_prog_cxx_cxx98+y}
4591 then :
4592 printf %s "(cached) " >&6
4593 else case e in #(
4594 e) ac_cv_prog_cxx_cxx98=no
4595 ac_save_CXX=$CXX
4596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4597 /* end confdefs.h. */
4598 $ac_cxx_conftest_cxx98_program
4599 _ACEOF
4600 for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA
4601 do
4602 CXX="$ac_save_CXX $ac_arg"
4603 if ac_fn_cxx_try_compile "$LINENO"
4604 then :
4605 ac_cv_prog_cxx_cxx98=$ac_arg
4606 fi
4607 rm -f core conftest.err conftest.$ac_objext conftest.beam
4608 test "x$ac_cv_prog_cxx_cxx98" != "xno" && break
4609 done
4610 rm -f conftest.$ac_ext
4611 CXX=$ac_save_CXX ;;
4612 esac
4613 fi
4614
4615 if test "x$ac_cv_prog_cxx_cxx98" = xno
4616 then :
4617 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4618 printf "%s\n" "unsupported" >&6; }
4619 else case e in #(
4620 e) if test "x$ac_cv_prog_cxx_cxx98" = x
4621 then :
4622 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4623 printf "%s\n" "none needed" >&6; }
4624 else case e in #(
4625 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
4626 printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; }
4627 CXX="$CXX $ac_cv_prog_cxx_cxx98" ;;
4628 esac
4629 fi
4630 ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98
4631 ac_prog_cxx_stdcxx=cxx98 ;;
4632 esac
4633 fi
4634 fi
4635
4636 ac_ext=c
4637 ac_cpp='$CPP $CPPFLAGS'
4638 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4639 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4640 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4641
4642
4643 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
4644 ac_ext=cpp
4645 ac_cpp='$CXXCPP $CPPFLAGS'
4646 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4647 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4648 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4649 ac_success=no
4650
4651 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
4652 printf %s "checking whether $CXX supports C++11 features by default... " >&6; }
4653 if test ${ax_cv_cxx_compile_cxx11+y}
4654 then :
4655 printf %s "(cached) " >&6
4656 else case e in #(
4657 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4658 /* end confdefs.h. */
4659
4660
4661 // If the compiler admits that it is not ready for C++11, why torture it?
4662 // Hopefully, this will speed up the test.
4663
4664 #ifndef __cplusplus
4665
4666 #error "This is not a C++ compiler"
4667
4668 // MSVC always sets __cplusplus to 199711L in older versions; newer versions
4669 // only set it correctly if /Zc:__cplusplus is specified as well as a
4670 // /std:c++NN switch:
4671 // https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
4672 #elif __cplusplus < 201103L && !defined _MSC_VER
4673
4674 #error "This is not a C++11 compiler"
4675
4676 #else
4677
4678 namespace cxx11
4679 {
4680
4681 namespace test_static_assert
4682 {
4683
4684 template <typename T>
4685 struct check
4686 {
4687 static_assert(sizeof(int) <= sizeof(T), "not big enough");
4688 };
4689
4690 }
4691
4692 namespace test_final_override
4693 {
4694
4695 struct Base
4696 {
4697 virtual ~Base() {}
4698 virtual void f() {}
4699 };
4700
4701 struct Derived : public Base
4702 {
4703 virtual ~Derived() override {}
4704 virtual void f() override {}
4705 };
4706
4707 }
4708
4709 namespace test_double_right_angle_brackets
4710 {
4711
4712 template < typename T >
4713 struct check {};
4714
4715 typedef check<void> single_type;
4716 typedef check<check<void>> double_type;
4717 typedef check<check<check<void>>> triple_type;
4718 typedef check<check<check<check<void>>>> quadruple_type;
4719
4720 }
4721
4722 namespace test_decltype
4723 {
4724
4725 int
4726 f()
4727 {
4728 int a = 1;
4729 decltype(a) b = 2;
4730 return a + b;
4731 }
4732
4733 }
4734
4735 namespace test_type_deduction
4736 {
4737
4738 template < typename T1, typename T2 >
4739 struct is_same
4740 {
4741 static const bool value = false;
4742 };
4743
4744 template < typename T >
4745 struct is_same<T, T>
4746 {
4747 static const bool value = true;
4748 };
4749
4750 template < typename T1, typename T2 >
4751 auto
4752 add(T1 a1, T2 a2) -> decltype(a1 + a2)
4753 {
4754 return a1 + a2;
4755 }
4756
4757 int
4758 test(const int c, volatile int v)
4759 {
4760 static_assert(is_same<int, decltype(0)>::value == true, "");
4761 static_assert(is_same<int, decltype(c)>::value == false, "");
4762 static_assert(is_same<int, decltype(v)>::value == false, "");
4763 auto ac = c;
4764 auto av = v;
4765 auto sumi = ac + av + 'x';
4766 auto sumf = ac + av + 1.0;
4767 static_assert(is_same<int, decltype(ac)>::value == true, "");
4768 static_assert(is_same<int, decltype(av)>::value == true, "");
4769 static_assert(is_same<int, decltype(sumi)>::value == true, "");
4770 static_assert(is_same<int, decltype(sumf)>::value == false, "");
4771 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
4772 return (sumf > 0.0) ? sumi : add(c, v);
4773 }
4774
4775 }
4776
4777 namespace test_noexcept
4778 {
4779
4780 int f() { return 0; }
4781 int g() noexcept { return 0; }
4782
4783 static_assert(noexcept(f()) == false, "");
4784 static_assert(noexcept(g()) == true, "");
4785
4786 }
4787
4788 namespace test_constexpr
4789 {
4790
4791 template < typename CharT >
4792 unsigned long constexpr
4793 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
4794 {
4795 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
4796 }
4797
4798 template < typename CharT >
4799 unsigned long constexpr
4800 strlen_c(const CharT *const s) noexcept
4801 {
4802 return strlen_c_r(s, 0UL);
4803 }
4804
4805 static_assert(strlen_c("") == 0UL, "");
4806 static_assert(strlen_c("1") == 1UL, "");
4807 static_assert(strlen_c("example") == 7UL, "");
4808 static_assert(strlen_c("another\0example") == 7UL, "");
4809
4810 }
4811
4812 namespace test_rvalue_references
4813 {
4814
4815 template < int N >
4816 struct answer
4817 {
4818 static constexpr int value = N;
4819 };
4820
4821 answer<1> f(int&) { return answer<1>(); }
4822 answer<2> f(const int&) { return answer<2>(); }
4823 answer<3> f(int&&) { return answer<3>(); }
4824
4825 void
4826 test()
4827 {
4828 int i = 0;
4829 const int c = 0;
4830 static_assert(decltype(f(i))::value == 1, "");
4831 static_assert(decltype(f(c))::value == 2, "");
4832 static_assert(decltype(f(0))::value == 3, "");
4833 }
4834
4835 }
4836
4837 namespace test_uniform_initialization
4838 {
4839
4840 struct test
4841 {
4842 static const int zero {};
4843 static const int one {1};
4844 };
4845
4846 static_assert(test::zero == 0, "");
4847 static_assert(test::one == 1, "");
4848
4849 }
4850
4851 namespace test_lambdas
4852 {
4853
4854 void
4855 test1()
4856 {
4857 auto lambda1 = [](){};
4858 auto lambda2 = lambda1;
4859 lambda1();
4860 lambda2();
4861 }
4862
4863 int
4864 test2()
4865 {
4866 auto a = [](int i, int j){ return i + j; }(1, 2);
4867 auto b = []() -> int { return '0'; }();
4868 auto c = [=](){ return a + b; }();
4869 auto d = [&](){ return c; }();
4870 auto e = [a, &b](int x) mutable {
4871 const auto identity = [](int y){ return y; };
4872 for (auto i = 0; i < a; ++i)
4873 a += b--;
4874 return x + identity(a + b);
4875 }(0);
4876 return a + b + c + d + e;
4877 }
4878
4879 int
4880 test3()
4881 {
4882 const auto nullary = [](){ return 0; };
4883 const auto unary = [](int x){ return x; };
4884 using nullary_t = decltype(nullary);
4885 using unary_t = decltype(unary);
4886 const auto higher1st = [](nullary_t f){ return f(); };
4887 const auto higher2nd = [unary](nullary_t f1){
4888 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
4889 };
4890 return higher1st(nullary) + higher2nd(nullary)(unary);
4891 }
4892
4893 }
4894
4895 namespace test_variadic_templates
4896 {
4897
4898 template <int...>
4899 struct sum;
4900
4901 template <int N0, int... N1toN>
4902 struct sum<N0, N1toN...>
4903 {
4904 static constexpr int value = N0 + sum<N1toN...>::value;
4905 };
4906
4907 template <>
4908 struct sum<>
4909 {
4910 static constexpr int value = 0;
4911 };
4912
4913 static_assert(sum<>::value == 0, "");
4914 static_assert(sum<1>::value == 1, "");
4915 static_assert(sum<23>::value == 23, "");
4916 static_assert(sum<1, 2>::value == 3, "");
4917 static_assert(sum<5, 5, 11>::value == 21, "");
4918 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
4919
4920 }
4921
4922 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
4923 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
4924 // because of this.
4925 namespace test_template_alias_sfinae
4926 {
4927
4928 struct foo {};
4929
4930 template<typename T>
4931 using member = typename T::member_type;
4932
4933 template<typename T>
4934 void func(...) {}
4935
4936 template<typename T>
4937 void func(member<T>*) {}
4938
4939 void test();
4940
4941 void test() { func<foo>(0); }
4942
4943 }
4944
4945 } // namespace cxx11
4946
4947 #endif // __cplusplus >= 201103L
4948
4949
4950
4951 _ACEOF
4952 if ac_fn_cxx_try_compile "$LINENO"
4953 then :
4954 ax_cv_cxx_compile_cxx11=yes
4955 else case e in #(
4956 e) ax_cv_cxx_compile_cxx11=no ;;
4957 esac
4958 fi
4959 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
4960 esac
4961 fi
4962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
4963 printf "%s\n" "$ax_cv_cxx_compile_cxx11" >&6; }
4964 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
4965 ac_success=yes
4966 fi
4967
4968 if test x$ac_success = xno; then
4969 for alternative in ${ax_cxx_compile_alternatives}; do
4970 switch="-std=gnu++${alternative}"
4971 cachevar=`printf "%s\n" "ax_cv_cxx_compile_cxx11_$switch" | sed "$as_sed_sh"`
4972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
4973 printf %s "checking whether $CXX supports C++11 features with $switch... " >&6; }
4974 if eval test \${$cachevar+y}
4975 then :
4976 printf %s "(cached) " >&6
4977 else case e in #(
4978 e) ac_save_CXX="$CXX"
4979 CXX="$CXX $switch"
4980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4981 /* end confdefs.h. */
4982
4983
4984 // If the compiler admits that it is not ready for C++11, why torture it?
4985 // Hopefully, this will speed up the test.
4986
4987 #ifndef __cplusplus
4988
4989 #error "This is not a C++ compiler"
4990
4991 // MSVC always sets __cplusplus to 199711L in older versions; newer versions
4992 // only set it correctly if /Zc:__cplusplus is specified as well as a
4993 // /std:c++NN switch:
4994 // https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
4995 #elif __cplusplus < 201103L && !defined _MSC_VER
4996
4997 #error "This is not a C++11 compiler"
4998
4999 #else
5000
5001 namespace cxx11
5002 {
5003
5004 namespace test_static_assert
5005 {
5006
5007 template <typename T>
5008 struct check
5009 {
5010 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5011 };
5012
5013 }
5014
5015 namespace test_final_override
5016 {
5017
5018 struct Base
5019 {
5020 virtual ~Base() {}
5021 virtual void f() {}
5022 };
5023
5024 struct Derived : public Base
5025 {
5026 virtual ~Derived() override {}
5027 virtual void f() override {}
5028 };
5029
5030 }
5031
5032 namespace test_double_right_angle_brackets
5033 {
5034
5035 template < typename T >
5036 struct check {};
5037
5038 typedef check<void> single_type;
5039 typedef check<check<void>> double_type;
5040 typedef check<check<check<void>>> triple_type;
5041 typedef check<check<check<check<void>>>> quadruple_type;
5042
5043 }
5044
5045 namespace test_decltype
5046 {
5047
5048 int
5049 f()
5050 {
5051 int a = 1;
5052 decltype(a) b = 2;
5053 return a + b;
5054 }
5055
5056 }
5057
5058 namespace test_type_deduction
5059 {
5060
5061 template < typename T1, typename T2 >
5062 struct is_same
5063 {
5064 static const bool value = false;
5065 };
5066
5067 template < typename T >
5068 struct is_same<T, T>
5069 {
5070 static const bool value = true;
5071 };
5072
5073 template < typename T1, typename T2 >
5074 auto
5075 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5076 {
5077 return a1 + a2;
5078 }
5079
5080 int
5081 test(const int c, volatile int v)
5082 {
5083 static_assert(is_same<int, decltype(0)>::value == true, "");
5084 static_assert(is_same<int, decltype(c)>::value == false, "");
5085 static_assert(is_same<int, decltype(v)>::value == false, "");
5086 auto ac = c;
5087 auto av = v;
5088 auto sumi = ac + av + 'x';
5089 auto sumf = ac + av + 1.0;
5090 static_assert(is_same<int, decltype(ac)>::value == true, "");
5091 static_assert(is_same<int, decltype(av)>::value == true, "");
5092 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5093 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5094 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5095 return (sumf > 0.0) ? sumi : add(c, v);
5096 }
5097
5098 }
5099
5100 namespace test_noexcept
5101 {
5102
5103 int f() { return 0; }
5104 int g() noexcept { return 0; }
5105
5106 static_assert(noexcept(f()) == false, "");
5107 static_assert(noexcept(g()) == true, "");
5108
5109 }
5110
5111 namespace test_constexpr
5112 {
5113
5114 template < typename CharT >
5115 unsigned long constexpr
5116 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5117 {
5118 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5119 }
5120
5121 template < typename CharT >
5122 unsigned long constexpr
5123 strlen_c(const CharT *const s) noexcept
5124 {
5125 return strlen_c_r(s, 0UL);
5126 }
5127
5128 static_assert(strlen_c("") == 0UL, "");
5129 static_assert(strlen_c("1") == 1UL, "");
5130 static_assert(strlen_c("example") == 7UL, "");
5131 static_assert(strlen_c("another\0example") == 7UL, "");
5132
5133 }
5134
5135 namespace test_rvalue_references
5136 {
5137
5138 template < int N >
5139 struct answer
5140 {
5141 static constexpr int value = N;
5142 };
5143
5144 answer<1> f(int&) { return answer<1>(); }
5145 answer<2> f(const int&) { return answer<2>(); }
5146 answer<3> f(int&&) { return answer<3>(); }
5147
5148 void
5149 test()
5150 {
5151 int i = 0;
5152 const int c = 0;
5153 static_assert(decltype(f(i))::value == 1, "");
5154 static_assert(decltype(f(c))::value == 2, "");
5155 static_assert(decltype(f(0))::value == 3, "");
5156 }
5157
5158 }
5159
5160 namespace test_uniform_initialization
5161 {
5162
5163 struct test
5164 {
5165 static const int zero {};
5166 static const int one {1};
5167 };
5168
5169 static_assert(test::zero == 0, "");
5170 static_assert(test::one == 1, "");
5171
5172 }
5173
5174 namespace test_lambdas
5175 {
5176
5177 void
5178 test1()
5179 {
5180 auto lambda1 = [](){};
5181 auto lambda2 = lambda1;
5182 lambda1();
5183 lambda2();
5184 }
5185
5186 int
5187 test2()
5188 {
5189 auto a = [](int i, int j){ return i + j; }(1, 2);
5190 auto b = []() -> int { return '0'; }();
5191 auto c = [=](){ return a + b; }();
5192 auto d = [&](){ return c; }();
5193 auto e = [a, &b](int x) mutable {
5194 const auto identity = [](int y){ return y; };
5195 for (auto i = 0; i < a; ++i)
5196 a += b--;
5197 return x + identity(a + b);
5198 }(0);
5199 return a + b + c + d + e;
5200 }
5201
5202 int
5203 test3()
5204 {
5205 const auto nullary = [](){ return 0; };
5206 const auto unary = [](int x){ return x; };
5207 using nullary_t = decltype(nullary);
5208 using unary_t = decltype(unary);
5209 const auto higher1st = [](nullary_t f){ return f(); };
5210 const auto higher2nd = [unary](nullary_t f1){
5211 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5212 };
5213 return higher1st(nullary) + higher2nd(nullary)(unary);
5214 }
5215
5216 }
5217
5218 namespace test_variadic_templates
5219 {
5220
5221 template <int...>
5222 struct sum;
5223
5224 template <int N0, int... N1toN>
5225 struct sum<N0, N1toN...>
5226 {
5227 static constexpr int value = N0 + sum<N1toN...>::value;
5228 };
5229
5230 template <>
5231 struct sum<>
5232 {
5233 static constexpr int value = 0;
5234 };
5235
5236 static_assert(sum<>::value == 0, "");
5237 static_assert(sum<1>::value == 1, "");
5238 static_assert(sum<23>::value == 23, "");
5239 static_assert(sum<1, 2>::value == 3, "");
5240 static_assert(sum<5, 5, 11>::value == 21, "");
5241 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5242
5243 }
5244
5245 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5246 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5247 // because of this.
5248 namespace test_template_alias_sfinae
5249 {
5250
5251 struct foo {};
5252
5253 template<typename T>
5254 using member = typename T::member_type;
5255
5256 template<typename T>
5257 void func(...) {}
5258
5259 template<typename T>
5260 void func(member<T>*) {}
5261
5262 void test();
5263
5264 void test() { func<foo>(0); }
5265
5266 }
5267
5268 } // namespace cxx11
5269
5270 #endif // __cplusplus >= 201103L
5271
5272
5273
5274 _ACEOF
5275 if ac_fn_cxx_try_compile "$LINENO"
5276 then :
5277 eval $cachevar=yes
5278 else case e in #(
5279 e) eval $cachevar=no ;;
5280 esac
5281 fi
5282 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5283 CXX="$ac_save_CXX" ;;
5284 esac
5285 fi
5286 eval ac_res=\$$cachevar
5287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5288 printf "%s\n" "$ac_res" >&6; }
5289 if eval test x\$$cachevar = xyes; then
5290 CXX="$CXX $switch"
5291 if test -n "$CXXCPP" ; then
5292 CXXCPP="$CXXCPP $switch"
5293 fi
5294 ac_success=yes
5295 break
5296 fi
5297 done
5298 fi
5299
5300 if test x$ac_success = xno; then
5301 for alternative in ${ax_cxx_compile_alternatives}; do
5302 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5303 cachevar=`printf "%s\n" "ax_cv_cxx_compile_cxx11_$switch" | sed "$as_sed_sh"`
5304 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5305 printf %s "checking whether $CXX supports C++11 features with $switch... " >&6; }
5306 if eval test \${$cachevar+y}
5307 then :
5308 printf %s "(cached) " >&6
5309 else case e in #(
5310 e) ac_save_CXX="$CXX"
5311 CXX="$CXX $switch"
5312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5313 /* end confdefs.h. */
5314
5315
5316 // If the compiler admits that it is not ready for C++11, why torture it?
5317 // Hopefully, this will speed up the test.
5318
5319 #ifndef __cplusplus
5320
5321 #error "This is not a C++ compiler"
5322
5323 // MSVC always sets __cplusplus to 199711L in older versions; newer versions
5324 // only set it correctly if /Zc:__cplusplus is specified as well as a
5325 // /std:c++NN switch:
5326 // https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
5327 #elif __cplusplus < 201103L && !defined _MSC_VER
5328
5329 #error "This is not a C++11 compiler"
5330
5331 #else
5332
5333 namespace cxx11
5334 {
5335
5336 namespace test_static_assert
5337 {
5338
5339 template <typename T>
5340 struct check
5341 {
5342 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5343 };
5344
5345 }
5346
5347 namespace test_final_override
5348 {
5349
5350 struct Base
5351 {
5352 virtual ~Base() {}
5353 virtual void f() {}
5354 };
5355
5356 struct Derived : public Base
5357 {
5358 virtual ~Derived() override {}
5359 virtual void f() override {}
5360 };
5361
5362 }
5363
5364 namespace test_double_right_angle_brackets
5365 {
5366
5367 template < typename T >
5368 struct check {};
5369
5370 typedef check<void> single_type;
5371 typedef check<check<void>> double_type;
5372 typedef check<check<check<void>>> triple_type;
5373 typedef check<check<check<check<void>>>> quadruple_type;
5374
5375 }
5376
5377 namespace test_decltype
5378 {
5379
5380 int
5381 f()
5382 {
5383 int a = 1;
5384 decltype(a) b = 2;
5385 return a + b;
5386 }
5387
5388 }
5389
5390 namespace test_type_deduction
5391 {
5392
5393 template < typename T1, typename T2 >
5394 struct is_same
5395 {
5396 static const bool value = false;
5397 };
5398
5399 template < typename T >
5400 struct is_same<T, T>
5401 {
5402 static const bool value = true;
5403 };
5404
5405 template < typename T1, typename T2 >
5406 auto
5407 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5408 {
5409 return a1 + a2;
5410 }
5411
5412 int
5413 test(const int c, volatile int v)
5414 {
5415 static_assert(is_same<int, decltype(0)>::value == true, "");
5416 static_assert(is_same<int, decltype(c)>::value == false, "");
5417 static_assert(is_same<int, decltype(v)>::value == false, "");
5418 auto ac = c;
5419 auto av = v;
5420 auto sumi = ac + av + 'x';
5421 auto sumf = ac + av + 1.0;
5422 static_assert(is_same<int, decltype(ac)>::value == true, "");
5423 static_assert(is_same<int, decltype(av)>::value == true, "");
5424 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5425 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5426 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5427 return (sumf > 0.0) ? sumi : add(c, v);
5428 }
5429
5430 }
5431
5432 namespace test_noexcept
5433 {
5434
5435 int f() { return 0; }
5436 int g() noexcept { return 0; }
5437
5438 static_assert(noexcept(f()) == false, "");
5439 static_assert(noexcept(g()) == true, "");
5440
5441 }
5442
5443 namespace test_constexpr
5444 {
5445
5446 template < typename CharT >
5447 unsigned long constexpr
5448 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5449 {
5450 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5451 }
5452
5453 template < typename CharT >
5454 unsigned long constexpr
5455 strlen_c(const CharT *const s) noexcept
5456 {
5457 return strlen_c_r(s, 0UL);
5458 }
5459
5460 static_assert(strlen_c("") == 0UL, "");
5461 static_assert(strlen_c("1") == 1UL, "");
5462 static_assert(strlen_c("example") == 7UL, "");
5463 static_assert(strlen_c("another\0example") == 7UL, "");
5464
5465 }
5466
5467 namespace test_rvalue_references
5468 {
5469
5470 template < int N >
5471 struct answer
5472 {
5473 static constexpr int value = N;
5474 };
5475
5476 answer<1> f(int&) { return answer<1>(); }
5477 answer<2> f(const int&) { return answer<2>(); }
5478 answer<3> f(int&&) { return answer<3>(); }
5479
5480 void
5481 test()
5482 {
5483 int i = 0;
5484 const int c = 0;
5485 static_assert(decltype(f(i))::value == 1, "");
5486 static_assert(decltype(f(c))::value == 2, "");
5487 static_assert(decltype(f(0))::value == 3, "");
5488 }
5489
5490 }
5491
5492 namespace test_uniform_initialization
5493 {
5494
5495 struct test
5496 {
5497 static const int zero {};
5498 static const int one {1};
5499 };
5500
5501 static_assert(test::zero == 0, "");
5502 static_assert(test::one == 1, "");
5503
5504 }
5505
5506 namespace test_lambdas
5507 {
5508
5509 void
5510 test1()
5511 {
5512 auto lambda1 = [](){};
5513 auto lambda2 = lambda1;
5514 lambda1();
5515 lambda2();
5516 }
5517
5518 int
5519 test2()
5520 {
5521 auto a = [](int i, int j){ return i + j; }(1, 2);
5522 auto b = []() -> int { return '0'; }();
5523 auto c = [=](){ return a + b; }();
5524 auto d = [&](){ return c; }();
5525 auto e = [a, &b](int x) mutable {
5526 const auto identity = [](int y){ return y; };
5527 for (auto i = 0; i < a; ++i)
5528 a += b--;
5529 return x + identity(a + b);
5530 }(0);
5531 return a + b + c + d + e;
5532 }
5533
5534 int
5535 test3()
5536 {
5537 const auto nullary = [](){ return 0; };
5538 const auto unary = [](int x){ return x; };
5539 using nullary_t = decltype(nullary);
5540 using unary_t = decltype(unary);
5541 const auto higher1st = [](nullary_t f){ return f(); };
5542 const auto higher2nd = [unary](nullary_t f1){
5543 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5544 };
5545 return higher1st(nullary) + higher2nd(nullary)(unary);
5546 }
5547
5548 }
5549
5550 namespace test_variadic_templates
5551 {
5552
5553 template <int...>
5554 struct sum;
5555
5556 template <int N0, int... N1toN>
5557 struct sum<N0, N1toN...>
5558 {
5559 static constexpr int value = N0 + sum<N1toN...>::value;
5560 };
5561
5562 template <>
5563 struct sum<>
5564 {
5565 static constexpr int value = 0;
5566 };
5567
5568 static_assert(sum<>::value == 0, "");
5569 static_assert(sum<1>::value == 1, "");
5570 static_assert(sum<23>::value == 23, "");
5571 static_assert(sum<1, 2>::value == 3, "");
5572 static_assert(sum<5, 5, 11>::value == 21, "");
5573 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5574
5575 }
5576
5577 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5578 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5579 // because of this.
5580 namespace test_template_alias_sfinae
5581 {
5582
5583 struct foo {};
5584
5585 template<typename T>
5586 using member = typename T::member_type;
5587
5588 template<typename T>
5589 void func(...) {}
5590
5591 template<typename T>
5592 void func(member<T>*) {}
5593
5594 void test();
5595
5596 void test() { func<foo>(0); }
5597
5598 }
5599
5600 } // namespace cxx11
5601
5602 #endif // __cplusplus >= 201103L
5603
5604
5605
5606 _ACEOF
5607 if ac_fn_cxx_try_compile "$LINENO"
5608 then :
5609 eval $cachevar=yes
5610 else case e in #(
5611 e) eval $cachevar=no ;;
5612 esac
5613 fi
5614 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5615 CXX="$ac_save_CXX" ;;
5616 esac
5617 fi
5618 eval ac_res=\$$cachevar
5619 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5620 printf "%s\n" "$ac_res" >&6; }
5621 if eval test x\$$cachevar = xyes; then
5622 CXX="$CXX $switch"
5623 if test -n "$CXXCPP" ; then
5624 CXXCPP="$CXXCPP $switch"
5625 fi
5626 ac_success=yes
5627 break
5628 fi
5629 done
5630 if test x$ac_success = xyes; then
5631 break
5632 fi
5633 done
5634 fi
5635 ac_ext=c
5636 ac_cpp='$CPP $CPPFLAGS'
5637 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5638 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5639 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5640
5641 if test x$ax_cxx_compile_cxx11_required = xtrue; then
5642 if test x$ac_success = xno; then
5643 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
5644 fi
5645 fi
5646 if test x$ac_success = xno; then
5647 HAVE_CXX11=0
5648 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
5649 printf "%s\n" "$as_me: No compiler with C++11 support was found" >&6;}
5650 else
5651 HAVE_CXX11=1
5652
5653 printf "%s\n" "#define HAVE_CXX11 1" >>confdefs.h
5654
5655 fi
5656
5657
5658
5659 ac_ext=c
5660 ac_cpp='$CPP $CPPFLAGS'
5661 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5662 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5663 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5664
5665
5666
5667
5668
5669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ABI flags" >&5
5670 printf %s "checking ABI flags... " >&6; }
5671 if test "x$ABI" = "x" ; then
5672 ABI_CFLAGS=""
5673 elif test "$ABI" = "64"; then
5674 ABI_CFLAGS="-m64"
5675 elif test "$ABI" = "32"; then
5676 ABI_CFLAGS="-m32"
5677 else
5678 as_fn_error $? " $ABI is not a supported value for ABI. The supported values are ABI=64
5679 or 32." "$LINENO" 5
5680 fi
5681 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ABI_CFLAGS" >&5
5682 printf "%s\n" "$ABI_CFLAGS" >&6; }
5683
5684
5685
5686 if test -n $ABI_CFLAGS
5687 then :
5688
5689 CC="$CC $ABI_CFLAGS"
5690 CXX="$CXX $ABI_CFLAGS"
5691
5692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5693 /* end confdefs.h. */
5694
5695 int
5696 main (void)
5697 {
5698
5699 ;
5700 return 0;
5701 }
5702 _ACEOF
5703 if ac_fn_c_try_link "$LINENO"
5704 then :
5705
5706 else case e in #(
5707 e) as_fn_error $? "ABI_CFLAGS=\"$ABI_CFLAGS\" not supported" "$LINENO" 5
5708 ;;
5709 esac
5710 fi
5711 rm -f core conftest.err conftest.$ac_objext conftest.beam \
5712 conftest$ac_exeext conftest.$ac_ext
5713
5714 fi
5715
5716 ac_header= ac_cache=
5717 for ac_item in $ac_header_c_list
5718 do
5719 if test $ac_cache; then
5720 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
5721 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
5722 printf "%s\n" "#define $ac_item 1" >> confdefs.h
5723 fi
5724 ac_header= ac_cache=
5725 elif test $ac_header; then
5726 ac_cache=$ac_item
5727 else
5728 ac_header=$ac_item
5729 fi
5730 done
5731
5732
5733
5734
5735
5736
5737
5738
5739 if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
5740 then :
5741
5742 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
5743
5744 fi
5745 # The cast to long int works around a bug in the HP C Compiler
5746 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5747 # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
5748 # This bug is HP SR number 8606223364.
5749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
5750 printf %s "checking size of void *... " >&6; }
5751 if test ${ac_cv_sizeof_void_p+y}
5752 then :
5753 printf %s "(cached) " >&6
5754 else case e in #(
5755 e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"
5756 then :
5757
5758 else case e in #(
5759 e) if test "$ac_cv_type_void_p" = yes; then
5760 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
5761 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
5762 as_fn_error 77 "cannot compute sizeof (void *)
5763 See 'config.log' for more details" "$LINENO" 5; }
5764 else
5765 ac_cv_sizeof_void_p=0
5766 fi ;;
5767 esac
5768 fi
5769 ;;
5770 esac
5771 fi
5772 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
5773 printf "%s\n" "$ac_cv_sizeof_void_p" >&6; }
5774
5775
5776
5777 printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h
5778
5779
5780
5781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ABI bit size" >&5
5782 printf %s "checking ABI bit size... " >&6; }
5783 if test "x$ABI" = "x" ; then
5784 if test $ac_cv_sizeof_void_p = 8; then
5785 ABI="64"
5786 else
5787 ABI="32"
5788 fi
5789 elif test "$ABI" = "32"; then
5790 if test $ac_cv_sizeof_void_p != 4; then
5791 as_fn_error $? " ABI=32 used by sizeof(void *) != 4." "$LINENO" 5
5792 fi
5793 elif test "$ABI" = "64"; then
5794 if test $ac_cv_sizeof_void_p != 8; then
5795 as_fn_error $? " ABI=64 used by sizeof(void *) != 8." "$LINENO" 5
5796 fi
5797 fi
5798 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ABI" >&5
5799 printf "%s\n" "$ABI" >&6; }
5800
5801
5802
5803
5804
5805 # Find a good install program. We prefer a C program (faster),
5806 # so one script is as good as another. But avoid the broken or
5807 # incompatible versions:
5808 # SysV /etc/install, /usr/sbin/install
5809 # SunOS /usr/etc/install
5810 # IRIX /sbin/install
5811 # AIX /bin/install
5812 # AmigaOS /C/install, which installs bootblocks on floppy discs
5813 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5814 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
5815 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5816 # OS/2's system install, which has a completely different semantic
5817 # ./install, which can be erroneously created by make from ./install.sh.
5818 # Reject install programs that cannot install multiple files.
5819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5820 printf %s "checking for a BSD-compatible install... " >&6; }
5821 if test -z "$INSTALL"; then
5822 if test ${ac_cv_path_install+y}
5823 then :
5824 printf %s "(cached) " >&6
5825 else case e in #(
5826 e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5827 for as_dir in $PATH
5828 do
5829 IFS=$as_save_IFS
5830 case $as_dir in #(((
5831 '') as_dir=./ ;;
5832 */) ;;
5833 *) as_dir=$as_dir/ ;;
5834 esac
5835 # Account for fact that we put trailing slashes in our PATH walk.
5836 case $as_dir in #((
5837 ./ | /[cC]/* | \
5838 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5839 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
5840 /usr/ucb/* ) ;;
5841 *)
5842 # OSF1 and SCO ODT 3.0 have their own names for install.
5843 # Don't use installbsd from OSF since it installs stuff as root
5844 # by default.
5845 for ac_prog in ginstall scoinst install; do
5846 for ac_exec_ext in '' $ac_executable_extensions; do
5847 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
5848 if test $ac_prog = install &&
5849 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5850 # AIX install. It has an incompatible calling convention.
5851 :
5852 elif test $ac_prog = install &&
5853 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5854 # program-specific install script used by HP pwplus--don't use.
5855 :
5856 else
5857 rm -rf conftest.one conftest.two conftest.dir
5858 echo one > conftest.one
5859 echo two > conftest.two
5860 mkdir conftest.dir
5861 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
5862 test -s conftest.one && test -s conftest.two &&
5863 test -s conftest.dir/conftest.one &&
5864 test -s conftest.dir/conftest.two
5865 then
5866 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
5867 break 3
5868 fi
5869 fi
5870 fi
5871 done
5872 done
5873 ;;
5874 esac
5875
5876 done
5877 IFS=$as_save_IFS
5878
5879 rm -rf conftest.one conftest.two conftest.dir
5880 ;;
5881 esac
5882 fi
5883 if test ${ac_cv_path_install+y}; then
5884 INSTALL=$ac_cv_path_install
5885 else
5886 # As a last resort, use the slow shell script. Don't cache a
5887 # value for INSTALL within a source directory, because that will
5888 # break other packages using the cache if that directory is
5889 # removed, or if the value is a relative name.
5890 INSTALL=$ac_install_sh
5891 fi
5892 fi
5893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5894 printf "%s\n" "$INSTALL" >&6; }
5895
5896 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5897 # It thinks the first close brace ends the variable substitution.
5898 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5899
5900 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5901
5902 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5903
5904
5905 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5
5906 printf %s "checking for a race-free mkdir -p... " >&6; }
5907 if test -z "$MKDIR_P"; then
5908 if test ${ac_cv_path_mkdir+y}
5909 then :
5910 printf %s "(cached) " >&6
5911 else case e in #(
5912 e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5913 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5914 do
5915 IFS=$as_save_IFS
5916 case $as_dir in #(((
5917 '') as_dir=./ ;;
5918 */) ;;
5919 *) as_dir=$as_dir/ ;;
5920 esac
5921 for ac_prog in mkdir gmkdir; do
5922 for ac_exec_ext in '' $ac_executable_extensions; do
5923 as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue
5924 case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #(
5925 'mkdir ('*'coreutils) '* | \
5926 *'BusyBox '* | \
5927 'mkdir (fileutils) '4.1*)
5928 ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext
5929 break 3;;
5930 esac
5931 done
5932 done
5933 done
5934 IFS=$as_save_IFS
5935 ;;
5936 esac
5937 fi
5938
5939 test -d ./--version && rmdir ./--version
5940 if test ${ac_cv_path_mkdir+y}; then
5941 MKDIR_P="$ac_cv_path_mkdir -p"
5942 else
5943 # As a last resort, use plain mkdir -p,
5944 # in the hope it doesn't have the bugs of ancient mkdir.
5945 MKDIR_P='mkdir -p'
5946 fi
5947 fi
5948 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5949 printf "%s\n" "$MKDIR_P" >&6; }
5950
5951
5952
5953
5954 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
5955 printf %s "checking whether byte ordering is bigendian... " >&6; }
5956 if test ${ac_cv_c_bigendian+y}
5957 then :
5958 printf %s "(cached) " >&6
5959 else case e in #(
5960 e) ac_cv_c_bigendian=unknown
5961 # See if we're dealing with a universal compiler.
5962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5963 /* end confdefs.h. */
5964 #ifndef __APPLE_CC__
5965 not a universal capable compiler
5966 #endif
5967 typedef int dummy;
5968
5969 _ACEOF
5970 if ac_fn_c_try_compile "$LINENO"
5971 then :
5972
5973 # Check for potential -arch flags. It is not universal unless
5974 # there are at least two -arch flags with different values.
5975 ac_arch=
5976 ac_prev=
5977 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
5978 if test -n "$ac_prev"; then
5979 case $ac_word in
5980 i?86 | x86_64 | ppc | ppc64)
5981 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
5982 ac_arch=$ac_word
5983 else
5984 ac_cv_c_bigendian=universal
5985 break
5986 fi
5987 ;;
5988 esac
5989 ac_prev=
5990 elif test "x$ac_word" = "x-arch"; then
5991 ac_prev=arch
5992 fi
5993 done
5994 fi
5995 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5996 if test $ac_cv_c_bigendian = unknown; then
5997 # See if sys/param.h defines the BYTE_ORDER macro.
5998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5999 /* end confdefs.h. */
6000 #include <sys/types.h>
6001 #include <sys/param.h>
6002
6003 int
6004 main (void)
6005 {
6006 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\
6007 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\
6008 && LITTLE_ENDIAN)
6009 bogus endian macros
6010 #endif
6011
6012 ;
6013 return 0;
6014 }
6015 _ACEOF
6016 if ac_fn_c_try_compile "$LINENO"
6017 then :
6018 # It does; now see whether it defined to BIG_ENDIAN or not.
6019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6020 /* end confdefs.h. */
6021 #include <sys/types.h>
6022 #include <sys/param.h>
6023
6024 int
6025 main (void)
6026 {
6027 #if BYTE_ORDER != BIG_ENDIAN
6028 not big endian
6029 #endif
6030
6031 ;
6032 return 0;
6033 }
6034 _ACEOF
6035 if ac_fn_c_try_compile "$LINENO"
6036 then :
6037 ac_cv_c_bigendian=yes
6038 else case e in #(
6039 e) ac_cv_c_bigendian=no ;;
6040 esac
6041 fi
6042 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6043 fi
6044 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6045 fi
6046 if test $ac_cv_c_bigendian = unknown; then
6047 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
6048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6049 /* end confdefs.h. */
6050 #include <limits.h>
6051
6052 int
6053 main (void)
6054 {
6055 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
6056 bogus endian macros
6057 #endif
6058
6059 ;
6060 return 0;
6061 }
6062 _ACEOF
6063 if ac_fn_c_try_compile "$LINENO"
6064 then :
6065 # It does; now see whether it defined to _BIG_ENDIAN or not.
6066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6067 /* end confdefs.h. */
6068 #include <limits.h>
6069
6070 int
6071 main (void)
6072 {
6073 #ifndef _BIG_ENDIAN
6074 not big endian
6075 #endif
6076
6077 ;
6078 return 0;
6079 }
6080 _ACEOF
6081 if ac_fn_c_try_compile "$LINENO"
6082 then :
6083 ac_cv_c_bigendian=yes
6084 else case e in #(
6085 e) ac_cv_c_bigendian=no ;;
6086 esac
6087 fi
6088 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6089 fi
6090 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6091 fi
6092 if test $ac_cv_c_bigendian = unknown; then
6093 # Compile a test program.
6094 if test "$cross_compiling" = yes
6095 then :
6096 # Try to guess by grepping values from an object file.
6097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6098 /* end confdefs.h. */
6099 unsigned short int ascii_mm[] =
6100 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
6101 unsigned short int ascii_ii[] =
6102 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
6103 int use_ascii (int i) {
6104 return ascii_mm[i] + ascii_ii[i];
6105 }
6106 unsigned short int ebcdic_ii[] =
6107 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
6108 unsigned short int ebcdic_mm[] =
6109 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
6110 int use_ebcdic (int i) {
6111 return ebcdic_mm[i] + ebcdic_ii[i];
6112 }
6113 int
6114 main (int argc, char **argv)
6115 {
6116 /* Intimidate the compiler so that it does not
6117 optimize the arrays away. */
6118 char *p = argv[0];
6119 ascii_mm[1] = *p++; ebcdic_mm[1] = *p++;
6120 ascii_ii[1] = *p++; ebcdic_ii[1] = *p++;
6121 return use_ascii (argc) == use_ebcdic (*p);
6122 }
6123 _ACEOF
6124 if ac_fn_c_try_link "$LINENO"
6125 then :
6126 if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then
6127 ac_cv_c_bigendian=yes
6128 fi
6129 if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then
6130 if test "$ac_cv_c_bigendian" = unknown; then
6131 ac_cv_c_bigendian=no
6132 else
6133 # finding both strings is unlikely to happen, but who knows?
6134 ac_cv_c_bigendian=unknown
6135 fi
6136 fi
6137 fi
6138 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6139 conftest$ac_exeext conftest.$ac_ext
6140 else case e in #(
6141 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6142 /* end confdefs.h. */
6143 $ac_includes_default
6144 int
6145 main (void)
6146 {
6147
6148 /* Are we little or big endian? From Harbison&Steele. */
6149 union
6150 {
6151 long int l;
6152 char c[sizeof (long int)];
6153 } u;
6154 u.l = 1;
6155 return u.c[sizeof (long int) - 1] == 1;
6156
6157 ;
6158 return 0;
6159 }
6160 _ACEOF
6161 if ac_fn_c_try_run "$LINENO"
6162 then :
6163 ac_cv_c_bigendian=no
6164 else case e in #(
6165 e) ac_cv_c_bigendian=yes ;;
6166 esac
6167 fi
6168 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6169 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
6170 esac
6171 fi
6172
6173 fi ;;
6174 esac
6175 fi
6176 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
6177 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
6178 case $ac_cv_c_bigendian in #(
6179 yes)
6180 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
6181 ;; #(
6182 no)
6183 ;; #(
6184 universal)
6185
6186 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
6187
6188 ;; #(
6189 *)
6190 as_fn_error $? "unknown endianness
6191 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
6192 esac
6193
6194
6195
6196
6197
6198 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__((always_inline))" >&5
6199 printf %s "checking for __attribute__((always_inline))... " >&6; }
6200 if test ${ax_cv_have_func_attribute_always_inline+y}
6201 then :
6202 printf %s "(cached) " >&6
6203 else case e in #(
6204 e)
6205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6206 /* end confdefs.h. */
6207
6208
6209 inline __attribute__((always_inline)) int foo( void ) { return 0; }
6210
6211 int
6212 main (void)
6213 {
6214
6215 ;
6216 return 0;
6217 }
6218
6219 _ACEOF
6220 if ac_fn_c_try_link "$LINENO"
6221 then :
6222 if grep -- -Wattributes conftest.err
6223 then :
6224 ax_cv_have_func_attribute_always_inline=no
6225 else case e in #(
6226 e) ax_cv_have_func_attribute_always_inline=yes ;;
6227 esac
6228 fi
6229 else case e in #(
6230 e) ax_cv_have_func_attribute_always_inline=no ;;
6231 esac
6232 fi
6233 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6234 conftest$ac_exeext conftest.$ac_ext
6235 ;;
6236 esac
6237 fi
6238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_func_attribute_always_inline" >&5
6239 printf "%s\n" "$ax_cv_have_func_attribute_always_inline" >&6; }
6240
6241 if test yes = $ax_cv_have_func_attribute_always_inline
6242 then :
6243
6244 printf "%s\n" "#define HAVE_FUNC_ATTRIBUTE_ALWAYS_INLINE 1" >>confdefs.h
6245
6246 fi
6247
6248
6249
6250
6251
6252
6253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__((constructor))" >&5
6254 printf %s "checking for __attribute__((constructor))... " >&6; }
6255 if test ${ax_cv_have_func_attribute_constructor+y}
6256 then :
6257 printf %s "(cached) " >&6
6258 else case e in #(
6259 e)
6260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6261 /* end confdefs.h. */
6262
6263
6264 int foo( void ) __attribute__((constructor));
6265
6266 int
6267 main (void)
6268 {
6269
6270 ;
6271 return 0;
6272 }
6273
6274 _ACEOF
6275 if ac_fn_c_try_link "$LINENO"
6276 then :
6277 if grep -- -Wattributes conftest.err
6278 then :
6279 ax_cv_have_func_attribute_constructor=no
6280 else case e in #(
6281 e) ax_cv_have_func_attribute_constructor=yes ;;
6282 esac
6283 fi
6284 else case e in #(
6285 e) ax_cv_have_func_attribute_constructor=no ;;
6286 esac
6287 fi
6288 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6289 conftest$ac_exeext conftest.$ac_ext
6290 ;;
6291 esac
6292 fi
6293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_func_attribute_constructor" >&5
6294 printf "%s\n" "$ax_cv_have_func_attribute_constructor" >&6; }
6295
6296 if test yes = $ax_cv_have_func_attribute_constructor
6297 then :
6298
6299 printf "%s\n" "#define HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR 1" >>confdefs.h
6300
6301 fi
6302
6303
6304
6305
6306
6307
6308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__((fallthrough))" >&5
6309 printf %s "checking for __attribute__((fallthrough))... " >&6; }
6310 if test ${ax_cv_have_func_attribute_fallthrough+y}
6311 then :
6312 printf %s "(cached) " >&6
6313 else case e in #(
6314 e)
6315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6316 /* end confdefs.h. */
6317
6318
6319 void foo( int x ) {switch (x) { case 1: __attribute__((fallthrough)); case 2: break ; }};
6320
6321 int
6322 main (void)
6323 {
6324
6325 ;
6326 return 0;
6327 }
6328
6329 _ACEOF
6330 if ac_fn_c_try_link "$LINENO"
6331 then :
6332 if grep -- -Wattributes conftest.err
6333 then :
6334 ax_cv_have_func_attribute_fallthrough=no
6335 else case e in #(
6336 e) ax_cv_have_func_attribute_fallthrough=yes ;;
6337 esac
6338 fi
6339 else case e in #(
6340 e) ax_cv_have_func_attribute_fallthrough=no ;;
6341 esac
6342 fi
6343 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6344 conftest$ac_exeext conftest.$ac_ext
6345 ;;
6346 esac
6347 fi
6348 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_func_attribute_fallthrough" >&5
6349 printf "%s\n" "$ax_cv_have_func_attribute_fallthrough" >&6; }
6350
6351 if test yes = $ax_cv_have_func_attribute_fallthrough
6352 then :
6353
6354 printf "%s\n" "#define HAVE_FUNC_ATTRIBUTE_FALLTHROUGH 1" >>confdefs.h
6355
6356 fi
6357
6358
6359
6360
6361
6362
6363 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__((format))" >&5
6364 printf %s "checking for __attribute__((format))... " >&6; }
6365 if test ${ax_cv_have_func_attribute_format+y}
6366 then :
6367 printf %s "(cached) " >&6
6368 else case e in #(
6369 e)
6370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6371 /* end confdefs.h. */
6372
6373
6374 int foo(const char *p, ...) __attribute__((format(printf, 1, 2)));
6375
6376 int
6377 main (void)
6378 {
6379
6380 ;
6381 return 0;
6382 }
6383
6384 _ACEOF
6385 if ac_fn_c_try_link "$LINENO"
6386 then :
6387 if grep -- -Wattributes conftest.err
6388 then :
6389 ax_cv_have_func_attribute_format=no
6390 else case e in #(
6391 e) ax_cv_have_func_attribute_format=yes ;;
6392 esac
6393 fi
6394 else case e in #(
6395 e) ax_cv_have_func_attribute_format=no ;;
6396 esac
6397 fi
6398 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6399 conftest$ac_exeext conftest.$ac_ext
6400 ;;
6401 esac
6402 fi
6403 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_func_attribute_format" >&5
6404 printf "%s\n" "$ax_cv_have_func_attribute_format" >&6; }
6405
6406 if test yes = $ax_cv_have_func_attribute_format
6407 then :
6408
6409 printf "%s\n" "#define HAVE_FUNC_ATTRIBUTE_FORMAT 1" >>confdefs.h
6410
6411 fi
6412
6413
6414
6415
6416
6417
6418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__((noinline))" >&5
6419 printf %s "checking for __attribute__((noinline))... " >&6; }
6420 if test ${ax_cv_have_func_attribute_noinline+y}
6421 then :
6422 printf %s "(cached) " >&6
6423 else case e in #(
6424 e)
6425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6426 /* end confdefs.h. */
6427
6428
6429 __attribute__((noinline)) int foo( void ) { return 0; }
6430
6431 int
6432 main (void)
6433 {
6434
6435 ;
6436 return 0;
6437 }
6438
6439 _ACEOF
6440 if ac_fn_c_try_link "$LINENO"
6441 then :
6442 if grep -- -Wattributes conftest.err
6443 then :
6444 ax_cv_have_func_attribute_noinline=no
6445 else case e in #(
6446 e) ax_cv_have_func_attribute_noinline=yes ;;
6447 esac
6448 fi
6449 else case e in #(
6450 e) ax_cv_have_func_attribute_noinline=no ;;
6451 esac
6452 fi
6453 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6454 conftest$ac_exeext conftest.$ac_ext
6455 ;;
6456 esac
6457 fi
6458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_func_attribute_noinline" >&5
6459 printf "%s\n" "$ax_cv_have_func_attribute_noinline" >&6; }
6460
6461 if test yes = $ax_cv_have_func_attribute_noinline
6462 then :
6463
6464 printf "%s\n" "#define HAVE_FUNC_ATTRIBUTE_NOINLINE 1" >>confdefs.h
6465
6466 fi
6467
6468
6469
6470
6471
6472
6473 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__((noreturn))" >&5
6474 printf %s "checking for __attribute__((noreturn))... " >&6; }
6475 if test ${ax_cv_have_func_attribute_noreturn+y}
6476 then :
6477 printf %s "(cached) " >&6
6478 else case e in #(
6479 e)
6480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6481 /* end confdefs.h. */
6482
6483
6484 void foo( void ) __attribute__((noreturn));
6485
6486 int
6487 main (void)
6488 {
6489
6490 ;
6491 return 0;
6492 }
6493
6494 _ACEOF
6495 if ac_fn_c_try_link "$LINENO"
6496 then :
6497 if grep -- -Wattributes conftest.err
6498 then :
6499 ax_cv_have_func_attribute_noreturn=no
6500 else case e in #(
6501 e) ax_cv_have_func_attribute_noreturn=yes ;;
6502 esac
6503 fi
6504 else case e in #(
6505 e) ax_cv_have_func_attribute_noreturn=no ;;
6506 esac
6507 fi
6508 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6509 conftest$ac_exeext conftest.$ac_ext
6510 ;;
6511 esac
6512 fi
6513 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_func_attribute_noreturn" >&5
6514 printf "%s\n" "$ax_cv_have_func_attribute_noreturn" >&6; }
6515
6516 if test yes = $ax_cv_have_func_attribute_noreturn
6517 then :
6518
6519 printf "%s\n" "#define HAVE_FUNC_ATTRIBUTE_NORETURN 1" >>confdefs.h
6520
6521 fi
6522
6523
6524
6525
6526
6527
6528 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __attribute__((pure))" >&5
6529 printf %s "checking for __attribute__((pure))... " >&6; }
6530 if test ${ax_cv_have_func_attribute_pure+y}
6531 then :
6532 printf %s "(cached) " >&6
6533 else case e in #(
6534 e)
6535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6536 /* end confdefs.h. */
6537
6538
6539 int foo( void ) __attribute__((pure));
6540
6541 int
6542 main (void)
6543 {
6544
6545 ;
6546 return 0;
6547 }
6548
6549 _ACEOF
6550 if ac_fn_c_try_link "$LINENO"
6551 then :
6552 if grep -- -Wattributes conftest.err
6553 then :
6554 ax_cv_have_func_attribute_pure=no
6555 else case e in #(
6556 e) ax_cv_have_func_attribute_pure=yes ;;
6557 esac
6558 fi
6559 else case e in #(
6560 e) ax_cv_have_func_attribute_pure=no ;;
6561 esac
6562 fi
6563 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6564 conftest$ac_exeext conftest.$ac_ext
6565 ;;
6566 esac
6567 fi
6568 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_have_func_attribute_pure" >&5
6569 printf "%s\n" "$ax_cv_have_func_attribute_pure" >&6; }
6570
6571 if test yes = $ax_cv_have_func_attribute_pure
6572 then :
6573
6574 printf "%s\n" "#define HAVE_FUNC_ATTRIBUTE_PURE 1" >>confdefs.h
6575
6576 fi
6577
6578
6579
6580
6581
6582
6583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
6584 printf %s "checking for __builtin_mul_overflow... " >&6; }
6585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6586 /* end confdefs.h. */
6587
6588 int
6589 main (void)
6590 {
6591 int x; __builtin_mul_overflow(0,0,&x);
6592
6593
6594 ;
6595 return 0;
6596 }
6597 _ACEOF
6598 if ac_fn_c_try_link "$LINENO"
6599 then :
6600 have___builtin_mul_overflow=yes
6601 else case e in #(
6602 e) have___builtin_mul_overflow=no
6603 ;;
6604 esac
6605 fi
6606 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6607 conftest$ac_exeext conftest.$ac_ext
6608 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have___builtin_mul_overflow" >&5
6609 printf "%s\n" "$have___builtin_mul_overflow" >&6; }
6610 if test yes = $have___builtin_mul_overflow
6611 then :
6612
6613 printf "%s\n" "#define HAVE___BUILTIN_MUL_OVERFLOW 1" >>confdefs.h
6614
6615 fi;
6616 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
6617 printf %s "checking for __builtin_clz... " >&6; }
6618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6619 /* end confdefs.h. */
6620
6621 int
6622 main (void)
6623 {
6624 int x; __builtin_clz(0);
6625
6626
6627 ;
6628 return 0;
6629 }
6630 _ACEOF
6631 if ac_fn_c_try_link "$LINENO"
6632 then :
6633 have___builtin_clz=yes
6634 else case e in #(
6635 e) have___builtin_clz=no
6636 ;;
6637 esac
6638 fi
6639 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6640 conftest$ac_exeext conftest.$ac_ext
6641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have___builtin_clz" >&5
6642 printf "%s\n" "$have___builtin_clz" >&6; }
6643 if test yes = $have___builtin_clz
6644 then :
6645
6646 printf "%s\n" "#define HAVE___BUILTIN_CLZ 1" >>confdefs.h
6647
6648 fi;
6649 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_clzl" >&5
6650 printf %s "checking for __builtin_clzl... " >&6; }
6651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6652 /* end confdefs.h. */
6653
6654 int
6655 main (void)
6656 {
6657 int x; __builtin_clzl(0);
6658
6659
6660 ;
6661 return 0;
6662 }
6663 _ACEOF
6664 if ac_fn_c_try_link "$LINENO"
6665 then :
6666 have___builtin_clzl=yes
6667 else case e in #(
6668 e) have___builtin_clzl=no
6669 ;;
6670 esac
6671 fi
6672 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6673 conftest$ac_exeext conftest.$ac_ext
6674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have___builtin_clzl" >&5
6675 printf "%s\n" "$have___builtin_clzl" >&6; }
6676 if test yes = $have___builtin_clzl
6677 then :
6678
6679 printf "%s\n" "#define HAVE___BUILTIN_CLZL 1" >>confdefs.h
6680
6681 fi;
6682 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_clzll" >&5
6683 printf %s "checking for __builtin_clzll... " >&6; }
6684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6685 /* end confdefs.h. */
6686
6687 int
6688 main (void)
6689 {
6690 int x; __builtin_clzll(0);
6691
6692
6693 ;
6694 return 0;
6695 }
6696 _ACEOF
6697 if ac_fn_c_try_link "$LINENO"
6698 then :
6699 have___builtin_clzll=yes
6700 else case e in #(
6701 e) have___builtin_clzll=no
6702 ;;
6703 esac
6704 fi
6705 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6706 conftest$ac_exeext conftest.$ac_ext
6707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have___builtin_clzll" >&5
6708 printf "%s\n" "$have___builtin_clzll" >&6; }
6709 if test yes = $have___builtin_clzll
6710 then :
6711
6712 printf "%s\n" "#define HAVE___BUILTIN_CLZLL 1" >>confdefs.h
6713
6714 fi;
6715 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcountl" >&5
6716 printf %s "checking for __builtin_popcountl... " >&6; }
6717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6718 /* end confdefs.h. */
6719
6720 int
6721 main (void)
6722 {
6723 int x; __builtin_popcountl(0);
6724
6725
6726 ;
6727 return 0;
6728 }
6729 _ACEOF
6730 if ac_fn_c_try_link "$LINENO"
6731 then :
6732 have___builtin_popcountl=yes
6733 else case e in #(
6734 e) have___builtin_popcountl=no
6735 ;;
6736 esac
6737 fi
6738 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6739 conftest$ac_exeext conftest.$ac_ext
6740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have___builtin_popcountl" >&5
6741 printf "%s\n" "$have___builtin_popcountl" >&6; }
6742 if test yes = $have___builtin_popcountl
6743 then :
6744
6745 printf "%s\n" "#define HAVE___BUILTIN_POPCOUNTL 1" >>confdefs.h
6746
6747 fi;
6748
6749 # The cast to long int works around a bug in the HP C Compiler
6750 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6751 # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
6752 # This bug is HP SR number 8606223364.
6753 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
6754 printf %s "checking size of int... " >&6; }
6755 if test ${ac_cv_sizeof_int+y}
6756 then :
6757 printf %s "(cached) " >&6
6758 else case e in #(
6759 e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
6760 then :
6761
6762 else case e in #(
6763 e) if test "$ac_cv_type_int" = yes; then
6764 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
6765 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
6766 as_fn_error 77 "cannot compute sizeof (int)
6767 See 'config.log' for more details" "$LINENO" 5; }
6768 else
6769 ac_cv_sizeof_int=0
6770 fi ;;
6771 esac
6772 fi
6773 ;;
6774 esac
6775 fi
6776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
6777 printf "%s\n" "$ac_cv_sizeof_int" >&6; }
6778
6779
6780
6781 printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
6782
6783
6784 # The cast to long int works around a bug in the HP C Compiler
6785 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6786 # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
6787 # This bug is HP SR number 8606223364.
6788 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6789 printf %s "checking size of long... " >&6; }
6790 if test ${ac_cv_sizeof_long+y}
6791 then :
6792 printf %s "(cached) " >&6
6793 else case e in #(
6794 e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
6795 then :
6796
6797 else case e in #(
6798 e) if test "$ac_cv_type_long" = yes; then
6799 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
6800 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
6801 as_fn_error 77 "cannot compute sizeof (long)
6802 See 'config.log' for more details" "$LINENO" 5; }
6803 else
6804 ac_cv_sizeof_long=0
6805 fi ;;
6806 esac
6807 fi
6808 ;;
6809 esac
6810 fi
6811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6812 printf "%s\n" "$ac_cv_sizeof_long" >&6; }
6813
6814
6815
6816 printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
6817
6818
6819 # The cast to long int works around a bug in the HP C Compiler
6820 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6821 # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'.
6822 # This bug is HP SR number 8606223364.
6823 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
6824 printf %s "checking size of long long... " >&6; }
6825 if test ${ac_cv_sizeof_long_long+y}
6826 then :
6827 printf %s "(cached) " >&6
6828 else case e in #(
6829 e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"
6830 then :
6831
6832 else case e in #(
6833 e) if test "$ac_cv_type_long_long" = yes; then
6834 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
6835 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
6836 as_fn_error 77 "cannot compute sizeof (long long)
6837 See 'config.log' for more details" "$LINENO" 5; }
6838 else
6839 ac_cv_sizeof_long_long=0
6840 fi ;;
6841 esac
6842 fi
6843 ;;
6844 esac
6845 fi
6846 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
6847 printf "%s\n" "$ac_cv_sizeof_long_long" >&6; }
6848
6849
6850
6851 printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h
6852
6853
6854
6855
6856
6857
6858 # Check whether --enable-hpcgap was given.
6859 if test ${enable_hpcgap+y}
6860 then :
6861 enableval=$enable_hpcgap;
6862 else case e in #(
6863 e) enable_hpcgap=no ;;
6864 esac
6865 fi
6866
6867 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable HPC-GAP" >&5
6868 printf %s "checking whether to enable HPC-GAP... " >&6; }
6869 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_hpcgap" >&5
6870 printf "%s\n" "$enable_hpcgap" >&6; }
6871
6872 HPCGAP=$enable_hpcgap
6873
6874 if test "x$enable_hpcgap" = xyes
6875 then :
6876
6877 GAP_DEFINES="$GAP_DEFINES -DHPCGAP=1"
6878
6879 # HACK, see https://github.com/fingolfin/gap/issues/9
6880 GAP_DEFINES="$GAP_DEFINES -DMAX_GC_THREADS=4"
6881
6882 fi
6883
6884
6885 # Check whether --with-gc was given.
6886 if test ${with_gc+y}
6887 then :
6888 withval=$with_gc;
6889 else case e in #(
6890 e) with_gc=default ;;
6891 esac
6892 fi
6893
6894
6895
6896 # Check whether --with-julia was given.
6897 if test ${with_julia+y}
6898 then :
6899 withval=$with_julia;
6900 else case e in #(
6901 e)
6902 if test "x$with_gc" = xjulia
6903 then :
6904
6905 with_julia=yes
6906
6907 else case e in #(
6908 e)
6909 with_julia=no
6910 ;;
6911 esac
6912 fi
6913 ;;
6914 esac
6915 fi
6916
6917
6918
6919 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which garbage collector to use" >&5
6920 printf %s "checking which garbage collector to use... " >&6; }
6921 if test "x$with_gc" = xyes
6922 then :
6923 with_gc=default
6924 fi
6925 if test "x$with_gc" = xdefault
6926 then :
6927
6928 with_gc=gasman
6929 if test "x$enable_hpcgap" = xyes
6930 then :
6931 with_gc=boehm
6932 fi
6933 if test "x$with_julia" != xno
6934 then :
6935 with_gc=julia
6936 fi
6937
6938 fi
6939 case $with_gc in #(
6940 none|no) :
6941 as_fn_error $? "cannot run GAP without a garbage collector" "$LINENO" 5 ;; #(
6942 boehm) :
6943 GC_SOURCES=src/boehm_gc.c
6944
6945 GAP_DEFINES="$GAP_DEFINES -DUSE_BOEHM_GC=1"
6946 ;; #(
6947 gasman) :
6948 if test "x$enable_hpcgap" = xyes
6949 then :
6950 as_fn_error $? "GASMAN cannot be used with HPC-GAP" "$LINENO" 5
6951 fi
6952 GC_SOURCES="src/gasman.c src/sysmem.c"
6953
6954 GAP_DEFINES="$GAP_DEFINES -DUSE_GASMAN=1"
6955 ;; #(
6956 julia) :
6957 GC_SOURCES=src/julia_gc.c
6958
6959 GAP_DEFINES="$GAP_DEFINES -DUSE_JULIA_GC=1"
6960 ;; #(
6961 *) :
6962 as_fn_error $? "Invalid gc method '$with_gc', use default|none|gasman|boehm|julia" "$LINENO" 5 ;; #(
6963 *) :
6964 ;;
6965 esac
6966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_gc" >&5
6967 printf "%s\n" "$with_gc" >&6; }
6968
6969
6970 # Check whether --enable-native-tls was given.
6971 if test ${enable_native_tls+y}
6972 then :
6973 enableval=$enable_native_tls; enable_native_tls=$enableval
6974 else case e in #(
6975 e) enable_native_tls=no ;;
6976 esac
6977 fi
6978
6979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use native tls" >&5
6980 printf %s "checking whether to use native tls... " >&6; }
6981 enable_macos_tls_asm=default
6982 if test "x$enable_native_tls" = "xyes"
6983 then :
6984
6985 case "$host" in
6986 x86_64-apple-darwin*)
6987 GAP_DEFINES="$GAP_DEFINES -DUSE_PTHREAD_TLS=1"
6988 if test "$cross_compiling" = yes
6989 then :
6990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes (pthread-based)" >&5
6991 printf "%s\n" "yes (pthread-based)" >&6; }
6992 enable_macos_tls_asm=no
6993
6994 else case e in #(
6995 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6996 /* end confdefs.h. */
6997
6998 // The following code also occurs in src/hpc/thread.c and both need to be
6999 // kept in sync.
7000 #include <pthread.h>
7001 #include <string.h>
7002
7003 #define OFFS 0x100
7004 #define END (-1)
7005
7006 int cmpOpCode(unsigned char *code, int *with) {
7007 int result = 0;
7008 while (*with >= 0) {
7009 if (*with == OFFS) {
7010 result = *code;
7011 } else {
7012 if (*code != *with)
7013 return -1;
7014 }
7015 code++;
7016 with++;
7017 }
7018 return result;
7019 }
7020
7021 int main() {
7022 // This is an idea borrowed from Mono. We test if the implementation
7023 // of pthread_getspecific() uses the assembly code below. If that is
7024 // true, we can replace calls to pthread_getspecific() with the
7025 // matching inline assembly, allowing a significant performance boost.
7026 #if defined(__APPLE__) && defined(__x86_64__)
7027 // There are two possible implementations.
7028 static int asm_code[] = {
7029 // movq %gs:[OFFS](,%rdi,8), %rax
7030 // retq
7031 0x65, 0x48, 0x8b, 0x04, 0xfd, OFFS, 0x00, 0x00, 0x00, 0xc3, END
7032 };
7033 static int asm_code2[] = {
7034 // pushq %rbp
7035 // movq %rsp, %rbp
7036 // movq %gs:[OFFS](,%rdi,8),%rax
7037 // popq %rbp
7038 // retq
7039 0x55, 0x48, 0x89, 0xe5, 0x65, 0x48, 0x8b, 0x04, 0xfd, OFFS,
7040 0x00, 0x00, 0x00, 0x5d, 0xc3, END
7041 };
7042 if (cmpOpCode((unsigned char *)pthread_getspecific, asm_code) >= 0) {
7043 return 0;
7044 }
7045 if (cmpOpCode((unsigned char *)pthread_getspecific, asm_code2) >= 0) {
7046 return 0;
7047 }
7048 return 1;
7049 #else
7050 #error FAIL
7051 #endif
7052 }
7053
7054 _ACEOF
7055 if ac_fn_c_try_run "$LINENO"
7056 then :
7057 GAP_DEFINES="$GAP_DEFINES -DUSE_MACOS_PTHREAD_TLS_ASM=1"
7058 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes (macOS assembly)" >&5
7059 printf "%s\n" "yes (macOS assembly)" >&6; }
7060 enable_macos_tls_asm=yes
7061
7062 else case e in #(
7063 e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes (pthread-based)" >&5
7064 printf "%s\n" "yes (pthread-based)" >&6; }
7065 enable_macos_tls_asm=no
7066 ;;
7067 esac
7068 fi
7069 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7070 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
7071 esac
7072 fi
7073
7074 ;;
7075 *)
7076 GAP_DEFINES="$GAP_DEFINES -DUSE_NATIVE_TLS=1"
7077 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7078 printf "%s\n" "yes" >&6; }
7079 ;;
7080 esac
7081
7082 else case e in #(
7083 e)
7084 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7085 printf "%s\n" "no" >&6; }
7086
7087 ;;
7088 esac
7089 fi
7090 if test "x$enable_hpcgap" = xyes
7091 then :
7092
7093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_getspecific() can be made pure" >&5
7094 printf %s "checking whether pthread_getspecific() can be made pure... " >&6; }
7095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7096 /* end confdefs.h. */
7097
7098 #include <pthread.h>
7099 __attribute__((pure))
7100 void * pthread_getspecific(pthread_key_t key);
7101
7102 _ACEOF
7103 if ac_fn_c_try_compile "$LINENO"
7104 then :
7105
7106 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7107 printf "%s\n" "yes" >&6; }
7108 GAP_DEFINES="$GAP_DEFINES -DALLOW_PURE_PTHREAD_GETSPECIFIC=1"
7109
7110 else case e in #(
7111 e)
7112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7113 printf "%s\n" "no" >&6; }
7114 ;;
7115 esac
7116 fi
7117 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7118
7119 fi
7120
7121 # Check whether --enable-debug was given.
7122 if test ${enable_debug+y}
7123 then :
7124 enableval=$enable_debug;
7125 else case e in #(
7126 e) enable_debug=no
7127 ;;
7128 esac
7129 fi
7130
7131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable debug mode" >&5
7132 printf %s "checking whether to enable debug mode... " >&6; }
7133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_debug" >&5
7134 printf "%s\n" "$enable_debug" >&6; }
7135
7136 if test "x$enable_debug" != "xno"
7137 then :
7138 GAP_DEFINES="$GAP_DEFINES -DGAP_KERNEL_DEBUG=1"
7139 GAP_DEFINES="$GAP_DEFINES -DGAP_PRINT_BACKTRACE=1"
7140 fi
7141
7142 # Check whether --enable-maintainer-mode was given.
7143 if test ${enable_maintainer_mode+y}
7144 then :
7145 enableval=$enable_maintainer_mode;
7146 else case e in #(
7147 e) enable_maintainer_mode=yes
7148 ;;
7149 esac
7150 fi
7151
7152 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-mode mode" >&5
7153 printf %s "checking whether to enable maintainer-mode mode... " >&6; }
7154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_maintainer_mode" >&5
7155 printf "%s\n" "$enable_maintainer_mode" >&6; }
7156 MAINTAINER_MODE=$enable_maintainer_mode
7157
7158
7159 # Check whether --enable-memory-checking was given.
7160 if test ${enable_memory_checking+y}
7161 then :
7162 enableval=$enable_memory_checking;
7163 else case e in #(
7164 e) enable_memory_checking=no
7165 ;;
7166 esac
7167 fi
7168
7169 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable memory checking" >&5
7170 printf %s "checking whether to enable memory checking... " >&6; }
7171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_memory_checking" >&5
7172 printf "%s\n" "$enable_memory_checking" >&6; }
7173
7174 if test "x$enable_memory_checking" != "xno"
7175 then :
7176 GAP_DEFINES="$GAP_DEFINES -DGAP_MEM_CHECK=1"
7177
7178 fi
7179
7180 # Check whether --enable-valgrind was given.
7181 if test ${enable_valgrind+y}
7182 then :
7183 enableval=$enable_valgrind;
7184 else case e in #(
7185 e) enable_valgrind=no
7186 ;;
7187 esac
7188 fi
7189
7190 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable valgrind extensions to GASMAN" >&5
7191 printf %s "checking whether to enable valgrind extensions to GASMAN... " >&6; }
7192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_valgrind" >&5
7193 printf "%s\n" "$enable_valgrind" >&6; }
7194
7195 if test "x$enable_valgrind" != "xno"
7196 then :
7197 GAP_DEFINES="$GAP_DEFINES -DGAP_MEMORY_CANARY=1"
7198
7199 fi
7200
7201 if test "x$enable_valgrind" != "xno" -a "x$enable_memory_checking" != "xno"; then
7202 as_fn_error $? "--enable-valgrind and --enable-memory-checking cannot be used at the same time" "$LINENO" 5
7203 fi
7204
7205 if test "x$with_gc" != "xgasman"; then
7206 if test "x$enable_valgrind" != "xno" -o "x$enable_memory_checking" != "xno"; then
7207 as_fn_error $? "--enable-valgrind and --enable-memory-checking are only compatible with GASMAN" "$LINENO" 5
7208 fi
7209 fi
7210
7211
7212 # Check whether --enable-Werror was given.
7213 if test ${enable_Werror+y}
7214 then :
7215 enableval=$enable_Werror;
7216 else case e in #(
7217 e) enable_Werror=no ;;
7218 esac
7219 fi
7220
7221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to treat C compiler warnings as errors" >&5
7222 printf %s "checking whether to treat C compiler warnings as errors... " >&6; }
7223 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_Werror" >&5
7224 printf "%s\n" "$enable_Werror" >&6; }
7225
7226
7227 if test "x$enable_Werror" != "xno"
7228 then :
7229 ax_enable_compile_warnings=error
7230 else case e in #(
7231 e) ax_enable_compile_warnings=yes ;;
7232 esac
7233 fi
7234
7235 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
7236 printf %s "checking for a sed that does not truncate output... " >&6; }
7237 if test ${ac_cv_path_SED+y}
7238 then :
7239 printf %s "(cached) " >&6
7240 else case e in #(
7241 e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
7242 for ac_i in 1 2 3 4 5 6 7; do
7243 ac_script="$ac_script$as_nl$ac_script"
7244 done
7245 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
7246 { ac_script=; unset ac_script;}
7247 if test -z "$SED"; then
7248 ac_path_SED_found=false
7249 # Loop through the user's path and test for each of PROGNAME-LIST
7250 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7251 for as_dir in $PATH
7252 do
7253 IFS=$as_save_IFS
7254 case $as_dir in #(((
7255 '') as_dir=./ ;;
7256 */) ;;
7257 *) as_dir=$as_dir/ ;;
7258 esac
7259 for ac_prog in sed gsed
7260 do
7261 for ac_exec_ext in '' $ac_executable_extensions; do
7262 ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
7263 as_fn_executable_p "$ac_path_SED" || continue
7264 # Check for GNU ac_path_SED and select it if it is found.
7265 # Check for GNU $ac_path_SED
7266 case `"$ac_path_SED" --version 2>&1` in #(
7267 *GNU*)
7268 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
7269 #(
7270 *)
7271 ac_count=0
7272 printf %s 0123456789 >"conftest.in"
7273 while :
7274 do
7275 cat "conftest.in" "conftest.in" >"conftest.tmp"
7276 mv "conftest.tmp" "conftest.in"
7277 cp "conftest.in" "conftest.nl"
7278 printf "%s\n" '' >> "conftest.nl"
7279 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
7280 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
7281 as_fn_arith $ac_count + 1 && ac_count=$as_val
7282 if test $ac_count -gt ${ac_path_SED_max-0}; then
7283 # Best one so far, save it but keep looking for a better one
7284 ac_cv_path_SED="$ac_path_SED"
7285 ac_path_SED_max=$ac_count
7286 fi
7287 # 10*(2^10) chars as input seems more than enough
7288 test $ac_count -gt 10 && break
7289 done
7290 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
7291 esac
7292
7293 $ac_path_SED_found && break 3
7294 done
7295 done
7296 done
7297 IFS=$as_save_IFS
7298 if test -z "$ac_cv_path_SED"; then
7299 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
7300 fi
7301 else
7302 ac_cv_path_SED=$SED
7303 fi
7304 ;;
7305 esac
7306 fi
7307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
7308 printf "%s\n" "$ac_cv_path_SED" >&6; }
7309 SED="$ac_cv_path_SED"
7310 rm -f conftest.sed
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321 # Variable names
7322
7323
7324
7325 ac_ext=c
7326 ac_cpp='$CPP $CPPFLAGS'
7327 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7328 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7329 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7330
7331
7332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7333 /* end confdefs.h. */
7334
7335 #ifndef __cplusplus
7336 #error "no C++"
7337 #endif
7338 int
7339 main (void)
7340 {
7341
7342 ;
7343 return 0;
7344 }
7345 _ACEOF
7346 if ac_fn_c_try_compile "$LINENO"
7347 then :
7348 ax_compiler_cxx=yes;
7349 else case e in #(
7350 e) ax_compiler_cxx=no; ;;
7351 esac
7352 fi
7353 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7354
7355 # Always pass -Werror=unknown-warning-option to get Clang to fail on bad
7356 # flags, otherwise they are always appended to the warn_cflags variable, and
7357 # Clang warns on them for every compilation unit.
7358 # If this is passed to GCC, it will explode, so the flag must be enabled
7359 # conditionally.
7360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Werror=unknown-warning-option" >&5
7361 printf %s "checking whether C compiler accepts -Werror=unknown-warning-option... " >&6; }
7362 if test ${ax_cv_check_cflags___Werror_unknown_warning_option+y}
7363 then :
7364 printf %s "(cached) " >&6
7365 else case e in #(
7366 e)
7367 ax_check_save_flags=$CFLAGS
7368 CFLAGS="$CFLAGS -Werror=unknown-warning-option"
7369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7370 /* end confdefs.h. */
7371
7372 int
7373 main (void)
7374 {
7375
7376 ;
7377 return 0;
7378 }
7379 _ACEOF
7380 if ac_fn_c_try_compile "$LINENO"
7381 then :
7382 ax_cv_check_cflags___Werror_unknown_warning_option=yes
7383 else case e in #(
7384 e) ax_cv_check_cflags___Werror_unknown_warning_option=no ;;
7385 esac
7386 fi
7387 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7388 CFLAGS=$ax_check_save_flags ;;
7389 esac
7390 fi
7391 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Werror_unknown_warning_option" >&5
7392 printf "%s\n" "$ax_cv_check_cflags___Werror_unknown_warning_option" >&6; }
7393 if test "x$ax_cv_check_cflags___Werror_unknown_warning_option" = xyes
7394 then :
7395
7396 ax_compiler_flags_test="-Werror=unknown-warning-option"
7397
7398 else case e in #(
7399 e)
7400 ax_compiler_flags_test=""
7401 ;;
7402 esac
7403 fi
7404
7405
7406 # Check that -Wno-suggest-attribute=format is supported
7407 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wno-suggest-attribute=format" >&5
7408 printf %s "checking whether C compiler accepts -Wno-suggest-attribute=format... " >&6; }
7409 if test ${ax_cv_check_cflags___Wno_suggest_attribute_format+y}
7410 then :
7411 printf %s "(cached) " >&6
7412 else case e in #(
7413 e)
7414 ax_check_save_flags=$CFLAGS
7415 CFLAGS="$CFLAGS -Wno-suggest-attribute=format"
7416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7417 /* end confdefs.h. */
7418
7419 int
7420 main (void)
7421 {
7422
7423 ;
7424 return 0;
7425 }
7426 _ACEOF
7427 if ac_fn_c_try_compile "$LINENO"
7428 then :
7429 ax_cv_check_cflags___Wno_suggest_attribute_format=yes
7430 else case e in #(
7431 e) ax_cv_check_cflags___Wno_suggest_attribute_format=no ;;
7432 esac
7433 fi
7434 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7435 CFLAGS=$ax_check_save_flags ;;
7436 esac
7437 fi
7438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Wno_suggest_attribute_format" >&5
7439 printf "%s\n" "$ax_cv_check_cflags___Wno_suggest_attribute_format" >&6; }
7440 if test "x$ax_cv_check_cflags___Wno_suggest_attribute_format" = xyes
7441 then :
7442
7443 ax_compiler_no_suggest_attribute_flags="-Wno-suggest-attribute=format"
7444
7445 else case e in #(
7446 e)
7447 ax_compiler_no_suggest_attribute_flags=""
7448 ;;
7449 esac
7450 fi
7451
7452
7453 # Base flags
7454
7455
7456
7457
7458 for flag in -fno-strict-aliasing ; do
7459 as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$ax_compiler_flags_test_$flag" | sed "$as_sed_sh"`
7460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
7461 printf %s "checking whether C compiler accepts $flag... " >&6; }
7462 if eval test \${$as_CACHEVAR+y}
7463 then :
7464 printf %s "(cached) " >&6
7465 else case e in #(
7466 e)
7467 ax_check_save_flags=$CFLAGS
7468 CFLAGS="$CFLAGS $ax_compiler_flags_test $flag"
7469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7470 /* end confdefs.h. */
7471
7472 int
7473 main (void)
7474 {
7475
7476 ;
7477 return 0;
7478 }
7479 _ACEOF
7480 if ac_fn_c_try_compile "$LINENO"
7481 then :
7482 eval "$as_CACHEVAR=yes"
7483 else case e in #(
7484 e) eval "$as_CACHEVAR=no" ;;
7485 esac
7486 fi
7487 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7488 CFLAGS=$ax_check_save_flags ;;
7489 esac
7490 fi
7491 eval ac_res=\$$as_CACHEVAR
7492 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7493 printf "%s\n" "$ac_res" >&6; }
7494 if eval test \"x\$"$as_CACHEVAR"\" = x"yes"
7495 then :
7496
7497 if test ${WARN_CFLAGS+y}
7498 then :
7499
7500 case " $WARN_CFLAGS " in #(
7501 *" $flag "*) :
7502 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS already contains \$flag"; } >&5
7503 (: WARN_CFLAGS already contains $flag) 2>&5
7504 ac_status=$?
7505 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7506 test $ac_status = 0; } ;; #(
7507 *) :
7508
7509 as_fn_append WARN_CFLAGS " $flag"
7510 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5
7511 (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5
7512 ac_status=$?
7513 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7514 test $ac_status = 0; }
7515 ;;
7516 esac
7517
7518 else case e in #(
7519 e)
7520 WARN_CFLAGS=$flag
7521 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5
7522 (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5
7523 ac_status=$?
7524 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7525 test $ac_status = 0; }
7526 ;;
7527 esac
7528 fi
7529
7530 else case e in #(
7531 e) : ;;
7532 esac
7533 fi
7534
7535 done
7536
7537
7538 if test "$ax_enable_compile_warnings" != "no"
7539 then :
7540
7541 # "yes" flags
7542
7543
7544
7545
7546 for flag in -Wall -Wextra -Warray-bounds -Wno-cast-function-type -Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Wformat-nonliteral -Wformat-security -Wformat=2 -Winit-self -Wno-inline -Wlogical-op -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-include-dirs -Wno-pragmas -Wpacked -Wpointer-arith -Wredundant-decls -Wredundant-decls -Wrestrict -Wreturn-type -Wshadow -Wno-sign-compare -Wstrict-aliasing -Wundef -Wunused-but-set-variable -Wno-unused-parameter -Wwrite-strings ; do
7547 as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$ax_compiler_flags_test_$flag" | sed "$as_sed_sh"`
7548 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
7549 printf %s "checking whether C compiler accepts $flag... " >&6; }
7550 if eval test \${$as_CACHEVAR+y}
7551 then :
7552 printf %s "(cached) " >&6
7553 else case e in #(
7554 e)
7555 ax_check_save_flags=$CFLAGS
7556 CFLAGS="$CFLAGS $ax_compiler_flags_test $flag"
7557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7558 /* end confdefs.h. */
7559
7560 int
7561 main (void)
7562 {
7563
7564 ;
7565 return 0;
7566 }
7567 _ACEOF
7568 if ac_fn_c_try_compile "$LINENO"
7569 then :
7570 eval "$as_CACHEVAR=yes"
7571 else case e in #(
7572 e) eval "$as_CACHEVAR=no" ;;
7573 esac
7574 fi
7575 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7576 CFLAGS=$ax_check_save_flags ;;
7577 esac
7578 fi
7579 eval ac_res=\$$as_CACHEVAR
7580 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7581 printf "%s\n" "$ac_res" >&6; }
7582 if eval test \"x\$"$as_CACHEVAR"\" = x"yes"
7583 then :
7584
7585 if test ${WARN_CFLAGS+y}
7586 then :
7587
7588 case " $WARN_CFLAGS " in #(
7589 *" $flag "*) :
7590 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS already contains \$flag"; } >&5
7591 (: WARN_CFLAGS already contains $flag) 2>&5
7592 ac_status=$?
7593 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7594 test $ac_status = 0; } ;; #(
7595 *) :
7596
7597 as_fn_append WARN_CFLAGS " $flag"
7598 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5
7599 (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5
7600 ac_status=$?
7601 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7602 test $ac_status = 0; }
7603 ;;
7604 esac
7605
7606 else case e in #(
7607 e)
7608 WARN_CFLAGS=$flag
7609 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5
7610 (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5
7611 ac_status=$?
7612 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7613 test $ac_status = 0; }
7614 ;;
7615 esac
7616 fi
7617
7618 else case e in #(
7619 e) : ;;
7620 esac
7621 fi
7622
7623 done
7624
7625
7626 # HACK: use the warning flags determined so far also for the C++ compiler.
7627 # This assumes that the C and C++ compiler are "related" and thus will
7628 # accept similar warnings flags.
7629 WARN_CXXFLAGS=$WARN_CFLAGS
7630
7631 # Test for warnings that only work in C, not in C++
7632 if test "$ax_compiler_cxx" = "no" ; then
7633
7634
7635
7636
7637 for flag in -Wno-implicit-fallthrough -Wimplicit-function-declaration -Wjump-misses-init -Wnested-externs -Wold-style-definition -Wstrict-prototypes -Wmissing-variable-declarations ; do
7638 as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$ax_compiler_flags_test_$flag" | sed "$as_sed_sh"`
7639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
7640 printf %s "checking whether C compiler accepts $flag... " >&6; }
7641 if eval test \${$as_CACHEVAR+y}
7642 then :
7643 printf %s "(cached) " >&6
7644 else case e in #(
7645 e)
7646 ax_check_save_flags=$CFLAGS
7647 CFLAGS="$CFLAGS $ax_compiler_flags_test $flag"
7648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7649 /* end confdefs.h. */
7650
7651 int
7652 main (void)
7653 {
7654
7655 ;
7656 return 0;
7657 }
7658 _ACEOF
7659 if ac_fn_c_try_compile "$LINENO"
7660 then :
7661 eval "$as_CACHEVAR=yes"
7662 else case e in #(
7663 e) eval "$as_CACHEVAR=no" ;;
7664 esac
7665 fi
7666 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7667 CFLAGS=$ax_check_save_flags ;;
7668 esac
7669 fi
7670 eval ac_res=\$$as_CACHEVAR
7671 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7672 printf "%s\n" "$ac_res" >&6; }
7673 if eval test \"x\$"$as_CACHEVAR"\" = x"yes"
7674 then :
7675
7676 if test ${WARN_CFLAGS+y}
7677 then :
7678
7679 case " $WARN_CFLAGS " in #(
7680 *" $flag "*) :
7681 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS already contains \$flag"; } >&5
7682 (: WARN_CFLAGS already contains $flag) 2>&5
7683 ac_status=$?
7684 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7685 test $ac_status = 0; } ;; #(
7686 *) :
7687
7688 as_fn_append WARN_CFLAGS " $flag"
7689 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5
7690 (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5
7691 ac_status=$?
7692 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7693 test $ac_status = 0; }
7694 ;;
7695 esac
7696
7697 else case e in #(
7698 e)
7699 WARN_CFLAGS=$flag
7700 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5
7701 (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5
7702 ac_status=$?
7703 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7704 test $ac_status = 0; }
7705 ;;
7706 esac
7707 fi
7708
7709 else case e in #(
7710 e) : ;;
7711 esac
7712 fi
7713
7714 done
7715
7716 fi
7717
7718 # Test for warnings that only work in C++, not in C
7719 ac_ext=cpp
7720 ac_cpp='$CXXCPP $CPPFLAGS'
7721 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7722 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7723 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7724
7725
7726
7727
7728
7729 for flag in -Wextra-semi ; do
7730 as_CACHEVAR=`printf "%s\n" "ax_cv_check_cxxflags_$ax_compiler_flags_test_$flag" | sed "$as_sed_sh"`
7731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler accepts $flag" >&5
7732 printf %s "checking whether C++ compiler accepts $flag... " >&6; }
7733 if eval test \${$as_CACHEVAR+y}
7734 then :
7735 printf %s "(cached) " >&6
7736 else case e in #(
7737 e)
7738 ax_check_save_flags=$CXXFLAGS
7739 CXXFLAGS="$CXXFLAGS $ax_compiler_flags_test $flag"
7740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7741 /* end confdefs.h. */
7742
7743 int
7744 main (void)
7745 {
7746
7747 ;
7748 return 0;
7749 }
7750 _ACEOF
7751 if ac_fn_cxx_try_compile "$LINENO"
7752 then :
7753 eval "$as_CACHEVAR=yes"
7754 else case e in #(
7755 e) eval "$as_CACHEVAR=no" ;;
7756 esac
7757 fi
7758 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7759 CXXFLAGS=$ax_check_save_flags ;;
7760 esac
7761 fi
7762 eval ac_res=\$$as_CACHEVAR
7763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7764 printf "%s\n" "$ac_res" >&6; }
7765 if eval test \"x\$"$as_CACHEVAR"\" = x"yes"
7766 then :
7767
7768 if test ${WARN_CXXFLAGS+y}
7769 then :
7770
7771 case " $WARN_CXXFLAGS " in #(
7772 *" $flag "*) :
7773 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CXXFLAGS already contains \$flag"; } >&5
7774 (: WARN_CXXFLAGS already contains $flag) 2>&5
7775 ac_status=$?
7776 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7777 test $ac_status = 0; } ;; #(
7778 *) :
7779
7780 as_fn_append WARN_CXXFLAGS " $flag"
7781 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CXXFLAGS=\"\$WARN_CXXFLAGS\""; } >&5
7782 (: WARN_CXXFLAGS="$WARN_CXXFLAGS") 2>&5
7783 ac_status=$?
7784 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7785 test $ac_status = 0; }
7786 ;;
7787 esac
7788
7789 else case e in #(
7790 e)
7791 WARN_CXXFLAGS=$flag
7792 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CXXFLAGS=\"\$WARN_CXXFLAGS\""; } >&5
7793 (: WARN_CXXFLAGS="$WARN_CXXFLAGS") 2>&5
7794 ac_status=$?
7795 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7796 test $ac_status = 0; }
7797 ;;
7798 esac
7799 fi
7800
7801 else case e in #(
7802 e) : ;;
7803 esac
7804 fi
7805
7806 done
7807
7808 ac_ext=c
7809 ac_cpp='$CPP $CPPFLAGS'
7810 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7811 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7812 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7813
7814
7815
7816
7817 fi
7818 if test "$ax_enable_compile_warnings" = "error"
7819 then :
7820
7821 # "error" flags; -Werror has to be appended unconditionally because
7822 # it's not possible to test for
7823 #
7824 # suggest-attribute=format is disabled because it gives too many false
7825 # positives
7826
7827 if test ${WARN_CFLAGS+y}
7828 then :
7829
7830 case " $WARN_CFLAGS " in #(
7831 *" -Werror "*) :
7832 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS already contains -Werror"; } >&5
7833 (: WARN_CFLAGS already contains -Werror) 2>&5
7834 ac_status=$?
7835 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7836 test $ac_status = 0; } ;; #(
7837 *) :
7838
7839 as_fn_append WARN_CFLAGS " -Werror"
7840 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5
7841 (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5
7842 ac_status=$?
7843 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7844 test $ac_status = 0; }
7845 ;;
7846 esac
7847
7848 else case e in #(
7849 e)
7850 WARN_CFLAGS=-Werror
7851 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5
7852 (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5
7853 ac_status=$?
7854 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7855 test $ac_status = 0; }
7856 ;;
7857 esac
7858 fi
7859
7860
7861 if test ${WARN_CXXFLAGS+y}
7862 then :
7863
7864 case " $WARN_CXXFLAGS " in #(
7865 *" -Werror "*) :
7866 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CXXFLAGS already contains -Werror"; } >&5
7867 (: WARN_CXXFLAGS already contains -Werror) 2>&5
7868 ac_status=$?
7869 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7870 test $ac_status = 0; } ;; #(
7871 *) :
7872
7873 as_fn_append WARN_CXXFLAGS " -Werror"
7874 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CXXFLAGS=\"\$WARN_CXXFLAGS\""; } >&5
7875 (: WARN_CXXFLAGS="$WARN_CXXFLAGS") 2>&5
7876 ac_status=$?
7877 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7878 test $ac_status = 0; }
7879 ;;
7880 esac
7881
7882 else case e in #(
7883 e)
7884 WARN_CXXFLAGS=-Werror
7885 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CXXFLAGS=\"\$WARN_CXXFLAGS\""; } >&5
7886 (: WARN_CXXFLAGS="$WARN_CXXFLAGS") 2>&5
7887 ac_status=$?
7888 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7889 test $ac_status = 0; }
7890 ;;
7891 esac
7892 fi
7893
7894
7895
7896
7897
7898
7899 for flag in $ax_compiler_no_suggest_attribute_flags ; do
7900 as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$ax_compiler_flags_test_$flag" | sed "$as_sed_sh"`
7901 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
7902 printf %s "checking whether C compiler accepts $flag... " >&6; }
7903 if eval test \${$as_CACHEVAR+y}
7904 then :
7905 printf %s "(cached) " >&6
7906 else case e in #(
7907 e)
7908 ax_check_save_flags=$CFLAGS
7909 CFLAGS="$CFLAGS $ax_compiler_flags_test $flag"
7910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7911 /* end confdefs.h. */
7912
7913 int
7914 main (void)
7915 {
7916
7917 ;
7918 return 0;
7919 }
7920 _ACEOF
7921 if ac_fn_c_try_compile "$LINENO"
7922 then :
7923 eval "$as_CACHEVAR=yes"
7924 else case e in #(
7925 e) eval "$as_CACHEVAR=no" ;;
7926 esac
7927 fi
7928 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7929 CFLAGS=$ax_check_save_flags ;;
7930 esac
7931 fi
7932 eval ac_res=\$$as_CACHEVAR
7933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7934 printf "%s\n" "$ac_res" >&6; }
7935 if eval test \"x\$"$as_CACHEVAR"\" = x"yes"
7936 then :
7937
7938 if test ${WARN_CFLAGS+y}
7939 then :
7940
7941 case " $WARN_CFLAGS " in #(
7942 *" $flag "*) :
7943 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS already contains \$flag"; } >&5
7944 (: WARN_CFLAGS already contains $flag) 2>&5
7945 ac_status=$?
7946 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7947 test $ac_status = 0; } ;; #(
7948 *) :
7949
7950 as_fn_append WARN_CFLAGS " $flag"
7951 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5
7952 (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5
7953 ac_status=$?
7954 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7955 test $ac_status = 0; }
7956 ;;
7957 esac
7958
7959 else case e in #(
7960 e)
7961 WARN_CFLAGS=$flag
7962 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5
7963 (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5
7964 ac_status=$?
7965 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7966 test $ac_status = 0; }
7967 ;;
7968 esac
7969 fi
7970
7971 else case e in #(
7972 e) : ;;
7973 esac
7974 fi
7975
7976 done
7977
7978
7979 fi
7980
7981 # In the flags below, when disabling specific flags, always add *both*
7982 # -Wno-foo and -Wno-error=foo. This fixes the situation where (for example)
7983 # we enable -Werror, disable a flag, and a build bot passes CFLAGS=-Wall,
7984 # which effectively turns that flag back on again as an error.
7985 for flag in $WARN_CFLAGS; do
7986 case $flag in #(
7987 -Wno-*=*) :
7988 ;; #(
7989 -Wno-*) :
7990
7991
7992
7993
7994
7995 for flag in -Wno-error=$(printf "%s\n" $flag | $SED 's/^-Wno-//'); do
7996 as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$ax_compiler_flags_test_$flag" | sed "$as_sed_sh"`
7997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5
7998 printf %s "checking whether C compiler accepts $flag... " >&6; }
7999 if eval test \${$as_CACHEVAR+y}
8000 then :
8001 printf %s "(cached) " >&6
8002 else case e in #(
8003 e)
8004 ax_check_save_flags=$CFLAGS
8005 CFLAGS="$CFLAGS $ax_compiler_flags_test $flag"
8006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8007 /* end confdefs.h. */
8008
8009 int
8010 main (void)
8011 {
8012
8013 ;
8014 return 0;
8015 }
8016 _ACEOF
8017 if ac_fn_c_try_compile "$LINENO"
8018 then :
8019 eval "$as_CACHEVAR=yes"
8020 else case e in #(
8021 e) eval "$as_CACHEVAR=no" ;;
8022 esac
8023 fi
8024 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8025 CFLAGS=$ax_check_save_flags ;;
8026 esac
8027 fi
8028 eval ac_res=\$$as_CACHEVAR
8029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8030 printf "%s\n" "$ac_res" >&6; }
8031 if eval test \"x\$"$as_CACHEVAR"\" = x"yes"
8032 then :
8033
8034 if test ${WARN_CFLAGS+y}
8035 then :
8036
8037 case " $WARN_CFLAGS " in #(
8038 *" $flag "*) :
8039 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS already contains \$flag"; } >&5
8040 (: WARN_CFLAGS already contains $flag) 2>&5
8041 ac_status=$?
8042 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8043 test $ac_status = 0; } ;; #(
8044 *) :
8045
8046 as_fn_append WARN_CFLAGS " $flag"
8047 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5
8048 (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5
8049 ac_status=$?
8050 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8051 test $ac_status = 0; }
8052 ;;
8053 esac
8054
8055 else case e in #(
8056 e)
8057 WARN_CFLAGS=$flag
8058 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5
8059 (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5
8060 ac_status=$?
8061 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8062 test $ac_status = 0; }
8063 ;;
8064 esac
8065 fi
8066
8067 else case e in #(
8068 e) : ;;
8069 esac
8070 fi
8071
8072 done
8073
8074 ;; #(
8075 *) :
8076 ;;
8077 esac
8078 done
8079
8080 ac_ext=c
8081 ac_cpp='$CPP $CPPFLAGS'
8082 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8083 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8084 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8085
8086
8087 # Substitute the variables
8088
8089
8090
8091
8092
8093 # Check whether --enable-popcnt was given.
8094 if test ${enable_popcnt+y}
8095 then :
8096 enableval=$enable_popcnt;
8097 else case e in #(
8098 e) enable_popcnt=yes ;;
8099 esac
8100 fi
8101
8102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to try and use __builtin_popcountl" >&5
8103 printf %s "checking whether to try and use __builtin_popcountl... " >&6; }
8104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_popcnt" >&5
8105 printf "%s\n" "$enable_popcnt" >&6; }
8106
8107 if test "x$enable_popcnt" != "xno"
8108 then :
8109 USE_POPCNT=1
8110 else case e in #(
8111 e) USE_POPCNT=0 ;;
8112 esac
8113 fi
8114
8115
8116 printf "%s\n" "#define USE_POPCNT $USE_POPCNT" >>confdefs.h
8117
8118
8119
8120 # We support finding dependencies in certain non-standard locations:
8121 # Homebrew on macOS: $(brew --prefix) (usually /opt/homebrew or /usr/local)
8122 # Fink on macOS: /sw
8123 # MacPorts: /opt/local
8124 HOMEBREW_PREFIX="$(brew --prefix 2>/dev/null || :)"
8125 DEFAULT_SEARCH_PATH="$HOMEBREW_PREFIX /opt/local /sw"
8126
8127
8128 # Check whether --with-gmp was given.
8129 if test ${with_gmp+y}
8130 then :
8131 withval=$with_gmp;
8132 else case e in #(
8133 e) with_gmp=yes ;;
8134 esac
8135 fi
8136
8137
8138 BUILD_GMP=no
8139 GMP_SEARCH_PATH="DEFAULTS ${DEFAULT_SEARCH_PATH}"
8140 GMP_CPPFLAGS=
8141 GMP_LDFLAGS=
8142 GMP_LIBS="-lgmp"
8143 GMP_PREFIX=
8144 case $with_gmp in #(
8145 builtin) :
8146
8147 # user explicitly requested to use builtin GMP
8148 GMP_SEARCH_PATH=""
8149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using bundled GMP" >&5
8150 printf "%s\n" "$as_me: Using bundled GMP" >&6;}
8151 ;; #(
8152 no) :
8153
8154 as_fn_error $? "Building without GMP is not supported" "$LINENO" 5
8155 ;; #(
8156 system) :
8157
8158 with_gmp=yes
8159 ;; #(
8160 yes) :
8161 ;; #(
8162 *) :
8163
8164 GMP_SEARCH_PATH="$with_gmp"
8165
8166 ;; #(
8167 *) :
8168 ;;
8169 esac
8170
8171 save_CFLAGS=${CFLAGS}
8172 save_LIBS=${LIBS}
8173
8174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GMP" >&5
8175 printf %s "checking for GMP... " >&6; }
8176 gmp_found=no
8177 for GMP_PREFIX in ${GMP_SEARCH_PATH} ; do
8178 if test "$GMP_PREFIX" != "DEFAULTS"
8179 then :
8180
8181 GMP_CPPFLAGS="-I${GMP_PREFIX}/include"
8182 GMP_LDFLAGS="-L${GMP_PREFIX}/lib"
8183
8184 else case e in #(
8185 e)
8186 GMP_PREFIX=""
8187 GMP_CPPFLAGS=""
8188 GMP_LDFLAGS=""
8189 ;;
8190 esac
8191 fi
8192 CFLAGS="${GMP_CPPFLAGS} ${save_CFLAGS}"
8193 LIBS="${GMP_LDFLAGS} ${GMP_LIBS} ${save_LIBS}"
8194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8195 /* end confdefs.h. */
8196 #include <gmp.h>
8197 int
8198 main (void)
8199 {
8200 mpz_t a; mpz_init (a);
8201 ;
8202 return 0;
8203 }
8204 _ACEOF
8205 if ac_fn_c_try_link "$LINENO"
8206 then :
8207 gmp_found=yes
8208 if test x"$GMP_PREFIX" != x""
8209 then :
8210
8211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, at prefix ${GMP_PREFIX}" >&5
8212 printf "%s\n" "yes, at prefix ${GMP_PREFIX}" >&6; }
8213
8214 else case e in #(
8215 e)
8216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, in default search path" >&5
8217 printf "%s\n" "yes, in default search path" >&6; }
8218 ;;
8219 esac
8220 fi
8221 break
8222 fi
8223 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8224 conftest$ac_exeext conftest.$ac_ext
8225 done
8226
8227 CFLAGS=${save_CFLAGS}
8228 LIBS=${save_LIBS}
8229
8230 # Fall back to bundled GMP if necessary
8231 if test x$gmp_found = xno
8232 then :
8233
8234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: build bundled copy" >&5
8235 printf "%s\n" "build bundled copy" >&6; }
8236 BUILD_GMP=yes
8237 GMP_PREFIX='${abs_builddir}/extern/install/gmp'
8238 GMP_CPPFLAGS='-I${abs_builddir}/extern/install/gmp/include'
8239 GMP_LDFLAGS='-L${abs_builddir}/extern/install/gmp/lib'
8240 GMP_LIBS='-Wl,-rpath,${abs_builddir}/extern/install/gmp/lib -lgmp'
8241
8242 fi
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252 # Check whether --with-zlib was given.
8253 if test ${with_zlib+y}
8254 then :
8255 withval=$with_zlib;
8256 else case e in #(
8257 e) with_zlib=yes ;;
8258 esac
8259 fi
8260
8261
8262 BUILD_ZLIB=no
8263 ZLIB_SEARCH_PATH="DEFAULTS ${DEFAULT_SEARCH_PATH}"
8264 ZLIB_CPPFLAGS=
8265 ZLIB_LDFLAGS=
8266 ZLIB_LIBS="-lz"
8267 case $with_zlib in #(
8268 builtin) :
8269
8270 # user explicitly requested to use builtin zlib
8271 ZLIB_SEARCH_PATH=""
8272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using bundled zlib" >&5
8273 printf "%s\n" "$as_me: Using bundled zlib" >&6;}
8274 ;; #(
8275 no) :
8276
8277 as_fn_error $? "Building without zlib is not supported" "$LINENO" 5
8278 ;; #(
8279 system) :
8280
8281 with_zlib=yes
8282 ;; #(
8283 yes) :
8284 ;; #(
8285 *) :
8286
8287 ZLIB_SEARCH_PATH="$with_gmp"
8288
8289 ;; #(
8290 *) :
8291 ;;
8292 esac
8293
8294 save_CFLAGS=${CFLAGS}
8295 save_LIBS=${LIBS}
8296
8297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5
8298 printf %s "checking for zlib... " >&6; }
8299 zlib_found=no
8300 for ZLIB_PREFIX in ${ZLIB_SEARCH_PATH} ; do
8301 if test "$ZLIB_PREFIX" != "DEFAULTS"
8302 then :
8303
8304 ZLIB_CPPFLAGS="-I${ZLIB_PREFIX}/include"
8305 ZLIB_LDFLAGS="-L${ZLIB_PREFIX}/lib"
8306
8307 else case e in #(
8308 e)
8309 ZLIB_PREFIX=""
8310 ZLIB_CPPFLAGS=""
8311 ZLIB_LDFLAGS=""
8312 ;;
8313 esac
8314 fi
8315 CFLAGS="${ZLIB_CPPFLAGS} ${save_CFLAGS}"
8316 LIBS="${ZLIB_LDFLAGS} ${ZLIB_LIBS} ${save_LIBS}"
8317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8318 /* end confdefs.h. */
8319 #include <zlib.h>
8320 int
8321 main (void)
8322 {
8323 z_stream a; inflateEnd(&a);
8324 ;
8325 return 0;
8326 }
8327 _ACEOF
8328 if ac_fn_c_try_link "$LINENO"
8329 then :
8330 zlib_found=yes
8331 if test x"$ZLIB_PREFIX" != x""
8332 then :
8333
8334 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, at prefix ${ZLIB_PREFIX}" >&5
8335 printf "%s\n" "yes, at prefix ${ZLIB_PREFIX}" >&6; }
8336
8337 else case e in #(
8338 e)
8339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, in default search path" >&5
8340 printf "%s\n" "yes, in default search path" >&6; }
8341 ;;
8342 esac
8343 fi
8344 break
8345 fi
8346 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8347 conftest$ac_exeext conftest.$ac_ext
8348 done
8349
8350 CFLAGS=${save_CFLAGS}
8351 LIBS=${save_LIBS}
8352
8353 # Fall back to bundled zlib if necessary
8354 if test x$zlib_found = xno
8355 then :
8356
8357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: build bundled copy" >&5
8358 printf "%s\n" "build bundled copy" >&6; }
8359 BUILD_ZLIB=yes
8360 ZLIB_CPPFLAGS='-I${abs_builddir}/extern/install/zlib/include'
8361 ZLIB_LDFLAGS='-L${abs_builddir}/extern/install/zlib/lib'
8362 ZLIB_LIBS='-Wl,-rpath,${abs_builddir}/extern/install/zlib/lib -lz'
8363
8364 fi
8365
8366
8367
8368
8369
8370
8371
8372
8373 # Check whether --with-readline was given.
8374 if test ${with_readline+y}
8375 then :
8376 withval=$with_readline;
8377 else case e in #(
8378 e) with_readline=check ;;
8379 esac
8380 fi
8381
8382
8383 READLINE_SEARCH_PATH="DEFAULTS DEFAULTS_EREADLINE $HOMEBREW_PREFIX/opt/readline ${DEFAULT_SEARCH_PATH}"
8384 READLINE_CPPFLAGS=
8385 READLINE_LDFLAGS=
8386 READLINE_LIBS=
8387
8388 case $with_readline in #(
8389 no) :
8390
8391 READLINE_SEARCH_PATH=""
8392 ;; #(
8393 check) :
8394 ;; #(
8395 yes) :
8396 ;; #(
8397 *) :
8398
8399 READLINE_SEARCH_PATH="$with_readline"
8400
8401 ;; #(
8402 *) :
8403 ;;
8404 esac
8405
8406 save_CFLAGS=${CFLAGS}
8407 save_LIBS=${LIBS}
8408
8409 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU readline" >&5
8410 printf %s "checking for GNU readline... " >&6; }
8411 readline_found=no
8412 for READLINE_PREFIX in ${READLINE_SEARCH_PATH} ; do
8413 case $READLINE_PREFIX in #(
8414 DEFAULTS) :
8415
8416 READLINE_PREFIX=""
8417 READLINE_CPPFLAGS=""
8418 READLINE_LDFLAGS=""
8419 READLINE_LIBS="-lreadline"
8420 ;; #(
8421 DEFAULTS_EREADLINE) :
8422
8423 READLINE_PREFIX=""
8424 READLINE_CPPFLAGS="-I/usr/local/include/ereadline"
8425 READLINE_LDFLAGS=""
8426 READLINE_LIBS="-lereadline"
8427 ;; #(
8428 *) :
8429
8430 READLINE_CPPFLAGS="-I${READLINE_PREFIX}/include"
8431 READLINE_LDFLAGS="-L${READLINE_PREFIX}/lib"
8432 READLINE_LIBS="-lreadline"
8433
8434 ;; #(
8435 *) :
8436 ;;
8437 esac
8438 CFLAGS="${READLINE_CPPFLAGS} ${save_CFLAGS}"
8439 LIBS="${READLINE_LDFLAGS} ${READLINE_LIBS} ${save_LIBS}"
8440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8441 /* end confdefs.h. */
8442 #include <stdio.h>
8443 #include <readline/readline.h>
8444 int
8445 main (void)
8446 {
8447 rl_bind_keyseq(0,0);
8448 ;
8449 return 0;
8450 }
8451 _ACEOF
8452 if ac_fn_c_try_link "$LINENO"
8453 then :
8454 readline_found=yes
8455 if test x"$READLINE_PREFIX" != x""
8456 then :
8457
8458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, at prefix ${READLINE_PREFIX}" >&5
8459 printf "%s\n" "yes, at prefix ${READLINE_PREFIX}" >&6; }
8460
8461 else case e in #(
8462 e)
8463 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, in default search path" >&5
8464 printf "%s\n" "yes, in default search path" >&6; }
8465 ;;
8466 esac
8467 fi
8468
8469 printf "%s\n" "#define HAVE_LIBREADLINE 1" >>confdefs.h
8470
8471 break
8472 fi
8473 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8474 conftest$ac_exeext conftest.$ac_ext
8475 done
8476
8477 CFLAGS=${save_CFLAGS}
8478 LIBS=${save_LIBS}
8479
8480 if test x$readline_found = xno
8481 then :
8482
8483 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8484 printf "%s\n" "no" >&6; }
8485 if test x$with_readline != xcheck && test x$with_readline != xno
8486 then :
8487
8488 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
8489 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
8490 as_fn_error $? "--with-readline was given, but further tests for readline failed
8491 See 'config.log' for more details" "$LINENO" 5; }
8492
8493 fi
8494 READLINE_CPPFLAGS=
8495 READLINE_LDFLAGS=
8496 READLINE_LIBS=
8497
8498 fi
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508 if test "x$with_julia" != xno
8509 then :
8510
8511
8512 if test "x$JULIA_VERSION" != x
8513 then :
8514
8515 elif test "x$JULIA_CFLAGS" != x
8516 then :
8517
8518 elif test "x$JULIA_LDFLAGS" != x
8519 then :
8520
8521 elif test "x$JULIA_LIBS" != x
8522 then :
8523
8524 else case e in #(
8525 e)
8526 if test -x "$with_julia" && test ! -d "$with_julia"
8527 then :
8528
8529 JULIA="${with_julia}"
8530
8531 else case e in #(
8532 e)
8533 if test -d "$with_julia"
8534 then :
8535
8536 JULIA_PATH="${with_julia}/bin:${with_julia}:${with_julia}/usr/bin"
8537
8538 else case e in #(
8539 e)
8540 if test "x$with_julia" != xyes
8541 then :
8542 as_fn_error $? "invalid argument to --with-julia" "$LINENO" 5
8543 fi
8544 JULIA_PATH="${PATH}"
8545 ;;
8546 esac
8547 fi
8548 # Extract the first word of "julia", so it can be a program name with args.
8549 set dummy julia; ac_word=$2
8550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8551 printf %s "checking for $ac_word... " >&6; }
8552 if test ${ac_cv_path_JULIA+y}
8553 then :
8554 printf %s "(cached) " >&6
8555 else case e in #(
8556 e) case $JULIA in
8557 [\\/]* | ?:[\\/]*)
8558 ac_cv_path_JULIA="$JULIA" # Let the user override the test with a path.
8559 ;;
8560 *)
8561 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8562 for as_dir in $JULIA_PATH
8563 do
8564 IFS=$as_save_IFS
8565 case $as_dir in #(((
8566 '') as_dir=./ ;;
8567 */) ;;
8568 *) as_dir=$as_dir/ ;;
8569 esac
8570 for ac_exec_ext in '' $ac_executable_extensions; do
8571 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8572 ac_cv_path_JULIA="$as_dir$ac_word$ac_exec_ext"
8573 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8574 break 2
8575 fi
8576 done
8577 done
8578 IFS=$as_save_IFS
8579
8580 ;;
8581 esac ;;
8582 esac
8583 fi
8584 JULIA=$ac_cv_path_JULIA
8585 if test -n "$JULIA"; then
8586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $JULIA" >&5
8587 printf "%s\n" "$JULIA" >&6; }
8588 else
8589 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8590 printf "%s\n" "no" >&6; }
8591 fi
8592
8593
8594 ;;
8595 esac
8596 fi
8597 if test "x$JULIA" = x
8598 then :
8599 as_fn_error $? "no julia executable found" "$LINENO" 5
8600 fi
8601 JL_SHARE=$($JULIA --startup-file=no -e 'print(joinpath(Sys.BINDIR, Base.DATAROOTDIR, "julia"))')
8602 ;;
8603 esac
8604 fi
8605
8606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Julia version" >&5
8607 printf %s "checking for Julia version... " >&6; }
8608 if test "x$JULIA_VERSION" = x
8609 then :
8610
8611 JULIA_VERSION=$(${JULIA} --startup-file=no -e 'print("$(VERSION.major).$(VERSION.minor)")')
8612 if test $? != 0
8613 then :
8614 as_fn_error $? "failed to obtain Julia version" "$LINENO" 5
8615 fi
8616
8617 fi
8618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${JULIA_VERSION}" >&5
8619 printf "%s\n" "${JULIA_VERSION}" >&6; }
8620
8621 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for JULIA_CFLAGS" >&5
8622 printf %s "checking for JULIA_CFLAGS... " >&6; }
8623 if test "x$JULIA_CFLAGS" = x
8624 then :
8625
8626 if test -f "${JL_SHARE}/julia-config.jl"
8627 then :
8628
8629 else case e in #(
8630 e) as_fn_error $? "no julia-config.jl found" "$LINENO" 5 ;;
8631 esac
8632 fi
8633 JULIA_CFLAGS=$(${JULIA} --startup-file=no ${JL_SHARE}/julia-config.jl --cflags 2>/dev/null)
8634 JULIA_CFLAGS=${JULIA_CFLAGS/-std=gnu99/} # need to remove -std=gnu99 for our C11 and C++ code
8635 if test $? != 0
8636 then :
8637 as_fn_error $? "failed to obtain JULIA_CFLAGS from julia-config.jl" "$LINENO" 5
8638 fi
8639
8640 fi
8641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${JULIA_CFLAGS}" >&5
8642 printf "%s\n" "${JULIA_CFLAGS}" >&6; }
8643
8644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for JULIA_LDFLAGS" >&5
8645 printf %s "checking for JULIA_LDFLAGS... " >&6; }
8646 if test "x$JULIA_LDFLAGS" = x
8647 then :
8648
8649 if test -f "${JL_SHARE}/julia-config.jl"
8650 then :
8651
8652 else case e in #(
8653 e) as_fn_error $? "no julia-config.jl found" "$LINENO" 5 ;;
8654 esac
8655 fi
8656 JULIA_LDFLAGS=$(${JULIA} --startup-file=no ${JL_SHARE}/julia-config.jl --ldflags)
8657 if test $? != 0
8658 then :
8659 as_fn_error $? "failed to obtain JULIA_LDFLAGS from julia-config.jl" "$LINENO" 5
8660 fi
8661 JULIA_LDFLAGS=${JULIA_LDFLAGS//\'/}
8662
8663 fi
8664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${JULIA_LDFLAGS}" >&5
8665 printf "%s\n" "${JULIA_LDFLAGS}" >&6; }
8666
8667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for JULIA_LIBS" >&5
8668 printf %s "checking for JULIA_LIBS... " >&6; }
8669 if test "x$JULIA_LIBS" = x
8670 then :
8671
8672 if test -f "${JL_SHARE}/julia-config.jl"
8673 then :
8674
8675 else case e in #(
8676 e) as_fn_error $? "no julia-config.jl found" "$LINENO" 5 ;;
8677 esac
8678 fi
8679 JULIA_LIBS=$(${JULIA} --startup-file=no ${JL_SHARE}/julia-config.jl --ldlibs)
8680 if test $? != 0
8681 then :
8682 as_fn_error $? "failed to obtain JULIA_LIBS from julia-config.jl" "$LINENO" 5
8683 fi
8684 # remove apostrophes, they confuse libtool in some cases.
8685 JULIA_LIBS=${JULIA_LIBS//\'/}
8686
8687 fi
8688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${JULIA_LIBS}" >&5
8689 printf "%s\n" "${JULIA_LIBS}" >&6; }
8690
8691 else case e in #(
8692 e)
8693 if test "x$with_gc" = xjulia
8694 then :
8695
8696 as_fn_error $? " julia was selected as GC, but julia support was disabled " "$LINENO" 5
8697
8698 fi
8699 ;;
8700 esac
8701 fi
8702
8703
8704
8705
8706
8707
8708 if test "x$with_gc" = xboehm
8709 then :
8710
8711 # We bundle two libraries we need for HPC-GAP:
8712 # Boehm garbage collector, see https://www.hboehm.info/gc/
8713 # libatomic_ops - part of Boehm GC, but see also https://github.com/ivmai/libatomic_ops
8714 #
8715 # We bundle them because we need a few patches to Boehm GC which are
8716 # not upstream (and it is unclear whether they ever will be).
8717 # And we bundle libatomic_ops because its version must match that
8718 # of Boehm GC; the easiest way to ensure that is to include that, too.
8719 #
8720 # As a side benefit, users do not have to worry about installing dependencies.
8721
8722 BUILD_LIBATOMIC_OPS=yes
8723 LIBATOMIC_OPS_CPPFLAGS='-I${abs_builddir}/extern/install/libatomic_ops/include'
8724 LIBATOMIC_OPS_LDFLAGS='-L${abs_builddir}/extern/install/libatomic_ops/lib'
8725 LIBATOMIC_OPS_LIBS='-Wl,-rpath,${abs_builddir}/extern/install/libatomic_ops/lib -latomic_ops'
8726
8727
8728
8729
8730
8731 ATOMIC_OPS_CFLAGS=$LIBATOMIC_OPS_CPPFLAGS
8732 ATOMIC_OPS_LIBS=$LIBATOMIC_OPS_LDFLAGS
8733
8734
8735 BUILD_BOEHM_GC=yes
8736 BOEHM_GC_CPPFLAGS='-I${abs_builddir}/extern/install/gc/include'
8737 BOEHM_GC_LDFLAGS='-L${abs_builddir}/extern/install/gc/lib'
8738 BOEHM_GC_LIBS='-Wl,-rpath,${abs_builddir}/extern/install/gc/lib -lgc'
8739
8740
8741
8742
8743
8744
8745 fi
8746
8747
8748 gap_kernel_major_version=11
8749
8750 gap_kernel_minor_version=0
8751
8752
8753
8754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the GAPARCH" >&5
8755 printf %s "checking the GAPARCH... " >&6; }
8756
8757 case "$host_os" in
8758 *darwin*)
8759 # On macOS / Darwin, override the config.guess result, which includes
8760 # the minor versions of macOS, which has no benefit but is painful as
8761 # every patch update of the OS may result in all packages having to be
8762 # recompiled. So instead of e.g. `darwin21.2.0` (for macOS 12.2.0) and
8763 # `darwin21.4.0` (for macOS 12.3.1), use just `darwin21`, and so on.
8764 GAPARCH="$host_cpu-$host_vendor-${host_os%%.*.*}"
8765 ;;
8766 *)
8767 GAPARCH="$host"
8768 ;;
8769 esac
8770
8771 if test "x$enable_hpcgap" = xyes
8772 then :
8773 GAPARCH="$GAPARCH-hpcgap"
8774 elif test "x$with_julia" != xno
8775 then :
8776 GAPARCH="$GAPARCH-julia${JULIA_VERSION}-"
8777 else case e in #(
8778 e) # else
8779 GAPARCH="$GAPARCH-default" ;;
8780 esac
8781 fi
8782
8783 GAPARCH="${GAPARCH}${ABI}"
8784
8785 GAPARCH="${GAPARCH}-kv${gap_kernel_major_version}"
8786
8787 if test "x$ARCHEXT" != "x"
8788 then :
8789 GAPARCH="$GAPARCH-$ARCHEXT"
8790 fi
8791
8792 if test "x$ARCH" != "x"
8793 then :
8794 GAPARCH="$ARCH"
8795 fi
8796
8797 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${GAPARCH}" >&5
8798 printf "%s\n" "${GAPARCH}" >&6; }
8799
8800 printf "%s\n" "#define GAPARCH \"$GAPARCH\"" >>confdefs.h
8801
8802
8803
8804
8805
8806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking unaligned access" >&5
8807 printf %s "checking unaligned access... " >&6; }
8808 if test ${gp_cv_c_long_align+y}
8809 then :
8810 printf %s "(cached) " >&6
8811 else case e in #(
8812 e)
8813 case "$host" in
8814 alpha* )
8815 gp_cv_c_long_align=8;;
8816 mips-* | sparc-* )
8817 gp_cv_c_long_align=$ac_cv_sizeof_void_p;;
8818 i386-*-* | i486-*-* | i586-*-* | i686-*-*)
8819 gp_cv_c_long_align=2;;
8820 x86_64-* )
8821 gp_cv_c_long_align=2;;
8822 * )
8823 gp_cv_c_long_align=8 # default value, as fallback
8824 case "$host" in
8825 *OSF* | *osf* )
8826 uac p sigbus;;
8827 esac
8828 ac_ext=c
8829 ac_cpp='$CPP $CPPFLAGS'
8830 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8831 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8832 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8833
8834 if test "$cross_compiling" = yes
8835 then :
8836
8837 else case e in #(
8838 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8839 /* end confdefs.h. */
8840 char buf[32];main(){long i= *(long*)(buf+1);buf[1]=(char)i;return 0;}
8841 _ACEOF
8842 if ac_fn_c_try_run "$LINENO"
8843 then :
8844 gp_cv_c_long_align=1
8845 else case e in #(
8846 e)
8847 if test "$cross_compiling" = yes
8848 then :
8849
8850 else case e in #(
8851 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8852 /* end confdefs.h. */
8853 char buf[32];main(){long i= *(long*)(buf+2);buf[1]=(char)i;return 0;}
8854 _ACEOF
8855 if ac_fn_c_try_run "$LINENO"
8856 then :
8857 gp_cv_c_long_align=2
8858 else case e in #(
8859 e)
8860 if test "$cross_compiling" = yes
8861 then :
8862
8863 else case e in #(
8864 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8865 /* end confdefs.h. */
8866 char buf[32];main(){long i= *(long*)(buf+4);buf[1]=(char)i;return 0;}
8867 _ACEOF
8868 if ac_fn_c_try_run "$LINENO"
8869 then :
8870 gp_cv_c_long_align=4
8871 else case e in #(
8872 e)
8873 if test "$cross_compiling" = yes
8874 then :
8875
8876 else case e in #(
8877 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8878 /* end confdefs.h. */
8879 char buf[32];main(){long i= *(long*)(buf+8);buf[1]=(char)i;return 0;}
8880 _ACEOF
8881 if ac_fn_c_try_run "$LINENO"
8882 then :
8883 gp_cv_c_long_align=8
8884 fi
8885 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8886 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
8887 esac
8888 fi
8889
8890 ;;
8891 esac
8892 fi
8893 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8894 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
8895 esac
8896 fi
8897
8898 ;;
8899 esac
8900 fi
8901 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8902 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
8903 esac
8904 fi
8905
8906 ;;
8907 esac
8908 fi
8909 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8910 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
8911 esac
8912 fi
8913
8914 ac_ext=c
8915 ac_cpp='$CPP $CPPFLAGS'
8916 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8917 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8918 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8919
8920 rm -f core core.* *.core
8921 esac
8922 ;;
8923 esac
8924 fi
8925 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gp_cv_c_long_align" >&5
8926 printf "%s\n" "$gp_cv_c_long_align" >&6; }
8927
8928 printf "%s\n" "#define C_STACK_ALIGN $gp_cv_c_long_align" >>confdefs.h
8929
8930
8931
8932 case "$host_cpu" in
8933 sparc* )
8934
8935 printf "%s\n" "#define SYS_IS_SPARC 1" >>confdefs.h
8936
8937 ;;
8938 esac
8939
8940
8941
8942 ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
8943 if test "x$ac_cv_header_termios_h" = xyes
8944 then :
8945 printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h
8946
8947 fi
8948
8949 ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default"
8950 if test "x$ac_cv_header_sys_ioctl_h" = xyes
8951 then :
8952 printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h
8953
8954 fi
8955 ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default"
8956 if test "x$ac_cv_header_sys_resource_h" = xyes
8957 then :
8958 printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h
8959
8960 fi
8961
8962
8963
8964 # openpty() is available on various BSD variants, but also in glibc.
8965 # On BSD systems, one usually needs to add -lutil to LIBS in order
8966 # to use it.
8967 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing openpty" >&5
8968 printf %s "checking for library containing openpty... " >&6; }
8969 if test ${ac_cv_search_openpty+y}
8970 then :
8971 printf %s "(cached) " >&6
8972 else case e in #(
8973 e) ac_func_search_save_LIBS=$LIBS
8974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8975 /* end confdefs.h. */
8976
8977 /* Override any GCC internal prototype to avoid an error.
8978 Use char because int might match the return type of a GCC
8979 builtin and then its argument prototype would still apply.
8980 The 'extern "C"' is for builds by C++ compilers;
8981 although this is not generally supported in C code supporting it here
8982 has little cost and some practical benefit (sr 110532). */
8983 #ifdef __cplusplus
8984 extern "C"
8985 #endif
8986 char openpty (void);
8987 int
8988 main (void)
8989 {
8990 return openpty ();
8991 ;
8992 return 0;
8993 }
8994 _ACEOF
8995 for ac_lib in '' util
8996 do
8997 if test -z "$ac_lib"; then
8998 ac_res="none required"
8999 else
9000 ac_res=-l$ac_lib
9001 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9002 fi
9003 if ac_fn_c_try_link "$LINENO"
9004 then :
9005 ac_cv_search_openpty=$ac_res
9006 fi
9007 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9008 conftest$ac_exeext
9009 if test ${ac_cv_search_openpty+y}
9010 then :
9011 break
9012 fi
9013 done
9014 if test ${ac_cv_search_openpty+y}
9015 then :
9016
9017 else case e in #(
9018 e) ac_cv_search_openpty=no ;;
9019 esac
9020 fi
9021 rm conftest.$ac_ext
9022 LIBS=$ac_func_search_save_LIBS ;;
9023 esac
9024 fi
9025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openpty" >&5
9026 printf "%s\n" "$ac_cv_search_openpty" >&6; }
9027 ac_res=$ac_cv_search_openpty
9028 if test "$ac_res" != no
9029 then :
9030 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9031
9032 printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h
9033
9034 fi
9035
9036
9037 if test "x$ac_cv_search_openpty" = xno
9038 then :
9039
9040 # Check for POSIX 98 pty APIs to use instead of openpty()
9041 ac_fn_c_check_func "$LINENO" "ptsname" "ac_cv_func_ptsname"
9042 if test "x$ac_cv_func_ptsname" = xyes
9043 then :
9044 printf "%s\n" "#define HAVE_PTSNAME 1" >>confdefs.h
9045
9046 fi
9047 ac_fn_c_check_func "$LINENO" "grantpt" "ac_cv_func_grantpt"
9048 if test "x$ac_cv_func_grantpt" = xyes
9049 then :
9050 printf "%s\n" "#define HAVE_GRANTPT 1" >>confdefs.h
9051
9052 fi
9053 ac_fn_c_check_func "$LINENO" "unlockpt" "ac_cv_func_unlockpt"
9054 if test "x$ac_cv_func_unlockpt" = xyes
9055 then :
9056 printf "%s\n" "#define HAVE_UNLOCKPT 1" >>confdefs.h
9057
9058 fi
9059 ac_fn_c_check_func "$LINENO" "posix_openpt" "ac_cv_func_posix_openpt"
9060 if test "x$ac_cv_func_posix_openpt" = xyes
9061 then :
9062 printf "%s\n" "#define HAVE_POSIX_OPENPT 1" >>confdefs.h
9063
9064 fi
9065
9066
9067 else case e in #(
9068 e)
9069 # Check for headers declaring openpty()
9070 ac_fn_c_check_header_compile "$LINENO" "util.h" "ac_cv_header_util_h" "$ac_includes_default"
9071 if test "x$ac_cv_header_util_h" = xyes
9072 then :
9073 printf "%s\n" "#define HAVE_UTIL_H 1" >>confdefs.h
9074
9075 fi
9076 ac_fn_c_check_header_compile "$LINENO" "pty.h" "ac_cv_header_pty_h" "$ac_includes_default"
9077 if test "x$ac_cv_header_pty_h" = xyes
9078 then :
9079 printf "%s\n" "#define HAVE_PTY_H 1" >>confdefs.h
9080
9081 fi
9082 ac_fn_c_check_header_compile "$LINENO" "libutil.h" "ac_cv_header_libutil_h" "$ac_includes_default"
9083 if test "x$ac_cv_header_libutil_h" = xyes
9084 then :
9085 printf "%s\n" "#define HAVE_LIBUTIL_H 1" >>confdefs.h
9086
9087 fi
9088
9089 ;;
9090 esac
9091 fi
9092
9093 ac_fn_c_check_header_compile "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default"
9094 if test "x$ac_cv_header_signal_h" = xyes
9095 then :
9096 printf "%s\n" "#define HAVE_SIGNAL_H 1" >>confdefs.h
9097
9098 fi
9099
9100 ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
9101 if test "x$ac_cv_func_select" = xyes
9102 then :
9103 printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h
9104
9105 fi
9106
9107
9108 ac_fn_c_check_header_compile "$LINENO" "spawn.h" "ac_cv_header_spawn_h" "$ac_includes_default"
9109 if test "x$ac_cv_header_spawn_h" = xyes
9110 then :
9111 printf "%s\n" "#define HAVE_SPAWN_H 1" >>confdefs.h
9112
9113 fi
9114
9115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
9116 printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
9117 if test ${ac_cv_header_sys_wait_h+y}
9118 then :
9119 printf %s "(cached) " >&6
9120 else case e in #(
9121 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9122 /* end confdefs.h. */
9123 #include <sys/types.h>
9124 #include <sys/wait.h>
9125 #ifndef WEXITSTATUS
9126 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
9127 #endif
9128 #ifndef WIFEXITED
9129 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9130 #endif
9131
9132 int
9133 main (void)
9134 {
9135 int s;
9136 wait (&s);
9137 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9138 ;
9139 return 0;
9140 }
9141 _ACEOF
9142 if ac_fn_c_try_compile "$LINENO"
9143 then :
9144 ac_cv_header_sys_wait_h=yes
9145 else case e in #(
9146 e) ac_cv_header_sys_wait_h=no ;;
9147 esac
9148 fi
9149 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
9150 esac
9151 fi
9152 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
9153 printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; }
9154 if test $ac_cv_header_sys_wait_h = yes; then
9155
9156 printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
9157
9158 fi
9159
9160
9161 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
9162 "
9163 if test "x$ac_cv_type_pid_t" = xyes
9164 then :
9165
9166 else case e in #(
9167 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9168 /* end confdefs.h. */
9169
9170 #if defined _WIN64 && !defined __CYGWIN__
9171 LLP64
9172 #endif
9173
9174 int
9175 main (void)
9176 {
9177
9178 ;
9179 return 0;
9180 }
9181
9182 _ACEOF
9183 if ac_fn_c_try_compile "$LINENO"
9184 then :
9185 ac_pid_type='int'
9186 else case e in #(
9187 e) ac_pid_type='__int64' ;;
9188 esac
9189 fi
9190 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9191
9192 printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h
9193
9194 ;;
9195 esac
9196 fi
9197
9198
9199
9200 ac_func=
9201 for ac_item in $ac_func_c_list
9202 do
9203 if test $ac_func; then
9204 ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func
9205 if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then
9206 echo "#define $ac_item 1" >> confdefs.h
9207 fi
9208 ac_func=
9209 else
9210 ac_func=$ac_item
9211 fi
9212 done
9213
9214
9215
9216 if test "x$ac_cv_func_fork" = xyes; then
9217 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
9218 printf %s "checking for working fork... " >&6; }
9219 if test ${ac_cv_func_fork_works+y}
9220 then :
9221 printf %s "(cached) " >&6
9222 else case e in #(
9223 e) if test "$cross_compiling" = yes
9224 then :
9225 ac_cv_func_fork_works=cross
9226 else case e in #(
9227 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9228 /* end confdefs.h. */
9229 $ac_includes_default
9230 int
9231 main (void)
9232 {
9233
9234 /* By R. Kuhlmann. */
9235 return fork () < 0;
9236
9237 ;
9238 return 0;
9239 }
9240 _ACEOF
9241 if ac_fn_c_try_run "$LINENO"
9242 then :
9243 ac_cv_func_fork_works=yes
9244 else case e in #(
9245 e) ac_cv_func_fork_works=no ;;
9246 esac
9247 fi
9248 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9249 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
9250 esac
9251 fi
9252 ;;
9253 esac
9254 fi
9255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
9256 printf "%s\n" "$ac_cv_func_fork_works" >&6; }
9257
9258 else
9259 ac_cv_func_fork_works=$ac_cv_func_fork
9260 fi
9261 if test "x$ac_cv_func_fork_works" = xcross; then
9262 case $host in
9263 *-*-amigaos* | *-*-msdosdjgpp*)
9264 # Override, as these systems have only a dummy fork() stub
9265 ac_cv_func_fork_works=no
9266 ;;
9267 *)
9268 ac_cv_func_fork_works=yes
9269 ;;
9270 esac
9271 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
9272 printf "%s\n" "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
9273 fi
9274 ac_cv_func_vfork_works=$ac_cv_func_vfork
9275 if test "x$ac_cv_func_vfork" = xyes; then
9276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
9277 printf %s "checking for working vfork... " >&6; }
9278 if test ${ac_cv_func_vfork_works+y}
9279 then :
9280 printf %s "(cached) " >&6
9281 else case e in #(
9282 e) if test "$cross_compiling" = yes
9283 then :
9284 ac_cv_func_vfork_works=cross
9285 else case e in #(
9286 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9287 /* end confdefs.h. */
9288 /* Thanks to Paul Eggert for this test. */
9289 $ac_includes_default
9290 #include <signal.h>
9291 #include <sys/wait.h>
9292 #ifdef HAVE_VFORK_H
9293 # include <vfork.h>
9294 #endif
9295
9296 static void
9297 do_nothing (int sig)
9298 {
9299 (void) sig;
9300 }
9301
9302 /* On some sparc systems, changes by the child to local and incoming
9303 argument registers are propagated back to the parent. The compiler
9304 is told about this with #include <vfork.h>, but some compilers
9305 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
9306 static variable whose address is put into a register that is
9307 clobbered by the vfork. */
9308 static void
9309 sparc_address_test (int arg)
9310 {
9311 static pid_t child;
9312 if (!child) {
9313 child = vfork ();
9314 if (child < 0) {
9315 perror ("vfork");
9316 _exit(2);
9317 }
9318 if (!child) {
9319 arg = getpid();
9320 write(-1, "", 0);
9321 _exit (arg);
9322 }
9323 }
9324 }
9325
9326 int
9327 main (void)
9328 {
9329 pid_t parent = getpid ();
9330 pid_t child;
9331
9332 sparc_address_test (0);
9333
9334 /* On Solaris 2.4, changes by the child to the signal handler
9335 also munge signal handlers in the parent. To detect this,
9336 start by putting the parent's handler in a known state. */
9337 signal (SIGTERM, SIG_DFL);
9338
9339 child = vfork ();
9340
9341 if (child == 0) {
9342 /* Here is another test for sparc vfork register problems. This
9343 test uses lots of local variables, at least as many local
9344 variables as main has allocated so far including compiler
9345 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
9346 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
9347 reuse the register of parent for one of the local variables,
9348 since it will think that parent can't possibly be used any more
9349 in this routine. Assigning to the local variable will thus
9350 munge parent in the parent process. */
9351 pid_t
9352 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9353 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9354 /* Convince the compiler that p..p7 are live; otherwise, it might
9355 use the same hardware register for all 8 local variables. */
9356 if (p != p1 || p != p2 || p != p3 || p != p4
9357 || p != p5 || p != p6 || p != p7)
9358 _exit(1);
9359
9360 /* Alter the child's signal handler. */
9361 if (signal (SIGTERM, do_nothing) != SIG_DFL)
9362 _exit(1);
9363
9364 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
9365 from child file descriptors. If the child closes a descriptor
9366 before it execs or exits, this munges the parent's descriptor
9367 as well. Test for this by closing stdout in the child. */
9368 _exit(close(fileno(stdout)) != 0);
9369 } else {
9370 int status;
9371 struct stat st;
9372
9373 while (wait(&status) != child)
9374 ;
9375 return (
9376 /* Was there some problem with vforking? */
9377 child < 0
9378
9379 /* Did the child munge the parent's signal handler? */
9380 || signal (SIGTERM, SIG_DFL) != SIG_DFL
9381
9382 /* Did the child fail? (This shouldn't happen.) */
9383 || status
9384
9385 /* Did the vfork/compiler bug occur? */
9386 || parent != getpid()
9387
9388 /* Did the file descriptor bug occur? */
9389 || fstat(fileno(stdout), &st) != 0
9390 );
9391 }
9392 }
9393 _ACEOF
9394 if ac_fn_c_try_run "$LINENO"
9395 then :
9396 ac_cv_func_vfork_works=yes
9397 else case e in #(
9398 e) ac_cv_func_vfork_works=no ;;
9399 esac
9400 fi
9401 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9402 conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
9403 esac
9404 fi
9405 ;;
9406 esac
9407 fi
9408 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
9409 printf "%s\n" "$ac_cv_func_vfork_works" >&6; }
9410
9411 fi;
9412 if test "x$ac_cv_func_fork_works" = xcross; then
9413 ac_cv_func_vfork_works=$ac_cv_func_vfork
9414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
9415 printf "%s\n" "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
9416 fi
9417
9418 if test "x$ac_cv_func_vfork_works" = xyes; then
9419
9420 printf "%s\n" "#define HAVE_WORKING_VFORK 1" >>confdefs.h
9421
9422 else
9423
9424 printf "%s\n" "#define vfork fork" >>confdefs.h
9425
9426 fi
9427 if test "x$ac_cv_func_fork_works" = xyes; then
9428
9429 printf "%s\n" "#define HAVE_WORKING_FORK 1" >>confdefs.h
9430
9431 fi
9432
9433 ac_fn_c_check_func "$LINENO" "popen" "ac_cv_func_popen"
9434 if test "x$ac_cv_func_popen" = xyes
9435 then :
9436 printf "%s\n" "#define HAVE_POPEN 1" >>confdefs.h
9437
9438 fi
9439 ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn"
9440 if test "x$ac_cv_func_posix_spawn" = xyes
9441 then :
9442 printf "%s\n" "#define HAVE_POSIX_SPAWN 1" >>confdefs.h
9443
9444 fi
9445
9446 ac_fn_c_check_func "$LINENO" "posix_spawn_file_actions_addchdir" "ac_cv_func_posix_spawn_file_actions_addchdir"
9447 if test "x$ac_cv_func_posix_spawn_file_actions_addchdir" = xyes
9448 then :
9449 printf "%s\n" "#define HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR 1" >>confdefs.h
9450
9451 fi
9452
9453 ac_fn_c_check_func "$LINENO" "posix_spawn_file_actions_addchdir_np" "ac_cv_func_posix_spawn_file_actions_addchdir_np"
9454 if test "x$ac_cv_func_posix_spawn_file_actions_addchdir_np" = xyes
9455 then :
9456 printf "%s\n" "#define HAVE_POSIX_SPAWN_FILE_ACTIONS_ADDCHDIR_NP 1" >>confdefs.h
9457
9458 fi
9459
9460
9461 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
9462
9463 "
9464 if test "x$ac_cv_type_sig_atomic_t" = xyes
9465 then :
9466
9467 else case e in #(
9468 e)
9469 printf "%s\n" "#define HAVE_SIG_ATOMIC_T /**/" >>confdefs.h
9470 ;;
9471 esac
9472 fi
9473
9474 ac_fn_c_check_func "$LINENO" "signal" "ac_cv_func_signal"
9475 if test "x$ac_cv_func_signal" = xyes
9476 then :
9477 printf "%s\n" "#define HAVE_SIGNAL 1" >>confdefs.h
9478
9479 fi
9480 ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
9481 if test "x$ac_cv_func_sigaction" = xyes
9482 then :
9483 printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h
9484
9485 fi
9486 ac_fn_c_check_func "$LINENO" "setpgid" "ac_cv_func_setpgid"
9487 if test "x$ac_cv_func_setpgid" = xyes
9488 then :
9489 printf "%s\n" "#define HAVE_SETPGID 1" >>confdefs.h
9490
9491 fi
9492
9493
9494
9495
9496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9497 printf %s "checking for library containing dlopen... " >&6; }
9498 if test ${ac_cv_search_dlopen+y}
9499 then :
9500 printf %s "(cached) " >&6
9501 else case e in #(
9502 e) ac_func_search_save_LIBS=$LIBS
9503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9504 /* end confdefs.h. */
9505
9506 /* Override any GCC internal prototype to avoid an error.
9507 Use char because int might match the return type of a GCC
9508 builtin and then its argument prototype would still apply.
9509 The 'extern "C"' is for builds by C++ compilers;
9510 although this is not generally supported in C code supporting it here
9511 has little cost and some practical benefit (sr 110532). */
9512 #ifdef __cplusplus
9513 extern "C"
9514 #endif
9515 char dlopen (void);
9516 int
9517 main (void)
9518 {
9519 return dlopen ();
9520 ;
9521 return 0;
9522 }
9523 _ACEOF
9524 for ac_lib in '' dl
9525 do
9526 if test -z "$ac_lib"; then
9527 ac_res="none required"
9528 else
9529 ac_res=-l$ac_lib
9530 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9531 fi
9532 if ac_fn_c_try_link "$LINENO"
9533 then :
9534 ac_cv_search_dlopen=$ac_res
9535 fi
9536 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9537 conftest$ac_exeext
9538 if test ${ac_cv_search_dlopen+y}
9539 then :
9540 break
9541 fi
9542 done
9543 if test ${ac_cv_search_dlopen+y}
9544 then :
9545
9546 else case e in #(
9547 e) ac_cv_search_dlopen=no ;;
9548 esac
9549 fi
9550 rm conftest.$ac_ext
9551 LIBS=$ac_func_search_save_LIBS ;;
9552 esac
9553 fi
9554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9555 printf "%s\n" "$ac_cv_search_dlopen" >&6; }
9556 ac_res=$ac_cv_search_dlopen
9557 if test "$ac_res" != no
9558 then :
9559 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9560
9561 printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h
9562
9563
9564 fi
9565
9566
9567
9568 ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default"
9569 if test "x$ac_cv_header_sys_time_h" = xyes
9570 then :
9571 printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h
9572
9573 fi
9574
9575 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
9576 if test "x$ac_cv_func_getrusage" = xyes
9577 then :
9578 printf "%s\n" "#define HAVE_GETRUSAGE 1" >>confdefs.h
9579
9580 fi
9581 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
9582 if test "x$ac_cv_func_gettimeofday" = xyes
9583 then :
9584 printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
9585
9586 fi
9587 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
9588 if test "x$ac_cv_func_clock_gettime" = xyes
9589 then :
9590 printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
9591
9592 fi
9593 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
9594 if test "x$ac_cv_func_clock_getres" = xyes
9595 then :
9596 printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
9597
9598 fi
9599
9600 ac_fn_c_check_func "$LINENO" "setitimer" "ac_cv_func_setitimer"
9601 if test "x$ac_cv_func_setitimer" = xyes
9602 then :
9603 printf "%s\n" "#define HAVE_SETITIMER 1" >>confdefs.h
9604
9605 fi
9606
9607
9608 ac_fn_c_check_func "$LINENO" "vm_allocate" "ac_cv_func_vm_allocate"
9609 if test "x$ac_cv_func_vm_allocate" = xyes
9610 then :
9611 printf "%s\n" "#define HAVE_VM_ALLOCATE 1" >>confdefs.h
9612
9613 fi
9614 ac_fn_c_check_func "$LINENO" "sbrk" "ac_cv_func_sbrk"
9615 if test "x$ac_cv_func_sbrk" = xyes
9616 then :
9617 printf "%s\n" "#define HAVE_SBRK 1" >>confdefs.h
9618
9619 fi
9620 ac_fn_c_check_func "$LINENO" "madvise" "ac_cv_func_madvise"
9621 if test "x$ac_cv_func_madvise" = xyes
9622 then :
9623 printf "%s\n" "#define HAVE_MADVISE 1" >>confdefs.h
9624
9625 fi
9626 ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf"
9627 if test "x$ac_cv_func_sysconf" = xyes
9628 then :
9629 printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h
9630
9631 fi
9632
9633
9634 # Check whether --enable-largefile was given.
9635 if test ${enable_largefile+y}
9636 then :
9637 enableval=$enable_largefile;
9638 fi
9639 if test "$enable_largefile,$enable_year2038" != no,no
9640 then :
9641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable large file support" >&5
9642 printf %s "checking for $CC option to enable large file support... " >&6; }
9643 if test ${ac_cv_sys_largefile_opts+y}
9644 then :
9645 printf %s "(cached) " >&6
9646 else case e in #(
9647 e) ac_save_CC="$CC"
9648 ac_opt_found=no
9649 for ac_opt in "none needed" "-D_FILE_OFFSET_BITS=64" "-D_LARGE_FILES=1" "-n32"; do
9650 if test x"$ac_opt" != x"none needed"
9651 then :
9652 CC="$ac_save_CC $ac_opt"
9653 fi
9654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9655 /* end confdefs.h. */
9656 #include <sys/types.h>
9657 #ifndef FTYPE
9658 # define FTYPE off_t
9659 #endif
9660 /* Check that FTYPE can represent 2**63 - 1 correctly.
9661 We can't simply define LARGE_FTYPE to be 9223372036854775807,
9662 since some C++ compilers masquerading as C compilers
9663 incorrectly reject 9223372036854775807. */
9664 #define LARGE_FTYPE (((FTYPE) 1 << 31 << 31) - 1 + ((FTYPE) 1 << 31 << 31))
9665 int FTYPE_is_large[(LARGE_FTYPE % 2147483629 == 721
9666 && LARGE_FTYPE % 2147483647 == 1)
9667 ? 1 : -1];
9668 int
9669 main (void)
9670 {
9671
9672 ;
9673 return 0;
9674 }
9675 _ACEOF
9676 if ac_fn_c_try_compile "$LINENO"
9677 then :
9678 if test x"$ac_opt" = x"none needed"
9679 then :
9680 # GNU/Linux s390x and alpha need _FILE_OFFSET_BITS=64 for wide ino_t.
9681 CC="$CC -DFTYPE=ino_t"
9682 if ac_fn_c_try_compile "$LINENO"
9683 then :
9684
9685 else case e in #(
9686 e) CC="$CC -D_FILE_OFFSET_BITS=64"
9687 if ac_fn_c_try_compile "$LINENO"
9688 then :
9689 ac_opt='-D_FILE_OFFSET_BITS=64'
9690 fi
9691 rm -f core conftest.err conftest.$ac_objext conftest.beam ;;
9692 esac
9693 fi
9694 rm -f core conftest.err conftest.$ac_objext conftest.beam
9695 fi
9696 ac_cv_sys_largefile_opts=$ac_opt
9697 ac_opt_found=yes
9698 fi
9699 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9700 test $ac_opt_found = no || break
9701 done
9702 CC="$ac_save_CC"
9703
9704 test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected" ;;
9705 esac
9706 fi
9707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_opts" >&5
9708 printf "%s\n" "$ac_cv_sys_largefile_opts" >&6; }
9709
9710 ac_have_largefile=yes
9711 case $ac_cv_sys_largefile_opts in #(
9712 "none needed") :
9713 ;; #(
9714 "supported through gnulib") :
9715 ;; #(
9716 "support not detected") :
9717 ac_have_largefile=no ;; #(
9718 "-D_FILE_OFFSET_BITS=64") :
9719
9720 printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h
9721 ;; #(
9722 "-D_LARGE_FILES=1") :
9723
9724 printf "%s\n" "#define _LARGE_FILES 1" >>confdefs.h
9725 ;; #(
9726 "-n32") :
9727 CC="$CC -n32" ;; #(
9728 *) :
9729 as_fn_error $? "internal error: bad value for \$ac_cv_sys_largefile_opts" "$LINENO" 5 ;;
9730 esac
9731
9732 if test "$enable_year2038" != no
9733 then :
9734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option for timestamps after 2038" >&5
9735 printf %s "checking for $CC option for timestamps after 2038... " >&6; }
9736 if test ${ac_cv_sys_year2038_opts+y}
9737 then :
9738 printf %s "(cached) " >&6
9739 else case e in #(
9740 e) ac_save_CPPFLAGS="$CPPFLAGS"
9741 ac_opt_found=no
9742 for ac_opt in "none needed" "-D_TIME_BITS=64" "-D__MINGW_USE_VC2005_COMPAT" "-U_USE_32_BIT_TIME_T -D__MINGW_USE_VC2005_COMPAT"; do
9743 if test x"$ac_opt" != x"none needed"
9744 then :
9745 CPPFLAGS="$ac_save_CPPFLAGS $ac_opt"
9746 fi
9747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9748 /* end confdefs.h. */
9749
9750 #include <time.h>
9751 /* Check that time_t can represent 2**32 - 1 correctly. */
9752 #define LARGE_TIME_T \\
9753 ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
9754 int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
9755 && LARGE_TIME_T % 65537 == 0)
9756 ? 1 : -1];
9757
9758 int
9759 main (void)
9760 {
9761
9762 ;
9763 return 0;
9764 }
9765 _ACEOF
9766 if ac_fn_c_try_compile "$LINENO"
9767 then :
9768 ac_cv_sys_year2038_opts="$ac_opt"
9769 ac_opt_found=yes
9770 fi
9771 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9772 test $ac_opt_found = no || break
9773 done
9774 CPPFLAGS="$ac_save_CPPFLAGS"
9775 test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected" ;;
9776 esac
9777 fi
9778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_year2038_opts" >&5
9779 printf "%s\n" "$ac_cv_sys_year2038_opts" >&6; }
9780
9781 ac_have_year2038=yes
9782 case $ac_cv_sys_year2038_opts in #(
9783 "none needed") :
9784 ;; #(
9785 "support not detected") :
9786 ac_have_year2038=no ;; #(
9787 "-D_TIME_BITS=64") :
9788
9789 printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
9790 ;; #(
9791 "-D__MINGW_USE_VC2005_COMPAT") :
9792
9793 printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h
9794 ;; #(
9795 "-U_USE_32_BIT_TIME_T"*) :
9796 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
9797 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
9798 as_fn_error $? "the 'time_t' type is currently forced to be 32-bit. It
9799 will stop working after mid-January 2038. Remove
9800 _USE_32BIT_TIME_T from the compiler flags.
9801 See 'config.log' for more details" "$LINENO" 5; } ;; #(
9802 *) :
9803 as_fn_error $? "internal error: bad value for \$ac_cv_sys_year2038_opts" "$LINENO" 5 ;;
9804 esac
9805
9806 fi
9807
9808 fi
9809
9810 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing cos" >&5
9811 printf %s "checking for library containing cos... " >&6; }
9812 if test ${ac_cv_search_cos+y}
9813 then :
9814 printf %s "(cached) " >&6
9815 else case e in #(
9816 e) ac_func_search_save_LIBS=$LIBS
9817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9818 /* end confdefs.h. */
9819
9820 /* Override any GCC internal prototype to avoid an error.
9821 Use char because int might match the return type of a GCC
9822 builtin and then its argument prototype would still apply.
9823 The 'extern "C"' is for builds by C++ compilers;
9824 although this is not generally supported in C code supporting it here
9825 has little cost and some practical benefit (sr 110532). */
9826 #ifdef __cplusplus
9827 extern "C"
9828 #endif
9829 char cos (void);
9830 int
9831 main (void)
9832 {
9833 return cos ();
9834 ;
9835 return 0;
9836 }
9837 _ACEOF
9838 for ac_lib in '' m
9839 do
9840 if test -z "$ac_lib"; then
9841 ac_res="none required"
9842 else
9843 ac_res=-l$ac_lib
9844 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9845 fi
9846 if ac_fn_c_try_link "$LINENO"
9847 then :
9848 ac_cv_search_cos=$ac_res
9849 fi
9850 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9851 conftest$ac_exeext
9852 if test ${ac_cv_search_cos+y}
9853 then :
9854 break
9855 fi
9856 done
9857 if test ${ac_cv_search_cos+y}
9858 then :
9859
9860 else case e in #(
9861 e) ac_cv_search_cos=no ;;
9862 esac
9863 fi
9864 rm conftest.$ac_ext
9865 LIBS=$ac_func_search_save_LIBS ;;
9866 esac
9867 fi
9868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cos" >&5
9869 printf "%s\n" "$ac_cv_search_cos" >&6; }
9870 ac_res=$ac_cv_search_cos
9871 if test "$ac_res" != no
9872 then :
9873 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9874
9875 else case e in #(
9876 e)
9877 as_fn_error $? "unable to find the cos() function" "$LINENO" 5
9878 ;;
9879 esac
9880 fi
9881
9882
9883 ac_fn_c_check_func "$LINENO" "exp10" "ac_cv_func_exp10"
9884 if test "x$ac_cv_func_exp10" = xyes
9885 then :
9886 printf "%s\n" "#define HAVE_EXP10 1" >>confdefs.h
9887
9888 fi
9889
9890
9891 #AS_IF([test "x$enable_hpcgap" = xyes -o "x$with_julia" != xno ],[
9892 ac_ext=c
9893 ac_cpp='$CPP $CPPFLAGS'
9894 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9895 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9896 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
9898 printf %s "checking how to run the C preprocessor... " >&6; }
9899 # On Suns, sometimes $CPP names a directory.
9900 if test -n "$CPP" && test -d "$CPP"; then
9901 CPP=
9902 fi
9903 if test -z "$CPP"; then
9904 if test ${ac_cv_prog_CPP+y}
9905 then :
9906 printf %s "(cached) " >&6
9907 else case e in #(
9908 e) # Double quotes because $CC needs to be expanded
9909 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
9910 do
9911 ac_preproc_ok=false
9912 for ac_c_preproc_warn_flag in '' yes
9913 do
9914 # Use a header file that comes with gcc, so configuring glibc
9915 # with a fresh cross-compiler works.
9916 # On the NeXT, cc -E runs the code through the compiler's parser,
9917 # not just through cpp. "Syntax error" is here to catch this case.
9918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9919 /* end confdefs.h. */
9920 #include <limits.h>
9921 Syntax error
9922 _ACEOF
9923 if ac_fn_c_try_cpp "$LINENO"
9924 then :
9925
9926 else case e in #(
9927 e) # Broken: fails on valid input.
9928 continue ;;
9929 esac
9930 fi
9931 rm -f conftest.err conftest.i conftest.$ac_ext
9932
9933 # OK, works on sane cases. Now check whether nonexistent headers
9934 # can be detected and how.
9935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9936 /* end confdefs.h. */
9937 #include <ac_nonexistent.h>
9938 _ACEOF
9939 if ac_fn_c_try_cpp "$LINENO"
9940 then :
9941 # Broken: success on invalid input.
9942 continue
9943 else case e in #(
9944 e) # Passes both tests.
9945 ac_preproc_ok=:
9946 break ;;
9947 esac
9948 fi
9949 rm -f conftest.err conftest.i conftest.$ac_ext
9950
9951 done
9952 # Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
9953 rm -f conftest.i conftest.err conftest.$ac_ext
9954 if $ac_preproc_ok
9955 then :
9956 break
9957 fi
9958
9959 done
9960 ac_cv_prog_CPP=$CPP
9961 ;;
9962 esac
9963 fi
9964 CPP=$ac_cv_prog_CPP
9965 else
9966 ac_cv_prog_CPP=$CPP
9967 fi
9968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
9969 printf "%s\n" "$CPP" >&6; }
9970 ac_preproc_ok=false
9971 for ac_c_preproc_warn_flag in '' yes
9972 do
9973 # Use a header file that comes with gcc, so configuring glibc
9974 # with a fresh cross-compiler works.
9975 # On the NeXT, cc -E runs the code through the compiler's parser,
9976 # not just through cpp. "Syntax error" is here to catch this case.
9977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9978 /* end confdefs.h. */
9979 #include <limits.h>
9980 Syntax error
9981 _ACEOF
9982 if ac_fn_c_try_cpp "$LINENO"
9983 then :
9984
9985 else case e in #(
9986 e) # Broken: fails on valid input.
9987 continue ;;
9988 esac
9989 fi
9990 rm -f conftest.err conftest.i conftest.$ac_ext
9991
9992 # OK, works on sane cases. Now check whether nonexistent headers
9993 # can be detected and how.
9994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9995 /* end confdefs.h. */
9996 #include <ac_nonexistent.h>
9997 _ACEOF
9998 if ac_fn_c_try_cpp "$LINENO"
9999 then :
10000 # Broken: success on invalid input.
10001 continue
10002 else case e in #(
10003 e) # Passes both tests.
10004 ac_preproc_ok=:
10005 break ;;
10006 esac
10007 fi
10008 rm -f conftest.err conftest.i conftest.$ac_ext
10009
10010 done
10011 # Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped.
10012 rm -f conftest.i conftest.err conftest.$ac_ext
10013 if $ac_preproc_ok
10014 then :
10015
10016 else case e in #(
10017 e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5
10018 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;}
10019 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
10020 See 'config.log' for more details" "$LINENO" 5; } ;;
10021 esac
10022 fi
10023
10024 ac_ext=c
10025 ac_cpp='$CPP $CPPFLAGS'
10026 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10027 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10028 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10029
10030
10031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5
10032 printf %s "checking for egrep -e... " >&6; }
10033 if test ${ac_cv_path_EGREP_TRADITIONAL+y}
10034 then :
10035 printf %s "(cached) " >&6
10036 else case e in #(
10037 e) if test -z "$EGREP_TRADITIONAL"; then
10038 ac_path_EGREP_TRADITIONAL_found=false
10039 # Loop through the user's path and test for each of PROGNAME-LIST
10040 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10041 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10042 do
10043 IFS=$as_save_IFS
10044 case $as_dir in #(((
10045 '') as_dir=./ ;;
10046 */) ;;
10047 *) as_dir=$as_dir/ ;;
10048 esac
10049 for ac_prog in grep ggrep
10050 do
10051 for ac_exec_ext in '' $ac_executable_extensions; do
10052 ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
10053 as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
10054 # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
10055 # Check for GNU $ac_path_EGREP_TRADITIONAL
10056 case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
10057 *GNU*)
10058 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
10059 #(
10060 *)
10061 ac_count=0
10062 printf %s 0123456789 >"conftest.in"
10063 while :
10064 do
10065 cat "conftest.in" "conftest.in" >"conftest.tmp"
10066 mv "conftest.tmp" "conftest.in"
10067 cp "conftest.in" "conftest.nl"
10068 printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
10069 "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10070 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10071 as_fn_arith $ac_count + 1 && ac_count=$as_val
10072 if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
10073 # Best one so far, save it but keep looking for a better one
10074 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
10075 ac_path_EGREP_TRADITIONAL_max=$ac_count
10076 fi
10077 # 10*(2^10) chars as input seems more than enough
10078 test $ac_count -gt 10 && break
10079 done
10080 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10081 esac
10082
10083 $ac_path_EGREP_TRADITIONAL_found && break 3
10084 done
10085 done
10086 done
10087 IFS=$as_save_IFS
10088 if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
10089 :
10090 fi
10091 else
10092 ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
10093 fi
10094
10095 if test "$ac_cv_path_EGREP_TRADITIONAL"
10096 then :
10097 ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E"
10098 else case e in #(
10099 e) if test -z "$EGREP_TRADITIONAL"; then
10100 ac_path_EGREP_TRADITIONAL_found=false
10101 # Loop through the user's path and test for each of PROGNAME-LIST
10102 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10103 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10104 do
10105 IFS=$as_save_IFS
10106 case $as_dir in #(((
10107 '') as_dir=./ ;;
10108 */) ;;
10109 *) as_dir=$as_dir/ ;;
10110 esac
10111 for ac_prog in egrep
10112 do
10113 for ac_exec_ext in '' $ac_executable_extensions; do
10114 ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext"
10115 as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue
10116 # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found.
10117 # Check for GNU $ac_path_EGREP_TRADITIONAL
10118 case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #(
10119 *GNU*)
10120 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;;
10121 #(
10122 *)
10123 ac_count=0
10124 printf %s 0123456789 >"conftest.in"
10125 while :
10126 do
10127 cat "conftest.in" "conftest.in" >"conftest.tmp"
10128 mv "conftest.tmp" "conftest.in"
10129 cp "conftest.in" "conftest.nl"
10130 printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl"
10131 "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10132 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10133 as_fn_arith $ac_count + 1 && ac_count=$as_val
10134 if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then
10135 # Best one so far, save it but keep looking for a better one
10136 ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL"
10137 ac_path_EGREP_TRADITIONAL_max=$ac_count
10138 fi
10139 # 10*(2^10) chars as input seems more than enough
10140 test $ac_count -gt 10 && break
10141 done
10142 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10143 esac
10144
10145 $ac_path_EGREP_TRADITIONAL_found && break 3
10146 done
10147 done
10148 done
10149 IFS=$as_save_IFS
10150 if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then
10151 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10152 fi
10153 else
10154 ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL
10155 fi
10156 ;;
10157 esac
10158 fi ;;
10159 esac
10160 fi
10161 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5
10162 printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; }
10163 EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL
10164
10165
10166
10167
10168
10169 ac_ext=c
10170 ac_cpp='$CPP $CPPFLAGS'
10171 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10172 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10173 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10174
10175 ax_pthread_ok=no
10176
10177 # We used to check for pthread.h first, but this fails if pthread.h
10178 # requires special compiler flags (e.g. on Tru64 or Sequent).
10179 # It gets checked for in the link test anyway.
10180
10181 # First of all, check if the user has set any of the PTHREAD_LIBS,
10182 # etcetera environment variables, and if threads linking works using
10183 # them:
10184 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
10185 ax_pthread_save_CC="$CC"
10186 ax_pthread_save_CFLAGS="$CFLAGS"
10187 ax_pthread_save_LIBS="$LIBS"
10188 if test "x$PTHREAD_CC" != "x"
10189 then :
10190 CC="$PTHREAD_CC"
10191 fi
10192 if test "x$PTHREAD_CXX" != "x"
10193 then :
10194 CXX="$PTHREAD_CXX"
10195 fi
10196 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10197 LIBS="$PTHREAD_LIBS $LIBS"
10198 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
10199 printf %s "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
10200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10201 /* end confdefs.h. */
10202
10203 /* Override any GCC internal prototype to avoid an error.
10204 Use char because int might match the return type of a GCC
10205 builtin and then its argument prototype would still apply.
10206 The 'extern "C"' is for builds by C++ compilers;
10207 although this is not generally supported in C code supporting it here
10208 has little cost and some practical benefit (sr 110532). */
10209 #ifdef __cplusplus
10210 extern "C"
10211 #endif
10212 char pthread_join (void);
10213 int
10214 main (void)
10215 {
10216 return pthread_join ();
10217 ;
10218 return 0;
10219 }
10220 _ACEOF
10221 if ac_fn_c_try_link "$LINENO"
10222 then :
10223 ax_pthread_ok=yes
10224 fi
10225 rm -f core conftest.err conftest.$ac_objext conftest.beam \
10226 conftest$ac_exeext conftest.$ac_ext
10227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10228 printf "%s\n" "$ax_pthread_ok" >&6; }
10229 if test "x$ax_pthread_ok" = "xno"; then
10230 PTHREAD_LIBS=""
10231 PTHREAD_CFLAGS=""
10232 fi
10233 CC="$ax_pthread_save_CC"
10234 CFLAGS="$ax_pthread_save_CFLAGS"
10235 LIBS="$ax_pthread_save_LIBS"
10236 fi
10237
10238 # We must check for the threads library under a number of different
10239 # names; the ordering is very important because some systems
10240 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
10241 # libraries is broken (non-POSIX).
10242
10243 # Create a list of thread flags to try. Items with a "," contain both
10244 # C compiler flags (before ",") and linker flags (after ","). Other items
10245 # starting with a "-" are C compiler flags, and remaining items are
10246 # library names, except for "none" which indicates that we try without
10247 # any flags at all, and "pthread-config" which is a program returning
10248 # the flags for the Pth emulation library.
10249
10250 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
10251
10252 # The ordering *is* (sometimes) important. Some notes on the
10253 # individual items follow:
10254
10255 # pthreads: AIX (must check this before -lpthread)
10256 # none: in case threads are in libc; should be tried before -Kthread and
10257 # other compiler flags to prevent continual compiler warnings
10258 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
10259 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
10260 # (Note: HP C rejects this with "bad form for `-t' option")
10261 # -pthreads: Solaris/gcc (Note: HP C also rejects)
10262 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
10263 # doesn't hurt to check since this sometimes defines pthreads and
10264 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
10265 # is present but should not be used directly; and before -mthreads,
10266 # because the compiler interprets this as "-mt" + "-hreads")
10267 # -mthreads: Mingw32/gcc, Lynx/gcc
10268 # pthread: Linux, etcetera
10269 # --thread-safe: KAI C++
10270 # pthread-config: use pthread-config program (for GNU Pth library)
10271
10272 case $host_os in
10273
10274 freebsd*)
10275
10276 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
10277 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
10278
10279 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
10280 ;;
10281
10282 hpux*)
10283
10284 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
10285 # multi-threading and also sets -lpthread."
10286
10287 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
10288 ;;
10289
10290 openedition*)
10291
10292 # IBM z/OS requires a feature-test macro to be defined in order to
10293 # enable POSIX threads at all, so give the user a hint if this is
10294 # not set. (We don't define these ourselves, as they can affect
10295 # other portions of the system API in unpredictable ways.)
10296
10297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10298 /* end confdefs.h. */
10299
10300 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
10301 AX_PTHREAD_ZOS_MISSING
10302 # endif
10303
10304 _ACEOF
10305 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10306 $EGREP_TRADITIONAL "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1
10307 then :
10308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
10309 printf "%s\n" "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
10310 fi
10311 rm -rf conftest*
10312
10313 ;;
10314
10315 solaris*)
10316
10317 # On Solaris (at least, for some versions), libc contains stubbed
10318 # (non-functional) versions of the pthreads routines, so link-based
10319 # tests will erroneously succeed. (N.B.: The stubs are missing
10320 # pthread_cleanup_push, or rather a function called by this macro,
10321 # so we could check for that, but who knows whether they'll stub
10322 # that too in a future libc.) So we'll check first for the
10323 # standard Solaris way of linking pthreads (-mt -lpthread).
10324
10325 ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
10326 ;;
10327 esac
10328
10329 # Are we compiling with Clang?
10330
10331 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
10332 printf %s "checking whether $CC is Clang... " >&6; }
10333 if test ${ax_cv_PTHREAD_CLANG+y}
10334 then :
10335 printf %s "(cached) " >&6
10336 else case e in #(
10337 e) ax_cv_PTHREAD_CLANG=no
10338 # Note that Autoconf sets GCC=yes for Clang as well as GCC
10339 if test "x$GCC" = "xyes"; then
10340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10341 /* end confdefs.h. */
10342 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
10343 # if defined(__clang__) && defined(__llvm__)
10344 AX_PTHREAD_CC_IS_CLANG
10345 # endif
10346
10347 _ACEOF
10348 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10349 $EGREP_TRADITIONAL "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1
10350 then :
10351 ax_cv_PTHREAD_CLANG=yes
10352 fi
10353 rm -rf conftest*
10354
10355 fi
10356 ;;
10357 esac
10358 fi
10359 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
10360 printf "%s\n" "$ax_cv_PTHREAD_CLANG" >&6; }
10361 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
10362
10363
10364 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
10365
10366 # Note that for GCC and Clang -pthread generally implies -lpthread,
10367 # except when -nostdlib is passed.
10368 # This is problematic using libtool to build C++ shared libraries with pthread:
10369 # [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
10370 # [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
10371 # [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
10372 # To solve this, first try -pthread together with -lpthread for GCC
10373
10374 if test "x$GCC" = "xyes"
10375 then :
10376 ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"
10377 fi
10378
10379 # Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
10380
10381 if test "x$ax_pthread_clang" = "xyes"
10382 then :
10383 ax_pthread_flags="-pthread,-lpthread -pthread"
10384 fi
10385
10386
10387 # The presence of a feature test macro requesting re-entrant function
10388 # definitions is, on some systems, a strong hint that pthreads support is
10389 # correctly enabled
10390
10391 case $host_os in
10392 darwin* | hpux* | linux* | osf* | solaris*)
10393 ax_pthread_check_macro="_REENTRANT"
10394 ;;
10395
10396 aix*)
10397 ax_pthread_check_macro="_THREAD_SAFE"
10398 ;;
10399
10400 *)
10401 ax_pthread_check_macro="--"
10402 ;;
10403 esac
10404 if test "x$ax_pthread_check_macro" = "x--"
10405 then :
10406 ax_pthread_check_cond=0
10407 else case e in #(
10408 e) ax_pthread_check_cond="!defined($ax_pthread_check_macro)" ;;
10409 esac
10410 fi
10411
10412
10413 if test "x$ax_pthread_ok" = "xno"; then
10414 for ax_pthread_try_flag in $ax_pthread_flags; do
10415
10416 case $ax_pthread_try_flag in
10417 none)
10418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
10419 printf %s "checking whether pthreads work without any flags... " >&6; }
10420 ;;
10421
10422 *,*)
10423 PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
10424 PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
10425 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"" >&5
10426 printf %s "checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"... " >&6; }
10427 ;;
10428
10429 -*)
10430 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
10431 printf %s "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
10432 PTHREAD_CFLAGS="$ax_pthread_try_flag"
10433 ;;
10434
10435 pthread-config)
10436 # Extract the first word of "pthread-config", so it can be a program name with args.
10437 set dummy pthread-config; ac_word=$2
10438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10439 printf %s "checking for $ac_word... " >&6; }
10440 if test ${ac_cv_prog_ax_pthread_config+y}
10441 then :
10442 printf %s "(cached) " >&6
10443 else case e in #(
10444 e) if test -n "$ax_pthread_config"; then
10445 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
10446 else
10447 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10448 for as_dir in $PATH
10449 do
10450 IFS=$as_save_IFS
10451 case $as_dir in #(((
10452 '') as_dir=./ ;;
10453 */) ;;
10454 *) as_dir=$as_dir/ ;;
10455 esac
10456 for ac_exec_ext in '' $ac_executable_extensions; do
10457 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10458 ac_cv_prog_ax_pthread_config="yes"
10459 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10460 break 2
10461 fi
10462 done
10463 done
10464 IFS=$as_save_IFS
10465
10466 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
10467 fi ;;
10468 esac
10469 fi
10470 ax_pthread_config=$ac_cv_prog_ax_pthread_config
10471 if test -n "$ax_pthread_config"; then
10472 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
10473 printf "%s\n" "$ax_pthread_config" >&6; }
10474 else
10475 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10476 printf "%s\n" "no" >&6; }
10477 fi
10478
10479
10480 if test "x$ax_pthread_config" = "xno"
10481 then :
10482 continue
10483 fi
10484 PTHREAD_CFLAGS="`pthread-config --cflags`"
10485 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
10486 ;;
10487
10488 *)
10489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
10490 printf %s "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
10491 PTHREAD_LIBS="-l$ax_pthread_try_flag"
10492 ;;
10493 esac
10494
10495 ax_pthread_save_CFLAGS="$CFLAGS"
10496 ax_pthread_save_LIBS="$LIBS"
10497 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10498 LIBS="$PTHREAD_LIBS $LIBS"
10499
10500 # Check for various functions. We must include pthread.h,
10501 # since some functions may be macros. (On the Sequent, we
10502 # need a special flag -Kthread to make this header compile.)
10503 # We check for pthread_join because it is in -lpthread on IRIX
10504 # while pthread_create is in libc. We check for pthread_attr_init
10505 # due to DEC craziness with -lpthreads. We check for
10506 # pthread_cleanup_push because it is one of the few pthread
10507 # functions on Solaris that doesn't have a non-functional libc stub.
10508 # We try pthread_create on general principles.
10509
10510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10511 /* end confdefs.h. */
10512 #include <pthread.h>
10513 # if $ax_pthread_check_cond
10514 # error "$ax_pthread_check_macro must be defined"
10515 # endif
10516 static void *some_global = NULL;
10517 static void routine(void *a)
10518 {
10519 /* To avoid any unused-parameter or
10520 unused-but-set-parameter warning. */
10521 some_global = a;
10522 }
10523 static void *start_routine(void *a) { return a; }
10524 int
10525 main (void)
10526 {
10527 pthread_t th; pthread_attr_t attr;
10528 pthread_create(&th, 0, start_routine, 0);
10529 pthread_join(th, 0);
10530 pthread_attr_init(&attr);
10531 pthread_cleanup_push(routine, 0);
10532 pthread_cleanup_pop(0) /* ; */
10533 ;
10534 return 0;
10535 }
10536 _ACEOF
10537 if ac_fn_c_try_link "$LINENO"
10538 then :
10539 ax_pthread_ok=yes
10540 fi
10541 rm -f core conftest.err conftest.$ac_objext conftest.beam \
10542 conftest$ac_exeext conftest.$ac_ext
10543
10544 CFLAGS="$ax_pthread_save_CFLAGS"
10545 LIBS="$ax_pthread_save_LIBS"
10546
10547 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
10548 printf "%s\n" "$ax_pthread_ok" >&6; }
10549 if test "x$ax_pthread_ok" = "xyes"
10550 then :
10551 break
10552 fi
10553
10554 PTHREAD_LIBS=""
10555 PTHREAD_CFLAGS=""
10556 done
10557 fi
10558
10559
10560 # Clang needs special handling, because older versions handle the -pthread
10561 # option in a rather... idiosyncratic way
10562
10563 if test "x$ax_pthread_clang" = "xyes"; then
10564
10565 # Clang takes -pthread; it has never supported any other flag
10566
10567 # (Note 1: This will need to be revisited if a system that Clang
10568 # supports has POSIX threads in a separate library. This tends not
10569 # to be the way of modern systems, but it's conceivable.)
10570
10571 # (Note 2: On some systems, notably Darwin, -pthread is not needed
10572 # to get POSIX threads support; the API is always present and
10573 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
10574 # -pthread does define _REENTRANT, and while the Darwin headers
10575 # ignore this macro, third-party headers might not.)
10576
10577 # However, older versions of Clang make a point of warning the user
10578 # that, in an invocation where only linking and no compilation is
10579 # taking place, the -pthread option has no effect ("argument unused
10580 # during compilation"). They expect -pthread to be passed in only
10581 # when source code is being compiled.
10582 #
10583 # Problem is, this is at odds with the way Automake and most other
10584 # C build frameworks function, which is that the same flags used in
10585 # compilation (CFLAGS) are also used in linking. Many systems
10586 # supported by AX_PTHREAD require exactly this for POSIX threads
10587 # support, and in fact it is often not straightforward to specify a
10588 # flag that is used only in the compilation phase and not in
10589 # linking. Such a scenario is extremely rare in practice.
10590 #
10591 # Even though use of the -pthread flag in linking would only print
10592 # a warning, this can be a nuisance for well-run software projects
10593 # that build with -Werror. So if the active version of Clang has
10594 # this misfeature, we search for an option to squash it.
10595
10596 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
10597 printf %s "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
10598 if test ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+y}
10599 then :
10600 printf %s "(cached) " >&6
10601 else case e in #(
10602 e) ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
10603 # Create an alternate version of $ac_link that compiles and
10604 # links in two steps (.c -> .o, .o -> exe) instead of one
10605 # (.c -> exe), because the warning occurs only in the second
10606 # step
10607 ax_pthread_save_ac_link="$ac_link"
10608 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
10609 ax_pthread_link_step=`printf "%s\n" "$ac_link" | sed "$ax_pthread_sed"`
10610 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
10611 ax_pthread_save_CFLAGS="$CFLAGS"
10612 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
10613 if test "x$ax_pthread_try" = "xunknown"
10614 then :
10615 break
10616 fi
10617 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
10618 ac_link="$ax_pthread_save_ac_link"
10619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10620 /* end confdefs.h. */
10621 int main(void){return 0;}
10622 _ACEOF
10623 if ac_fn_c_try_link "$LINENO"
10624 then :
10625 ac_link="$ax_pthread_2step_ac_link"
10626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10627 /* end confdefs.h. */
10628 int main(void){return 0;}
10629 _ACEOF
10630 if ac_fn_c_try_link "$LINENO"
10631 then :
10632 break
10633 fi
10634 rm -f core conftest.err conftest.$ac_objext conftest.beam \
10635 conftest$ac_exeext conftest.$ac_ext
10636
10637 fi
10638 rm -f core conftest.err conftest.$ac_objext conftest.beam \
10639 conftest$ac_exeext conftest.$ac_ext
10640 done
10641 ac_link="$ax_pthread_save_ac_link"
10642 CFLAGS="$ax_pthread_save_CFLAGS"
10643 if test "x$ax_pthread_try" = "x"
10644 then :
10645 ax_pthread_try=no
10646 fi
10647 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
10648 ;;
10649 esac
10650 fi
10651 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
10652 printf "%s\n" "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
10653
10654 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
10655 no | unknown) ;;
10656 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
10657 esac
10658
10659 fi # $ax_pthread_clang = yes
10660
10661
10662
10663 # Various other checks:
10664 if test "x$ax_pthread_ok" = "xyes"; then
10665 ax_pthread_save_CFLAGS="$CFLAGS"
10666 ax_pthread_save_LIBS="$LIBS"
10667 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
10668 LIBS="$PTHREAD_LIBS $LIBS"
10669
10670 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
10671 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
10672 printf %s "checking for joinable pthread attribute... " >&6; }
10673 if test ${ax_cv_PTHREAD_JOINABLE_ATTR+y}
10674 then :
10675 printf %s "(cached) " >&6
10676 else case e in #(
10677 e) ax_cv_PTHREAD_JOINABLE_ATTR=unknown
10678 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
10679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10680 /* end confdefs.h. */
10681 #include <pthread.h>
10682 int
10683 main (void)
10684 {
10685 int attr = $ax_pthread_attr; return attr /* ; */
10686 ;
10687 return 0;
10688 }
10689 _ACEOF
10690 if ac_fn_c_try_link "$LINENO"
10691 then :
10692 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
10693 fi
10694 rm -f core conftest.err conftest.$ac_objext conftest.beam \
10695 conftest$ac_exeext conftest.$ac_ext
10696 done
10697 ;;
10698 esac
10699 fi
10700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
10701 printf "%s\n" "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
10702 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
10703 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
10704 test "x$ax_pthread_joinable_attr_defined" != "xyes"
10705 then :
10706
10707 printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR" >>confdefs.h
10708
10709 ax_pthread_joinable_attr_defined=yes
10710
10711 fi
10712
10713 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
10714 printf %s "checking whether more special flags are required for pthreads... " >&6; }
10715 if test ${ax_cv_PTHREAD_SPECIAL_FLAGS+y}
10716 then :
10717 printf %s "(cached) " >&6
10718 else case e in #(
10719 e) ax_cv_PTHREAD_SPECIAL_FLAGS=no
10720 case $host_os in
10721 solaris*)
10722 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
10723 ;;
10724 esac
10725 ;;
10726 esac
10727 fi
10728 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
10729 printf "%s\n" "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
10730 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
10731 test "x$ax_pthread_special_flags_added" != "xyes"
10732 then :
10733 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
10734 ax_pthread_special_flags_added=yes
10735 fi
10736
10737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
10738 printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; }
10739 if test ${ax_cv_PTHREAD_PRIO_INHERIT+y}
10740 then :
10741 printf %s "(cached) " >&6
10742 else case e in #(
10743 e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10744 /* end confdefs.h. */
10745 #include <pthread.h>
10746 int
10747 main (void)
10748 {
10749 int i = PTHREAD_PRIO_INHERIT;
10750 return i;
10751 ;
10752 return 0;
10753 }
10754 _ACEOF
10755 if ac_fn_c_try_link "$LINENO"
10756 then :
10757 ax_cv_PTHREAD_PRIO_INHERIT=yes
10758 else case e in #(
10759 e) ax_cv_PTHREAD_PRIO_INHERIT=no ;;
10760 esac
10761 fi
10762 rm -f core conftest.err conftest.$ac_objext conftest.beam \
10763 conftest$ac_exeext conftest.$ac_ext
10764 ;;
10765 esac
10766 fi
10767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
10768 printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
10769 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
10770 test "x$ax_pthread_prio_inherit_defined" != "xyes"
10771 then :
10772
10773 printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
10774
10775 ax_pthread_prio_inherit_defined=yes
10776
10777 fi
10778
10779 CFLAGS="$ax_pthread_save_CFLAGS"
10780 LIBS="$ax_pthread_save_LIBS"
10781
10782 # More AIX lossage: compile with *_r variant
10783 if test "x$GCC" != "xyes"; then
10784 case $host_os in
10785 aix*)
10786 case "x/$CC" in #(
10787 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
10788 #handle absolute path differently from PATH based program lookup
10789 case "x$CC" in #(
10790 x/*) :
10791
10792 if as_fn_executable_p ${CC}_r
10793 then :
10794 PTHREAD_CC="${CC}_r"
10795 fi
10796 if test "x${CXX}" != "x"
10797 then :
10798 if as_fn_executable_p ${CXX}_r
10799 then :
10800 PTHREAD_CXX="${CXX}_r"
10801 fi
10802 fi
10803 ;; #(
10804 *) :
10805
10806 for ac_prog in ${CC}_r
10807 do
10808 # Extract the first word of "$ac_prog", so it can be a program name with args.
10809 set dummy $ac_prog; ac_word=$2
10810 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10811 printf %s "checking for $ac_word... " >&6; }
10812 if test ${ac_cv_prog_PTHREAD_CC+y}
10813 then :
10814 printf %s "(cached) " >&6
10815 else case e in #(
10816 e) if test -n "$PTHREAD_CC"; then
10817 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
10818 else
10819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10820 for as_dir in $PATH
10821 do
10822 IFS=$as_save_IFS
10823 case $as_dir in #(((
10824 '') as_dir=./ ;;
10825 */) ;;
10826 *) as_dir=$as_dir/ ;;
10827 esac
10828 for ac_exec_ext in '' $ac_executable_extensions; do
10829 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10830 ac_cv_prog_PTHREAD_CC="$ac_prog"
10831 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10832 break 2
10833 fi
10834 done
10835 done
10836 IFS=$as_save_IFS
10837
10838 fi ;;
10839 esac
10840 fi
10841 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
10842 if test -n "$PTHREAD_CC"; then
10843 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
10844 printf "%s\n" "$PTHREAD_CC" >&6; }
10845 else
10846 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10847 printf "%s\n" "no" >&6; }
10848 fi
10849
10850
10851 test -n "$PTHREAD_CC" && break
10852 done
10853 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10854
10855 if test "x${CXX}" != "x"
10856 then :
10857 for ac_prog in ${CXX}_r
10858 do
10859 # Extract the first word of "$ac_prog", so it can be a program name with args.
10860 set dummy $ac_prog; ac_word=$2
10861 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10862 printf %s "checking for $ac_word... " >&6; }
10863 if test ${ac_cv_prog_PTHREAD_CXX+y}
10864 then :
10865 printf %s "(cached) " >&6
10866 else case e in #(
10867 e) if test -n "$PTHREAD_CXX"; then
10868 ac_cv_prog_PTHREAD_CXX="$PTHREAD_CXX" # Let the user override the test.
10869 else
10870 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10871 for as_dir in $PATH
10872 do
10873 IFS=$as_save_IFS
10874 case $as_dir in #(((
10875 '') as_dir=./ ;;
10876 */) ;;
10877 *) as_dir=$as_dir/ ;;
10878 esac
10879 for ac_exec_ext in '' $ac_executable_extensions; do
10880 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10881 ac_cv_prog_PTHREAD_CXX="$ac_prog"
10882 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10883 break 2
10884 fi
10885 done
10886 done
10887 IFS=$as_save_IFS
10888
10889 fi ;;
10890 esac
10891 fi
10892 PTHREAD_CXX=$ac_cv_prog_PTHREAD_CXX
10893 if test -n "$PTHREAD_CXX"; then
10894 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CXX" >&5
10895 printf "%s\n" "$PTHREAD_CXX" >&6; }
10896 else
10897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10898 printf "%s\n" "no" >&6; }
10899 fi
10900
10901
10902 test -n "$PTHREAD_CXX" && break
10903 done
10904 test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
10905
10906 fi
10907
10908 ;;
10909 esac
10910 ;; #(
10911 *) :
10912 ;;
10913 esac
10914 ;;
10915 esac
10916 fi
10917 fi
10918
10919 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
10920 test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
10921
10922
10923
10924
10925
10926
10927 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
10928 if test "x$ax_pthread_ok" = "xyes"; then
10929
10930 printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h
10931
10932 :
10933 else
10934 ax_pthread_ok=no
10935
10936 fi
10937 ac_ext=c
10938 ac_cpp='$CPP $CPPFLAGS'
10939 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10940 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10941 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10942
10943
10944 # ])
10945
10946 ac_fn_c_check_header_compile "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default"
10947 if test "x$ac_cv_header_execinfo_h" = xyes
10948 then :
10949 printf "%s\n" "#define HAVE_EXECINFO_H 1" >>confdefs.h
10950
10951 fi
10952
10953 if test x"$ac_cv_header_execinfo_h" = xyes
10954 then :
10955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size parameter type for backtrace()" >&5
10956 printf %s "checking size parameter type for backtrace()... " >&6; }
10957 if test ${ax_cv_proto_backtrace_type+y}
10958 then :
10959 printf %s "(cached) " >&6
10960 else case e in #(
10961 e) ac_ext=c
10962 ac_cpp='$CPP $CPPFLAGS'
10963 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10964 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10965 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10966
10967 for ax_cv_proto_backtrace_type in size_t int none; do
10968 if test "${ax_cv_proto_backtrace_type}" = none
10969 then :
10970 ax_cv_proto_backtrace_type= ; break
10971 fi
10972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10973 /* end confdefs.h. */
10974
10975 #include <execinfo.h>
10976 extern
10977 ${ax_cv_proto_backtrace_type} backtrace(void **addrlist, ${ax_cv_proto_backtrace_type} len);
10978 char **backtrace_symbols(void *const *buffer, ${ax_cv_proto_backtrace_type} size);
10979
10980 int
10981 main (void)
10982 {
10983
10984 ;
10985 return 0;
10986 }
10987 _ACEOF
10988 if ac_fn_c_try_compile "$LINENO"
10989 then :
10990 break
10991 fi
10992 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10993 done
10994 ac_ext=c
10995 ac_cpp='$CPP $CPPFLAGS'
10996 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10997 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10998 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10999 ;;
11000 esac
11001 fi
11002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_proto_backtrace_type" >&5
11003 printf "%s\n" "$ax_cv_proto_backtrace_type" >&6; }
11004 fi
11005 if test x${ax_cv_proto_backtrace_type} != x
11006 then :
11007
11008 printf "%s\n" "#define backtrace_size_t $ax_cv_proto_backtrace_type" >>confdefs.h
11009
11010 fi
11011 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace" >&5
11012 printf %s "checking for library containing backtrace... " >&6; }
11013 if test ${ac_cv_search_backtrace+y}
11014 then :
11015 printf %s "(cached) " >&6
11016 else case e in #(
11017 e) ac_func_search_save_LIBS=$LIBS
11018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11019 /* end confdefs.h. */
11020
11021 /* Override any GCC internal prototype to avoid an error.
11022 Use char because int might match the return type of a GCC
11023 builtin and then its argument prototype would still apply.
11024 The 'extern "C"' is for builds by C++ compilers;
11025 although this is not generally supported in C code supporting it here
11026 has little cost and some practical benefit (sr 110532). */
11027 #ifdef __cplusplus
11028 extern "C"
11029 #endif
11030 char backtrace (void);
11031 int
11032 main (void)
11033 {
11034 return backtrace ();
11035 ;
11036 return 0;
11037 }
11038 _ACEOF
11039 for ac_lib in '' execinfo
11040 do
11041 if test -z "$ac_lib"; then
11042 ac_res="none required"
11043 else
11044 ac_res=-l$ac_lib
11045 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11046 fi
11047 if ac_fn_c_try_link "$LINENO"
11048 then :
11049 ac_cv_search_backtrace=$ac_res
11050 fi
11051 rm -f core conftest.err conftest.$ac_objext conftest.beam \
11052 conftest$ac_exeext
11053 if test ${ac_cv_search_backtrace+y}
11054 then :
11055 break
11056 fi
11057 done
11058 if test ${ac_cv_search_backtrace+y}
11059 then :
11060
11061 else case e in #(
11062 e) ac_cv_search_backtrace=no ;;
11063 esac
11064 fi
11065 rm conftest.$ac_ext
11066 LIBS=$ac_func_search_save_LIBS ;;
11067 esac
11068 fi
11069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace" >&5
11070 printf "%s\n" "$ac_cv_search_backtrace" >&6; }
11071 ac_res=$ac_cv_search_backtrace
11072 if test "$ac_res" != no
11073 then :
11074 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11075
11076 fi
11077
11078 if test x"${ax_cv_proto_backtrace_type}" != x -a x"$ac_cv_header_execinfo_h" = xyes -a x"$ac_cv_search_backtrace" != xno
11079 then :
11080
11081 printf "%s\n" "#define HAVE_BACKTRACE 1" >>confdefs.h
11082
11083
11084 fi
11085
11086 if test "x$enable_hpcgap" = xyes
11087 then :
11088
11089 printf "%s\n" "## ------------------------------------------ ##
11090 ## WARNING: Experimental HPC-GAP mode enabled ##
11091 ## ------------------------------------------ ##"
11092
11093 printf "%s\n" "#define GAP_PRINT_BACKTRACE 1" >>confdefs.h
11094
11095
11096 fi
11097
11098 if test "x$enable_macos_tls_asm" = xno
11099 then :
11100
11101 printf "%s\n" "## ------------------------------------------------------ ##
11102 ## WARNING: macOS fast thread-local storage not available ##
11103 ## ------------------------------------------------------ ##"
11104
11105 fi
11106
11107 GAP_DEFINES=$GAP_DEFINES
11108
11109
11110 ac_config_files="$ac_config_files GNUmakefile"
11111
11112 ac_config_files="$ac_config_files CITATION"
11113
11114 ac_config_files="$ac_config_files libgap.pc"
11115
11116 ac_config_files="$ac_config_files doc/make_doc"
11117
11118 ac_config_files="$ac_config_files doc/versiondata"
11119
11120 cat >confcache <<\_ACEOF
11121 # This file is a shell script that caches the results of configure
11122 # tests run on this system so they can be shared between configure
11123 # scripts and configure runs, see configure's option --config-cache.
11124 # It is not useful on other systems. If it contains results you don't
11125 # want to keep, you may remove or edit it.
11126 #
11127 # config.status only pays attention to the cache file if you give it
11128 # the --recheck option to rerun configure.
11129 #
11130 # 'ac_cv_env_foo' variables (set or unset) will be overridden when
11131 # loading this file, other *unset* 'ac_cv_foo' will be assigned the
11132 # following values.
11133
11134 _ACEOF
11135
11136 # The following way of writing the cache mishandles newlines in values,
11137 # but we know of no workaround that is simple, portable, and efficient.
11138 # So, we kill variables containing newlines.
11139 # Ultrix sh set writes to stderr and can't be redirected directly,
11140 # and sets the high bit in the cache file unless we assign to the vars.
11141 (
11142 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
11143 eval ac_val=\$$ac_var
11144 case $ac_val in #(
11145 *${as_nl}*)
11146 case $ac_var in #(
11147 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
11148 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
11149 esac
11150 case $ac_var in #(
11151 _ | IFS | as_nl) ;; #(
11152 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
11153 *) { eval $ac_var=; unset $ac_var;} ;;
11154 esac ;;
11155 esac
11156 done
11157
11158 (set) 2>&1 |
11159 case $as_nl`(ac_space=' '; set) 2>&1` in #(
11160 *${as_nl}ac_space=\ *)
11161 # 'set' does not quote correctly, so add quotes: double-quote
11162 # substitution turns \\\\ into \\, and sed turns \\ into \.
11163 sed -n \
11164 "s/'/'\\\\''/g;
11165 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
11166 ;; #(
11167 *)
11168 # 'set' quotes correctly as required by POSIX, so do not add quotes.
11169 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
11170 ;;
11171 esac |
11172 sort
11173 ) |
11174 sed '
11175 /^ac_cv_env_/b end
11176 t clear
11177 :clear
11178 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
11179 t end
11180 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
11181 :end' >>confcache
11182 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
11183 if test -w "$cache_file"; then
11184 if test "x$cache_file" != "x/dev/null"; then
11185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
11186 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
11187 if test ! -f "$cache_file" || test -h "$cache_file"; then
11188 cat confcache >"$cache_file"
11189 else
11190 case $cache_file in #(
11191 */* | ?:*)
11192 mv -f confcache "$cache_file"$$ &&
11193 mv -f "$cache_file"$$ "$cache_file" ;; #(
11194 *)
11195 mv -f confcache "$cache_file" ;;
11196 esac
11197 fi
11198 fi
11199 else
11200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
11201 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
11202 fi
11203 fi
11204 rm -f confcache
11205
11206 test "x$prefix" = xNONE && prefix=$ac_default_prefix
11207 # Let make expand exec_prefix.
11208 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
11209
11210 DEFS=-DHAVE_CONFIG_H
11211
11212 ac_libobjs=
11213 ac_ltlibobjs=
11214 U=
11215 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
11216 # 1. Remove the extension, and $U if already installed.
11217 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
11218 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
11219 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
11220 # will be set to the directory where LIBOBJS objects are built.
11221 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
11222 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
11223 done
11224 LIBOBJS=$ac_libobjs
11225
11226 LTLIBOBJS=$ac_ltlibobjs
11227
11228
11229
11230 # Check whether --enable-year2038 was given.
11231 if test ${enable_year2038+y}
11232 then :
11233 enableval=$enable_year2038;
11234 fi
11235
11236
11237 : "${CONFIG_STATUS=./config.status}"
11238 ac_write_fail=0
11239 ac_clean_files_save=$ac_clean_files
11240 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
11241 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
11242 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
11243 as_write_fail=0
11244 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
11245 #! $SHELL
11246 # Generated by $as_me.
11247 # Run this file to recreate the current configuration.
11248 # Compiler output produced by configure, useful for debugging
11249 # configure, is in config.log if it exists.
11250
11251 debug=false
11252 ac_cs_recheck=false
11253 ac_cs_silent=false
11254
11255 SHELL=\${CONFIG_SHELL-$SHELL}
11256 export SHELL
11257 _ASEOF
11258 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
11259 ## -------------------- ##
11260 ## M4sh Initialization. ##
11261 ## -------------------- ##
11262
11263 # Be more Bourne compatible
11264 DUALCASE=1; export DUALCASE # for MKS sh
11265 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
11266 then :
11267 emulate sh
11268 NULLCMD=:
11269 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
11270 # is contrary to our usage. Disable this feature.
11271 alias -g '${1+"$@"}'='"$@"'
11272 setopt NO_GLOB_SUBST
11273 else case e in #(
11274 e) case `(set -o) 2>/dev/null` in #(
11275 *posix*) :
11276 set -o posix ;; #(
11277 *) :
11278 ;;
11279 esac ;;
11280 esac
11281 fi
11282
11283
11284
11285 # Reset variables that may have inherited troublesome values from
11286 # the environment.
11287
11288 # IFS needs to be set, to space, tab, and newline, in precisely that order.
11289 # (If _AS_PATH_WALK were called with IFS unset, it would have the
11290 # side effect of setting IFS to empty, thus disabling word splitting.)
11291 # Quoting is to prevent editors from complaining about space-tab.
11292 as_nl='
11293 '
11294 export as_nl
11295 IFS=" "" $as_nl"
11296
11297 PS1='$ '
11298 PS2='> '
11299 PS4='+ '
11300
11301 # Ensure predictable behavior from utilities with locale-dependent output.
11302 LC_ALL=C
11303 export LC_ALL
11304 LANGUAGE=C
11305 export LANGUAGE
11306
11307 # We cannot yet rely on "unset" to work, but we need these variables
11308 # to be unset--not just set to an empty or harmless value--now, to
11309 # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
11310 # also avoids known problems related to "unset" and subshell syntax
11311 # in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
11312 for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
11313 do eval test \${$as_var+y} \
11314 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
11315 done
11316
11317 # Ensure that fds 0, 1, and 2 are open.
11318 if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
11319 if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
11320 if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
11321
11322 # The user is always right.
11323 if ${PATH_SEPARATOR+false} :; then
11324 PATH_SEPARATOR=:
11325 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
11326 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
11327 PATH_SEPARATOR=';'
11328 }
11329 fi
11330
11331
11332 # Find who we are. Look in the path if we contain no directory separator.
11333 as_myself=
11334 case $0 in #((
11335 *[\\/]* ) as_myself=$0 ;;
11336 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11337 for as_dir in $PATH
11338 do
11339 IFS=$as_save_IFS
11340 case $as_dir in #(((
11341 '') as_dir=./ ;;
11342 */) ;;
11343 *) as_dir=$as_dir/ ;;
11344 esac
11345 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
11346 done
11347 IFS=$as_save_IFS
11348
11349 ;;
11350 esac
11351 # We did not find ourselves, most probably we were run as 'sh COMMAND'
11352 # in which case we are not to be found in the path.
11353 if test "x$as_myself" = x; then
11354 as_myself=$0
11355 fi
11356 if test ! -f "$as_myself"; then
11357 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
11358 exit 1
11359 fi
11360
11361
11362
11363 # as_fn_error STATUS ERROR [LINENO LOG_FD]
11364 # ----------------------------------------
11365 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
11366 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
11367 # script with STATUS, using 1 if that was 0.
11368 as_fn_error ()
11369 {
11370 as_status=$1; test $as_status -eq 0 && as_status=1
11371 if test "$4"; then
11372 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
11373 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
11374 fi
11375 printf "%s\n" "$as_me: error: $2" >&2
11376 as_fn_exit $as_status
11377 } # as_fn_error
11378
11379
11380 # as_fn_set_status STATUS
11381 # -----------------------
11382 # Set $? to STATUS, without forking.
11383 as_fn_set_status ()
11384 {
11385 return $1
11386 } # as_fn_set_status
11387
11388 # as_fn_exit STATUS
11389 # -----------------
11390 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
11391 as_fn_exit ()
11392 {
11393 set +e
11394 as_fn_set_status $1
11395 exit $1
11396 } # as_fn_exit
11397
11398 # as_fn_unset VAR
11399 # ---------------
11400 # Portably unset VAR.
11401 as_fn_unset ()
11402 {
11403 { eval $1=; unset $1;}
11404 }
11405 as_unset=as_fn_unset
11406
11407 # as_fn_append VAR VALUE
11408 # ----------------------
11409 # Append the text in VALUE to the end of the definition contained in VAR. Take
11410 # advantage of any shell optimizations that allow amortized linear growth over
11411 # repeated appends, instead of the typical quadratic growth present in naive
11412 # implementations.
11413 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
11414 then :
11415 eval 'as_fn_append ()
11416 {
11417 eval $1+=\$2
11418 }'
11419 else case e in #(
11420 e) as_fn_append ()
11421 {
11422 eval $1=\$$1\$2
11423 } ;;
11424 esac
11425 fi # as_fn_append
11426
11427 # as_fn_arith ARG...
11428 # ------------------
11429 # Perform arithmetic evaluation on the ARGs, and store the result in the
11430 # global $as_val. Take advantage of shells that can avoid forks. The arguments
11431 # must be portable across $(()) and expr.
11432 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
11433 then :
11434 eval 'as_fn_arith ()
11435 {
11436 as_val=$(( $* ))
11437 }'
11438 else case e in #(
11439 e) as_fn_arith ()
11440 {
11441 as_val=`expr "$@" || test $? -eq 1`
11442 } ;;
11443 esac
11444 fi # as_fn_arith
11445
11446
11447 if expr a : '\(a\)' >/dev/null 2>&1 &&
11448 test "X`expr 00001 : '.*\(...\)'`" = X001; then
11449 as_expr=expr
11450 else
11451 as_expr=false
11452 fi
11453
11454 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
11455 as_basename=basename
11456 else
11457 as_basename=false
11458 fi
11459
11460 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
11461 as_dirname=dirname
11462 else
11463 as_dirname=false
11464 fi
11465
11466 as_me=`$as_basename -- "$0" ||
11467 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
11468 X"$0" : 'X\(//\)$' \| \
11469 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
11470 printf "%s\n" X/"$0" |
11471 sed '/^.*\/\([^/][^/]*\)\/*$/{
11472 s//\1/
11473 q
11474 }
11475 /^X\/\(\/\/\)$/{
11476 s//\1/
11477 q
11478 }
11479 /^X\/\(\/\).*/{
11480 s//\1/
11481 q
11482 }
11483 s/.*/./; q'`
11484
11485 # Avoid depending upon Character Ranges.
11486 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
11487 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
11488 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
11489 as_cr_digits='0123456789'
11490 as_cr_alnum=$as_cr_Letters$as_cr_digits
11491
11492
11493 # Determine whether it's possible to make 'echo' print without a newline.
11494 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
11495 # for compatibility with existing Makefiles.
11496 ECHO_C= ECHO_N= ECHO_T=
11497 case `echo -n x` in #(((((
11498 -n*)
11499 case `echo 'xy\c'` in
11500 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
11501 xy) ECHO_C='\c';;
11502 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
11503 ECHO_T=' ';;
11504 esac;;
11505 *)
11506 ECHO_N='-n';;
11507 esac
11508
11509 # For backward compatibility with old third-party macros, we provide
11510 # the shell variables $as_echo and $as_echo_n. New code should use
11511 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
11512 as_echo='printf %s\n'
11513 as_echo_n='printf %s'
11514
11515 rm -f conf$$ conf$$.exe conf$$.file
11516 if test -d conf$$.dir; then
11517 rm -f conf$$.dir/conf$$.file
11518 else
11519 rm -f conf$$.dir
11520 mkdir conf$$.dir 2>/dev/null
11521 fi
11522 if (echo >conf$$.file) 2>/dev/null; then
11523 if ln -s conf$$.file conf$$ 2>/dev/null; then
11524 as_ln_s='ln -s'
11525 # ... but there are two gotchas:
11526 # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail.
11527 # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable.
11528 # In both cases, we have to default to 'cp -pR'.
11529 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
11530 as_ln_s='cp -pR'
11531 elif ln conf$$.file conf$$ 2>/dev/null; then
11532 as_ln_s=ln
11533 else
11534 as_ln_s='cp -pR'
11535 fi
11536 else
11537 as_ln_s='cp -pR'
11538 fi
11539 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
11540 rmdir conf$$.dir 2>/dev/null
11541
11542
11543 # as_fn_mkdir_p
11544 # -------------
11545 # Create "$as_dir" as a directory, including parents if necessary.
11546 as_fn_mkdir_p ()
11547 {
11548
11549 case $as_dir in #(
11550 -*) as_dir=./$as_dir;;
11551 esac
11552 test -d "$as_dir" || eval $as_mkdir_p || {
11553 as_dirs=
11554 while :; do
11555 case $as_dir in #(
11556 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
11557 *) as_qdir=$as_dir;;
11558 esac
11559 as_dirs="'$as_qdir' $as_dirs"
11560 as_dir=`$as_dirname -- "$as_dir" ||
11561 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11562 X"$as_dir" : 'X\(//\)[^/]' \| \
11563 X"$as_dir" : 'X\(//\)$' \| \
11564 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
11565 printf "%s\n" X"$as_dir" |
11566 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11567 s//\1/
11568 q
11569 }
11570 /^X\(\/\/\)[^/].*/{
11571 s//\1/
11572 q
11573 }
11574 /^X\(\/\/\)$/{
11575 s//\1/
11576 q
11577 }
11578 /^X\(\/\).*/{
11579 s//\1/
11580 q
11581 }
11582 s/.*/./; q'`
11583 test -d "$as_dir" && break
11584 done
11585 test -z "$as_dirs" || eval "mkdir $as_dirs"
11586 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
11587
11588
11589 } # as_fn_mkdir_p
11590 if mkdir -p . 2>/dev/null; then
11591 as_mkdir_p='mkdir -p "$as_dir"'
11592 else
11593 test -d ./-p && rmdir ./-p
11594 as_mkdir_p=false
11595 fi
11596
11597
11598 # as_fn_executable_p FILE
11599 # -----------------------
11600 # Test if FILE is an executable regular file.
11601 as_fn_executable_p ()
11602 {
11603 test -f "$1" && test -x "$1"
11604 } # as_fn_executable_p
11605 as_test_x='test -x'
11606 as_executable_p=as_fn_executable_p
11607
11608 # Sed expression to map a string onto a valid CPP name.
11609 as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
11610 as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated
11611
11612 # Sed expression to map a string onto a valid variable name.
11613 as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
11614 as_tr_sh="eval sed '$as_sed_sh'" # deprecated
11615
11616
11617 exec 6>&1
11618 ## ----------------------------------- ##
11619 ## Main body of $CONFIG_STATUS script. ##
11620 ## ----------------------------------- ##
11621 _ASEOF
11622 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
11623
11624 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11625 # Save the log message, to keep $0 and so on meaningful, and to
11626 # report actual input values of CONFIG_FILES etc. instead of their
11627 # values after options handling.
11628 ac_log="
11629 This file was extended by GAP $as_me 4.16.0, which was
11630 generated by GNU Autoconf 2.72. Invocation command line was
11631
11632 CONFIG_FILES = $CONFIG_FILES
11633 CONFIG_HEADERS = $CONFIG_HEADERS
11634 CONFIG_LINKS = $CONFIG_LINKS
11635 CONFIG_COMMANDS = $CONFIG_COMMANDS
11636 $ $0 $@
11637
11638 on `(hostname || uname -n) 2>/dev/null | sed 1q`
11639 "
11640
11641 _ACEOF
11642
11643 case $ac_config_files in *"
11644 "*) set x $ac_config_files; shift; ac_config_files=$*;;
11645 esac
11646
11647 case $ac_config_headers in *"
11648 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
11649 esac
11650
11651
11652 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11653 # Files that config.status was made for.
11654 config_files="$ac_config_files"
11655 config_headers="$ac_config_headers"
11656 config_commands="$ac_config_commands"
11657
11658 _ACEOF
11659
11660 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11661 ac_cs_usage="\
11662 '$as_me' instantiates files and other configuration actions
11663 from templates according to the current configuration. Unless the files
11664 and actions are specified as TAGs, all are instantiated by default.
11665
11666 Usage: $0 [OPTION]... [TAG]...
11667
11668 -h, --help print this help, then exit
11669 -V, --version print version number and configuration settings, then exit
11670 --config print configuration, then exit
11671 -q, --quiet, --silent
11672 do not print progress messages
11673 -d, --debug don't remove temporary files
11674 --recheck update $as_me by reconfiguring in the same conditions
11675 --file=FILE[:TEMPLATE]
11676 instantiate the configuration file FILE
11677 --header=FILE[:TEMPLATE]
11678 instantiate the configuration header FILE
11679
11680 Configuration files:
11681 $config_files
11682
11683 Configuration headers:
11684 $config_headers
11685
11686 Configuration commands:
11687 $config_commands
11688
11689 Report bugs to <[email protected]>.
11690 GAP home page: <https://www.gap-system.org/>."
11691
11692 _ACEOF
11693 ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
11694 ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
11695 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11696 ac_cs_config='$ac_cs_config_escaped'
11697 ac_cs_version="\\
11698 GAP config.status 4.16.0
11699 configured by $0, generated by GNU Autoconf 2.72,
11700 with options \\"\$ac_cs_config\\"
11701
11702 Copyright (C) 2023 Free Software Foundation, Inc.
11703 This config.status script is free software; the Free Software Foundation
11704 gives unlimited permission to copy, distribute and modify it."
11705
11706 ac_pwd='$ac_pwd'
11707 srcdir='$srcdir'
11708 INSTALL='$INSTALL'
11709 MKDIR_P='$MKDIR_P'
11710 test -n "\$AWK" || AWK=awk
11711 _ACEOF
11712
11713 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11714 # The default lists apply if the user does not specify any file.
11715 ac_need_defaults=:
11716 while test $# != 0
11717 do
11718 case $1 in
11719 --*=?*)
11720 ac_option=`expr "X$1" : 'X\([^=]*\)='`
11721 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
11722 ac_shift=:
11723 ;;
11724 --*=)
11725 ac_option=`expr "X$1" : 'X\([^=]*\)='`
11726 ac_optarg=
11727 ac_shift=:
11728 ;;
11729 *)
11730 ac_option=$1
11731 ac_optarg=$2
11732 ac_shift=shift
11733 ;;
11734 esac
11735
11736 case $ac_option in
11737 # Handling of the options.
11738 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11739 ac_cs_recheck=: ;;
11740 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
11741 printf "%s\n" "$ac_cs_version"; exit ;;
11742 --config | --confi | --conf | --con | --co | --c )
11743 printf "%s\n" "$ac_cs_config"; exit ;;
11744 --debug | --debu | --deb | --de | --d | -d )
11745 debug=: ;;
11746 --file | --fil | --fi | --f )
11747 $ac_shift
11748 case $ac_optarg in
11749 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
11750 '') as_fn_error $? "missing file argument" ;;
11751 esac
11752 as_fn_append CONFIG_FILES " '$ac_optarg'"
11753 ac_need_defaults=false;;
11754 --header | --heade | --head | --hea )
11755 $ac_shift
11756 case $ac_optarg in
11757 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
11758 esac
11759 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
11760 ac_need_defaults=false;;
11761 --he | --h)
11762 # Conflict between --help and --header
11763 as_fn_error $? "ambiguous option: '$1'
11764 Try '$0 --help' for more information.";;
11765 --help | --hel | -h )
11766 printf "%s\n" "$ac_cs_usage"; exit ;;
11767 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
11768 | -silent | --silent | --silen | --sile | --sil | --si | --s)
11769 ac_cs_silent=: ;;
11770
11771 # This is an error.
11772 -*) as_fn_error $? "unrecognized option: '$1'
11773 Try '$0 --help' for more information." ;;
11774
11775 *) as_fn_append ac_config_targets " $1"
11776 ac_need_defaults=false ;;
11777
11778 esac
11779 shift
11780 done
11781
11782 ac_configure_extra_args=
11783
11784 if $ac_cs_silent; then
11785 exec 6>/dev/null
11786 ac_configure_extra_args="$ac_configure_extra_args --silent"
11787 fi
11788
11789 _ACEOF
11790 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11791 if \$ac_cs_recheck; then
11792 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
11793 shift
11794 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
11795 CONFIG_SHELL='$SHELL'
11796 export CONFIG_SHELL
11797 exec "\$@"
11798 fi
11799
11800 _ACEOF
11801 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11802 exec 5>>config.log
11803 {
11804 echo
11805 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
11806 ## Running $as_me. ##
11807 _ASBOX
11808 printf "%s\n" "$ac_log"
11809 } >&5
11810
11811 _ACEOF
11812 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11813 _ACEOF
11814
11815 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11816
11817 # Handling of arguments.
11818 for ac_config_target in $ac_config_targets
11819 do
11820 case $ac_config_target in
11821 "build/config.h") CONFIG_HEADERS="$CONFIG_HEADERS build/config.h:src/config.h.in" ;;
11822 "build/stamp-h") CONFIG_COMMANDS="$CONFIG_COMMANDS build/stamp-h" ;;
11823 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
11824 "CITATION") CONFIG_FILES="$CONFIG_FILES CITATION" ;;
11825 "libgap.pc") CONFIG_FILES="$CONFIG_FILES libgap.pc" ;;
11826 "doc/make_doc") CONFIG_FILES="$CONFIG_FILES doc/make_doc" ;;
11827 "doc/versiondata") CONFIG_FILES="$CONFIG_FILES doc/versiondata" ;;
11828
11829 *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;;
11830 esac
11831 done
11832
11833
11834 # If the user did not use the arguments to specify the items to instantiate,
11835 # then the envvar interface is used. Set only those that are not.
11836 # We use the long form for the default assignment because of an extremely
11837 # bizarre bug on SunOS 4.1.3.
11838 if $ac_need_defaults; then
11839 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
11840 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
11841 test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
11842 fi
11843
11844 # Have a temporary directory for convenience. Make it in the build tree
11845 # simply because there is no reason against having it here, and in addition,
11846 # creating and moving files from /tmp can sometimes cause problems.
11847 # Hook for its removal unless debugging.
11848 # Note that there is a small window in which the directory will not be cleaned:
11849 # after its creation but before its name has been assigned to '$tmp'.
11850 $debug ||
11851 {
11852 tmp= ac_tmp=
11853 trap 'exit_status=$?
11854 : "${ac_tmp:=$tmp}"
11855 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
11856 ' 0
11857 trap 'as_fn_exit 1' 1 2 13 15
11858 }
11859 # Create a (secure) tmp directory for tmp files.
11860
11861 {
11862 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
11863 test -d "$tmp"
11864 } ||
11865 {
11866 tmp=./conf$$-$RANDOM
11867 (umask 077 && mkdir "$tmp")
11868 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
11869 ac_tmp=$tmp
11870
11871 # Set up the scripts for CONFIG_FILES section.
11872 # No need to generate them if there are no CONFIG_FILES.
11873 # This happens for instance with './config.status config.h'.
11874 if test -n "$CONFIG_FILES"; then
11875
11876
11877 ac_cr=`echo X | tr X '\015'`
11878 # On cygwin, bash can eat \r inside `` if the user requested igncr.
11879 # But we know of no other shell where ac_cr would be empty at this
11880 # point, so we can use a bashism as a fallback.
11881 if test "x$ac_cr" = x; then
11882 eval ac_cr=\$\'\\r\'
11883 fi
11884 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
11885 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
11886 ac_cs_awk_cr='\\r'
11887 else
11888 ac_cs_awk_cr=$ac_cr
11889 fi
11890
11891 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
11892 _ACEOF
11893
11894
11895 {
11896 echo "cat >conf$$subs.awk <<_ACEOF" &&
11897 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
11898 echo "_ACEOF"
11899 } >conf$$subs.sh ||
11900 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11901 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
11902 ac_delim='%!_!# '
11903 for ac_last_try in false false false false false :; do
11904 . ./conf$$subs.sh ||
11905 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11906
11907 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
11908 if test $ac_delim_n = $ac_delim_num; then
11909 break
11910 elif $ac_last_try; then
11911 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11912 else
11913 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11914 fi
11915 done
11916 rm -f conf$$subs.sh
11917
11918 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11919 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
11920 _ACEOF
11921 sed -n '
11922 h
11923 s/^/S["/; s/!.*/"]=/
11924 p
11925 g
11926 s/^[^!]*!//
11927 :repl
11928 t repl
11929 s/'"$ac_delim"'$//
11930 t delim
11931 :nl
11932 h
11933 s/\(.\{148\}\)..*/\1/
11934 t more1
11935 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
11936 p
11937 n
11938 b repl
11939 :more1
11940 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
11941 p
11942 g
11943 s/.\{148\}//
11944 t nl
11945 :delim
11946 h
11947 s/\(.\{148\}\)..*/\1/
11948 t more2
11949 s/["\\]/\\&/g; s/^/"/; s/$/"/
11950 p
11951 b
11952 :more2
11953 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
11954 p
11955 g
11956 s/.\{148\}//
11957 t delim
11958 ' <conf$$subs.awk | sed '
11959 /^[^""]/{
11960 N
11961 s/\n//
11962 }
11963 ' >>$CONFIG_STATUS || ac_write_fail=1
11964 rm -f conf$$subs.awk
11965 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11966 _ACAWK
11967 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
11968 for (key in S) S_is_set[key] = 1
11969 FS = ""
11970
11971 }
11972 {
11973 line = $ 0
11974 nfields = split(line, field, "@")
11975 substed = 0
11976 len = length(field[1])
11977 for (i = 2; i < nfields; i++) {
11978 key = field[i]
11979 keylen = length(key)
11980 if (S_is_set[key]) {
11981 value = S[key]
11982 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
11983 len += length(value) + length(field[++i])
11984 substed = 1
11985 } else
11986 len += 1 + keylen
11987 }
11988
11989 print line
11990 }
11991
11992 _ACAWK
11993 _ACEOF
11994 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11995 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
11996 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
11997 else
11998 cat
11999 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
12000 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
12001 _ACEOF
12002
12003 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
12004 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
12005 # trailing colons and then remove the whole line if VPATH becomes empty
12006 # (actually we leave an empty line to preserve line numbers).
12007 if test "x$srcdir" = x.; then
12008 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
12009 h
12010 s///
12011 s/^/:/
12012 s/[ ]*$/:/
12013 s/:\$(srcdir):/:/g
12014 s/:\${srcdir}:/:/g
12015 s/:@srcdir@:/:/g
12016 s/^:*//
12017 s/:*$//
12018 x
12019 s/\(=[ ]*\).*/\1/
12020 G
12021 s/\n//
12022 s/^[^=]*=[ ]*$//
12023 }'
12024 fi
12025
12026 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12027 fi # test -n "$CONFIG_FILES"
12028
12029 # Set up the scripts for CONFIG_HEADERS section.
12030 # No need to generate them if there are no CONFIG_HEADERS.
12031 # This happens for instance with './config.status Makefile'.
12032 if test -n "$CONFIG_HEADERS"; then
12033 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
12034 BEGIN {
12035 _ACEOF
12036
12037 # Transform confdefs.h into an awk script 'defines.awk', embedded as
12038 # here-document in config.status, that substitutes the proper values into
12039 # config.h.in to produce config.h.
12040
12041 # Create a delimiter string that does not exist in confdefs.h, to ease
12042 # handling of long lines.
12043 ac_delim='%!_!# '
12044 for ac_last_try in false false :; do
12045 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
12046 if test -z "$ac_tt"; then
12047 break
12048 elif $ac_last_try; then
12049 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
12050 else
12051 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
12052 fi
12053 done
12054
12055 # For the awk script, D is an array of macro values keyed by name,
12056 # likewise P contains macro parameters if any. Preserve backslash
12057 # newline sequences.
12058
12059 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
12060 sed -n '
12061 s/.\{148\}/&'"$ac_delim"'/g
12062 t rset
12063 :rset
12064 s/^[ ]*#[ ]*define[ ][ ]*/ /
12065 t def
12066 d
12067 :def
12068 s/\\$//
12069 t bsnl
12070 s/["\\]/\\&/g
12071 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
12072 D["\1"]=" \3"/p
12073 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
12074 d
12075 :bsnl
12076 s/["\\]/\\&/g
12077 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
12078 D["\1"]=" \3\\\\\\n"\\/p
12079 t cont
12080 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
12081 t cont
12082 d
12083 :cont
12084 n
12085 s/.\{148\}/&'"$ac_delim"'/g
12086 t clear
12087 :clear
12088 s/\\$//
12089 t bsnlc
12090 s/["\\]/\\&/g; s/^/"/; s/$/"/p
12091 d
12092 :bsnlc
12093 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
12094 b cont
12095 ' <confdefs.h | sed '
12096 s/'"$ac_delim"'/"\\\
12097 "/g' >>$CONFIG_STATUS || ac_write_fail=1
12098
12099 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12100 for (key in D) D_is_set[key] = 1
12101 FS = ""
12102 }
12103 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
12104 line = \$ 0
12105 split(line, arg, " ")
12106 if (arg[1] == "#") {
12107 defundef = arg[2]
12108 mac1 = arg[3]
12109 } else {
12110 defundef = substr(arg[1], 2)
12111 mac1 = arg[2]
12112 }
12113 split(mac1, mac2, "(") #)
12114 macro = mac2[1]
12115 prefix = substr(line, 1, index(line, defundef) - 1)
12116 if (D_is_set[macro]) {
12117 # Preserve the white space surrounding the "#".
12118 print prefix "define", macro P[macro] D[macro]
12119 next
12120 } else {
12121 # Replace #undef with comments. This is necessary, for example,
12122 # in the case of _POSIX_SOURCE, which is predefined and required
12123 # on some systems where configure will not decide to define it.
12124 if (defundef == "undef") {
12125 print "/*", prefix defundef, macro, "*/"
12126 next
12127 }
12128 }
12129 }
12130 { print }
12131 _ACAWK
12132 _ACEOF
12133 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12134 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
12135 fi # test -n "$CONFIG_HEADERS"
12136
12137
12138 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
12139 shift
12140 for ac_tag
12141 do
12142 case $ac_tag in
12143 :[FHLC]) ac_mode=$ac_tag; continue;;
12144 esac
12145 case $ac_mode$ac_tag in
12146 :[FHL]*:*);;
12147 :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;;
12148 :[FH]-) ac_tag=-:-;;
12149 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
12150 esac
12151 ac_save_IFS=$IFS
12152 IFS=:
12153 set x $ac_tag
12154 IFS=$ac_save_IFS
12155 shift
12156 ac_file=$1
12157 shift
12158
12159 case $ac_mode in
12160 :L) ac_source=$1;;
12161 :[FH])
12162 ac_file_inputs=
12163 for ac_f
12164 do
12165 case $ac_f in
12166 -) ac_f="$ac_tmp/stdin";;
12167 *) # Look for the file first in the build tree, then in the source tree
12168 # (if the path is not absolute). The absolute path cannot be DOS-style,
12169 # because $ac_f cannot contain ':'.
12170 test -f "$ac_f" ||
12171 case $ac_f in
12172 [\\/$]*) false;;
12173 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
12174 esac ||
12175 as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;;
12176 esac
12177 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
12178 as_fn_append ac_file_inputs " '$ac_f'"
12179 done
12180
12181 # Let's still pretend it is 'configure' which instantiates (i.e., don't
12182 # use $as_me), people would be surprised to read:
12183 # /* config.h. Generated by config.status. */
12184 configure_input='Generated from '`
12185 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
12186 `' by configure.'
12187 if test x"$ac_file" != x-; then
12188 configure_input="$ac_file. $configure_input"
12189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
12190 printf "%s\n" "$as_me: creating $ac_file" >&6;}
12191 fi
12192 # Neutralize special characters interpreted by sed in replacement strings.
12193 case $configure_input in #(
12194 *\&* | *\|* | *\\* )
12195 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
12196 sed 's/[\\\\&|]/\\\\&/g'`;; #(
12197 *) ac_sed_conf_input=$configure_input;;
12198 esac
12199
12200 case $ac_tag in
12201 *:-:* | *:-) cat >"$ac_tmp/stdin" \
12202 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
12203 esac
12204 ;;
12205 esac
12206
12207 ac_dir=`$as_dirname -- "$ac_file" ||
12208 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
12209 X"$ac_file" : 'X\(//\)[^/]' \| \
12210 X"$ac_file" : 'X\(//\)$' \| \
12211 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
12212 printf "%s\n" X"$ac_file" |
12213 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
12214 s//\1/
12215 q
12216 }
12217 /^X\(\/\/\)[^/].*/{
12218 s//\1/
12219 q
12220 }
12221 /^X\(\/\/\)$/{
12222 s//\1/
12223 q
12224 }
12225 /^X\(\/\).*/{
12226 s//\1/
12227 q
12228 }
12229 s/.*/./; q'`
12230 as_dir="$ac_dir"; as_fn_mkdir_p
12231 ac_builddir=.
12232
12233 case "$ac_dir" in
12234 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
12235 *)
12236 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
12237 # A ".." for each directory in $ac_dir_suffix.
12238 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
12239 case $ac_top_builddir_sub in
12240 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
12241 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
12242 esac ;;
12243 esac
12244 ac_abs_top_builddir=$ac_pwd
12245 ac_abs_builddir=$ac_pwd$ac_dir_suffix
12246 # for backward compatibility:
12247 ac_top_builddir=$ac_top_build_prefix
12248
12249 case $srcdir in
12250 .) # We are building in place.
12251 ac_srcdir=.
12252 ac_top_srcdir=$ac_top_builddir_sub
12253 ac_abs_top_srcdir=$ac_pwd ;;
12254 [\\/]* | ?:[\\/]* ) # Absolute name.
12255 ac_srcdir=$srcdir$ac_dir_suffix;
12256 ac_top_srcdir=$srcdir
12257 ac_abs_top_srcdir=$srcdir ;;
12258 *) # Relative name.
12259 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
12260 ac_top_srcdir=$ac_top_build_prefix$srcdir
12261 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
12262 esac
12263 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
12264
12265
12266 case $ac_mode in
12267 :F)
12268 #
12269 # CONFIG_FILE
12270 #
12271
12272 case $INSTALL in
12273 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
12274 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
12275 esac
12276 ac_MKDIR_P=$MKDIR_P
12277 case $MKDIR_P in
12278 [\\/$]* | ?:[\\/]* ) ;;
12279 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
12280 esac
12281 _ACEOF
12282
12283 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12284 # If the template does not know about datarootdir, expand it.
12285 # FIXME: This hack should be removed a few years after 2.60.
12286 ac_datarootdir_hack=; ac_datarootdir_seen=
12287 ac_sed_dataroot='
12288 /datarootdir/ {
12289 p
12290 q
12291 }
12292 /@datadir@/p
12293 /@docdir@/p
12294 /@infodir@/p
12295 /@localedir@/p
12296 /@mandir@/p'
12297 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
12298 *datarootdir*) ac_datarootdir_seen=yes;;
12299 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
12300 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
12301 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
12302 _ACEOF
12303 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12304 ac_datarootdir_hack='
12305 s&@datadir@&$datadir&g
12306 s&@docdir@&$docdir&g
12307 s&@infodir@&$infodir&g
12308 s&@localedir@&$localedir&g
12309 s&@mandir@&$mandir&g
12310 s&\\\${datarootdir}&$datarootdir&g' ;;
12311 esac
12312 _ACEOF
12313
12314 # Neutralize VPATH when '$srcdir' = '.'.
12315 # Shell code in configure.ac might set extrasub.
12316 # FIXME: do we really want to maintain this feature?
12317 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
12318 ac_sed_extra="$ac_vpsub
12319 $extrasub
12320 _ACEOF
12321 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
12322 :t
12323 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
12324 s|@configure_input@|$ac_sed_conf_input|;t t
12325 s&@top_builddir@&$ac_top_builddir_sub&;t t
12326 s&@top_build_prefix@&$ac_top_build_prefix&;t t
12327 s&@srcdir@&$ac_srcdir&;t t
12328 s&@abs_srcdir@&$ac_abs_srcdir&;t t
12329 s&@top_srcdir@&$ac_top_srcdir&;t t
12330 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
12331 s&@builddir@&$ac_builddir&;t t
12332 s&@abs_builddir@&$ac_abs_builddir&;t t
12333 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
12334 s&@INSTALL@&$ac_INSTALL&;t t
12335 s&@MKDIR_P@&$ac_MKDIR_P&;t t
12336 $ac_datarootdir_hack
12337 "
12338 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
12339 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
12340
12341 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
12342 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
12343 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
12344 "$ac_tmp/out"`; test -z "$ac_out"; } &&
12345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir'
12346 which seems to be undefined. Please make sure it is defined" >&5
12347 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir'
12348 which seems to be undefined. Please make sure it is defined" >&2;}
12349
12350 rm -f "$ac_tmp/stdin"
12351 case $ac_file in
12352 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
12353 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
12354 esac \
12355 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
12356 ;;
12357 :H)
12358 #
12359 # CONFIG_HEADER
12360 #
12361 if test x"$ac_file" != x-; then
12362 {
12363 printf "%s\n" "/* $configure_input */" >&1 \
12364 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
12365 } >"$ac_tmp/config.h" \
12366 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
12367 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
12368 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
12369 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
12370 else
12371 rm -f "$ac_file"
12372 mv "$ac_tmp/config.h" "$ac_file" \
12373 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
12374 fi
12375 else
12376 printf "%s\n" "/* $configure_input */" >&1 \
12377 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
12378 || as_fn_error $? "could not create -" "$LINENO" 5
12379 fi
12380 ;;
12381
12382 :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
12383 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
12384 ;;
12385 esac
12386
12387
12388 case $ac_file$ac_mode in
12389 "build/stamp-h":C) echo timestamp > build/stamp-h ;;
12390 "doc/make_doc":F) chmod +x doc/make_doc ;;
12391
12392 esac
12393 done # for ac_tag
12394
12395
12396 as_fn_exit 0
12397 _ACEOF
12398 ac_clean_files=$ac_clean_files_save
12399
12400 test $ac_write_fail = 0 ||
12401 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
12402
12403
12404 # configure is writing to config.log, and then calls config.status.
12405 # config.status does its own redirection, appending to config.log.
12406 # Unfortunately, on DOS this fails, as config.log is still kept open
12407 # by configure, so config.status won't be able to write to it; its
12408 # output is simply discarded. So we exec the FD to /dev/null,
12409 # effectively closing config.log, so it can be properly (re)opened and
12410 # appended to by config.status. When coming back to configure, we
12411 # need to make the FD available again.
12412 if test "$no_create" != yes; then
12413 ac_cs_success=:
12414 ac_config_status_args=
12415 test "$silent" = yes &&
12416 ac_config_status_args="$ac_config_status_args --quiet"
12417 exec 5>/dev/null
12418 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
12419 exec 5>>config.log
12420 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12421 # would make configure fail if this is the last instruction.
12422 $ac_cs_success || as_fn_exit 1
12423 fi
12424 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
12425 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
12426 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
12427 fi
12428
12429