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.71 for CVD 2.1.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
7 # Inc.
8 #
9 #
10 # This configure script is free software; the Free Software Foundation
11 # gives unlimited permission to copy, distribute and modify it.
12 #
13 # Copyright foo
14 ## -------------------- ##
15 ## M4sh Initialization. ##
16 ## -------------------- ##
17
18 # Be more Bourne compatible
19 DUALCASE=1; export DUALCASE # for MKS sh
20 as_nop=:
21 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
22 then :
23 emulate sh
24 NULLCMD=:
25 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
26 # is contrary to our usage. Disable this feature.
27 alias -g '${1+"$@"}'='"$@"'
28 setopt NO_GLOB_SUBST
29 else $as_nop
30 case `(set -o) 2>/dev/null` in #(
31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
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="as_nop=:
144 if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
145 then :
146 emulate sh
147 NULLCMD=:
148 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
149 # is contrary to our usage. Disable this feature.
150 alias -g '\${1+\"\$@\"}'='\"\$@\"'
151 setopt NO_GLOB_SUBST
152 else \$as_nop
153 case \`(set -o) 2>/dev/null\` in #(
154 *posix*) :
155 set -o posix ;; #(
156 *) :
157 ;;
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 \$as_nop
176 exitcode=1; echo positional parameters were not saved.
177 fi
178 test x\$exitcode = x0 || exit 1
179 blah=\$(echo \$(echo blah))
180 test x\"\$blah\" = xblah || exit 1
181 test -x / || exit 1"
182 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
183 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
184 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
185 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
186 test \$(( 1 + 1 )) = 2 || exit 1"
187 if (eval "$as_required") 2>/dev/null
188 then :
189 as_have_required=yes
190 else $as_nop
191 as_have_required=no
192 fi
193 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
194 then :
195
196 else $as_nop
197 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
198 as_found=false
199 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
200 do
201 IFS=$as_save_IFS
202 case $as_dir in #(((
203 '') as_dir=./ ;;
204 */) ;;
205 *) as_dir=$as_dir/ ;;
206 esac
207 as_found=:
208 case $as_dir in #(
209 /*)
210 for as_base in sh bash ksh sh5; do
211 # Try only shells that exist, to save several forks.
212 as_shell=$as_dir$as_base
213 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
214 as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
215 then :
216 CONFIG_SHELL=$as_shell as_have_required=yes
217 if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
218 then :
219 break 2
220 fi
221 fi
222 done;;
223 esac
224 as_found=false
225 done
226 IFS=$as_save_IFS
227 if $as_found
228 then :
229
230 else $as_nop
231 if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
233 then :
234 CONFIG_SHELL=$SHELL as_have_required=yes
235 fi
236 fi
237
238
239 if test "x$CONFIG_SHELL" != x
240 then :
241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243 # neutralization value for shells without unset; and this also
244 # works around shells that cannot unset nonexistent variables.
245 # Preserve -v and -x to the replacement shell.
246 BASH_ENV=/dev/null
247 ENV=/dev/null
248 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249 case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254 esac
255 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256 # Admittedly, this is quite paranoid, since all the known shells bail
257 # out after a failed `exec'.
258 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
259 exit 255
260 fi
261
262 if test x$as_have_required = xno
263 then :
264 printf "%s\n" "$0: This script requires a shell more modern than all"
265 printf "%s\n" "$0: the shells that I found on your system."
266 if test ${ZSH_VERSION+y} ; then
267 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
269 else
270 printf "%s\n" "$0: Please tell [email protected] about your system,
271 $0: including any error possibly output before this
272 $0: message. Then install a modern shell, or manually run
273 $0: the script under such a shell if you do have one."
274 fi
275 exit 1
276 fi
277 fi
278 fi
279 SHELL=${CONFIG_SHELL-/bin/sh}
280 export SHELL
281 # Unset more variables known to interfere with behavior of common tools.
282 CLICOLOR_FORCE= GREP_OPTIONS=
283 unset CLICOLOR_FORCE GREP_OPTIONS
284
285 ## --------------------- ##
286 ## M4sh Shell Functions. ##
287 ## --------------------- ##
288 # as_fn_unset VAR
289 # ---------------
290 # Portably unset VAR.
291 as_fn_unset ()
292 {
293 { eval $1=; unset $1;}
294 }
295 as_unset=as_fn_unset
296
297
298 # as_fn_set_status STATUS
299 # -----------------------
300 # Set $? to STATUS, without forking.
301 as_fn_set_status ()
302 {
303 return $1
304 } # as_fn_set_status
305
306 # as_fn_exit STATUS
307 # -----------------
308 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
309 as_fn_exit ()
310 {
311 set +e
312 as_fn_set_status $1
313 exit $1
314 } # as_fn_exit
315 # as_fn_nop
316 # ---------
317 # Do nothing but, unlike ":", preserve the value of $?.
318 as_fn_nop ()
319 {
320 return $?
321 }
322 as_nop=as_fn_nop
323
324 # as_fn_mkdir_p
325 # -------------
326 # Create "$as_dir" as a directory, including parents if necessary.
327 as_fn_mkdir_p ()
328 {
329
330 case $as_dir in #(
331 -*) as_dir=./$as_dir;;
332 esac
333 test -d "$as_dir" || eval $as_mkdir_p || {
334 as_dirs=
335 while :; do
336 case $as_dir in #(
337 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
338 *) as_qdir=$as_dir;;
339 esac
340 as_dirs="'$as_qdir' $as_dirs"
341 as_dir=`$as_dirname -- "$as_dir" ||
342 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
343 X"$as_dir" : 'X\(//\)[^/]' \| \
344 X"$as_dir" : 'X\(//\)$' \| \
345 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
346 printf "%s\n" X"$as_dir" |
347 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
348 s//\1/
349 q
350 }
351 /^X\(\/\/\)[^/].*/{
352 s//\1/
353 q
354 }
355 /^X\(\/\/\)$/{
356 s//\1/
357 q
358 }
359 /^X\(\/\).*/{
360 s//\1/
361 q
362 }
363 s/.*/./; q'`
364 test -d "$as_dir" && break
365 done
366 test -z "$as_dirs" || eval "mkdir $as_dirs"
367 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
368
369
370 } # as_fn_mkdir_p
371
372 # as_fn_executable_p FILE
373 # -----------------------
374 # Test if FILE is an executable regular file.
375 as_fn_executable_p ()
376 {
377 test -f "$1" && test -x "$1"
378 } # as_fn_executable_p
379 # as_fn_append VAR VALUE
380 # ----------------------
381 # Append the text in VALUE to the end of the definition contained in VAR. Take
382 # advantage of any shell optimizations that allow amortized linear growth over
383 # repeated appends, instead of the typical quadratic growth present in naive
384 # implementations.
385 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
386 then :
387 eval 'as_fn_append ()
388 {
389 eval $1+=\$2
390 }'
391 else $as_nop
392 as_fn_append ()
393 {
394 eval $1=\$$1\$2
395 }
396 fi # as_fn_append
397
398 # as_fn_arith ARG...
399 # ------------------
400 # Perform arithmetic evaluation on the ARGs, and store the result in the
401 # global $as_val. Take advantage of shells that can avoid forks. The arguments
402 # must be portable across $(()) and expr.
403 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
404 then :
405 eval 'as_fn_arith ()
406 {
407 as_val=$(( $* ))
408 }'
409 else $as_nop
410 as_fn_arith ()
411 {
412 as_val=`expr "$@" || test $? -eq 1`
413 }
414 fi # as_fn_arith
415
416 # as_fn_nop
417 # ---------
418 # Do nothing but, unlike ":", preserve the value of $?.
419 as_fn_nop ()
420 {
421 return $?
422 }
423 as_nop=as_fn_nop
424
425 # as_fn_error STATUS ERROR [LINENO LOG_FD]
426 # ----------------------------------------
427 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
428 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
429 # script with STATUS, using 1 if that was 0.
430 as_fn_error ()
431 {
432 as_status=$1; test $as_status -eq 0 && as_status=1
433 if test "$4"; then
434 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
435 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
436 fi
437 printf "%s\n" "$as_me: error: $2" >&2
438 as_fn_exit $as_status
439 } # as_fn_error
440
441 if expr a : '\(a\)' >/dev/null 2>&1 &&
442 test "X`expr 00001 : '.*\(...\)'`" = X001; then
443 as_expr=expr
444 else
445 as_expr=false
446 fi
447
448 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
449 as_basename=basename
450 else
451 as_basename=false
452 fi
453
454 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
455 as_dirname=dirname
456 else
457 as_dirname=false
458 fi
459
460 as_me=`$as_basename -- "$0" ||
461 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
462 X"$0" : 'X\(//\)$' \| \
463 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
464 printf "%s\n" X/"$0" |
465 sed '/^.*\/\([^/][^/]*\)\/*$/{
466 s//\1/
467 q
468 }
469 /^X\/\(\/\/\)$/{
470 s//\1/
471 q
472 }
473 /^X\/\(\/\).*/{
474 s//\1/
475 q
476 }
477 s/.*/./; q'`
478
479 # Avoid depending upon Character Ranges.
480 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
481 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
482 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
483 as_cr_digits='0123456789'
484 as_cr_alnum=$as_cr_Letters$as_cr_digits
485
486
487 as_lineno_1=$LINENO as_lineno_1a=$LINENO
488 as_lineno_2=$LINENO as_lineno_2a=$LINENO
489 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
490 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
491 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
492 sed -n '
493 p
494 /[$]LINENO/=
495 ' <$as_myself |
496 sed '
497 s/[$]LINENO.*/&-/
498 t lineno
499 b
500 :lineno
501 N
502 :loop
503 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
504 t loop
505 s/-\n.*//
506 ' >$as_me.lineno &&
507 chmod +x "$as_me.lineno" ||
508 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
509
510 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
511 # already done that, so ensure we don't try to do so again and fall
512 # in an infinite loop. This has already happened in practice.
513 _as_can_reexec=no; export _as_can_reexec
514 # Don't try to exec as it changes $[0], causing all sort of problems
515 # (the dirname of $[0] is not the place where we might find the
516 # original and so on. Autoconf is especially sensitive to this).
517 . "./$as_me.lineno"
518 # Exit status is that of the last command.
519 exit
520 }
521
522
523 # Determine whether it's possible to make 'echo' print without a newline.
524 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
525 # for compatibility with existing Makefiles.
526 ECHO_C= ECHO_N= ECHO_T=
527 case `echo -n x` in #(((((
528 -n*)
529 case `echo 'xy\c'` in
530 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
531 xy) ECHO_C='\c';;
532 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
533 ECHO_T=' ';;
534 esac;;
535 *)
536 ECHO_N='-n';;
537 esac
538
539 # For backward compatibility with old third-party macros, we provide
540 # the shell variables $as_echo and $as_echo_n. New code should use
541 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
542 as_echo='printf %s\n'
543 as_echo_n='printf %s'
544
545
546 rm -f conf$$ conf$$.exe conf$$.file
547 if test -d conf$$.dir; then
548 rm -f conf$$.dir/conf$$.file
549 else
550 rm -f conf$$.dir
551 mkdir conf$$.dir 2>/dev/null
552 fi
553 if (echo >conf$$.file) 2>/dev/null; then
554 if ln -s conf$$.file conf$$ 2>/dev/null; then
555 as_ln_s='ln -s'
556 # ... but there are two gotchas:
557 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
558 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
559 # In both cases, we have to default to `cp -pR'.
560 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
561 as_ln_s='cp -pR'
562 elif ln conf$$.file conf$$ 2>/dev/null; then
563 as_ln_s=ln
564 else
565 as_ln_s='cp -pR'
566 fi
567 else
568 as_ln_s='cp -pR'
569 fi
570 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
571 rmdir conf$$.dir 2>/dev/null
572
573 if mkdir -p . 2>/dev/null; then
574 as_mkdir_p='mkdir -p "$as_dir"'
575 else
576 test -d ./-p && rmdir ./-p
577 as_mkdir_p=false
578 fi
579
580 as_test_x='test -x'
581 as_executable_p=as_fn_executable_p
582
583 # Sed expression to map a string onto a valid CPP name.
584 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
585
586 # Sed expression to map a string onto a valid variable name.
587 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
588
589
590 test -n "$DJDIR" || exec 7<&0 </dev/null
591 exec 6>&1
592
593 # Name of the host.
594 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
595 # so uname gets run too.
596 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
597
598 #
599 # Initializations.
600 #
601 ac_default_prefix=/usr/local
602 ac_clean_files=
603 ac_config_libobj_dir=.
604 LIBOBJS=
605 cross_compiling=no
606 subdirs=
607 MFLAGS=
608 MAKEFLAGS=
609
610 # Identity of this package.
611 PACKAGE_NAME='CVD'
612 PACKAGE_TARNAME='cvd'
613 PACKAGE_VERSION='2.1'
614 PACKAGE_STRING='CVD 2.1'
615 PACKAGE_BUGREPORT=''
616 PACKAGE_URL=''
617
618 # Factoring default headers for most tests.
619 ac_includes_default="\
620 #include <stddef.h>
621 #ifdef HAVE_STDIO_H
622 # include <stdio.h>
623 #endif
624 #ifdef HAVE_STDLIB_H
625 # include <stdlib.h>
626 #endif
627 #ifdef HAVE_STRING_H
628 # include <string.h>
629 #endif
630 #ifdef HAVE_INTTYPES_H
631 # include <inttypes.h>
632 #endif
633 #ifdef HAVE_STDINT_H
634 # include <stdint.h>
635 #endif
636 #ifdef HAVE_STRINGS_H
637 # include <strings.h>
638 #endif
639 #ifdef HAVE_SYS_TYPES_H
640 # include <sys/types.h>
641 #endif
642 #ifdef HAVE_SYS_STAT_H
643 # include <sys/stat.h>
644 #endif
645 #ifdef HAVE_UNISTD_H
646 # include <unistd.h>
647 #endif"
648
649 ac_header_cxx_list=
650 ac_subst_vars='LTLIBOBJS
651 LIBOBJS
652 OFLAGS
653 testprogs
654 progs
655 dep_objects
656 have_fastobscure
657 have_fast
658 docs
659 have_ffmpeg
660 have_tiff
661 have_jpeg
662 have_png
663 have_libuvc
664 have_toon
665 have_videodisplay
666 XMKMF
667 ac_ct_CC
668 CFLAGS
669 CC
670 cygwin_hacks
671 have_windows
672 have_v4l2buffer
673 have_dc1394v2
674 osx_hacks
675 have_assembler
676 have_inline_asm
677 have_32bit
678 have_sse3
679 have_sse2
680 have_sse
681 have_mmxext
682 have_mmx
683 have_x86
684 have_shared
685 host_os
686 host_vendor
687 host_cpu
688 host
689 build_os
690 build_vendor
691 build_cpu
692 build
693 minor
694 major
695 CXXCPP
696 RANLIB
697 LN_S
698 INSTALL_DATA
699 INSTALL_SCRIPT
700 INSTALL_PROGRAM
701 HAVE_CXX17
702 OBJEXT
703 EXEEXT
704 ac_ct_CXX
705 CPPFLAGS
706 LDFLAGS
707 CXXFLAGS
708 CXX
709 AWK
710 target_alias
711 host_alias
712 build_alias
713 LIBS
714 ECHO_T
715 ECHO_N
716 ECHO_C
717 DEFS
718 mandir
719 localedir
720 libdir
721 psdir
722 pdfdir
723 dvidir
724 htmldir
725 infodir
726 docdir
727 oldincludedir
728 includedir
729 runstatedir
730 localstatedir
731 sharedstatedir
732 sysconfdir
733 datadir
734 datarootdir
735 libexecdir
736 sbindir
737 bindir
738 program_transform_name
739 prefix
740 exec_prefix
741 PACKAGE_URL
742 PACKAGE_BUGREPORT
743 PACKAGE_STRING
744 PACKAGE_VERSION
745 PACKAGE_TARNAME
746 PACKAGE_NAME
747 PATH_SEPARATOR
748 SHELL'
749 ac_subst_files=''
750 ac_user_opts='
751 enable_option_checking
752 enable_ggdb
753 enable_shared
754 with_simd
755 with_mmx
756 with_mmxext
757 with_sse
758 with_sse2
759 with_assembler
760 with_inline_asm
761 with_dc1394v2
762 with_v4l2buffer
763 with_videodisplay
764 with_jpeg
765 with_jpegbuffer
766 with_tiff
767 with_png
768 with_ffmpeg
769 with_toon
770 with_x
771 enable_fast
772 enable_fastobscure
773 '
774 ac_precious_vars='build_alias
775 host_alias
776 target_alias
777 CXX
778 CXXFLAGS
779 LDFLAGS
780 LIBS
781 CPPFLAGS
782 CCC
783 CXXCPP
784 CC
785 CFLAGS
786 XMKMF'
787
788
789 # Initialize some variables set by options.
790 ac_init_help=
791 ac_init_version=false
792 ac_unrecognized_opts=
793 ac_unrecognized_sep=
794 # The variables have the same names as the options, with
795 # dashes changed to underlines.
796 cache_file=/dev/null
797 exec_prefix=NONE
798 no_create=
799 no_recursion=
800 prefix=NONE
801 program_prefix=NONE
802 program_suffix=NONE
803 program_transform_name=s,x,x,
804 silent=
805 site=
806 srcdir=
807 verbose=
808 x_includes=NONE
809 x_libraries=NONE
810
811 # Installation directory options.
812 # These are left unexpanded so users can "make install exec_prefix=/foo"
813 # and all the variables that are supposed to be based on exec_prefix
814 # by default will actually change.
815 # Use braces instead of parens because sh, perl, etc. also accept them.
816 # (The list follows the same order as the GNU Coding Standards.)
817 bindir='${exec_prefix}/bin'
818 sbindir='${exec_prefix}/sbin'
819 libexecdir='${exec_prefix}/libexec'
820 datarootdir='${prefix}/share'
821 datadir='${datarootdir}'
822 sysconfdir='${prefix}/etc'
823 sharedstatedir='${prefix}/com'
824 localstatedir='${prefix}/var'
825 runstatedir='${localstatedir}/run'
826 includedir='${prefix}/include'
827 oldincludedir='/usr/include'
828 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
829 infodir='${datarootdir}/info'
830 htmldir='${docdir}'
831 dvidir='${docdir}'
832 pdfdir='${docdir}'
833 psdir='${docdir}'
834 libdir='${exec_prefix}/lib'
835 localedir='${datarootdir}/locale'
836 mandir='${datarootdir}/man'
837
838 ac_prev=
839 ac_dashdash=
840 for ac_option
841 do
842 # If the previous option needs an argument, assign it.
843 if test -n "$ac_prev"; then
844 eval $ac_prev=\$ac_option
845 ac_prev=
846 continue
847 fi
848
849 case $ac_option in
850 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
851 *=) ac_optarg= ;;
852 *) ac_optarg=yes ;;
853 esac
854
855 case $ac_dashdash$ac_option in
856 --)
857 ac_dashdash=yes ;;
858
859 -bindir | --bindir | --bindi | --bind | --bin | --bi)
860 ac_prev=bindir ;;
861 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
862 bindir=$ac_optarg ;;
863
864 -build | --build | --buil | --bui | --bu)
865 ac_prev=build_alias ;;
866 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
867 build_alias=$ac_optarg ;;
868
869 -cache-file | --cache-file | --cache-fil | --cache-fi \
870 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
871 ac_prev=cache_file ;;
872 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
873 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
874 cache_file=$ac_optarg ;;
875
876 --config-cache | -C)
877 cache_file=config.cache ;;
878
879 -datadir | --datadir | --datadi | --datad)
880 ac_prev=datadir ;;
881 -datadir=* | --datadir=* | --datadi=* | --datad=*)
882 datadir=$ac_optarg ;;
883
884 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
885 | --dataroo | --dataro | --datar)
886 ac_prev=datarootdir ;;
887 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
888 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
889 datarootdir=$ac_optarg ;;
890
891 -disable-* | --disable-*)
892 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
893 # Reject names that are not valid shell variable names.
894 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
895 as_fn_error $? "invalid feature name: \`$ac_useropt'"
896 ac_useropt_orig=$ac_useropt
897 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
898 case $ac_user_opts in
899 *"
900 "enable_$ac_useropt"
901 "*) ;;
902 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
903 ac_unrecognized_sep=', ';;
904 esac
905 eval enable_$ac_useropt=no ;;
906
907 -docdir | --docdir | --docdi | --doc | --do)
908 ac_prev=docdir ;;
909 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
910 docdir=$ac_optarg ;;
911
912 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
913 ac_prev=dvidir ;;
914 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
915 dvidir=$ac_optarg ;;
916
917 -enable-* | --enable-*)
918 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
919 # Reject names that are not valid shell variable names.
920 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
921 as_fn_error $? "invalid feature name: \`$ac_useropt'"
922 ac_useropt_orig=$ac_useropt
923 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
924 case $ac_user_opts in
925 *"
926 "enable_$ac_useropt"
927 "*) ;;
928 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
929 ac_unrecognized_sep=', ';;
930 esac
931 eval enable_$ac_useropt=\$ac_optarg ;;
932
933 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
934 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
935 | --exec | --exe | --ex)
936 ac_prev=exec_prefix ;;
937 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
938 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
939 | --exec=* | --exe=* | --ex=*)
940 exec_prefix=$ac_optarg ;;
941
942 -gas | --gas | --ga | --g)
943 # Obsolete; use --with-gas.
944 with_gas=yes ;;
945
946 -help | --help | --hel | --he | -h)
947 ac_init_help=long ;;
948 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
949 ac_init_help=recursive ;;
950 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
951 ac_init_help=short ;;
952
953 -host | --host | --hos | --ho)
954 ac_prev=host_alias ;;
955 -host=* | --host=* | --hos=* | --ho=*)
956 host_alias=$ac_optarg ;;
957
958 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
959 ac_prev=htmldir ;;
960 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
961 | --ht=*)
962 htmldir=$ac_optarg ;;
963
964 -includedir | --includedir | --includedi | --included | --include \
965 | --includ | --inclu | --incl | --inc)
966 ac_prev=includedir ;;
967 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
968 | --includ=* | --inclu=* | --incl=* | --inc=*)
969 includedir=$ac_optarg ;;
970
971 -infodir | --infodir | --infodi | --infod | --info | --inf)
972 ac_prev=infodir ;;
973 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
974 infodir=$ac_optarg ;;
975
976 -libdir | --libdir | --libdi | --libd)
977 ac_prev=libdir ;;
978 -libdir=* | --libdir=* | --libdi=* | --libd=*)
979 libdir=$ac_optarg ;;
980
981 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
982 | --libexe | --libex | --libe)
983 ac_prev=libexecdir ;;
984 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
985 | --libexe=* | --libex=* | --libe=*)
986 libexecdir=$ac_optarg ;;
987
988 -localedir | --localedir | --localedi | --localed | --locale)
989 ac_prev=localedir ;;
990 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
991 localedir=$ac_optarg ;;
992
993 -localstatedir | --localstatedir | --localstatedi | --localstated \
994 | --localstate | --localstat | --localsta | --localst | --locals)
995 ac_prev=localstatedir ;;
996 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
997 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
998 localstatedir=$ac_optarg ;;
999
1000 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1001 ac_prev=mandir ;;
1002 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1003 mandir=$ac_optarg ;;
1004
1005 -nfp | --nfp | --nf)
1006 # Obsolete; use --without-fp.
1007 with_fp=no ;;
1008
1009 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1010 | --no-cr | --no-c | -n)
1011 no_create=yes ;;
1012
1013 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1014 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1015 no_recursion=yes ;;
1016
1017 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1018 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1019 | --oldin | --oldi | --old | --ol | --o)
1020 ac_prev=oldincludedir ;;
1021 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1022 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1023 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1024 oldincludedir=$ac_optarg ;;
1025
1026 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1027 ac_prev=prefix ;;
1028 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1029 prefix=$ac_optarg ;;
1030
1031 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1032 | --program-pre | --program-pr | --program-p)
1033 ac_prev=program_prefix ;;
1034 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1035 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1036 program_prefix=$ac_optarg ;;
1037
1038 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1039 | --program-suf | --program-su | --program-s)
1040 ac_prev=program_suffix ;;
1041 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1042 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1043 program_suffix=$ac_optarg ;;
1044
1045 -program-transform-name | --program-transform-name \
1046 | --program-transform-nam | --program-transform-na \
1047 | --program-transform-n | --program-transform- \
1048 | --program-transform | --program-transfor \
1049 | --program-transfo | --program-transf \
1050 | --program-trans | --program-tran \
1051 | --progr-tra | --program-tr | --program-t)
1052 ac_prev=program_transform_name ;;
1053 -program-transform-name=* | --program-transform-name=* \
1054 | --program-transform-nam=* | --program-transform-na=* \
1055 | --program-transform-n=* | --program-transform-=* \
1056 | --program-transform=* | --program-transfor=* \
1057 | --program-transfo=* | --program-transf=* \
1058 | --program-trans=* | --program-tran=* \
1059 | --progr-tra=* | --program-tr=* | --program-t=*)
1060 program_transform_name=$ac_optarg ;;
1061
1062 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1063 ac_prev=pdfdir ;;
1064 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1065 pdfdir=$ac_optarg ;;
1066
1067 -psdir | --psdir | --psdi | --psd | --ps)
1068 ac_prev=psdir ;;
1069 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1070 psdir=$ac_optarg ;;
1071
1072 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1073 | -silent | --silent | --silen | --sile | --sil)
1074 silent=yes ;;
1075
1076 -runstatedir | --runstatedir | --runstatedi | --runstated \
1077 | --runstate | --runstat | --runsta | --runst | --runs \
1078 | --run | --ru | --r)
1079 ac_prev=runstatedir ;;
1080 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1081 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1082 | --run=* | --ru=* | --r=*)
1083 runstatedir=$ac_optarg ;;
1084
1085 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1086 ac_prev=sbindir ;;
1087 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1088 | --sbi=* | --sb=*)
1089 sbindir=$ac_optarg ;;
1090
1091 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1092 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1093 | --sharedst | --shareds | --shared | --share | --shar \
1094 | --sha | --sh)
1095 ac_prev=sharedstatedir ;;
1096 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1097 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1098 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1099 | --sha=* | --sh=*)
1100 sharedstatedir=$ac_optarg ;;
1101
1102 -site | --site | --sit)
1103 ac_prev=site ;;
1104 -site=* | --site=* | --sit=*)
1105 site=$ac_optarg ;;
1106
1107 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1108 ac_prev=srcdir ;;
1109 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1110 srcdir=$ac_optarg ;;
1111
1112 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1113 | --syscon | --sysco | --sysc | --sys | --sy)
1114 ac_prev=sysconfdir ;;
1115 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1116 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1117 sysconfdir=$ac_optarg ;;
1118
1119 -target | --target | --targe | --targ | --tar | --ta | --t)
1120 ac_prev=target_alias ;;
1121 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1122 target_alias=$ac_optarg ;;
1123
1124 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1125 verbose=yes ;;
1126
1127 -version | --version | --versio | --versi | --vers | -V)
1128 ac_init_version=: ;;
1129
1130 -with-* | --with-*)
1131 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1132 # Reject names that are not valid shell variable names.
1133 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1134 as_fn_error $? "invalid package name: \`$ac_useropt'"
1135 ac_useropt_orig=$ac_useropt
1136 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1137 case $ac_user_opts in
1138 *"
1139 "with_$ac_useropt"
1140 "*) ;;
1141 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1142 ac_unrecognized_sep=', ';;
1143 esac
1144 eval with_$ac_useropt=\$ac_optarg ;;
1145
1146 -without-* | --without-*)
1147 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1148 # Reject names that are not valid shell variable names.
1149 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1150 as_fn_error $? "invalid package name: \`$ac_useropt'"
1151 ac_useropt_orig=$ac_useropt
1152 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1153 case $ac_user_opts in
1154 *"
1155 "with_$ac_useropt"
1156 "*) ;;
1157 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1158 ac_unrecognized_sep=', ';;
1159 esac
1160 eval with_$ac_useropt=no ;;
1161
1162 --x)
1163 # Obsolete; use --with-x.
1164 with_x=yes ;;
1165
1166 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1167 | --x-incl | --x-inc | --x-in | --x-i)
1168 ac_prev=x_includes ;;
1169 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1170 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1171 x_includes=$ac_optarg ;;
1172
1173 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1174 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1175 ac_prev=x_libraries ;;
1176 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1177 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1178 x_libraries=$ac_optarg ;;
1179
1180 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1181 Try \`$0 --help' for more information"
1182 ;;
1183
1184 *=*)
1185 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1186 # Reject names that are not valid shell variable names.
1187 case $ac_envvar in #(
1188 '' | [0-9]* | *[!_$as_cr_alnum]* )
1189 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1190 esac
1191 eval $ac_envvar=\$ac_optarg
1192 export $ac_envvar ;;
1193
1194 *)
1195 # FIXME: should be removed in autoconf 3.0.
1196 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
1197 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1198 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
1199 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1200 ;;
1201
1202 esac
1203 done
1204
1205 if test -n "$ac_prev"; then
1206 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1207 as_fn_error $? "missing argument to $ac_option"
1208 fi
1209
1210 if test -n "$ac_unrecognized_opts"; then
1211 case $enable_option_checking in
1212 no) ;;
1213 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1214 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1215 esac
1216 fi
1217
1218 # Check all directory arguments for consistency.
1219 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1220 datadir sysconfdir sharedstatedir localstatedir includedir \
1221 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1222 libdir localedir mandir runstatedir
1223 do
1224 eval ac_val=\$$ac_var
1225 # Remove trailing slashes.
1226 case $ac_val in
1227 */ )
1228 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1229 eval $ac_var=\$ac_val;;
1230 esac
1231 # Be sure to have absolute directory names.
1232 case $ac_val in
1233 [\\/$]* | ?:[\\/]* ) continue;;
1234 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1235 esac
1236 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1237 done
1238
1239 # There might be people who depend on the old broken behavior: `$host'
1240 # used to hold the argument of --host etc.
1241 # FIXME: To remove some day.
1242 build=$build_alias
1243 host=$host_alias
1244 target=$target_alias
1245
1246 # FIXME: To remove some day.
1247 if test "x$host_alias" != x; then
1248 if test "x$build_alias" = x; then
1249 cross_compiling=maybe
1250 elif test "x$build_alias" != "x$host_alias"; then
1251 cross_compiling=yes
1252 fi
1253 fi
1254
1255 ac_tool_prefix=
1256 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1257
1258 test "$silent" = yes && exec 6>/dev/null
1259
1260
1261 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1262 ac_ls_di=`ls -di .` &&
1263 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1264 as_fn_error $? "working directory cannot be determined"
1265 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1266 as_fn_error $? "pwd does not report name of working directory"
1267
1268
1269 # Find the source files, if location was not specified.
1270 if test -z "$srcdir"; then
1271 ac_srcdir_defaulted=yes
1272 # Try the directory containing this script, then the parent directory.
1273 ac_confdir=`$as_dirname -- "$as_myself" ||
1274 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1275 X"$as_myself" : 'X\(//\)[^/]' \| \
1276 X"$as_myself" : 'X\(//\)$' \| \
1277 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1278 printf "%s\n" X"$as_myself" |
1279 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1280 s//\1/
1281 q
1282 }
1283 /^X\(\/\/\)[^/].*/{
1284 s//\1/
1285 q
1286 }
1287 /^X\(\/\/\)$/{
1288 s//\1/
1289 q
1290 }
1291 /^X\(\/\).*/{
1292 s//\1/
1293 q
1294 }
1295 s/.*/./; q'`
1296 srcdir=$ac_confdir
1297 if test ! -r "$srcdir/$ac_unique_file"; then
1298 srcdir=..
1299 fi
1300 else
1301 ac_srcdir_defaulted=no
1302 fi
1303 if test ! -r "$srcdir/$ac_unique_file"; then
1304 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1305 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1306 fi
1307 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1308 ac_abs_confdir=`(
1309 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1310 pwd)`
1311 # When building in place, set srcdir=.
1312 if test "$ac_abs_confdir" = "$ac_pwd"; then
1313 srcdir=.
1314 fi
1315 # Remove unnecessary trailing slashes from srcdir.
1316 # Double slashes in file names in object file debugging info
1317 # mess up M-x gdb in Emacs.
1318 case $srcdir in
1319 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1320 esac
1321 for ac_var in $ac_precious_vars; do
1322 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1323 eval ac_env_${ac_var}_value=\$${ac_var}
1324 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1325 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1326 done
1327
1328 #
1329 # Report the --help message.
1330 #
1331 if test "$ac_init_help" = "long"; then
1332 # Omit some internal or obsolete options to make the list less imposing.
1333 # This message is too long to be a string in the A/UX 3.1 sh.
1334 cat <<_ACEOF
1335 \`configure' configures CVD 2.1 to adapt to many kinds of systems.
1336
1337 Usage: $0 [OPTION]... [VAR=VALUE]...
1338
1339 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1340 VAR=VALUE. See below for descriptions of some of the useful variables.
1341
1342 Defaults for the options are specified in brackets.
1343
1344 Configuration:
1345 -h, --help display this help and exit
1346 --help=short display options specific to this package
1347 --help=recursive display the short help of all the included packages
1348 -V, --version display version information and exit
1349 -q, --quiet, --silent do not print \`checking ...' messages
1350 --cache-file=FILE cache test results in FILE [disabled]
1351 -C, --config-cache alias for \`--cache-file=config.cache'
1352 -n, --no-create do not create output files
1353 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1354
1355 Installation directories:
1356 --prefix=PREFIX install architecture-independent files in PREFIX
1357 [$ac_default_prefix]
1358 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1359 [PREFIX]
1360
1361 By default, \`make install' will install all the files in
1362 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1363 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1364 for instance \`--prefix=\$HOME'.
1365
1366 For better control, use the options below.
1367
1368 Fine tuning of the installation directories:
1369 --bindir=DIR user executables [EPREFIX/bin]
1370 --sbindir=DIR system admin executables [EPREFIX/sbin]
1371 --libexecdir=DIR program executables [EPREFIX/libexec]
1372 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1373 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1374 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1375 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
1376 --libdir=DIR object code libraries [EPREFIX/lib]
1377 --includedir=DIR C header files [PREFIX/include]
1378 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1379 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1380 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1381 --infodir=DIR info documentation [DATAROOTDIR/info]
1382 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1383 --mandir=DIR man documentation [DATAROOTDIR/man]
1384 --docdir=DIR documentation root [DATAROOTDIR/doc/cvd]
1385 --htmldir=DIR html documentation [DOCDIR]
1386 --dvidir=DIR dvi documentation [DOCDIR]
1387 --pdfdir=DIR pdf documentation [DOCDIR]
1388 --psdir=DIR ps documentation [DOCDIR]
1389 _ACEOF
1390
1391 cat <<\_ACEOF
1392
1393 X features:
1394 --x-includes=DIR X include files are in DIR
1395 --x-libraries=DIR X library files are in DIR
1396
1397 System types:
1398 --build=BUILD configure for building on BUILD [guessed]
1399 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1400 _ACEOF
1401 fi
1402
1403 if test -n "$ac_init_help"; then
1404 case $ac_init_help in
1405 short | recursive ) echo "Configuration of CVD 2.1:";;
1406 esac
1407 cat <<\_ACEOF
1408
1409 Optional Features:
1410 --disable-option-checking ignore unrecognized --enable/--with options
1411 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1412 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1413 --disable-ggdb do not use ggdb flag
1414 --disable-ggdb disable shared library support
1415 --disable-fast compile without the FAST-9,10,12 detectors (use on low memory systems).
1416 --disable-obscure compile without the FAST-7,8,11 detectors (use on low memory systems).
1417
1418 Optional Packages:
1419 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1420 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1421 --without-simd disable SIMD code. Use --without- or --with-
1422 to force presence/absence and disable autodetection.
1423 --with-mmx force presence or absence of MMX (x86 only)
1424 --with-mmxext force presence or absence of MMXEXT (x86 only)
1425 --with-sse force presence or absence of SSE (x86 only)
1426 --with-sse2 force presence or absence of SSE2 (x86 only)
1427 --with-assembler force presence or absence of asm
1428 --with-inline_asm force presence or absence of inline asm
1429 --without-dc1394v2 do not use libDC1394v2 (required for dvbuffer3) (Linux/OSX).
1430 --without-v4l2buffer compile without v4l2buffer (Video4Linux2) support (Linux only)
1431 --without-videodisplay compile without videodisplay support
1432 --without-jpeg compile without JPEG support
1433 --with-jpegbuffer=N Set JPEG read buffer size. N>1 will not be able to read multiple JPEGS from a stream.
1434 --without-tiff compile without TIFF support
1435 --without-png compile without PNG support
1436 --without-ffmpeg compile without FFMPEG support.
1437 --without-toon Compile without TooN support
1438 --with-x use the X Window System
1439
1440 Some influential environment variables:
1441 CXX C++ compiler command
1442 CXXFLAGS C++ compiler flags
1443 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1444 nonstandard directory <lib dir>
1445 LIBS libraries to pass to the linker, e.g. -l<library>
1446 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1447 you have headers in a nonstandard directory <include dir>
1448 CXXCPP C++ preprocessor
1449 CC C compiler command
1450 CFLAGS C compiler flags
1451 XMKMF Path to xmkmf, Makefile generator for X Window System
1452
1453 Use these variables to override the choices made by `configure' or to help
1454 it to find libraries and programs with nonstandard names/locations.
1455
1456 Report bugs to the package provider.
1457 _ACEOF
1458 ac_status=$?
1459 fi
1460
1461 if test "$ac_init_help" = "recursive"; then
1462 # If there are subdirs, report their specific --help.
1463 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1464 test -d "$ac_dir" ||
1465 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1466 continue
1467 ac_builddir=.
1468
1469 case "$ac_dir" in
1470 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1471 *)
1472 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
1473 # A ".." for each directory in $ac_dir_suffix.
1474 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1475 case $ac_top_builddir_sub in
1476 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1477 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1478 esac ;;
1479 esac
1480 ac_abs_top_builddir=$ac_pwd
1481 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1482 # for backward compatibility:
1483 ac_top_builddir=$ac_top_build_prefix
1484
1485 case $srcdir in
1486 .) # We are building in place.
1487 ac_srcdir=.
1488 ac_top_srcdir=$ac_top_builddir_sub
1489 ac_abs_top_srcdir=$ac_pwd ;;
1490 [\\/]* | ?:[\\/]* ) # Absolute name.
1491 ac_srcdir=$srcdir$ac_dir_suffix;
1492 ac_top_srcdir=$srcdir
1493 ac_abs_top_srcdir=$srcdir ;;
1494 *) # Relative name.
1495 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1496 ac_top_srcdir=$ac_top_build_prefix$srcdir
1497 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1498 esac
1499 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1500
1501 cd "$ac_dir" || { ac_status=$?; continue; }
1502 # Check for configure.gnu first; this name is used for a wrapper for
1503 # Metaconfig's "Configure" on case-insensitive file systems.
1504 if test -f "$ac_srcdir/configure.gnu"; then
1505 echo &&
1506 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1507 elif test -f "$ac_srcdir/configure"; then
1508 echo &&
1509 $SHELL "$ac_srcdir/configure" --help=recursive
1510 else
1511 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1512 fi || ac_status=$?
1513 cd "$ac_pwd" || { ac_status=$?; break; }
1514 done
1515 fi
1516
1517 test -n "$ac_init_help" && exit $ac_status
1518 if $ac_init_version; then
1519 cat <<\_ACEOF
1520 CVD configure 2.1
1521 generated by GNU Autoconf 2.71
1522
1523 Copyright (C) 2021 Free Software Foundation, Inc.
1524 This configure script is free software; the Free Software Foundation
1525 gives unlimited permission to copy, distribute and modify it.
1526
1527 Copyright foo
1528 _ACEOF
1529 exit
1530 fi
1531
1532 ## ------------------------ ##
1533 ## Autoconf initialization. ##
1534 ## ------------------------ ##
1535
1536 # ac_fn_cxx_try_compile LINENO
1537 # ----------------------------
1538 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1539 ac_fn_cxx_try_compile ()
1540 {
1541 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1542 rm -f conftest.$ac_objext conftest.beam
1543 if { { ac_try="$ac_compile"
1544 case "(($ac_try" in
1545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1546 *) ac_try_echo=$ac_try;;
1547 esac
1548 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1549 printf "%s\n" "$ac_try_echo"; } >&5
1550 (eval "$ac_compile") 2>conftest.err
1551 ac_status=$?
1552 if test -s conftest.err; then
1553 grep -v '^ *+' conftest.err >conftest.er1
1554 cat conftest.er1 >&5
1555 mv -f conftest.er1 conftest.err
1556 fi
1557 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1558 test $ac_status = 0; } && {
1559 test -z "$ac_cxx_werror_flag" ||
1560 test ! -s conftest.err
1561 } && test -s conftest.$ac_objext
1562 then :
1563 ac_retval=0
1564 else $as_nop
1565 printf "%s\n" "$as_me: failed program was:" >&5
1566 sed 's/^/| /' conftest.$ac_ext >&5
1567
1568 ac_retval=1
1569 fi
1570 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1571 as_fn_set_status $ac_retval
1572
1573 } # ac_fn_cxx_try_compile
1574
1575 # ac_fn_cxx_try_cpp LINENO
1576 # ------------------------
1577 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1578 ac_fn_cxx_try_cpp ()
1579 {
1580 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1581 if { { ac_try="$ac_cpp conftest.$ac_ext"
1582 case "(($ac_try" in
1583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1584 *) ac_try_echo=$ac_try;;
1585 esac
1586 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1587 printf "%s\n" "$ac_try_echo"; } >&5
1588 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1589 ac_status=$?
1590 if test -s conftest.err; then
1591 grep -v '^ *+' conftest.err >conftest.er1
1592 cat conftest.er1 >&5
1593 mv -f conftest.er1 conftest.err
1594 fi
1595 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1596 test $ac_status = 0; } > conftest.i && {
1597 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
1598 test ! -s conftest.err
1599 }
1600 then :
1601 ac_retval=0
1602 else $as_nop
1603 printf "%s\n" "$as_me: failed program was:" >&5
1604 sed 's/^/| /' conftest.$ac_ext >&5
1605
1606 ac_retval=1
1607 fi
1608 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1609 as_fn_set_status $ac_retval
1610
1611 } # ac_fn_cxx_try_cpp
1612
1613 # ac_fn_cxx_try_link LINENO
1614 # -------------------------
1615 # Try to link conftest.$ac_ext, and return whether this succeeded.
1616 ac_fn_cxx_try_link ()
1617 {
1618 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1619 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
1620 if { { ac_try="$ac_link"
1621 case "(($ac_try" in
1622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1623 *) ac_try_echo=$ac_try;;
1624 esac
1625 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1626 printf "%s\n" "$ac_try_echo"; } >&5
1627 (eval "$ac_link") 2>conftest.err
1628 ac_status=$?
1629 if test -s conftest.err; then
1630 grep -v '^ *+' conftest.err >conftest.er1
1631 cat conftest.er1 >&5
1632 mv -f conftest.er1 conftest.err
1633 fi
1634 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1635 test $ac_status = 0; } && {
1636 test -z "$ac_cxx_werror_flag" ||
1637 test ! -s conftest.err
1638 } && test -s conftest$ac_exeext && {
1639 test "$cross_compiling" = yes ||
1640 test -x conftest$ac_exeext
1641 }
1642 then :
1643 ac_retval=0
1644 else $as_nop
1645 printf "%s\n" "$as_me: failed program was:" >&5
1646 sed 's/^/| /' conftest.$ac_ext >&5
1647
1648 ac_retval=1
1649 fi
1650 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1651 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1652 # interfere with the next link command; also delete a directory that is
1653 # left behind by Apple's compiler. We do this before executing the actions.
1654 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1655 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1656 as_fn_set_status $ac_retval
1657
1658 } # ac_fn_cxx_try_link
1659
1660 # ac_fn_cxx_try_run LINENO
1661 # ------------------------
1662 # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
1663 # executables *can* be run.
1664 ac_fn_cxx_try_run ()
1665 {
1666 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1667 if { { ac_try="$ac_link"
1668 case "(($ac_try" in
1669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1670 *) ac_try_echo=$ac_try;;
1671 esac
1672 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1673 printf "%s\n" "$ac_try_echo"; } >&5
1674 (eval "$ac_link") 2>&5
1675 ac_status=$?
1676 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1677 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1678 { { case "(($ac_try" in
1679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1680 *) ac_try_echo=$ac_try;;
1681 esac
1682 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1683 printf "%s\n" "$ac_try_echo"; } >&5
1684 (eval "$ac_try") 2>&5
1685 ac_status=$?
1686 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1687 test $ac_status = 0; }; }
1688 then :
1689 ac_retval=0
1690 else $as_nop
1691 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
1692 printf "%s\n" "$as_me: failed program was:" >&5
1693 sed 's/^/| /' conftest.$ac_ext >&5
1694
1695 ac_retval=$ac_status
1696 fi
1697 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1698 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1699 as_fn_set_status $ac_retval
1700
1701 } # ac_fn_cxx_try_run
1702
1703 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
1704 # ---------------------------------------------------------
1705 # Tests whether HEADER exists and can be compiled using the include files in
1706 # INCLUDES, setting the cache variable VAR accordingly.
1707 ac_fn_cxx_check_header_compile ()
1708 {
1709 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1710 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1711 printf %s "checking for $2... " >&6; }
1712 if eval test \${$3+y}
1713 then :
1714 printf %s "(cached) " >&6
1715 else $as_nop
1716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1717 /* end confdefs.h. */
1718 $4
1719 #include <$2>
1720 _ACEOF
1721 if ac_fn_cxx_try_compile "$LINENO"
1722 then :
1723 eval "$3=yes"
1724 else $as_nop
1725 eval "$3=no"
1726 fi
1727 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1728 fi
1729 eval ac_res=\$$3
1730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1731 printf "%s\n" "$ac_res" >&6; }
1732 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1733
1734 } # ac_fn_cxx_check_header_compile
1735
1736 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
1737 # ----------------------------------------------
1738 # Tries to find the compile-time value of EXPR in a program that includes
1739 # INCLUDES, setting VAR accordingly. Returns whether the value could be
1740 # computed
1741 ac_fn_cxx_compute_int ()
1742 {
1743 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1744 if test "$cross_compiling" = yes; then
1745 # Depending upon the size, compute the lo and hi bounds.
1746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1747 /* end confdefs.h. */
1748 $4
1749 int
1750 main (void)
1751 {
1752 static int test_array [1 - 2 * !(($2) >= 0)];
1753 test_array [0] = 0;
1754 return test_array [0];
1755
1756 ;
1757 return 0;
1758 }
1759 _ACEOF
1760 if ac_fn_cxx_try_compile "$LINENO"
1761 then :
1762 ac_lo=0 ac_mid=0
1763 while :; do
1764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1765 /* end confdefs.h. */
1766 $4
1767 int
1768 main (void)
1769 {
1770 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1771 test_array [0] = 0;
1772 return test_array [0];
1773
1774 ;
1775 return 0;
1776 }
1777 _ACEOF
1778 if ac_fn_cxx_try_compile "$LINENO"
1779 then :
1780 ac_hi=$ac_mid; break
1781 else $as_nop
1782 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1783 if test $ac_lo -le $ac_mid; then
1784 ac_lo= ac_hi=
1785 break
1786 fi
1787 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
1788 fi
1789 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1790 done
1791 else $as_nop
1792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1793 /* end confdefs.h. */
1794 $4
1795 int
1796 main (void)
1797 {
1798 static int test_array [1 - 2 * !(($2) < 0)];
1799 test_array [0] = 0;
1800 return test_array [0];
1801
1802 ;
1803 return 0;
1804 }
1805 _ACEOF
1806 if ac_fn_cxx_try_compile "$LINENO"
1807 then :
1808 ac_hi=-1 ac_mid=-1
1809 while :; do
1810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1811 /* end confdefs.h. */
1812 $4
1813 int
1814 main (void)
1815 {
1816 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
1817 test_array [0] = 0;
1818 return test_array [0];
1819
1820 ;
1821 return 0;
1822 }
1823 _ACEOF
1824 if ac_fn_cxx_try_compile "$LINENO"
1825 then :
1826 ac_lo=$ac_mid; break
1827 else $as_nop
1828 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1829 if test $ac_mid -le $ac_hi; then
1830 ac_lo= ac_hi=
1831 break
1832 fi
1833 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
1834 fi
1835 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1836 done
1837 else $as_nop
1838 ac_lo= ac_hi=
1839 fi
1840 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1841 fi
1842 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1843 # Binary search between lo and hi bounds.
1844 while test "x$ac_lo" != "x$ac_hi"; do
1845 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1847 /* end confdefs.h. */
1848 $4
1849 int
1850 main (void)
1851 {
1852 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
1853 test_array [0] = 0;
1854 return test_array [0];
1855
1856 ;
1857 return 0;
1858 }
1859 _ACEOF
1860 if ac_fn_cxx_try_compile "$LINENO"
1861 then :
1862 ac_hi=$ac_mid
1863 else $as_nop
1864 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
1865 fi
1866 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
1867 done
1868 case $ac_lo in #((
1869 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
1870 '') ac_retval=1 ;;
1871 esac
1872 else
1873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1874 /* end confdefs.h. */
1875 $4
1876 static long int longval (void) { return $2; }
1877 static unsigned long int ulongval (void) { return $2; }
1878 #include <stdio.h>
1879 #include <stdlib.h>
1880 int
1881 main (void)
1882 {
1883
1884 FILE *f = fopen ("conftest.val", "w");
1885 if (! f)
1886 return 1;
1887 if (($2) < 0)
1888 {
1889 long int i = longval ();
1890 if (i != ($2))
1891 return 1;
1892 fprintf (f, "%ld", i);
1893 }
1894 else
1895 {
1896 unsigned long int i = ulongval ();
1897 if (i != ($2))
1898 return 1;
1899 fprintf (f, "%lu", i);
1900 }
1901 /* Do not output a trailing newline, as this causes \r\n confusion
1902 on some platforms. */
1903 return ferror (f) || fclose (f) != 0;
1904
1905 ;
1906 return 0;
1907 }
1908 _ACEOF
1909 if ac_fn_cxx_try_run "$LINENO"
1910 then :
1911 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
1912 else $as_nop
1913 ac_retval=1
1914 fi
1915 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1916 conftest.$ac_objext conftest.beam conftest.$ac_ext
1917 rm -f conftest.val
1918
1919 fi
1920 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1921 as_fn_set_status $ac_retval
1922
1923 } # ac_fn_cxx_compute_int
1924
1925 # ac_fn_c_try_compile LINENO
1926 # --------------------------
1927 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1928 ac_fn_c_try_compile ()
1929 {
1930 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1931 rm -f conftest.$ac_objext conftest.beam
1932 if { { ac_try="$ac_compile"
1933 case "(($ac_try" in
1934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1935 *) ac_try_echo=$ac_try;;
1936 esac
1937 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1938 printf "%s\n" "$ac_try_echo"; } >&5
1939 (eval "$ac_compile") 2>conftest.err
1940 ac_status=$?
1941 if test -s conftest.err; then
1942 grep -v '^ *+' conftest.err >conftest.er1
1943 cat conftest.er1 >&5
1944 mv -f conftest.er1 conftest.err
1945 fi
1946 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1947 test $ac_status = 0; } && {
1948 test -z "$ac_c_werror_flag" ||
1949 test ! -s conftest.err
1950 } && test -s conftest.$ac_objext
1951 then :
1952 ac_retval=0
1953 else $as_nop
1954 printf "%s\n" "$as_me: failed program was:" >&5
1955 sed 's/^/| /' conftest.$ac_ext >&5
1956
1957 ac_retval=1
1958 fi
1959 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1960 as_fn_set_status $ac_retval
1961
1962 } # ac_fn_c_try_compile
1963
1964 # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
1965 # ------------------------------------------------------------------
1966 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1967 # accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
1968 ac_fn_check_decl ()
1969 {
1970 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1971 as_decl_name=`echo $2|sed 's/ *(.*//'`
1972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1973 printf %s "checking whether $as_decl_name is declared... " >&6; }
1974 if eval test \${$3+y}
1975 then :
1976 printf %s "(cached) " >&6
1977 else $as_nop
1978 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1979 eval ac_save_FLAGS=\$$6
1980 as_fn_append $6 " $5"
1981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1982 /* end confdefs.h. */
1983 $4
1984 int
1985 main (void)
1986 {
1987 #ifndef $as_decl_name
1988 #ifdef __cplusplus
1989 (void) $as_decl_use;
1990 #else
1991 (void) $as_decl_name;
1992 #endif
1993 #endif
1994
1995 ;
1996 return 0;
1997 }
1998 _ACEOF
1999 if ac_fn_cxx_try_compile "$LINENO"
2000 then :
2001 eval "$3=yes"
2002 else $as_nop
2003 eval "$3=no"
2004 fi
2005 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2006 eval $6=\$ac_save_FLAGS
2007
2008 fi
2009 eval ac_res=\$$3
2010 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2011 printf "%s\n" "$ac_res" >&6; }
2012 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2013
2014 } # ac_fn_check_decl
2015 ac_configure_args_raw=
2016 for ac_arg
2017 do
2018 case $ac_arg in
2019 *\'*)
2020 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2021 esac
2022 as_fn_append ac_configure_args_raw " '$ac_arg'"
2023 done
2024
2025 case $ac_configure_args_raw in
2026 *$as_nl*)
2027 ac_safe_unquote= ;;
2028 *)
2029 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
2030 ac_unsafe_a="$ac_unsafe_z#~"
2031 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2032 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2033 esac
2034
2035 cat >config.log <<_ACEOF
2036 This file contains any messages produced by compilers while
2037 running configure, to aid debugging if configure makes a mistake.
2038
2039 It was created by CVD $as_me 2.1, which was
2040 generated by GNU Autoconf 2.71. Invocation command line was
2041
2042 $ $0$ac_configure_args_raw
2043
2044 _ACEOF
2045 exec 5>>config.log
2046 {
2047 cat <<_ASUNAME
2048 ## --------- ##
2049 ## Platform. ##
2050 ## --------- ##
2051
2052 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2053 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2054 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2055 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2056 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2057
2058 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2059 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2060
2061 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2062 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2063 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2064 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2065 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2066 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2067 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2068
2069 _ASUNAME
2070
2071 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2072 for as_dir in $PATH
2073 do
2074 IFS=$as_save_IFS
2075 case $as_dir in #(((
2076 '') as_dir=./ ;;
2077 */) ;;
2078 *) as_dir=$as_dir/ ;;
2079 esac
2080 printf "%s\n" "PATH: $as_dir"
2081 done
2082 IFS=$as_save_IFS
2083
2084 } >&5
2085
2086 cat >&5 <<_ACEOF
2087
2088
2089 ## ----------- ##
2090 ## Core tests. ##
2091 ## ----------- ##
2092
2093 _ACEOF
2094
2095
2096 # Keep a trace of the command line.
2097 # Strip out --no-create and --no-recursion so they do not pile up.
2098 # Strip out --silent because we don't want to record it for future runs.
2099 # Also quote any args containing shell meta-characters.
2100 # Make two passes to allow for proper duplicate-argument suppression.
2101 ac_configure_args=
2102 ac_configure_args0=
2103 ac_configure_args1=
2104 ac_must_keep_next=false
2105 for ac_pass in 1 2
2106 do
2107 for ac_arg
2108 do
2109 case $ac_arg in
2110 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2111 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2112 | -silent | --silent | --silen | --sile | --sil)
2113 continue ;;
2114 *\'*)
2115 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2116 esac
2117 case $ac_pass in
2118 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2119 2)
2120 as_fn_append ac_configure_args1 " '$ac_arg'"
2121 if test $ac_must_keep_next = true; then
2122 ac_must_keep_next=false # Got value, back to normal.
2123 else
2124 case $ac_arg in
2125 *=* | --config-cache | -C | -disable-* | --disable-* \
2126 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2127 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2128 | -with-* | --with-* | -without-* | --without-* | --x)
2129 case "$ac_configure_args0 " in
2130 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2131 esac
2132 ;;
2133 -* ) ac_must_keep_next=true ;;
2134 esac
2135 fi
2136 as_fn_append ac_configure_args " '$ac_arg'"
2137 ;;
2138 esac
2139 done
2140 done
2141 { ac_configure_args0=; unset ac_configure_args0;}
2142 { ac_configure_args1=; unset ac_configure_args1;}
2143
2144 # When interrupted or exit'd, cleanup temporary files, and complete
2145 # config.log. We remove comments because anyway the quotes in there
2146 # would cause problems or look ugly.
2147 # WARNING: Use '\'' to represent an apostrophe within the trap.
2148 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2149 trap 'exit_status=$?
2150 # Sanitize IFS.
2151 IFS=" "" $as_nl"
2152 # Save into config.log some information that might help in debugging.
2153 {
2154 echo
2155
2156 printf "%s\n" "## ---------------- ##
2157 ## Cache variables. ##
2158 ## ---------------- ##"
2159 echo
2160 # The following way of writing the cache mishandles newlines in values,
2161 (
2162 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2163 eval ac_val=\$$ac_var
2164 case $ac_val in #(
2165 *${as_nl}*)
2166 case $ac_var in #(
2167 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2168 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2169 esac
2170 case $ac_var in #(
2171 _ | IFS | as_nl) ;; #(
2172 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2173 *) { eval $ac_var=; unset $ac_var;} ;;
2174 esac ;;
2175 esac
2176 done
2177 (set) 2>&1 |
2178 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2179 *${as_nl}ac_space=\ *)
2180 sed -n \
2181 "s/'\''/'\''\\\\'\'''\''/g;
2182 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2183 ;; #(
2184 *)
2185 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2186 ;;
2187 esac |
2188 sort
2189 )
2190 echo
2191
2192 printf "%s\n" "## ----------------- ##
2193 ## Output variables. ##
2194 ## ----------------- ##"
2195 echo
2196 for ac_var in $ac_subst_vars
2197 do
2198 eval ac_val=\$$ac_var
2199 case $ac_val in
2200 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2201 esac
2202 printf "%s\n" "$ac_var='\''$ac_val'\''"
2203 done | sort
2204 echo
2205
2206 if test -n "$ac_subst_files"; then
2207 printf "%s\n" "## ------------------- ##
2208 ## File substitutions. ##
2209 ## ------------------- ##"
2210 echo
2211 for ac_var in $ac_subst_files
2212 do
2213 eval ac_val=\$$ac_var
2214 case $ac_val in
2215 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2216 esac
2217 printf "%s\n" "$ac_var='\''$ac_val'\''"
2218 done | sort
2219 echo
2220 fi
2221
2222 if test -s confdefs.h; then
2223 printf "%s\n" "## ----------- ##
2224 ## confdefs.h. ##
2225 ## ----------- ##"
2226 echo
2227 cat confdefs.h
2228 echo
2229 fi
2230 test "$ac_signal" != 0 &&
2231 printf "%s\n" "$as_me: caught signal $ac_signal"
2232 printf "%s\n" "$as_me: exit $exit_status"
2233 } >&5
2234 rm -f core *.core core.conftest.* &&
2235 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2236 exit $exit_status
2237 ' 0
2238 for ac_signal in 1 2 13 15; do
2239 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2240 done
2241 ac_signal=0
2242
2243 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2244 rm -f -r conftest* confdefs.h
2245
2246 printf "%s\n" "/* confdefs.h */" > confdefs.h
2247
2248 # Predefined preprocessor variables.
2249
2250 printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
2251
2252 printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
2253
2254 printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
2255
2256 printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
2257
2258 printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
2259
2260 printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
2261
2262
2263 # Let the site file select an alternate cache file if it wants to.
2264 # Prefer an explicitly selected file to automatically selected ones.
2265 if test -n "$CONFIG_SITE"; then
2266 ac_site_files="$CONFIG_SITE"
2267 elif test "x$prefix" != xNONE; then
2268 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
2269 else
2270 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
2271 fi
2272
2273 for ac_site_file in $ac_site_files
2274 do
2275 case $ac_site_file in #(
2276 */*) :
2277 ;; #(
2278 *) :
2279 ac_site_file=./$ac_site_file ;;
2280 esac
2281 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2283 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
2284 sed 's/^/| /' "$ac_site_file" >&5
2285 . "$ac_site_file" \
2286 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2287 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2288 as_fn_error $? "failed to load site script $ac_site_file
2289 See \`config.log' for more details" "$LINENO" 5; }
2290 fi
2291 done
2292
2293 if test -r "$cache_file"; then
2294 # Some versions of bash will fail to source /dev/null (special files
2295 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2296 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2298 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
2299 case $cache_file in
2300 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2301 *) . "./$cache_file";;
2302 esac
2303 fi
2304 else
2305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2306 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
2307 >$cache_file
2308 fi
2309
2310 # Test code for whether the C++ compiler supports C++98 (global declarations)
2311 ac_cxx_conftest_cxx98_globals='
2312 // Does the compiler advertise C++98 conformance?
2313 #if !defined __cplusplus || __cplusplus < 199711L
2314 # error "Compiler does not advertise C++98 conformance"
2315 #endif
2316
2317 // These inclusions are to reject old compilers that
2318 // lack the unsuffixed header files.
2319 #include <cstdlib>
2320 #include <exception>
2321
2322 // <cassert> and <cstring> are *not* freestanding headers in C++98.
2323 extern void assert (int);
2324 namespace std {
2325 extern int strcmp (const char *, const char *);
2326 }
2327
2328 // Namespaces, exceptions, and templates were all added after "C++ 2.0".
2329 using std::exception;
2330 using std::strcmp;
2331
2332 namespace {
2333
2334 void test_exception_syntax()
2335 {
2336 try {
2337 throw "test";
2338 } catch (const char *s) {
2339 // Extra parentheses suppress a warning when building autoconf itself,
2340 // due to lint rules shared with more typical C programs.
2341 assert (!(strcmp) (s, "test"));
2342 }
2343 }
2344
2345 template <typename T> struct test_template
2346 {
2347 T const val;
2348 explicit test_template(T t) : val(t) {}
2349 template <typename U> T add(U u) { return static_cast<T>(u) + val; }
2350 };
2351
2352 } // anonymous namespace
2353 '
2354
2355 # Test code for whether the C++ compiler supports C++98 (body of main)
2356 ac_cxx_conftest_cxx98_main='
2357 assert (argc);
2358 assert (! argv[0]);
2359 {
2360 test_exception_syntax ();
2361 test_template<double> tt (2.0);
2362 assert (tt.add (4) == 6.0);
2363 assert (true && !false);
2364 }
2365 '
2366
2367 # Test code for whether the C++ compiler supports C++11 (global declarations)
2368 ac_cxx_conftest_cxx11_globals='
2369 // Does the compiler advertise C++ 2011 conformance?
2370 #if !defined __cplusplus || __cplusplus < 201103L
2371 # error "Compiler does not advertise C++11 conformance"
2372 #endif
2373
2374 namespace cxx11test
2375 {
2376 constexpr int get_val() { return 20; }
2377
2378 struct testinit
2379 {
2380 int i;
2381 double d;
2382 };
2383
2384 class delegate
2385 {
2386 public:
2387 delegate(int n) : n(n) {}
2388 delegate(): delegate(2354) {}
2389
2390 virtual int getval() { return this->n; };
2391 protected:
2392 int n;
2393 };
2394
2395 class overridden : public delegate
2396 {
2397 public:
2398 overridden(int n): delegate(n) {}
2399 virtual int getval() override final { return this->n * 2; }
2400 };
2401
2402 class nocopy
2403 {
2404 public:
2405 nocopy(int i): i(i) {}
2406 nocopy() = default;
2407 nocopy(const nocopy&) = delete;
2408 nocopy & operator=(const nocopy&) = delete;
2409 private:
2410 int i;
2411 };
2412
2413 // for testing lambda expressions
2414 template <typename Ret, typename Fn> Ret eval(Fn f, Ret v)
2415 {
2416 return f(v);
2417 }
2418
2419 // for testing variadic templates and trailing return types
2420 template <typename V> auto sum(V first) -> V
2421 {
2422 return first;
2423 }
2424 template <typename V, typename... Args> auto sum(V first, Args... rest) -> V
2425 {
2426 return first + sum(rest...);
2427 }
2428 }
2429 '
2430
2431 # Test code for whether the C++ compiler supports C++11 (body of main)
2432 ac_cxx_conftest_cxx11_main='
2433 {
2434 // Test auto and decltype
2435 auto a1 = 6538;
2436 auto a2 = 48573953.4;
2437 auto a3 = "String literal";
2438
2439 int total = 0;
2440 for (auto i = a3; *i; ++i) { total += *i; }
2441
2442 decltype(a2) a4 = 34895.034;
2443 }
2444 {
2445 // Test constexpr
2446 short sa[cxx11test::get_val()] = { 0 };
2447 }
2448 {
2449 // Test initializer lists
2450 cxx11test::testinit il = { 4323, 435234.23544 };
2451 }
2452 {
2453 // Test range-based for
2454 int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3,
2455 14, 19, 17, 8, 6, 20, 16, 2, 11, 1};
2456 for (auto &x : array) { x += 23; }
2457 }
2458 {
2459 // Test lambda expressions
2460 using cxx11test::eval;
2461 assert (eval ([](int x) { return x*2; }, 21) == 42);
2462 double d = 2.0;
2463 assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0);
2464 assert (d == 5.0);
2465 assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0);
2466 assert (d == 5.0);
2467 }
2468 {
2469 // Test use of variadic templates
2470 using cxx11test::sum;
2471 auto a = sum(1);
2472 auto b = sum(1, 2);
2473 auto c = sum(1.0, 2.0, 3.0);
2474 }
2475 {
2476 // Test constructor delegation
2477 cxx11test::delegate d1;
2478 cxx11test::delegate d2();
2479 cxx11test::delegate d3(45);
2480 }
2481 {
2482 // Test override and final
2483 cxx11test::overridden o1(55464);
2484 }
2485 {
2486 // Test nullptr
2487 char *c = nullptr;
2488 }
2489 {
2490 // Test template brackets
2491 test_template<::test_template<int>> v(test_template<int>(12));
2492 }
2493 {
2494 // Unicode literals
2495 char const *utf8 = u8"UTF-8 string \u2500";
2496 char16_t const *utf16 = u"UTF-8 string \u2500";
2497 char32_t const *utf32 = U"UTF-32 string \u2500";
2498 }
2499 '
2500
2501 # Test code for whether the C compiler supports C++11 (complete).
2502 ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals}
2503 ${ac_cxx_conftest_cxx11_globals}
2504
2505 int
2506 main (int argc, char **argv)
2507 {
2508 int ok = 0;
2509 ${ac_cxx_conftest_cxx98_main}
2510 ${ac_cxx_conftest_cxx11_main}
2511 return ok;
2512 }
2513 "
2514
2515 # Test code for whether the C compiler supports C++98 (complete).
2516 ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals}
2517 int
2518 main (int argc, char **argv)
2519 {
2520 int ok = 0;
2521 ${ac_cxx_conftest_cxx98_main}
2522 return ok;
2523 }
2524 "
2525
2526 as_fn_append ac_header_cxx_list " stdio.h stdio_h HAVE_STDIO_H"
2527 as_fn_append ac_header_cxx_list " stdlib.h stdlib_h HAVE_STDLIB_H"
2528 as_fn_append ac_header_cxx_list " string.h string_h HAVE_STRING_H"
2529 as_fn_append ac_header_cxx_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
2530 as_fn_append ac_header_cxx_list " stdint.h stdint_h HAVE_STDINT_H"
2531 as_fn_append ac_header_cxx_list " strings.h strings_h HAVE_STRINGS_H"
2532 as_fn_append ac_header_cxx_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
2533 as_fn_append ac_header_cxx_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
2534 as_fn_append ac_header_cxx_list " unistd.h unistd_h HAVE_UNISTD_H"
2535 # Test code for whether the C compiler supports C89 (global declarations)
2536 ac_c_conftest_c89_globals='
2537 /* Does the compiler advertise C89 conformance?
2538 Do not test the value of __STDC__, because some compilers set it to 0
2539 while being otherwise adequately conformant. */
2540 #if !defined __STDC__
2541 # error "Compiler does not advertise C89 conformance"
2542 #endif
2543
2544 #include <stddef.h>
2545 #include <stdarg.h>
2546 struct stat;
2547 /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
2548 struct buf { int x; };
2549 struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2550 static char *e (p, i)
2551 char **p;
2552 int i;
2553 {
2554 return p[i];
2555 }
2556 static char *f (char * (*g) (char **, int), char **p, ...)
2557 {
2558 char *s;
2559 va_list v;
2560 va_start (v,p);
2561 s = g (p, va_arg (v,int));
2562 va_end (v);
2563 return s;
2564 }
2565
2566 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2567 function prototypes and stuff, but not \xHH hex character constants.
2568 These do not provoke an error unfortunately, instead are silently treated
2569 as an "x". The following induces an error, until -std is added to get
2570 proper ANSI mode. Curiously \x00 != x always comes out true, for an
2571 array size at least. It is necessary to write \x00 == 0 to get something
2572 that is true only with -std. */
2573 int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2574
2575 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2576 inside strings and character constants. */
2577 #define FOO(x) '\''x'\''
2578 int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
2579
2580 int test (int i, double x);
2581 struct s1 {int (*f) (int a);};
2582 struct s2 {int (*f) (double a);};
2583 int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2584 int, int);'
2585
2586 # Test code for whether the C compiler supports C89 (body of main).
2587 ac_c_conftest_c89_main='
2588 ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2589 '
2590
2591 # Test code for whether the C compiler supports C99 (global declarations)
2592 ac_c_conftest_c99_globals='
2593 // Does the compiler advertise C99 conformance?
2594 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2595 # error "Compiler does not advertise C99 conformance"
2596 #endif
2597
2598 #include <stdbool.h>
2599 extern int puts (const char *);
2600 extern int printf (const char *, ...);
2601 extern int dprintf (int, const char *, ...);
2602 extern void *malloc (size_t);
2603
2604 // Check varargs macros. These examples are taken from C99 6.10.3.5.
2605 // dprintf is used instead of fprintf to avoid needing to declare
2606 // FILE and stderr.
2607 #define debug(...) dprintf (2, __VA_ARGS__)
2608 #define showlist(...) puts (#__VA_ARGS__)
2609 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2610 static void
2611 test_varargs_macros (void)
2612 {
2613 int x = 1234;
2614 int y = 5678;
2615 debug ("Flag");
2616 debug ("X = %d\n", x);
2617 showlist (The first, second, and third items.);
2618 report (x>y, "x is %d but y is %d", x, y);
2619 }
2620
2621 // Check long long types.
2622 #define BIG64 18446744073709551615ull
2623 #define BIG32 4294967295ul
2624 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2625 #if !BIG_OK
2626 #error "your preprocessor is broken"
2627 #endif
2628 #if BIG_OK
2629 #else
2630 #error "your preprocessor is broken"
2631 #endif
2632 static long long int bignum = -9223372036854775807LL;
2633 static unsigned long long int ubignum = BIG64;
2634
2635 struct incomplete_array
2636 {
2637 int datasize;
2638 double data[];
2639 };
2640
2641 struct named_init {
2642 int number;
2643 const wchar_t *name;
2644 double average;
2645 };
2646
2647 typedef const char *ccp;
2648
2649 static inline int
2650 test_restrict (ccp restrict text)
2651 {
2652 // See if C++-style comments work.
2653 // Iterate through items via the restricted pointer.
2654 // Also check for declarations in for loops.
2655 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
2656 continue;
2657 return 0;
2658 }
2659
2660 // Check varargs and va_copy.
2661 static bool
2662 test_varargs (const char *format, ...)
2663 {
2664 va_list args;
2665 va_start (args, format);
2666 va_list args_copy;
2667 va_copy (args_copy, args);
2668
2669 const char *str = "";
2670 int number = 0;
2671 float fnumber = 0;
2672
2673 while (*format)
2674 {
2675 switch (*format++)
2676 {
2677 case '\''s'\'': // string
2678 str = va_arg (args_copy, const char *);
2679 break;
2680 case '\''d'\'': // int
2681 number = va_arg (args_copy, int);
2682 break;
2683 case '\''f'\'': // float
2684 fnumber = va_arg (args_copy, double);
2685 break;
2686 default:
2687 break;
2688 }
2689 }
2690 va_end (args_copy);
2691 va_end (args);
2692
2693 return *str && number && fnumber;
2694 }
2695 '
2696
2697 # Test code for whether the C compiler supports C99 (body of main).
2698 ac_c_conftest_c99_main='
2699 // Check bool.
2700 _Bool success = false;
2701 success |= (argc != 0);
2702
2703 // Check restrict.
2704 if (test_restrict ("String literal") == 0)
2705 success = true;
2706 char *restrict newvar = "Another string";
2707
2708 // Check varargs.
2709 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
2710 test_varargs_macros ();
2711
2712 // Check flexible array members.
2713 struct incomplete_array *ia =
2714 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2715 ia->datasize = 10;
2716 for (int i = 0; i < ia->datasize; ++i)
2717 ia->data[i] = i * 1.234;
2718
2719 // Check named initializers.
2720 struct named_init ni = {
2721 .number = 34,
2722 .name = L"Test wide string",
2723 .average = 543.34343,
2724 };
2725
2726 ni.number = 58;
2727
2728 int dynamic_array[ni.number];
2729 dynamic_array[0] = argv[0][0];
2730 dynamic_array[ni.number - 1] = 543;
2731
2732 // work around unused variable warnings
2733 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
2734 || dynamic_array[ni.number - 1] != 543);
2735 '
2736
2737 # Test code for whether the C compiler supports C11 (global declarations)
2738 ac_c_conftest_c11_globals='
2739 // Does the compiler advertise C11 conformance?
2740 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
2741 # error "Compiler does not advertise C11 conformance"
2742 #endif
2743
2744 // Check _Alignas.
2745 char _Alignas (double) aligned_as_double;
2746 char _Alignas (0) no_special_alignment;
2747 extern char aligned_as_int;
2748 char _Alignas (0) _Alignas (int) aligned_as_int;
2749
2750 // Check _Alignof.
2751 enum
2752 {
2753 int_alignment = _Alignof (int),
2754 int_array_alignment = _Alignof (int[100]),
2755 char_alignment = _Alignof (char)
2756 };
2757 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
2758
2759 // Check _Noreturn.
2760 int _Noreturn does_not_return (void) { for (;;) continue; }
2761
2762 // Check _Static_assert.
2763 struct test_static_assert
2764 {
2765 int x;
2766 _Static_assert (sizeof (int) <= sizeof (long int),
2767 "_Static_assert does not work in struct");
2768 long int y;
2769 };
2770
2771 // Check UTF-8 literals.
2772 #define u8 syntax error!
2773 char const utf8_literal[] = u8"happens to be ASCII" "another string";
2774
2775 // Check duplicate typedefs.
2776 typedef long *long_ptr;
2777 typedef long int *long_ptr;
2778 typedef long_ptr long_ptr;
2779
2780 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
2781 struct anonymous
2782 {
2783 union {
2784 struct { int i; int j; };
2785 struct { int k; long int l; } w;
2786 };
2787 int m;
2788 } v1;
2789 '
2790
2791 # Test code for whether the C compiler supports C11 (body of main).
2792 ac_c_conftest_c11_main='
2793 _Static_assert ((offsetof (struct anonymous, i)
2794 == offsetof (struct anonymous, w.k)),
2795 "Anonymous union alignment botch");
2796 v1.i = 2;
2797 v1.w.k = 5;
2798 ok |= v1.i != 5;
2799 '
2800
2801 # Test code for whether the C compiler supports C11 (complete).
2802 ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
2803 ${ac_c_conftest_c99_globals}
2804 ${ac_c_conftest_c11_globals}
2805
2806 int
2807 main (int argc, char **argv)
2808 {
2809 int ok = 0;
2810 ${ac_c_conftest_c89_main}
2811 ${ac_c_conftest_c99_main}
2812 ${ac_c_conftest_c11_main}
2813 return ok;
2814 }
2815 "
2816
2817 # Test code for whether the C compiler supports C99 (complete).
2818 ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
2819 ${ac_c_conftest_c99_globals}
2820
2821 int
2822 main (int argc, char **argv)
2823 {
2824 int ok = 0;
2825 ${ac_c_conftest_c89_main}
2826 ${ac_c_conftest_c99_main}
2827 return ok;
2828 }
2829 "
2830
2831 # Test code for whether the C compiler supports C89 (complete).
2832 ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
2833
2834 int
2835 main (int argc, char **argv)
2836 {
2837 int ok = 0;
2838 ${ac_c_conftest_c89_main}
2839 return ok;
2840 }
2841 "
2842
2843
2844 # Auxiliary files required by this configure script.
2845 ac_aux_files="config.guess config.sub install-sh"
2846
2847 # Locations in which to look for auxiliary files.
2848 ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.."
2849
2850 # Search for a directory containing all of the required auxiliary files,
2851 # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
2852 # If we don't find one directory that contains all the files we need,
2853 # we report the set of missing files from the *first* directory in
2854 # $ac_aux_dir_candidates and give up.
2855 ac_missing_aux_files=""
2856 ac_first_candidate=:
2857 printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
2858 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2859 as_found=false
2860 for as_dir in $ac_aux_dir_candidates
2861 do
2862 IFS=$as_save_IFS
2863 case $as_dir in #(((
2864 '') as_dir=./ ;;
2865 */) ;;
2866 *) as_dir=$as_dir/ ;;
2867 esac
2868 as_found=:
2869
2870 printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
2871 ac_aux_dir_found=yes
2872 ac_install_sh=
2873 for ac_aux in $ac_aux_files
2874 do
2875 # As a special case, if "install-sh" is required, that requirement
2876 # can be satisfied by any of "install-sh", "install.sh", or "shtool",
2877 # and $ac_install_sh is set appropriately for whichever one is found.
2878 if test x"$ac_aux" = x"install-sh"
2879 then
2880 if test -f "${as_dir}install-sh"; then
2881 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
2882 ac_install_sh="${as_dir}install-sh -c"
2883 elif test -f "${as_dir}install.sh"; then
2884 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
2885 ac_install_sh="${as_dir}install.sh -c"
2886 elif test -f "${as_dir}shtool"; then
2887 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
2888 ac_install_sh="${as_dir}shtool install -c"
2889 else
2890 ac_aux_dir_found=no
2891 if $ac_first_candidate; then
2892 ac_missing_aux_files="${ac_missing_aux_files} install-sh"
2893 else
2894 break
2895 fi
2896 fi
2897 else
2898 if test -f "${as_dir}${ac_aux}"; then
2899 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
2900 else
2901 ac_aux_dir_found=no
2902 if $ac_first_candidate; then
2903 ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
2904 else
2905 break
2906 fi
2907 fi
2908 fi
2909 done
2910 if test "$ac_aux_dir_found" = yes; then
2911 ac_aux_dir="$as_dir"
2912 break
2913 fi
2914 ac_first_candidate=false
2915
2916 as_found=false
2917 done
2918 IFS=$as_save_IFS
2919 if $as_found
2920 then :
2921
2922 else $as_nop
2923 as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
2924 fi
2925
2926
2927 # These three variables are undocumented and unsupported,
2928 # and are intended to be withdrawn in a future Autoconf release.
2929 # They can cause serious problems if a builder's source tree is in a directory
2930 # whose full name contains unusual characters.
2931 if test -f "${ac_aux_dir}config.guess"; then
2932 ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
2933 fi
2934 if test -f "${ac_aux_dir}config.sub"; then
2935 ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
2936 fi
2937 if test -f "$ac_aux_dir/configure"; then
2938 ac_configure="$SHELL ${ac_aux_dir}configure"
2939 fi
2940
2941 # Check that the precious variables saved in the cache have kept the same
2942 # value.
2943 ac_cache_corrupted=false
2944 for ac_var in $ac_precious_vars; do
2945 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2946 eval ac_new_set=\$ac_env_${ac_var}_set
2947 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2948 eval ac_new_val=\$ac_env_${ac_var}_value
2949 case $ac_old_set,$ac_new_set in
2950 set,)
2951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2952 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2953 ac_cache_corrupted=: ;;
2954 ,set)
2955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2956 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2957 ac_cache_corrupted=: ;;
2958 ,);;
2959 *)
2960 if test "x$ac_old_val" != "x$ac_new_val"; then
2961 # differences in whitespace do not lead to failure.
2962 ac_old_val_w=`echo x $ac_old_val`
2963 ac_new_val_w=`echo x $ac_new_val`
2964 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2965 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2966 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2967 ac_cache_corrupted=:
2968 else
2969 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2970 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2971 eval $ac_var=\$ac_old_val
2972 fi
2973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2974 printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
2975 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2976 printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
2977 fi;;
2978 esac
2979 # Pass precious variables to config.status.
2980 if test "$ac_new_set" = set; then
2981 case $ac_new_val in
2982 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2983 *) ac_arg=$ac_var=$ac_new_val ;;
2984 esac
2985 case " $ac_configure_args " in
2986 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2987 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2988 esac
2989 fi
2990 done
2991 if $ac_cache_corrupted; then
2992 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2993 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2994 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2995 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
2996 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
2997 and start over" "$LINENO" 5
2998 fi
2999 ## -------------------- ##
3000 ## Main body of script. ##
3001 ## -------------------- ##
3002
3003 ac_ext=c
3004 ac_cpp='$CPP $CPPFLAGS'
3005 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3006 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3007 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3008
3009
3010
3011
3012 # ===========================================================================
3013 # https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html
3014 # ===========================================================================
3015 #
3016 # SYNOPSIS
3017 #
3018 # AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
3019 #
3020 # DESCRIPTION
3021 #
3022 # Check for baseline language coverage in the compiler for the specified
3023 # version of the C++ standard. If necessary, add switches to CXX and
3024 # CXXCPP to enable support. VERSION may be '11' (for the C++11 standard)
3025 # or '14' (for the C++14 standard).
3026 #
3027 # The second argument, if specified, indicates whether you insist on an
3028 # extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g.
3029 # -std=c++11). If neither is specified, you get whatever works, with
3030 # preference for no added switch, and then for an extended mode.
3031 #
3032 # The third argument, if specified 'mandatory' or if left unspecified,
3033 # indicates that baseline support for the specified C++ standard is
3034 # required and that the macro should error out if no mode with that
3035 # support is found. If specified 'optional', then configuration proceeds
3036 # regardless, after defining HAVE_CXX${VERSION} if and only if a
3037 # supporting mode is found.
3038 #
3039 # LICENSE
3040 #
3041 # Copyright (c) 2008 Benjamin Kosnik <[email protected]>
3042 # Copyright (c) 2012 Zack Weinberg <[email protected]>
3043 # Copyright (c) 2013 Roy Stogner <[email protected]>
3044 # Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <[email protected]>
3045 # Copyright (c) 2015 Paul Norman <[email protected]>
3046 # Copyright (c) 2015 Moritz Klammler <[email protected]>
3047 # Copyright (c) 2016, 2018 Krzesimir Nowak <[email protected]>
3048 # Copyright (c) 2019 Enji Cooper <[email protected]>
3049 # Copyright (c) 2020 Jason Merrill <[email protected]>
3050 #
3051 # Copying and distribution of this file, with or without modification, are
3052 # permitted in any medium without royalty provided the copyright notice
3053 # and this notice are preserved. This file is offered as-is, without any
3054 # warranty.
3055
3056 #serial 12
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083 ac_config_headers="$ac_config_headers "
3084
3085
3086 for ac_prog in gawk mawk nawk awk
3087 do
3088 # Extract the first word of "$ac_prog", so it can be a program name with args.
3089 set dummy $ac_prog; ac_word=$2
3090 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3091 printf %s "checking for $ac_word... " >&6; }
3092 if test ${ac_cv_prog_AWK+y}
3093 then :
3094 printf %s "(cached) " >&6
3095 else $as_nop
3096 if test -n "$AWK"; then
3097 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3098 else
3099 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3100 for as_dir in $PATH
3101 do
3102 IFS=$as_save_IFS
3103 case $as_dir in #(((
3104 '') as_dir=./ ;;
3105 */) ;;
3106 *) as_dir=$as_dir/ ;;
3107 esac
3108 for ac_exec_ext in '' $ac_executable_extensions; do
3109 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3110 ac_cv_prog_AWK="$ac_prog"
3111 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3112 break 2
3113 fi
3114 done
3115 done
3116 IFS=$as_save_IFS
3117
3118 fi
3119 fi
3120 AWK=$ac_cv_prog_AWK
3121 if test -n "$AWK"; then
3122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3123 printf "%s\n" "$AWK" >&6; }
3124 else
3125 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3126 printf "%s\n" "no" >&6; }
3127 fi
3128
3129
3130 test -n "$AWK" && break
3131 done
3132
3133
3134
3135
3136
3137
3138
3139 ac_ext=cpp
3140 ac_cpp='$CXXCPP $CPPFLAGS'
3141 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3142 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3143 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3144 if test -z "$CXX"; then
3145 if test -n "$CCC"; then
3146 CXX=$CCC
3147 else
3148 if test -n "$ac_tool_prefix"; then
3149 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
3150 do
3151 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3152 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3154 printf %s "checking for $ac_word... " >&6; }
3155 if test ${ac_cv_prog_CXX+y}
3156 then :
3157 printf %s "(cached) " >&6
3158 else $as_nop
3159 if test -n "$CXX"; then
3160 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3161 else
3162 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3163 for as_dir in $PATH
3164 do
3165 IFS=$as_save_IFS
3166 case $as_dir in #(((
3167 '') as_dir=./ ;;
3168 */) ;;
3169 *) as_dir=$as_dir/ ;;
3170 esac
3171 for ac_exec_ext in '' $ac_executable_extensions; do
3172 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3173 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3174 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3175 break 2
3176 fi
3177 done
3178 done
3179 IFS=$as_save_IFS
3180
3181 fi
3182 fi
3183 CXX=$ac_cv_prog_CXX
3184 if test -n "$CXX"; then
3185 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3186 printf "%s\n" "$CXX" >&6; }
3187 else
3188 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3189 printf "%s\n" "no" >&6; }
3190 fi
3191
3192
3193 test -n "$CXX" && break
3194 done
3195 fi
3196 if test -z "$CXX"; then
3197 ac_ct_CXX=$CXX
3198 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++
3199 do
3200 # Extract the first word of "$ac_prog", so it can be a program name with args.
3201 set dummy $ac_prog; ac_word=$2
3202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3203 printf %s "checking for $ac_word... " >&6; }
3204 if test ${ac_cv_prog_ac_ct_CXX+y}
3205 then :
3206 printf %s "(cached) " >&6
3207 else $as_nop
3208 if test -n "$ac_ct_CXX"; then
3209 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3210 else
3211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3212 for as_dir in $PATH
3213 do
3214 IFS=$as_save_IFS
3215 case $as_dir in #(((
3216 '') as_dir=./ ;;
3217 */) ;;
3218 *) as_dir=$as_dir/ ;;
3219 esac
3220 for ac_exec_ext in '' $ac_executable_extensions; do
3221 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3222 ac_cv_prog_ac_ct_CXX="$ac_prog"
3223 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3224 break 2
3225 fi
3226 done
3227 done
3228 IFS=$as_save_IFS
3229
3230 fi
3231 fi
3232 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3233 if test -n "$ac_ct_CXX"; then
3234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3235 printf "%s\n" "$ac_ct_CXX" >&6; }
3236 else
3237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3238 printf "%s\n" "no" >&6; }
3239 fi
3240
3241
3242 test -n "$ac_ct_CXX" && break
3243 done
3244
3245 if test "x$ac_ct_CXX" = x; then
3246 CXX="g++"
3247 else
3248 case $cross_compiling:$ac_tool_warned in
3249 yes:)
3250 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3251 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3252 ac_tool_warned=yes ;;
3253 esac
3254 CXX=$ac_ct_CXX
3255 fi
3256 fi
3257
3258 fi
3259 fi
3260 # Provide some information about the compiler.
3261 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3262 set X $ac_compile
3263 ac_compiler=$2
3264 for ac_option in --version -v -V -qversion; do
3265 { { ac_try="$ac_compiler $ac_option >&5"
3266 case "(($ac_try" in
3267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3268 *) ac_try_echo=$ac_try;;
3269 esac
3270 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3271 printf "%s\n" "$ac_try_echo"; } >&5
3272 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3273 ac_status=$?
3274 if test -s conftest.err; then
3275 sed '10a\
3276 ... rest of stderr output deleted ...
3277 10q' conftest.err >conftest.er1
3278 cat conftest.er1 >&5
3279 fi
3280 rm -f conftest.er1 conftest.err
3281 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3282 test $ac_status = 0; }
3283 done
3284
3285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3286 /* end confdefs.h. */
3287
3288 int
3289 main (void)
3290 {
3291
3292 ;
3293 return 0;
3294 }
3295 _ACEOF
3296 ac_clean_files_save=$ac_clean_files
3297 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3298 # Try to create an executable without -o first, disregard a.out.
3299 # It will help us diagnose broken compilers, and finding out an intuition
3300 # of exeext.
3301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5
3302 printf %s "checking whether the C++ compiler works... " >&6; }
3303 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3304
3305 # The possible output files:
3306 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3307
3308 ac_rmfiles=
3309 for ac_file in $ac_files
3310 do
3311 case $ac_file in
3312 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3313 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3314 esac
3315 done
3316 rm -f $ac_rmfiles
3317
3318 if { { ac_try="$ac_link_default"
3319 case "(($ac_try" in
3320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3321 *) ac_try_echo=$ac_try;;
3322 esac
3323 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3324 printf "%s\n" "$ac_try_echo"; } >&5
3325 (eval "$ac_link_default") 2>&5
3326 ac_status=$?
3327 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3328 test $ac_status = 0; }
3329 then :
3330 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3331 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3332 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3333 # so that the user can short-circuit this test for compilers unknown to
3334 # Autoconf.
3335 for ac_file in $ac_files ''
3336 do
3337 test -f "$ac_file" || continue
3338 case $ac_file in
3339 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3340 ;;
3341 [ab].out )
3342 # We found the default executable, but exeext='' is most
3343 # certainly right.
3344 break;;
3345 *.* )
3346 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
3347 then :; else
3348 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3349 fi
3350 # We set ac_cv_exeext here because the later test for it is not
3351 # safe: cross compilers may not add the suffix if given an `-o'
3352 # argument, so we may need to know it at that point already.
3353 # Even if this section looks crufty: it has the advantage of
3354 # actually working.
3355 break;;
3356 * )
3357 break;;
3358 esac
3359 done
3360 test "$ac_cv_exeext" = no && ac_cv_exeext=
3361
3362 else $as_nop
3363 ac_file=''
3364 fi
3365 if test -z "$ac_file"
3366 then :
3367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3368 printf "%s\n" "no" >&6; }
3369 printf "%s\n" "$as_me: failed program was:" >&5
3370 sed 's/^/| /' conftest.$ac_ext >&5
3371
3372 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3373 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3374 as_fn_error 77 "C++ compiler cannot create executables
3375 See \`config.log' for more details" "$LINENO" 5; }
3376 else $as_nop
3377 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3378 printf "%s\n" "yes" >&6; }
3379 fi
3380 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5
3381 printf %s "checking for C++ compiler default output file name... " >&6; }
3382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3383 printf "%s\n" "$ac_file" >&6; }
3384 ac_exeext=$ac_cv_exeext
3385
3386 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3387 ac_clean_files=$ac_clean_files_save
3388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3389 printf %s "checking for suffix of executables... " >&6; }
3390 if { { ac_try="$ac_link"
3391 case "(($ac_try" in
3392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3393 *) ac_try_echo=$ac_try;;
3394 esac
3395 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3396 printf "%s\n" "$ac_try_echo"; } >&5
3397 (eval "$ac_link") 2>&5
3398 ac_status=$?
3399 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3400 test $ac_status = 0; }
3401 then :
3402 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3403 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3404 # work properly (i.e., refer to `conftest.exe'), while it won't with
3405 # `rm'.
3406 for ac_file in conftest.exe conftest conftest.*; do
3407 test -f "$ac_file" || continue
3408 case $ac_file in
3409 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3410 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3411 break;;
3412 * ) break;;
3413 esac
3414 done
3415 else $as_nop
3416 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3417 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3418 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3419 See \`config.log' for more details" "$LINENO" 5; }
3420 fi
3421 rm -f conftest conftest$ac_cv_exeext
3422 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3423 printf "%s\n" "$ac_cv_exeext" >&6; }
3424
3425 rm -f conftest.$ac_ext
3426 EXEEXT=$ac_cv_exeext
3427 ac_exeext=$EXEEXT
3428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3429 /* end confdefs.h. */
3430 #include <stdio.h>
3431 int
3432 main (void)
3433 {
3434 FILE *f = fopen ("conftest.out", "w");
3435 return ferror (f) || fclose (f) != 0;
3436
3437 ;
3438 return 0;
3439 }
3440 _ACEOF
3441 ac_clean_files="$ac_clean_files conftest.out"
3442 # Check that the compiler produces executables we can run. If not, either
3443 # the compiler is broken, or we cross compile.
3444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3445 printf %s "checking whether we are cross compiling... " >&6; }
3446 if test "$cross_compiling" != yes; then
3447 { { ac_try="$ac_link"
3448 case "(($ac_try" in
3449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3450 *) ac_try_echo=$ac_try;;
3451 esac
3452 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3453 printf "%s\n" "$ac_try_echo"; } >&5
3454 (eval "$ac_link") 2>&5
3455 ac_status=$?
3456 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3457 test $ac_status = 0; }
3458 if { ac_try='./conftest$ac_cv_exeext'
3459 { { case "(($ac_try" in
3460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3461 *) ac_try_echo=$ac_try;;
3462 esac
3463 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3464 printf "%s\n" "$ac_try_echo"; } >&5
3465 (eval "$ac_try") 2>&5
3466 ac_status=$?
3467 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3468 test $ac_status = 0; }; }; then
3469 cross_compiling=no
3470 else
3471 if test "$cross_compiling" = maybe; then
3472 cross_compiling=yes
3473 else
3474 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3475 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3476 as_fn_error 77 "cannot run C++ compiled programs.
3477 If you meant to cross compile, use \`--host'.
3478 See \`config.log' for more details" "$LINENO" 5; }
3479 fi
3480 fi
3481 fi
3482 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3483 printf "%s\n" "$cross_compiling" >&6; }
3484
3485 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3486 ac_clean_files=$ac_clean_files_save
3487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3488 printf %s "checking for suffix of object files... " >&6; }
3489 if test ${ac_cv_objext+y}
3490 then :
3491 printf %s "(cached) " >&6
3492 else $as_nop
3493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3494 /* end confdefs.h. */
3495
3496 int
3497 main (void)
3498 {
3499
3500 ;
3501 return 0;
3502 }
3503 _ACEOF
3504 rm -f conftest.o conftest.obj
3505 if { { ac_try="$ac_compile"
3506 case "(($ac_try" in
3507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3508 *) ac_try_echo=$ac_try;;
3509 esac
3510 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3511 printf "%s\n" "$ac_try_echo"; } >&5
3512 (eval "$ac_compile") 2>&5
3513 ac_status=$?
3514 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3515 test $ac_status = 0; }
3516 then :
3517 for ac_file in conftest.o conftest.obj conftest.*; do
3518 test -f "$ac_file" || continue;
3519 case $ac_file in
3520 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3521 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3522 break;;
3523 esac
3524 done
3525 else $as_nop
3526 printf "%s\n" "$as_me: failed program was:" >&5
3527 sed 's/^/| /' conftest.$ac_ext >&5
3528
3529 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3530 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3531 as_fn_error $? "cannot compute suffix of object files: cannot compile
3532 See \`config.log' for more details" "$LINENO" 5; }
3533 fi
3534 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3535 fi
3536 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3537 printf "%s\n" "$ac_cv_objext" >&6; }
3538 OBJEXT=$ac_cv_objext
3539 ac_objext=$OBJEXT
3540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5
3541 printf %s "checking whether the compiler supports GNU C++... " >&6; }
3542 if test ${ac_cv_cxx_compiler_gnu+y}
3543 then :
3544 printf %s "(cached) " >&6
3545 else $as_nop
3546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3547 /* end confdefs.h. */
3548
3549 int
3550 main (void)
3551 {
3552 #ifndef __GNUC__
3553 choke me
3554 #endif
3555
3556 ;
3557 return 0;
3558 }
3559 _ACEOF
3560 if ac_fn_cxx_try_compile "$LINENO"
3561 then :
3562 ac_compiler_gnu=yes
3563 else $as_nop
3564 ac_compiler_gnu=no
3565 fi
3566 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3567 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3568
3569 fi
3570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3571 printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; }
3572 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3573
3574 if test $ac_compiler_gnu = yes; then
3575 GXX=yes
3576 else
3577 GXX=
3578 fi
3579 ac_test_CXXFLAGS=${CXXFLAGS+y}
3580 ac_save_CXXFLAGS=$CXXFLAGS
3581 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3582 printf %s "checking whether $CXX accepts -g... " >&6; }
3583 if test ${ac_cv_prog_cxx_g+y}
3584 then :
3585 printf %s "(cached) " >&6
3586 else $as_nop
3587 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3588 ac_cxx_werror_flag=yes
3589 ac_cv_prog_cxx_g=no
3590 CXXFLAGS="-g"
3591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3592 /* end confdefs.h. */
3593
3594 int
3595 main (void)
3596 {
3597
3598 ;
3599 return 0;
3600 }
3601 _ACEOF
3602 if ac_fn_cxx_try_compile "$LINENO"
3603 then :
3604 ac_cv_prog_cxx_g=yes
3605 else $as_nop
3606 CXXFLAGS=""
3607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3608 /* end confdefs.h. */
3609
3610 int
3611 main (void)
3612 {
3613
3614 ;
3615 return 0;
3616 }
3617 _ACEOF
3618 if ac_fn_cxx_try_compile "$LINENO"
3619 then :
3620
3621 else $as_nop
3622 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3623 CXXFLAGS="-g"
3624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3625 /* end confdefs.h. */
3626
3627 int
3628 main (void)
3629 {
3630
3631 ;
3632 return 0;
3633 }
3634 _ACEOF
3635 if ac_fn_cxx_try_compile "$LINENO"
3636 then :
3637 ac_cv_prog_cxx_g=yes
3638 fi
3639 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3640 fi
3641 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3642 fi
3643 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
3644 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3645 fi
3646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3647 printf "%s\n" "$ac_cv_prog_cxx_g" >&6; }
3648 if test $ac_test_CXXFLAGS; then
3649 CXXFLAGS=$ac_save_CXXFLAGS
3650 elif test $ac_cv_prog_cxx_g = yes; then
3651 if test "$GXX" = yes; then
3652 CXXFLAGS="-g -O2"
3653 else
3654 CXXFLAGS="-g"
3655 fi
3656 else
3657 if test "$GXX" = yes; then
3658 CXXFLAGS="-O2"
3659 else
3660 CXXFLAGS=
3661 fi
3662 fi
3663 ac_prog_cxx_stdcxx=no
3664 if test x$ac_prog_cxx_stdcxx = xno
3665 then :
3666 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
3667 printf %s "checking for $CXX option to enable C++11 features... " >&6; }
3668 if test ${ac_cv_prog_cxx_11+y}
3669 then :
3670 printf %s "(cached) " >&6
3671 else $as_nop
3672 ac_cv_prog_cxx_11=no
3673 ac_save_CXX=$CXX
3674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3675 /* end confdefs.h. */
3676 $ac_cxx_conftest_cxx11_program
3677 _ACEOF
3678 for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA
3679 do
3680 CXX="$ac_save_CXX $ac_arg"
3681 if ac_fn_cxx_try_compile "$LINENO"
3682 then :
3683 ac_cv_prog_cxx_cxx11=$ac_arg
3684 fi
3685 rm -f core conftest.err conftest.$ac_objext conftest.beam
3686 test "x$ac_cv_prog_cxx_cxx11" != "xno" && break
3687 done
3688 rm -f conftest.$ac_ext
3689 CXX=$ac_save_CXX
3690 fi
3691
3692 if test "x$ac_cv_prog_cxx_cxx11" = xno
3693 then :
3694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3695 printf "%s\n" "unsupported" >&6; }
3696 else $as_nop
3697 if test "x$ac_cv_prog_cxx_cxx11" = x
3698 then :
3699 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3700 printf "%s\n" "none needed" >&6; }
3701 else $as_nop
3702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5
3703 printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; }
3704 CXX="$CXX $ac_cv_prog_cxx_cxx11"
3705 fi
3706 ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11
3707 ac_prog_cxx_stdcxx=cxx11
3708 fi
3709 fi
3710 if test x$ac_prog_cxx_stdcxx = xno
3711 then :
3712 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
3713 printf %s "checking for $CXX option to enable C++98 features... " >&6; }
3714 if test ${ac_cv_prog_cxx_98+y}
3715 then :
3716 printf %s "(cached) " >&6
3717 else $as_nop
3718 ac_cv_prog_cxx_98=no
3719 ac_save_CXX=$CXX
3720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3721 /* end confdefs.h. */
3722 $ac_cxx_conftest_cxx98_program
3723 _ACEOF
3724 for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA
3725 do
3726 CXX="$ac_save_CXX $ac_arg"
3727 if ac_fn_cxx_try_compile "$LINENO"
3728 then :
3729 ac_cv_prog_cxx_cxx98=$ac_arg
3730 fi
3731 rm -f core conftest.err conftest.$ac_objext conftest.beam
3732 test "x$ac_cv_prog_cxx_cxx98" != "xno" && break
3733 done
3734 rm -f conftest.$ac_ext
3735 CXX=$ac_save_CXX
3736 fi
3737
3738 if test "x$ac_cv_prog_cxx_cxx98" = xno
3739 then :
3740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3741 printf "%s\n" "unsupported" >&6; }
3742 else $as_nop
3743 if test "x$ac_cv_prog_cxx_cxx98" = x
3744 then :
3745 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3746 printf "%s\n" "none needed" >&6; }
3747 else $as_nop
3748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5
3749 printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; }
3750 CXX="$CXX $ac_cv_prog_cxx_cxx98"
3751 fi
3752 ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98
3753 ac_prog_cxx_stdcxx=cxx98
3754 fi
3755 fi
3756
3757 ac_ext=c
3758 ac_cpp='$CPP $CPPFLAGS'
3759 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3760 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3761 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3762
3763
3764 ax_cxx_compile_alternatives="17 1z" ax_cxx_compile_cxx17_required=true
3765 ac_ext=cpp
3766 ac_cpp='$CXXCPP $CPPFLAGS'
3767 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3768 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3769 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3770 ac_success=no
3771
3772 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features by default" >&5
3773 printf %s "checking whether $CXX supports C++17 features by default... " >&6; }
3774 if test ${ax_cv_cxx_compile_cxx17+y}
3775 then :
3776 printf %s "(cached) " >&6
3777 else $as_nop
3778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3779 /* end confdefs.h. */
3780
3781
3782 // If the compiler admits that it is not ready for C++11, why torture it?
3783 // Hopefully, this will speed up the test.
3784
3785 #ifndef __cplusplus
3786
3787 #error "This is not a C++ compiler"
3788
3789 #elif __cplusplus < 201103L
3790
3791 #error "This is not a C++11 compiler"
3792
3793 #else
3794
3795 namespace cxx11
3796 {
3797
3798 namespace test_static_assert
3799 {
3800
3801 template <typename T>
3802 struct check
3803 {
3804 static_assert(sizeof(int) <= sizeof(T), "not big enough");
3805 };
3806
3807 }
3808
3809 namespace test_final_override
3810 {
3811
3812 struct Base
3813 {
3814 virtual ~Base() {}
3815 virtual void f() {}
3816 };
3817
3818 struct Derived : public Base
3819 {
3820 virtual ~Derived() override {}
3821 virtual void f() override {}
3822 };
3823
3824 }
3825
3826 namespace test_double_right_angle_brackets
3827 {
3828
3829 template < typename T >
3830 struct check {};
3831
3832 typedef check<void> single_type;
3833 typedef check<check<void>> double_type;
3834 typedef check<check<check<void>>> triple_type;
3835 typedef check<check<check<check<void>>>> quadruple_type;
3836
3837 }
3838
3839 namespace test_decltype
3840 {
3841
3842 int
3843 f()
3844 {
3845 int a = 1;
3846 decltype(a) b = 2;
3847 return a + b;
3848 }
3849
3850 }
3851
3852 namespace test_type_deduction
3853 {
3854
3855 template < typename T1, typename T2 >
3856 struct is_same
3857 {
3858 static const bool value = false;
3859 };
3860
3861 template < typename T >
3862 struct is_same<T, T>
3863 {
3864 static const bool value = true;
3865 };
3866
3867 template < typename T1, typename T2 >
3868 auto
3869 add(T1 a1, T2 a2) -> decltype(a1 + a2)
3870 {
3871 return a1 + a2;
3872 }
3873
3874 int
3875 test(const int c, volatile int v)
3876 {
3877 static_assert(is_same<int, decltype(0)>::value == true, "");
3878 static_assert(is_same<int, decltype(c)>::value == false, "");
3879 static_assert(is_same<int, decltype(v)>::value == false, "");
3880 auto ac = c;
3881 auto av = v;
3882 auto sumi = ac + av + 'x';
3883 auto sumf = ac + av + 1.0;
3884 static_assert(is_same<int, decltype(ac)>::value == true, "");
3885 static_assert(is_same<int, decltype(av)>::value == true, "");
3886 static_assert(is_same<int, decltype(sumi)>::value == true, "");
3887 static_assert(is_same<int, decltype(sumf)>::value == false, "");
3888 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
3889 return (sumf > 0.0) ? sumi : add(c, v);
3890 }
3891
3892 }
3893
3894 namespace test_noexcept
3895 {
3896
3897 int f() { return 0; }
3898 int g() noexcept { return 0; }
3899
3900 static_assert(noexcept(f()) == false, "");
3901 static_assert(noexcept(g()) == true, "");
3902
3903 }
3904
3905 namespace test_constexpr
3906 {
3907
3908 template < typename CharT >
3909 unsigned long constexpr
3910 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
3911 {
3912 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
3913 }
3914
3915 template < typename CharT >
3916 unsigned long constexpr
3917 strlen_c(const CharT *const s) noexcept
3918 {
3919 return strlen_c_r(s, 0UL);
3920 }
3921
3922 static_assert(strlen_c("") == 0UL, "");
3923 static_assert(strlen_c("1") == 1UL, "");
3924 static_assert(strlen_c("example") == 7UL, "");
3925 static_assert(strlen_c("another\0example") == 7UL, "");
3926
3927 }
3928
3929 namespace test_rvalue_references
3930 {
3931
3932 template < int N >
3933 struct answer
3934 {
3935 static constexpr int value = N;
3936 };
3937
3938 answer<1> f(int&) { return answer<1>(); }
3939 answer<2> f(const int&) { return answer<2>(); }
3940 answer<3> f(int&&) { return answer<3>(); }
3941
3942 void
3943 test()
3944 {
3945 int i = 0;
3946 const int c = 0;
3947 static_assert(decltype(f(i))::value == 1, "");
3948 static_assert(decltype(f(c))::value == 2, "");
3949 static_assert(decltype(f(0))::value == 3, "");
3950 }
3951
3952 }
3953
3954 namespace test_uniform_initialization
3955 {
3956
3957 struct test
3958 {
3959 static const int zero {};
3960 static const int one {1};
3961 };
3962
3963 static_assert(test::zero == 0, "");
3964 static_assert(test::one == 1, "");
3965
3966 }
3967
3968 namespace test_lambdas
3969 {
3970
3971 void
3972 test1()
3973 {
3974 auto lambda1 = [](){};
3975 auto lambda2 = lambda1;
3976 lambda1();
3977 lambda2();
3978 }
3979
3980 int
3981 test2()
3982 {
3983 auto a = [](int i, int j){ return i + j; }(1, 2);
3984 auto b = []() -> int { return '0'; }();
3985 auto c = [=](){ return a + b; }();
3986 auto d = [&](){ return c; }();
3987 auto e = [a, &b](int x) mutable {
3988 const auto identity = [](int y){ return y; };
3989 for (auto i = 0; i < a; ++i)
3990 a += b--;
3991 return x + identity(a + b);
3992 }(0);
3993 return a + b + c + d + e;
3994 }
3995
3996 int
3997 test3()
3998 {
3999 const auto nullary = [](){ return 0; };
4000 const auto unary = [](int x){ return x; };
4001 using nullary_t = decltype(nullary);
4002 using unary_t = decltype(unary);
4003 const auto higher1st = [](nullary_t f){ return f(); };
4004 const auto higher2nd = [unary](nullary_t f1){
4005 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
4006 };
4007 return higher1st(nullary) + higher2nd(nullary)(unary);
4008 }
4009
4010 }
4011
4012 namespace test_variadic_templates
4013 {
4014
4015 template <int...>
4016 struct sum;
4017
4018 template <int N0, int... N1toN>
4019 struct sum<N0, N1toN...>
4020 {
4021 static constexpr auto value = N0 + sum<N1toN...>::value;
4022 };
4023
4024 template <>
4025 struct sum<>
4026 {
4027 static constexpr auto value = 0;
4028 };
4029
4030 static_assert(sum<>::value == 0, "");
4031 static_assert(sum<1>::value == 1, "");
4032 static_assert(sum<23>::value == 23, "");
4033 static_assert(sum<1, 2>::value == 3, "");
4034 static_assert(sum<5, 5, 11>::value == 21, "");
4035 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
4036
4037 }
4038
4039 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
4040 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
4041 // because of this.
4042 namespace test_template_alias_sfinae
4043 {
4044
4045 struct foo {};
4046
4047 template<typename T>
4048 using member = typename T::member_type;
4049
4050 template<typename T>
4051 void func(...) {}
4052
4053 template<typename T>
4054 void func(member<T>*) {}
4055
4056 void test();
4057
4058 void test() { func<foo>(0); }
4059
4060 }
4061
4062 } // namespace cxx11
4063
4064 #endif // __cplusplus >= 201103L
4065
4066
4067
4068
4069 // If the compiler admits that it is not ready for C++14, why torture it?
4070 // Hopefully, this will speed up the test.
4071
4072 #ifndef __cplusplus
4073
4074 #error "This is not a C++ compiler"
4075
4076 #elif __cplusplus < 201402L
4077
4078 #error "This is not a C++14 compiler"
4079
4080 #else
4081
4082 namespace cxx14
4083 {
4084
4085 namespace test_polymorphic_lambdas
4086 {
4087
4088 int
4089 test()
4090 {
4091 const auto lambda = [](auto&&... args){
4092 const auto istiny = [](auto x){
4093 return (sizeof(x) == 1UL) ? 1 : 0;
4094 };
4095 const int aretiny[] = { istiny(args)... };
4096 return aretiny[0];
4097 };
4098 return lambda(1, 1L, 1.0f, '1');
4099 }
4100
4101 }
4102
4103 namespace test_binary_literals
4104 {
4105
4106 constexpr auto ivii = 0b0000000000101010;
4107 static_assert(ivii == 42, "wrong value");
4108
4109 }
4110
4111 namespace test_generalized_constexpr
4112 {
4113
4114 template < typename CharT >
4115 constexpr unsigned long
4116 strlen_c(const CharT *const s) noexcept
4117 {
4118 auto length = 0UL;
4119 for (auto p = s; *p; ++p)
4120 ++length;
4121 return length;
4122 }
4123
4124 static_assert(strlen_c("") == 0UL, "");
4125 static_assert(strlen_c("x") == 1UL, "");
4126 static_assert(strlen_c("test") == 4UL, "");
4127 static_assert(strlen_c("another\0test") == 7UL, "");
4128
4129 }
4130
4131 namespace test_lambda_init_capture
4132 {
4133
4134 int
4135 test()
4136 {
4137 auto x = 0;
4138 const auto lambda1 = [a = x](int b){ return a + b; };
4139 const auto lambda2 = [a = lambda1(x)](){ return a; };
4140 return lambda2();
4141 }
4142
4143 }
4144
4145 namespace test_digit_separators
4146 {
4147
4148 constexpr auto ten_million = 100'000'000;
4149 static_assert(ten_million == 100000000, "");
4150
4151 }
4152
4153 namespace test_return_type_deduction
4154 {
4155
4156 auto f(int& x) { return x; }
4157 decltype(auto) g(int& x) { return x; }
4158
4159 template < typename T1, typename T2 >
4160 struct is_same
4161 {
4162 static constexpr auto value = false;
4163 };
4164
4165 template < typename T >
4166 struct is_same<T, T>
4167 {
4168 static constexpr auto value = true;
4169 };
4170
4171 int
4172 test()
4173 {
4174 auto x = 0;
4175 static_assert(is_same<int, decltype(f(x))>::value, "");
4176 static_assert(is_same<int&, decltype(g(x))>::value, "");
4177 return x;
4178 }
4179
4180 }
4181
4182 } // namespace cxx14
4183
4184 #endif // __cplusplus >= 201402L
4185
4186
4187
4188
4189 // If the compiler admits that it is not ready for C++17, why torture it?
4190 // Hopefully, this will speed up the test.
4191
4192 #ifndef __cplusplus
4193
4194 #error "This is not a C++ compiler"
4195
4196 #elif __cplusplus < 201703L
4197
4198 #error "This is not a C++17 compiler"
4199
4200 #else
4201
4202 #include <initializer_list>
4203 #include <utility>
4204 #include <type_traits>
4205
4206 namespace cxx17
4207 {
4208
4209 namespace test_constexpr_lambdas
4210 {
4211
4212 constexpr int foo = [](){return 42;}();
4213
4214 }
4215
4216 namespace test::nested_namespace::definitions
4217 {
4218
4219 }
4220
4221 namespace test_fold_expression
4222 {
4223
4224 template<typename... Args>
4225 int multiply(Args... args)
4226 {
4227 return (args * ... * 1);
4228 }
4229
4230 template<typename... Args>
4231 bool all(Args... args)
4232 {
4233 return (args && ...);
4234 }
4235
4236 }
4237
4238 namespace test_extended_static_assert
4239 {
4240
4241 static_assert (true);
4242
4243 }
4244
4245 namespace test_auto_brace_init_list
4246 {
4247
4248 auto foo = {5};
4249 auto bar {5};
4250
4251 static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
4252 static_assert(std::is_same<int, decltype(bar)>::value);
4253 }
4254
4255 namespace test_typename_in_template_template_parameter
4256 {
4257
4258 template<template<typename> typename X> struct D;
4259
4260 }
4261
4262 namespace test_fallthrough_nodiscard_maybe_unused_attributes
4263 {
4264
4265 int f1()
4266 {
4267 return 42;
4268 }
4269
4270 [[nodiscard]] int f2()
4271 {
4272 [[maybe_unused]] auto unused = f1();
4273
4274 switch (f1())
4275 {
4276 case 17:
4277 f1();
4278 [[fallthrough]];
4279 case 42:
4280 f1();
4281 }
4282 return f1();
4283 }
4284
4285 }
4286
4287 namespace test_extended_aggregate_initialization
4288 {
4289
4290 struct base1
4291 {
4292 int b1, b2 = 42;
4293 };
4294
4295 struct base2
4296 {
4297 base2() {
4298 b3 = 42;
4299 }
4300 int b3;
4301 };
4302
4303 struct derived : base1, base2
4304 {
4305 int d;
4306 };
4307
4308 derived d1 {{1, 2}, {}, 4}; // full initialization
4309 derived d2 {{}, {}, 4}; // value-initialized bases
4310
4311 }
4312
4313 namespace test_general_range_based_for_loop
4314 {
4315
4316 struct iter
4317 {
4318 int i;
4319
4320 int& operator* ()
4321 {
4322 return i;
4323 }
4324
4325 const int& operator* () const
4326 {
4327 return i;
4328 }
4329
4330 iter& operator++()
4331 {
4332 ++i;
4333 return *this;
4334 }
4335 };
4336
4337 struct sentinel
4338 {
4339 int i;
4340 };
4341
4342 bool operator== (const iter& i, const sentinel& s)
4343 {
4344 return i.i == s.i;
4345 }
4346
4347 bool operator!= (const iter& i, const sentinel& s)
4348 {
4349 return !(i == s);
4350 }
4351
4352 struct range
4353 {
4354 iter begin() const
4355 {
4356 return {0};
4357 }
4358
4359 sentinel end() const
4360 {
4361 return {5};
4362 }
4363 };
4364
4365 void f()
4366 {
4367 range r {};
4368
4369 for (auto i : r)
4370 {
4371 [[maybe_unused]] auto v = i;
4372 }
4373 }
4374
4375 }
4376
4377 namespace test_lambda_capture_asterisk_this_by_value
4378 {
4379
4380 struct t
4381 {
4382 int i;
4383 int foo()
4384 {
4385 return [*this]()
4386 {
4387 return i;
4388 }();
4389 }
4390 };
4391
4392 }
4393
4394 namespace test_enum_class_construction
4395 {
4396
4397 enum class byte : unsigned char
4398 {};
4399
4400 byte foo {42};
4401
4402 }
4403
4404 namespace test_constexpr_if
4405 {
4406
4407 template <bool cond>
4408 int f ()
4409 {
4410 if constexpr(cond)
4411 {
4412 return 13;
4413 }
4414 else
4415 {
4416 return 42;
4417 }
4418 }
4419
4420 }
4421
4422 namespace test_selection_statement_with_initializer
4423 {
4424
4425 int f()
4426 {
4427 return 13;
4428 }
4429
4430 int f2()
4431 {
4432 if (auto i = f(); i > 0)
4433 {
4434 return 3;
4435 }
4436
4437 switch (auto i = f(); i + 4)
4438 {
4439 case 17:
4440 return 2;
4441
4442 default:
4443 return 1;
4444 }
4445 }
4446
4447 }
4448
4449 namespace test_template_argument_deduction_for_class_templates
4450 {
4451
4452 template <typename T1, typename T2>
4453 struct pair
4454 {
4455 pair (T1 p1, T2 p2)
4456 : m1 {p1},
4457 m2 {p2}
4458 {}
4459
4460 T1 m1;
4461 T2 m2;
4462 };
4463
4464 void f()
4465 {
4466 [[maybe_unused]] auto p = pair{13, 42u};
4467 }
4468
4469 }
4470
4471 namespace test_non_type_auto_template_parameters
4472 {
4473
4474 template <auto n>
4475 struct B
4476 {};
4477
4478 B<5> b1;
4479 B<'a'> b2;
4480
4481 }
4482
4483 namespace test_structured_bindings
4484 {
4485
4486 int arr[2] = { 1, 2 };
4487 std::pair<int, int> pr = { 1, 2 };
4488
4489 auto f1() -> int(&)[2]
4490 {
4491 return arr;
4492 }
4493
4494 auto f2() -> std::pair<int, int>&
4495 {
4496 return pr;
4497 }
4498
4499 struct S
4500 {
4501 int x1 : 2;
4502 volatile double y1;
4503 };
4504
4505 S f3()
4506 {
4507 return {};
4508 }
4509
4510 auto [ x1, y1 ] = f1();
4511 auto& [ xr1, yr1 ] = f1();
4512 auto [ x2, y2 ] = f2();
4513 auto& [ xr2, yr2 ] = f2();
4514 const auto [ x3, y3 ] = f3();
4515
4516 }
4517
4518 namespace test_exception_spec_type_system
4519 {
4520
4521 struct Good {};
4522 struct Bad {};
4523
4524 void g1() noexcept;
4525 void g2();
4526
4527 template<typename T>
4528 Bad
4529 f(T*, T*);
4530
4531 template<typename T1, typename T2>
4532 Good
4533 f(T1*, T2*);
4534
4535 static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
4536
4537 }
4538
4539 namespace test_inline_variables
4540 {
4541
4542 template<class T> void f(T)
4543 {}
4544
4545 template<class T> inline T g(T)
4546 {
4547 return T{};
4548 }
4549
4550 template<> inline void f<>(int)
4551 {}
4552
4553 template<> int g<>(int)
4554 {
4555 return 5;
4556 }
4557
4558 }
4559
4560 } // namespace cxx17
4561
4562 #endif // __cplusplus < 201703L
4563
4564
4565
4566 _ACEOF
4567 if ac_fn_cxx_try_compile "$LINENO"
4568 then :
4569 ax_cv_cxx_compile_cxx17=yes
4570 else $as_nop
4571 ax_cv_cxx_compile_cxx17=no
4572 fi
4573 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
4574 fi
4575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx17" >&5
4576 printf "%s\n" "$ax_cv_cxx_compile_cxx17" >&6; }
4577 if test x$ax_cv_cxx_compile_cxx17 = xyes; then
4578 ac_success=yes
4579 fi
4580
4581 if test x$ac_success = xno; then
4582 for alternative in ${ax_cxx_compile_alternatives}; do
4583 switch="-std=gnu++${alternative}"
4584 cachevar=`printf "%s\n" "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh`
4585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5
4586 printf %s "checking whether $CXX supports C++17 features with $switch... " >&6; }
4587 if eval test \${$cachevar+y}
4588 then :
4589 printf %s "(cached) " >&6
4590 else $as_nop
4591 ac_save_CXX="$CXX"
4592 CXX="$CXX $switch"
4593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4594 /* end confdefs.h. */
4595
4596
4597 // If the compiler admits that it is not ready for C++11, why torture it?
4598 // Hopefully, this will speed up the test.
4599
4600 #ifndef __cplusplus
4601
4602 #error "This is not a C++ compiler"
4603
4604 #elif __cplusplus < 201103L
4605
4606 #error "This is not a C++11 compiler"
4607
4608 #else
4609
4610 namespace cxx11
4611 {
4612
4613 namespace test_static_assert
4614 {
4615
4616 template <typename T>
4617 struct check
4618 {
4619 static_assert(sizeof(int) <= sizeof(T), "not big enough");
4620 };
4621
4622 }
4623
4624 namespace test_final_override
4625 {
4626
4627 struct Base
4628 {
4629 virtual ~Base() {}
4630 virtual void f() {}
4631 };
4632
4633 struct Derived : public Base
4634 {
4635 virtual ~Derived() override {}
4636 virtual void f() override {}
4637 };
4638
4639 }
4640
4641 namespace test_double_right_angle_brackets
4642 {
4643
4644 template < typename T >
4645 struct check {};
4646
4647 typedef check<void> single_type;
4648 typedef check<check<void>> double_type;
4649 typedef check<check<check<void>>> triple_type;
4650 typedef check<check<check<check<void>>>> quadruple_type;
4651
4652 }
4653
4654 namespace test_decltype
4655 {
4656
4657 int
4658 f()
4659 {
4660 int a = 1;
4661 decltype(a) b = 2;
4662 return a + b;
4663 }
4664
4665 }
4666
4667 namespace test_type_deduction
4668 {
4669
4670 template < typename T1, typename T2 >
4671 struct is_same
4672 {
4673 static const bool value = false;
4674 };
4675
4676 template < typename T >
4677 struct is_same<T, T>
4678 {
4679 static const bool value = true;
4680 };
4681
4682 template < typename T1, typename T2 >
4683 auto
4684 add(T1 a1, T2 a2) -> decltype(a1 + a2)
4685 {
4686 return a1 + a2;
4687 }
4688
4689 int
4690 test(const int c, volatile int v)
4691 {
4692 static_assert(is_same<int, decltype(0)>::value == true, "");
4693 static_assert(is_same<int, decltype(c)>::value == false, "");
4694 static_assert(is_same<int, decltype(v)>::value == false, "");
4695 auto ac = c;
4696 auto av = v;
4697 auto sumi = ac + av + 'x';
4698 auto sumf = ac + av + 1.0;
4699 static_assert(is_same<int, decltype(ac)>::value == true, "");
4700 static_assert(is_same<int, decltype(av)>::value == true, "");
4701 static_assert(is_same<int, decltype(sumi)>::value == true, "");
4702 static_assert(is_same<int, decltype(sumf)>::value == false, "");
4703 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
4704 return (sumf > 0.0) ? sumi : add(c, v);
4705 }
4706
4707 }
4708
4709 namespace test_noexcept
4710 {
4711
4712 int f() { return 0; }
4713 int g() noexcept { return 0; }
4714
4715 static_assert(noexcept(f()) == false, "");
4716 static_assert(noexcept(g()) == true, "");
4717
4718 }
4719
4720 namespace test_constexpr
4721 {
4722
4723 template < typename CharT >
4724 unsigned long constexpr
4725 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
4726 {
4727 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
4728 }
4729
4730 template < typename CharT >
4731 unsigned long constexpr
4732 strlen_c(const CharT *const s) noexcept
4733 {
4734 return strlen_c_r(s, 0UL);
4735 }
4736
4737 static_assert(strlen_c("") == 0UL, "");
4738 static_assert(strlen_c("1") == 1UL, "");
4739 static_assert(strlen_c("example") == 7UL, "");
4740 static_assert(strlen_c("another\0example") == 7UL, "");
4741
4742 }
4743
4744 namespace test_rvalue_references
4745 {
4746
4747 template < int N >
4748 struct answer
4749 {
4750 static constexpr int value = N;
4751 };
4752
4753 answer<1> f(int&) { return answer<1>(); }
4754 answer<2> f(const int&) { return answer<2>(); }
4755 answer<3> f(int&&) { return answer<3>(); }
4756
4757 void
4758 test()
4759 {
4760 int i = 0;
4761 const int c = 0;
4762 static_assert(decltype(f(i))::value == 1, "");
4763 static_assert(decltype(f(c))::value == 2, "");
4764 static_assert(decltype(f(0))::value == 3, "");
4765 }
4766
4767 }
4768
4769 namespace test_uniform_initialization
4770 {
4771
4772 struct test
4773 {
4774 static const int zero {};
4775 static const int one {1};
4776 };
4777
4778 static_assert(test::zero == 0, "");
4779 static_assert(test::one == 1, "");
4780
4781 }
4782
4783 namespace test_lambdas
4784 {
4785
4786 void
4787 test1()
4788 {
4789 auto lambda1 = [](){};
4790 auto lambda2 = lambda1;
4791 lambda1();
4792 lambda2();
4793 }
4794
4795 int
4796 test2()
4797 {
4798 auto a = [](int i, int j){ return i + j; }(1, 2);
4799 auto b = []() -> int { return '0'; }();
4800 auto c = [=](){ return a + b; }();
4801 auto d = [&](){ return c; }();
4802 auto e = [a, &b](int x) mutable {
4803 const auto identity = [](int y){ return y; };
4804 for (auto i = 0; i < a; ++i)
4805 a += b--;
4806 return x + identity(a + b);
4807 }(0);
4808 return a + b + c + d + e;
4809 }
4810
4811 int
4812 test3()
4813 {
4814 const auto nullary = [](){ return 0; };
4815 const auto unary = [](int x){ return x; };
4816 using nullary_t = decltype(nullary);
4817 using unary_t = decltype(unary);
4818 const auto higher1st = [](nullary_t f){ return f(); };
4819 const auto higher2nd = [unary](nullary_t f1){
4820 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
4821 };
4822 return higher1st(nullary) + higher2nd(nullary)(unary);
4823 }
4824
4825 }
4826
4827 namespace test_variadic_templates
4828 {
4829
4830 template <int...>
4831 struct sum;
4832
4833 template <int N0, int... N1toN>
4834 struct sum<N0, N1toN...>
4835 {
4836 static constexpr auto value = N0 + sum<N1toN...>::value;
4837 };
4838
4839 template <>
4840 struct sum<>
4841 {
4842 static constexpr auto value = 0;
4843 };
4844
4845 static_assert(sum<>::value == 0, "");
4846 static_assert(sum<1>::value == 1, "");
4847 static_assert(sum<23>::value == 23, "");
4848 static_assert(sum<1, 2>::value == 3, "");
4849 static_assert(sum<5, 5, 11>::value == 21, "");
4850 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
4851
4852 }
4853
4854 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
4855 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
4856 // because of this.
4857 namespace test_template_alias_sfinae
4858 {
4859
4860 struct foo {};
4861
4862 template<typename T>
4863 using member = typename T::member_type;
4864
4865 template<typename T>
4866 void func(...) {}
4867
4868 template<typename T>
4869 void func(member<T>*) {}
4870
4871 void test();
4872
4873 void test() { func<foo>(0); }
4874
4875 }
4876
4877 } // namespace cxx11
4878
4879 #endif // __cplusplus >= 201103L
4880
4881
4882
4883
4884 // If the compiler admits that it is not ready for C++14, why torture it?
4885 // Hopefully, this will speed up the test.
4886
4887 #ifndef __cplusplus
4888
4889 #error "This is not a C++ compiler"
4890
4891 #elif __cplusplus < 201402L
4892
4893 #error "This is not a C++14 compiler"
4894
4895 #else
4896
4897 namespace cxx14
4898 {
4899
4900 namespace test_polymorphic_lambdas
4901 {
4902
4903 int
4904 test()
4905 {
4906 const auto lambda = [](auto&&... args){
4907 const auto istiny = [](auto x){
4908 return (sizeof(x) == 1UL) ? 1 : 0;
4909 };
4910 const int aretiny[] = { istiny(args)... };
4911 return aretiny[0];
4912 };
4913 return lambda(1, 1L, 1.0f, '1');
4914 }
4915
4916 }
4917
4918 namespace test_binary_literals
4919 {
4920
4921 constexpr auto ivii = 0b0000000000101010;
4922 static_assert(ivii == 42, "wrong value");
4923
4924 }
4925
4926 namespace test_generalized_constexpr
4927 {
4928
4929 template < typename CharT >
4930 constexpr unsigned long
4931 strlen_c(const CharT *const s) noexcept
4932 {
4933 auto length = 0UL;
4934 for (auto p = s; *p; ++p)
4935 ++length;
4936 return length;
4937 }
4938
4939 static_assert(strlen_c("") == 0UL, "");
4940 static_assert(strlen_c("x") == 1UL, "");
4941 static_assert(strlen_c("test") == 4UL, "");
4942 static_assert(strlen_c("another\0test") == 7UL, "");
4943
4944 }
4945
4946 namespace test_lambda_init_capture
4947 {
4948
4949 int
4950 test()
4951 {
4952 auto x = 0;
4953 const auto lambda1 = [a = x](int b){ return a + b; };
4954 const auto lambda2 = [a = lambda1(x)](){ return a; };
4955 return lambda2();
4956 }
4957
4958 }
4959
4960 namespace test_digit_separators
4961 {
4962
4963 constexpr auto ten_million = 100'000'000;
4964 static_assert(ten_million == 100000000, "");
4965
4966 }
4967
4968 namespace test_return_type_deduction
4969 {
4970
4971 auto f(int& x) { return x; }
4972 decltype(auto) g(int& x) { return x; }
4973
4974 template < typename T1, typename T2 >
4975 struct is_same
4976 {
4977 static constexpr auto value = false;
4978 };
4979
4980 template < typename T >
4981 struct is_same<T, T>
4982 {
4983 static constexpr auto value = true;
4984 };
4985
4986 int
4987 test()
4988 {
4989 auto x = 0;
4990 static_assert(is_same<int, decltype(f(x))>::value, "");
4991 static_assert(is_same<int&, decltype(g(x))>::value, "");
4992 return x;
4993 }
4994
4995 }
4996
4997 } // namespace cxx14
4998
4999 #endif // __cplusplus >= 201402L
5000
5001
5002
5003
5004 // If the compiler admits that it is not ready for C++17, why torture it?
5005 // Hopefully, this will speed up the test.
5006
5007 #ifndef __cplusplus
5008
5009 #error "This is not a C++ compiler"
5010
5011 #elif __cplusplus < 201703L
5012
5013 #error "This is not a C++17 compiler"
5014
5015 #else
5016
5017 #include <initializer_list>
5018 #include <utility>
5019 #include <type_traits>
5020
5021 namespace cxx17
5022 {
5023
5024 namespace test_constexpr_lambdas
5025 {
5026
5027 constexpr int foo = [](){return 42;}();
5028
5029 }
5030
5031 namespace test::nested_namespace::definitions
5032 {
5033
5034 }
5035
5036 namespace test_fold_expression
5037 {
5038
5039 template<typename... Args>
5040 int multiply(Args... args)
5041 {
5042 return (args * ... * 1);
5043 }
5044
5045 template<typename... Args>
5046 bool all(Args... args)
5047 {
5048 return (args && ...);
5049 }
5050
5051 }
5052
5053 namespace test_extended_static_assert
5054 {
5055
5056 static_assert (true);
5057
5058 }
5059
5060 namespace test_auto_brace_init_list
5061 {
5062
5063 auto foo = {5};
5064 auto bar {5};
5065
5066 static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
5067 static_assert(std::is_same<int, decltype(bar)>::value);
5068 }
5069
5070 namespace test_typename_in_template_template_parameter
5071 {
5072
5073 template<template<typename> typename X> struct D;
5074
5075 }
5076
5077 namespace test_fallthrough_nodiscard_maybe_unused_attributes
5078 {
5079
5080 int f1()
5081 {
5082 return 42;
5083 }
5084
5085 [[nodiscard]] int f2()
5086 {
5087 [[maybe_unused]] auto unused = f1();
5088
5089 switch (f1())
5090 {
5091 case 17:
5092 f1();
5093 [[fallthrough]];
5094 case 42:
5095 f1();
5096 }
5097 return f1();
5098 }
5099
5100 }
5101
5102 namespace test_extended_aggregate_initialization
5103 {
5104
5105 struct base1
5106 {
5107 int b1, b2 = 42;
5108 };
5109
5110 struct base2
5111 {
5112 base2() {
5113 b3 = 42;
5114 }
5115 int b3;
5116 };
5117
5118 struct derived : base1, base2
5119 {
5120 int d;
5121 };
5122
5123 derived d1 {{1, 2}, {}, 4}; // full initialization
5124 derived d2 {{}, {}, 4}; // value-initialized bases
5125
5126 }
5127
5128 namespace test_general_range_based_for_loop
5129 {
5130
5131 struct iter
5132 {
5133 int i;
5134
5135 int& operator* ()
5136 {
5137 return i;
5138 }
5139
5140 const int& operator* () const
5141 {
5142 return i;
5143 }
5144
5145 iter& operator++()
5146 {
5147 ++i;
5148 return *this;
5149 }
5150 };
5151
5152 struct sentinel
5153 {
5154 int i;
5155 };
5156
5157 bool operator== (const iter& i, const sentinel& s)
5158 {
5159 return i.i == s.i;
5160 }
5161
5162 bool operator!= (const iter& i, const sentinel& s)
5163 {
5164 return !(i == s);
5165 }
5166
5167 struct range
5168 {
5169 iter begin() const
5170 {
5171 return {0};
5172 }
5173
5174 sentinel end() const
5175 {
5176 return {5};
5177 }
5178 };
5179
5180 void f()
5181 {
5182 range r {};
5183
5184 for (auto i : r)
5185 {
5186 [[maybe_unused]] auto v = i;
5187 }
5188 }
5189
5190 }
5191
5192 namespace test_lambda_capture_asterisk_this_by_value
5193 {
5194
5195 struct t
5196 {
5197 int i;
5198 int foo()
5199 {
5200 return [*this]()
5201 {
5202 return i;
5203 }();
5204 }
5205 };
5206
5207 }
5208
5209 namespace test_enum_class_construction
5210 {
5211
5212 enum class byte : unsigned char
5213 {};
5214
5215 byte foo {42};
5216
5217 }
5218
5219 namespace test_constexpr_if
5220 {
5221
5222 template <bool cond>
5223 int f ()
5224 {
5225 if constexpr(cond)
5226 {
5227 return 13;
5228 }
5229 else
5230 {
5231 return 42;
5232 }
5233 }
5234
5235 }
5236
5237 namespace test_selection_statement_with_initializer
5238 {
5239
5240 int f()
5241 {
5242 return 13;
5243 }
5244
5245 int f2()
5246 {
5247 if (auto i = f(); i > 0)
5248 {
5249 return 3;
5250 }
5251
5252 switch (auto i = f(); i + 4)
5253 {
5254 case 17:
5255 return 2;
5256
5257 default:
5258 return 1;
5259 }
5260 }
5261
5262 }
5263
5264 namespace test_template_argument_deduction_for_class_templates
5265 {
5266
5267 template <typename T1, typename T2>
5268 struct pair
5269 {
5270 pair (T1 p1, T2 p2)
5271 : m1 {p1},
5272 m2 {p2}
5273 {}
5274
5275 T1 m1;
5276 T2 m2;
5277 };
5278
5279 void f()
5280 {
5281 [[maybe_unused]] auto p = pair{13, 42u};
5282 }
5283
5284 }
5285
5286 namespace test_non_type_auto_template_parameters
5287 {
5288
5289 template <auto n>
5290 struct B
5291 {};
5292
5293 B<5> b1;
5294 B<'a'> b2;
5295
5296 }
5297
5298 namespace test_structured_bindings
5299 {
5300
5301 int arr[2] = { 1, 2 };
5302 std::pair<int, int> pr = { 1, 2 };
5303
5304 auto f1() -> int(&)[2]
5305 {
5306 return arr;
5307 }
5308
5309 auto f2() -> std::pair<int, int>&
5310 {
5311 return pr;
5312 }
5313
5314 struct S
5315 {
5316 int x1 : 2;
5317 volatile double y1;
5318 };
5319
5320 S f3()
5321 {
5322 return {};
5323 }
5324
5325 auto [ x1, y1 ] = f1();
5326 auto& [ xr1, yr1 ] = f1();
5327 auto [ x2, y2 ] = f2();
5328 auto& [ xr2, yr2 ] = f2();
5329 const auto [ x3, y3 ] = f3();
5330
5331 }
5332
5333 namespace test_exception_spec_type_system
5334 {
5335
5336 struct Good {};
5337 struct Bad {};
5338
5339 void g1() noexcept;
5340 void g2();
5341
5342 template<typename T>
5343 Bad
5344 f(T*, T*);
5345
5346 template<typename T1, typename T2>
5347 Good
5348 f(T1*, T2*);
5349
5350 static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
5351
5352 }
5353
5354 namespace test_inline_variables
5355 {
5356
5357 template<class T> void f(T)
5358 {}
5359
5360 template<class T> inline T g(T)
5361 {
5362 return T{};
5363 }
5364
5365 template<> inline void f<>(int)
5366 {}
5367
5368 template<> int g<>(int)
5369 {
5370 return 5;
5371 }
5372
5373 }
5374
5375 } // namespace cxx17
5376
5377 #endif // __cplusplus < 201703L
5378
5379
5380
5381 _ACEOF
5382 if ac_fn_cxx_try_compile "$LINENO"
5383 then :
5384 eval $cachevar=yes
5385 else $as_nop
5386 eval $cachevar=no
5387 fi
5388 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5389 CXX="$ac_save_CXX"
5390 fi
5391 eval ac_res=\$$cachevar
5392 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5393 printf "%s\n" "$ac_res" >&6; }
5394 if eval test x\$$cachevar = xyes; then
5395 CXX="$CXX $switch"
5396 if test -n "$CXXCPP" ; then
5397 CXXCPP="$CXXCPP $switch"
5398 fi
5399 ac_success=yes
5400 break
5401 fi
5402 done
5403 fi
5404
5405 if test x$ac_success = xno; then
5406 for alternative in ${ax_cxx_compile_alternatives}; do
5407 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5408 cachevar=`printf "%s\n" "ax_cv_cxx_compile_cxx17_$switch" | $as_tr_sh`
5409 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++17 features with $switch" >&5
5410 printf %s "checking whether $CXX supports C++17 features with $switch... " >&6; }
5411 if eval test \${$cachevar+y}
5412 then :
5413 printf %s "(cached) " >&6
5414 else $as_nop
5415 ac_save_CXX="$CXX"
5416 CXX="$CXX $switch"
5417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5418 /* end confdefs.h. */
5419
5420
5421 // If the compiler admits that it is not ready for C++11, why torture it?
5422 // Hopefully, this will speed up the test.
5423
5424 #ifndef __cplusplus
5425
5426 #error "This is not a C++ compiler"
5427
5428 #elif __cplusplus < 201103L
5429
5430 #error "This is not a C++11 compiler"
5431
5432 #else
5433
5434 namespace cxx11
5435 {
5436
5437 namespace test_static_assert
5438 {
5439
5440 template <typename T>
5441 struct check
5442 {
5443 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5444 };
5445
5446 }
5447
5448 namespace test_final_override
5449 {
5450
5451 struct Base
5452 {
5453 virtual ~Base() {}
5454 virtual void f() {}
5455 };
5456
5457 struct Derived : public Base
5458 {
5459 virtual ~Derived() override {}
5460 virtual void f() override {}
5461 };
5462
5463 }
5464
5465 namespace test_double_right_angle_brackets
5466 {
5467
5468 template < typename T >
5469 struct check {};
5470
5471 typedef check<void> single_type;
5472 typedef check<check<void>> double_type;
5473 typedef check<check<check<void>>> triple_type;
5474 typedef check<check<check<check<void>>>> quadruple_type;
5475
5476 }
5477
5478 namespace test_decltype
5479 {
5480
5481 int
5482 f()
5483 {
5484 int a = 1;
5485 decltype(a) b = 2;
5486 return a + b;
5487 }
5488
5489 }
5490
5491 namespace test_type_deduction
5492 {
5493
5494 template < typename T1, typename T2 >
5495 struct is_same
5496 {
5497 static const bool value = false;
5498 };
5499
5500 template < typename T >
5501 struct is_same<T, T>
5502 {
5503 static const bool value = true;
5504 };
5505
5506 template < typename T1, typename T2 >
5507 auto
5508 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5509 {
5510 return a1 + a2;
5511 }
5512
5513 int
5514 test(const int c, volatile int v)
5515 {
5516 static_assert(is_same<int, decltype(0)>::value == true, "");
5517 static_assert(is_same<int, decltype(c)>::value == false, "");
5518 static_assert(is_same<int, decltype(v)>::value == false, "");
5519 auto ac = c;
5520 auto av = v;
5521 auto sumi = ac + av + 'x';
5522 auto sumf = ac + av + 1.0;
5523 static_assert(is_same<int, decltype(ac)>::value == true, "");
5524 static_assert(is_same<int, decltype(av)>::value == true, "");
5525 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5526 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5527 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5528 return (sumf > 0.0) ? sumi : add(c, v);
5529 }
5530
5531 }
5532
5533 namespace test_noexcept
5534 {
5535
5536 int f() { return 0; }
5537 int g() noexcept { return 0; }
5538
5539 static_assert(noexcept(f()) == false, "");
5540 static_assert(noexcept(g()) == true, "");
5541
5542 }
5543
5544 namespace test_constexpr
5545 {
5546
5547 template < typename CharT >
5548 unsigned long constexpr
5549 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5550 {
5551 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5552 }
5553
5554 template < typename CharT >
5555 unsigned long constexpr
5556 strlen_c(const CharT *const s) noexcept
5557 {
5558 return strlen_c_r(s, 0UL);
5559 }
5560
5561 static_assert(strlen_c("") == 0UL, "");
5562 static_assert(strlen_c("1") == 1UL, "");
5563 static_assert(strlen_c("example") == 7UL, "");
5564 static_assert(strlen_c("another\0example") == 7UL, "");
5565
5566 }
5567
5568 namespace test_rvalue_references
5569 {
5570
5571 template < int N >
5572 struct answer
5573 {
5574 static constexpr int value = N;
5575 };
5576
5577 answer<1> f(int&) { return answer<1>(); }
5578 answer<2> f(const int&) { return answer<2>(); }
5579 answer<3> f(int&&) { return answer<3>(); }
5580
5581 void
5582 test()
5583 {
5584 int i = 0;
5585 const int c = 0;
5586 static_assert(decltype(f(i))::value == 1, "");
5587 static_assert(decltype(f(c))::value == 2, "");
5588 static_assert(decltype(f(0))::value == 3, "");
5589 }
5590
5591 }
5592
5593 namespace test_uniform_initialization
5594 {
5595
5596 struct test
5597 {
5598 static const int zero {};
5599 static const int one {1};
5600 };
5601
5602 static_assert(test::zero == 0, "");
5603 static_assert(test::one == 1, "");
5604
5605 }
5606
5607 namespace test_lambdas
5608 {
5609
5610 void
5611 test1()
5612 {
5613 auto lambda1 = [](){};
5614 auto lambda2 = lambda1;
5615 lambda1();
5616 lambda2();
5617 }
5618
5619 int
5620 test2()
5621 {
5622 auto a = [](int i, int j){ return i + j; }(1, 2);
5623 auto b = []() -> int { return '0'; }();
5624 auto c = [=](){ return a + b; }();
5625 auto d = [&](){ return c; }();
5626 auto e = [a, &b](int x) mutable {
5627 const auto identity = [](int y){ return y; };
5628 for (auto i = 0; i < a; ++i)
5629 a += b--;
5630 return x + identity(a + b);
5631 }(0);
5632 return a + b + c + d + e;
5633 }
5634
5635 int
5636 test3()
5637 {
5638 const auto nullary = [](){ return 0; };
5639 const auto unary = [](int x){ return x; };
5640 using nullary_t = decltype(nullary);
5641 using unary_t = decltype(unary);
5642 const auto higher1st = [](nullary_t f){ return f(); };
5643 const auto higher2nd = [unary](nullary_t f1){
5644 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5645 };
5646 return higher1st(nullary) + higher2nd(nullary)(unary);
5647 }
5648
5649 }
5650
5651 namespace test_variadic_templates
5652 {
5653
5654 template <int...>
5655 struct sum;
5656
5657 template <int N0, int... N1toN>
5658 struct sum<N0, N1toN...>
5659 {
5660 static constexpr auto value = N0 + sum<N1toN...>::value;
5661 };
5662
5663 template <>
5664 struct sum<>
5665 {
5666 static constexpr auto value = 0;
5667 };
5668
5669 static_assert(sum<>::value == 0, "");
5670 static_assert(sum<1>::value == 1, "");
5671 static_assert(sum<23>::value == 23, "");
5672 static_assert(sum<1, 2>::value == 3, "");
5673 static_assert(sum<5, 5, 11>::value == 21, "");
5674 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5675
5676 }
5677
5678 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5679 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5680 // because of this.
5681 namespace test_template_alias_sfinae
5682 {
5683
5684 struct foo {};
5685
5686 template<typename T>
5687 using member = typename T::member_type;
5688
5689 template<typename T>
5690 void func(...) {}
5691
5692 template<typename T>
5693 void func(member<T>*) {}
5694
5695 void test();
5696
5697 void test() { func<foo>(0); }
5698
5699 }
5700
5701 } // namespace cxx11
5702
5703 #endif // __cplusplus >= 201103L
5704
5705
5706
5707
5708 // If the compiler admits that it is not ready for C++14, why torture it?
5709 // Hopefully, this will speed up the test.
5710
5711 #ifndef __cplusplus
5712
5713 #error "This is not a C++ compiler"
5714
5715 #elif __cplusplus < 201402L
5716
5717 #error "This is not a C++14 compiler"
5718
5719 #else
5720
5721 namespace cxx14
5722 {
5723
5724 namespace test_polymorphic_lambdas
5725 {
5726
5727 int
5728 test()
5729 {
5730 const auto lambda = [](auto&&... args){
5731 const auto istiny = [](auto x){
5732 return (sizeof(x) == 1UL) ? 1 : 0;
5733 };
5734 const int aretiny[] = { istiny(args)... };
5735 return aretiny[0];
5736 };
5737 return lambda(1, 1L, 1.0f, '1');
5738 }
5739
5740 }
5741
5742 namespace test_binary_literals
5743 {
5744
5745 constexpr auto ivii = 0b0000000000101010;
5746 static_assert(ivii == 42, "wrong value");
5747
5748 }
5749
5750 namespace test_generalized_constexpr
5751 {
5752
5753 template < typename CharT >
5754 constexpr unsigned long
5755 strlen_c(const CharT *const s) noexcept
5756 {
5757 auto length = 0UL;
5758 for (auto p = s; *p; ++p)
5759 ++length;
5760 return length;
5761 }
5762
5763 static_assert(strlen_c("") == 0UL, "");
5764 static_assert(strlen_c("x") == 1UL, "");
5765 static_assert(strlen_c("test") == 4UL, "");
5766 static_assert(strlen_c("another\0test") == 7UL, "");
5767
5768 }
5769
5770 namespace test_lambda_init_capture
5771 {
5772
5773 int
5774 test()
5775 {
5776 auto x = 0;
5777 const auto lambda1 = [a = x](int b){ return a + b; };
5778 const auto lambda2 = [a = lambda1(x)](){ return a; };
5779 return lambda2();
5780 }
5781
5782 }
5783
5784 namespace test_digit_separators
5785 {
5786
5787 constexpr auto ten_million = 100'000'000;
5788 static_assert(ten_million == 100000000, "");
5789
5790 }
5791
5792 namespace test_return_type_deduction
5793 {
5794
5795 auto f(int& x) { return x; }
5796 decltype(auto) g(int& x) { return x; }
5797
5798 template < typename T1, typename T2 >
5799 struct is_same
5800 {
5801 static constexpr auto value = false;
5802 };
5803
5804 template < typename T >
5805 struct is_same<T, T>
5806 {
5807 static constexpr auto value = true;
5808 };
5809
5810 int
5811 test()
5812 {
5813 auto x = 0;
5814 static_assert(is_same<int, decltype(f(x))>::value, "");
5815 static_assert(is_same<int&, decltype(g(x))>::value, "");
5816 return x;
5817 }
5818
5819 }
5820
5821 } // namespace cxx14
5822
5823 #endif // __cplusplus >= 201402L
5824
5825
5826
5827
5828 // If the compiler admits that it is not ready for C++17, why torture it?
5829 // Hopefully, this will speed up the test.
5830
5831 #ifndef __cplusplus
5832
5833 #error "This is not a C++ compiler"
5834
5835 #elif __cplusplus < 201703L
5836
5837 #error "This is not a C++17 compiler"
5838
5839 #else
5840
5841 #include <initializer_list>
5842 #include <utility>
5843 #include <type_traits>
5844
5845 namespace cxx17
5846 {
5847
5848 namespace test_constexpr_lambdas
5849 {
5850
5851 constexpr int foo = [](){return 42;}();
5852
5853 }
5854
5855 namespace test::nested_namespace::definitions
5856 {
5857
5858 }
5859
5860 namespace test_fold_expression
5861 {
5862
5863 template<typename... Args>
5864 int multiply(Args... args)
5865 {
5866 return (args * ... * 1);
5867 }
5868
5869 template<typename... Args>
5870 bool all(Args... args)
5871 {
5872 return (args && ...);
5873 }
5874
5875 }
5876
5877 namespace test_extended_static_assert
5878 {
5879
5880 static_assert (true);
5881
5882 }
5883
5884 namespace test_auto_brace_init_list
5885 {
5886
5887 auto foo = {5};
5888 auto bar {5};
5889
5890 static_assert(std::is_same<std::initializer_list<int>, decltype(foo)>::value);
5891 static_assert(std::is_same<int, decltype(bar)>::value);
5892 }
5893
5894 namespace test_typename_in_template_template_parameter
5895 {
5896
5897 template<template<typename> typename X> struct D;
5898
5899 }
5900
5901 namespace test_fallthrough_nodiscard_maybe_unused_attributes
5902 {
5903
5904 int f1()
5905 {
5906 return 42;
5907 }
5908
5909 [[nodiscard]] int f2()
5910 {
5911 [[maybe_unused]] auto unused = f1();
5912
5913 switch (f1())
5914 {
5915 case 17:
5916 f1();
5917 [[fallthrough]];
5918 case 42:
5919 f1();
5920 }
5921 return f1();
5922 }
5923
5924 }
5925
5926 namespace test_extended_aggregate_initialization
5927 {
5928
5929 struct base1
5930 {
5931 int b1, b2 = 42;
5932 };
5933
5934 struct base2
5935 {
5936 base2() {
5937 b3 = 42;
5938 }
5939 int b3;
5940 };
5941
5942 struct derived : base1, base2
5943 {
5944 int d;
5945 };
5946
5947 derived d1 {{1, 2}, {}, 4}; // full initialization
5948 derived d2 {{}, {}, 4}; // value-initialized bases
5949
5950 }
5951
5952 namespace test_general_range_based_for_loop
5953 {
5954
5955 struct iter
5956 {
5957 int i;
5958
5959 int& operator* ()
5960 {
5961 return i;
5962 }
5963
5964 const int& operator* () const
5965 {
5966 return i;
5967 }
5968
5969 iter& operator++()
5970 {
5971 ++i;
5972 return *this;
5973 }
5974 };
5975
5976 struct sentinel
5977 {
5978 int i;
5979 };
5980
5981 bool operator== (const iter& i, const sentinel& s)
5982 {
5983 return i.i == s.i;
5984 }
5985
5986 bool operator!= (const iter& i, const sentinel& s)
5987 {
5988 return !(i == s);
5989 }
5990
5991 struct range
5992 {
5993 iter begin() const
5994 {
5995 return {0};
5996 }
5997
5998 sentinel end() const
5999 {
6000 return {5};
6001 }
6002 };
6003
6004 void f()
6005 {
6006 range r {};
6007
6008 for (auto i : r)
6009 {
6010 [[maybe_unused]] auto v = i;
6011 }
6012 }
6013
6014 }
6015
6016 namespace test_lambda_capture_asterisk_this_by_value
6017 {
6018
6019 struct t
6020 {
6021 int i;
6022 int foo()
6023 {
6024 return [*this]()
6025 {
6026 return i;
6027 }();
6028 }
6029 };
6030
6031 }
6032
6033 namespace test_enum_class_construction
6034 {
6035
6036 enum class byte : unsigned char
6037 {};
6038
6039 byte foo {42};
6040
6041 }
6042
6043 namespace test_constexpr_if
6044 {
6045
6046 template <bool cond>
6047 int f ()
6048 {
6049 if constexpr(cond)
6050 {
6051 return 13;
6052 }
6053 else
6054 {
6055 return 42;
6056 }
6057 }
6058
6059 }
6060
6061 namespace test_selection_statement_with_initializer
6062 {
6063
6064 int f()
6065 {
6066 return 13;
6067 }
6068
6069 int f2()
6070 {
6071 if (auto i = f(); i > 0)
6072 {
6073 return 3;
6074 }
6075
6076 switch (auto i = f(); i + 4)
6077 {
6078 case 17:
6079 return 2;
6080
6081 default:
6082 return 1;
6083 }
6084 }
6085
6086 }
6087
6088 namespace test_template_argument_deduction_for_class_templates
6089 {
6090
6091 template <typename T1, typename T2>
6092 struct pair
6093 {
6094 pair (T1 p1, T2 p2)
6095 : m1 {p1},
6096 m2 {p2}
6097 {}
6098
6099 T1 m1;
6100 T2 m2;
6101 };
6102
6103 void f()
6104 {
6105 [[maybe_unused]] auto p = pair{13, 42u};
6106 }
6107
6108 }
6109
6110 namespace test_non_type_auto_template_parameters
6111 {
6112
6113 template <auto n>
6114 struct B
6115 {};
6116
6117 B<5> b1;
6118 B<'a'> b2;
6119
6120 }
6121
6122 namespace test_structured_bindings
6123 {
6124
6125 int arr[2] = { 1, 2 };
6126 std::pair<int, int> pr = { 1, 2 };
6127
6128 auto f1() -> int(&)[2]
6129 {
6130 return arr;
6131 }
6132
6133 auto f2() -> std::pair<int, int>&
6134 {
6135 return pr;
6136 }
6137
6138 struct S
6139 {
6140 int x1 : 2;
6141 volatile double y1;
6142 };
6143
6144 S f3()
6145 {
6146 return {};
6147 }
6148
6149 auto [ x1, y1 ] = f1();
6150 auto& [ xr1, yr1 ] = f1();
6151 auto [ x2, y2 ] = f2();
6152 auto& [ xr2, yr2 ] = f2();
6153 const auto [ x3, y3 ] = f3();
6154
6155 }
6156
6157 namespace test_exception_spec_type_system
6158 {
6159
6160 struct Good {};
6161 struct Bad {};
6162
6163 void g1() noexcept;
6164 void g2();
6165
6166 template<typename T>
6167 Bad
6168 f(T*, T*);
6169
6170 template<typename T1, typename T2>
6171 Good
6172 f(T1*, T2*);
6173
6174 static_assert (std::is_same_v<Good, decltype(f(g1, g2))>);
6175
6176 }
6177
6178 namespace test_inline_variables
6179 {
6180
6181 template<class T> void f(T)
6182 {}
6183
6184 template<class T> inline T g(T)
6185 {
6186 return T{};
6187 }
6188
6189 template<> inline void f<>(int)
6190 {}
6191
6192 template<> int g<>(int)
6193 {
6194 return 5;
6195 }
6196
6197 }
6198
6199 } // namespace cxx17
6200
6201 #endif // __cplusplus < 201703L
6202
6203
6204
6205 _ACEOF
6206 if ac_fn_cxx_try_compile "$LINENO"
6207 then :
6208 eval $cachevar=yes
6209 else $as_nop
6210 eval $cachevar=no
6211 fi
6212 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6213 CXX="$ac_save_CXX"
6214 fi
6215 eval ac_res=\$$cachevar
6216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6217 printf "%s\n" "$ac_res" >&6; }
6218 if eval test x\$$cachevar = xyes; then
6219 CXX="$CXX $switch"
6220 if test -n "$CXXCPP" ; then
6221 CXXCPP="$CXXCPP $switch"
6222 fi
6223 ac_success=yes
6224 break
6225 fi
6226 done
6227 if test x$ac_success = xyes; then
6228 break
6229 fi
6230 done
6231 fi
6232 ac_ext=c
6233 ac_cpp='$CPP $CPPFLAGS'
6234 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6235 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6236 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6237
6238 if test x$ax_cxx_compile_cxx17_required = xtrue; then
6239 if test x$ac_success = xno; then
6240 as_fn_error $? "*** A compiler with support for C++17 language features is required." "$LINENO" 5
6241 fi
6242 fi
6243 if test x$ac_success = xno; then
6244 HAVE_CXX17=0
6245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: No compiler with C++17 support was found" >&5
6246 printf "%s\n" "$as_me: No compiler with C++17 support was found" >&6;}
6247 else
6248 HAVE_CXX17=1
6249
6250 printf "%s\n" "#define HAVE_CXX17 1" >>confdefs.h
6251
6252 fi
6253
6254
6255
6256
6257 # Find a good install program. We prefer a C program (faster),
6258 # so one script is as good as another. But avoid the broken or
6259 # incompatible versions:
6260 # SysV /etc/install, /usr/sbin/install
6261 # SunOS /usr/etc/install
6262 # IRIX /sbin/install
6263 # AIX /bin/install
6264 # AmigaOS /C/install, which installs bootblocks on floppy discs
6265 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6266 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
6267 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6268 # OS/2's system install, which has a completely different semantic
6269 # ./install, which can be erroneously created by make from ./install.sh.
6270 # Reject install programs that cannot install multiple files.
6271 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6272 printf %s "checking for a BSD-compatible install... " >&6; }
6273 if test -z "$INSTALL"; then
6274 if test ${ac_cv_path_install+y}
6275 then :
6276 printf %s "(cached) " >&6
6277 else $as_nop
6278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6279 for as_dir in $PATH
6280 do
6281 IFS=$as_save_IFS
6282 case $as_dir in #(((
6283 '') as_dir=./ ;;
6284 */) ;;
6285 *) as_dir=$as_dir/ ;;
6286 esac
6287 # Account for fact that we put trailing slashes in our PATH walk.
6288 case $as_dir in #((
6289 ./ | /[cC]/* | \
6290 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
6291 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
6292 /usr/ucb/* ) ;;
6293 *)
6294 # OSF1 and SCO ODT 3.0 have their own names for install.
6295 # Don't use installbsd from OSF since it installs stuff as root
6296 # by default.
6297 for ac_prog in ginstall scoinst install; do
6298 for ac_exec_ext in '' $ac_executable_extensions; do
6299 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
6300 if test $ac_prog = install &&
6301 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6302 # AIX install. It has an incompatible calling convention.
6303 :
6304 elif test $ac_prog = install &&
6305 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6306 # program-specific install script used by HP pwplus--don't use.
6307 :
6308 else
6309 rm -rf conftest.one conftest.two conftest.dir
6310 echo one > conftest.one
6311 echo two > conftest.two
6312 mkdir conftest.dir
6313 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
6314 test -s conftest.one && test -s conftest.two &&
6315 test -s conftest.dir/conftest.one &&
6316 test -s conftest.dir/conftest.two
6317 then
6318 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
6319 break 3
6320 fi
6321 fi
6322 fi
6323 done
6324 done
6325 ;;
6326 esac
6327
6328 done
6329 IFS=$as_save_IFS
6330
6331 rm -rf conftest.one conftest.two conftest.dir
6332
6333 fi
6334 if test ${ac_cv_path_install+y}; then
6335 INSTALL=$ac_cv_path_install
6336 else
6337 # As a last resort, use the slow shell script. Don't cache a
6338 # value for INSTALL within a source directory, because that will
6339 # break other packages using the cache if that directory is
6340 # removed, or if the value is a relative name.
6341 INSTALL=$ac_install_sh
6342 fi
6343 fi
6344 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6345 printf "%s\n" "$INSTALL" >&6; }
6346
6347 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6348 # It thinks the first close brace ends the variable substitution.
6349 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6350
6351 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6352
6353 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6354
6355 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6356 printf %s "checking whether ln -s works... " >&6; }
6357 LN_S=$as_ln_s
6358 if test "$LN_S" = "ln -s"; then
6359 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6360 printf "%s\n" "yes" >&6; }
6361 else
6362 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6363 printf "%s\n" "no, using $LN_S" >&6; }
6364 fi
6365
6366 if test -n "$ac_tool_prefix"; then
6367 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6368 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6370 printf %s "checking for $ac_word... " >&6; }
6371 if test ${ac_cv_prog_RANLIB+y}
6372 then :
6373 printf %s "(cached) " >&6
6374 else $as_nop
6375 if test -n "$RANLIB"; then
6376 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6377 else
6378 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6379 for as_dir in $PATH
6380 do
6381 IFS=$as_save_IFS
6382 case $as_dir in #(((
6383 '') as_dir=./ ;;
6384 */) ;;
6385 *) as_dir=$as_dir/ ;;
6386 esac
6387 for ac_exec_ext in '' $ac_executable_extensions; do
6388 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6389 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6390 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6391 break 2
6392 fi
6393 done
6394 done
6395 IFS=$as_save_IFS
6396
6397 fi
6398 fi
6399 RANLIB=$ac_cv_prog_RANLIB
6400 if test -n "$RANLIB"; then
6401 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6402 printf "%s\n" "$RANLIB" >&6; }
6403 else
6404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6405 printf "%s\n" "no" >&6; }
6406 fi
6407
6408
6409 fi
6410 if test -z "$ac_cv_prog_RANLIB"; then
6411 ac_ct_RANLIB=$RANLIB
6412 # Extract the first word of "ranlib", so it can be a program name with args.
6413 set dummy ranlib; ac_word=$2
6414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6415 printf %s "checking for $ac_word... " >&6; }
6416 if test ${ac_cv_prog_ac_ct_RANLIB+y}
6417 then :
6418 printf %s "(cached) " >&6
6419 else $as_nop
6420 if test -n "$ac_ct_RANLIB"; then
6421 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6422 else
6423 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6424 for as_dir in $PATH
6425 do
6426 IFS=$as_save_IFS
6427 case $as_dir in #(((
6428 '') as_dir=./ ;;
6429 */) ;;
6430 *) as_dir=$as_dir/ ;;
6431 esac
6432 for ac_exec_ext in '' $ac_executable_extensions; do
6433 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6434 ac_cv_prog_ac_ct_RANLIB="ranlib"
6435 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6436 break 2
6437 fi
6438 done
6439 done
6440 IFS=$as_save_IFS
6441
6442 fi
6443 fi
6444 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6445 if test -n "$ac_ct_RANLIB"; then
6446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6447 printf "%s\n" "$ac_ct_RANLIB" >&6; }
6448 else
6449 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6450 printf "%s\n" "no" >&6; }
6451 fi
6452
6453 if test "x$ac_ct_RANLIB" = x; then
6454 RANLIB=":"
6455 else
6456 case $cross_compiling:$ac_tool_warned in
6457 yes:)
6458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6459 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6460 ac_tool_warned=yes ;;
6461 esac
6462 RANLIB=$ac_ct_RANLIB
6463 fi
6464 else
6465 RANLIB="$ac_cv_prog_RANLIB"
6466 fi
6467
6468
6469 ac_ext=cpp
6470 ac_cpp='$CXXCPP $CPPFLAGS'
6471 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6472 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6473 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6474
6475 ac_ext=cpp
6476 ac_cpp='$CXXCPP $CPPFLAGS'
6477 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6478 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6479 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6480 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
6481 printf %s "checking how to run the C++ preprocessor... " >&6; }
6482 if test -z "$CXXCPP"; then
6483 if test ${ac_cv_prog_CXXCPP+y}
6484 then :
6485 printf %s "(cached) " >&6
6486 else $as_nop
6487 # Double quotes because $CXX needs to be expanded
6488 for CXXCPP in "$CXX -E" cpp /lib/cpp
6489 do
6490 ac_preproc_ok=false
6491 for ac_cxx_preproc_warn_flag in '' yes
6492 do
6493 # Use a header file that comes with gcc, so configuring glibc
6494 # with a fresh cross-compiler works.
6495 # On the NeXT, cc -E runs the code through the compiler's parser,
6496 # not just through cpp. "Syntax error" is here to catch this case.
6497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6498 /* end confdefs.h. */
6499 #include <limits.h>
6500 Syntax error
6501 _ACEOF
6502 if ac_fn_cxx_try_cpp "$LINENO"
6503 then :
6504
6505 else $as_nop
6506 # Broken: fails on valid input.
6507 continue
6508 fi
6509 rm -f conftest.err conftest.i conftest.$ac_ext
6510
6511 # OK, works on sane cases. Now check whether nonexistent headers
6512 # can be detected and how.
6513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6514 /* end confdefs.h. */
6515 #include <ac_nonexistent.h>
6516 _ACEOF
6517 if ac_fn_cxx_try_cpp "$LINENO"
6518 then :
6519 # Broken: success on invalid input.
6520 continue
6521 else $as_nop
6522 # Passes both tests.
6523 ac_preproc_ok=:
6524 break
6525 fi
6526 rm -f conftest.err conftest.i conftest.$ac_ext
6527
6528 done
6529 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6530 rm -f conftest.i conftest.err conftest.$ac_ext
6531 if $ac_preproc_ok
6532 then :
6533 break
6534 fi
6535
6536 done
6537 ac_cv_prog_CXXCPP=$CXXCPP
6538
6539 fi
6540 CXXCPP=$ac_cv_prog_CXXCPP
6541 else
6542 ac_cv_prog_CXXCPP=$CXXCPP
6543 fi
6544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
6545 printf "%s\n" "$CXXCPP" >&6; }
6546 ac_preproc_ok=false
6547 for ac_cxx_preproc_warn_flag in '' yes
6548 do
6549 # Use a header file that comes with gcc, so configuring glibc
6550 # with a fresh cross-compiler works.
6551 # On the NeXT, cc -E runs the code through the compiler's parser,
6552 # not just through cpp. "Syntax error" is here to catch this case.
6553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6554 /* end confdefs.h. */
6555 #include <limits.h>
6556 Syntax error
6557 _ACEOF
6558 if ac_fn_cxx_try_cpp "$LINENO"
6559 then :
6560
6561 else $as_nop
6562 # Broken: fails on valid input.
6563 continue
6564 fi
6565 rm -f conftest.err conftest.i conftest.$ac_ext
6566
6567 # OK, works on sane cases. Now check whether nonexistent headers
6568 # can be detected and how.
6569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6570 /* end confdefs.h. */
6571 #include <ac_nonexistent.h>
6572 _ACEOF
6573 if ac_fn_cxx_try_cpp "$LINENO"
6574 then :
6575 # Broken: success on invalid input.
6576 continue
6577 else $as_nop
6578 # Passes both tests.
6579 ac_preproc_ok=:
6580 break
6581 fi
6582 rm -f conftest.err conftest.i conftest.$ac_ext
6583
6584 done
6585 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6586 rm -f conftest.i conftest.err conftest.$ac_ext
6587 if $ac_preproc_ok
6588 then :
6589
6590 else $as_nop
6591 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6592 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
6593 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
6594 See \`config.log' for more details" "$LINENO" 5; }
6595 fi
6596
6597 ac_ext=cpp
6598 ac_cpp='$CXXCPP $CPPFLAGS'
6599 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6600 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6601 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6602
6603
6604
6605
6606
6607 cvd_major=`echo $PACKAGE_VERSION | $AWK -F'\\\\.' '{print $1}'`
6608 cvd_minor=`echo $PACKAGE_VERSION | $AWK -F'\\\\.' '{print $2}'`
6609
6610 printf "%s\n" "#define CVD_MAJOR_VERSION $cvd_major" >>confdefs.h
6611
6612 major=$cvd_major
6613
6614 printf "%s\n" "#define CVD_MINOR_VERSION $cvd_minor" >>confdefs.h
6615
6616 minor=$cvd_minor
6617
6618
6619
6620 ################################################################################
6621 #
6622 #Lists of optional components
6623 #
6624
6625 all_options="videodisplay jpeg tiff png ffmpeg toon assembler inline_asm libuvc"
6626 dodginess_options=
6627 options=
6628 simd_all_options=
6629 simd_options=
6630 os_all_options=
6631
6632 ################################################################################
6633 #
6634 # Useful macros
6635 #
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649 #Host detection
6650
6651
6652 # Make sure we can run config.sub.
6653 $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
6654 as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
6655
6656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
6657 printf %s "checking build system type... " >&6; }
6658 if test ${ac_cv_build+y}
6659 then :
6660 printf %s "(cached) " >&6
6661 else $as_nop
6662 ac_build_alias=$build_alias
6663 test "x$ac_build_alias" = x &&
6664 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
6665 test "x$ac_build_alias" = x &&
6666 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
6667 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
6668 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
6669
6670 fi
6671 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
6672 printf "%s\n" "$ac_cv_build" >&6; }
6673 case $ac_cv_build in
6674 *-*-*) ;;
6675 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
6676 esac
6677 build=$ac_cv_build
6678 ac_save_IFS=$IFS; IFS='-'
6679 set x $ac_cv_build
6680 shift
6681 build_cpu=$1
6682 build_vendor=$2
6683 shift; shift
6684 # Remember, the first character of IFS is used to create $*,
6685 # except with old shells:
6686 build_os=$*
6687 IFS=$ac_save_IFS
6688 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
6689
6690
6691 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
6692 printf %s "checking host system type... " >&6; }
6693 if test ${ac_cv_host+y}
6694 then :
6695 printf %s "(cached) " >&6
6696 else $as_nop
6697 if test "x$host_alias" = x; then
6698 ac_cv_host=$ac_cv_build
6699 else
6700 ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
6701 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
6702 fi
6703
6704 fi
6705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
6706 printf "%s\n" "$ac_cv_host" >&6; }
6707 case $ac_cv_host in
6708 *-*-*) ;;
6709 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
6710 esac
6711 host=$ac_cv_host
6712 ac_save_IFS=$IFS; IFS='-'
6713 set x $ac_cv_host
6714 shift
6715 host_cpu=$1
6716 host_vendor=$2
6717 shift; shift
6718 # Remember, the first character of IFS is used to create $*,
6719 # except with old shells:
6720 host_os=$*
6721 IFS=$ac_save_IFS
6722 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
6723
6724
6725
6726 ################################################################################
6727 #
6728 # Compiler flags and optimization
6729 #
6730 #
6731
6732 if test "" == ""
6733 then
6734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler flag -Wall works" >&5
6735 printf %s "checking if compiler flag -Wall works... " >&6; }
6736 else
6737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking " >&5
6738 printf %s "checking ... " >&6; }
6739 fi
6740 save_CXXFLAGS="$CXXFLAGS"
6741 CXXFLAGS="$CXXFLAGS -Wall"
6742
6743
6744
6745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6746 /* end confdefs.h. */
6747 int main(){}
6748 _ACEOF
6749 if ac_fn_cxx_try_compile "$LINENO"
6750 then :
6751 cvd_conf_test=1
6752 else $as_nop
6753 cvd_conf_test=0
6754 fi
6755 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6756
6757
6758
6759
6760 if test $cvd_conf_test = 1
6761 then
6762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6763 printf "%s\n" "yes" >&6; }
6764 ts_success=yes
6765 else
6766 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6767 printf "%s\n" "no" >&6; }
6768 CXXFLAGS="$save_CXXFLAGS"
6769 ts_success=no
6770 fi
6771
6772
6773 if test "" == ""
6774 then
6775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler flag -Wextra works" >&5
6776 printf %s "checking if compiler flag -Wextra works... " >&6; }
6777 else
6778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking " >&5
6779 printf %s "checking ... " >&6; }
6780 fi
6781 save_CXXFLAGS="$CXXFLAGS"
6782 CXXFLAGS="$CXXFLAGS -Wextra"
6783
6784
6785
6786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6787 /* end confdefs.h. */
6788 int main(){}
6789 _ACEOF
6790 if ac_fn_cxx_try_compile "$LINENO"
6791 then :
6792 cvd_conf_test=1
6793 else $as_nop
6794 cvd_conf_test=0
6795 fi
6796 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6797
6798
6799
6800
6801 if test $cvd_conf_test = 1
6802 then
6803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6804 printf "%s\n" "yes" >&6; }
6805 ts_success=yes
6806 else
6807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6808 printf "%s\n" "no" >&6; }
6809 CXXFLAGS="$save_CXXFLAGS"
6810 ts_success=no
6811 fi
6812
6813
6814 if test "" == ""
6815 then
6816 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler flag -Wconversion works" >&5
6817 printf %s "checking if compiler flag -Wconversion works... " >&6; }
6818 else
6819 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking " >&5
6820 printf %s "checking ... " >&6; }
6821 fi
6822 save_CXXFLAGS="$CXXFLAGS"
6823 CXXFLAGS="$CXXFLAGS -Wconversion"
6824
6825
6826
6827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6828 /* end confdefs.h. */
6829 int main(){}
6830 _ACEOF
6831 if ac_fn_cxx_try_compile "$LINENO"
6832 then :
6833 cvd_conf_test=1
6834 else $as_nop
6835 cvd_conf_test=0
6836 fi
6837 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6838
6839
6840
6841
6842 if test $cvd_conf_test = 1
6843 then
6844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6845 printf "%s\n" "yes" >&6; }
6846 ts_success=yes
6847 else
6848 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6849 printf "%s\n" "no" >&6; }
6850 CXXFLAGS="$save_CXXFLAGS"
6851 ts_success=no
6852 fi
6853
6854
6855 if test "" == ""
6856 then
6857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler flag -pipe works" >&5
6858 printf %s "checking if compiler flag -pipe works... " >&6; }
6859 else
6860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking " >&5
6861 printf %s "checking ... " >&6; }
6862 fi
6863 save_CXXFLAGS="$CXXFLAGS"
6864 CXXFLAGS="$CXXFLAGS -pipe"
6865
6866
6867
6868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6869 /* end confdefs.h. */
6870 int main(){}
6871 _ACEOF
6872 if ac_fn_cxx_try_compile "$LINENO"
6873 then :
6874 cvd_conf_test=1
6875 else $as_nop
6876 cvd_conf_test=0
6877 fi
6878 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6879
6880
6881
6882
6883 if test $cvd_conf_test = 1
6884 then
6885 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6886 printf "%s\n" "yes" >&6; }
6887 ts_success=yes
6888 else
6889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6890 printf "%s\n" "no" >&6; }
6891 CXXFLAGS="$save_CXXFLAGS"
6892 ts_success=no
6893 fi
6894
6895
6896 #Hack: do this properly
6897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5
6898 printf %s "checking for main in -lpthread... " >&6; }
6899 if test ${ac_cv_lib_pthread_main+y}
6900 then :
6901 printf %s "(cached) " >&6
6902 else $as_nop
6903 ac_check_lib_save_LIBS=$LIBS
6904 LIBS="-lpthread $LIBS"
6905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6906 /* end confdefs.h. */
6907
6908 namespace conftest {
6909 extern "C" int main ();
6910 }
6911 int
6912 main (void)
6913 {
6914 return conftest::main ();
6915 ;
6916 return 0;
6917 }
6918 _ACEOF
6919 if ac_fn_cxx_try_link "$LINENO"
6920 then :
6921 ac_cv_lib_pthread_main=yes
6922 else $as_nop
6923 ac_cv_lib_pthread_main=no
6924 fi
6925 rm -f core conftest.err conftest.$ac_objext conftest.beam \
6926 conftest$ac_exeext conftest.$ac_ext
6927 LIBS=$ac_check_lib_save_LIBS
6928 fi
6929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_main" >&5
6930 printf "%s\n" "$ac_cv_lib_pthread_main" >&6; }
6931 if test "x$ac_cv_lib_pthread_main" = xyes
6932 then :
6933 printf "%s\n" "#define HAVE_LIBPTHREAD 1" >>confdefs.h
6934
6935 LIBS="-lpthread $LIBS"
6936
6937 else $as_nop
6938 a=1
6939 fi
6940
6941
6942
6943 ########################################
6944 #
6945 # Always use ggdb if possible
6946 #
6947 # Check whether --enable-ggdb was given.
6948 if test ${enable_ggdb+y}
6949 then :
6950 enableval=$enable_ggdb;
6951 fi
6952
6953 if test "$enable_ggdb" != no
6954 then
6955
6956 if test "" == ""
6957 then
6958 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler flag -ggdb works" >&5
6959 printf %s "checking if compiler flag -ggdb works... " >&6; }
6960 else
6961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking " >&5
6962 printf %s "checking ... " >&6; }
6963 fi
6964 save_CXXFLAGS="$CXXFLAGS"
6965 CXXFLAGS="$CXXFLAGS -ggdb"
6966
6967
6968
6969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6970 /* end confdefs.h. */
6971 int main(){}
6972 _ACEOF
6973 if ac_fn_cxx_try_compile "$LINENO"
6974 then :
6975 cvd_conf_test=1
6976 else $as_nop
6977 cvd_conf_test=0
6978 fi
6979 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
6980
6981
6982
6983
6984 if test $cvd_conf_test = 1
6985 then
6986 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6987 printf "%s\n" "yes" >&6; }
6988 ts_success=yes
6989 else
6990 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6991 printf "%s\n" "no" >&6; }
6992 CXXFLAGS="$save_CXXFLAGS"
6993 ts_success=no
6994 fi
6995
6996 fi
6997
6998 # Check whether --enable-shared was given.
6999 if test ${enable_shared+y}
7000 then :
7001 enableval=$enable_shared;
7002 fi
7003
7004 if test "$enable_shared" != no
7005 then
7006 have_shared=yes
7007
7008 fi
7009
7010
7011 ########################################
7012 #
7013 # Position independent code
7014 #
7015 # MinGW is always PIC
7016 if ! echo $host | grep mingw && test "$host_os" != "cygwin"
7017 then
7018
7019 if test "" == ""
7020 then
7021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler flag -fPIC works" >&5
7022 printf %s "checking if compiler flag -fPIC works... " >&6; }
7023 else
7024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking " >&5
7025 printf %s "checking ... " >&6; }
7026 fi
7027 save_CXXFLAGS="$CXXFLAGS"
7028 CXXFLAGS="$CXXFLAGS -fPIC"
7029
7030
7031
7032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7033 /* end confdefs.h. */
7034 int main(){}
7035 _ACEOF
7036 if ac_fn_cxx_try_compile "$LINENO"
7037 then :
7038 cvd_conf_test=1
7039 else $as_nop
7040 cvd_conf_test=0
7041 fi
7042 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7043
7044
7045
7046
7047 if test $cvd_conf_test = 1
7048 then
7049 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7050 printf "%s\n" "yes" >&6; }
7051 ts_success=yes
7052 else
7053 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7054 printf "%s\n" "no" >&6; }
7055 CXXFLAGS="$save_CXXFLAGS"
7056 ts_success=no
7057 fi
7058
7059 if test $ts_success == no
7060 then
7061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: \"I don't know how to compile position independent code.\"" >&5
7062 printf "%s\n" "$as_me: WARNING: \"I don't know how to compile position independent code.\"" >&2;}
7063 fi
7064 fi
7065
7066
7067 ################################################################################
7068 #
7069 # Processor/Platform specific parts
7070 #
7071
7072 echo
7073 echo ------------------------------------
7074 echo Checking processor specific features
7075 echo ------------------------------------
7076 echo
7077
7078 ac_header= ac_cache=
7079 for ac_item in $ac_header_cxx_list
7080 do
7081 if test $ac_cache; then
7082 ac_fn_cxx_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
7083 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
7084 printf "%s\n" "#define $ac_item 1" >> confdefs.h
7085 fi
7086 ac_header= ac_cache=
7087 elif test $ac_header; then
7088 ac_cache=$ac_item
7089 else
7090 ac_header=$ac_item
7091 fi
7092 done
7093
7094
7095
7096
7097
7098
7099
7100
7101 if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
7102 then :
7103
7104 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
7105
7106 fi
7107 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
7108 printf %s "checking whether byte ordering is bigendian... " >&6; }
7109 if test ${ac_cv_c_bigendian+y}
7110 then :
7111 printf %s "(cached) " >&6
7112 else $as_nop
7113 ac_cv_c_bigendian=unknown
7114 # See if we're dealing with a universal compiler.
7115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7116 /* end confdefs.h. */
7117 #ifndef __APPLE_CC__
7118 not a universal capable compiler
7119 #endif
7120 typedef int dummy;
7121
7122 _ACEOF
7123 if ac_fn_cxx_try_compile "$LINENO"
7124 then :
7125
7126 # Check for potential -arch flags. It is not universal unless
7127 # there are at least two -arch flags with different values.
7128 ac_arch=
7129 ac_prev=
7130 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
7131 if test -n "$ac_prev"; then
7132 case $ac_word in
7133 i?86 | x86_64 | ppc | ppc64)
7134 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
7135 ac_arch=$ac_word
7136 else
7137 ac_cv_c_bigendian=universal
7138 break
7139 fi
7140 ;;
7141 esac
7142 ac_prev=
7143 elif test "x$ac_word" = "x-arch"; then
7144 ac_prev=arch
7145 fi
7146 done
7147 fi
7148 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7149 if test $ac_cv_c_bigendian = unknown; then
7150 # See if sys/param.h defines the BYTE_ORDER macro.
7151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7152 /* end confdefs.h. */
7153 #include <sys/types.h>
7154 #include <sys/param.h>
7155
7156 int
7157 main (void)
7158 {
7159 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
7160 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
7161 && LITTLE_ENDIAN)
7162 bogus endian macros
7163 #endif
7164
7165 ;
7166 return 0;
7167 }
7168 _ACEOF
7169 if ac_fn_cxx_try_compile "$LINENO"
7170 then :
7171 # It does; now see whether it defined to BIG_ENDIAN or not.
7172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7173 /* end confdefs.h. */
7174 #include <sys/types.h>
7175 #include <sys/param.h>
7176
7177 int
7178 main (void)
7179 {
7180 #if BYTE_ORDER != BIG_ENDIAN
7181 not big endian
7182 #endif
7183
7184 ;
7185 return 0;
7186 }
7187 _ACEOF
7188 if ac_fn_cxx_try_compile "$LINENO"
7189 then :
7190 ac_cv_c_bigendian=yes
7191 else $as_nop
7192 ac_cv_c_bigendian=no
7193 fi
7194 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7195 fi
7196 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7197 fi
7198 if test $ac_cv_c_bigendian = unknown; then
7199 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
7200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7201 /* end confdefs.h. */
7202 #include <limits.h>
7203
7204 int
7205 main (void)
7206 {
7207 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
7208 bogus endian macros
7209 #endif
7210
7211 ;
7212 return 0;
7213 }
7214 _ACEOF
7215 if ac_fn_cxx_try_compile "$LINENO"
7216 then :
7217 # It does; now see whether it defined to _BIG_ENDIAN or not.
7218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7219 /* end confdefs.h. */
7220 #include <limits.h>
7221
7222 int
7223 main (void)
7224 {
7225 #ifndef _BIG_ENDIAN
7226 not big endian
7227 #endif
7228
7229 ;
7230 return 0;
7231 }
7232 _ACEOF
7233 if ac_fn_cxx_try_compile "$LINENO"
7234 then :
7235 ac_cv_c_bigendian=yes
7236 else $as_nop
7237 ac_cv_c_bigendian=no
7238 fi
7239 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7240 fi
7241 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7242 fi
7243 if test $ac_cv_c_bigendian = unknown; then
7244 # Compile a test program.
7245 if test "$cross_compiling" = yes
7246 then :
7247 # Try to guess by grepping values from an object file.
7248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7249 /* end confdefs.h. */
7250 unsigned short int ascii_mm[] =
7251 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
7252 unsigned short int ascii_ii[] =
7253 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
7254 int use_ascii (int i) {
7255 return ascii_mm[i] + ascii_ii[i];
7256 }
7257 unsigned short int ebcdic_ii[] =
7258 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
7259 unsigned short int ebcdic_mm[] =
7260 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
7261 int use_ebcdic (int i) {
7262 return ebcdic_mm[i] + ebcdic_ii[i];
7263 }
7264 extern int foo;
7265
7266 int
7267 main (void)
7268 {
7269 return use_ascii (foo) == use_ebcdic (foo);
7270 ;
7271 return 0;
7272 }
7273 _ACEOF
7274 if ac_fn_cxx_try_compile "$LINENO"
7275 then :
7276 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
7277 ac_cv_c_bigendian=yes
7278 fi
7279 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
7280 if test "$ac_cv_c_bigendian" = unknown; then
7281 ac_cv_c_bigendian=no
7282 else
7283 # finding both strings is unlikely to happen, but who knows?
7284 ac_cv_c_bigendian=unknown
7285 fi
7286 fi
7287 fi
7288 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7289 else $as_nop
7290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7291 /* end confdefs.h. */
7292 $ac_includes_default
7293 int
7294 main (void)
7295 {
7296
7297 /* Are we little or big endian? From Harbison&Steele. */
7298 union
7299 {
7300 long int l;
7301 char c[sizeof (long int)];
7302 } u;
7303 u.l = 1;
7304 return u.c[sizeof (long int) - 1] == 1;
7305
7306 ;
7307 return 0;
7308 }
7309 _ACEOF
7310 if ac_fn_cxx_try_run "$LINENO"
7311 then :
7312 ac_cv_c_bigendian=no
7313 else $as_nop
7314 ac_cv_c_bigendian=yes
7315 fi
7316 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7317 conftest.$ac_objext conftest.beam conftest.$ac_ext
7318 fi
7319
7320 fi
7321 fi
7322 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
7323 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
7324 case $ac_cv_c_bigendian in #(
7325 yes)
7326 printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h
7327 ;; #(
7328 no)
7329 ;; #(
7330 universal)
7331
7332 printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
7333
7334 ;; #(
7335 *)
7336 as_fn_error $? "unknown endianness
7337 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
7338 esac
7339
7340
7341 if test x$ac_cv_c_bigendian = xno
7342 then
7343 printf "%s\n" "#define CVD_INTERNAL_ARCH_LITTLE_ENDIAN 1" >>confdefs.h
7344
7345 else
7346 printf "%s\n" "#define CVD_INTERNAL_ARCH_BIG_ENDIAN 1" >>confdefs.h
7347
7348 fi
7349
7350
7351
7352
7353 # Check whether --with-simd was given.
7354 if test ${with_simd+y}
7355 then :
7356 withval=$with_simd;
7357 fi
7358
7359
7360 # Check whether --with-mmx was given.
7361 if test ${with_mmx+y}
7362 then :
7363 withval=$with_mmx;
7364 fi
7365
7366
7367 # Check whether --with-mmxext was given.
7368 if test ${with_mmxext+y}
7369 then :
7370 withval=$with_mmxext;
7371 fi
7372
7373
7374 # Check whether --with-sse was given.
7375 if test ${with_sse+y}
7376 then :
7377 withval=$with_sse;
7378 fi
7379
7380
7381 # Check whether --with-sse2 was given.
7382 if test ${with_sse2+y}
7383 then :
7384 withval=$with_sse2;
7385 fi
7386
7387
7388 # Check whether --with-assembler was given.
7389 if test ${with_assembler+y}
7390 then :
7391 withval=$with_assembler;
7392 fi
7393
7394
7395 # Check whether --with-inline_asm was given.
7396 if test ${with_inline_asm+y}
7397 then :
7398 withval=$with_inline_asm;
7399 fi
7400
7401
7402 case "$host" in
7403 *86*)
7404 have_x86=yes
7405
7406 simd_all_options="mmx mmxext sse sse2 sse3"
7407
7408
7409 if test "$with_simd" != no
7410 then
7411 if test "$with_mmx" == "yes"
7412 then
7413 have_mmx=yes
7414 elif test "$with_mmx" != "no"
7415 then
7416
7417 if test "for MMX support" == ""
7418 then
7419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler flag -mmmx works" >&5
7420 printf %s "checking if compiler flag -mmmx works... " >&6; }
7421 else
7422 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MMX support" >&5
7423 printf %s "checking for MMX support... " >&6; }
7424 fi
7425 save_CXXFLAGS="$CXXFLAGS"
7426 CXXFLAGS="$CXXFLAGS -mmmx"
7427
7428
7429
7430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7431 /* end confdefs.h. */
7432
7433 #include <mmintrin.h>
7434 int main()
7435 {
7436 __m64 a;
7437 a = _mm_setzero_si64();
7438 a = _mm_and_si64(a, a);
7439 return 0;
7440 }
7441 _ACEOF
7442 if ac_fn_cxx_try_compile "$LINENO"
7443 then :
7444 cvd_conf_test=1
7445 else $as_nop
7446 cvd_conf_test=0
7447 fi
7448 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7449
7450
7451
7452
7453 if test $cvd_conf_test = 1
7454 then
7455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7456 printf "%s\n" "yes" >&6; }
7457 ts_success=yes
7458 else
7459 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7460 printf "%s\n" "no" >&6; }
7461 CXXFLAGS="$save_CXXFLAGS"
7462 ts_success=no
7463 fi
7464
7465 have_mmx="$ts_success"
7466 fi
7467
7468 if test "$have_mmx" == yes
7469 then
7470 printf "%s\n" "#define CVD_HAVE_MMX 1" >>confdefs.h
7471
7472 have_mmx=yes
7473
7474 simd_options="$simd_options mmx"
7475 fi
7476 fi
7477
7478
7479 if test "$with_simd" != no
7480 then
7481 if test "$with_mmxext" == "yes"
7482 then
7483 have_mmxext=yes
7484 elif test "$with_mmxext" != "no"
7485 then
7486
7487 if test "for MMXEXT support" == ""
7488 then
7489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler flag -msse works" >&5
7490 printf %s "checking if compiler flag -msse works... " >&6; }
7491 else
7492 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MMXEXT support" >&5
7493 printf %s "checking for MMXEXT support... " >&6; }
7494 fi
7495 save_CXXFLAGS="$CXXFLAGS"
7496 CXXFLAGS="$CXXFLAGS -msse"
7497
7498
7499
7500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7501 /* end confdefs.h. */
7502
7503 #include <xmmintrin.h>
7504 int main()
7505 {
7506 __m64 a;
7507 a = _mm_setzero_si64();
7508 a = _mm_shuffle_pi16(a, 0);
7509 return 0;}
7510 _ACEOF
7511 if ac_fn_cxx_try_compile "$LINENO"
7512 then :
7513 cvd_conf_test=1
7514 else $as_nop
7515 cvd_conf_test=0
7516 fi
7517 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7518
7519
7520
7521
7522 if test $cvd_conf_test = 1
7523 then
7524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7525 printf "%s\n" "yes" >&6; }
7526 ts_success=yes
7527 else
7528 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7529 printf "%s\n" "no" >&6; }
7530 CXXFLAGS="$save_CXXFLAGS"
7531 ts_success=no
7532 fi
7533
7534 have_mmxext="$ts_success"
7535 fi
7536
7537 if test "$have_mmxext" == yes
7538 then
7539 printf "%s\n" "#define CVD_HAVE_MMXEXT 1" >>confdefs.h
7540
7541 have_mmxext=yes
7542
7543 simd_options="$simd_options mmxext"
7544 fi
7545 fi
7546
7547
7548 if test "$with_simd" != no
7549 then
7550 if test "$with_sse" == "yes"
7551 then
7552 have_sse=yes
7553 elif test "$with_sse" != "no"
7554 then
7555
7556 if test "for SSE support" == ""
7557 then
7558 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler flag -msse works" >&5
7559 printf %s "checking if compiler flag -msse works... " >&6; }
7560 else
7561 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSE support" >&5
7562 printf %s "checking for SSE support... " >&6; }
7563 fi
7564 save_CXXFLAGS="$CXXFLAGS"
7565 CXXFLAGS="$CXXFLAGS -msse"
7566
7567
7568
7569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7570 /* end confdefs.h. */
7571
7572 #include <xmmintrin.h>
7573 int main()
7574 {
7575 __m128 a;
7576 a = _mm_setzero_ps();
7577 a = _mm_add_ps(a, a);
7578 return 0;
7579 }
7580 _ACEOF
7581 if ac_fn_cxx_try_compile "$LINENO"
7582 then :
7583 cvd_conf_test=1
7584 else $as_nop
7585 cvd_conf_test=0
7586 fi
7587 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7588
7589
7590
7591
7592 if test $cvd_conf_test = 1
7593 then
7594 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7595 printf "%s\n" "yes" >&6; }
7596 ts_success=yes
7597 else
7598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7599 printf "%s\n" "no" >&6; }
7600 CXXFLAGS="$save_CXXFLAGS"
7601 ts_success=no
7602 fi
7603
7604 have_sse="$ts_success"
7605 fi
7606
7607 if test "$have_sse" == yes
7608 then
7609 printf "%s\n" "#define CVD_HAVE_SSE 1" >>confdefs.h
7610
7611 have_sse=yes
7612
7613 simd_options="$simd_options sse"
7614 fi
7615 fi
7616
7617
7618 if test "$with_simd" != no
7619 then
7620 if test "$with_sse2" == "yes"
7621 then
7622 have_sse2=yes
7623 elif test "$with_sse2" != "no"
7624 then
7625
7626 if test "for SSE2 support" == ""
7627 then
7628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler flag -msse2 works" >&5
7629 printf %s "checking if compiler flag -msse2 works... " >&6; }
7630 else
7631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSE2 support" >&5
7632 printf %s "checking for SSE2 support... " >&6; }
7633 fi
7634 save_CXXFLAGS="$CXXFLAGS"
7635 CXXFLAGS="$CXXFLAGS -msse2"
7636
7637
7638
7639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7640 /* end confdefs.h. */
7641
7642 #include <emmintrin.h>
7643 int main()
7644 {
7645 __m128d a;
7646 a = _mm_setzero_pd();
7647 a = _mm_add_pd(a, a);
7648 return 0;
7649 }
7650 _ACEOF
7651 if ac_fn_cxx_try_compile "$LINENO"
7652 then :
7653 cvd_conf_test=1
7654 else $as_nop
7655 cvd_conf_test=0
7656 fi
7657 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7658
7659
7660
7661
7662 if test $cvd_conf_test = 1
7663 then
7664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7665 printf "%s\n" "yes" >&6; }
7666 ts_success=yes
7667 else
7668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7669 printf "%s\n" "no" >&6; }
7670 CXXFLAGS="$save_CXXFLAGS"
7671 ts_success=no
7672 fi
7673
7674 have_sse2="$ts_success"
7675 fi
7676
7677 if test "$have_sse2" == yes
7678 then
7679 printf "%s\n" "#define CVD_HAVE_SSE2 1" >>confdefs.h
7680
7681 have_sse2=yes
7682
7683 simd_options="$simd_options sse2"
7684 fi
7685 fi
7686
7687
7688 if test "$with_simd" != no
7689 then
7690 if test "$with_sse3" == "yes"
7691 then
7692 have_sse3=yes
7693 elif test "$with_sse3" != "no"
7694 then
7695
7696 if test "for SSE3 support" == ""
7697 then
7698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler flag -msse3 works" >&5
7699 printf %s "checking if compiler flag -msse3 works... " >&6; }
7700 else
7701 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SSE3 support" >&5
7702 printf %s "checking for SSE3 support... " >&6; }
7703 fi
7704 save_CXXFLAGS="$CXXFLAGS"
7705 CXXFLAGS="$CXXFLAGS -msse3"
7706
7707
7708
7709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7710 /* end confdefs.h. */
7711
7712 #include <pmmintrin.h>
7713 int main()
7714 {
7715 __m128 a;
7716 a = _mm_setzero_ps();
7717 a = _mm_hadd_ps(a, a);
7718 return 0;
7719 }
7720 _ACEOF
7721 if ac_fn_cxx_try_compile "$LINENO"
7722 then :
7723 cvd_conf_test=1
7724 else $as_nop
7725 cvd_conf_test=0
7726 fi
7727 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7728
7729
7730
7731
7732 if test $cvd_conf_test = 1
7733 then
7734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7735 printf "%s\n" "yes" >&6; }
7736 ts_success=yes
7737 else
7738 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7739 printf "%s\n" "no" >&6; }
7740 CXXFLAGS="$save_CXXFLAGS"
7741 ts_success=no
7742 fi
7743
7744 have_sse3="$ts_success"
7745 fi
7746
7747 if test "$have_sse3" == yes
7748 then
7749 printf "%s\n" "#define CVD_HAVE_SSE3 1" >>confdefs.h
7750
7751 have_sse3=yes
7752
7753 simd_options="$simd_options sse3"
7754 fi
7755 fi
7756 ;;
7757 esac
7758
7759 # The cast to long int works around a bug in the HP C Compiler
7760 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7761 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7762 # This bug is HP SR number 8606223364.
7763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void*" >&5
7764 printf %s "checking size of void*... " >&6; }
7765 if test ${ac_cv_sizeof_voidp+y}
7766 then :
7767 printf %s "(cached) " >&6
7768 else $as_nop
7769 if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (void*))" "ac_cv_sizeof_voidp" "$ac_includes_default"
7770 then :
7771
7772 else $as_nop
7773 if test "$ac_cv_type_voidp" = yes; then
7774 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7775 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
7776 as_fn_error 77 "cannot compute sizeof (void*)
7777 See \`config.log' for more details" "$LINENO" 5; }
7778 else
7779 ac_cv_sizeof_voidp=0
7780 fi
7781 fi
7782
7783 fi
7784 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_voidp" >&5
7785 printf "%s\n" "$ac_cv_sizeof_voidp" >&6; }
7786
7787
7788
7789 printf "%s\n" "#define SIZEOF_VOIDP $ac_cv_sizeof_voidp" >>confdefs.h
7790
7791
7792 if test "$ac_cv_sizeof_voidp" == 4
7793 then
7794 have_32bit=yes
7795
7796 fi
7797
7798
7799
7800
7801 if test "$with_inline_asm" != no && test "$have_inline_asm" != yes
7802 then
7803 if test "$with_inline_asm" == ""
7804 then
7805 with_inline_asm=yes
7806 fi
7807
7808 save_LIBS="$LIBS"
7809 save_CXXFLAGS="$CXXFLAGS"
7810 a=
7811
7812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline asm statement" >&5
7813 printf %s "checking for inline asm statement... " >&6; }
7814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7815 /* end confdefs.h. */
7816 int main() { asm(""); }
7817 _ACEOF
7818 if ac_fn_cxx_try_compile "$LINENO"
7819 then :
7820 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7821 printf "%s\n" "yes" >&6; }
7822 else $as_nop
7823 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7824 printf "%s\n" "no" >&6; };a=1
7825 fi
7826 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7827
7828
7829 if test x$a == x
7830 then
7831 printf "%s\n" "#define CVD_HAVE_INLINE_ASM 1" >>confdefs.h
7832
7833 have_inline_asm=yes
7834
7835 options="$options inline_asm"
7836
7837 else
7838 LIBS="$save_LIBS"
7839 CXXFLAGS="$save_CXXFLAGS"
7840 fi
7841 fi
7842
7843 if test "$have_inline_asm" != yes
7844 then
7845 :
7846
7847 fi
7848
7849
7850
7851 if test "$with_assembler" != no && test "$have_assembler" != yes
7852 then
7853 if test "$with_assembler" == ""
7854 then
7855 with_assembler=yes
7856 fi
7857
7858 save_LIBS="$LIBS"
7859 save_CXXFLAGS="$CXXFLAGS"
7860 a=
7861
7862 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking assembler supports .type pseudo-op" >&5
7863 printf %s "checking assembler supports .type pseudo-op... " >&6; }
7864 if echo '.globl test
7865 .type test, @function' | as &> /dev/null
7866 then :
7867 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7868 printf "%s\n" "yes" >&6; }
7869 else $as_nop
7870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7871 printf "%s\n" "no" >&6; };a=1
7872 fi
7873
7874
7875 if test x$a == x
7876 then
7877 printf "%s\n" "#define CVD_HAVE_ASSEMBLER 1" >>confdefs.h
7878
7879 have_assembler=yes
7880
7881 options="$options assembler"
7882
7883 else
7884 LIBS="$save_LIBS"
7885 CXXFLAGS="$save_CXXFLAGS"
7886 fi
7887 fi
7888
7889 if test "$have_assembler" != yes
7890 then
7891 :
7892
7893 fi
7894
7895
7896 ################################################################################
7897 #
7898 # Operating system specific parts
7899 #
7900
7901 ########################################
7902 #
7903 # An OSX specific hack to get at stuff in /sw automatically
7904 #
7905
7906 echo
7907 echo -----------------------------------------------
7908 echo Checking for operating system specific features
7909 echo -----------------------------------------------
7910
7911
7912 # Check whether --with-dc1394v2 was given.
7913 if test ${with_dc1394v2+y}
7914 then :
7915 withval=$with_dc1394v2;
7916 fi
7917
7918
7919 # Check whether --with-v4l2buffer was given.
7920 if test ${with_v4l2buffer+y}
7921 then :
7922 withval=$with_v4l2buffer;
7923 fi
7924
7925
7926 if test "$host_vendor" == apple
7927 then
7928 CPPFLAGS="$CPPFLAGS -I/usr/X11R6/include"
7929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Adding /usr/X11R6/include to the build path." >&5
7930 printf "%s\n" "$as_me: Adding /usr/X11R6/include to the build path." >&6;}
7931 osx_hacks=yes
7932
7933 os_all_options="dc1394v2"
7934 fi
7935
7936
7937 if test "$with_dc1394v2" != no && test "$have_dc1394v2" != yes
7938 then
7939 if test "$with_dc1394v2" == ""
7940 then
7941 with_dc1394v2=yes
7942 fi
7943
7944 save_LIBS="$LIBS"
7945 save_CXXFLAGS="$CXXFLAGS"
7946 a=
7947
7948 for ac_header in dc1394/dc1394.h
7949 do :
7950 ac_fn_cxx_check_header_compile "$LINENO" "dc1394/dc1394.h" "ac_cv_header_dc1394_dc1394_h" "$ac_includes_default"
7951 if test "x$ac_cv_header_dc1394_dc1394_h" = xyes
7952 then :
7953 printf "%s\n" "#define HAVE_DC1394_DC1394_H 1" >>confdefs.h
7954
7955 else $as_nop
7956 a=1
7957 fi
7958
7959 done
7960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -ldc1394" >&5
7961 printf %s "checking for main in -ldc1394... " >&6; }
7962 if test ${ac_cv_lib_dc1394_main+y}
7963 then :
7964 printf %s "(cached) " >&6
7965 else $as_nop
7966 ac_check_lib_save_LIBS=$LIBS
7967 LIBS="-ldc1394 $LIBS"
7968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7969 /* end confdefs.h. */
7970
7971 namespace conftest {
7972 extern "C" int main ();
7973 }
7974 int
7975 main (void)
7976 {
7977 return conftest::main ();
7978 ;
7979 return 0;
7980 }
7981 _ACEOF
7982 if ac_fn_cxx_try_link "$LINENO"
7983 then :
7984 ac_cv_lib_dc1394_main=yes
7985 else $as_nop
7986 ac_cv_lib_dc1394_main=no
7987 fi
7988 rm -f core conftest.err conftest.$ac_objext conftest.beam \
7989 conftest$ac_exeext conftest.$ac_ext
7990 LIBS=$ac_check_lib_save_LIBS
7991 fi
7992 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dc1394_main" >&5
7993 printf "%s\n" "$ac_cv_lib_dc1394_main" >&6; }
7994 if test "x$ac_cv_lib_dc1394_main" = xyes
7995 then :
7996 printf "%s\n" "#define HAVE_LIBDC1394 1" >>confdefs.h
7997
7998 LIBS="-ldc1394 $LIBS"
7999
8000 else $as_nop
8001 a=1
8002 fi
8003
8004
8005
8006 if test x$a == x
8007 then
8008 printf "%s\n" "#define CVD_HAVE_DC1394V2 1" >>confdefs.h
8009
8010 have_dc1394v2=yes
8011
8012 options="$options dc1394v2"
8013
8014 else
8015 LIBS="$save_LIBS"
8016 CXXFLAGS="$save_CXXFLAGS"
8017 fi
8018 fi
8019
8020 if test "$have_dc1394v2" != yes
8021 then
8022 :
8023
8024 fi
8025
8026
8027 case "$host" in
8028 *linux*)
8029 os_all_options="dc1394v2 v4l2buffer"
8030
8031
8032 if test "$with_v4l2buffer" != no && test "$have_v4l2buffer" != yes
8033 then
8034 if test "$with_v4l2buffer" == ""
8035 then
8036 with_v4l2buffer=yes
8037 fi
8038
8039 save_LIBS="$LIBS"
8040 save_CXXFLAGS="$CXXFLAGS"
8041 a=
8042
8043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for v4l2" >&5
8044 printf %s "checking for v4l2... " >&6; }
8045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8046 /* end confdefs.h. */
8047 #include <sys/types.h>
8048 #include <linux/types.h>
8049 #include <linux/videodev2.h>
8050 int main(){V4L2_PIX_FMT_GREY;return 0;}
8051 _ACEOF
8052 if ac_fn_cxx_try_compile "$LINENO"
8053 then :
8054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8055 printf "%s\n" "yes" >&6; }
8056 else $as_nop
8057 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8058 printf "%s\n" "no" >&6; }; a=1
8059 fi
8060 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8061
8062
8063 if test x$a == x
8064 then
8065 printf "%s\n" "#define CVD_HAVE_V4L2BUFFER 1" >>confdefs.h
8066
8067 have_v4l2buffer=yes
8068
8069 options="$options v4l2buffer"
8070
8071 else
8072 LIBS="$save_LIBS"
8073 CXXFLAGS="$save_CXXFLAGS"
8074 fi
8075 fi
8076
8077 if test "$have_v4l2buffer" != yes
8078 then
8079 :
8080
8081 fi
8082
8083
8084
8085 ;;
8086 *windows*)
8087 have_windows=yes
8088
8089 ;;
8090 *cygwin*)
8091 cygwin_hacks=yes
8092
8093 ;;
8094
8095
8096 esac
8097
8098 ################################################################################
8099 #
8100 #Check for optional libraries
8101 #
8102
8103 echo
8104 echo -------------------------------
8105 echo Checking for optional libraries
8106 echo -------------------------------
8107
8108
8109 # Check whether --with-videodisplay was given.
8110 if test ${with_videodisplay+y}
8111 then :
8112 withval=$with_videodisplay;
8113 fi
8114
8115
8116 # Check whether --with-jpeg was given.
8117 if test ${with_jpeg+y}
8118 then :
8119 withval=$with_jpeg;
8120 fi
8121
8122
8123 # Check whether --with-jpegbuffer was given.
8124 if test ${with_jpegbuffer+y}
8125 then :
8126 withval=$with_jpegbuffer;
8127 fi
8128
8129
8130 # Check whether --with-tiff was given.
8131 if test ${with_tiff+y}
8132 then :
8133 withval=$with_tiff;
8134 fi
8135
8136
8137 # Check whether --with-png was given.
8138 if test ${with_png+y}
8139 then :
8140 withval=$with_png;
8141 fi
8142
8143
8144 # Check whether --with-ffmpeg was given.
8145 if test ${with_ffmpeg+y}
8146 then :
8147 withval=$with_ffmpeg;
8148 fi
8149
8150
8151 # Check whether --with-toon was given.
8152 if test ${with_toon+y}
8153 then :
8154 withval=$with_toon;
8155 fi
8156
8157
8158
8159 if test "$with_videodisplay" != no && test "$have_videodisplay" != yes
8160 then
8161 if test "$with_videodisplay" == ""
8162 then
8163 with_videodisplay=yes
8164 fi
8165
8166 save_LIBS="$LIBS"
8167 save_CXXFLAGS="$CXXFLAGS"
8168 a=
8169
8170 if test "$host_vendor" == apple
8171 then
8172 LIBS="$LIBS -framework OpenGL "
8173 fi
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184 ac_ext=c
8185 ac_cpp='$CPP $CPPFLAGS'
8186 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8187 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8188 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8189 if test -n "$ac_tool_prefix"; then
8190 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
8191 set dummy ${ac_tool_prefix}gcc; ac_word=$2
8192 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8193 printf %s "checking for $ac_word... " >&6; }
8194 if test ${ac_cv_prog_CC+y}
8195 then :
8196 printf %s "(cached) " >&6
8197 else $as_nop
8198 if test -n "$CC"; then
8199 ac_cv_prog_CC="$CC" # Let the user override the test.
8200 else
8201 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8202 for as_dir in $PATH
8203 do
8204 IFS=$as_save_IFS
8205 case $as_dir in #(((
8206 '') as_dir=./ ;;
8207 */) ;;
8208 *) as_dir=$as_dir/ ;;
8209 esac
8210 for ac_exec_ext in '' $ac_executable_extensions; do
8211 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8212 ac_cv_prog_CC="${ac_tool_prefix}gcc"
8213 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8214 break 2
8215 fi
8216 done
8217 done
8218 IFS=$as_save_IFS
8219
8220 fi
8221 fi
8222 CC=$ac_cv_prog_CC
8223 if test -n "$CC"; then
8224 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8225 printf "%s\n" "$CC" >&6; }
8226 else
8227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8228 printf "%s\n" "no" >&6; }
8229 fi
8230
8231
8232 fi
8233 if test -z "$ac_cv_prog_CC"; then
8234 ac_ct_CC=$CC
8235 # Extract the first word of "gcc", so it can be a program name with args.
8236 set dummy gcc; ac_word=$2
8237 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8238 printf %s "checking for $ac_word... " >&6; }
8239 if test ${ac_cv_prog_ac_ct_CC+y}
8240 then :
8241 printf %s "(cached) " >&6
8242 else $as_nop
8243 if test -n "$ac_ct_CC"; then
8244 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
8245 else
8246 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8247 for as_dir in $PATH
8248 do
8249 IFS=$as_save_IFS
8250 case $as_dir in #(((
8251 '') as_dir=./ ;;
8252 */) ;;
8253 *) as_dir=$as_dir/ ;;
8254 esac
8255 for ac_exec_ext in '' $ac_executable_extensions; do
8256 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8257 ac_cv_prog_ac_ct_CC="gcc"
8258 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8259 break 2
8260 fi
8261 done
8262 done
8263 IFS=$as_save_IFS
8264
8265 fi
8266 fi
8267 ac_ct_CC=$ac_cv_prog_ac_ct_CC
8268 if test -n "$ac_ct_CC"; then
8269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
8270 printf "%s\n" "$ac_ct_CC" >&6; }
8271 else
8272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8273 printf "%s\n" "no" >&6; }
8274 fi
8275
8276 if test "x$ac_ct_CC" = x; then
8277 CC=""
8278 else
8279 case $cross_compiling:$ac_tool_warned in
8280 yes:)
8281 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8282 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8283 ac_tool_warned=yes ;;
8284 esac
8285 CC=$ac_ct_CC
8286 fi
8287 else
8288 CC="$ac_cv_prog_CC"
8289 fi
8290
8291 if test -z "$CC"; then
8292 if test -n "$ac_tool_prefix"; then
8293 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
8294 set dummy ${ac_tool_prefix}cc; ac_word=$2
8295 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8296 printf %s "checking for $ac_word... " >&6; }
8297 if test ${ac_cv_prog_CC+y}
8298 then :
8299 printf %s "(cached) " >&6
8300 else $as_nop
8301 if test -n "$CC"; then
8302 ac_cv_prog_CC="$CC" # Let the user override the test.
8303 else
8304 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8305 for as_dir in $PATH
8306 do
8307 IFS=$as_save_IFS
8308 case $as_dir in #(((
8309 '') as_dir=./ ;;
8310 */) ;;
8311 *) as_dir=$as_dir/ ;;
8312 esac
8313 for ac_exec_ext in '' $ac_executable_extensions; do
8314 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8315 ac_cv_prog_CC="${ac_tool_prefix}cc"
8316 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8317 break 2
8318 fi
8319 done
8320 done
8321 IFS=$as_save_IFS
8322
8323 fi
8324 fi
8325 CC=$ac_cv_prog_CC
8326 if test -n "$CC"; then
8327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8328 printf "%s\n" "$CC" >&6; }
8329 else
8330 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8331 printf "%s\n" "no" >&6; }
8332 fi
8333
8334
8335 fi
8336 fi
8337 if test -z "$CC"; then
8338 # Extract the first word of "cc", so it can be a program name with args.
8339 set dummy cc; ac_word=$2
8340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8341 printf %s "checking for $ac_word... " >&6; }
8342 if test ${ac_cv_prog_CC+y}
8343 then :
8344 printf %s "(cached) " >&6
8345 else $as_nop
8346 if test -n "$CC"; then
8347 ac_cv_prog_CC="$CC" # Let the user override the test.
8348 else
8349 ac_prog_rejected=no
8350 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8351 for as_dir in $PATH
8352 do
8353 IFS=$as_save_IFS
8354 case $as_dir in #(((
8355 '') as_dir=./ ;;
8356 */) ;;
8357 *) as_dir=$as_dir/ ;;
8358 esac
8359 for ac_exec_ext in '' $ac_executable_extensions; do
8360 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8361 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
8362 ac_prog_rejected=yes
8363 continue
8364 fi
8365 ac_cv_prog_CC="cc"
8366 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8367 break 2
8368 fi
8369 done
8370 done
8371 IFS=$as_save_IFS
8372
8373 if test $ac_prog_rejected = yes; then
8374 # We found a bogon in the path, so make sure we never use it.
8375 set dummy $ac_cv_prog_CC
8376 shift
8377 if test $# != 0; then
8378 # We chose a different compiler from the bogus one.
8379 # However, it has the same basename, so the bogon will be chosen
8380 # first if we set CC to just the basename; use the full file name.
8381 shift
8382 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
8383 fi
8384 fi
8385 fi
8386 fi
8387 CC=$ac_cv_prog_CC
8388 if test -n "$CC"; then
8389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8390 printf "%s\n" "$CC" >&6; }
8391 else
8392 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8393 printf "%s\n" "no" >&6; }
8394 fi
8395
8396
8397 fi
8398 if test -z "$CC"; then
8399 if test -n "$ac_tool_prefix"; then
8400 for ac_prog in cl.exe
8401 do
8402 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8403 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8405 printf %s "checking for $ac_word... " >&6; }
8406 if test ${ac_cv_prog_CC+y}
8407 then :
8408 printf %s "(cached) " >&6
8409 else $as_nop
8410 if test -n "$CC"; then
8411 ac_cv_prog_CC="$CC" # Let the user override the test.
8412 else
8413 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8414 for as_dir in $PATH
8415 do
8416 IFS=$as_save_IFS
8417 case $as_dir in #(((
8418 '') as_dir=./ ;;
8419 */) ;;
8420 *) as_dir=$as_dir/ ;;
8421 esac
8422 for ac_exec_ext in '' $ac_executable_extensions; do
8423 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8424 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
8425 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8426 break 2
8427 fi
8428 done
8429 done
8430 IFS=$as_save_IFS
8431
8432 fi
8433 fi
8434 CC=$ac_cv_prog_CC
8435 if test -n "$CC"; then
8436 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8437 printf "%s\n" "$CC" >&6; }
8438 else
8439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8440 printf "%s\n" "no" >&6; }
8441 fi
8442
8443
8444 test -n "$CC" && break
8445 done
8446 fi
8447 if test -z "$CC"; then
8448 ac_ct_CC=$CC
8449 for ac_prog in cl.exe
8450 do
8451 # Extract the first word of "$ac_prog", so it can be a program name with args.
8452 set dummy $ac_prog; ac_word=$2
8453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8454 printf %s "checking for $ac_word... " >&6; }
8455 if test ${ac_cv_prog_ac_ct_CC+y}
8456 then :
8457 printf %s "(cached) " >&6
8458 else $as_nop
8459 if test -n "$ac_ct_CC"; then
8460 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
8461 else
8462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8463 for as_dir in $PATH
8464 do
8465 IFS=$as_save_IFS
8466 case $as_dir in #(((
8467 '') as_dir=./ ;;
8468 */) ;;
8469 *) as_dir=$as_dir/ ;;
8470 esac
8471 for ac_exec_ext in '' $ac_executable_extensions; do
8472 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8473 ac_cv_prog_ac_ct_CC="$ac_prog"
8474 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8475 break 2
8476 fi
8477 done
8478 done
8479 IFS=$as_save_IFS
8480
8481 fi
8482 fi
8483 ac_ct_CC=$ac_cv_prog_ac_ct_CC
8484 if test -n "$ac_ct_CC"; then
8485 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
8486 printf "%s\n" "$ac_ct_CC" >&6; }
8487 else
8488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8489 printf "%s\n" "no" >&6; }
8490 fi
8491
8492
8493 test -n "$ac_ct_CC" && break
8494 done
8495
8496 if test "x$ac_ct_CC" = x; then
8497 CC=""
8498 else
8499 case $cross_compiling:$ac_tool_warned in
8500 yes:)
8501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8502 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8503 ac_tool_warned=yes ;;
8504 esac
8505 CC=$ac_ct_CC
8506 fi
8507 fi
8508
8509 fi
8510 if test -z "$CC"; then
8511 if test -n "$ac_tool_prefix"; then
8512 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
8513 set dummy ${ac_tool_prefix}clang; ac_word=$2
8514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8515 printf %s "checking for $ac_word... " >&6; }
8516 if test ${ac_cv_prog_CC+y}
8517 then :
8518 printf %s "(cached) " >&6
8519 else $as_nop
8520 if test -n "$CC"; then
8521 ac_cv_prog_CC="$CC" # Let the user override the test.
8522 else
8523 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8524 for as_dir in $PATH
8525 do
8526 IFS=$as_save_IFS
8527 case $as_dir in #(((
8528 '') as_dir=./ ;;
8529 */) ;;
8530 *) as_dir=$as_dir/ ;;
8531 esac
8532 for ac_exec_ext in '' $ac_executable_extensions; do
8533 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8534 ac_cv_prog_CC="${ac_tool_prefix}clang"
8535 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8536 break 2
8537 fi
8538 done
8539 done
8540 IFS=$as_save_IFS
8541
8542 fi
8543 fi
8544 CC=$ac_cv_prog_CC
8545 if test -n "$CC"; then
8546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
8547 printf "%s\n" "$CC" >&6; }
8548 else
8549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8550 printf "%s\n" "no" >&6; }
8551 fi
8552
8553
8554 fi
8555 if test -z "$ac_cv_prog_CC"; then
8556 ac_ct_CC=$CC
8557 # Extract the first word of "clang", so it can be a program name with args.
8558 set dummy clang; ac_word=$2
8559 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8560 printf %s "checking for $ac_word... " >&6; }
8561 if test ${ac_cv_prog_ac_ct_CC+y}
8562 then :
8563 printf %s "(cached) " >&6
8564 else $as_nop
8565 if test -n "$ac_ct_CC"; then
8566 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
8567 else
8568 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8569 for as_dir in $PATH
8570 do
8571 IFS=$as_save_IFS
8572 case $as_dir in #(((
8573 '') as_dir=./ ;;
8574 */) ;;
8575 *) as_dir=$as_dir/ ;;
8576 esac
8577 for ac_exec_ext in '' $ac_executable_extensions; do
8578 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8579 ac_cv_prog_ac_ct_CC="clang"
8580 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8581 break 2
8582 fi
8583 done
8584 done
8585 IFS=$as_save_IFS
8586
8587 fi
8588 fi
8589 ac_ct_CC=$ac_cv_prog_ac_ct_CC
8590 if test -n "$ac_ct_CC"; then
8591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
8592 printf "%s\n" "$ac_ct_CC" >&6; }
8593 else
8594 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8595 printf "%s\n" "no" >&6; }
8596 fi
8597
8598 if test "x$ac_ct_CC" = x; then
8599 CC=""
8600 else
8601 case $cross_compiling:$ac_tool_warned in
8602 yes:)
8603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8604 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8605 ac_tool_warned=yes ;;
8606 esac
8607 CC=$ac_ct_CC
8608 fi
8609 else
8610 CC="$ac_cv_prog_CC"
8611 fi
8612
8613 fi
8614
8615
8616 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8617 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
8618 as_fn_error $? "no acceptable C compiler found in \$PATH
8619 See \`config.log' for more details" "$LINENO" 5; }
8620
8621 # Provide some information about the compiler.
8622 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
8623 set X $ac_compile
8624 ac_compiler=$2
8625 for ac_option in --version -v -V -qversion -version; do
8626 { { ac_try="$ac_compiler $ac_option >&5"
8627 case "(($ac_try" in
8628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8629 *) ac_try_echo=$ac_try;;
8630 esac
8631 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
8632 printf "%s\n" "$ac_try_echo"; } >&5
8633 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
8634 ac_status=$?
8635 if test -s conftest.err; then
8636 sed '10a\
8637 ... rest of stderr output deleted ...
8638 10q' conftest.err >conftest.er1
8639 cat conftest.er1 >&5
8640 fi
8641 rm -f conftest.er1 conftest.err
8642 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8643 test $ac_status = 0; }
8644 done
8645
8646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
8647 printf %s "checking whether the compiler supports GNU C... " >&6; }
8648 if test ${ac_cv_c_compiler_gnu+y}
8649 then :
8650 printf %s "(cached) " >&6
8651 else $as_nop
8652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8653 /* end confdefs.h. */
8654
8655 int
8656 main (void)
8657 {
8658 #ifndef __GNUC__
8659 choke me
8660 #endif
8661
8662 ;
8663 return 0;
8664 }
8665 _ACEOF
8666 if ac_fn_c_try_compile "$LINENO"
8667 then :
8668 ac_compiler_gnu=yes
8669 else $as_nop
8670 ac_compiler_gnu=no
8671 fi
8672 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8673 ac_cv_c_compiler_gnu=$ac_compiler_gnu
8674
8675 fi
8676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
8677 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
8678 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8679
8680 if test $ac_compiler_gnu = yes; then
8681 GCC=yes
8682 else
8683 GCC=
8684 fi
8685 ac_test_CFLAGS=${CFLAGS+y}
8686 ac_save_CFLAGS=$CFLAGS
8687 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
8688 printf %s "checking whether $CC accepts -g... " >&6; }
8689 if test ${ac_cv_prog_cc_g+y}
8690 then :
8691 printf %s "(cached) " >&6
8692 else $as_nop
8693 ac_save_c_werror_flag=$ac_c_werror_flag
8694 ac_c_werror_flag=yes
8695 ac_cv_prog_cc_g=no
8696 CFLAGS="-g"
8697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8698 /* end confdefs.h. */
8699
8700 int
8701 main (void)
8702 {
8703
8704 ;
8705 return 0;
8706 }
8707 _ACEOF
8708 if ac_fn_c_try_compile "$LINENO"
8709 then :
8710 ac_cv_prog_cc_g=yes
8711 else $as_nop
8712 CFLAGS=""
8713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8714 /* end confdefs.h. */
8715
8716 int
8717 main (void)
8718 {
8719
8720 ;
8721 return 0;
8722 }
8723 _ACEOF
8724 if ac_fn_c_try_compile "$LINENO"
8725 then :
8726
8727 else $as_nop
8728 ac_c_werror_flag=$ac_save_c_werror_flag
8729 CFLAGS="-g"
8730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8731 /* end confdefs.h. */
8732
8733 int
8734 main (void)
8735 {
8736
8737 ;
8738 return 0;
8739 }
8740 _ACEOF
8741 if ac_fn_c_try_compile "$LINENO"
8742 then :
8743 ac_cv_prog_cc_g=yes
8744 fi
8745 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8746 fi
8747 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8748 fi
8749 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
8750 ac_c_werror_flag=$ac_save_c_werror_flag
8751 fi
8752 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
8753 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
8754 if test $ac_test_CFLAGS; then
8755 CFLAGS=$ac_save_CFLAGS
8756 elif test $ac_cv_prog_cc_g = yes; then
8757 if test "$GCC" = yes; then
8758 CFLAGS="-g -O2"
8759 else
8760 CFLAGS="-g"
8761 fi
8762 else
8763 if test "$GCC" = yes; then
8764 CFLAGS="-O2"
8765 else
8766 CFLAGS=
8767 fi
8768 fi
8769 ac_prog_cc_stdc=no
8770 if test x$ac_prog_cc_stdc = xno
8771 then :
8772 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
8773 printf %s "checking for $CC option to enable C11 features... " >&6; }
8774 if test ${ac_cv_prog_cc_c11+y}
8775 then :
8776 printf %s "(cached) " >&6
8777 else $as_nop
8778 ac_cv_prog_cc_c11=no
8779 ac_save_CC=$CC
8780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8781 /* end confdefs.h. */
8782 $ac_c_conftest_c11_program
8783 _ACEOF
8784 for ac_arg in '' -std=gnu11
8785 do
8786 CC="$ac_save_CC $ac_arg"
8787 if ac_fn_c_try_compile "$LINENO"
8788 then :
8789 ac_cv_prog_cc_c11=$ac_arg
8790 fi
8791 rm -f core conftest.err conftest.$ac_objext conftest.beam
8792 test "x$ac_cv_prog_cc_c11" != "xno" && break
8793 done
8794 rm -f conftest.$ac_ext
8795 CC=$ac_save_CC
8796 fi
8797
8798 if test "x$ac_cv_prog_cc_c11" = xno
8799 then :
8800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
8801 printf "%s\n" "unsupported" >&6; }
8802 else $as_nop
8803 if test "x$ac_cv_prog_cc_c11" = x
8804 then :
8805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
8806 printf "%s\n" "none needed" >&6; }
8807 else $as_nop
8808 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
8809 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
8810 CC="$CC $ac_cv_prog_cc_c11"
8811 fi
8812 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
8813 ac_prog_cc_stdc=c11
8814 fi
8815 fi
8816 if test x$ac_prog_cc_stdc = xno
8817 then :
8818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
8819 printf %s "checking for $CC option to enable C99 features... " >&6; }
8820 if test ${ac_cv_prog_cc_c99+y}
8821 then :
8822 printf %s "(cached) " >&6
8823 else $as_nop
8824 ac_cv_prog_cc_c99=no
8825 ac_save_CC=$CC
8826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8827 /* end confdefs.h. */
8828 $ac_c_conftest_c99_program
8829 _ACEOF
8830 for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
8831 do
8832 CC="$ac_save_CC $ac_arg"
8833 if ac_fn_c_try_compile "$LINENO"
8834 then :
8835 ac_cv_prog_cc_c99=$ac_arg
8836 fi
8837 rm -f core conftest.err conftest.$ac_objext conftest.beam
8838 test "x$ac_cv_prog_cc_c99" != "xno" && break
8839 done
8840 rm -f conftest.$ac_ext
8841 CC=$ac_save_CC
8842 fi
8843
8844 if test "x$ac_cv_prog_cc_c99" = xno
8845 then :
8846 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
8847 printf "%s\n" "unsupported" >&6; }
8848 else $as_nop
8849 if test "x$ac_cv_prog_cc_c99" = x
8850 then :
8851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
8852 printf "%s\n" "none needed" >&6; }
8853 else $as_nop
8854 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
8855 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
8856 CC="$CC $ac_cv_prog_cc_c99"
8857 fi
8858 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
8859 ac_prog_cc_stdc=c99
8860 fi
8861 fi
8862 if test x$ac_prog_cc_stdc = xno
8863 then :
8864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
8865 printf %s "checking for $CC option to enable C89 features... " >&6; }
8866 if test ${ac_cv_prog_cc_c89+y}
8867 then :
8868 printf %s "(cached) " >&6
8869 else $as_nop
8870 ac_cv_prog_cc_c89=no
8871 ac_save_CC=$CC
8872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8873 /* end confdefs.h. */
8874 $ac_c_conftest_c89_program
8875 _ACEOF
8876 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8877 do
8878 CC="$ac_save_CC $ac_arg"
8879 if ac_fn_c_try_compile "$LINENO"
8880 then :
8881 ac_cv_prog_cc_c89=$ac_arg
8882 fi
8883 rm -f core conftest.err conftest.$ac_objext conftest.beam
8884 test "x$ac_cv_prog_cc_c89" != "xno" && break
8885 done
8886 rm -f conftest.$ac_ext
8887 CC=$ac_save_CC
8888 fi
8889
8890 if test "x$ac_cv_prog_cc_c89" = xno
8891 then :
8892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
8893 printf "%s\n" "unsupported" >&6; }
8894 else $as_nop
8895 if test "x$ac_cv_prog_cc_c89" = x
8896 then :
8897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
8898 printf "%s\n" "none needed" >&6; }
8899 else $as_nop
8900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
8901 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
8902 CC="$CC $ac_cv_prog_cc_c89"
8903 fi
8904 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
8905 ac_prog_cc_stdc=c89
8906 fi
8907 fi
8908
8909 ac_ext=cpp
8910 ac_cpp='$CXXCPP $CPPFLAGS'
8911 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8912 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8913 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8914
8915 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X" >&5
8916 printf %s "checking for X... " >&6; }
8917
8918
8919 # Check whether --with-x was given.
8920 if test ${with_x+y}
8921 then :
8922 withval=$with_x;
8923 fi
8924
8925 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8926 if test "x$with_x" = xno; then
8927 # The user explicitly disabled X.
8928 have_x=disabled
8929 else
8930 case $x_includes,$x_libraries in #(
8931 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
8932 *,NONE | NONE,*) if test ${ac_cv_have_x+y}
8933 then :
8934 printf %s "(cached) " >&6
8935 else $as_nop
8936 # One or both of the vars are not set, and there is no cached value.
8937 ac_x_includes=no
8938 ac_x_libraries=no
8939 # Do we need to do anything special at all?
8940 ac_save_LIBS=$LIBS
8941 LIBS="-lX11 $LIBS"
8942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8943 /* end confdefs.h. */
8944 #include <X11/Xlib.h>
8945 int
8946 main (void)
8947 {
8948 XrmInitialize ()
8949 ;
8950 return 0;
8951 }
8952 _ACEOF
8953 if ac_fn_cxx_try_link "$LINENO"
8954 then :
8955 # We can compile and link X programs with no special options.
8956 ac_x_includes=
8957 ac_x_libraries=
8958 fi
8959 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8960 conftest$ac_exeext conftest.$ac_ext
8961 LIBS="$ac_save_LIBS"
8962 # If that didn't work, only try xmkmf and file system searches
8963 # for native compilation.
8964 if test x"$ac_x_includes" = xno && test "$cross_compiling" = no
8965 then :
8966 rm -f -r conftest.dir
8967 if mkdir conftest.dir; then
8968 cd conftest.dir
8969 cat >Imakefile <<'_ACEOF'
8970 incroot:
8971 @echo incroot='${INCROOT}'
8972 usrlibdir:
8973 @echo usrlibdir='${USRLIBDIR}'
8974 libdir:
8975 @echo libdir='${LIBDIR}'
8976 _ACEOF
8977 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
8978 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
8979 for ac_var in incroot usrlibdir libdir; do
8980 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8981 done
8982 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8983 for ac_extension in a so sl dylib la dll; do
8984 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8985 test -f "$ac_im_libdir/libX11.$ac_extension"; then
8986 ac_im_usrlibdir=$ac_im_libdir; break
8987 fi
8988 done
8989 # Screen out bogus values from the imake configuration. They are
8990 # bogus both because they are the default anyway, and because
8991 # using them would break gcc on systems where it needs fixed includes.
8992 case $ac_im_incroot in
8993 /usr/include) ac_x_includes= ;;
8994 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8995 esac
8996 case $ac_im_usrlibdir in
8997 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
8998 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8999 esac
9000 fi
9001 cd ..
9002 rm -f -r conftest.dir
9003 fi
9004
9005 # Standard set of common directories for X headers.
9006 # Check X11 before X11Rn because it is often a symlink to the current release.
9007 ac_x_header_dirs='
9008 /usr/X11/include
9009 /usr/X11R7/include
9010 /usr/X11R6/include
9011 /usr/X11R5/include
9012 /usr/X11R4/include
9013
9014 /usr/include/X11
9015 /usr/include/X11R7
9016 /usr/include/X11R6
9017 /usr/include/X11R5
9018 /usr/include/X11R4
9019
9020 /usr/local/X11/include
9021 /usr/local/X11R7/include
9022 /usr/local/X11R6/include
9023 /usr/local/X11R5/include
9024 /usr/local/X11R4/include
9025
9026 /usr/local/include/X11
9027 /usr/local/include/X11R7
9028 /usr/local/include/X11R6
9029 /usr/local/include/X11R5
9030 /usr/local/include/X11R4
9031
9032 /opt/X11/include
9033
9034 /usr/X386/include
9035 /usr/x386/include
9036 /usr/XFree86/include/X11
9037
9038 /usr/include
9039 /usr/local/include
9040 /usr/unsupported/include
9041 /usr/athena/include
9042 /usr/local/x11r5/include
9043 /usr/lpp/Xamples/include
9044
9045 /usr/openwin/include
9046 /usr/openwin/share/include'
9047
9048 if test "$ac_x_includes" = no; then
9049 # Guess where to find include files, by looking for Xlib.h.
9050 # First, try using that file with no special directory specified.
9051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9052 /* end confdefs.h. */
9053 #include <X11/Xlib.h>
9054 _ACEOF
9055 if ac_fn_cxx_try_cpp "$LINENO"
9056 then :
9057 # We can compile using X headers with no special include directory.
9058 ac_x_includes=
9059 else $as_nop
9060 for ac_dir in $ac_x_header_dirs; do
9061 if test -r "$ac_dir/X11/Xlib.h"; then
9062 ac_x_includes=$ac_dir
9063 break
9064 fi
9065 done
9066 fi
9067 rm -f conftest.err conftest.i conftest.$ac_ext
9068 fi # $ac_x_includes = no
9069
9070 if test "$ac_x_libraries" = no; then
9071 # Check for the libraries.
9072 # See if we find them without any special options.
9073 # Don't add to $LIBS permanently.
9074 ac_save_LIBS=$LIBS
9075 LIBS="-lX11 $LIBS"
9076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9077 /* end confdefs.h. */
9078 #include <X11/Xlib.h>
9079 int
9080 main (void)
9081 {
9082 XrmInitialize ()
9083 ;
9084 return 0;
9085 }
9086 _ACEOF
9087 if ac_fn_cxx_try_link "$LINENO"
9088 then :
9089 LIBS=$ac_save_LIBS
9090 # We can link X programs with no special library path.
9091 ac_x_libraries=
9092 else $as_nop
9093 LIBS=$ac_save_LIBS
9094 for ac_dir in `printf "%s\n" "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9095 do
9096 # Don't even attempt the hair of trying to link an X program!
9097 for ac_extension in a so sl dylib la dll; do
9098 if test -r "$ac_dir/libX11.$ac_extension"; then
9099 ac_x_libraries=$ac_dir
9100 break 2
9101 fi
9102 done
9103 done
9104 fi
9105 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9106 conftest$ac_exeext conftest.$ac_ext
9107 fi # $ac_x_libraries = no
9108
9109 fi
9110 # Record the results.
9111 case $ac_x_includes,$ac_x_libraries in #(
9112 no,* | *,no | *\'*) :
9113 # Didn't find X, or a directory has "'" in its name.
9114 ac_cv_have_x="have_x=no" ;; #(
9115 *) :
9116 # Record where we found X for the cache.
9117 ac_cv_have_x="have_x=yes\
9118 ac_x_includes='$ac_x_includes'\
9119 ac_x_libraries='$ac_x_libraries'" ;;
9120 esac
9121 fi
9122 ;; #(
9123 *) have_x=yes;;
9124 esac
9125 eval "$ac_cv_have_x"
9126 fi # $with_x != no
9127
9128 if test "$have_x" != yes; then
9129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
9130 printf "%s\n" "$have_x" >&6; }
9131 no_x=yes
9132 else
9133 # If each of the values was on the command line, it overrides each guess.
9134 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9135 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9136 # Update the cache value to reflect the command line values.
9137 ac_cv_have_x="have_x=yes\
9138 ac_x_includes='$x_includes'\
9139 ac_x_libraries='$x_libraries'"
9140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
9141 printf "%s\n" "libraries $x_libraries, headers $x_includes" >&6; }
9142 fi
9143
9144 if test x"$x_includes" != x
9145 then
9146 CXXFLAGS="$CXXFLAGS -I$x_includes"
9147 fi
9148
9149 if test "$x_libraries" != ""
9150 then
9151 LIBS="$LIBS -L$x_libraries"
9152 fi
9153
9154 LIBS="$LIBS -lX11 -lXext"
9155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for glDrawPixels in -lGL" >&5
9156 printf %s "checking for glDrawPixels in -lGL... " >&6; }
9157 if test ${ac_cv_lib_GL_glDrawPixels+y}
9158 then :
9159 printf %s "(cached) " >&6
9160 else $as_nop
9161 ac_check_lib_save_LIBS=$LIBS
9162 LIBS="-lGL $LIBS"
9163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9164 /* end confdefs.h. */
9165
9166 namespace conftest {
9167 extern "C" int glDrawPixels ();
9168 }
9169 int
9170 main (void)
9171 {
9172 return conftest::glDrawPixels ();
9173 ;
9174 return 0;
9175 }
9176 _ACEOF
9177 if ac_fn_cxx_try_link "$LINENO"
9178 then :
9179 ac_cv_lib_GL_glDrawPixels=yes
9180 else $as_nop
9181 ac_cv_lib_GL_glDrawPixels=no
9182 fi
9183 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9184 conftest$ac_exeext conftest.$ac_ext
9185 LIBS=$ac_check_lib_save_LIBS
9186 fi
9187 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GL_glDrawPixels" >&5
9188 printf "%s\n" "$ac_cv_lib_GL_glDrawPixels" >&6; }
9189 if test "x$ac_cv_lib_GL_glDrawPixels" = xyes
9190 then :
9191 printf "%s\n" "#define HAVE_LIBGL 1" >>confdefs.h
9192
9193 LIBS="-lGL $LIBS"
9194
9195 else $as_nop
9196 a=1
9197 fi
9198
9199 for ac_header in GL/glu.h
9200 do :
9201 ac_fn_cxx_check_header_compile "$LINENO" "GL/glu.h" "ac_cv_header_GL_glu_h" "$ac_includes_default"
9202 if test "x$ac_cv_header_GL_glu_h" = xyes
9203 then :
9204 printf "%s\n" "#define HAVE_GL_GLU_H 1" >>confdefs.h
9205
9206 else $as_nop
9207 a=1
9208 fi
9209
9210 done
9211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gluGetString in -lGLU" >&5
9212 printf %s "checking for gluGetString in -lGLU... " >&6; }
9213 if test ${ac_cv_lib_GLU_gluGetString+y}
9214 then :
9215 printf %s "(cached) " >&6
9216 else $as_nop
9217 ac_check_lib_save_LIBS=$LIBS
9218 LIBS="-lGLU $LIBS"
9219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9220 /* end confdefs.h. */
9221
9222 namespace conftest {
9223 extern "C" int gluGetString ();
9224 }
9225 int
9226 main (void)
9227 {
9228 return conftest::gluGetString ();
9229 ;
9230 return 0;
9231 }
9232 _ACEOF
9233 if ac_fn_cxx_try_link "$LINENO"
9234 then :
9235 ac_cv_lib_GLU_gluGetString=yes
9236 else $as_nop
9237 ac_cv_lib_GLU_gluGetString=no
9238 fi
9239 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9240 conftest$ac_exeext conftest.$ac_ext
9241 LIBS=$ac_check_lib_save_LIBS
9242 fi
9243 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_GLU_gluGetString" >&5
9244 printf "%s\n" "$ac_cv_lib_GLU_gluGetString" >&6; }
9245 if test "x$ac_cv_lib_GLU_gluGetString" = xyes
9246 then :
9247 printf "%s\n" "#define HAVE_LIBGLU 1" >>confdefs.h
9248
9249 LIBS="-lGLU $LIBS"
9250
9251 else $as_nop
9252 a=1
9253 fi
9254
9255
9256
9257 if test x$a == x
9258 then
9259 printf "%s\n" "#define CVD_HAVE_VIDEODISPLAY 1" >>confdefs.h
9260
9261 have_videodisplay=yes
9262
9263 options="$options videodisplay"
9264
9265 else
9266 LIBS="$save_LIBS"
9267 CXXFLAGS="$save_CXXFLAGS"
9268 fi
9269 fi
9270
9271 if test "$have_videodisplay" != yes
9272 then
9273 :
9274
9275 fi
9276
9277
9278
9279 if test "$with_toon" != no && test "$have_toon" != yes
9280 then
9281 if test "$with_toon" == ""
9282 then
9283 with_toon=yes
9284 fi
9285
9286 save_LIBS="$LIBS"
9287 save_CXXFLAGS="$CXXFLAGS"
9288 a=
9289
9290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TooN" >&5
9291 printf %s "checking for TooN... " >&6; }
9292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9293 /* end confdefs.h. */
9294 #include <TooN/TooN.h>
9295 int main(){TooN::Vector<2, double> v=TooN::Zeros;return 0;}
9296 _ACEOF
9297 if ac_fn_cxx_try_compile "$LINENO"
9298 then :
9299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9300 printf "%s\n" "yes" >&6; }
9301 else $as_nop
9302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9303 printf "%s\n" "no" >&6; }; a=1
9304 fi
9305 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
9306
9307
9308 if test x$a == x
9309 then
9310 printf "%s\n" "#define CVD_HAVE_TOON 1" >>confdefs.h
9311
9312 have_toon=yes
9313
9314 options="$options toon"
9315
9316 else
9317 LIBS="$save_LIBS"
9318 CXXFLAGS="$save_CXXFLAGS"
9319 fi
9320 fi
9321
9322 if test "$have_toon" != yes
9323 then
9324 :
9325
9326 fi
9327
9328
9329
9330
9331 if test "$with_libuvc" != no && test "$have_libuvc" != yes
9332 then
9333 if test "$with_libuvc" == ""
9334 then
9335 with_libuvc=yes
9336 fi
9337
9338 save_LIBS="$LIBS"
9339 save_CXXFLAGS="$CXXFLAGS"
9340 a=
9341
9342 for ac_header in libuvc/libuvc.h
9343 do :
9344 ac_fn_cxx_check_header_compile "$LINENO" "libuvc/libuvc.h" "ac_cv_header_libuvc_libuvc_h" "$ac_includes_default"
9345 if test "x$ac_cv_header_libuvc_libuvc_h" = xyes
9346 then :
9347 printf "%s\n" "#define HAVE_LIBUVC_LIBUVC_H 1" >>confdefs.h
9348
9349 else $as_nop
9350 a=1
9351 fi
9352
9353 done
9354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uvc_stream_get_frame in -luvc" >&5
9355 printf %s "checking for uvc_stream_get_frame in -luvc... " >&6; }
9356 if test ${ac_cv_lib_uvc_uvc_stream_get_frame+y}
9357 then :
9358 printf %s "(cached) " >&6
9359 else $as_nop
9360 ac_check_lib_save_LIBS=$LIBS
9361 LIBS="-luvc $LIBS"
9362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9363 /* end confdefs.h. */
9364
9365 namespace conftest {
9366 extern "C" int uvc_stream_get_frame ();
9367 }
9368 int
9369 main (void)
9370 {
9371 return conftest::uvc_stream_get_frame ();
9372 ;
9373 return 0;
9374 }
9375 _ACEOF
9376 if ac_fn_cxx_try_link "$LINENO"
9377 then :
9378 ac_cv_lib_uvc_uvc_stream_get_frame=yes
9379 else $as_nop
9380 ac_cv_lib_uvc_uvc_stream_get_frame=no
9381 fi
9382 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9383 conftest$ac_exeext conftest.$ac_ext
9384 LIBS=$ac_check_lib_save_LIBS
9385 fi
9386 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uvc_uvc_stream_get_frame" >&5
9387 printf "%s\n" "$ac_cv_lib_uvc_uvc_stream_get_frame" >&6; }
9388 if test "x$ac_cv_lib_uvc_uvc_stream_get_frame" = xyes
9389 then :
9390 printf "%s\n" "#define HAVE_LIBUVC 1" >>confdefs.h
9391
9392 LIBS="-luvc $LIBS"
9393
9394 else $as_nop
9395 a=1
9396 fi
9397
9398
9399
9400 if test x$a == x
9401 then
9402 printf "%s\n" "#define CVD_HAVE_LIBUVC 1" >>confdefs.h
9403
9404 have_libuvc=yes
9405
9406 options="$options libuvc"
9407
9408 else
9409 LIBS="$save_LIBS"
9410 CXXFLAGS="$save_CXXFLAGS"
9411 fi
9412 fi
9413
9414 if test "$have_libuvc" != yes
9415 then
9416 :
9417
9418 fi
9419
9420
9421
9422 if test "$with_png" != no && test "$have_png" != yes
9423 then
9424 if test "$with_png" == ""
9425 then
9426 with_png=yes
9427 fi
9428
9429 save_LIBS="$LIBS"
9430 save_CXXFLAGS="$CXXFLAGS"
9431 a=
9432
9433 for ac_header in png.h
9434 do :
9435 ac_fn_cxx_check_header_compile "$LINENO" "png.h" "ac_cv_header_png_h" "$ac_includes_default"
9436 if test "x$ac_cv_header_png_h" = xyes
9437 then :
9438 printf "%s\n" "#define HAVE_PNG_H 1" >>confdefs.h
9439
9440 else $as_nop
9441 a=1
9442 fi
9443
9444 done
9445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for png_init_io in -lpng" >&5
9446 printf %s "checking for png_init_io in -lpng... " >&6; }
9447 if test ${ac_cv_lib_png_png_init_io+y}
9448 then :
9449 printf %s "(cached) " >&6
9450 else $as_nop
9451 ac_check_lib_save_LIBS=$LIBS
9452 LIBS="-lpng $LIBS"
9453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9454 /* end confdefs.h. */
9455
9456 namespace conftest {
9457 extern "C" int png_init_io ();
9458 }
9459 int
9460 main (void)
9461 {
9462 return conftest::png_init_io ();
9463 ;
9464 return 0;
9465 }
9466 _ACEOF
9467 if ac_fn_cxx_try_link "$LINENO"
9468 then :
9469 ac_cv_lib_png_png_init_io=yes
9470 else $as_nop
9471 ac_cv_lib_png_png_init_io=no
9472 fi
9473 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9474 conftest$ac_exeext conftest.$ac_ext
9475 LIBS=$ac_check_lib_save_LIBS
9476 fi
9477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_png_png_init_io" >&5
9478 printf "%s\n" "$ac_cv_lib_png_png_init_io" >&6; }
9479 if test "x$ac_cv_lib_png_png_init_io" = xyes
9480 then :
9481 printf "%s\n" "#define HAVE_LIBPNG 1" >>confdefs.h
9482
9483 LIBS="-lpng $LIBS"
9484
9485 else $as_nop
9486 a=1
9487 fi
9488
9489
9490
9491 if test x$a == x
9492 then
9493 printf "%s\n" "#define CVD_HAVE_PNG 1" >>confdefs.h
9494
9495 have_png=yes
9496
9497 options="$options png"
9498
9499 else
9500 LIBS="$save_LIBS"
9501 CXXFLAGS="$save_CXXFLAGS"
9502 fi
9503 fi
9504
9505 if test "$have_png" != yes
9506 then
9507 :
9508
9509 fi
9510
9511
9512
9513 if test "$with_jpeg" != no && test "$have_jpeg" != yes
9514 then
9515 if test "$with_jpeg" == ""
9516 then
9517 with_jpeg=yes
9518 fi
9519
9520 save_LIBS="$LIBS"
9521 save_CXXFLAGS="$CXXFLAGS"
9522 a=
9523
9524 for ac_header in jpeglib.h
9525 do :
9526 ac_fn_cxx_check_header_compile "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
9527 if test "x$ac_cv_header_jpeglib_h" = xyes
9528 then :
9529 printf "%s\n" "#define HAVE_JPEGLIB_H 1" >>confdefs.h
9530
9531 else $as_nop
9532 a=1
9533 fi
9534
9535 done
9536 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_decompress in -ljpeg" >&5
9537 printf %s "checking for jpeg_destroy_decompress in -ljpeg... " >&6; }
9538 if test ${ac_cv_lib_jpeg_jpeg_destroy_decompress+y}
9539 then :
9540 printf %s "(cached) " >&6
9541 else $as_nop
9542 ac_check_lib_save_LIBS=$LIBS
9543 LIBS="-ljpeg $LIBS"
9544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9545 /* end confdefs.h. */
9546
9547 namespace conftest {
9548 extern "C" int jpeg_destroy_decompress ();
9549 }
9550 int
9551 main (void)
9552 {
9553 return conftest::jpeg_destroy_decompress ();
9554 ;
9555 return 0;
9556 }
9557 _ACEOF
9558 if ac_fn_cxx_try_link "$LINENO"
9559 then :
9560 ac_cv_lib_jpeg_jpeg_destroy_decompress=yes
9561 else $as_nop
9562 ac_cv_lib_jpeg_jpeg_destroy_decompress=no
9563 fi
9564 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9565 conftest$ac_exeext conftest.$ac_ext
9566 LIBS=$ac_check_lib_save_LIBS
9567 fi
9568 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_decompress" >&5
9569 printf "%s\n" "$ac_cv_lib_jpeg_jpeg_destroy_decompress" >&6; }
9570 if test "x$ac_cv_lib_jpeg_jpeg_destroy_decompress" = xyes
9571 then :
9572 printf "%s\n" "#define HAVE_LIBJPEG 1" >>confdefs.h
9573
9574 LIBS="-ljpeg $LIBS"
9575
9576 else $as_nop
9577 a=1
9578 fi
9579
9580
9581
9582 if test x$a == x
9583 then
9584 printf "%s\n" "#define CVD_HAVE_JPEG 1" >>confdefs.h
9585
9586 have_jpeg=yes
9587
9588 options="$options jpeg"
9589
9590
9591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking JPEG read buffer size" >&5
9592 printf %s "checking JPEG read buffer size... " >&6; }
9593
9594 jpegbuffersize="`echo $with_jpegbuffer | awk '$1 = ($1+0<= 0)?1:$1'`"
9595
9596 if test "$jpegbuffersize" -gt 1
9597 then
9598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $jpegbuffersize (unsafe reading)" >&5
9599 printf "%s\n" "$jpegbuffersize (unsafe reading)" >&6; };
9600 dodginess_options="$dodginess_options unsafe_jpeg"
9601 else
9602 jpegbuffersize=1
9603 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: 1 (safe reading)" >&5
9604 printf "%s\n" "1 (safe reading)" >&6; };
9605 fi
9606 printf "%s\n" "#define CVD_INTERNAL_JPEG_BUFFER_SIZE $jpegbuffersize" >>confdefs.h
9607
9608
9609 else
9610 LIBS="$save_LIBS"
9611 CXXFLAGS="$save_CXXFLAGS"
9612 fi
9613 fi
9614
9615 if test "$have_jpeg" != yes
9616 then
9617 :
9618
9619 fi
9620
9621
9622
9623
9624 if test "$with_tiff" != no && test "$have_tiff" != yes
9625 then
9626 if test "$with_tiff" == ""
9627 then
9628 with_tiff=yes
9629 fi
9630
9631 save_LIBS="$LIBS"
9632 save_CXXFLAGS="$CXXFLAGS"
9633 a=
9634
9635 for ac_header in tiffio.h
9636 do :
9637 ac_fn_cxx_check_header_compile "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default"
9638 if test "x$ac_cv_header_tiffio_h" = xyes
9639 then :
9640 printf "%s\n" "#define HAVE_TIFFIO_H 1" >>confdefs.h
9641
9642 else $as_nop
9643 a=1
9644 fi
9645
9646 done
9647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TIFFReadRGBAImage in -ltiff" >&5
9648 printf %s "checking for TIFFReadRGBAImage in -ltiff... " >&6; }
9649 if test ${ac_cv_lib_tiff_TIFFReadRGBAImage+y}
9650 then :
9651 printf %s "(cached) " >&6
9652 else $as_nop
9653 ac_check_lib_save_LIBS=$LIBS
9654 LIBS="-ltiff $LIBS"
9655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9656 /* end confdefs.h. */
9657
9658 namespace conftest {
9659 extern "C" int TIFFReadRGBAImage ();
9660 }
9661 int
9662 main (void)
9663 {
9664 return conftest::TIFFReadRGBAImage ();
9665 ;
9666 return 0;
9667 }
9668 _ACEOF
9669 if ac_fn_cxx_try_link "$LINENO"
9670 then :
9671 ac_cv_lib_tiff_TIFFReadRGBAImage=yes
9672 else $as_nop
9673 ac_cv_lib_tiff_TIFFReadRGBAImage=no
9674 fi
9675 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9676 conftest$ac_exeext conftest.$ac_ext
9677 LIBS=$ac_check_lib_save_LIBS
9678 fi
9679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFReadRGBAImage" >&5
9680 printf "%s\n" "$ac_cv_lib_tiff_TIFFReadRGBAImage" >&6; }
9681 if test "x$ac_cv_lib_tiff_TIFFReadRGBAImage" = xyes
9682 then :
9683 printf "%s\n" "#define HAVE_LIBTIFF 1" >>confdefs.h
9684
9685 LIBS="-ltiff $LIBS"
9686
9687 else $as_nop
9688 a=1
9689 fi
9690
9691
9692
9693 if test x$a == x
9694 then
9695 printf "%s\n" "#define CVD_HAVE_TIFF 1" >>confdefs.h
9696
9697 have_tiff=yes
9698
9699 options="$options tiff"
9700
9701 else
9702 LIBS="$save_LIBS"
9703 CXXFLAGS="$save_CXXFLAGS"
9704 fi
9705 fi
9706
9707 if test "$have_tiff" != yes
9708 then
9709 :
9710
9711 fi
9712
9713
9714
9715
9716 if test "$with_ffmpeg" != no && test "$have_ffmpeg" != yes
9717 then
9718 if test "$with_ffmpeg" == ""
9719 then
9720 with_ffmpeg=yes
9721 fi
9722
9723 save_LIBS="$LIBS"
9724 save_CXXFLAGS="$CXXFLAGS"
9725 a=
9726
9727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ffmpeg headers" >&5
9728 printf %s "checking for ffmpeg headers... " >&6; }
9729
9730 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lavutil" >&5
9731 printf %s "checking for main in -lavutil... " >&6; }
9732 if test ${ac_cv_lib_avutil_main+y}
9733 then :
9734 printf %s "(cached) " >&6
9735 else $as_nop
9736 ac_check_lib_save_LIBS=$LIBS
9737 LIBS="-lavutil $LIBS"
9738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9739 /* end confdefs.h. */
9740
9741 namespace conftest {
9742 extern "C" int main ();
9743 }
9744 int
9745 main (void)
9746 {
9747 return conftest::main ();
9748 ;
9749 return 0;
9750 }
9751 _ACEOF
9752 if ac_fn_cxx_try_link "$LINENO"
9753 then :
9754 ac_cv_lib_avutil_main=yes
9755 else $as_nop
9756 ac_cv_lib_avutil_main=no
9757 fi
9758 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9759 conftest$ac_exeext conftest.$ac_ext
9760 LIBS=$ac_check_lib_save_LIBS
9761 fi
9762 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avutil_main" >&5
9763 printf "%s\n" "$ac_cv_lib_avutil_main" >&6; }
9764 if test "x$ac_cv_lib_avutil_main" = xyes
9765 then :
9766 printf "%s\n" "#define HAVE_LIBAVUTIL 1" >>confdefs.h
9767
9768 LIBS="-lavutil $LIBS"
9769
9770 else $as_nop
9771 a=1
9772 fi
9773
9774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for avformat_open_input in -lavformat" >&5
9775 printf %s "checking for avformat_open_input in -lavformat... " >&6; }
9776 if test ${ac_cv_lib_avformat_avformat_open_input+y}
9777 then :
9778 printf %s "(cached) " >&6
9779 else $as_nop
9780 ac_check_lib_save_LIBS=$LIBS
9781 LIBS="-lavformat $LIBS"
9782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9783 /* end confdefs.h. */
9784
9785 namespace conftest {
9786 extern "C" int avformat_open_input ();
9787 }
9788 int
9789 main (void)
9790 {
9791 return conftest::avformat_open_input ();
9792 ;
9793 return 0;
9794 }
9795 _ACEOF
9796 if ac_fn_cxx_try_link "$LINENO"
9797 then :
9798 ac_cv_lib_avformat_avformat_open_input=yes
9799 else $as_nop
9800 ac_cv_lib_avformat_avformat_open_input=no
9801 fi
9802 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9803 conftest$ac_exeext conftest.$ac_ext
9804 LIBS=$ac_check_lib_save_LIBS
9805 fi
9806 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avformat_avformat_open_input" >&5
9807 printf "%s\n" "$ac_cv_lib_avformat_avformat_open_input" >&6; }
9808 if test "x$ac_cv_lib_avformat_avformat_open_input" = xyes
9809 then :
9810 printf "%s\n" "#define HAVE_LIBAVFORMAT 1" >>confdefs.h
9811
9812 LIBS="-lavformat $LIBS"
9813
9814 else $as_nop
9815 a=1
9816 fi
9817
9818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for av_read_frame in -lavformat" >&5
9819 printf %s "checking for av_read_frame in -lavformat... " >&6; }
9820 if test ${ac_cv_lib_avformat_av_read_frame+y}
9821 then :
9822 printf %s "(cached) " >&6
9823 else $as_nop
9824 ac_check_lib_save_LIBS=$LIBS
9825 LIBS="-lavformat $LIBS"
9826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9827 /* end confdefs.h. */
9828
9829 namespace conftest {
9830 extern "C" int av_read_frame ();
9831 }
9832 int
9833 main (void)
9834 {
9835 return conftest::av_read_frame ();
9836 ;
9837 return 0;
9838 }
9839 _ACEOF
9840 if ac_fn_cxx_try_link "$LINENO"
9841 then :
9842 ac_cv_lib_avformat_av_read_frame=yes
9843 else $as_nop
9844 ac_cv_lib_avformat_av_read_frame=no
9845 fi
9846 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9847 conftest$ac_exeext conftest.$ac_ext
9848 LIBS=$ac_check_lib_save_LIBS
9849 fi
9850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avformat_av_read_frame" >&5
9851 printf "%s\n" "$ac_cv_lib_avformat_av_read_frame" >&6; }
9852 if test "x$ac_cv_lib_avformat_av_read_frame" = xyes
9853 then :
9854 ffmpeg_recent=yes
9855 else $as_nop
9856 a=1
9857 fi
9858 #only in >= 0.4.9
9859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for avcodec_open2 in -lavcodec" >&5
9860 printf %s "checking for avcodec_open2 in -lavcodec... " >&6; }
9861 if test ${ac_cv_lib_avcodec_avcodec_open2+y}
9862 then :
9863 printf %s "(cached) " >&6
9864 else $as_nop
9865 ac_check_lib_save_LIBS=$LIBS
9866 LIBS="-lavcodec $LIBS"
9867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9868 /* end confdefs.h. */
9869
9870 namespace conftest {
9871 extern "C" int avcodec_open2 ();
9872 }
9873 int
9874 main (void)
9875 {
9876 return conftest::avcodec_open2 ();
9877 ;
9878 return 0;
9879 }
9880 _ACEOF
9881 if ac_fn_cxx_try_link "$LINENO"
9882 then :
9883 ac_cv_lib_avcodec_avcodec_open2=yes
9884 else $as_nop
9885 ac_cv_lib_avcodec_avcodec_open2=no
9886 fi
9887 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9888 conftest$ac_exeext conftest.$ac_ext
9889 LIBS=$ac_check_lib_save_LIBS
9890 fi
9891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avcodec_avcodec_open2" >&5
9892 printf "%s\n" "$ac_cv_lib_avcodec_avcodec_open2" >&6; }
9893 if test "x$ac_cv_lib_avcodec_avcodec_open2" = xyes
9894 then :
9895 printf "%s\n" "#define HAVE_LIBAVCODEC 1" >>confdefs.h
9896
9897 LIBS="-lavcodec $LIBS"
9898
9899 else $as_nop
9900 a=1
9901 fi
9902
9903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sws_getContext in -lswscale" >&5
9904 printf %s "checking for sws_getContext in -lswscale... " >&6; }
9905 if test ${ac_cv_lib_swscale_sws_getContext+y}
9906 then :
9907 printf %s "(cached) " >&6
9908 else $as_nop
9909 ac_check_lib_save_LIBS=$LIBS
9910 LIBS="-lswscale $LIBS"
9911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9912 /* end confdefs.h. */
9913
9914 namespace conftest {
9915 extern "C" int sws_getContext ();
9916 }
9917 int
9918 main (void)
9919 {
9920 return conftest::sws_getContext ();
9921 ;
9922 return 0;
9923 }
9924 _ACEOF
9925 if ac_fn_cxx_try_link "$LINENO"
9926 then :
9927 ac_cv_lib_swscale_sws_getContext=yes
9928 else $as_nop
9929 ac_cv_lib_swscale_sws_getContext=no
9930 fi
9931 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9932 conftest$ac_exeext conftest.$ac_ext
9933 LIBS=$ac_check_lib_save_LIBS
9934 fi
9935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_swscale_sws_getContext" >&5
9936 printf "%s\n" "$ac_cv_lib_swscale_sws_getContext" >&6; }
9937 if test "x$ac_cv_lib_swscale_sws_getContext" = xyes
9938 then :
9939 printf "%s\n" "#define HAVE_LIBSWSCALE 1" >>confdefs.h
9940
9941 LIBS="-lswscale $LIBS"
9942
9943 else $as_nop
9944 a=1
9945 fi
9946
9947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for avdevice_register_all in -lavdevice" >&5
9948 printf %s "checking for avdevice_register_all in -lavdevice... " >&6; }
9949 if test ${ac_cv_lib_avdevice_avdevice_register_all+y}
9950 then :
9951 printf %s "(cached) " >&6
9952 else $as_nop
9953 ac_check_lib_save_LIBS=$LIBS
9954 LIBS="-lavdevice $LIBS"
9955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9956 /* end confdefs.h. */
9957
9958 namespace conftest {
9959 extern "C" int avdevice_register_all ();
9960 }
9961 int
9962 main (void)
9963 {
9964 return conftest::avdevice_register_all ();
9965 ;
9966 return 0;
9967 }
9968 _ACEOF
9969 if ac_fn_cxx_try_link "$LINENO"
9970 then :
9971 ac_cv_lib_avdevice_avdevice_register_all=yes
9972 else $as_nop
9973 ac_cv_lib_avdevice_avdevice_register_all=no
9974 fi
9975 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9976 conftest$ac_exeext conftest.$ac_ext
9977 LIBS=$ac_check_lib_save_LIBS
9978 fi
9979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_avdevice_avdevice_register_all" >&5
9980 printf "%s\n" "$ac_cv_lib_avdevice_avdevice_register_all" >&6; }
9981 if test "x$ac_cv_lib_avdevice_avdevice_register_all" = xyes
9982 then :
9983 printf "%s\n" "#define HAVE_LIBAVDEVICE 1" >>confdefs.h
9984
9985 LIBS="-lavdevice $LIBS"
9986
9987 else $as_nop
9988 a=1
9989 fi
9990
9991
9992
9993 if test x$a == x
9994 then
9995 printf "%s\n" "#define CVD_HAVE_FFMPEG 1" >>confdefs.h
9996
9997 have_ffmpeg=yes
9998
9999 options="$options ffmpeg"
10000
10001 else
10002 LIBS="$save_LIBS"
10003 CXXFLAGS="$save_CXXFLAGS"
10004 fi
10005 fi
10006
10007 if test "$have_ffmpeg" != yes
10008 then
10009 :
10010
10011 fi
10012
10013
10014 # Extract the first word of "doxygen", so it can be a program name with args.
10015 set dummy doxygen; ac_word=$2
10016 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10017 printf %s "checking for $ac_word... " >&6; }
10018 if test ${ac_cv_prog_docs+y}
10019 then :
10020 printf %s "(cached) " >&6
10021 else $as_nop
10022 if test -n "$docs"; then
10023 ac_cv_prog_docs="$docs" # Let the user override the test.
10024 else
10025 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10026 for as_dir in $PATH
10027 do
10028 IFS=$as_save_IFS
10029 case $as_dir in #(((
10030 '') as_dir=./ ;;
10031 */) ;;
10032 *) as_dir=$as_dir/ ;;
10033 esac
10034 for ac_exec_ext in '' $ac_executable_extensions; do
10035 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
10036 ac_cv_prog_docs="docs"
10037 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
10038 break 2
10039 fi
10040 done
10041 done
10042 IFS=$as_save_IFS
10043
10044 test -z "$ac_cv_prog_docs" && ac_cv_prog_docs="no"
10045 fi
10046 fi
10047 docs=$ac_cv_prog_docs
10048 if test -n "$docs"; then
10049 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $docs" >&5
10050 printf "%s\n" "$docs" >&6; }
10051 else
10052 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
10053 printf "%s\n" "no" >&6; }
10054 fi
10055
10056
10057 ################################################################################
10058 #
10059 # platform compatibility
10060 # All of these ought to be yes
10061 echo
10062 echo -----------------------------------
10063 echo Checking for platform compatibility
10064 echo -----------------------------------
10065
10066 a=
10067 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX options needed to detect all undeclared functions" >&5
10068 printf %s "checking for $CXX options needed to detect all undeclared functions... " >&6; }
10069 if test ${ac_cv_cxx_undeclared_builtin_options+y}
10070 then :
10071 printf %s "(cached) " >&6
10072 else $as_nop
10073 ac_save_CFLAGS=$CFLAGS
10074 ac_cv_cxx_undeclared_builtin_options='cannot detect'
10075 for ac_arg in '' -fno-builtin; do
10076 CFLAGS="$ac_save_CFLAGS $ac_arg"
10077 # This test program should *not* compile successfully.
10078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10079 /* end confdefs.h. */
10080
10081 int
10082 main (void)
10083 {
10084 (void) strchr;
10085 ;
10086 return 0;
10087 }
10088 _ACEOF
10089 if ac_fn_cxx_try_compile "$LINENO"
10090 then :
10091
10092 else $as_nop
10093 # This test program should compile successfully.
10094 # No library function is consistently available on
10095 # freestanding implementations, so test against a dummy
10096 # declaration. Include always-available headers on the
10097 # off chance that they somehow elicit warnings.
10098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10099 /* end confdefs.h. */
10100 #include <float.h>
10101 #include <limits.h>
10102 #include <stdarg.h>
10103 #include <stddef.h>
10104 extern void ac_decl (int, char *);
10105
10106 int
10107 main (void)
10108 {
10109 (void) ac_decl (0, (char *) 0);
10110 (void) ac_decl;
10111
10112 ;
10113 return 0;
10114 }
10115 _ACEOF
10116 if ac_fn_cxx_try_compile "$LINENO"
10117 then :
10118 if test x"$ac_arg" = x
10119 then :
10120 ac_cv_cxx_undeclared_builtin_options='none needed'
10121 else $as_nop
10122 ac_cv_cxx_undeclared_builtin_options=$ac_arg
10123 fi
10124 break
10125 fi
10126 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10127 fi
10128 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
10129 done
10130 CFLAGS=$ac_save_CFLAGS
10131
10132 fi
10133 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_undeclared_builtin_options" >&5
10134 printf "%s\n" "$ac_cv_cxx_undeclared_builtin_options" >&6; }
10135 case $ac_cv_cxx_undeclared_builtin_options in #(
10136 'cannot detect') :
10137 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10138 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
10139 as_fn_error $? "cannot make $CXX report undeclared builtins
10140 See \`config.log' for more details" "$LINENO" 5; } ;; #(
10141 'none needed') :
10142 ac_cxx_undeclared_builtin_options='' ;; #(
10143 *) :
10144 ac_cxx_undeclared_builtin_options=$ac_cv_cxx_undeclared_builtin_options ;;
10145 esac
10146
10147 ac_fn_check_decl "$LINENO" "feenableexcept" "ac_cv_have_decl_feenableexcept" "#include <fenv.h>
10148 " "$ac_cxx_undeclared_builtin_options" "CXXFLAGS"
10149 if test "x$ac_cv_have_decl_feenableexcept" = xyes
10150 then :
10151 a=1
10152 else $as_nop
10153 a=
10154 fi
10155 if test x$a = x1
10156 then
10157 printf "%s\n" "#define CVD_HAVE_FENV_H 1" >>confdefs.h
10158
10159 else
10160 dodginess_options="$dodginess_options missing_c99_feenableexcept"
10161 fi
10162
10163 ################################################################################
10164 #
10165 # Extra build options
10166 echo
10167 echo --------------------------------
10168 echo Checking for extra build options
10169 echo --------------------------------
10170
10171 # Check whether --enable-fast was given.
10172 if test ${enable_fast+y}
10173 then :
10174 enableval=$enable_fast;
10175 fi
10176
10177 # Check whether --enable-fastobscure was given.
10178 if test ${enable_fastobscure+y}
10179 then :
10180 enableval=$enable_fastobscure;
10181 fi
10182
10183
10184
10185 test "$enable_fast" != no && have_fast=yes
10186
10187 test "$enable_fastobscure" != no && test "$enable_fast" != no && have_fastobscure=yes
10188
10189
10190 ################################################################################
10191 #
10192 # Compute dependencies
10193 #
10194
10195
10196
10197 #Obviously this doesn't do Windows.
10198 #
10199 # For Windows, you want the stuff in the Win32 directory
10200 # and not videodisplay and globlist
10201
10202 ################################################################################
10203 #
10204 # Architecture specific dependencies
10205 #
10206
10207 dep_objects="$dep_objects cvd_src/noarch/convert_rgb_to_y.o"
10208
10209
10210 #SIMD dependencies
10211 #i686/yuv411_to_stuff_MMX inline_asm mmxext 32bit x86
10212 #i686/yuv411_to_stuff_MMX_64 inline_asm mmxext x86
10213 #yuv411_to_stuff END
10214
10215 if test "$have_sse2" == yes
10216 then
10217 dep_objects="$dep_objects cvd_src/SSE2/half_sample.o"
10218 dep_objects="$dep_objects cvd_src/SSE2/gradient.o"
10219 dep_objects="$dep_objects cvd_src/SSE2/median_3x3.o"
10220 dep_objects="$dep_objects cvd_src/SSE2/two_thirds_sample.o"
10221 dep_objects="$dep_objects cvd_src/SSE2/utility_double_int.o"
10222 else
10223 dep_objects="$dep_objects cvd_src/noarch/half_sample.o"
10224 dep_objects="$dep_objects cvd_src/noarch/gradient.o"
10225 dep_objects="$dep_objects cvd_src/noarch/median_3x3.o"
10226 dep_objects="$dep_objects cvd_src/noarch/two_thirds_sample.o"
10227 dep_objects="$dep_objects cvd_src/noarch/utility_double_int.o"
10228 fi
10229
10230 if test "$have_sse" == yes
10231 then
10232 dep_objects="$dep_objects cvd_src/SSE/convolve_gaussian.o"
10233 dep_objects="$dep_objects cvd_src/SSE/utility_float.o"
10234 else
10235 dep_objects="$dep_objects cvd_src/noarch/convolve_gaussian.o"
10236 dep_objects="$dep_objects cvd_src/noarch/utility_float.o"
10237 fi
10238
10239 if test "$have_sse" == yes
10240 then
10241 dep_objects="$dep_objects cvd_src/MMX/utility_byte_differences.o"
10242 else
10243 dep_objects="$dep_objects cvd_src/noarch/utility_byte_differences.o"
10244 fi
10245
10246
10247 if test "$have_fast" == yes
10248 then
10249
10250 if test "$have_sse2" == yes
10251 then
10252 dep_objects="$dep_objects cvd_src/SSE2/faster_corner_9.o"
10253 dep_objects="$dep_objects cvd_src/SSE2/faster_corner_10.o"
10254 dep_objects="$dep_objects cvd_src/SSE2/faster_corner_12.o"
10255 else
10256 dep_objects="$dep_objects cvd_src/noarch/slower_corner_9.o"
10257 dep_objects="$dep_objects cvd_src/noarch/slower_corner_10.o"
10258 dep_objects="$dep_objects cvd_src/noarch/slower_corner_12.o"
10259 fi
10260
10261 dep_objects="$dep_objects cvd_src/fast/fast_9_detect.o"
10262 dep_objects="$dep_objects cvd_src/fast/fast_9_score.o"
10263 dep_objects="$dep_objects cvd_src/fast/fast_corner_9_nonmax.o"
10264
10265 dep_objects="$dep_objects cvd_src/fast/fast_10_detect.o"
10266 dep_objects="$dep_objects cvd_src/fast/fast_10_score.o"
10267
10268 dep_objects="$dep_objects cvd_src/fast/fast_12_detect.o"
10269 dep_objects="$dep_objects cvd_src/fast/fast_12_score.o"
10270 fi
10271
10272 if test "$have_fastobscure" == yes
10273 then
10274 dep_objects="$dep_objects cvd_src/fast/fast_7_detect.o"
10275 dep_objects="$dep_objects cvd_src/fast/fast_7_score.o"
10276 dep_objects="$dep_objects cvd_src/fast/slower_corner_7.o"
10277 dep_objects="$dep_objects cvd_src/fast/fast_8_detect.o"
10278 dep_objects="$dep_objects cvd_src/fast/fast_8_score.o"
10279 dep_objects="$dep_objects cvd_src/fast/slower_corner_8.o"
10280 dep_objects="$dep_objects cvd_src/fast/fast_11_detect.o"
10281 dep_objects="$dep_objects cvd_src/fast/fast_11_score.o"
10282 dep_objects="$dep_objects cvd_src/fast/slower_corner_11.o"
10283 fi
10284
10285 ################################################################################
10286 #
10287 # Video grabber dependencies
10288 #
10289
10290 if test "$have_dc1394v2" == yes
10291 then
10292 dep_objects="$dep_objects cvd_src/Linux/dvbuffer3_dc1394v2.o"
10293 dep_objects="$dep_objects cvd_src/videosource_dvbuffer.o"
10294 else
10295 dep_objects="$dep_objects cvd_src/videosource_nodvbuffer.o"
10296 fi
10297
10298 if test "$have_v4l2buffer" == yes
10299 then
10300 dep_objects="$dep_objects cvd_src/Linux/v4lbuffer.o"
10301 dep_objects="$dep_objects cvd_src/Linux/videosource_v4lbuffer.o"
10302 dep_objects="$dep_objects cvd_src/Linux/v4lcontrol.o"
10303 else
10304 dep_objects="$dep_objects cvd_src/Linux/videosource_nov4lbuffer.o"
10305 fi
10306
10307 if test "$have_libuvc" == yes
10308 then
10309 dep_objects="$dep_objects cvd_src/uvcbuffer.o"
10310 dep_objects="$dep_objects cvd_src/videosource_uvcbuffer.o"
10311 else
10312 dep_objects="$dep_objects cvd_src/videosource_nouvcbuffer.o"
10313 fi
10314
10315
10316 if test "$have_ffmpeg" == yes
10317 then
10318 dep_objects="$dep_objects cvd_src/videofilebuffer2.o"
10319 dep_objects="$dep_objects cvd_src/videofilebuffer_exceptions.o"
10320 dep_objects="$dep_objects cvd_src/videosource_videofilebuffer.o"
10321 dep_objects="$dep_objects cvd_src/videoffmpeg.o"
10322 dep_objects="$dep_objects cvd_src/videoreader.o"
10323 dep_objects="$dep_objects cvd_src/videoreaderfilebuffer.o"
10324 dep_objects="$dep_objects cvd_src/videoscaler.o"
10325 dep_objects="$dep_objects cvd_src/videowriter.o"
10326 else
10327 dep_objects="$dep_objects cvd_src/videosource_novideofilebuffer.o"
10328 fi
10329
10330 ################################################################################
10331 #
10332 # Other library dependencies
10333 #
10334
10335
10336 if test "$have_toon" == yes
10337 then
10338 dep_objects="$dep_objects cvd_src/tensor_voting.o"
10339 dep_objects="$dep_objects cvd_src/brezenham.o"
10340 dep_objects="$dep_objects cvd_src/draw_toon.o"
10341 dep_objects="$dep_objects cvd_src/quartic.o"
10342 dep_objects="$dep_objects cvd_src/threepointpose.o"
10343 fi
10344
10345 if test "$have_jpeg" == yes
10346 then
10347 dep_objects="$dep_objects cvd_src/image_io/jpeg.o"
10348 else
10349 dep_objects="$dep_objects cvd_src/image_io/missing_jpeg.o"
10350 fi
10351
10352
10353 if test "$have_tiff" == yes
10354 then
10355 dep_objects="$dep_objects cvd_src/image_io/tiff.o"
10356 dep_objects="$dep_objects cvd_src/image_io/tiffwrite.o"
10357 else
10358 dep_objects="$dep_objects cvd_src/image_io/missing_tiff.o"
10359 fi
10360
10361 if test "$have_png" == yes
10362 then
10363 dep_objects="$dep_objects cvd_src/image_io/png.o"
10364 else
10365 dep_objects="$dep_objects cvd_src/image_io/missing_png.o"
10366 fi
10367
10368 if test "$have_videodisplay"
10369 then
10370 dep_objects="$dep_objects cvd_src/videodisplay.o"
10371 dep_objects="$dep_objects cvd_src/glwindow.o"
10372 dep_objects="$dep_objects cvd_src/gltext.o"
10373 fi
10374
10375 dep_objects=$dep_objects
10376
10377
10378 ################################################################################
10379 #
10380 # Program dependencies
10381 #
10382
10383
10384
10385 if test "$have_toon$have_lapack" == yesyes
10386 then
10387 progs="$progs progs/se3_exp"
10388 progs="$progs progs/se3_ln"
10389 progs="$progs progs/se3_pre_mul"
10390 progs="$progs progs/se3_post_mul"
10391 progs="$progs progs/se3_inv"
10392 fi
10393
10394 if test "$have_videodisplay" == yes
10395 then
10396 progs="$progs progs/cvd_display_image"
10397 progs="$progs progs/video_play_source"
10398
10399 if test "$have_toon" == yes
10400 then
10401 progs="$progs progs/calibrate"
10402 fi
10403 fi
10404
10405 progs=$progs
10406
10407
10408 ################################################################################
10409 #
10410 # Program dependencies
10411 #
10412
10413
10414
10415 if test "$have_ffmpeg" == yes
10416 then
10417 testprogs="$testprogs videoreader_test"
10418 testprogs="$testprogs videowriter_test"
10419 fi
10420
10421 testprogs=$testprogs
10422
10423
10424 echo
10425 echo
10426 echo Options:
10427 echo $options $os_options
10428 echo
10429 echo Missing options for $host_os:
10430 echo $options $all_options $os_all_options | tr ' ' '\n' | sort | uniq -u | xargs echo
10431 echo
10432 echo Dodgy things:
10433 echo $dodginess_options
10434 echo
10435 echo
10436 echo SIMD support:
10437 echo $simd_options
10438 echo
10439 echo Missing SIMD support for $host:
10440 echo $simd_all_options $simd_options | tr ' ' '\n' | sort | uniq -u | xargs echo
10441 echo
10442
10443 CXXFLAGS=$CXXFLAGS
10444
10445 OFLAGS=$OFLAGS
10446
10447
10448 echo $CXXFLAGS
10449 echo $CPPFLAGS
10450 echo $LIBS
10451
10452
10453 ac_config_headers="$ac_config_headers cvd/config.h cvd_src/config_internal.h"
10454
10455 ac_config_files="$ac_config_files Makefile"
10456
10457 cat >confcache <<\_ACEOF
10458 # This file is a shell script that caches the results of configure
10459 # tests run on this system so they can be shared between configure
10460 # scripts and configure runs, see configure's option --config-cache.
10461 # It is not useful on other systems. If it contains results you don't
10462 # want to keep, you may remove or edit it.
10463 #
10464 # config.status only pays attention to the cache file if you give it
10465 # the --recheck option to rerun configure.
10466 #
10467 # `ac_cv_env_foo' variables (set or unset) will be overridden when
10468 # loading this file, other *unset* `ac_cv_foo' will be assigned the
10469 # following values.
10470
10471 _ACEOF
10472
10473 # The following way of writing the cache mishandles newlines in values,
10474 # but we know of no workaround that is simple, portable, and efficient.
10475 # So, we kill variables containing newlines.
10476 # Ultrix sh set writes to stderr and can't be redirected directly,
10477 # and sets the high bit in the cache file unless we assign to the vars.
10478 (
10479 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
10480 eval ac_val=\$$ac_var
10481 case $ac_val in #(
10482 *${as_nl}*)
10483 case $ac_var in #(
10484 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
10485 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
10486 esac
10487 case $ac_var in #(
10488 _ | IFS | as_nl) ;; #(
10489 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
10490 *) { eval $ac_var=; unset $ac_var;} ;;
10491 esac ;;
10492 esac
10493 done
10494
10495 (set) 2>&1 |
10496 case $as_nl`(ac_space=' '; set) 2>&1` in #(
10497 *${as_nl}ac_space=\ *)
10498 # `set' does not quote correctly, so add quotes: double-quote
10499 # substitution turns \\\\ into \\, and sed turns \\ into \.
10500 sed -n \
10501 "s/'/'\\\\''/g;
10502 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
10503 ;; #(
10504 *)
10505 # `set' quotes correctly as required by POSIX, so do not add quotes.
10506 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
10507 ;;
10508 esac |
10509 sort
10510 ) |
10511 sed '
10512 /^ac_cv_env_/b end
10513 t clear
10514 :clear
10515 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
10516 t end
10517 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
10518 :end' >>confcache
10519 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
10520 if test -w "$cache_file"; then
10521 if test "x$cache_file" != "x/dev/null"; then
10522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
10523 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
10524 if test ! -f "$cache_file" || test -h "$cache_file"; then
10525 cat confcache >"$cache_file"
10526 else
10527 case $cache_file in #(
10528 */* | ?:*)
10529 mv -f confcache "$cache_file"$$ &&
10530 mv -f "$cache_file"$$ "$cache_file" ;; #(
10531 *)
10532 mv -f confcache "$cache_file" ;;
10533 esac
10534 fi
10535 fi
10536 else
10537 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
10538 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
10539 fi
10540 fi
10541 rm -f confcache
10542
10543 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10544 # Let make expand exec_prefix.
10545 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10546
10547 DEFS=-DHAVE_CONFIG_H
10548
10549 ac_libobjs=
10550 ac_ltlibobjs=
10551 U=
10552 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
10553 # 1. Remove the extension, and $U if already installed.
10554 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
10555 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
10556 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
10557 # will be set to the directory where LIBOBJS objects are built.
10558 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
10559 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
10560 done
10561 LIBOBJS=$ac_libobjs
10562
10563 LTLIBOBJS=$ac_ltlibobjs
10564
10565
10566
10567
10568 : "${CONFIG_STATUS=./config.status}"
10569 ac_write_fail=0
10570 ac_clean_files_save=$ac_clean_files
10571 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
10572 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
10573 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
10574 as_write_fail=0
10575 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
10576 #! $SHELL
10577 # Generated by $as_me.
10578 # Run this file to recreate the current configuration.
10579 # Compiler output produced by configure, useful for debugging
10580 # configure, is in config.log if it exists.
10581
10582 debug=false
10583 ac_cs_recheck=false
10584 ac_cs_silent=false
10585
10586 SHELL=\${CONFIG_SHELL-$SHELL}
10587 export SHELL
10588 _ASEOF
10589 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
10590 ## -------------------- ##
10591 ## M4sh Initialization. ##
10592 ## -------------------- ##
10593
10594 # Be more Bourne compatible
10595 DUALCASE=1; export DUALCASE # for MKS sh
10596 as_nop=:
10597 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
10598 then :
10599 emulate sh
10600 NULLCMD=:
10601 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
10602 # is contrary to our usage. Disable this feature.
10603 alias -g '${1+"$@"}'='"$@"'
10604 setopt NO_GLOB_SUBST
10605 else $as_nop
10606 case `(set -o) 2>/dev/null` in #(
10607 *posix*) :
10608 set -o posix ;; #(
10609 *) :
10610 ;;
10611 esac
10612 fi
10613
10614
10615
10616 # Reset variables that may have inherited troublesome values from
10617 # the environment.
10618
10619 # IFS needs to be set, to space, tab, and newline, in precisely that order.
10620 # (If _AS_PATH_WALK were called with IFS unset, it would have the
10621 # side effect of setting IFS to empty, thus disabling word splitting.)
10622 # Quoting is to prevent editors from complaining about space-tab.
10623 as_nl='
10624 '
10625 export as_nl
10626 IFS=" "" $as_nl"
10627
10628 PS1='$ '
10629 PS2='> '
10630 PS4='+ '
10631
10632 # Ensure predictable behavior from utilities with locale-dependent output.
10633 LC_ALL=C
10634 export LC_ALL
10635 LANGUAGE=C
10636 export LANGUAGE
10637
10638 # We cannot yet rely on "unset" to work, but we need these variables
10639 # to be unset--not just set to an empty or harmless value--now, to
10640 # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
10641 # also avoids known problems related to "unset" and subshell syntax
10642 # in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
10643 for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
10644 do eval test \${$as_var+y} \
10645 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
10646 done
10647
10648 # Ensure that fds 0, 1, and 2 are open.
10649 if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
10650 if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
10651 if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
10652
10653 # The user is always right.
10654 if ${PATH_SEPARATOR+false} :; then
10655 PATH_SEPARATOR=:
10656 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
10657 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
10658 PATH_SEPARATOR=';'
10659 }
10660 fi
10661
10662
10663 # Find who we are. Look in the path if we contain no directory separator.
10664 as_myself=
10665 case $0 in #((
10666 *[\\/]* ) as_myself=$0 ;;
10667 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10668 for as_dir in $PATH
10669 do
10670 IFS=$as_save_IFS
10671 case $as_dir in #(((
10672 '') as_dir=./ ;;
10673 */) ;;
10674 *) as_dir=$as_dir/ ;;
10675 esac
10676 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
10677 done
10678 IFS=$as_save_IFS
10679
10680 ;;
10681 esac
10682 # We did not find ourselves, most probably we were run as `sh COMMAND'
10683 # in which case we are not to be found in the path.
10684 if test "x$as_myself" = x; then
10685 as_myself=$0
10686 fi
10687 if test ! -f "$as_myself"; then
10688 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
10689 exit 1
10690 fi
10691
10692
10693
10694 # as_fn_error STATUS ERROR [LINENO LOG_FD]
10695 # ----------------------------------------
10696 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
10697 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
10698 # script with STATUS, using 1 if that was 0.
10699 as_fn_error ()
10700 {
10701 as_status=$1; test $as_status -eq 0 && as_status=1
10702 if test "$4"; then
10703 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
10704 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
10705 fi
10706 printf "%s\n" "$as_me: error: $2" >&2
10707 as_fn_exit $as_status
10708 } # as_fn_error
10709
10710
10711
10712 # as_fn_set_status STATUS
10713 # -----------------------
10714 # Set $? to STATUS, without forking.
10715 as_fn_set_status ()
10716 {
10717 return $1
10718 } # as_fn_set_status
10719
10720 # as_fn_exit STATUS
10721 # -----------------
10722 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
10723 as_fn_exit ()
10724 {
10725 set +e
10726 as_fn_set_status $1
10727 exit $1
10728 } # as_fn_exit
10729
10730 # as_fn_unset VAR
10731 # ---------------
10732 # Portably unset VAR.
10733 as_fn_unset ()
10734 {
10735 { eval $1=; unset $1;}
10736 }
10737 as_unset=as_fn_unset
10738
10739 # as_fn_append VAR VALUE
10740 # ----------------------
10741 # Append the text in VALUE to the end of the definition contained in VAR. Take
10742 # advantage of any shell optimizations that allow amortized linear growth over
10743 # repeated appends, instead of the typical quadratic growth present in naive
10744 # implementations.
10745 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
10746 then :
10747 eval 'as_fn_append ()
10748 {
10749 eval $1+=\$2
10750 }'
10751 else $as_nop
10752 as_fn_append ()
10753 {
10754 eval $1=\$$1\$2
10755 }
10756 fi # as_fn_append
10757
10758 # as_fn_arith ARG...
10759 # ------------------
10760 # Perform arithmetic evaluation on the ARGs, and store the result in the
10761 # global $as_val. Take advantage of shells that can avoid forks. The arguments
10762 # must be portable across $(()) and expr.
10763 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
10764 then :
10765 eval 'as_fn_arith ()
10766 {
10767 as_val=$(( $* ))
10768 }'
10769 else $as_nop
10770 as_fn_arith ()
10771 {
10772 as_val=`expr "$@" || test $? -eq 1`
10773 }
10774 fi # as_fn_arith
10775
10776
10777 if expr a : '\(a\)' >/dev/null 2>&1 &&
10778 test "X`expr 00001 : '.*\(...\)'`" = X001; then
10779 as_expr=expr
10780 else
10781 as_expr=false
10782 fi
10783
10784 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
10785 as_basename=basename
10786 else
10787 as_basename=false
10788 fi
10789
10790 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
10791 as_dirname=dirname
10792 else
10793 as_dirname=false
10794 fi
10795
10796 as_me=`$as_basename -- "$0" ||
10797 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
10798 X"$0" : 'X\(//\)$' \| \
10799 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
10800 printf "%s\n" X/"$0" |
10801 sed '/^.*\/\([^/][^/]*\)\/*$/{
10802 s//\1/
10803 q
10804 }
10805 /^X\/\(\/\/\)$/{
10806 s//\1/
10807 q
10808 }
10809 /^X\/\(\/\).*/{
10810 s//\1/
10811 q
10812 }
10813 s/.*/./; q'`
10814
10815 # Avoid depending upon Character Ranges.
10816 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
10817 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
10818 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
10819 as_cr_digits='0123456789'
10820 as_cr_alnum=$as_cr_Letters$as_cr_digits
10821
10822
10823 # Determine whether it's possible to make 'echo' print without a newline.
10824 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
10825 # for compatibility with existing Makefiles.
10826 ECHO_C= ECHO_N= ECHO_T=
10827 case `echo -n x` in #(((((
10828 -n*)
10829 case `echo 'xy\c'` in
10830 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
10831 xy) ECHO_C='\c';;
10832 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
10833 ECHO_T=' ';;
10834 esac;;
10835 *)
10836 ECHO_N='-n';;
10837 esac
10838
10839 # For backward compatibility with old third-party macros, we provide
10840 # the shell variables $as_echo and $as_echo_n. New code should use
10841 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
10842 as_echo='printf %s\n'
10843 as_echo_n='printf %s'
10844
10845 rm -f conf$$ conf$$.exe conf$$.file
10846 if test -d conf$$.dir; then
10847 rm -f conf$$.dir/conf$$.file
10848 else
10849 rm -f conf$$.dir
10850 mkdir conf$$.dir 2>/dev/null
10851 fi
10852 if (echo >conf$$.file) 2>/dev/null; then
10853 if ln -s conf$$.file conf$$ 2>/dev/null; then
10854 as_ln_s='ln -s'
10855 # ... but there are two gotchas:
10856 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
10857 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
10858 # In both cases, we have to default to `cp -pR'.
10859 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
10860 as_ln_s='cp -pR'
10861 elif ln conf$$.file conf$$ 2>/dev/null; then
10862 as_ln_s=ln
10863 else
10864 as_ln_s='cp -pR'
10865 fi
10866 else
10867 as_ln_s='cp -pR'
10868 fi
10869 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
10870 rmdir conf$$.dir 2>/dev/null
10871
10872
10873 # as_fn_mkdir_p
10874 # -------------
10875 # Create "$as_dir" as a directory, including parents if necessary.
10876 as_fn_mkdir_p ()
10877 {
10878
10879 case $as_dir in #(
10880 -*) as_dir=./$as_dir;;
10881 esac
10882 test -d "$as_dir" || eval $as_mkdir_p || {
10883 as_dirs=
10884 while :; do
10885 case $as_dir in #(
10886 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
10887 *) as_qdir=$as_dir;;
10888 esac
10889 as_dirs="'$as_qdir' $as_dirs"
10890 as_dir=`$as_dirname -- "$as_dir" ||
10891 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
10892 X"$as_dir" : 'X\(//\)[^/]' \| \
10893 X"$as_dir" : 'X\(//\)$' \| \
10894 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
10895 printf "%s\n" X"$as_dir" |
10896 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
10897 s//\1/
10898 q
10899 }
10900 /^X\(\/\/\)[^/].*/{
10901 s//\1/
10902 q
10903 }
10904 /^X\(\/\/\)$/{
10905 s//\1/
10906 q
10907 }
10908 /^X\(\/\).*/{
10909 s//\1/
10910 q
10911 }
10912 s/.*/./; q'`
10913 test -d "$as_dir" && break
10914 done
10915 test -z "$as_dirs" || eval "mkdir $as_dirs"
10916 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
10917
10918
10919 } # as_fn_mkdir_p
10920 if mkdir -p . 2>/dev/null; then
10921 as_mkdir_p='mkdir -p "$as_dir"'
10922 else
10923 test -d ./-p && rmdir ./-p
10924 as_mkdir_p=false
10925 fi
10926
10927
10928 # as_fn_executable_p FILE
10929 # -----------------------
10930 # Test if FILE is an executable regular file.
10931 as_fn_executable_p ()
10932 {
10933 test -f "$1" && test -x "$1"
10934 } # as_fn_executable_p
10935 as_test_x='test -x'
10936 as_executable_p=as_fn_executable_p
10937
10938 # Sed expression to map a string onto a valid CPP name.
10939 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
10940
10941 # Sed expression to map a string onto a valid variable name.
10942 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
10943
10944
10945 exec 6>&1
10946 ## ----------------------------------- ##
10947 ## Main body of $CONFIG_STATUS script. ##
10948 ## ----------------------------------- ##
10949 _ASEOF
10950 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
10951
10952 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10953 # Save the log message, to keep $0 and so on meaningful, and to
10954 # report actual input values of CONFIG_FILES etc. instead of their
10955 # values after options handling.
10956 ac_log="
10957 This file was extended by CVD $as_me 2.1, which was
10958 generated by GNU Autoconf 2.71. Invocation command line was
10959
10960 CONFIG_FILES = $CONFIG_FILES
10961 CONFIG_HEADERS = $CONFIG_HEADERS
10962 CONFIG_LINKS = $CONFIG_LINKS
10963 CONFIG_COMMANDS = $CONFIG_COMMANDS
10964 $ $0 $@
10965
10966 on `(hostname || uname -n) 2>/dev/null | sed 1q`
10967 "
10968
10969 _ACEOF
10970
10971 case $ac_config_files in *"
10972 "*) set x $ac_config_files; shift; ac_config_files=$*;;
10973 esac
10974
10975 case $ac_config_headers in *"
10976 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
10977 esac
10978
10979
10980 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10981 # Files that config.status was made for.
10982 config_files="$ac_config_files"
10983 config_headers="$ac_config_headers"
10984
10985 _ACEOF
10986
10987 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10988 ac_cs_usage="\
10989 \`$as_me' instantiates files and other configuration actions
10990 from templates according to the current configuration. Unless the files
10991 and actions are specified as TAGs, all are instantiated by default.
10992
10993 Usage: $0 [OPTION]... [TAG]...
10994
10995 -h, --help print this help, then exit
10996 -V, --version print version number and configuration settings, then exit
10997 --config print configuration, then exit
10998 -q, --quiet, --silent
10999 do not print progress messages
11000 -d, --debug don't remove temporary files
11001 --recheck update $as_me by reconfiguring in the same conditions
11002 --file=FILE[:TEMPLATE]
11003 instantiate the configuration file FILE
11004 --header=FILE[:TEMPLATE]
11005 instantiate the configuration header FILE
11006
11007 Configuration files:
11008 $config_files
11009
11010 Configuration headers:
11011 $config_headers
11012
11013 Report bugs to the package provider."
11014
11015 _ACEOF
11016 ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
11017 ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
11018 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11019 ac_cs_config='$ac_cs_config_escaped'
11020 ac_cs_version="\\
11021 CVD config.status 2.1
11022 configured by $0, generated by GNU Autoconf 2.71,
11023 with options \\"\$ac_cs_config\\"
11024
11025 Copyright (C) 2021 Free Software Foundation, Inc.
11026 This config.status script is free software; the Free Software Foundation
11027 gives unlimited permission to copy, distribute and modify it."
11028
11029 ac_pwd='$ac_pwd'
11030 srcdir='$srcdir'
11031 INSTALL='$INSTALL'
11032 AWK='$AWK'
11033 test -n "\$AWK" || AWK=awk
11034 _ACEOF
11035
11036 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11037 # The default lists apply if the user does not specify any file.
11038 ac_need_defaults=:
11039 while test $# != 0
11040 do
11041 case $1 in
11042 --*=?*)
11043 ac_option=`expr "X$1" : 'X\([^=]*\)='`
11044 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
11045 ac_shift=:
11046 ;;
11047 --*=)
11048 ac_option=`expr "X$1" : 'X\([^=]*\)='`
11049 ac_optarg=
11050 ac_shift=:
11051 ;;
11052 *)
11053 ac_option=$1
11054 ac_optarg=$2
11055 ac_shift=shift
11056 ;;
11057 esac
11058
11059 case $ac_option in
11060 # Handling of the options.
11061 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11062 ac_cs_recheck=: ;;
11063 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
11064 printf "%s\n" "$ac_cs_version"; exit ;;
11065 --config | --confi | --conf | --con | --co | --c )
11066 printf "%s\n" "$ac_cs_config"; exit ;;
11067 --debug | --debu | --deb | --de | --d | -d )
11068 debug=: ;;
11069 --file | --fil | --fi | --f )
11070 $ac_shift
11071 case $ac_optarg in
11072 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
11073 '') as_fn_error $? "missing file argument" ;;
11074 esac
11075 as_fn_append CONFIG_FILES " '$ac_optarg'"
11076 ac_need_defaults=false;;
11077 --header | --heade | --head | --hea )
11078 $ac_shift
11079 case $ac_optarg in
11080 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
11081 esac
11082 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
11083 ac_need_defaults=false;;
11084 --he | --h)
11085 # Conflict between --help and --header
11086 as_fn_error $? "ambiguous option: \`$1'
11087 Try \`$0 --help' for more information.";;
11088 --help | --hel | -h )
11089 printf "%s\n" "$ac_cs_usage"; exit ;;
11090 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
11091 | -silent | --silent | --silen | --sile | --sil | --si | --s)
11092 ac_cs_silent=: ;;
11093
11094 # This is an error.
11095 -*) as_fn_error $? "unrecognized option: \`$1'
11096 Try \`$0 --help' for more information." ;;
11097
11098 *) as_fn_append ac_config_targets " $1"
11099 ac_need_defaults=false ;;
11100
11101 esac
11102 shift
11103 done
11104
11105 ac_configure_extra_args=
11106
11107 if $ac_cs_silent; then
11108 exec 6>/dev/null
11109 ac_configure_extra_args="$ac_configure_extra_args --silent"
11110 fi
11111
11112 _ACEOF
11113 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11114 if \$ac_cs_recheck; then
11115 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
11116 shift
11117 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
11118 CONFIG_SHELL='$SHELL'
11119 export CONFIG_SHELL
11120 exec "\$@"
11121 fi
11122
11123 _ACEOF
11124 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11125 exec 5>>config.log
11126 {
11127 echo
11128 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
11129 ## Running $as_me. ##
11130 _ASBOX
11131 printf "%s\n" "$ac_log"
11132 } >&5
11133
11134 _ACEOF
11135 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11136 _ACEOF
11137
11138 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11139
11140 # Handling of arguments.
11141 for ac_config_target in $ac_config_targets
11142 do
11143 case $ac_config_target in
11144 "cvd/config.h") CONFIG_HEADERS="$CONFIG_HEADERS cvd/config.h" ;;
11145 "cvd_src/config_internal.h") CONFIG_HEADERS="$CONFIG_HEADERS cvd_src/config_internal.h" ;;
11146 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11147
11148 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
11149 esac
11150 done
11151
11152
11153 # If the user did not use the arguments to specify the items to instantiate,
11154 # then the envvar interface is used. Set only those that are not.
11155 # We use the long form for the default assignment because of an extremely
11156 # bizarre bug on SunOS 4.1.3.
11157 if $ac_need_defaults; then
11158 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
11159 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
11160 fi
11161
11162 # Have a temporary directory for convenience. Make it in the build tree
11163 # simply because there is no reason against having it here, and in addition,
11164 # creating and moving files from /tmp can sometimes cause problems.
11165 # Hook for its removal unless debugging.
11166 # Note that there is a small window in which the directory will not be cleaned:
11167 # after its creation but before its name has been assigned to `$tmp'.
11168 $debug ||
11169 {
11170 tmp= ac_tmp=
11171 trap 'exit_status=$?
11172 : "${ac_tmp:=$tmp}"
11173 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
11174 ' 0
11175 trap 'as_fn_exit 1' 1 2 13 15
11176 }
11177 # Create a (secure) tmp directory for tmp files.
11178
11179 {
11180 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
11181 test -d "$tmp"
11182 } ||
11183 {
11184 tmp=./conf$$-$RANDOM
11185 (umask 077 && mkdir "$tmp")
11186 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
11187 ac_tmp=$tmp
11188
11189 # Set up the scripts for CONFIG_FILES section.
11190 # No need to generate them if there are no CONFIG_FILES.
11191 # This happens for instance with `./config.status config.h'.
11192 if test -n "$CONFIG_FILES"; then
11193
11194
11195 ac_cr=`echo X | tr X '\015'`
11196 # On cygwin, bash can eat \r inside `` if the user requested igncr.
11197 # But we know of no other shell where ac_cr would be empty at this
11198 # point, so we can use a bashism as a fallback.
11199 if test "x$ac_cr" = x; then
11200 eval ac_cr=\$\'\\r\'
11201 fi
11202 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
11203 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
11204 ac_cs_awk_cr='\\r'
11205 else
11206 ac_cs_awk_cr=$ac_cr
11207 fi
11208
11209 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
11210 _ACEOF
11211
11212
11213 {
11214 echo "cat >conf$$subs.awk <<_ACEOF" &&
11215 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
11216 echo "_ACEOF"
11217 } >conf$$subs.sh ||
11218 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11219 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
11220 ac_delim='%!_!# '
11221 for ac_last_try in false false false false false :; do
11222 . ./conf$$subs.sh ||
11223 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11224
11225 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
11226 if test $ac_delim_n = $ac_delim_num; then
11227 break
11228 elif $ac_last_try; then
11229 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11230 else
11231 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11232 fi
11233 done
11234 rm -f conf$$subs.sh
11235
11236 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11237 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
11238 _ACEOF
11239 sed -n '
11240 h
11241 s/^/S["/; s/!.*/"]=/
11242 p
11243 g
11244 s/^[^!]*!//
11245 :repl
11246 t repl
11247 s/'"$ac_delim"'$//
11248 t delim
11249 :nl
11250 h
11251 s/\(.\{148\}\)..*/\1/
11252 t more1
11253 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
11254 p
11255 n
11256 b repl
11257 :more1
11258 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
11259 p
11260 g
11261 s/.\{148\}//
11262 t nl
11263 :delim
11264 h
11265 s/\(.\{148\}\)..*/\1/
11266 t more2
11267 s/["\\]/\\&/g; s/^/"/; s/$/"/
11268 p
11269 b
11270 :more2
11271 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
11272 p
11273 g
11274 s/.\{148\}//
11275 t delim
11276 ' <conf$$subs.awk | sed '
11277 /^[^""]/{
11278 N
11279 s/\n//
11280 }
11281 ' >>$CONFIG_STATUS || ac_write_fail=1
11282 rm -f conf$$subs.awk
11283 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11284 _ACAWK
11285 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
11286 for (key in S) S_is_set[key] = 1
11287 FS = ""
11288
11289 }
11290 {
11291 line = $ 0
11292 nfields = split(line, field, "@")
11293 substed = 0
11294 len = length(field[1])
11295 for (i = 2; i < nfields; i++) {
11296 key = field[i]
11297 keylen = length(key)
11298 if (S_is_set[key]) {
11299 value = S[key]
11300 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
11301 len += length(value) + length(field[++i])
11302 substed = 1
11303 } else
11304 len += 1 + keylen
11305 }
11306
11307 print line
11308 }
11309
11310 _ACAWK
11311 _ACEOF
11312 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11313 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
11314 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
11315 else
11316 cat
11317 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
11318 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
11319 _ACEOF
11320
11321 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
11322 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
11323 # trailing colons and then remove the whole line if VPATH becomes empty
11324 # (actually we leave an empty line to preserve line numbers).
11325 if test "x$srcdir" = x.; then
11326 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
11327 h
11328 s///
11329 s/^/:/
11330 s/[ ]*$/:/
11331 s/:\$(srcdir):/:/g
11332 s/:\${srcdir}:/:/g
11333 s/:@srcdir@:/:/g
11334 s/^:*//
11335 s/:*$//
11336 x
11337 s/\(=[ ]*\).*/\1/
11338 G
11339 s/\n//
11340 s/^[^=]*=[ ]*$//
11341 }'
11342 fi
11343
11344 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11345 fi # test -n "$CONFIG_FILES"
11346
11347 # Set up the scripts for CONFIG_HEADERS section.
11348 # No need to generate them if there are no CONFIG_HEADERS.
11349 # This happens for instance with `./config.status Makefile'.
11350 if test -n "$CONFIG_HEADERS"; then
11351 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
11352 BEGIN {
11353 _ACEOF
11354
11355 # Transform confdefs.h into an awk script `defines.awk', embedded as
11356 # here-document in config.status, that substitutes the proper values into
11357 # config.h.in to produce config.h.
11358
11359 # Create a delimiter string that does not exist in confdefs.h, to ease
11360 # handling of long lines.
11361 ac_delim='%!_!# '
11362 for ac_last_try in false false :; do
11363 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
11364 if test -z "$ac_tt"; then
11365 break
11366 elif $ac_last_try; then
11367 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
11368 else
11369 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11370 fi
11371 done
11372
11373 # For the awk script, D is an array of macro values keyed by name,
11374 # likewise P contains macro parameters if any. Preserve backslash
11375 # newline sequences.
11376
11377 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
11378 sed -n '
11379 s/.\{148\}/&'"$ac_delim"'/g
11380 t rset
11381 :rset
11382 s/^[ ]*#[ ]*define[ ][ ]*/ /
11383 t def
11384 d
11385 :def
11386 s/\\$//
11387 t bsnl
11388 s/["\\]/\\&/g
11389 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
11390 D["\1"]=" \3"/p
11391 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
11392 d
11393 :bsnl
11394 s/["\\]/\\&/g
11395 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
11396 D["\1"]=" \3\\\\\\n"\\/p
11397 t cont
11398 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
11399 t cont
11400 d
11401 :cont
11402 n
11403 s/.\{148\}/&'"$ac_delim"'/g
11404 t clear
11405 :clear
11406 s/\\$//
11407 t bsnlc
11408 s/["\\]/\\&/g; s/^/"/; s/$/"/p
11409 d
11410 :bsnlc
11411 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
11412 b cont
11413 ' <confdefs.h | sed '
11414 s/'"$ac_delim"'/"\\\
11415 "/g' >>$CONFIG_STATUS || ac_write_fail=1
11416
11417 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11418 for (key in D) D_is_set[key] = 1
11419 FS = ""
11420 }
11421 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
11422 line = \$ 0
11423 split(line, arg, " ")
11424 if (arg[1] == "#") {
11425 defundef = arg[2]
11426 mac1 = arg[3]
11427 } else {
11428 defundef = substr(arg[1], 2)
11429 mac1 = arg[2]
11430 }
11431 split(mac1, mac2, "(") #)
11432 macro = mac2[1]
11433 prefix = substr(line, 1, index(line, defundef) - 1)
11434 if (D_is_set[macro]) {
11435 # Preserve the white space surrounding the "#".
11436 print prefix "define", macro P[macro] D[macro]
11437 next
11438 } else {
11439 # Replace #undef with comments. This is necessary, for example,
11440 # in the case of _POSIX_SOURCE, which is predefined and required
11441 # on some systems where configure will not decide to define it.
11442 if (defundef == "undef") {
11443 print "/*", prefix defundef, macro, "*/"
11444 next
11445 }
11446 }
11447 }
11448 { print }
11449 _ACAWK
11450 _ACEOF
11451 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11452 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
11453 fi # test -n "$CONFIG_HEADERS"
11454
11455
11456 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
11457 shift
11458 for ac_tag
11459 do
11460 case $ac_tag in
11461 :[FHLC]) ac_mode=$ac_tag; continue;;
11462 esac
11463 case $ac_mode$ac_tag in
11464 :[FHL]*:*);;
11465 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
11466 :[FH]-) ac_tag=-:-;;
11467 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
11468 esac
11469 ac_save_IFS=$IFS
11470 IFS=:
11471 set x $ac_tag
11472 IFS=$ac_save_IFS
11473 shift
11474 ac_file=$1
11475 shift
11476
11477 case $ac_mode in
11478 :L) ac_source=$1;;
11479 :[FH])
11480 ac_file_inputs=
11481 for ac_f
11482 do
11483 case $ac_f in
11484 -) ac_f="$ac_tmp/stdin";;
11485 *) # Look for the file first in the build tree, then in the source tree
11486 # (if the path is not absolute). The absolute path cannot be DOS-style,
11487 # because $ac_f cannot contain `:'.
11488 test -f "$ac_f" ||
11489 case $ac_f in
11490 [\\/$]*) false;;
11491 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
11492 esac ||
11493 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
11494 esac
11495 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
11496 as_fn_append ac_file_inputs " '$ac_f'"
11497 done
11498
11499 # Let's still pretend it is `configure' which instantiates (i.e., don't
11500 # use $as_me), people would be surprised to read:
11501 # /* config.h. Generated by config.status. */
11502 configure_input='Generated from '`
11503 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
11504 `' by configure.'
11505 if test x"$ac_file" != x-; then
11506 configure_input="$ac_file. $configure_input"
11507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
11508 printf "%s\n" "$as_me: creating $ac_file" >&6;}
11509 fi
11510 # Neutralize special characters interpreted by sed in replacement strings.
11511 case $configure_input in #(
11512 *\&* | *\|* | *\\* )
11513 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
11514 sed 's/[\\\\&|]/\\\\&/g'`;; #(
11515 *) ac_sed_conf_input=$configure_input;;
11516 esac
11517
11518 case $ac_tag in
11519 *:-:* | *:-) cat >"$ac_tmp/stdin" \
11520 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
11521 esac
11522 ;;
11523 esac
11524
11525 ac_dir=`$as_dirname -- "$ac_file" ||
11526 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11527 X"$ac_file" : 'X\(//\)[^/]' \| \
11528 X"$ac_file" : 'X\(//\)$' \| \
11529 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
11530 printf "%s\n" X"$ac_file" |
11531 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11532 s//\1/
11533 q
11534 }
11535 /^X\(\/\/\)[^/].*/{
11536 s//\1/
11537 q
11538 }
11539 /^X\(\/\/\)$/{
11540 s//\1/
11541 q
11542 }
11543 /^X\(\/\).*/{
11544 s//\1/
11545 q
11546 }
11547 s/.*/./; q'`
11548 as_dir="$ac_dir"; as_fn_mkdir_p
11549 ac_builddir=.
11550
11551 case "$ac_dir" in
11552 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
11553 *)
11554 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
11555 # A ".." for each directory in $ac_dir_suffix.
11556 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
11557 case $ac_top_builddir_sub in
11558 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
11559 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
11560 esac ;;
11561 esac
11562 ac_abs_top_builddir=$ac_pwd
11563 ac_abs_builddir=$ac_pwd$ac_dir_suffix
11564 # for backward compatibility:
11565 ac_top_builddir=$ac_top_build_prefix
11566
11567 case $srcdir in
11568 .) # We are building in place.
11569 ac_srcdir=.
11570 ac_top_srcdir=$ac_top_builddir_sub
11571 ac_abs_top_srcdir=$ac_pwd ;;
11572 [\\/]* | ?:[\\/]* ) # Absolute name.
11573 ac_srcdir=$srcdir$ac_dir_suffix;
11574 ac_top_srcdir=$srcdir
11575 ac_abs_top_srcdir=$srcdir ;;
11576 *) # Relative name.
11577 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
11578 ac_top_srcdir=$ac_top_build_prefix$srcdir
11579 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
11580 esac
11581 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
11582
11583
11584 case $ac_mode in
11585 :F)
11586 #
11587 # CONFIG_FILE
11588 #
11589
11590 case $INSTALL in
11591 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
11592 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
11593 esac
11594 _ACEOF
11595
11596 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11597 # If the template does not know about datarootdir, expand it.
11598 # FIXME: This hack should be removed a few years after 2.60.
11599 ac_datarootdir_hack=; ac_datarootdir_seen=
11600 ac_sed_dataroot='
11601 /datarootdir/ {
11602 p
11603 q
11604 }
11605 /@datadir@/p
11606 /@docdir@/p
11607 /@infodir@/p
11608 /@localedir@/p
11609 /@mandir@/p'
11610 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
11611 *datarootdir*) ac_datarootdir_seen=yes;;
11612 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
11613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
11614 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
11615 _ACEOF
11616 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11617 ac_datarootdir_hack='
11618 s&@datadir@&$datadir&g
11619 s&@docdir@&$docdir&g
11620 s&@infodir@&$infodir&g
11621 s&@localedir@&$localedir&g
11622 s&@mandir@&$mandir&g
11623 s&\\\${datarootdir}&$datarootdir&g' ;;
11624 esac
11625 _ACEOF
11626
11627 # Neutralize VPATH when `$srcdir' = `.'.
11628 # Shell code in configure.ac might set extrasub.
11629 # FIXME: do we really want to maintain this feature?
11630 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11631 ac_sed_extra="$ac_vpsub
11632 $extrasub
11633 _ACEOF
11634 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11635 :t
11636 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
11637 s|@configure_input@|$ac_sed_conf_input|;t t
11638 s&@top_builddir@&$ac_top_builddir_sub&;t t
11639 s&@top_build_prefix@&$ac_top_build_prefix&;t t
11640 s&@srcdir@&$ac_srcdir&;t t
11641 s&@abs_srcdir@&$ac_abs_srcdir&;t t
11642 s&@top_srcdir@&$ac_top_srcdir&;t t
11643 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
11644 s&@builddir@&$ac_builddir&;t t
11645 s&@abs_builddir@&$ac_abs_builddir&;t t
11646 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
11647 s&@INSTALL@&$ac_INSTALL&;t t
11648 $ac_datarootdir_hack
11649 "
11650 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
11651 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
11652
11653 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
11654 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
11655 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
11656 "$ac_tmp/out"`; test -z "$ac_out"; } &&
11657 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11658 which seems to be undefined. Please make sure it is defined" >&5
11659 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11660 which seems to be undefined. Please make sure it is defined" >&2;}
11661
11662 rm -f "$ac_tmp/stdin"
11663 case $ac_file in
11664 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
11665 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
11666 esac \
11667 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
11668 ;;
11669 :H)
11670 #
11671 # CONFIG_HEADER
11672 #
11673 if test x"$ac_file" != x-; then
11674 {
11675 printf "%s\n" "/* $configure_input */" >&1 \
11676 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
11677 } >"$ac_tmp/config.h" \
11678 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
11679 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
11680 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
11681 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
11682 else
11683 rm -f "$ac_file"
11684 mv "$ac_tmp/config.h" "$ac_file" \
11685 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
11686 fi
11687 else
11688 printf "%s\n" "/* $configure_input */" >&1 \
11689 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
11690 || as_fn_error $? "could not create -" "$LINENO" 5
11691 fi
11692 ;;
11693
11694
11695 esac
11696
11697 done # for ac_tag
11698
11699
11700 as_fn_exit 0
11701 _ACEOF
11702 ac_clean_files=$ac_clean_files_save
11703
11704 test $ac_write_fail = 0 ||
11705 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
11706
11707
11708 # configure is writing to config.log, and then calls config.status.
11709 # config.status does its own redirection, appending to config.log.
11710 # Unfortunately, on DOS this fails, as config.log is still kept open
11711 # by configure, so config.status won't be able to write to it; its
11712 # output is simply discarded. So we exec the FD to /dev/null,
11713 # effectively closing config.log, so it can be properly (re)opened and
11714 # appended to by config.status. When coming back to configure, we
11715 # need to make the FD available again.
11716 if test "$no_create" != yes; then
11717 ac_cs_success=:
11718 ac_config_status_args=
11719 test "$silent" = yes &&
11720 ac_config_status_args="$ac_config_status_args --quiet"
11721 exec 5>/dev/null
11722 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
11723 exec 5>>config.log
11724 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
11725 # would make configure fail if this is the last instruction.
11726 $ac_cs_success || as_fn_exit 1
11727 fi
11728 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
11729 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
11730 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
11731 fi
11732
11733