Debian Codegraph @

configure

raw
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 18.6.
4 #
5 # Report bugs to <[email protected]>.
6 #
7 #
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 #
10 #
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
13 #
14 # Copyright (c) 1996-2025, PostgreSQL Global Development Group
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
18
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
22 emulate sh
23 NULLCMD=:
24 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
27 setopt NO_GLOB_SUBST
28 else
29 case `(set -o) 2>/dev/null` in #(
30 *posix*) :
31 set -o posix ;; #(
32 *) :
33 ;;
34 esac
35 fi
36
37
38 as_nl='
39 '
40 export as_nl
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49 as_echo='print -r --'
50 as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52 as_echo='printf %s\n'
53 as_echo_n='printf %s'
54 else
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
58 else
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 as_echo_n_body='eval
61 arg=$1;
62 case $arg in #(
63 *"$as_nl"*)
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66 esac;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
68 '
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
71 fi
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
74 fi
75
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
78 PATH_SEPARATOR=:
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
81 PATH_SEPARATOR=';'
82 }
83 fi
84
85
86 # IFS
87 # We need space, tab and new line, in precisely that order. Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
91 IFS=" "" $as_nl"
92
93 # Find who we are. Look in the path if we contain no directory separator.
94 as_myself=
95 case $0 in #((
96 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
98 for as_dir in $PATH
99 do
100 IFS=$as_save_IFS
101 test -z "$as_dir" && as_dir=.
102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
103 done
104 IFS=$as_save_IFS
105
106 ;;
107 esac
108 # We did not find ourselves, most probably we were run as `sh COMMAND'
109 # in which case we are not to be found in the path.
110 if test "x$as_myself" = x; then
111 as_myself=$0
112 fi
113 if test ! -f "$as_myself"; then
114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
115 exit 1
116 fi
117
118 # Unset variables that we do not need and which cause bugs (e.g. in
119 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120 # suppresses any "Segmentation fault" message there. '((' could
121 # trigger a bug in pdksh 5.2.14.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
125 done
126 PS1='$ '
127 PS2='> '
128 PS4='+ '
129
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
135
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
139 # Use a proper internal environment variable to ensure we don't fall
140 # into an infinite loop, continuously re-executing ourselves.
141 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
142 _as_can_reexec=no; export _as_can_reexec;
143 # We cannot yet assume a decent shell, so we have to provide a
144 # neutralization value for shells without unset; and this also
145 # works around shells that cannot unset nonexistent variables.
146 # Preserve -v and -x to the replacement shell.
147 BASH_ENV=/dev/null
148 ENV=/dev/null
149 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
150 case $- in # ((((
151 *v*x* | *x*v* ) as_opts=-vx ;;
152 *v* ) as_opts=-v ;;
153 *x* ) as_opts=-x ;;
154 * ) as_opts= ;;
155 esac
156 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
157 # Admittedly, this is quite paranoid, since all the known shells bail
158 # out after a failed `exec'.
159 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
160 as_fn_exit 255
161 fi
162 # We don't want this to propagate to other subprocesses.
163 { _as_can_reexec=; unset _as_can_reexec;}
164 if test "x$CONFIG_SHELL" = x; then
165 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
166 emulate sh
167 NULLCMD=:
168 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
169 # is contrary to our usage. Disable this feature.
170 alias -g '\${1+\"\$@\"}'='\"\$@\"'
171 setopt NO_GLOB_SUBST
172 else
173 case \`(set -o) 2>/dev/null\` in #(
174 *posix*) :
175 set -o posix ;; #(
176 *) :
177 ;;
178 esac
179 fi
180 "
181 as_required="as_fn_return () { (exit \$1); }
182 as_fn_success () { as_fn_return 0; }
183 as_fn_failure () { as_fn_return 1; }
184 as_fn_ret_success () { return 0; }
185 as_fn_ret_failure () { return 1; }
186
187 exitcode=0
188 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
189 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
190 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
191 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
192 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
193
194 else
195 exitcode=1; echo positional parameters were not saved.
196 fi
197 test x\$exitcode = x0 || exit 1
198 test -x / || exit 1"
199 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
200 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
201 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
202 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
203 test \$(( 1 + 1 )) = 2 || exit 1"
204 if (eval "$as_required") 2>/dev/null; then :
205 as_have_required=yes
206 else
207 as_have_required=no
208 fi
209 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
210
211 else
212 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
213 as_found=false
214 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
215 do
216 IFS=$as_save_IFS
217 test -z "$as_dir" && as_dir=.
218 as_found=:
219 case $as_dir in #(
220 /*)
221 for as_base in sh bash ksh sh5; do
222 # Try only shells that exist, to save several forks.
223 as_shell=$as_dir/$as_base
224 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
225 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 CONFIG_SHELL=$as_shell as_have_required=yes
227 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
228 break 2
229 fi
230 fi
231 done;;
232 esac
233 as_found=false
234 done
235 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
236 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
237 CONFIG_SHELL=$SHELL as_have_required=yes
238 fi; }
239 IFS=$as_save_IFS
240
241
242 if test "x$CONFIG_SHELL" != x; then :
243 export CONFIG_SHELL
244 # We cannot yet assume a decent shell, so we have to provide a
245 # neutralization value for shells without unset; and this also
246 # works around shells that cannot unset nonexistent variables.
247 # Preserve -v and -x to the replacement shell.
248 BASH_ENV=/dev/null
249 ENV=/dev/null
250 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
251 case $- in # ((((
252 *v*x* | *x*v* ) as_opts=-vx ;;
253 *v* ) as_opts=-v ;;
254 *x* ) as_opts=-x ;;
255 * ) as_opts= ;;
256 esac
257 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
258 # Admittedly, this is quite paranoid, since all the known shells bail
259 # out after a failed `exec'.
260 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
261 exit 255
262 fi
263
264 if test x$as_have_required = xno; then :
265 $as_echo "$0: This script requires a shell more modern than all"
266 $as_echo "$0: the shells that I found on your system."
267 if test x${ZSH_VERSION+set} = xset ; then
268 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
269 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
270 else
271 $as_echo "$0: Please tell [email protected] and
272 $0: [email protected] about your system,
273 $0: including any error possibly output before this
274 $0: message. Then install a modern shell, or manually run
275 $0: the script under such a shell if you do have one."
276 fi
277 exit 1
278 fi
279 fi
280 fi
281 SHELL=${CONFIG_SHELL-/bin/sh}
282 export SHELL
283 # Unset more variables known to interfere with behavior of common tools.
284 CLICOLOR_FORCE= GREP_OPTIONS=
285 unset CLICOLOR_FORCE GREP_OPTIONS
286
287 ## --------------------- ##
288 ## M4sh Shell Functions. ##
289 ## --------------------- ##
290 # as_fn_unset VAR
291 # ---------------
292 # Portably unset VAR.
293 as_fn_unset ()
294 {
295 { eval $1=; unset $1;}
296 }
297 as_unset=as_fn_unset
298
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
303 {
304 return $1
305 } # as_fn_set_status
306
307 # as_fn_exit STATUS
308 # -----------------
309 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
310 as_fn_exit ()
311 {
312 set +e
313 as_fn_set_status $1
314 exit $1
315 } # as_fn_exit
316
317 # as_fn_mkdir_p
318 # -------------
319 # Create "$as_dir" as a directory, including parents if necessary.
320 as_fn_mkdir_p ()
321 {
322
323 case $as_dir in #(
324 -*) as_dir=./$as_dir;;
325 esac
326 test -d "$as_dir" || eval $as_mkdir_p || {
327 as_dirs=
328 while :; do
329 case $as_dir in #(
330 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
331 *) as_qdir=$as_dir;;
332 esac
333 as_dirs="'$as_qdir' $as_dirs"
334 as_dir=`$as_dirname -- "$as_dir" ||
335 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
336 X"$as_dir" : 'X\(//\)[^/]' \| \
337 X"$as_dir" : 'X\(//\)$' \| \
338 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
339 $as_echo X"$as_dir" |
340 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
341 s//\1/
342 q
343 }
344 /^X\(\/\/\)[^/].*/{
345 s//\1/
346 q
347 }
348 /^X\(\/\/\)$/{
349 s//\1/
350 q
351 }
352 /^X\(\/\).*/{
353 s//\1/
354 q
355 }
356 s/.*/./; q'`
357 test -d "$as_dir" && break
358 done
359 test -z "$as_dirs" || eval "mkdir $as_dirs"
360 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
361
362
363 } # as_fn_mkdir_p
364
365 # as_fn_executable_p FILE
366 # -----------------------
367 # Test if FILE is an executable regular file.
368 as_fn_executable_p ()
369 {
370 test -f "$1" && test -x "$1"
371 } # as_fn_executable_p
372 # as_fn_append VAR VALUE
373 # ----------------------
374 # Append the text in VALUE to the end of the definition contained in VAR. Take
375 # advantage of any shell optimizations that allow amortized linear growth over
376 # repeated appends, instead of the typical quadratic growth present in naive
377 # implementations.
378 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
379 eval 'as_fn_append ()
380 {
381 eval $1+=\$2
382 }'
383 else
384 as_fn_append ()
385 {
386 eval $1=\$$1\$2
387 }
388 fi # as_fn_append
389
390 # as_fn_arith ARG...
391 # ------------------
392 # Perform arithmetic evaluation on the ARGs, and store the result in the
393 # global $as_val. Take advantage of shells that can avoid forks. The arguments
394 # must be portable across $(()) and expr.
395 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
396 eval 'as_fn_arith ()
397 {
398 as_val=$(( $* ))
399 }'
400 else
401 as_fn_arith ()
402 {
403 as_val=`expr "$@" || test $? -eq 1`
404 }
405 fi # as_fn_arith
406
407
408 # as_fn_error STATUS ERROR [LINENO LOG_FD]
409 # ----------------------------------------
410 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
411 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
412 # script with STATUS, using 1 if that was 0.
413 as_fn_error ()
414 {
415 as_status=$1; test $as_status -eq 0 && as_status=1
416 if test "$4"; then
417 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
418 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
419 fi
420 $as_echo "$as_me: error: $2" >&2
421 as_fn_exit $as_status
422 } # as_fn_error
423
424 if expr a : '\(a\)' >/dev/null 2>&1 &&
425 test "X`expr 00001 : '.*\(...\)'`" = X001; then
426 as_expr=expr
427 else
428 as_expr=false
429 fi
430
431 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432 as_basename=basename
433 else
434 as_basename=false
435 fi
436
437 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
438 as_dirname=dirname
439 else
440 as_dirname=false
441 fi
442
443 as_me=`$as_basename -- "$0" ||
444 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
445 X"$0" : 'X\(//\)$' \| \
446 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
447 $as_echo X/"$0" |
448 sed '/^.*\/\([^/][^/]*\)\/*$/{
449 s//\1/
450 q
451 }
452 /^X\/\(\/\/\)$/{
453 s//\1/
454 q
455 }
456 /^X\/\(\/\).*/{
457 s//\1/
458 q
459 }
460 s/.*/./; q'`
461
462 # Avoid depending upon Character Ranges.
463 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
464 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
465 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
466 as_cr_digits='0123456789'
467 as_cr_alnum=$as_cr_Letters$as_cr_digits
468
469
470 as_lineno_1=$LINENO as_lineno_1a=$LINENO
471 as_lineno_2=$LINENO as_lineno_2a=$LINENO
472 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
473 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
474 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
475 sed -n '
476 p
477 /[$]LINENO/=
478 ' <$as_myself |
479 sed '
480 s/[$]LINENO.*/&-/
481 t lineno
482 b
483 :lineno
484 N
485 :loop
486 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
487 t loop
488 s/-\n.*//
489 ' >$as_me.lineno &&
490 chmod +x "$as_me.lineno" ||
491 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
492
493 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
494 # already done that, so ensure we don't try to do so again and fall
495 # in an infinite loop. This has already happened in practice.
496 _as_can_reexec=no; export _as_can_reexec
497 # Don't try to exec as it changes $[0], causing all sort of problems
498 # (the dirname of $[0] is not the place where we might find the
499 # original and so on. Autoconf is especially sensitive to this).
500 . "./$as_me.lineno"
501 # Exit status is that of the last command.
502 exit
503 }
504
505 ECHO_C= ECHO_N= ECHO_T=
506 case `echo -n x` in #(((((
507 -n*)
508 case `echo 'xy\c'` in
509 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
510 xy) ECHO_C='\c';;
511 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
512 ECHO_T=' ';;
513 esac;;
514 *)
515 ECHO_N='-n';;
516 esac
517
518 rm -f conf$$ conf$$.exe conf$$.file
519 if test -d conf$$.dir; then
520 rm -f conf$$.dir/conf$$.file
521 else
522 rm -f conf$$.dir
523 mkdir conf$$.dir 2>/dev/null
524 fi
525 if (echo >conf$$.file) 2>/dev/null; then
526 if ln -s conf$$.file conf$$ 2>/dev/null; then
527 as_ln_s='ln -s'
528 # ... but there are two gotchas:
529 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
530 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
531 # In both cases, we have to default to `cp -pR'.
532 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
533 as_ln_s='cp -pR'
534 elif ln conf$$.file conf$$ 2>/dev/null; then
535 as_ln_s=ln
536 else
537 as_ln_s='cp -pR'
538 fi
539 else
540 as_ln_s='cp -pR'
541 fi
542 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543 rmdir conf$$.dir 2>/dev/null
544
545 if mkdir -p . 2>/dev/null; then
546 as_mkdir_p='mkdir -p "$as_dir"'
547 else
548 test -d ./-p && rmdir ./-p
549 as_mkdir_p=false
550 fi
551
552 as_test_x='test -x'
553 as_executable_p=as_fn_executable_p
554
555 # Sed expression to map a string onto a valid CPP name.
556 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
557
558 # Sed expression to map a string onto a valid variable name.
559 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
560
561
562 test -n "$DJDIR" || exec 7<&0 </dev/null
563 exec 6>&1
564
565 # Name of the host.
566 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
567 # so uname gets run too.
568 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
569
570 #
571 # Initializations.
572 #
573 ac_default_prefix=/usr/local
574 ac_clean_files=
575 ac_config_libobj_dir=.
576 LIBOBJS=
577 cross_compiling=no
578 subdirs=
579 MFLAGS=
580 MAKEFLAGS=
581
582 # Identity of this package.
583 PACKAGE_NAME='PostgreSQL'
584 PACKAGE_TARNAME='postgresql'
585 PACKAGE_VERSION='18.6'
586 PACKAGE_STRING='PostgreSQL 18.6'
587 PACKAGE_BUGREPORT='[email protected]'
588 PACKAGE_URL='https://www.postgresql.org/'
589
590 ac_unique_file="src/backend/access/common/heaptuple.c"
591 ac_default_prefix=/usr/local/pgsql
592 # Factoring default headers for most tests.
593 ac_includes_default="\
594 #include <stdio.h>
595 #ifdef HAVE_SYS_TYPES_H
596 # include <sys/types.h>
597 #endif
598 #ifdef HAVE_SYS_STAT_H
599 # include <sys/stat.h>
600 #endif
601 #ifdef STDC_HEADERS
602 # include <stdlib.h>
603 # include <stddef.h>
604 #else
605 # ifdef HAVE_STDLIB_H
606 # include <stdlib.h>
607 # endif
608 #endif
609 #ifdef HAVE_STRING_H
610 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
611 # include <memory.h>
612 # endif
613 # include <string.h>
614 #endif
615 #ifdef HAVE_STRINGS_H
616 # include <strings.h>
617 #endif
618 #ifdef HAVE_INTTYPES_H
619 # include <inttypes.h>
620 #endif
621 #ifdef HAVE_STDINT_H
622 # include <stdint.h>
623 #endif
624 #ifdef HAVE_UNISTD_H
625 # include <unistd.h>
626 #endif"
627
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_SYSROOT
631 PG_VERSION_NUM
632 LDFLAGS_EX_BE
633 PROVE
634 DBTOEPUB
635 FOP
636 XSLTPROC
637 XMLLINT
638 TCL_SHARED_BUILD
639 TCL_LIB_SPEC
640 TCL_LIBS
641 TCL_INCLUDE_SPEC
642 TCL_CONFIG_SH
643 TCLSH
644 XGETTEXT
645 MSGMERGE
646 MSGFMT_FLAGS
647 MSGFMT
648 PG_CRC32C_OBJS
649 CFLAGS_CRC
650 LIBOBJS
651 OPENSSL
652 ZSTD
653 LZ4
654 UUID_LIBS
655 LDAP_LIBS_BE
656 LDAP_LIBS_FE
657 with_ssl
658 LIBCURL_LDLIBS
659 PTHREAD_CFLAGS
660 PTHREAD_LIBS
661 PTHREAD_CC
662 ax_pthread_config
663 EGREP
664 GREP
665 SED
666 ZIC
667 python_additional_libs
668 python_libspec
669 python_libdir
670 python_includespec
671 python_version
672 python_majorversion
673 PYTHON
674 perl_embed_ldflags
675 perl_embed_ccflags
676 perl_includespec
677 perl_useshrplib
678 perl_privlibexp
679 perl_archlibexp
680 PERL
681 FLEXFLAGS
682 FLEX
683 BISONFLAGS
684 BISON
685 MKDIR_P
686 LN_S
687 TAR
688 install_bin
689 INSTALL_DATA
690 INSTALL_SCRIPT
691 INSTALL_PROGRAM
692 WINDRES
693 AR
694 STRIP_SHARED_LIB
695 STRIP_STATIC_LIB
696 STRIP
697 LDFLAGS_SL
698 LDFLAGS_EX
699 ZSTD_LIBS
700 ZSTD_CFLAGS
701 with_zstd
702 LZ4_LIBS
703 LZ4_CFLAGS
704 with_lz4
705 with_zlib
706 with_system_tzdata
707 with_libxslt
708 XML2_LIBS
709 XML2_CFLAGS
710 XML2_CONFIG
711 with_libxml
712 LIBNUMA_LIBS
713 LIBNUMA_CFLAGS
714 with_libnuma
715 LIBCURL_LDFLAGS
716 LIBCURL_CPPFLAGS
717 LIBCURL_LIBS
718 LIBCURL_CFLAGS
719 with_libcurl
720 with_uuid
721 LIBURING_LIBS
722 LIBURING_CFLAGS
723 with_liburing
724 with_readline
725 with_systemd
726 with_selinux
727 with_ldap
728 with_krb_srvnam
729 krb_srvtab
730 with_gssapi
731 with_python
732 with_perl
733 with_tcl
734 ICU_LIBS
735 ICU_CFLAGS
736 with_icu
737 autodepend
738 PKG_CONFIG_LIBDIR
739 PKG_CONFIG_PATH
740 PKG_CONFIG
741 DLSUFFIX
742 TAS
743 GCC
744 CPP
745 CFLAGS_SL
746 BITCODE_CXXFLAGS
747 BITCODE_CFLAGS
748 CXXFLAGS_SL_MODULE
749 CFLAGS_SL_MODULE
750 CFLAGS_VECTORIZE
751 CFLAGS_UNROLL_LOOPS
752 PERMIT_MISSING_VARIABLE_DECLARATIONS
753 PERMIT_DECLARATION_AFTER_STATEMENT
754 LLVM_BINPATH
755 LLVM_CXXFLAGS
756 LLVM_CFLAGS
757 LLVM_CPPFLAGS
758 LLVM_LIBS
759 CLANG
760 LLVM_CONFIG
761 AWK
762 with_llvm
763 SUN_STUDIO_CC
764 ac_ct_CXX
765 CXXFLAGS
766 CXX
767 OBJEXT
768 EXEEXT
769 ac_ct_CC
770 CPPFLAGS
771 LDFLAGS
772 CFLAGS
773 CC
774 enable_injection_points
775 PG_TEST_EXTRA
776 enable_tap_tests
777 enable_dtrace
778 DTRACEFLAGS
779 DTRACE
780 enable_coverage
781 GENHTML
782 LCOV
783 GCOV
784 enable_debug
785 enable_rpath
786 default_port
787 WANTED_LANGUAGES
788 enable_nls
789 PORTNAME
790 host_os
791 host_vendor
792 host_cpu
793 host
794 build_os
795 build_vendor
796 build_cpu
797 build
798 PG_MAJORVERSION
799 target_alias
800 host_alias
801 build_alias
802 LIBS
803 ECHO_T
804 ECHO_N
805 ECHO_C
806 DEFS
807 mandir
808 localedir
809 libdir
810 psdir
811 pdfdir
812 dvidir
813 htmldir
814 infodir
815 docdir
816 oldincludedir
817 includedir
818 localstatedir
819 sharedstatedir
820 sysconfdir
821 datadir
822 datarootdir
823 libexecdir
824 sbindir
825 bindir
826 program_transform_name
827 prefix
828 exec_prefix
829 PACKAGE_URL
830 PACKAGE_BUGREPORT
831 PACKAGE_STRING
832 PACKAGE_VERSION
833 PACKAGE_TARNAME
834 PACKAGE_NAME
835 PATH_SEPARATOR
836 SHELL'
837 ac_subst_files=''
838 ac_user_opts='
839 enable_option_checking
840 with_extra_version
841 with_template
842 with_includes
843 with_libraries
844 with_libs
845 enable_integer_datetimes
846 enable_nls
847 with_pgport
848 enable_rpath
849 enable_debug
850 enable_profiling
851 enable_coverage
852 enable_dtrace
853 enable_tap_tests
854 enable_injection_points
855 with_blocksize
856 with_segsize
857 with_segsize_blocks
858 with_wal_blocksize
859 with_llvm
860 enable_depend
861 enable_cassert
862 with_icu
863 with_tcl
864 with_tclconfig
865 with_perl
866 with_python
867 with_gssapi
868 with_krb_srvnam
869 with_pam
870 with_bsd_auth
871 with_ldap
872 with_bonjour
873 with_selinux
874 with_systemd
875 with_readline
876 with_libedit_preferred
877 with_liburing
878 with_uuid
879 with_ossp_uuid
880 with_libcurl
881 with_libnuma
882 with_libxml
883 with_libxslt
884 with_system_tzdata
885 with_zlib
886 with_lz4
887 with_zstd
888 with_ssl
889 with_openssl
890 enable_largefile
891 '
892 ac_precious_vars='build_alias
893 host_alias
894 target_alias
895 PG_TEST_EXTRA
896 CC
897 CFLAGS
898 LDFLAGS
899 LIBS
900 CPPFLAGS
901 CXX
902 CXXFLAGS
903 CCC
904 LLVM_CONFIG
905 CLANG
906 CPP
907 PKG_CONFIG
908 PKG_CONFIG_PATH
909 PKG_CONFIG_LIBDIR
910 ICU_CFLAGS
911 ICU_LIBS
912 LIBURING_CFLAGS
913 LIBURING_LIBS
914 LIBCURL_CFLAGS
915 LIBCURL_LIBS
916 LIBNUMA_CFLAGS
917 LIBNUMA_LIBS
918 XML2_CONFIG
919 XML2_CFLAGS
920 XML2_LIBS
921 LZ4_CFLAGS
922 LZ4_LIBS
923 ZSTD_CFLAGS
924 ZSTD_LIBS
925 LDFLAGS_EX
926 LDFLAGS_SL
927 PERL
928 PYTHON
929 MSGFMT
930 TCLSH'
931
932
933 # Initialize some variables set by options.
934 ac_init_help=
935 ac_init_version=false
936 ac_unrecognized_opts=
937 ac_unrecognized_sep=
938 # The variables have the same names as the options, with
939 # dashes changed to underlines.
940 cache_file=/dev/null
941 exec_prefix=NONE
942 no_create=
943 no_recursion=
944 prefix=NONE
945 program_prefix=NONE
946 program_suffix=NONE
947 program_transform_name=s,x,x,
948 silent=
949 site=
950 srcdir=
951 verbose=
952 x_includes=NONE
953 x_libraries=NONE
954
955 # Installation directory options.
956 # These are left unexpanded so users can "make install exec_prefix=/foo"
957 # and all the variables that are supposed to be based on exec_prefix
958 # by default will actually change.
959 # Use braces instead of parens because sh, perl, etc. also accept them.
960 # (The list follows the same order as the GNU Coding Standards.)
961 bindir='${exec_prefix}/bin'
962 sbindir='${exec_prefix}/sbin'
963 libexecdir='${exec_prefix}/libexec'
964 datarootdir='${prefix}/share'
965 datadir='${datarootdir}'
966 sysconfdir='${prefix}/etc'
967 sharedstatedir='${prefix}/com'
968 localstatedir='${prefix}/var'
969 includedir='${prefix}/include'
970 oldincludedir='/usr/include'
971 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
972 infodir='${datarootdir}/info'
973 htmldir='${docdir}'
974 dvidir='${docdir}'
975 pdfdir='${docdir}'
976 psdir='${docdir}'
977 libdir='${exec_prefix}/lib'
978 localedir='${datarootdir}/locale'
979 mandir='${datarootdir}/man'
980
981 ac_prev=
982 ac_dashdash=
983 for ac_option
984 do
985 # If the previous option needs an argument, assign it.
986 if test -n "$ac_prev"; then
987 eval $ac_prev=\$ac_option
988 ac_prev=
989 continue
990 fi
991
992 case $ac_option in
993 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
994 *=) ac_optarg= ;;
995 *) ac_optarg=yes ;;
996 esac
997
998 # Accept the important Cygnus configure options, so we can diagnose typos.
999
1000 case $ac_dashdash$ac_option in
1001 --)
1002 ac_dashdash=yes ;;
1003
1004 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1005 ac_prev=bindir ;;
1006 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1007 bindir=$ac_optarg ;;
1008
1009 -build | --build | --buil | --bui | --bu)
1010 ac_prev=build_alias ;;
1011 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1012 build_alias=$ac_optarg ;;
1013
1014 -cache-file | --cache-file | --cache-fil | --cache-fi \
1015 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1016 ac_prev=cache_file ;;
1017 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1018 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1019 cache_file=$ac_optarg ;;
1020
1021 --config-cache | -C)
1022 cache_file=config.cache ;;
1023
1024 -datadir | --datadir | --datadi | --datad)
1025 ac_prev=datadir ;;
1026 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1027 datadir=$ac_optarg ;;
1028
1029 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1030 | --dataroo | --dataro | --datar)
1031 ac_prev=datarootdir ;;
1032 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1033 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1034 datarootdir=$ac_optarg ;;
1035
1036 -disable-* | --disable-*)
1037 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1038 # Reject names that are not valid shell variable names.
1039 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1040 as_fn_error $? "invalid feature name: $ac_useropt"
1041 ac_useropt_orig=$ac_useropt
1042 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1043 case $ac_user_opts in
1044 *"
1045 "enable_$ac_useropt"
1046 "*) ;;
1047 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1048 ac_unrecognized_sep=', ';;
1049 esac
1050 eval enable_$ac_useropt=no ;;
1051
1052 -docdir | --docdir | --docdi | --doc | --do)
1053 ac_prev=docdir ;;
1054 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1055 docdir=$ac_optarg ;;
1056
1057 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1058 ac_prev=dvidir ;;
1059 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1060 dvidir=$ac_optarg ;;
1061
1062 -enable-* | --enable-*)
1063 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1064 # Reject names that are not valid shell variable names.
1065 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1066 as_fn_error $? "invalid feature name: $ac_useropt"
1067 ac_useropt_orig=$ac_useropt
1068 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1069 case $ac_user_opts in
1070 *"
1071 "enable_$ac_useropt"
1072 "*) ;;
1073 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1074 ac_unrecognized_sep=', ';;
1075 esac
1076 eval enable_$ac_useropt=\$ac_optarg ;;
1077
1078 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1079 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1080 | --exec | --exe | --ex)
1081 ac_prev=exec_prefix ;;
1082 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1083 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1084 | --exec=* | --exe=* | --ex=*)
1085 exec_prefix=$ac_optarg ;;
1086
1087 -gas | --gas | --ga | --g)
1088 # Obsolete; use --with-gas.
1089 with_gas=yes ;;
1090
1091 -help | --help | --hel | --he | -h)
1092 ac_init_help=long ;;
1093 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1094 ac_init_help=recursive ;;
1095 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1096 ac_init_help=short ;;
1097
1098 -host | --host | --hos | --ho)
1099 ac_prev=host_alias ;;
1100 -host=* | --host=* | --hos=* | --ho=*)
1101 host_alias=$ac_optarg ;;
1102
1103 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1104 ac_prev=htmldir ;;
1105 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1106 | --ht=*)
1107 htmldir=$ac_optarg ;;
1108
1109 -includedir | --includedir | --includedi | --included | --include \
1110 | --includ | --inclu | --incl | --inc)
1111 ac_prev=includedir ;;
1112 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1113 | --includ=* | --inclu=* | --incl=* | --inc=*)
1114 includedir=$ac_optarg ;;
1115
1116 -infodir | --infodir | --infodi | --infod | --info | --inf)
1117 ac_prev=infodir ;;
1118 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1119 infodir=$ac_optarg ;;
1120
1121 -libdir | --libdir | --libdi | --libd)
1122 ac_prev=libdir ;;
1123 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1124 libdir=$ac_optarg ;;
1125
1126 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1127 | --libexe | --libex | --libe)
1128 ac_prev=libexecdir ;;
1129 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1130 | --libexe=* | --libex=* | --libe=*)
1131 libexecdir=$ac_optarg ;;
1132
1133 -localedir | --localedir | --localedi | --localed | --locale)
1134 ac_prev=localedir ;;
1135 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1136 localedir=$ac_optarg ;;
1137
1138 -localstatedir | --localstatedir | --localstatedi | --localstated \
1139 | --localstate | --localstat | --localsta | --localst | --locals)
1140 ac_prev=localstatedir ;;
1141 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1142 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1143 localstatedir=$ac_optarg ;;
1144
1145 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1146 ac_prev=mandir ;;
1147 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1148 mandir=$ac_optarg ;;
1149
1150 -nfp | --nfp | --nf)
1151 # Obsolete; use --without-fp.
1152 with_fp=no ;;
1153
1154 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1155 | --no-cr | --no-c | -n)
1156 no_create=yes ;;
1157
1158 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1159 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1160 no_recursion=yes ;;
1161
1162 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1163 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1164 | --oldin | --oldi | --old | --ol | --o)
1165 ac_prev=oldincludedir ;;
1166 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1167 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1168 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1169 oldincludedir=$ac_optarg ;;
1170
1171 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1172 ac_prev=prefix ;;
1173 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1174 prefix=$ac_optarg ;;
1175
1176 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1177 | --program-pre | --program-pr | --program-p)
1178 ac_prev=program_prefix ;;
1179 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1180 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1181 program_prefix=$ac_optarg ;;
1182
1183 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1184 | --program-suf | --program-su | --program-s)
1185 ac_prev=program_suffix ;;
1186 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1187 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1188 program_suffix=$ac_optarg ;;
1189
1190 -program-transform-name | --program-transform-name \
1191 | --program-transform-nam | --program-transform-na \
1192 | --program-transform-n | --program-transform- \
1193 | --program-transform | --program-transfor \
1194 | --program-transfo | --program-transf \
1195 | --program-trans | --program-tran \
1196 | --progr-tra | --program-tr | --program-t)
1197 ac_prev=program_transform_name ;;
1198 -program-transform-name=* | --program-transform-name=* \
1199 | --program-transform-nam=* | --program-transform-na=* \
1200 | --program-transform-n=* | --program-transform-=* \
1201 | --program-transform=* | --program-transfor=* \
1202 | --program-transfo=* | --program-transf=* \
1203 | --program-trans=* | --program-tran=* \
1204 | --progr-tra=* | --program-tr=* | --program-t=*)
1205 program_transform_name=$ac_optarg ;;
1206
1207 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1208 ac_prev=pdfdir ;;
1209 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1210 pdfdir=$ac_optarg ;;
1211
1212 -psdir | --psdir | --psdi | --psd | --ps)
1213 ac_prev=psdir ;;
1214 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1215 psdir=$ac_optarg ;;
1216
1217 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1218 | -silent | --silent | --silen | --sile | --sil)
1219 silent=yes ;;
1220
1221 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1222 ac_prev=sbindir ;;
1223 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1224 | --sbi=* | --sb=*)
1225 sbindir=$ac_optarg ;;
1226
1227 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1228 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1229 | --sharedst | --shareds | --shared | --share | --shar \
1230 | --sha | --sh)
1231 ac_prev=sharedstatedir ;;
1232 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1233 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1234 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1235 | --sha=* | --sh=*)
1236 sharedstatedir=$ac_optarg ;;
1237
1238 -site | --site | --sit)
1239 ac_prev=site ;;
1240 -site=* | --site=* | --sit=*)
1241 site=$ac_optarg ;;
1242
1243 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1244 ac_prev=srcdir ;;
1245 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1246 srcdir=$ac_optarg ;;
1247
1248 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1249 | --syscon | --sysco | --sysc | --sys | --sy)
1250 ac_prev=sysconfdir ;;
1251 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1252 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1253 sysconfdir=$ac_optarg ;;
1254
1255 -target | --target | --targe | --targ | --tar | --ta | --t)
1256 ac_prev=target_alias ;;
1257 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1258 target_alias=$ac_optarg ;;
1259
1260 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1261 verbose=yes ;;
1262
1263 -version | --version | --versio | --versi | --vers | -V)
1264 ac_init_version=: ;;
1265
1266 -with-* | --with-*)
1267 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1268 # Reject names that are not valid shell variable names.
1269 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1270 as_fn_error $? "invalid package name: $ac_useropt"
1271 ac_useropt_orig=$ac_useropt
1272 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1273 case $ac_user_opts in
1274 *"
1275 "with_$ac_useropt"
1276 "*) ;;
1277 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1278 ac_unrecognized_sep=', ';;
1279 esac
1280 eval with_$ac_useropt=\$ac_optarg ;;
1281
1282 -without-* | --without-*)
1283 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1284 # Reject names that are not valid shell variable names.
1285 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1286 as_fn_error $? "invalid package name: $ac_useropt"
1287 ac_useropt_orig=$ac_useropt
1288 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1289 case $ac_user_opts in
1290 *"
1291 "with_$ac_useropt"
1292 "*) ;;
1293 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1294 ac_unrecognized_sep=', ';;
1295 esac
1296 eval with_$ac_useropt=no ;;
1297
1298 --x)
1299 # Obsolete; use --with-x.
1300 with_x=yes ;;
1301
1302 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1303 | --x-incl | --x-inc | --x-in | --x-i)
1304 ac_prev=x_includes ;;
1305 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1306 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1307 x_includes=$ac_optarg ;;
1308
1309 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1310 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1311 ac_prev=x_libraries ;;
1312 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1313 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1314 x_libraries=$ac_optarg ;;
1315
1316 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1317 Try \`$0 --help' for more information"
1318 ;;
1319
1320 *=*)
1321 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1322 # Reject names that are not valid shell variable names.
1323 case $ac_envvar in #(
1324 '' | [0-9]* | *[!_$as_cr_alnum]* )
1325 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1326 esac
1327 eval $ac_envvar=\$ac_optarg
1328 export $ac_envvar ;;
1329
1330 *)
1331 # FIXME: should be removed in autoconf 3.0.
1332 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1333 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1334 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1335 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1336 ;;
1337
1338 esac
1339 done
1340
1341 if test -n "$ac_prev"; then
1342 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1343 as_fn_error $? "missing argument to $ac_option"
1344 fi
1345
1346 if test -n "$ac_unrecognized_opts"; then
1347 case $enable_option_checking in
1348 no) ;;
1349 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1350 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1351 esac
1352 fi
1353
1354 # Check all directory arguments for consistency.
1355 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1356 datadir sysconfdir sharedstatedir localstatedir includedir \
1357 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1358 libdir localedir mandir
1359 do
1360 eval ac_val=\$$ac_var
1361 # Remove trailing slashes.
1362 case $ac_val in
1363 */ )
1364 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1365 eval $ac_var=\$ac_val;;
1366 esac
1367 # Be sure to have absolute directory names.
1368 case $ac_val in
1369 [\\/$]* | ?:[\\/]* ) continue;;
1370 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1371 esac
1372 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1373 done
1374
1375 # There might be people who depend on the old broken behavior: `$host'
1376 # used to hold the argument of --host etc.
1377 # FIXME: To remove some day.
1378 build=$build_alias
1379 host=$host_alias
1380 target=$target_alias
1381
1382 # FIXME: To remove some day.
1383 if test "x$host_alias" != x; then
1384 if test "x$build_alias" = x; then
1385 cross_compiling=maybe
1386 elif test "x$build_alias" != "x$host_alias"; then
1387 cross_compiling=yes
1388 fi
1389 fi
1390
1391 ac_tool_prefix=
1392 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1393
1394 test "$silent" = yes && exec 6>/dev/null
1395
1396
1397 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1398 ac_ls_di=`ls -di .` &&
1399 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1400 as_fn_error $? "working directory cannot be determined"
1401 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1402 as_fn_error $? "pwd does not report name of working directory"
1403
1404
1405 # Find the source files, if location was not specified.
1406 if test -z "$srcdir"; then
1407 ac_srcdir_defaulted=yes
1408 # Try the directory containing this script, then the parent directory.
1409 ac_confdir=`$as_dirname -- "$as_myself" ||
1410 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1411 X"$as_myself" : 'X\(//\)[^/]' \| \
1412 X"$as_myself" : 'X\(//\)$' \| \
1413 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1414 $as_echo X"$as_myself" |
1415 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1416 s//\1/
1417 q
1418 }
1419 /^X\(\/\/\)[^/].*/{
1420 s//\1/
1421 q
1422 }
1423 /^X\(\/\/\)$/{
1424 s//\1/
1425 q
1426 }
1427 /^X\(\/\).*/{
1428 s//\1/
1429 q
1430 }
1431 s/.*/./; q'`
1432 srcdir=$ac_confdir
1433 if test ! -r "$srcdir/$ac_unique_file"; then
1434 srcdir=..
1435 fi
1436 else
1437 ac_srcdir_defaulted=no
1438 fi
1439 if test ! -r "$srcdir/$ac_unique_file"; then
1440 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1441 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1442 fi
1443 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1444 ac_abs_confdir=`(
1445 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1446 pwd)`
1447 # When building in place, set srcdir=.
1448 if test "$ac_abs_confdir" = "$ac_pwd"; then
1449 srcdir=.
1450 fi
1451 # Remove unnecessary trailing slashes from srcdir.
1452 # Double slashes in file names in object file debugging info
1453 # mess up M-x gdb in Emacs.
1454 case $srcdir in
1455 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1456 esac
1457 for ac_var in $ac_precious_vars; do
1458 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1459 eval ac_env_${ac_var}_value=\$${ac_var}
1460 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1461 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1462 done
1463
1464 #
1465 # Report the --help message.
1466 #
1467 if test "$ac_init_help" = "long"; then
1468 # Omit some internal or obsolete options to make the list less imposing.
1469 # This message is too long to be a string in the A/UX 3.1 sh.
1470 cat <<_ACEOF
1471 \`configure' configures PostgreSQL 18.6 to adapt to many kinds of systems.
1472
1473 Usage: $0 [OPTION]... [VAR=VALUE]...
1474
1475 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1476 VAR=VALUE. See below for descriptions of some of the useful variables.
1477
1478 Defaults for the options are specified in brackets.
1479
1480 Configuration:
1481 -h, --help display this help and exit
1482 --help=short display options specific to this package
1483 --help=recursive display the short help of all the included packages
1484 -V, --version display version information and exit
1485 -q, --quiet, --silent do not print \`checking ...' messages
1486 --cache-file=FILE cache test results in FILE [disabled]
1487 -C, --config-cache alias for \`--cache-file=config.cache'
1488 -n, --no-create do not create output files
1489 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1490
1491 Installation directories:
1492 --prefix=PREFIX install architecture-independent files in PREFIX
1493 [$ac_default_prefix]
1494 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1495 [PREFIX]
1496
1497 By default, \`make install' will install all the files in
1498 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1499 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1500 for instance \`--prefix=\$HOME'.
1501
1502 For better control, use the options below.
1503
1504 Fine tuning of the installation directories:
1505 --bindir=DIR user executables [EPREFIX/bin]
1506 --sbindir=DIR system admin executables [EPREFIX/sbin]
1507 --libexecdir=DIR program executables [EPREFIX/libexec]
1508 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1509 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1510 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1511 --libdir=DIR object code libraries [EPREFIX/lib]
1512 --includedir=DIR C header files [PREFIX/include]
1513 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1514 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1515 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1516 --infodir=DIR info documentation [DATAROOTDIR/info]
1517 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1518 --mandir=DIR man documentation [DATAROOTDIR/man]
1519 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1520 --htmldir=DIR html documentation [DOCDIR]
1521 --dvidir=DIR dvi documentation [DOCDIR]
1522 --pdfdir=DIR pdf documentation [DOCDIR]
1523 --psdir=DIR ps documentation [DOCDIR]
1524 _ACEOF
1525
1526 cat <<\_ACEOF
1527
1528 System types:
1529 --build=BUILD configure for building on BUILD [guessed]
1530 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1531 _ACEOF
1532 fi
1533
1534 if test -n "$ac_init_help"; then
1535 case $ac_init_help in
1536 short | recursive ) echo "Configuration of PostgreSQL 18.6:";;
1537 esac
1538 cat <<\_ACEOF
1539
1540 Optional Features:
1541 --disable-option-checking ignore unrecognized --enable/--with options
1542 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1543 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1544 --disable-integer-datetimes
1545 obsolete option, no longer supported
1546 --enable-nls[=LANGUAGES]
1547 enable Native Language Support
1548 --disable-rpath do not embed shared library search path in
1549 executables
1550 --enable-debug build with debugging symbols (-g)
1551 --enable-profiling build with profiling enabled
1552 --enable-coverage build with coverage testing instrumentation
1553 --enable-dtrace build with DTrace support
1554 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1555 --enable-injection-points
1556 enable injection points (for testing)
1557 --enable-depend turn on automatic dependency tracking
1558 --enable-cassert enable assertion checks (for debugging)
1559 --disable-largefile omit support for large files
1560
1561 Optional Packages:
1562 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1563 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1564 --with-extra-version=STRING
1565 append STRING to version
1566 --with-template=NAME override operating system template
1567 --with-includes=DIRS look for additional header files in DIRS
1568 --with-libraries=DIRS look for additional libraries in DIRS
1569 --with-libs=DIRS alternative spelling of --with-libraries
1570 --with-pgport=PORTNUM set default port number [5432]
1571 --with-blocksize=BLOCKSIZE
1572 set table block size in kB [8]
1573 --with-segsize=SEGSIZE set table segment size in GB [1]
1574 --with-segsize-blocks=SEGSIZE_BLOCKS
1575 set table segment size in blocks [0]
1576 --with-wal-blocksize=BLOCKSIZE
1577 set WAL block size in kB [8]
1578 --with-llvm build with LLVM based JIT support
1579 --without-icu build without ICU support
1580 --with-tcl build Tcl modules (PL/Tcl)
1581 --with-tclconfig=DIR tclConfig.sh is in DIR
1582 --with-perl build Perl modules (PL/Perl)
1583 --with-python build Python modules (PL/Python)
1584 --with-gssapi build with GSSAPI support
1585 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1586 [postgres]
1587 --with-pam build with PAM support
1588 --with-bsd-auth build with BSD Authentication support
1589 --with-ldap build with LDAP support
1590 --with-bonjour build with Bonjour support
1591 --with-selinux build with SELinux support
1592 --with-systemd build with systemd support
1593 --without-readline do not use GNU Readline nor BSD Libedit for editing
1594 --with-libedit-preferred
1595 prefer BSD Libedit over GNU Readline
1596 --with-liburing build with io_uring support, for asynchronous I/O
1597 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1598 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1599 --with-libcurl build with libcurl support
1600 --with-libnuma build with libnuma support
1601 --with-libxml build with XML support
1602 --with-libxslt use XSLT support when building contrib/xml2
1603 --with-system-tzdata=DIR
1604 use system time zone data in DIR
1605 --without-zlib do not use Zlib
1606 --with-lz4 build with LZ4 support
1607 --with-zstd build with ZSTD support
1608 --with-ssl=LIB use LIB for SSL/TLS support (openssl)
1609 --with-openssl obsolete spelling of --with-ssl=openssl
1610
1611 Some influential environment variables:
1612 PG_TEST_EXTRA
1613 enable selected extra tests (overridden at runtime by
1614 PG_TEST_EXTRA environment variable)
1615 CC C compiler command
1616 CFLAGS C compiler flags
1617 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1618 nonstandard directory <lib dir>
1619 LIBS libraries to pass to the linker, e.g. -l<library>
1620 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1621 you have headers in a nonstandard directory <include dir>
1622 CXX C++ compiler command
1623 CXXFLAGS C++ compiler flags
1624 LLVM_CONFIG path to llvm-config command
1625 CLANG path to clang compiler to generate bitcode
1626 CPP C preprocessor
1627 PKG_CONFIG path to pkg-config utility
1628 PKG_CONFIG_PATH
1629 directories to add to pkg-config's search path
1630 PKG_CONFIG_LIBDIR
1631 path overriding pkg-config's built-in search path
1632 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1633 ICU_LIBS linker flags for ICU, overriding pkg-config
1634 LIBURING_CFLAGS
1635 C compiler flags for LIBURING, overriding pkg-config
1636 LIBURING_LIBS
1637 linker flags for LIBURING, overriding pkg-config
1638 LIBCURL_CFLAGS
1639 C compiler flags for LIBCURL, overriding pkg-config
1640 LIBCURL_LIBS
1641 linker flags for LIBCURL, overriding pkg-config
1642 LIBNUMA_CFLAGS
1643 C compiler flags for LIBNUMA, overriding pkg-config
1644 LIBNUMA_LIBS
1645 linker flags for LIBNUMA, overriding pkg-config
1646 XML2_CONFIG path to xml2-config utility
1647 XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1648 XML2_LIBS linker flags for XML2, overriding pkg-config
1649 LZ4_CFLAGS C compiler flags for LZ4, overriding pkg-config
1650 LZ4_LIBS linker flags for LZ4, overriding pkg-config
1651 ZSTD_CFLAGS C compiler flags for ZSTD, overriding pkg-config
1652 ZSTD_LIBS linker flags for ZSTD, overriding pkg-config
1653 LDFLAGS_EX extra linker flags for linking executables only
1654 LDFLAGS_SL extra linker flags for linking shared libraries only
1655 PERL Perl program
1656 PYTHON Python program
1657 MSGFMT msgfmt program for NLS
1658 TCLSH Tcl interpreter program (tclsh)
1659
1660 Use these variables to override the choices made by `configure' or to help
1661 it to find libraries and programs with nonstandard names/locations.
1662
1663 Report bugs to <[email protected]>.
1664 PostgreSQL home page: <https://www.postgresql.org/>.
1665 _ACEOF
1666 ac_status=$?
1667 fi
1668
1669 if test "$ac_init_help" = "recursive"; then
1670 # If there are subdirs, report their specific --help.
1671 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1672 test -d "$ac_dir" ||
1673 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1674 continue
1675 ac_builddir=.
1676
1677 case "$ac_dir" in
1678 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1679 *)
1680 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1681 # A ".." for each directory in $ac_dir_suffix.
1682 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1683 case $ac_top_builddir_sub in
1684 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1685 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1686 esac ;;
1687 esac
1688 ac_abs_top_builddir=$ac_pwd
1689 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1690 # for backward compatibility:
1691 ac_top_builddir=$ac_top_build_prefix
1692
1693 case $srcdir in
1694 .) # We are building in place.
1695 ac_srcdir=.
1696 ac_top_srcdir=$ac_top_builddir_sub
1697 ac_abs_top_srcdir=$ac_pwd ;;
1698 [\\/]* | ?:[\\/]* ) # Absolute name.
1699 ac_srcdir=$srcdir$ac_dir_suffix;
1700 ac_top_srcdir=$srcdir
1701 ac_abs_top_srcdir=$srcdir ;;
1702 *) # Relative name.
1703 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1704 ac_top_srcdir=$ac_top_build_prefix$srcdir
1705 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1706 esac
1707 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1708
1709 cd "$ac_dir" || { ac_status=$?; continue; }
1710 # Check for guested configure.
1711 if test -f "$ac_srcdir/configure.gnu"; then
1712 echo &&
1713 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1714 elif test -f "$ac_srcdir/configure"; then
1715 echo &&
1716 $SHELL "$ac_srcdir/configure" --help=recursive
1717 else
1718 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1719 fi || ac_status=$?
1720 cd "$ac_pwd" || { ac_status=$?; break; }
1721 done
1722 fi
1723
1724 test -n "$ac_init_help" && exit $ac_status
1725 if $ac_init_version; then
1726 cat <<\_ACEOF
1727 PostgreSQL configure 18.6
1728 generated by GNU Autoconf 2.69
1729
1730 Copyright (C) 2012 Free Software Foundation, Inc.
1731 This configure script is free software; the Free Software Foundation
1732 gives unlimited permission to copy, distribute and modify it.
1733
1734 Copyright (c) 1996-2025, PostgreSQL Global Development Group
1735 _ACEOF
1736 exit
1737 fi
1738
1739 ## ------------------------ ##
1740 ## Autoconf initialization. ##
1741 ## ------------------------ ##
1742
1743 # ac_fn_c_try_compile LINENO
1744 # --------------------------
1745 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1746 ac_fn_c_try_compile ()
1747 {
1748 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1749 rm -f conftest.$ac_objext
1750 if { { ac_try="$ac_compile"
1751 case "(($ac_try" in
1752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1753 *) ac_try_echo=$ac_try;;
1754 esac
1755 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1756 $as_echo "$ac_try_echo"; } >&5
1757 (eval "$ac_compile") 2>conftest.err
1758 ac_status=$?
1759 if test -s conftest.err; then
1760 grep -v '^ *+' conftest.err >conftest.er1
1761 cat conftest.er1 >&5
1762 mv -f conftest.er1 conftest.err
1763 fi
1764 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1765 test $ac_status = 0; } && {
1766 test -z "$ac_c_werror_flag" ||
1767 test ! -s conftest.err
1768 } && test -s conftest.$ac_objext; then :
1769 ac_retval=0
1770 else
1771 $as_echo "$as_me: failed program was:" >&5
1772 sed 's/^/| /' conftest.$ac_ext >&5
1773
1774 ac_retval=1
1775 fi
1776 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1777 as_fn_set_status $ac_retval
1778
1779 } # ac_fn_c_try_compile
1780
1781 # ac_fn_cxx_try_compile LINENO
1782 # ----------------------------
1783 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1784 ac_fn_cxx_try_compile ()
1785 {
1786 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1787 rm -f conftest.$ac_objext
1788 if { { ac_try="$ac_compile"
1789 case "(($ac_try" in
1790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1791 *) ac_try_echo=$ac_try;;
1792 esac
1793 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1794 $as_echo "$ac_try_echo"; } >&5
1795 (eval "$ac_compile") 2>conftest.err
1796 ac_status=$?
1797 if test -s conftest.err; then
1798 grep -v '^ *+' conftest.err >conftest.er1
1799 cat conftest.er1 >&5
1800 mv -f conftest.er1 conftest.err
1801 fi
1802 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1803 test $ac_status = 0; } && {
1804 test -z "$ac_cxx_werror_flag" ||
1805 test ! -s conftest.err
1806 } && test -s conftest.$ac_objext; then :
1807 ac_retval=0
1808 else
1809 $as_echo "$as_me: failed program was:" >&5
1810 sed 's/^/| /' conftest.$ac_ext >&5
1811
1812 ac_retval=1
1813 fi
1814 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1815 as_fn_set_status $ac_retval
1816
1817 } # ac_fn_cxx_try_compile
1818
1819 # ac_fn_c_try_link LINENO
1820 # -----------------------
1821 # Try to link conftest.$ac_ext, and return whether this succeeded.
1822 ac_fn_c_try_link ()
1823 {
1824 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1825 rm -f conftest.$ac_objext conftest$ac_exeext
1826 if { { ac_try="$ac_link"
1827 case "(($ac_try" in
1828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1829 *) ac_try_echo=$ac_try;;
1830 esac
1831 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1832 $as_echo "$ac_try_echo"; } >&5
1833 (eval "$ac_link") 2>conftest.err
1834 ac_status=$?
1835 if test -s conftest.err; then
1836 grep -v '^ *+' conftest.err >conftest.er1
1837 cat conftest.er1 >&5
1838 mv -f conftest.er1 conftest.err
1839 fi
1840 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1841 test $ac_status = 0; } && {
1842 test -z "$ac_c_werror_flag" ||
1843 test ! -s conftest.err
1844 } && test -s conftest$ac_exeext && {
1845 test "$cross_compiling" = yes ||
1846 test -x conftest$ac_exeext
1847 }; then :
1848 ac_retval=0
1849 else
1850 $as_echo "$as_me: failed program was:" >&5
1851 sed 's/^/| /' conftest.$ac_ext >&5
1852
1853 ac_retval=1
1854 fi
1855 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1856 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1857 # interfere with the next link command; also delete a directory that is
1858 # left behind by Apple's compiler. We do this before executing the actions.
1859 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1860 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1861 as_fn_set_status $ac_retval
1862
1863 } # ac_fn_c_try_link
1864
1865 # ac_fn_c_try_cpp LINENO
1866 # ----------------------
1867 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1868 ac_fn_c_try_cpp ()
1869 {
1870 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1871 if { { ac_try="$ac_cpp conftest.$ac_ext"
1872 case "(($ac_try" in
1873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1874 *) ac_try_echo=$ac_try;;
1875 esac
1876 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1877 $as_echo "$ac_try_echo"; } >&5
1878 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1879 ac_status=$?
1880 if test -s conftest.err; then
1881 grep -v '^ *+' conftest.err >conftest.er1
1882 cat conftest.er1 >&5
1883 mv -f conftest.er1 conftest.err
1884 fi
1885 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1886 test $ac_status = 0; } > conftest.i && {
1887 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1888 test ! -s conftest.err
1889 }; then :
1890 ac_retval=0
1891 else
1892 $as_echo "$as_me: failed program was:" >&5
1893 sed 's/^/| /' conftest.$ac_ext >&5
1894
1895 ac_retval=1
1896 fi
1897 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1898 as_fn_set_status $ac_retval
1899
1900 } # ac_fn_c_try_cpp
1901
1902 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1903 # -------------------------------------------------------
1904 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1905 # the include files in INCLUDES and setting the cache variable VAR
1906 # accordingly.
1907 ac_fn_c_check_header_mongrel ()
1908 {
1909 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1910 if eval \${$3+:} false; then :
1911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1912 $as_echo_n "checking for $2... " >&6; }
1913 if eval \${$3+:} false; then :
1914 $as_echo_n "(cached) " >&6
1915 fi
1916 eval ac_res=\$$3
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1918 $as_echo "$ac_res" >&6; }
1919 else
1920 # Is the header compilable?
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1922 $as_echo_n "checking $2 usability... " >&6; }
1923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1924 /* end confdefs.h. */
1925 $4
1926 #include <$2>
1927 _ACEOF
1928 if ac_fn_c_try_compile "$LINENO"; then :
1929 ac_header_compiler=yes
1930 else
1931 ac_header_compiler=no
1932 fi
1933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1935 $as_echo "$ac_header_compiler" >&6; }
1936
1937 # Is the header present?
1938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1939 $as_echo_n "checking $2 presence... " >&6; }
1940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1941 /* end confdefs.h. */
1942 #include <$2>
1943 _ACEOF
1944 if ac_fn_c_try_cpp "$LINENO"; then :
1945 ac_header_preproc=yes
1946 else
1947 ac_header_preproc=no
1948 fi
1949 rm -f conftest.err conftest.i conftest.$ac_ext
1950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1951 $as_echo "$ac_header_preproc" >&6; }
1952
1953 # So? What about this header?
1954 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1955 yes:no: )
1956 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1957 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1958 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1959 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1960 ;;
1961 no:yes:* )
1962 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1963 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1964 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1965 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1966 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1967 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1968 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1969 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1970 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1971 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1972 ( $as_echo "## ---------------------------------------------- ##
1973 ## Report this to [email protected] ##
1974 ## ---------------------------------------------- ##"
1975 ) | sed "s/^/$as_me: WARNING: /" >&2
1976 ;;
1977 esac
1978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1979 $as_echo_n "checking for $2... " >&6; }
1980 if eval \${$3+:} false; then :
1981 $as_echo_n "(cached) " >&6
1982 else
1983 eval "$3=\$ac_header_compiler"
1984 fi
1985 eval ac_res=\$$3
1986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1987 $as_echo "$ac_res" >&6; }
1988 fi
1989 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1990
1991 } # ac_fn_c_check_header_mongrel
1992
1993 # ac_fn_c_try_run LINENO
1994 # ----------------------
1995 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1996 # that executables *can* be run.
1997 ac_fn_c_try_run ()
1998 {
1999 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2000 if { { ac_try="$ac_link"
2001 case "(($ac_try" in
2002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2003 *) ac_try_echo=$ac_try;;
2004 esac
2005 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2006 $as_echo "$ac_try_echo"; } >&5
2007 (eval "$ac_link") 2>&5
2008 ac_status=$?
2009 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2010 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2011 { { case "(($ac_try" in
2012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2013 *) ac_try_echo=$ac_try;;
2014 esac
2015 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2016 $as_echo "$ac_try_echo"; } >&5
2017 (eval "$ac_try") 2>&5
2018 ac_status=$?
2019 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2020 test $ac_status = 0; }; }; then :
2021 ac_retval=0
2022 else
2023 $as_echo "$as_me: program exited with status $ac_status" >&5
2024 $as_echo "$as_me: failed program was:" >&5
2025 sed 's/^/| /' conftest.$ac_ext >&5
2026
2027 ac_retval=$ac_status
2028 fi
2029 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2030 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2031 as_fn_set_status $ac_retval
2032
2033 } # ac_fn_c_try_run
2034
2035 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2036 # -------------------------------------------------------
2037 # Tests whether HEADER exists and can be compiled using the include files in
2038 # INCLUDES, setting the cache variable VAR accordingly.
2039 ac_fn_c_check_header_compile ()
2040 {
2041 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2043 $as_echo_n "checking for $2... " >&6; }
2044 if eval \${$3+:} false; then :
2045 $as_echo_n "(cached) " >&6
2046 else
2047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2048 /* end confdefs.h. */
2049 $4
2050 #include <$2>
2051 _ACEOF
2052 if ac_fn_c_try_compile "$LINENO"; then :
2053 eval "$3=yes"
2054 else
2055 eval "$3=no"
2056 fi
2057 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2058 fi
2059 eval ac_res=\$$3
2060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2061 $as_echo "$ac_res" >&6; }
2062 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2063
2064 } # ac_fn_c_check_header_compile
2065
2066 # ac_fn_c_check_func LINENO FUNC VAR
2067 # ----------------------------------
2068 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2069 ac_fn_c_check_func ()
2070 {
2071 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2073 $as_echo_n "checking for $2... " >&6; }
2074 if eval \${$3+:} false; then :
2075 $as_echo_n "(cached) " >&6
2076 else
2077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2078 /* end confdefs.h. */
2079 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2080 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2081 #define $2 innocuous_$2
2082
2083 /* System header to define __stub macros and hopefully few prototypes,
2084 which can conflict with char $2 (); below.
2085 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2086 <limits.h> exists even on freestanding compilers. */
2087
2088 #ifdef __STDC__
2089 # include <limits.h>
2090 #else
2091 # include <assert.h>
2092 #endif
2093
2094 #undef $2
2095
2096 /* Override any GCC internal prototype to avoid an error.
2097 Use char because int might match the return type of a GCC
2098 builtin and then its argument prototype would still apply. */
2099 #ifdef __cplusplus
2100 extern "C"
2101 #endif
2102 char $2 ();
2103 /* The GNU C library defines this for functions which it implements
2104 to always fail with ENOSYS. Some functions are actually named
2105 something starting with __ and the normal name is an alias. */
2106 #if defined __stub_$2 || defined __stub___$2
2107 choke me
2108 #endif
2109
2110 int
2111 main ()
2112 {
2113 return $2 ();
2114 ;
2115 return 0;
2116 }
2117 _ACEOF
2118 if ac_fn_c_try_link "$LINENO"; then :
2119 eval "$3=yes"
2120 else
2121 eval "$3=no"
2122 fi
2123 rm -f core conftest.err conftest.$ac_objext \
2124 conftest$ac_exeext conftest.$ac_ext
2125 fi
2126 eval ac_res=\$$3
2127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2128 $as_echo "$ac_res" >&6; }
2129 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2130
2131 } # ac_fn_c_check_func
2132
2133 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2134 # ----------------------------------------------------
2135 # Tries to find if the field MEMBER exists in type AGGR, after including
2136 # INCLUDES, setting cache variable VAR accordingly.
2137 ac_fn_c_check_member ()
2138 {
2139 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2141 $as_echo_n "checking for $2.$3... " >&6; }
2142 if eval \${$4+:} false; then :
2143 $as_echo_n "(cached) " >&6
2144 else
2145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2146 /* end confdefs.h. */
2147 $5
2148 int
2149 main ()
2150 {
2151 static $2 ac_aggr;
2152 if (ac_aggr.$3)
2153 return 0;
2154 ;
2155 return 0;
2156 }
2157 _ACEOF
2158 if ac_fn_c_try_compile "$LINENO"; then :
2159 eval "$4=yes"
2160 else
2161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2162 /* end confdefs.h. */
2163 $5
2164 int
2165 main ()
2166 {
2167 static $2 ac_aggr;
2168 if (sizeof ac_aggr.$3)
2169 return 0;
2170 ;
2171 return 0;
2172 }
2173 _ACEOF
2174 if ac_fn_c_try_compile "$LINENO"; then :
2175 eval "$4=yes"
2176 else
2177 eval "$4=no"
2178 fi
2179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2180 fi
2181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2182 fi
2183 eval ac_res=\$$4
2184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2185 $as_echo "$ac_res" >&6; }
2186 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2187
2188 } # ac_fn_c_check_member
2189
2190 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2191 # -------------------------------------------
2192 # Tests whether TYPE exists after having included INCLUDES, setting cache
2193 # variable VAR accordingly.
2194 ac_fn_c_check_type ()
2195 {
2196 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2198 $as_echo_n "checking for $2... " >&6; }
2199 if eval \${$3+:} false; then :
2200 $as_echo_n "(cached) " >&6
2201 else
2202 eval "$3=no"
2203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2204 /* end confdefs.h. */
2205 $4
2206 int
2207 main ()
2208 {
2209 if (sizeof ($2))
2210 return 0;
2211 ;
2212 return 0;
2213 }
2214 _ACEOF
2215 if ac_fn_c_try_compile "$LINENO"; then :
2216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2217 /* end confdefs.h. */
2218 $4
2219 int
2220 main ()
2221 {
2222 if (sizeof (($2)))
2223 return 0;
2224 ;
2225 return 0;
2226 }
2227 _ACEOF
2228 if ac_fn_c_try_compile "$LINENO"; then :
2229
2230 else
2231 eval "$3=yes"
2232 fi
2233 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2234 fi
2235 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2236 fi
2237 eval ac_res=\$$3
2238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2239 $as_echo "$ac_res" >&6; }
2240 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2241
2242 } # ac_fn_c_check_type
2243
2244 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2245 # --------------------------------------------
2246 # Tries to find the compile-time value of EXPR in a program that includes
2247 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2248 # computed
2249 ac_fn_c_compute_int ()
2250 {
2251 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2252 if test "$cross_compiling" = yes; then
2253 # Depending upon the size, compute the lo and hi bounds.
2254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2255 /* end confdefs.h. */
2256 $4
2257 int
2258 main ()
2259 {
2260 static int test_array [1 - 2 * !(($2) >= 0)];
2261 test_array [0] = 0;
2262 return test_array [0];
2263
2264 ;
2265 return 0;
2266 }
2267 _ACEOF
2268 if ac_fn_c_try_compile "$LINENO"; then :
2269 ac_lo=0 ac_mid=0
2270 while :; do
2271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2272 /* end confdefs.h. */
2273 $4
2274 int
2275 main ()
2276 {
2277 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2278 test_array [0] = 0;
2279 return test_array [0];
2280
2281 ;
2282 return 0;
2283 }
2284 _ACEOF
2285 if ac_fn_c_try_compile "$LINENO"; then :
2286 ac_hi=$ac_mid; break
2287 else
2288 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2289 if test $ac_lo -le $ac_mid; then
2290 ac_lo= ac_hi=
2291 break
2292 fi
2293 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2294 fi
2295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2296 done
2297 else
2298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2299 /* end confdefs.h. */
2300 $4
2301 int
2302 main ()
2303 {
2304 static int test_array [1 - 2 * !(($2) < 0)];
2305 test_array [0] = 0;
2306 return test_array [0];
2307
2308 ;
2309 return 0;
2310 }
2311 _ACEOF
2312 if ac_fn_c_try_compile "$LINENO"; then :
2313 ac_hi=-1 ac_mid=-1
2314 while :; do
2315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2316 /* end confdefs.h. */
2317 $4
2318 int
2319 main ()
2320 {
2321 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2322 test_array [0] = 0;
2323 return test_array [0];
2324
2325 ;
2326 return 0;
2327 }
2328 _ACEOF
2329 if ac_fn_c_try_compile "$LINENO"; then :
2330 ac_lo=$ac_mid; break
2331 else
2332 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2333 if test $ac_mid -le $ac_hi; then
2334 ac_lo= ac_hi=
2335 break
2336 fi
2337 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2338 fi
2339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2340 done
2341 else
2342 ac_lo= ac_hi=
2343 fi
2344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2345 fi
2346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2347 # Binary search between lo and hi bounds.
2348 while test "x$ac_lo" != "x$ac_hi"; do
2349 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2351 /* end confdefs.h. */
2352 $4
2353 int
2354 main ()
2355 {
2356 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2357 test_array [0] = 0;
2358 return test_array [0];
2359
2360 ;
2361 return 0;
2362 }
2363 _ACEOF
2364 if ac_fn_c_try_compile "$LINENO"; then :
2365 ac_hi=$ac_mid
2366 else
2367 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2368 fi
2369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2370 done
2371 case $ac_lo in #((
2372 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2373 '') ac_retval=1 ;;
2374 esac
2375 else
2376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2377 /* end confdefs.h. */
2378 $4
2379 static long int longval () { return $2; }
2380 static unsigned long int ulongval () { return $2; }
2381 #include <stdio.h>
2382 #include <stdlib.h>
2383 int
2384 main ()
2385 {
2386
2387 FILE *f = fopen ("conftest.val", "w");
2388 if (! f)
2389 return 1;
2390 if (($2) < 0)
2391 {
2392 long int i = longval ();
2393 if (i != ($2))
2394 return 1;
2395 fprintf (f, "%ld", i);
2396 }
2397 else
2398 {
2399 unsigned long int i = ulongval ();
2400 if (i != ($2))
2401 return 1;
2402 fprintf (f, "%lu", i);
2403 }
2404 /* Do not output a trailing newline, as this causes \r\n confusion
2405 on some platforms. */
2406 return ferror (f) || fclose (f) != 0;
2407
2408 ;
2409 return 0;
2410 }
2411 _ACEOF
2412 if ac_fn_c_try_run "$LINENO"; then :
2413 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2414 else
2415 ac_retval=1
2416 fi
2417 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2418 conftest.$ac_objext conftest.beam conftest.$ac_ext
2419 rm -f conftest.val
2420
2421 fi
2422 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2423 as_fn_set_status $ac_retval
2424
2425 } # ac_fn_c_compute_int
2426
2427 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2428 # ---------------------------------------------
2429 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2430 # accordingly.
2431 ac_fn_c_check_decl ()
2432 {
2433 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2434 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2435 as_decl_name=`echo $2|sed 's/ *(.*//'`
2436 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2438 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2439 if eval \${$3+:} false; then :
2440 $as_echo_n "(cached) " >&6
2441 else
2442 ac_save_werror_flag=$ac_c_werror_flag
2443 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2445 /* end confdefs.h. */
2446 $4
2447 int
2448 main ()
2449 {
2450 #ifndef $as_decl_name
2451 #ifdef __cplusplus
2452 (void) $as_decl_use;
2453 #else
2454 (void) $as_decl_name;
2455 #endif
2456 #endif
2457
2458 ;
2459 return 0;
2460 }
2461 _ACEOF
2462 if ac_fn_c_try_compile "$LINENO"; then :
2463 eval "$3=yes"
2464 else
2465 eval "$3=no"
2466 fi
2467 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2468 ac_c_werror_flag=$ac_save_werror_flag
2469 fi
2470 eval ac_res=\$$3
2471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2472 $as_echo "$ac_res" >&6; }
2473 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2474
2475 } # ac_fn_c_check_decl
2476 cat >config.log <<_ACEOF
2477 This file contains any messages produced by compilers while
2478 running configure, to aid debugging if configure makes a mistake.
2479
2480 It was created by PostgreSQL $as_me 18.6, which was
2481 generated by GNU Autoconf 2.69. Invocation command line was
2482
2483 $ $0 $@
2484
2485 _ACEOF
2486 exec 5>>config.log
2487 {
2488 cat <<_ASUNAME
2489 ## --------- ##
2490 ## Platform. ##
2491 ## --------- ##
2492
2493 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2494 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2495 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2496 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2497 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2498
2499 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2500 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2501
2502 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2503 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2504 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2505 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2506 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2507 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2508 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2509
2510 _ASUNAME
2511
2512 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2513 for as_dir in $PATH
2514 do
2515 IFS=$as_save_IFS
2516 test -z "$as_dir" && as_dir=.
2517 $as_echo "PATH: $as_dir"
2518 done
2519 IFS=$as_save_IFS
2520
2521 } >&5
2522
2523 cat >&5 <<_ACEOF
2524
2525
2526 ## ----------- ##
2527 ## Core tests. ##
2528 ## ----------- ##
2529
2530 _ACEOF
2531
2532
2533 # Keep a trace of the command line.
2534 # Strip out --no-create and --no-recursion so they do not pile up.
2535 # Strip out --silent because we don't want to record it for future runs.
2536 # Also quote any args containing shell meta-characters.
2537 # Make two passes to allow for proper duplicate-argument suppression.
2538 ac_configure_args=
2539 ac_configure_args0=
2540 ac_configure_args1=
2541 ac_must_keep_next=false
2542 for ac_pass in 1 2
2543 do
2544 for ac_arg
2545 do
2546 case $ac_arg in
2547 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2548 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2549 | -silent | --silent | --silen | --sile | --sil)
2550 continue ;;
2551 *\'*)
2552 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2553 esac
2554 case $ac_pass in
2555 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2556 2)
2557 as_fn_append ac_configure_args1 " '$ac_arg'"
2558 if test $ac_must_keep_next = true; then
2559 ac_must_keep_next=false # Got value, back to normal.
2560 else
2561 case $ac_arg in
2562 *=* | --config-cache | -C | -disable-* | --disable-* \
2563 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2564 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2565 | -with-* | --with-* | -without-* | --without-* | --x)
2566 case "$ac_configure_args0 " in
2567 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2568 esac
2569 ;;
2570 -* ) ac_must_keep_next=true ;;
2571 esac
2572 fi
2573 as_fn_append ac_configure_args " '$ac_arg'"
2574 ;;
2575 esac
2576 done
2577 done
2578 { ac_configure_args0=; unset ac_configure_args0;}
2579 { ac_configure_args1=; unset ac_configure_args1;}
2580
2581 # When interrupted or exit'd, cleanup temporary files, and complete
2582 # config.log. We remove comments because anyway the quotes in there
2583 # would cause problems or look ugly.
2584 # WARNING: Use '\'' to represent an apostrophe within the trap.
2585 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2586 trap 'exit_status=$?
2587 # Save into config.log some information that might help in debugging.
2588 {
2589 echo
2590
2591 $as_echo "## ---------------- ##
2592 ## Cache variables. ##
2593 ## ---------------- ##"
2594 echo
2595 # The following way of writing the cache mishandles newlines in values,
2596 (
2597 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2598 eval ac_val=\$$ac_var
2599 case $ac_val in #(
2600 *${as_nl}*)
2601 case $ac_var in #(
2602 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2603 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2604 esac
2605 case $ac_var in #(
2606 _ | IFS | as_nl) ;; #(
2607 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2608 *) { eval $ac_var=; unset $ac_var;} ;;
2609 esac ;;
2610 esac
2611 done
2612 (set) 2>&1 |
2613 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2614 *${as_nl}ac_space=\ *)
2615 sed -n \
2616 "s/'\''/'\''\\\\'\'''\''/g;
2617 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2618 ;; #(
2619 *)
2620 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2621 ;;
2622 esac |
2623 sort
2624 )
2625 echo
2626
2627 $as_echo "## ----------------- ##
2628 ## Output variables. ##
2629 ## ----------------- ##"
2630 echo
2631 for ac_var in $ac_subst_vars
2632 do
2633 eval ac_val=\$$ac_var
2634 case $ac_val in
2635 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2636 esac
2637 $as_echo "$ac_var='\''$ac_val'\''"
2638 done | sort
2639 echo
2640
2641 if test -n "$ac_subst_files"; then
2642 $as_echo "## ------------------- ##
2643 ## File substitutions. ##
2644 ## ------------------- ##"
2645 echo
2646 for ac_var in $ac_subst_files
2647 do
2648 eval ac_val=\$$ac_var
2649 case $ac_val in
2650 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2651 esac
2652 $as_echo "$ac_var='\''$ac_val'\''"
2653 done | sort
2654 echo
2655 fi
2656
2657 if test -s confdefs.h; then
2658 $as_echo "## ----------- ##
2659 ## confdefs.h. ##
2660 ## ----------- ##"
2661 echo
2662 cat confdefs.h
2663 echo
2664 fi
2665 test "$ac_signal" != 0 &&
2666 $as_echo "$as_me: caught signal $ac_signal"
2667 $as_echo "$as_me: exit $exit_status"
2668 } >&5
2669 rm -f core *.core core.conftest.* &&
2670 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2671 exit $exit_status
2672 ' 0
2673 for ac_signal in 1 2 13 15; do
2674 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2675 done
2676 ac_signal=0
2677
2678 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2679 rm -f -r conftest* confdefs.h
2680
2681 $as_echo "/* confdefs.h */" > confdefs.h
2682
2683 # Predefined preprocessor variables.
2684
2685 cat >>confdefs.h <<_ACEOF
2686 #define PACKAGE_NAME "$PACKAGE_NAME"
2687 _ACEOF
2688
2689 cat >>confdefs.h <<_ACEOF
2690 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2691 _ACEOF
2692
2693 cat >>confdefs.h <<_ACEOF
2694 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2695 _ACEOF
2696
2697 cat >>confdefs.h <<_ACEOF
2698 #define PACKAGE_STRING "$PACKAGE_STRING"
2699 _ACEOF
2700
2701 cat >>confdefs.h <<_ACEOF
2702 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2703 _ACEOF
2704
2705 cat >>confdefs.h <<_ACEOF
2706 #define PACKAGE_URL "$PACKAGE_URL"
2707 _ACEOF
2708
2709
2710 # Let the site file select an alternate cache file if it wants to.
2711 # Prefer an explicitly selected file to automatically selected ones.
2712 ac_site_file1=NONE
2713 ac_site_file2=NONE
2714 if test -n "$CONFIG_SITE"; then
2715 # We do not want a PATH search for config.site.
2716 case $CONFIG_SITE in #((
2717 -*) ac_site_file1=./$CONFIG_SITE;;
2718 */*) ac_site_file1=$CONFIG_SITE;;
2719 *) ac_site_file1=./$CONFIG_SITE;;
2720 esac
2721 elif test "x$prefix" != xNONE; then
2722 ac_site_file1=$prefix/share/config.site
2723 ac_site_file2=$prefix/etc/config.site
2724 else
2725 ac_site_file1=$ac_default_prefix/share/config.site
2726 ac_site_file2=$ac_default_prefix/etc/config.site
2727 fi
2728 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2729 do
2730 test "x$ac_site_file" = xNONE && continue
2731 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2732 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2733 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2734 sed 's/^/| /' "$ac_site_file" >&5
2735 . "$ac_site_file" \
2736 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2737 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2738 as_fn_error $? "failed to load site script $ac_site_file
2739 See \`config.log' for more details" "$LINENO" 5; }
2740 fi
2741 done
2742
2743 if test -r "$cache_file"; then
2744 # Some versions of bash will fail to source /dev/null (special files
2745 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2746 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2748 $as_echo "$as_me: loading cache $cache_file" >&6;}
2749 case $cache_file in
2750 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2751 *) . "./$cache_file";;
2752 esac
2753 fi
2754 else
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2756 $as_echo "$as_me: creating cache $cache_file" >&6;}
2757 >$cache_file
2758 fi
2759
2760 # Check that the precious variables saved in the cache have kept the same
2761 # value.
2762 ac_cache_corrupted=false
2763 for ac_var in $ac_precious_vars; do
2764 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2765 eval ac_new_set=\$ac_env_${ac_var}_set
2766 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2767 eval ac_new_val=\$ac_env_${ac_var}_value
2768 case $ac_old_set,$ac_new_set in
2769 set,)
2770 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2771 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2772 ac_cache_corrupted=: ;;
2773 ,set)
2774 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2775 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2776 ac_cache_corrupted=: ;;
2777 ,);;
2778 *)
2779 if test "x$ac_old_val" != "x$ac_new_val"; then
2780 # differences in whitespace do not lead to failure.
2781 ac_old_val_w=`echo x $ac_old_val`
2782 ac_new_val_w=`echo x $ac_new_val`
2783 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2784 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2785 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2786 ac_cache_corrupted=:
2787 else
2788 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2789 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2790 eval $ac_var=\$ac_old_val
2791 fi
2792 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2793 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2794 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2795 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2796 fi;;
2797 esac
2798 # Pass precious variables to config.status.
2799 if test "$ac_new_set" = set; then
2800 case $ac_new_val in
2801 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2802 *) ac_arg=$ac_var=$ac_new_val ;;
2803 esac
2804 case " $ac_configure_args " in
2805 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2806 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2807 esac
2808 fi
2809 done
2810 if $ac_cache_corrupted; then
2811 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2812 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2813 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2814 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2815 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2816 fi
2817 ## -------------------- ##
2818 ## Main body of script. ##
2819 ## -------------------- ##
2820
2821 ac_ext=c
2822 ac_cpp='$CPP $CPPFLAGS'
2823 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2824 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2825 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2826
2827
2828
2829
2830
2831
2832 ac_aux_dir=
2833 for ac_dir in config "$srcdir"/config; do
2834 if test -f "$ac_dir/install-sh"; then
2835 ac_aux_dir=$ac_dir
2836 ac_install_sh="$ac_aux_dir/install-sh -c"
2837 break
2838 elif test -f "$ac_dir/install.sh"; then
2839 ac_aux_dir=$ac_dir
2840 ac_install_sh="$ac_aux_dir/install.sh -c"
2841 break
2842 elif test -f "$ac_dir/shtool"; then
2843 ac_aux_dir=$ac_dir
2844 ac_install_sh="$ac_aux_dir/shtool install -c"
2845 break
2846 fi
2847 done
2848 if test -z "$ac_aux_dir"; then
2849 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2850 fi
2851
2852 # These three variables are undocumented and unsupported,
2853 # and are intended to be withdrawn in a future Autoconf release.
2854 # They can cause serious problems if a builder's source tree is in a directory
2855 # whose full name contains unusual characters.
2856 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2857 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2858 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2859
2860
2861
2862
2863 cat >>confdefs.h <<_ACEOF
2864 #define CONFIGURE_ARGS "$ac_configure_args"
2865 _ACEOF
2866
2867
2868 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2869 PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`
2870 test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
2871
2872
2873 cat >>confdefs.h <<_ACEOF
2874 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2875 _ACEOF
2876
2877
2878 cat >>confdefs.h <<_ACEOF
2879 #define PG_MAJORVERSION_NUM $PG_MAJORVERSION
2880 _ACEOF
2881
2882
2883 cat >>confdefs.h <<_ACEOF
2884 #define PG_MINORVERSION_NUM $PG_MINORVERSION
2885 _ACEOF
2886
2887
2888
2889
2890
2891 # Check whether --with-extra-version was given.
2892 if test "${with_extra_version+set}" = set; then :
2893 withval=$with_extra_version;
2894 case $withval in
2895 yes)
2896 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2897 ;;
2898 no)
2899 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2900 ;;
2901 *)
2902 PG_VERSION="$PACKAGE_VERSION$withval"
2903 ;;
2904 esac
2905
2906 else
2907 PG_VERSION="$PACKAGE_VERSION"
2908 fi
2909
2910
2911
2912 cat >>confdefs.h <<_ACEOF
2913 #define PG_VERSION "$PG_VERSION"
2914 _ACEOF
2915
2916
2917 # Make sure we can run config.sub.
2918 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2919 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2920
2921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2922 $as_echo_n "checking build system type... " >&6; }
2923 if ${ac_cv_build+:} false; then :
2924 $as_echo_n "(cached) " >&6
2925 else
2926 ac_build_alias=$build_alias
2927 test "x$ac_build_alias" = x &&
2928 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2929 test "x$ac_build_alias" = x &&
2930 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2931 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2932 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2933
2934 fi
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2936 $as_echo "$ac_cv_build" >&6; }
2937 case $ac_cv_build in
2938 *-*-*) ;;
2939 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2940 esac
2941 build=$ac_cv_build
2942 ac_save_IFS=$IFS; IFS='-'
2943 set x $ac_cv_build
2944 shift
2945 build_cpu=$1
2946 build_vendor=$2
2947 shift; shift
2948 # Remember, the first character of IFS is used to create $*,
2949 # except with old shells:
2950 build_os=$*
2951 IFS=$ac_save_IFS
2952 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2953
2954
2955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2956 $as_echo_n "checking host system type... " >&6; }
2957 if ${ac_cv_host+:} false; then :
2958 $as_echo_n "(cached) " >&6
2959 else
2960 if test "x$host_alias" = x; then
2961 ac_cv_host=$ac_cv_build
2962 else
2963 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2964 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2965 fi
2966
2967 fi
2968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2969 $as_echo "$ac_cv_host" >&6; }
2970 case $ac_cv_host in
2971 *-*-*) ;;
2972 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2973 esac
2974 host=$ac_cv_host
2975 ac_save_IFS=$IFS; IFS='-'
2976 set x $ac_cv_host
2977 shift
2978 host_cpu=$1
2979 host_vendor=$2
2980 shift; shift
2981 # Remember, the first character of IFS is used to create $*,
2982 # except with old shells:
2983 host_os=$*
2984 IFS=$ac_save_IFS
2985 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2986
2987
2988
2989 template=
2990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2991 $as_echo_n "checking which template to use... " >&6; }
2992
2993
2994
2995
2996 # Check whether --with-template was given.
2997 if test "${with_template+set}" = set; then :
2998 withval=$with_template;
2999 case $withval in
3000 yes)
3001 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
3002 ;;
3003 no)
3004 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
3005 ;;
3006 *)
3007
3008 case $withval in
3009 list) echo; ls "$srcdir/src/template"; exit;;
3010 *) if test -f "$srcdir/src/template/$with_template" ; then
3011 template=$withval
3012 else
3013 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
3014 fi;;
3015 esac
3016
3017 ;;
3018 esac
3019
3020 else
3021
3022 # --with-template not given
3023
3024 case $host_os in
3025 cygwin*|msys*) template=cygwin ;;
3026 darwin*) template=darwin ;;
3027 dragonfly*) template=netbsd ;;
3028 freebsd*) template=freebsd ;;
3029 linux*|gnu*|k*bsd*-gnu)
3030 template=linux ;;
3031 mingw*) template=win32 ;;
3032 netbsd*) template=netbsd ;;
3033 openbsd*) template=openbsd ;;
3034 solaris*) template=solaris ;;
3035 esac
3036
3037 if test x"$template" = x"" ; then
3038 as_fn_error $? "
3039 *******************************************************************
3040 PostgreSQL has apparently not been ported to your platform yet.
3041 To try a manual configuration, look into the src/template directory
3042 for a similar platform and use the '--with-template=' option.
3043
3044 Please also contact <[email protected]> to see about
3045 rectifying this. Include the above 'checking host system type...'
3046 line.
3047 *******************************************************************
3048 " "$LINENO" 5
3049 fi
3050
3051
3052 fi
3053
3054
3055
3056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
3057 $as_echo "$template" >&6; }
3058
3059 PORTNAME=$template
3060
3061
3062 # Initialize default assumption that we do not need separate assembly code
3063 # for TAS (test-and-set). This can be overridden by the template file
3064 # when it's executed.
3065 need_tas=no
3066 tas_file=dummy.s
3067
3068 # Default, works for most platforms, override in template file if needed
3069 DLSUFFIX=".so"
3070
3071
3072
3073 ##
3074 ## Command line options
3075 ##
3076
3077 #
3078 # Add non-standard directories to the include path
3079 #
3080
3081
3082
3083 # Check whether --with-includes was given.
3084 if test "${with_includes+set}" = set; then :
3085 withval=$with_includes;
3086 case $withval in
3087 yes)
3088 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3089 ;;
3090 no)
3091 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3092 ;;
3093 *)
3094
3095 ;;
3096 esac
3097
3098 fi
3099
3100
3101
3102
3103 #
3104 # Add non-standard directories to the library search path
3105 #
3106
3107
3108
3109 # Check whether --with-libraries was given.
3110 if test "${with_libraries+set}" = set; then :
3111 withval=$with_libraries;
3112 case $withval in
3113 yes)
3114 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3115 ;;
3116 no)
3117 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3118 ;;
3119 *)
3120 LIBRARY_DIRS=$withval
3121 ;;
3122 esac
3123
3124 fi
3125
3126
3127
3128
3129
3130
3131 # Check whether --with-libs was given.
3132 if test "${with_libs+set}" = set; then :
3133 withval=$with_libs;
3134 case $withval in
3135 yes)
3136 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3137 ;;
3138 no)
3139 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3140 ;;
3141 *)
3142 LIBRARY_DIRS=$withval
3143 ;;
3144 esac
3145
3146 fi
3147
3148
3149
3150
3151 #
3152 # 64-bit integer date/time storage is now the only option, but to avoid
3153 # unnecessary breakage of build scripts, continue to accept an explicit
3154 # "--enable-integer-datetimes" switch.
3155 #
3156
3157
3158 # Check whether --enable-integer-datetimes was given.
3159 if test "${enable_integer_datetimes+set}" = set; then :
3160 enableval=$enable_integer_datetimes;
3161 case $enableval in
3162 yes)
3163 :
3164 ;;
3165 no)
3166 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3167 ;;
3168 *)
3169 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3170 ;;
3171 esac
3172
3173 else
3174 enable_integer_datetimes=yes
3175
3176 fi
3177
3178
3179
3180
3181 #
3182 # NLS
3183 #
3184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3185 $as_echo_n "checking whether NLS is wanted... " >&6; }
3186
3187
3188 # Check whether --enable-nls was given.
3189 if test "${enable_nls+set}" = set; then :
3190 enableval=$enable_nls;
3191 case $enableval in
3192 yes)
3193 :
3194 ;;
3195 no)
3196 :
3197 ;;
3198 *)
3199 enable_nls=yes
3200 WANTED_LANGUAGES=$enableval
3201 ;;
3202 esac
3203
3204 else
3205 enable_nls=no
3206 fi
3207
3208
3209
3210 if test "$enable_nls" = yes; then
3211
3212 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3213
3214 fi
3215
3216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3217 $as_echo "$enable_nls" >&6; }
3218
3219
3220
3221 #
3222 # Default port number (--with-pgport), default 5432
3223 #
3224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3225 $as_echo_n "checking for default port number... " >&6; }
3226
3227
3228
3229 # Check whether --with-pgport was given.
3230 if test "${with_pgport+set}" = set; then :
3231 withval=$with_pgport;
3232 case $withval in
3233 yes)
3234 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3235 ;;
3236 no)
3237 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3238 ;;
3239 *)
3240 default_port=$withval
3241 ;;
3242 esac
3243
3244 else
3245 default_port=5432
3246 fi
3247
3248
3249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3250 $as_echo "$default_port" >&6; }
3251 # Need both of these because some places want an integer and some a string
3252
3253 cat >>confdefs.h <<_ACEOF
3254 #define DEF_PGPORT ${default_port}
3255 _ACEOF
3256
3257
3258 cat >>confdefs.h <<_ACEOF
3259 #define DEF_PGPORT_STR "${default_port}"
3260 _ACEOF
3261
3262
3263
3264 # It's worth validating port; you can get very confusing errors otherwise
3265 if test x"$default_port" = x""; then
3266 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3267 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3268 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3269 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3270 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3271 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3272 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3273 fi
3274
3275 #
3276 # '-rpath'-like feature can be disabled
3277 #
3278
3279
3280 # Check whether --enable-rpath was given.
3281 if test "${enable_rpath+set}" = set; then :
3282 enableval=$enable_rpath;
3283 case $enableval in
3284 yes)
3285 :
3286 ;;
3287 no)
3288 :
3289 ;;
3290 *)
3291 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3292 ;;
3293 esac
3294
3295 else
3296 enable_rpath=yes
3297
3298 fi
3299
3300
3301
3302
3303 #
3304 # --enable-debug adds -g to compiler flags
3305 #
3306
3307
3308 # Check whether --enable-debug was given.
3309 if test "${enable_debug+set}" = set; then :
3310 enableval=$enable_debug;
3311 case $enableval in
3312 yes)
3313 :
3314 ;;
3315 no)
3316 :
3317 ;;
3318 *)
3319 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3320 ;;
3321 esac
3322
3323 else
3324 enable_debug=no
3325
3326 fi
3327
3328
3329
3330
3331 #
3332 # --enable-profiling enables gcc profiling
3333 #
3334
3335
3336 # Check whether --enable-profiling was given.
3337 if test "${enable_profiling+set}" = set; then :
3338 enableval=$enable_profiling;
3339 case $enableval in
3340 yes)
3341 :
3342 ;;
3343 no)
3344 :
3345 ;;
3346 *)
3347 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3348 ;;
3349 esac
3350
3351 else
3352 enable_profiling=no
3353
3354 fi
3355
3356
3357
3358 #
3359 # --enable-coverage enables generation of code coverage metrics with gcov
3360 #
3361
3362
3363 # Check whether --enable-coverage was given.
3364 if test "${enable_coverage+set}" = set; then :
3365 enableval=$enable_coverage;
3366 case $enableval in
3367 yes)
3368 if test -z "$GCOV"; then
3369 for ac_prog in gcov
3370 do
3371 # Extract the first word of "$ac_prog", so it can be a program name with args.
3372 set dummy $ac_prog; ac_word=$2
3373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3374 $as_echo_n "checking for $ac_word... " >&6; }
3375 if ${ac_cv_path_GCOV+:} false; then :
3376 $as_echo_n "(cached) " >&6
3377 else
3378 case $GCOV in
3379 [\\/]* | ?:[\\/]*)
3380 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3381 ;;
3382 *)
3383 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3384 for as_dir in $PATH
3385 do
3386 IFS=$as_save_IFS
3387 test -z "$as_dir" && as_dir=.
3388 for ac_exec_ext in '' $ac_executable_extensions; do
3389 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3390 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3391 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3392 break 2
3393 fi
3394 done
3395 done
3396 IFS=$as_save_IFS
3397
3398 ;;
3399 esac
3400 fi
3401 GCOV=$ac_cv_path_GCOV
3402 if test -n "$GCOV"; then
3403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3404 $as_echo "$GCOV" >&6; }
3405 else
3406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3407 $as_echo "no" >&6; }
3408 fi
3409
3410
3411 test -n "$GCOV" && break
3412 done
3413
3414 else
3415 # Report the value of GCOV in configure's output in all cases.
3416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3417 $as_echo_n "checking for GCOV... " >&6; }
3418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3419 $as_echo "$GCOV" >&6; }
3420 fi
3421
3422 if test -z "$GCOV"; then
3423 as_fn_error $? "gcov not found" "$LINENO" 5
3424 fi
3425 if test -z "$LCOV"; then
3426 for ac_prog in lcov
3427 do
3428 # Extract the first word of "$ac_prog", so it can be a program name with args.
3429 set dummy $ac_prog; ac_word=$2
3430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3431 $as_echo_n "checking for $ac_word... " >&6; }
3432 if ${ac_cv_path_LCOV+:} false; then :
3433 $as_echo_n "(cached) " >&6
3434 else
3435 case $LCOV in
3436 [\\/]* | ?:[\\/]*)
3437 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3438 ;;
3439 *)
3440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3441 for as_dir in $PATH
3442 do
3443 IFS=$as_save_IFS
3444 test -z "$as_dir" && as_dir=.
3445 for ac_exec_ext in '' $ac_executable_extensions; do
3446 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3447 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3448 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3449 break 2
3450 fi
3451 done
3452 done
3453 IFS=$as_save_IFS
3454
3455 ;;
3456 esac
3457 fi
3458 LCOV=$ac_cv_path_LCOV
3459 if test -n "$LCOV"; then
3460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3461 $as_echo "$LCOV" >&6; }
3462 else
3463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3464 $as_echo "no" >&6; }
3465 fi
3466
3467
3468 test -n "$LCOV" && break
3469 done
3470
3471 else
3472 # Report the value of LCOV in configure's output in all cases.
3473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3474 $as_echo_n "checking for LCOV... " >&6; }
3475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3476 $as_echo "$LCOV" >&6; }
3477 fi
3478
3479 if test -z "$LCOV"; then
3480 as_fn_error $? "lcov not found" "$LINENO" 5
3481 fi
3482 if test -z "$GENHTML"; then
3483 for ac_prog in genhtml
3484 do
3485 # Extract the first word of "$ac_prog", so it can be a program name with args.
3486 set dummy $ac_prog; ac_word=$2
3487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3488 $as_echo_n "checking for $ac_word... " >&6; }
3489 if ${ac_cv_path_GENHTML+:} false; then :
3490 $as_echo_n "(cached) " >&6
3491 else
3492 case $GENHTML in
3493 [\\/]* | ?:[\\/]*)
3494 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3495 ;;
3496 *)
3497 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3498 for as_dir in $PATH
3499 do
3500 IFS=$as_save_IFS
3501 test -z "$as_dir" && as_dir=.
3502 for ac_exec_ext in '' $ac_executable_extensions; do
3503 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3504 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3505 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3506 break 2
3507 fi
3508 done
3509 done
3510 IFS=$as_save_IFS
3511
3512 ;;
3513 esac
3514 fi
3515 GENHTML=$ac_cv_path_GENHTML
3516 if test -n "$GENHTML"; then
3517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3518 $as_echo "$GENHTML" >&6; }
3519 else
3520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3521 $as_echo "no" >&6; }
3522 fi
3523
3524
3525 test -n "$GENHTML" && break
3526 done
3527
3528 else
3529 # Report the value of GENHTML in configure's output in all cases.
3530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3531 $as_echo_n "checking for GENHTML... " >&6; }
3532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3533 $as_echo "$GENHTML" >&6; }
3534 fi
3535
3536 if test -z "$GENHTML"; then
3537 as_fn_error $? "genhtml not found" "$LINENO" 5
3538 fi
3539 ;;
3540 no)
3541 :
3542 ;;
3543 *)
3544 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3545 ;;
3546 esac
3547
3548 else
3549 enable_coverage=no
3550
3551 fi
3552
3553
3554
3555
3556 #
3557 # DTrace
3558 #
3559
3560
3561 # Check whether --enable-dtrace was given.
3562 if test "${enable_dtrace+set}" = set; then :
3563 enableval=$enable_dtrace;
3564 case $enableval in
3565 yes)
3566 if test -z "$DTRACE"; then
3567 for ac_prog in dtrace
3568 do
3569 # Extract the first word of "$ac_prog", so it can be a program name with args.
3570 set dummy $ac_prog; ac_word=$2
3571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3572 $as_echo_n "checking for $ac_word... " >&6; }
3573 if ${ac_cv_path_DTRACE+:} false; then :
3574 $as_echo_n "(cached) " >&6
3575 else
3576 case $DTRACE in
3577 [\\/]* | ?:[\\/]*)
3578 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3579 ;;
3580 *)
3581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3582 for as_dir in $PATH
3583 do
3584 IFS=$as_save_IFS
3585 test -z "$as_dir" && as_dir=.
3586 for ac_exec_ext in '' $ac_executable_extensions; do
3587 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3588 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3589 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3590 break 2
3591 fi
3592 done
3593 done
3594 IFS=$as_save_IFS
3595
3596 ;;
3597 esac
3598 fi
3599 DTRACE=$ac_cv_path_DTRACE
3600 if test -n "$DTRACE"; then
3601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3602 $as_echo "$DTRACE" >&6; }
3603 else
3604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3605 $as_echo "no" >&6; }
3606 fi
3607
3608
3609 test -n "$DTRACE" && break
3610 done
3611
3612 else
3613 # Report the value of DTRACE in configure's output in all cases.
3614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3615 $as_echo_n "checking for DTRACE... " >&6; }
3616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3617 $as_echo "$DTRACE" >&6; }
3618 fi
3619
3620 if test -z "$DTRACE"; then
3621 as_fn_error $? "dtrace not found" "$LINENO" 5
3622 fi
3623
3624 ;;
3625 no)
3626 :
3627 ;;
3628 *)
3629 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3630 ;;
3631 esac
3632
3633 else
3634 enable_dtrace=no
3635
3636 fi
3637
3638
3639
3640
3641 #
3642 # TAP tests
3643 #
3644
3645
3646 # Check whether --enable-tap-tests was given.
3647 if test "${enable_tap_tests+set}" = set; then :
3648 enableval=$enable_tap_tests;
3649 case $enableval in
3650 yes)
3651 :
3652 ;;
3653 no)
3654 :
3655 ;;
3656 *)
3657 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3658 ;;
3659 esac
3660
3661 else
3662 enable_tap_tests=no
3663
3664 fi
3665
3666
3667
3668
3669
3670 #
3671 # Injection points
3672 #
3673
3674
3675 # Check whether --enable-injection-points was given.
3676 if test "${enable_injection_points+set}" = set; then :
3677 enableval=$enable_injection_points;
3678 case $enableval in
3679 yes)
3680
3681 $as_echo "#define USE_INJECTION_POINTS 1" >>confdefs.h
3682
3683 ;;
3684 no)
3685 :
3686 ;;
3687 *)
3688 as_fn_error $? "no argument expected for --enable-injection-points option" "$LINENO" 5
3689 ;;
3690 esac
3691
3692 else
3693 enable_injection_points=no
3694
3695 fi
3696
3697
3698
3699
3700 #
3701 # Block size
3702 #
3703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3704 $as_echo_n "checking for block size... " >&6; }
3705
3706
3707
3708 # Check whether --with-blocksize was given.
3709 if test "${with_blocksize+set}" = set; then :
3710 withval=$with_blocksize;
3711 case $withval in
3712 yes)
3713 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3714 ;;
3715 no)
3716 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3717 ;;
3718 *)
3719 blocksize=$withval
3720 ;;
3721 esac
3722
3723 else
3724 blocksize=8
3725 fi
3726
3727
3728 case ${blocksize} in
3729 1) BLCKSZ=1024;;
3730 2) BLCKSZ=2048;;
3731 4) BLCKSZ=4096;;
3732 8) BLCKSZ=8192;;
3733 16) BLCKSZ=16384;;
3734 32) BLCKSZ=32768;;
3735 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3736 esac
3737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3738 $as_echo "${blocksize}kB" >&6; }
3739
3740
3741 cat >>confdefs.h <<_ACEOF
3742 #define BLCKSZ ${BLCKSZ}
3743 _ACEOF
3744
3745
3746 #
3747 # Relation segment size
3748 #
3749
3750
3751
3752 # Check whether --with-segsize was given.
3753 if test "${with_segsize+set}" = set; then :
3754 withval=$with_segsize;
3755 case $withval in
3756 yes)
3757 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3758 ;;
3759 no)
3760 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3761 ;;
3762 *)
3763 segsize=$withval
3764 ;;
3765 esac
3766
3767 else
3768 segsize=1
3769 fi
3770
3771
3772
3773
3774
3775 # Check whether --with-segsize-blocks was given.
3776 if test "${with_segsize_blocks+set}" = set; then :
3777 withval=$with_segsize_blocks;
3778 case $withval in
3779 yes)
3780 as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3781 ;;
3782 no)
3783 as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3784 ;;
3785 *)
3786 segsize_blocks=$withval
3787 ;;
3788 esac
3789
3790 else
3791 segsize_blocks=0
3792 fi
3793
3794
3795
3796 # If --with-segsize-blocks is non-zero, it is used, --with-segsize
3797 # otherwise. segsize-blocks is only really useful for developers wanting to
3798 # test segment related code. Warn if both are used.
3799 if test $segsize_blocks -ne 0 -a $segsize -ne 1; then
3800 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&5
3801 $as_echo "$as_me: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&2;}
3802 fi
3803
3804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3805 $as_echo_n "checking for segment size... " >&6; }
3806 if test $segsize_blocks -eq 0; then
3807 # this expression is set up to avoid unnecessary integer overflow
3808 # blocksize is already guaranteed to be a factor of 1024
3809 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3810 test $? -eq 0 || exit 1
3811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3812 $as_echo "${segsize}GB" >&6; }
3813 else
3814 RELSEG_SIZE=$segsize_blocks
3815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${RELSEG_SIZE} blocks" >&5
3816 $as_echo "${RELSEG_SIZE} blocks" >&6; }
3817 fi
3818
3819
3820 cat >>confdefs.h <<_ACEOF
3821 #define RELSEG_SIZE ${RELSEG_SIZE}
3822 _ACEOF
3823
3824
3825 #
3826 # WAL block size
3827 #
3828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3829 $as_echo_n "checking for WAL block size... " >&6; }
3830
3831
3832
3833 # Check whether --with-wal-blocksize was given.
3834 if test "${with_wal_blocksize+set}" = set; then :
3835 withval=$with_wal_blocksize;
3836 case $withval in
3837 yes)
3838 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3839 ;;
3840 no)
3841 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3842 ;;
3843 *)
3844 wal_blocksize=$withval
3845 ;;
3846 esac
3847
3848 else
3849 wal_blocksize=8
3850 fi
3851
3852
3853 case ${wal_blocksize} in
3854 1) XLOG_BLCKSZ=1024;;
3855 2) XLOG_BLCKSZ=2048;;
3856 4) XLOG_BLCKSZ=4096;;
3857 8) XLOG_BLCKSZ=8192;;
3858 16) XLOG_BLCKSZ=16384;;
3859 32) XLOG_BLCKSZ=32768;;
3860 64) XLOG_BLCKSZ=65536;;
3861 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3862 esac
3863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3864 $as_echo "${wal_blocksize}kB" >&6; }
3865
3866
3867 cat >>confdefs.h <<_ACEOF
3868 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3869 _ACEOF
3870
3871
3872 #
3873 # C compiler
3874 #
3875
3876 # If you don't specify a list of compilers to test, the AC_PROG_CC and
3877 # AC_PROG_CXX macros test for a long list of unsupported compilers.
3878 pgac_cc_list="gcc cc"
3879 pgac_cxx_list="g++ c++"
3880
3881 ac_ext=c
3882 ac_cpp='$CPP $CPPFLAGS'
3883 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3884 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3885 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3886 if test -n "$ac_tool_prefix"; then
3887 for ac_prog in $pgac_cc_list
3888 do
3889 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3890 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3892 $as_echo_n "checking for $ac_word... " >&6; }
3893 if ${ac_cv_prog_CC+:} false; then :
3894 $as_echo_n "(cached) " >&6
3895 else
3896 if test -n "$CC"; then
3897 ac_cv_prog_CC="$CC" # Let the user override the test.
3898 else
3899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3900 for as_dir in $PATH
3901 do
3902 IFS=$as_save_IFS
3903 test -z "$as_dir" && as_dir=.
3904 for ac_exec_ext in '' $ac_executable_extensions; do
3905 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3906 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3907 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3908 break 2
3909 fi
3910 done
3911 done
3912 IFS=$as_save_IFS
3913
3914 fi
3915 fi
3916 CC=$ac_cv_prog_CC
3917 if test -n "$CC"; then
3918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3919 $as_echo "$CC" >&6; }
3920 else
3921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3922 $as_echo "no" >&6; }
3923 fi
3924
3925
3926 test -n "$CC" && break
3927 done
3928 fi
3929 if test -z "$CC"; then
3930 ac_ct_CC=$CC
3931 for ac_prog in $pgac_cc_list
3932 do
3933 # Extract the first word of "$ac_prog", so it can be a program name with args.
3934 set dummy $ac_prog; ac_word=$2
3935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3936 $as_echo_n "checking for $ac_word... " >&6; }
3937 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3938 $as_echo_n "(cached) " >&6
3939 else
3940 if test -n "$ac_ct_CC"; then
3941 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3942 else
3943 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3944 for as_dir in $PATH
3945 do
3946 IFS=$as_save_IFS
3947 test -z "$as_dir" && as_dir=.
3948 for ac_exec_ext in '' $ac_executable_extensions; do
3949 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3950 ac_cv_prog_ac_ct_CC="$ac_prog"
3951 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3952 break 2
3953 fi
3954 done
3955 done
3956 IFS=$as_save_IFS
3957
3958 fi
3959 fi
3960 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3961 if test -n "$ac_ct_CC"; then
3962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3963 $as_echo "$ac_ct_CC" >&6; }
3964 else
3965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3966 $as_echo "no" >&6; }
3967 fi
3968
3969
3970 test -n "$ac_ct_CC" && break
3971 done
3972
3973 if test "x$ac_ct_CC" = x; then
3974 CC=""
3975 else
3976 case $cross_compiling:$ac_tool_warned in
3977 yes:)
3978 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3979 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3980 ac_tool_warned=yes ;;
3981 esac
3982 CC=$ac_ct_CC
3983 fi
3984 fi
3985
3986
3987 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3988 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3989 as_fn_error $? "no acceptable C compiler found in \$PATH
3990 See \`config.log' for more details" "$LINENO" 5; }
3991
3992 # Provide some information about the compiler.
3993 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3994 set X $ac_compile
3995 ac_compiler=$2
3996 for ac_option in --version -v -V -qversion; do
3997 { { ac_try="$ac_compiler $ac_option >&5"
3998 case "(($ac_try" in
3999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4000 *) ac_try_echo=$ac_try;;
4001 esac
4002 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4003 $as_echo "$ac_try_echo"; } >&5
4004 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4005 ac_status=$?
4006 if test -s conftest.err; then
4007 sed '10a\
4008 ... rest of stderr output deleted ...
4009 10q' conftest.err >conftest.er1
4010 cat conftest.er1 >&5
4011 fi
4012 rm -f conftest.er1 conftest.err
4013 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4014 test $ac_status = 0; }
4015 done
4016
4017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4018 /* end confdefs.h. */
4019
4020 int
4021 main ()
4022 {
4023
4024 ;
4025 return 0;
4026 }
4027 _ACEOF
4028 ac_clean_files_save=$ac_clean_files
4029 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4030 # Try to create an executable without -o first, disregard a.out.
4031 # It will help us diagnose broken compilers, and finding out an intuition
4032 # of exeext.
4033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4034 $as_echo_n "checking whether the C compiler works... " >&6; }
4035 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4036
4037 # The possible output files:
4038 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4039
4040 ac_rmfiles=
4041 for ac_file in $ac_files
4042 do
4043 case $ac_file in
4044 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4045 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4046 esac
4047 done
4048 rm -f $ac_rmfiles
4049
4050 if { { ac_try="$ac_link_default"
4051 case "(($ac_try" in
4052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4053 *) ac_try_echo=$ac_try;;
4054 esac
4055 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4056 $as_echo "$ac_try_echo"; } >&5
4057 (eval "$ac_link_default") 2>&5
4058 ac_status=$?
4059 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4060 test $ac_status = 0; }; then :
4061 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4062 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4063 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4064 # so that the user can short-circuit this test for compilers unknown to
4065 # Autoconf.
4066 for ac_file in $ac_files ''
4067 do
4068 test -f "$ac_file" || continue
4069 case $ac_file in
4070 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4071 ;;
4072 [ab].out )
4073 # We found the default executable, but exeext='' is most
4074 # certainly right.
4075 break;;
4076 *.* )
4077 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4078 then :; else
4079 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4080 fi
4081 # We set ac_cv_exeext here because the later test for it is not
4082 # safe: cross compilers may not add the suffix if given an `-o'
4083 # argument, so we may need to know it at that point already.
4084 # Even if this section looks crufty: it has the advantage of
4085 # actually working.
4086 break;;
4087 * )
4088 break;;
4089 esac
4090 done
4091 test "$ac_cv_exeext" = no && ac_cv_exeext=
4092
4093 else
4094 ac_file=''
4095 fi
4096 if test -z "$ac_file"; then :
4097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4098 $as_echo "no" >&6; }
4099 $as_echo "$as_me: failed program was:" >&5
4100 sed 's/^/| /' conftest.$ac_ext >&5
4101
4102 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4103 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4104 as_fn_error 77 "C compiler cannot create executables
4105 See \`config.log' for more details" "$LINENO" 5; }
4106 else
4107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4108 $as_echo "yes" >&6; }
4109 fi
4110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4111 $as_echo_n "checking for C compiler default output file name... " >&6; }
4112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4113 $as_echo "$ac_file" >&6; }
4114 ac_exeext=$ac_cv_exeext
4115
4116 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4117 ac_clean_files=$ac_clean_files_save
4118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4119 $as_echo_n "checking for suffix of executables... " >&6; }
4120 if { { ac_try="$ac_link"
4121 case "(($ac_try" in
4122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4123 *) ac_try_echo=$ac_try;;
4124 esac
4125 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4126 $as_echo "$ac_try_echo"; } >&5
4127 (eval "$ac_link") 2>&5
4128 ac_status=$?
4129 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4130 test $ac_status = 0; }; then :
4131 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4132 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4133 # work properly (i.e., refer to `conftest.exe'), while it won't with
4134 # `rm'.
4135 for ac_file in conftest.exe conftest conftest.*; do
4136 test -f "$ac_file" || continue
4137 case $ac_file in
4138 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4139 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4140 break;;
4141 * ) break;;
4142 esac
4143 done
4144 else
4145 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4146 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4147 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4148 See \`config.log' for more details" "$LINENO" 5; }
4149 fi
4150 rm -f conftest conftest$ac_cv_exeext
4151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4152 $as_echo "$ac_cv_exeext" >&6; }
4153
4154 rm -f conftest.$ac_ext
4155 EXEEXT=$ac_cv_exeext
4156 ac_exeext=$EXEEXT
4157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4158 /* end confdefs.h. */
4159 #include <stdio.h>
4160 int
4161 main ()
4162 {
4163 FILE *f = fopen ("conftest.out", "w");
4164 return ferror (f) || fclose (f) != 0;
4165
4166 ;
4167 return 0;
4168 }
4169 _ACEOF
4170 ac_clean_files="$ac_clean_files conftest.out"
4171 # Check that the compiler produces executables we can run. If not, either
4172 # the compiler is broken, or we cross compile.
4173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4174 $as_echo_n "checking whether we are cross compiling... " >&6; }
4175 if test "$cross_compiling" != yes; then
4176 { { ac_try="$ac_link"
4177 case "(($ac_try" in
4178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4179 *) ac_try_echo=$ac_try;;
4180 esac
4181 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4182 $as_echo "$ac_try_echo"; } >&5
4183 (eval "$ac_link") 2>&5
4184 ac_status=$?
4185 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4186 test $ac_status = 0; }
4187 if { ac_try='./conftest$ac_cv_exeext'
4188 { { case "(($ac_try" in
4189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4190 *) ac_try_echo=$ac_try;;
4191 esac
4192 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4193 $as_echo "$ac_try_echo"; } >&5
4194 (eval "$ac_try") 2>&5
4195 ac_status=$?
4196 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4197 test $ac_status = 0; }; }; then
4198 cross_compiling=no
4199 else
4200 if test "$cross_compiling" = maybe; then
4201 cross_compiling=yes
4202 else
4203 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4204 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4205 as_fn_error $? "cannot run C compiled programs.
4206 If you meant to cross compile, use \`--host'.
4207 See \`config.log' for more details" "$LINENO" 5; }
4208 fi
4209 fi
4210 fi
4211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4212 $as_echo "$cross_compiling" >&6; }
4213
4214 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4215 ac_clean_files=$ac_clean_files_save
4216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4217 $as_echo_n "checking for suffix of object files... " >&6; }
4218 if ${ac_cv_objext+:} false; then :
4219 $as_echo_n "(cached) " >&6
4220 else
4221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4222 /* end confdefs.h. */
4223
4224 int
4225 main ()
4226 {
4227
4228 ;
4229 return 0;
4230 }
4231 _ACEOF
4232 rm -f conftest.o conftest.obj
4233 if { { ac_try="$ac_compile"
4234 case "(($ac_try" in
4235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4236 *) ac_try_echo=$ac_try;;
4237 esac
4238 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4239 $as_echo "$ac_try_echo"; } >&5
4240 (eval "$ac_compile") 2>&5
4241 ac_status=$?
4242 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4243 test $ac_status = 0; }; then :
4244 for ac_file in conftest.o conftest.obj conftest.*; do
4245 test -f "$ac_file" || continue;
4246 case $ac_file in
4247 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4248 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4249 break;;
4250 esac
4251 done
4252 else
4253 $as_echo "$as_me: failed program was:" >&5
4254 sed 's/^/| /' conftest.$ac_ext >&5
4255
4256 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4257 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4258 as_fn_error $? "cannot compute suffix of object files: cannot compile
4259 See \`config.log' for more details" "$LINENO" 5; }
4260 fi
4261 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4262 fi
4263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4264 $as_echo "$ac_cv_objext" >&6; }
4265 OBJEXT=$ac_cv_objext
4266 ac_objext=$OBJEXT
4267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4268 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4269 if ${ac_cv_c_compiler_gnu+:} false; then :
4270 $as_echo_n "(cached) " >&6
4271 else
4272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4273 /* end confdefs.h. */
4274
4275 int
4276 main ()
4277 {
4278 #ifndef __GNUC__
4279 choke me
4280 #endif
4281
4282 ;
4283 return 0;
4284 }
4285 _ACEOF
4286 if ac_fn_c_try_compile "$LINENO"; then :
4287 ac_compiler_gnu=yes
4288 else
4289 ac_compiler_gnu=no
4290 fi
4291 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4292 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4293
4294 fi
4295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4296 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4297 if test $ac_compiler_gnu = yes; then
4298 GCC=yes
4299 else
4300 GCC=
4301 fi
4302 ac_test_CFLAGS=${CFLAGS+set}
4303 ac_save_CFLAGS=$CFLAGS
4304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4305 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4306 if ${ac_cv_prog_cc_g+:} false; then :
4307 $as_echo_n "(cached) " >&6
4308 else
4309 ac_save_c_werror_flag=$ac_c_werror_flag
4310 ac_c_werror_flag=yes
4311 ac_cv_prog_cc_g=no
4312 CFLAGS="-g"
4313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4314 /* end confdefs.h. */
4315
4316 int
4317 main ()
4318 {
4319
4320 ;
4321 return 0;
4322 }
4323 _ACEOF
4324 if ac_fn_c_try_compile "$LINENO"; then :
4325 ac_cv_prog_cc_g=yes
4326 else
4327 CFLAGS=""
4328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4329 /* end confdefs.h. */
4330
4331 int
4332 main ()
4333 {
4334
4335 ;
4336 return 0;
4337 }
4338 _ACEOF
4339 if ac_fn_c_try_compile "$LINENO"; then :
4340
4341 else
4342 ac_c_werror_flag=$ac_save_c_werror_flag
4343 CFLAGS="-g"
4344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4345 /* end confdefs.h. */
4346
4347 int
4348 main ()
4349 {
4350
4351 ;
4352 return 0;
4353 }
4354 _ACEOF
4355 if ac_fn_c_try_compile "$LINENO"; then :
4356 ac_cv_prog_cc_g=yes
4357 fi
4358 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4359 fi
4360 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4361 fi
4362 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4363 ac_c_werror_flag=$ac_save_c_werror_flag
4364 fi
4365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4366 $as_echo "$ac_cv_prog_cc_g" >&6; }
4367 if test "$ac_test_CFLAGS" = set; then
4368 CFLAGS=$ac_save_CFLAGS
4369 elif test $ac_cv_prog_cc_g = yes; then
4370 if test "$GCC" = yes; then
4371 CFLAGS="-g -O2"
4372 else
4373 CFLAGS="-g"
4374 fi
4375 else
4376 if test "$GCC" = yes; then
4377 CFLAGS="-O2"
4378 else
4379 CFLAGS=
4380 fi
4381 fi
4382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4383 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4384 if ${ac_cv_prog_cc_c89+:} false; then :
4385 $as_echo_n "(cached) " >&6
4386 else
4387 ac_cv_prog_cc_c89=no
4388 ac_save_CC=$CC
4389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4390 /* end confdefs.h. */
4391 #include <stdarg.h>
4392 #include <stdio.h>
4393 struct stat;
4394 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4395 struct buf { int x; };
4396 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4397 static char *e (p, i)
4398 char **p;
4399 int i;
4400 {
4401 return p[i];
4402 }
4403 static char *f (char * (*g) (char **, int), char **p, ...)
4404 {
4405 char *s;
4406 va_list v;
4407 va_start (v,p);
4408 s = g (p, va_arg (v,int));
4409 va_end (v);
4410 return s;
4411 }
4412
4413 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4414 function prototypes and stuff, but not '\xHH' hex character constants.
4415 These don't provoke an error unfortunately, instead are silently treated
4416 as 'x'. The following induces an error, until -std is added to get
4417 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4418 array size at least. It's necessary to write '\x00'==0 to get something
4419 that's true only with -std. */
4420 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4421
4422 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4423 inside strings and character constants. */
4424 #define FOO(x) 'x'
4425 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4426
4427 int test (int i, double x);
4428 struct s1 {int (*f) (int a);};
4429 struct s2 {int (*f) (double a);};
4430 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4431 int argc;
4432 char **argv;
4433 int
4434 main ()
4435 {
4436 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4437 ;
4438 return 0;
4439 }
4440 _ACEOF
4441 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4442 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4443 do
4444 CC="$ac_save_CC $ac_arg"
4445 if ac_fn_c_try_compile "$LINENO"; then :
4446 ac_cv_prog_cc_c89=$ac_arg
4447 fi
4448 rm -f core conftest.err conftest.$ac_objext
4449 test "x$ac_cv_prog_cc_c89" != "xno" && break
4450 done
4451 rm -f conftest.$ac_ext
4452 CC=$ac_save_CC
4453
4454 fi
4455 # AC_CACHE_VAL
4456 case "x$ac_cv_prog_cc_c89" in
4457 x)
4458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4459 $as_echo "none needed" >&6; } ;;
4460 xno)
4461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4462 $as_echo "unsupported" >&6; } ;;
4463 *)
4464 CC="$CC $ac_cv_prog_cc_c89"
4465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4466 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4467 esac
4468 if test "x$ac_cv_prog_cc_c89" != xno; then :
4469
4470 fi
4471
4472 ac_ext=c
4473 ac_cpp='$CPP $CPPFLAGS'
4474 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4475 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4476 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4477
4478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4479 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4480 if ${ac_cv_prog_cc_c99+:} false; then :
4481 $as_echo_n "(cached) " >&6
4482 else
4483 ac_cv_prog_cc_c99=no
4484 ac_save_CC=$CC
4485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4486 /* end confdefs.h. */
4487 #include <stdarg.h>
4488 #include <stdbool.h>
4489 #include <stdlib.h>
4490 #include <wchar.h>
4491 #include <stdio.h>
4492
4493 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4494 #define debug(...) fprintf (stderr, __VA_ARGS__)
4495 #define showlist(...) puts (#__VA_ARGS__)
4496 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4497 static void
4498 test_varargs_macros (void)
4499 {
4500 int x = 1234;
4501 int y = 5678;
4502 debug ("Flag");
4503 debug ("X = %d\n", x);
4504 showlist (The first, second, and third items.);
4505 report (x>y, "x is %d but y is %d", x, y);
4506 }
4507
4508 // Check long long types.
4509 #define BIG64 18446744073709551615ull
4510 #define BIG32 4294967295ul
4511 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4512 #if !BIG_OK
4513 your preprocessor is broken;
4514 #endif
4515 #if BIG_OK
4516 #else
4517 your preprocessor is broken;
4518 #endif
4519 static long long int bignum = -9223372036854775807LL;
4520 static unsigned long long int ubignum = BIG64;
4521
4522 struct incomplete_array
4523 {
4524 int datasize;
4525 double data[];
4526 };
4527
4528 struct named_init {
4529 int number;
4530 const wchar_t *name;
4531 double average;
4532 };
4533
4534 typedef const char *ccp;
4535
4536 static inline int
4537 test_restrict (ccp restrict text)
4538 {
4539 // See if C++-style comments work.
4540 // Iterate through items via the restricted pointer.
4541 // Also check for declarations in for loops.
4542 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4543 continue;
4544 return 0;
4545 }
4546
4547 // Check varargs and va_copy.
4548 static void
4549 test_varargs (const char *format, ...)
4550 {
4551 va_list args;
4552 va_start (args, format);
4553 va_list args_copy;
4554 va_copy (args_copy, args);
4555
4556 const char *str;
4557 int number;
4558 float fnumber;
4559
4560 while (*format)
4561 {
4562 switch (*format++)
4563 {
4564 case 's': // string
4565 str = va_arg (args_copy, const char *);
4566 break;
4567 case 'd': // int
4568 number = va_arg (args_copy, int);
4569 break;
4570 case 'f': // float
4571 fnumber = va_arg (args_copy, double);
4572 break;
4573 default:
4574 break;
4575 }
4576 }
4577 va_end (args_copy);
4578 va_end (args);
4579 }
4580
4581 int
4582 main ()
4583 {
4584
4585 // Check bool.
4586 _Bool success = false;
4587
4588 // Check restrict.
4589 if (test_restrict ("String literal") == 0)
4590 success = true;
4591 char *restrict newvar = "Another string";
4592
4593 // Check varargs.
4594 test_varargs ("s, d' f .", "string", 65, 34.234);
4595 test_varargs_macros ();
4596
4597 // Check flexible array members.
4598 struct incomplete_array *ia =
4599 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4600 ia->datasize = 10;
4601 for (int i = 0; i < ia->datasize; ++i)
4602 ia->data[i] = i * 1.234;
4603
4604 // Check named initializers.
4605 struct named_init ni = {
4606 .number = 34,
4607 .name = L"Test wide string",
4608 .average = 543.34343,
4609 };
4610
4611 ni.number = 58;
4612
4613 int dynamic_array[ni.number];
4614 dynamic_array[ni.number - 1] = 543;
4615
4616 // work around unused variable warnings
4617 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4618 || dynamic_array[ni.number - 1] != 543);
4619
4620 ;
4621 return 0;
4622 }
4623 _ACEOF
4624 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4625 do
4626 CC="$ac_save_CC $ac_arg"
4627 if ac_fn_c_try_compile "$LINENO"; then :
4628 ac_cv_prog_cc_c99=$ac_arg
4629 fi
4630 rm -f core conftest.err conftest.$ac_objext
4631 test "x$ac_cv_prog_cc_c99" != "xno" && break
4632 done
4633 rm -f conftest.$ac_ext
4634 CC=$ac_save_CC
4635
4636 fi
4637 # AC_CACHE_VAL
4638 case "x$ac_cv_prog_cc_c99" in
4639 x)
4640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4641 $as_echo "none needed" >&6; } ;;
4642 xno)
4643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4644 $as_echo "unsupported" >&6; } ;;
4645 *)
4646 CC="$CC $ac_cv_prog_cc_c99"
4647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4648 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4649 esac
4650 if test "x$ac_cv_prog_cc_c99" != xno; then :
4651
4652 fi
4653
4654
4655
4656 # Error out if the compiler does not support C99, as the codebase
4657 # relies on that.
4658 if test "$ac_cv_prog_cc_c99" = no; then
4659 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4660 fi
4661
4662 ac_ext=cpp
4663 ac_cpp='$CXXCPP $CPPFLAGS'
4664 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4665 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4666 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4667 if test -z "$CXX"; then
4668 if test -n "$CCC"; then
4669 CXX=$CCC
4670 else
4671 if test -n "$ac_tool_prefix"; then
4672 for ac_prog in $pgac_cxx_list
4673 do
4674 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4675 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4677 $as_echo_n "checking for $ac_word... " >&6; }
4678 if ${ac_cv_prog_CXX+:} false; then :
4679 $as_echo_n "(cached) " >&6
4680 else
4681 if test -n "$CXX"; then
4682 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4683 else
4684 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4685 for as_dir in $PATH
4686 do
4687 IFS=$as_save_IFS
4688 test -z "$as_dir" && as_dir=.
4689 for ac_exec_ext in '' $ac_executable_extensions; do
4690 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4691 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4692 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4693 break 2
4694 fi
4695 done
4696 done
4697 IFS=$as_save_IFS
4698
4699 fi
4700 fi
4701 CXX=$ac_cv_prog_CXX
4702 if test -n "$CXX"; then
4703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4704 $as_echo "$CXX" >&6; }
4705 else
4706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4707 $as_echo "no" >&6; }
4708 fi
4709
4710
4711 test -n "$CXX" && break
4712 done
4713 fi
4714 if test -z "$CXX"; then
4715 ac_ct_CXX=$CXX
4716 for ac_prog in $pgac_cxx_list
4717 do
4718 # Extract the first word of "$ac_prog", so it can be a program name with args.
4719 set dummy $ac_prog; ac_word=$2
4720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4721 $as_echo_n "checking for $ac_word... " >&6; }
4722 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4723 $as_echo_n "(cached) " >&6
4724 else
4725 if test -n "$ac_ct_CXX"; then
4726 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4727 else
4728 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4729 for as_dir in $PATH
4730 do
4731 IFS=$as_save_IFS
4732 test -z "$as_dir" && as_dir=.
4733 for ac_exec_ext in '' $ac_executable_extensions; do
4734 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4735 ac_cv_prog_ac_ct_CXX="$ac_prog"
4736 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4737 break 2
4738 fi
4739 done
4740 done
4741 IFS=$as_save_IFS
4742
4743 fi
4744 fi
4745 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4746 if test -n "$ac_ct_CXX"; then
4747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4748 $as_echo "$ac_ct_CXX" >&6; }
4749 else
4750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4751 $as_echo "no" >&6; }
4752 fi
4753
4754
4755 test -n "$ac_ct_CXX" && break
4756 done
4757
4758 if test "x$ac_ct_CXX" = x; then
4759 CXX="g++"
4760 else
4761 case $cross_compiling:$ac_tool_warned in
4762 yes:)
4763 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4764 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4765 ac_tool_warned=yes ;;
4766 esac
4767 CXX=$ac_ct_CXX
4768 fi
4769 fi
4770
4771 fi
4772 fi
4773 # Provide some information about the compiler.
4774 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4775 set X $ac_compile
4776 ac_compiler=$2
4777 for ac_option in --version -v -V -qversion; do
4778 { { ac_try="$ac_compiler $ac_option >&5"
4779 case "(($ac_try" in
4780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4781 *) ac_try_echo=$ac_try;;
4782 esac
4783 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4784 $as_echo "$ac_try_echo"; } >&5
4785 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4786 ac_status=$?
4787 if test -s conftest.err; then
4788 sed '10a\
4789 ... rest of stderr output deleted ...
4790 10q' conftest.err >conftest.er1
4791 cat conftest.er1 >&5
4792 fi
4793 rm -f conftest.er1 conftest.err
4794 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4795 test $ac_status = 0; }
4796 done
4797
4798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4799 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4800 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4801 $as_echo_n "(cached) " >&6
4802 else
4803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4804 /* end confdefs.h. */
4805
4806 int
4807 main ()
4808 {
4809 #ifndef __GNUC__
4810 choke me
4811 #endif
4812
4813 ;
4814 return 0;
4815 }
4816 _ACEOF
4817 if ac_fn_cxx_try_compile "$LINENO"; then :
4818 ac_compiler_gnu=yes
4819 else
4820 ac_compiler_gnu=no
4821 fi
4822 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4823 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4824
4825 fi
4826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4827 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4828 if test $ac_compiler_gnu = yes; then
4829 GXX=yes
4830 else
4831 GXX=
4832 fi
4833 ac_test_CXXFLAGS=${CXXFLAGS+set}
4834 ac_save_CXXFLAGS=$CXXFLAGS
4835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4836 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4837 if ${ac_cv_prog_cxx_g+:} false; then :
4838 $as_echo_n "(cached) " >&6
4839 else
4840 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4841 ac_cxx_werror_flag=yes
4842 ac_cv_prog_cxx_g=no
4843 CXXFLAGS="-g"
4844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4845 /* end confdefs.h. */
4846
4847 int
4848 main ()
4849 {
4850
4851 ;
4852 return 0;
4853 }
4854 _ACEOF
4855 if ac_fn_cxx_try_compile "$LINENO"; then :
4856 ac_cv_prog_cxx_g=yes
4857 else
4858 CXXFLAGS=""
4859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4860 /* end confdefs.h. */
4861
4862 int
4863 main ()
4864 {
4865
4866 ;
4867 return 0;
4868 }
4869 _ACEOF
4870 if ac_fn_cxx_try_compile "$LINENO"; then :
4871
4872 else
4873 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4874 CXXFLAGS="-g"
4875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4876 /* end confdefs.h. */
4877
4878 int
4879 main ()
4880 {
4881
4882 ;
4883 return 0;
4884 }
4885 _ACEOF
4886 if ac_fn_cxx_try_compile "$LINENO"; then :
4887 ac_cv_prog_cxx_g=yes
4888 fi
4889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4890 fi
4891 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4892 fi
4893 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4894 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4895 fi
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4897 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4898 if test "$ac_test_CXXFLAGS" = set; then
4899 CXXFLAGS=$ac_save_CXXFLAGS
4900 elif test $ac_cv_prog_cxx_g = yes; then
4901 if test "$GXX" = yes; then
4902 CXXFLAGS="-g -O2"
4903 else
4904 CXXFLAGS="-g"
4905 fi
4906 else
4907 if test "$GXX" = yes; then
4908 CXXFLAGS="-O2"
4909 else
4910 CXXFLAGS=
4911 fi
4912 fi
4913 ac_ext=c
4914 ac_cpp='$CPP $CPPFLAGS'
4915 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4916 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4917 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4918
4919
4920 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4921 # but has idiosyncrasies of its own. We assume icc will define
4922 # __INTEL_COMPILER regardless of CFLAGS.
4923
4924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4925 /* end confdefs.h. */
4926
4927 int
4928 main ()
4929 {
4930 #ifndef __INTEL_COMPILER
4931 choke me
4932 #endif
4933 ;
4934 return 0;
4935 }
4936 _ACEOF
4937 if ac_fn_c_try_compile "$LINENO"; then :
4938 ICC=yes
4939 else
4940 ICC=no
4941 fi
4942 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4943
4944 # Check if it's Sun Studio compiler. We assume that
4945 # __SUNPRO_C will be defined for Sun Studio compilers
4946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4947 /* end confdefs.h. */
4948
4949 int
4950 main ()
4951 {
4952 #ifndef __SUNPRO_C
4953 choke me
4954 #endif
4955 ;
4956 return 0;
4957 }
4958 _ACEOF
4959 if ac_fn_c_try_compile "$LINENO"; then :
4960 SUN_STUDIO_CC=yes
4961 else
4962 SUN_STUDIO_CC=no
4963 fi
4964 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4965
4966
4967
4968
4969 #
4970 # LLVM
4971 #
4972 # Checked early because subsequent tests depend on it.
4973
4974
4975
4976 # Check whether --with-llvm was given.
4977 if test "${with_llvm+set}" = set; then :
4978 withval=$with_llvm;
4979 case $withval in
4980 yes)
4981
4982 $as_echo "#define USE_LLVM 1" >>confdefs.h
4983
4984 ;;
4985 no)
4986 :
4987 ;;
4988 *)
4989 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4990 ;;
4991 esac
4992
4993 else
4994 with_llvm=no
4995
4996 fi
4997
4998
4999
5000 for ac_prog in gawk mawk nawk awk
5001 do
5002 # Extract the first word of "$ac_prog", so it can be a program name with args.
5003 set dummy $ac_prog; ac_word=$2
5004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5005 $as_echo_n "checking for $ac_word... " >&6; }
5006 if ${ac_cv_prog_AWK+:} false; then :
5007 $as_echo_n "(cached) " >&6
5008 else
5009 if test -n "$AWK"; then
5010 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5011 else
5012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5013 for as_dir in $PATH
5014 do
5015 IFS=$as_save_IFS
5016 test -z "$as_dir" && as_dir=.
5017 for ac_exec_ext in '' $ac_executable_extensions; do
5018 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5019 ac_cv_prog_AWK="$ac_prog"
5020 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5021 break 2
5022 fi
5023 done
5024 done
5025 IFS=$as_save_IFS
5026
5027 fi
5028 fi
5029 AWK=$ac_cv_prog_AWK
5030 if test -n "$AWK"; then
5031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5032 $as_echo "$AWK" >&6; }
5033 else
5034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5035 $as_echo "no" >&6; }
5036 fi
5037
5038
5039 test -n "$AWK" && break
5040 done
5041
5042 if test "$with_llvm" = yes; then :
5043
5044
5045
5046
5047
5048 if test -z "$LLVM_CONFIG"; then
5049 for ac_prog in llvm-config
5050 do
5051 # Extract the first word of "$ac_prog", so it can be a program name with args.
5052 set dummy $ac_prog; ac_word=$2
5053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5054 $as_echo_n "checking for $ac_word... " >&6; }
5055 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5056 $as_echo_n "(cached) " >&6
5057 else
5058 case $LLVM_CONFIG in
5059 [\\/]* | ?:[\\/]*)
5060 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5061 ;;
5062 *)
5063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5064 for as_dir in $PATH
5065 do
5066 IFS=$as_save_IFS
5067 test -z "$as_dir" && as_dir=.
5068 for ac_exec_ext in '' $ac_executable_extensions; do
5069 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5070 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5071 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5072 break 2
5073 fi
5074 done
5075 done
5076 IFS=$as_save_IFS
5077
5078 ;;
5079 esac
5080 fi
5081 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5082 if test -n "$LLVM_CONFIG"; then
5083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5084 $as_echo "$LLVM_CONFIG" >&6; }
5085 else
5086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5087 $as_echo "no" >&6; }
5088 fi
5089
5090
5091 test -n "$LLVM_CONFIG" && break
5092 done
5093
5094 else
5095 # Report the value of LLVM_CONFIG in configure's output in all cases.
5096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5097 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5099 $as_echo "$LLVM_CONFIG" >&6; }
5100 fi
5101
5102
5103 # no point continuing if llvm wasn't found
5104 if test -z "$LLVM_CONFIG"; then
5105 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5106 fi
5107 # check if detected $LLVM_CONFIG is executable
5108 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5109 if test "x$pgac_llvm_version" = "xno"; then
5110 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5111 fi
5112 # and whether the version is supported
5113 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 14) exit 1; else exit 0;}';then
5114 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 14 is required" "$LINENO" 5
5115 fi
5116 { $as_echo "$as_me:${as_lineno-$LINENO}: using llvm $pgac_llvm_version" >&5
5117 $as_echo "$as_me: using llvm $pgac_llvm_version" >&6;}
5118
5119 # need clang to create some bitcode files
5120
5121 if test -z "$CLANG"; then
5122 for ac_prog in clang
5123 do
5124 # Extract the first word of "$ac_prog", so it can be a program name with args.
5125 set dummy $ac_prog; ac_word=$2
5126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5127 $as_echo_n "checking for $ac_word... " >&6; }
5128 if ${ac_cv_path_CLANG+:} false; then :
5129 $as_echo_n "(cached) " >&6
5130 else
5131 case $CLANG in
5132 [\\/]* | ?:[\\/]*)
5133 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5134 ;;
5135 *)
5136 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5137 for as_dir in $PATH
5138 do
5139 IFS=$as_save_IFS
5140 test -z "$as_dir" && as_dir=.
5141 for ac_exec_ext in '' $ac_executable_extensions; do
5142 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5143 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5144 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5145 break 2
5146 fi
5147 done
5148 done
5149 IFS=$as_save_IFS
5150
5151 ;;
5152 esac
5153 fi
5154 CLANG=$ac_cv_path_CLANG
5155 if test -n "$CLANG"; then
5156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5157 $as_echo "$CLANG" >&6; }
5158 else
5159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5160 $as_echo "no" >&6; }
5161 fi
5162
5163
5164 test -n "$CLANG" && break
5165 done
5166
5167 else
5168 # Report the value of CLANG in configure's output in all cases.
5169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5170 $as_echo_n "checking for CLANG... " >&6; }
5171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5172 $as_echo "$CLANG" >&6; }
5173 fi
5174
5175 if test -z "$CLANG"; then
5176 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5177 fi
5178 # make sure clang is executable
5179 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5180 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5181 fi
5182 # Could check clang version, but it doesn't seem that
5183 # important. Systems with a new enough LLVM version are usually
5184 # going to have a decent clang version too. It's also not entirely
5185 # clear what the minimum version is.
5186
5187 # Collect compiler flags necessary to build the LLVM dependent
5188 # shared library.
5189 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5190 case $pgac_option in
5191 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5192 esac
5193 done
5194
5195 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5196 case $pgac_option in
5197 -L*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5198 esac
5199 done
5200
5201 # ABI influencing options, standard influencing options
5202 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5203 case $pgac_option in
5204 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5205 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5206 esac
5207 done
5208
5209 # Look for components we're interested in, collect necessary
5210 # libs. As some components are optional, we can't just list all of
5211 # them as it'd raise an error.
5212 pgac_components='';
5213 for pgac_component in `$LLVM_CONFIG --components`; do
5214 case $pgac_component in
5215 engine) pgac_components="$pgac_components $pgac_component";;
5216 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5217 orcjit) pgac_components="$pgac_components $pgac_component";;
5218 passes) pgac_components="$pgac_components $pgac_component";;
5219 native) pgac_components="$pgac_components $pgac_component";;
5220 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5221 esac
5222 done;
5223
5224 # And then get the libraries that need to be linked in for the
5225 # selected components. They're large libraries, we only want to
5226 # link them into the LLVM using shared library.
5227 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5228 case $pgac_option in
5229 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5230 esac
5231 done
5232
5233 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243 fi # fi
5244
5245
5246 unset CFLAGS
5247 unset CXXFLAGS
5248
5249 #
5250 # Read the template
5251 #
5252 . "$srcdir/src/template/$template" || exit
5253
5254 # C[XX]FLAGS are selected so:
5255 # If the user specifies something in the environment, that is used.
5256 # else: If the template file set something, that is used.
5257 # else: If coverage was enabled, don't set anything.
5258 # else: If the compiler is GCC, then we use -O2.
5259 # else: If the compiler is something else, then we use -O, unless debugging.
5260
5261 if test "$ac_env_CFLAGS_set" = set; then
5262 CFLAGS=$ac_env_CFLAGS_value
5263 elif test "${CFLAGS+set}" = set; then
5264 : # (keep what template set)
5265 elif test "$enable_coverage" = yes; then
5266 : # no optimization by default
5267 elif test "$GCC" = yes; then
5268 CFLAGS="-O2"
5269 else
5270 # if the user selected debug mode, don't use -O
5271 if test "$enable_debug" != yes; then
5272 CFLAGS="-O"
5273 fi
5274 fi
5275
5276 if test "$ac_env_CXXFLAGS_set" = set; then
5277 CXXFLAGS=$ac_env_CXXFLAGS_value
5278 elif test "${CXXFLAGS+set}" = set; then
5279 : # (keep what template set)
5280 elif test "$enable_coverage" = yes; then
5281 : # no optimization by default
5282 elif test "$GCC" = yes; then
5283 CXXFLAGS="-O2"
5284 else
5285 # if the user selected debug mode, don't use -O
5286 if test "$enable_debug" != yes; then
5287 CXXFLAGS="-O"
5288 fi
5289 fi
5290
5291 # When generating bitcode (for inlining) we always want to use -O2
5292 # even when --enable-debug is specified. The bitcode is not going to
5293 # be used for line-by-line debugging, and JIT inlining doesn't work
5294 # without at least -O1 (otherwise clang will emit 'noinline'
5295 # attributes everywhere), which is bad for testing. Still allow the
5296 # environment to override if done explicitly.
5297 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5298 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5299 else
5300 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5301 fi
5302 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5303 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5304 else
5305 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5306 fi
5307
5308 # C[XX]FLAGS we determined above will be added back at the end
5309 user_CFLAGS=$CFLAGS
5310 CFLAGS=""
5311 user_CXXFLAGS=$CXXFLAGS
5312 CXXFLAGS=""
5313 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5314 BITCODE_CFLAGS=""
5315 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5316 BITCODE_CXXFLAGS=""
5317
5318 # set CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE from the environment, if present
5319 if test "$ac_env_CFLAGS_UNROLL_LOOPS_set" = set; then
5320 CFLAGS_UNROLL_LOOPS=$ac_env_CFLAGS_UNROLL_LOOPS_value
5321 fi
5322 if test "$ac_env_CFLAGS_VECTORIZE_set" = set; then
5323 CFLAGS_VECTORIZE=$ac_env_CFLAGS_VECTORIZE_value
5324 fi
5325
5326 # Some versions of GCC support some additional useful warning flags.
5327 # Check whether they are supported, and add them to CFLAGS if so.
5328 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5329 # but has its own. Also check other compiler-specific flags here.
5330
5331 if test "$GCC" = yes -a "$ICC" = no; then
5332 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5333 CXXFLAGS="-Wall -Wpointer-arith"
5334 # These work in some but not all gcc versions
5335 save_CFLAGS=$CFLAGS
5336
5337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5338 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5339 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5340 $as_echo_n "(cached) " >&6
5341 else
5342 pgac_save_CFLAGS=$CFLAGS
5343 pgac_save_CC=$CC
5344 CC=${CC}
5345 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5346 ac_save_c_werror_flag=$ac_c_werror_flag
5347 ac_c_werror_flag=yes
5348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5349 /* end confdefs.h. */
5350
5351 int
5352 main ()
5353 {
5354
5355 ;
5356 return 0;
5357 }
5358 _ACEOF
5359 if ac_fn_c_try_compile "$LINENO"; then :
5360 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5361 else
5362 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5363 fi
5364 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5365 ac_c_werror_flag=$ac_save_c_werror_flag
5366 CFLAGS="$pgac_save_CFLAGS"
5367 CC="$pgac_save_CC"
5368 fi
5369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5370 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5371 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5372 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5373 fi
5374
5375
5376 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5377 # disable it, so AC_SUBST the negative form.
5378 PERMIT_DECLARATION_AFTER_STATEMENT=
5379 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5380 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5381 fi
5382
5383 # Really don't want VLAs to be used in our dialect of C
5384
5385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5386 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5387 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5388 $as_echo_n "(cached) " >&6
5389 else
5390 pgac_save_CFLAGS=$CFLAGS
5391 pgac_save_CC=$CC
5392 CC=${CC}
5393 CFLAGS="${CFLAGS} -Werror=vla"
5394 ac_save_c_werror_flag=$ac_c_werror_flag
5395 ac_c_werror_flag=yes
5396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5397 /* end confdefs.h. */
5398
5399 int
5400 main ()
5401 {
5402
5403 ;
5404 return 0;
5405 }
5406 _ACEOF
5407 if ac_fn_c_try_compile "$LINENO"; then :
5408 pgac_cv_prog_CC_cflags__Werror_vla=yes
5409 else
5410 pgac_cv_prog_CC_cflags__Werror_vla=no
5411 fi
5412 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5413 ac_c_werror_flag=$ac_save_c_werror_flag
5414 CFLAGS="$pgac_save_CFLAGS"
5415 CC="$pgac_save_CC"
5416 fi
5417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5418 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5419 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5420 CFLAGS="${CFLAGS} -Werror=vla"
5421 fi
5422
5423
5424 # On macOS, complain about usage of symbols newer than the deployment target
5425
5426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS" >&5
5427 $as_echo_n "checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS... " >&6; }
5428 if ${pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new+:} false; then :
5429 $as_echo_n "(cached) " >&6
5430 else
5431 pgac_save_CFLAGS=$CFLAGS
5432 pgac_save_CC=$CC
5433 CC=${CC}
5434 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5435 ac_save_c_werror_flag=$ac_c_werror_flag
5436 ac_c_werror_flag=yes
5437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5438 /* end confdefs.h. */
5439
5440 int
5441 main ()
5442 {
5443
5444 ;
5445 return 0;
5446 }
5447 _ACEOF
5448 if ac_fn_c_try_compile "$LINENO"; then :
5449 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=yes
5450 else
5451 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=no
5452 fi
5453 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5454 ac_c_werror_flag=$ac_save_c_werror_flag
5455 CFLAGS="$pgac_save_CFLAGS"
5456 CC="$pgac_save_CC"
5457 fi
5458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&5
5459 $as_echo "$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&6; }
5460 if test x"$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" = x"yes"; then
5461 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5462 fi
5463
5464
5465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS" >&5
5466 $as_echo_n "checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS... " >&6; }
5467 if ${pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new+:} false; then :
5468 $as_echo_n "(cached) " >&6
5469 else
5470 pgac_save_CXXFLAGS=$CXXFLAGS
5471 pgac_save_CXX=$CXX
5472 CXX=${CXX}
5473 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5474 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5475 ac_cxx_werror_flag=yes
5476 ac_ext=cpp
5477 ac_cpp='$CXXCPP $CPPFLAGS'
5478 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5479 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5480 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5481
5482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5483 /* end confdefs.h. */
5484
5485 int
5486 main ()
5487 {
5488
5489 ;
5490 return 0;
5491 }
5492 _ACEOF
5493 if ac_fn_cxx_try_compile "$LINENO"; then :
5494 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=yes
5495 else
5496 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=no
5497 fi
5498 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5499 ac_ext=c
5500 ac_cpp='$CPP $CPPFLAGS'
5501 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5502 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5503 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5504
5505 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5506 CXXFLAGS="$pgac_save_CXXFLAGS"
5507 CXX="$pgac_save_CXX"
5508 fi
5509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&5
5510 $as_echo "$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&6; }
5511 if test x"$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" = x"yes"; then
5512 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5513 fi
5514
5515
5516 # -Wvla is not applicable for C++
5517
5518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5519 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5520 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5521 $as_echo_n "(cached) " >&6
5522 else
5523 pgac_save_CFLAGS=$CFLAGS
5524 pgac_save_CC=$CC
5525 CC=${CC}
5526 CFLAGS="${CFLAGS} -Wendif-labels"
5527 ac_save_c_werror_flag=$ac_c_werror_flag
5528 ac_c_werror_flag=yes
5529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5530 /* end confdefs.h. */
5531
5532 int
5533 main ()
5534 {
5535
5536 ;
5537 return 0;
5538 }
5539 _ACEOF
5540 if ac_fn_c_try_compile "$LINENO"; then :
5541 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5542 else
5543 pgac_cv_prog_CC_cflags__Wendif_labels=no
5544 fi
5545 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5546 ac_c_werror_flag=$ac_save_c_werror_flag
5547 CFLAGS="$pgac_save_CFLAGS"
5548 CC="$pgac_save_CC"
5549 fi
5550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5551 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5552 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5553 CFLAGS="${CFLAGS} -Wendif-labels"
5554 fi
5555
5556
5557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5558 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5559 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5560 $as_echo_n "(cached) " >&6
5561 else
5562 pgac_save_CXXFLAGS=$CXXFLAGS
5563 pgac_save_CXX=$CXX
5564 CXX=${CXX}
5565 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5566 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5567 ac_cxx_werror_flag=yes
5568 ac_ext=cpp
5569 ac_cpp='$CXXCPP $CPPFLAGS'
5570 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5571 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5572 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5573
5574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5575 /* end confdefs.h. */
5576
5577 int
5578 main ()
5579 {
5580
5581 ;
5582 return 0;
5583 }
5584 _ACEOF
5585 if ac_fn_cxx_try_compile "$LINENO"; then :
5586 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5587 else
5588 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5589 fi
5590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5591 ac_ext=c
5592 ac_cpp='$CPP $CPPFLAGS'
5593 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5594 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5595 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5596
5597 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5598 CXXFLAGS="$pgac_save_CXXFLAGS"
5599 CXX="$pgac_save_CXX"
5600 fi
5601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5602 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5603 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5604 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5605 fi
5606
5607
5608
5609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5610 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5611 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5612 $as_echo_n "(cached) " >&6
5613 else
5614 pgac_save_CFLAGS=$CFLAGS
5615 pgac_save_CC=$CC
5616 CC=${CC}
5617 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5618 ac_save_c_werror_flag=$ac_c_werror_flag
5619 ac_c_werror_flag=yes
5620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5621 /* end confdefs.h. */
5622
5623 int
5624 main ()
5625 {
5626
5627 ;
5628 return 0;
5629 }
5630 _ACEOF
5631 if ac_fn_c_try_compile "$LINENO"; then :
5632 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5633 else
5634 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5635 fi
5636 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5637 ac_c_werror_flag=$ac_save_c_werror_flag
5638 CFLAGS="$pgac_save_CFLAGS"
5639 CC="$pgac_save_CC"
5640 fi
5641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5642 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5643 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5644 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5645 fi
5646
5647
5648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5649 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5650 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5651 $as_echo_n "(cached) " >&6
5652 else
5653 pgac_save_CXXFLAGS=$CXXFLAGS
5654 pgac_save_CXX=$CXX
5655 CXX=${CXX}
5656 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5657 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5658 ac_cxx_werror_flag=yes
5659 ac_ext=cpp
5660 ac_cpp='$CXXCPP $CPPFLAGS'
5661 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5662 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5663 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5664
5665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5666 /* end confdefs.h. */
5667
5668 int
5669 main ()
5670 {
5671
5672 ;
5673 return 0;
5674 }
5675 _ACEOF
5676 if ac_fn_cxx_try_compile "$LINENO"; then :
5677 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5678 else
5679 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5680 fi
5681 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5682 ac_ext=c
5683 ac_cpp='$CPP $CPPFLAGS'
5684 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5685 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5686 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5687
5688 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5689 CXXFLAGS="$pgac_save_CXXFLAGS"
5690 CXX="$pgac_save_CXX"
5691 fi
5692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5693 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5694 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5695 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5696 fi
5697
5698
5699
5700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS" >&5
5701 $as_echo_n "checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS... " >&6; }
5702 if ${pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3+:} false; then :
5703 $as_echo_n "(cached) " >&6
5704 else
5705 pgac_save_CFLAGS=$CFLAGS
5706 pgac_save_CC=$CC
5707 CC=${CC}
5708 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5709 ac_save_c_werror_flag=$ac_c_werror_flag
5710 ac_c_werror_flag=yes
5711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5712 /* end confdefs.h. */
5713
5714 int
5715 main ()
5716 {
5717
5718 ;
5719 return 0;
5720 }
5721 _ACEOF
5722 if ac_fn_c_try_compile "$LINENO"; then :
5723 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=yes
5724 else
5725 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=no
5726 fi
5727 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5728 ac_c_werror_flag=$ac_save_c_werror_flag
5729 CFLAGS="$pgac_save_CFLAGS"
5730 CC="$pgac_save_CC"
5731 fi
5732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&5
5733 $as_echo "$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&6; }
5734 if test x"$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" = x"yes"; then
5735 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5736 fi
5737
5738
5739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS" >&5
5740 $as_echo_n "checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS... " >&6; }
5741 if ${pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3+:} false; then :
5742 $as_echo_n "(cached) " >&6
5743 else
5744 pgac_save_CXXFLAGS=$CXXFLAGS
5745 pgac_save_CXX=$CXX
5746 CXX=${CXX}
5747 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5748 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5749 ac_cxx_werror_flag=yes
5750 ac_ext=cpp
5751 ac_cpp='$CXXCPP $CPPFLAGS'
5752 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5753 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5754 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5755
5756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5757 /* end confdefs.h. */
5758
5759 int
5760 main ()
5761 {
5762
5763 ;
5764 return 0;
5765 }
5766 _ACEOF
5767 if ac_fn_cxx_try_compile "$LINENO"; then :
5768 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=yes
5769 else
5770 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=no
5771 fi
5772 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5773 ac_ext=c
5774 ac_cpp='$CPP $CPPFLAGS'
5775 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5776 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5777 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5778
5779 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5780 CXXFLAGS="$pgac_save_CXXFLAGS"
5781 CXX="$pgac_save_CXX"
5782 fi
5783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&5
5784 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&6; }
5785 if test x"$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" = x"yes"; then
5786 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5787 fi
5788
5789
5790
5791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type, for CFLAGS" >&5
5792 $as_echo_n "checking whether ${CC} supports -Wcast-function-type, for CFLAGS... " >&6; }
5793 if ${pgac_cv_prog_CC_cflags__Wcast_function_type+:} false; then :
5794 $as_echo_n "(cached) " >&6
5795 else
5796 pgac_save_CFLAGS=$CFLAGS
5797 pgac_save_CC=$CC
5798 CC=${CC}
5799 CFLAGS="${CFLAGS} -Wcast-function-type"
5800 ac_save_c_werror_flag=$ac_c_werror_flag
5801 ac_c_werror_flag=yes
5802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5803 /* end confdefs.h. */
5804
5805 int
5806 main ()
5807 {
5808
5809 ;
5810 return 0;
5811 }
5812 _ACEOF
5813 if ac_fn_c_try_compile "$LINENO"; then :
5814 pgac_cv_prog_CC_cflags__Wcast_function_type=yes
5815 else
5816 pgac_cv_prog_CC_cflags__Wcast_function_type=no
5817 fi
5818 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5819 ac_c_werror_flag=$ac_save_c_werror_flag
5820 CFLAGS="$pgac_save_CFLAGS"
5821 CC="$pgac_save_CC"
5822 fi
5823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type" >&5
5824 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type" >&6; }
5825 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type" = x"yes"; then
5826 CFLAGS="${CFLAGS} -Wcast-function-type"
5827 fi
5828
5829
5830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS" >&5
5831 $as_echo_n "checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS... " >&6; }
5832 if ${pgac_cv_prog_CXX_cxxflags__Wcast_function_type+:} false; then :
5833 $as_echo_n "(cached) " >&6
5834 else
5835 pgac_save_CXXFLAGS=$CXXFLAGS
5836 pgac_save_CXX=$CXX
5837 CXX=${CXX}
5838 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5839 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5840 ac_cxx_werror_flag=yes
5841 ac_ext=cpp
5842 ac_cpp='$CXXCPP $CPPFLAGS'
5843 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5844 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5845 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5846
5847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5848 /* end confdefs.h. */
5849
5850 int
5851 main ()
5852 {
5853
5854 ;
5855 return 0;
5856 }
5857 _ACEOF
5858 if ac_fn_cxx_try_compile "$LINENO"; then :
5859 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=yes
5860 else
5861 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=no
5862 fi
5863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5864 ac_ext=c
5865 ac_cpp='$CPP $CPPFLAGS'
5866 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5867 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5868 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5869
5870 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5871 CXXFLAGS="$pgac_save_CXXFLAGS"
5872 CXX="$pgac_save_CXX"
5873 fi
5874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&5
5875 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&6; }
5876 if test x"$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" = x"yes"; then
5877 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5878 fi
5879
5880
5881
5882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS" >&5
5883 $as_echo_n "checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS... " >&6; }
5884 if ${pgac_cv_prog_CC_cflags__Wshadow_compatible_local+:} false; then :
5885 $as_echo_n "(cached) " >&6
5886 else
5887 pgac_save_CFLAGS=$CFLAGS
5888 pgac_save_CC=$CC
5889 CC=${CC}
5890 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5891 ac_save_c_werror_flag=$ac_c_werror_flag
5892 ac_c_werror_flag=yes
5893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5894 /* end confdefs.h. */
5895
5896 int
5897 main ()
5898 {
5899
5900 ;
5901 return 0;
5902 }
5903 _ACEOF
5904 if ac_fn_c_try_compile "$LINENO"; then :
5905 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=yes
5906 else
5907 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=no
5908 fi
5909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5910 ac_c_werror_flag=$ac_save_c_werror_flag
5911 CFLAGS="$pgac_save_CFLAGS"
5912 CC="$pgac_save_CC"
5913 fi
5914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&5
5915 $as_echo "$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&6; }
5916 if test x"$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" = x"yes"; then
5917 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5918 fi
5919
5920
5921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS" >&5
5922 $as_echo_n "checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS... " >&6; }
5923 if ${pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local+:} false; then :
5924 $as_echo_n "(cached) " >&6
5925 else
5926 pgac_save_CXXFLAGS=$CXXFLAGS
5927 pgac_save_CXX=$CXX
5928 CXX=${CXX}
5929 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5930 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5931 ac_cxx_werror_flag=yes
5932 ac_ext=cpp
5933 ac_cpp='$CXXCPP $CPPFLAGS'
5934 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5935 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5936 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5937
5938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5939 /* end confdefs.h. */
5940
5941 int
5942 main ()
5943 {
5944
5945 ;
5946 return 0;
5947 }
5948 _ACEOF
5949 if ac_fn_cxx_try_compile "$LINENO"; then :
5950 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=yes
5951 else
5952 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=no
5953 fi
5954 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5955 ac_ext=c
5956 ac_cpp='$CPP $CPPFLAGS'
5957 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5958 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5959 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5960
5961 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5962 CXXFLAGS="$pgac_save_CXXFLAGS"
5963 CXX="$pgac_save_CXX"
5964 fi
5965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&5
5966 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&6; }
5967 if test x"$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" = x"yes"; then
5968 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5969 fi
5970
5971
5972 # This was included in -Wall/-Wformat in older GCC versions
5973
5974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5975 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5976 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5977 $as_echo_n "(cached) " >&6
5978 else
5979 pgac_save_CFLAGS=$CFLAGS
5980 pgac_save_CC=$CC
5981 CC=${CC}
5982 CFLAGS="${CFLAGS} -Wformat-security"
5983 ac_save_c_werror_flag=$ac_c_werror_flag
5984 ac_c_werror_flag=yes
5985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5986 /* end confdefs.h. */
5987
5988 int
5989 main ()
5990 {
5991
5992 ;
5993 return 0;
5994 }
5995 _ACEOF
5996 if ac_fn_c_try_compile "$LINENO"; then :
5997 pgac_cv_prog_CC_cflags__Wformat_security=yes
5998 else
5999 pgac_cv_prog_CC_cflags__Wformat_security=no
6000 fi
6001 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6002 ac_c_werror_flag=$ac_save_c_werror_flag
6003 CFLAGS="$pgac_save_CFLAGS"
6004 CC="$pgac_save_CC"
6005 fi
6006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
6007 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
6008 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
6009 CFLAGS="${CFLAGS} -Wformat-security"
6010 fi
6011
6012
6013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
6014 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
6015 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
6016 $as_echo_n "(cached) " >&6
6017 else
6018 pgac_save_CXXFLAGS=$CXXFLAGS
6019 pgac_save_CXX=$CXX
6020 CXX=${CXX}
6021 CXXFLAGS="${CXXFLAGS} -Wformat-security"
6022 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6023 ac_cxx_werror_flag=yes
6024 ac_ext=cpp
6025 ac_cpp='$CXXCPP $CPPFLAGS'
6026 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6027 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6028 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6029
6030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6031 /* end confdefs.h. */
6032
6033 int
6034 main ()
6035 {
6036
6037 ;
6038 return 0;
6039 }
6040 _ACEOF
6041 if ac_fn_cxx_try_compile "$LINENO"; then :
6042 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
6043 else
6044 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
6045 fi
6046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6047 ac_ext=c
6048 ac_cpp='$CPP $CPPFLAGS'
6049 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6050 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6051 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6052
6053 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6054 CXXFLAGS="$pgac_save_CXXFLAGS"
6055 CXX="$pgac_save_CXX"
6056 fi
6057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
6058 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
6059 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
6060 CXXFLAGS="${CXXFLAGS} -Wformat-security"
6061 fi
6062
6063
6064 # gcc 14+, clang for a while
6065 # (Supported in C++ by clang but not gcc. For consistency, omit in C++.)
6066 save_CFLAGS=$CFLAGS
6067
6068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-variable-declarations, for CFLAGS" >&5
6069 $as_echo_n "checking whether ${CC} supports -Wmissing-variable-declarations, for CFLAGS... " >&6; }
6070 if ${pgac_cv_prog_CC_cflags__Wmissing_variable_declarations+:} false; then :
6071 $as_echo_n "(cached) " >&6
6072 else
6073 pgac_save_CFLAGS=$CFLAGS
6074 pgac_save_CC=$CC
6075 CC=${CC}
6076 CFLAGS="${CFLAGS} -Wmissing-variable-declarations"
6077 ac_save_c_werror_flag=$ac_c_werror_flag
6078 ac_c_werror_flag=yes
6079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6080 /* end confdefs.h. */
6081
6082 int
6083 main ()
6084 {
6085
6086 ;
6087 return 0;
6088 }
6089 _ACEOF
6090 if ac_fn_c_try_compile "$LINENO"; then :
6091 pgac_cv_prog_CC_cflags__Wmissing_variable_declarations=yes
6092 else
6093 pgac_cv_prog_CC_cflags__Wmissing_variable_declarations=no
6094 fi
6095 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6096 ac_c_werror_flag=$ac_save_c_werror_flag
6097 CFLAGS="$pgac_save_CFLAGS"
6098 CC="$pgac_save_CC"
6099 fi
6100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_variable_declarations" >&5
6101 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_variable_declarations" >&6; }
6102 if test x"$pgac_cv_prog_CC_cflags__Wmissing_variable_declarations" = x"yes"; then
6103 CFLAGS="${CFLAGS} -Wmissing-variable-declarations"
6104 fi
6105
6106
6107 PERMIT_MISSING_VARIABLE_DECLARATIONS=
6108 if test x"$save_CFLAGS" != x"$CFLAGS"; then
6109 PERMIT_MISSING_VARIABLE_DECLARATIONS=-Wno-missing-variable-declarations
6110 fi
6111
6112 # Disable strict-aliasing rules; needed for gcc 3.3+
6113
6114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6115 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6116 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6117 $as_echo_n "(cached) " >&6
6118 else
6119 pgac_save_CFLAGS=$CFLAGS
6120 pgac_save_CC=$CC
6121 CC=${CC}
6122 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6123 ac_save_c_werror_flag=$ac_c_werror_flag
6124 ac_c_werror_flag=yes
6125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6126 /* end confdefs.h. */
6127
6128 int
6129 main ()
6130 {
6131
6132 ;
6133 return 0;
6134 }
6135 _ACEOF
6136 if ac_fn_c_try_compile "$LINENO"; then :
6137 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6138 else
6139 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6140 fi
6141 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6142 ac_c_werror_flag=$ac_save_c_werror_flag
6143 CFLAGS="$pgac_save_CFLAGS"
6144 CC="$pgac_save_CC"
6145 fi
6146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6147 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6148 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6149 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6150 fi
6151
6152
6153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6154 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6155 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6156 $as_echo_n "(cached) " >&6
6157 else
6158 pgac_save_CXXFLAGS=$CXXFLAGS
6159 pgac_save_CXX=$CXX
6160 CXX=${CXX}
6161 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6162 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6163 ac_cxx_werror_flag=yes
6164 ac_ext=cpp
6165 ac_cpp='$CXXCPP $CPPFLAGS'
6166 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6167 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6168 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6169
6170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6171 /* end confdefs.h. */
6172
6173 int
6174 main ()
6175 {
6176
6177 ;
6178 return 0;
6179 }
6180 _ACEOF
6181 if ac_fn_cxx_try_compile "$LINENO"; then :
6182 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6183 else
6184 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6185 fi
6186 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6187 ac_ext=c
6188 ac_cpp='$CPP $CPPFLAGS'
6189 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6190 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6191 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6192
6193 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6194 CXXFLAGS="$pgac_save_CXXFLAGS"
6195 CXX="$pgac_save_CXX"
6196 fi
6197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6198 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6199 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6200 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6201 fi
6202
6203
6204 # Disable optimizations that assume no overflow; needed for gcc 4.3+
6205
6206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
6207 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
6208 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
6209 $as_echo_n "(cached) " >&6
6210 else
6211 pgac_save_CFLAGS=$CFLAGS
6212 pgac_save_CC=$CC
6213 CC=${CC}
6214 CFLAGS="${CFLAGS} -fwrapv"
6215 ac_save_c_werror_flag=$ac_c_werror_flag
6216 ac_c_werror_flag=yes
6217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6218 /* end confdefs.h. */
6219
6220 int
6221 main ()
6222 {
6223
6224 ;
6225 return 0;
6226 }
6227 _ACEOF
6228 if ac_fn_c_try_compile "$LINENO"; then :
6229 pgac_cv_prog_CC_cflags__fwrapv=yes
6230 else
6231 pgac_cv_prog_CC_cflags__fwrapv=no
6232 fi
6233 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6234 ac_c_werror_flag=$ac_save_c_werror_flag
6235 CFLAGS="$pgac_save_CFLAGS"
6236 CC="$pgac_save_CC"
6237 fi
6238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
6239 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
6240 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
6241 CFLAGS="${CFLAGS} -fwrapv"
6242 fi
6243
6244
6245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
6246 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
6247 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
6248 $as_echo_n "(cached) " >&6
6249 else
6250 pgac_save_CXXFLAGS=$CXXFLAGS
6251 pgac_save_CXX=$CXX
6252 CXX=${CXX}
6253 CXXFLAGS="${CXXFLAGS} -fwrapv"
6254 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6255 ac_cxx_werror_flag=yes
6256 ac_ext=cpp
6257 ac_cpp='$CXXCPP $CPPFLAGS'
6258 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6259 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6260 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6261
6262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6263 /* end confdefs.h. */
6264
6265 int
6266 main ()
6267 {
6268
6269 ;
6270 return 0;
6271 }
6272 _ACEOF
6273 if ac_fn_cxx_try_compile "$LINENO"; then :
6274 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
6275 else
6276 pgac_cv_prog_CXX_cxxflags__fwrapv=no
6277 fi
6278 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6279 ac_ext=c
6280 ac_cpp='$CPP $CPPFLAGS'
6281 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6282 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6283 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6284
6285 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6286 CXXFLAGS="$pgac_save_CXXFLAGS"
6287 CXX="$pgac_save_CXX"
6288 fi
6289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
6290 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
6291 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
6292 CXXFLAGS="${CXXFLAGS} -fwrapv"
6293 fi
6294
6295
6296 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
6297
6298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
6299 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
6300 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
6301 $as_echo_n "(cached) " >&6
6302 else
6303 pgac_save_CFLAGS=$CFLAGS
6304 pgac_save_CC=$CC
6305 CC=${CC}
6306 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6307 ac_save_c_werror_flag=$ac_c_werror_flag
6308 ac_c_werror_flag=yes
6309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6310 /* end confdefs.h. */
6311
6312 int
6313 main ()
6314 {
6315
6316 ;
6317 return 0;
6318 }
6319 _ACEOF
6320 if ac_fn_c_try_compile "$LINENO"; then :
6321 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6322 else
6323 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6324 fi
6325 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6326 ac_c_werror_flag=$ac_save_c_werror_flag
6327 CFLAGS="$pgac_save_CFLAGS"
6328 CC="$pgac_save_CC"
6329 fi
6330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6331 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6332 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6333 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6334 fi
6335
6336
6337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6338 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6339 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6340 $as_echo_n "(cached) " >&6
6341 else
6342 pgac_save_CXXFLAGS=$CXXFLAGS
6343 pgac_save_CXX=$CXX
6344 CXX=${CXX}
6345 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6346 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6347 ac_cxx_werror_flag=yes
6348 ac_ext=cpp
6349 ac_cpp='$CXXCPP $CPPFLAGS'
6350 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6351 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6352 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6353
6354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6355 /* end confdefs.h. */
6356
6357 int
6358 main ()
6359 {
6360
6361 ;
6362 return 0;
6363 }
6364 _ACEOF
6365 if ac_fn_cxx_try_compile "$LINENO"; then :
6366 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6367 else
6368 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6369 fi
6370 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6371 ac_ext=c
6372 ac_cpp='$CPP $CPPFLAGS'
6373 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6374 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6375 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6376
6377 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6378 CXXFLAGS="$pgac_save_CXXFLAGS"
6379 CXX="$pgac_save_CXX"
6380 fi
6381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6382 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6383 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6384 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6385 fi
6386
6387
6388 # Optimization flags for specific files that benefit from loop unrolling
6389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS" >&5
6390 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... " >&6; }
6391 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6392 $as_echo_n "(cached) " >&6
6393 else
6394 pgac_save_CFLAGS=$CFLAGS
6395 pgac_save_CC=$CC
6396 CC=${CC}
6397 CFLAGS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6398 ac_save_c_werror_flag=$ac_c_werror_flag
6399 ac_c_werror_flag=yes
6400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6401 /* end confdefs.h. */
6402
6403 int
6404 main ()
6405 {
6406
6407 ;
6408 return 0;
6409 }
6410 _ACEOF
6411 if ac_fn_c_try_compile "$LINENO"; then :
6412 pgac_cv_prog_CC_cflags__funroll_loops=yes
6413 else
6414 pgac_cv_prog_CC_cflags__funroll_loops=no
6415 fi
6416 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6417 ac_c_werror_flag=$ac_save_c_werror_flag
6418 CFLAGS="$pgac_save_CFLAGS"
6419 CC="$pgac_save_CC"
6420 fi
6421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6422 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6423 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6424 CFLAGS_UNROLL_LOOPS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6425 fi
6426
6427
6428 # Optimization flags for specific files that benefit from vectorization
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE" >&5
6430 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE... " >&6; }
6431 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6432 $as_echo_n "(cached) " >&6
6433 else
6434 pgac_save_CFLAGS=$CFLAGS
6435 pgac_save_CC=$CC
6436 CC=${CC}
6437 CFLAGS="${CFLAGS_VECTORIZE} -ftree-vectorize"
6438 ac_save_c_werror_flag=$ac_c_werror_flag
6439 ac_c_werror_flag=yes
6440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6441 /* end confdefs.h. */
6442
6443 int
6444 main ()
6445 {
6446
6447 ;
6448 return 0;
6449 }
6450 _ACEOF
6451 if ac_fn_c_try_compile "$LINENO"; then :
6452 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6453 else
6454 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6455 fi
6456 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6457 ac_c_werror_flag=$ac_save_c_werror_flag
6458 CFLAGS="$pgac_save_CFLAGS"
6459 CC="$pgac_save_CC"
6460 fi
6461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6462 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6463 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6464 CFLAGS_VECTORIZE="${CFLAGS_VECTORIZE} -ftree-vectorize"
6465 fi
6466
6467
6468 #
6469 # The following tests want to suppress various unhelpful warnings by adding
6470 # -Wno-foo switches. But gcc won't complain about unrecognized -Wno-foo
6471 # switches, so we have to test for the positive form and if that works,
6472 # add the negative form. Note that tests of this form typically need to
6473 # be duplicated in the BITCODE_CFLAGS setup stanza below.
6474 #
6475 # Suppress clang's unhelpful unused-command-line-argument warnings.
6476 NOT_THE_CFLAGS=""
6477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6478 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6479 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6480 $as_echo_n "(cached) " >&6
6481 else
6482 pgac_save_CFLAGS=$CFLAGS
6483 pgac_save_CC=$CC
6484 CC=${CC}
6485 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6486 ac_save_c_werror_flag=$ac_c_werror_flag
6487 ac_c_werror_flag=yes
6488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6489 /* end confdefs.h. */
6490
6491 int
6492 main ()
6493 {
6494
6495 ;
6496 return 0;
6497 }
6498 _ACEOF
6499 if ac_fn_c_try_compile "$LINENO"; then :
6500 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6501 else
6502 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6503 fi
6504 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6505 ac_c_werror_flag=$ac_save_c_werror_flag
6506 CFLAGS="$pgac_save_CFLAGS"
6507 CC="$pgac_save_CC"
6508 fi
6509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6510 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6511 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6512 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6513 fi
6514
6515
6516 if test -n "$NOT_THE_CFLAGS"; then
6517 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6518 fi
6519 # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot
6520 # of warnings when building plperl because of usages in the Perl headers.
6521 NOT_THE_CFLAGS=""
6522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
6523 $as_echo_n "checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
6524 if ${pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro+:} false; then :
6525 $as_echo_n "(cached) " >&6
6526 else
6527 pgac_save_CFLAGS=$CFLAGS
6528 pgac_save_CC=$CC
6529 CC=${CC}
6530 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6531 ac_save_c_werror_flag=$ac_c_werror_flag
6532 ac_c_werror_flag=yes
6533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6534 /* end confdefs.h. */
6535
6536 int
6537 main ()
6538 {
6539
6540 ;
6541 return 0;
6542 }
6543 _ACEOF
6544 if ac_fn_c_try_compile "$LINENO"; then :
6545 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=yes
6546 else
6547 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=no
6548 fi
6549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6550 ac_c_werror_flag=$ac_save_c_werror_flag
6551 CFLAGS="$pgac_save_CFLAGS"
6552 CC="$pgac_save_CC"
6553 fi
6554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&5
6555 $as_echo "$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&6; }
6556 if test x"$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" = x"yes"; then
6557 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6558 fi
6559
6560
6561 if test -n "$NOT_THE_CFLAGS"; then
6562 CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
6563 fi
6564 # Similarly disable useless truncation warnings from gcc 8+
6565 NOT_THE_CFLAGS=""
6566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6567 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6568 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6569 $as_echo_n "(cached) " >&6
6570 else
6571 pgac_save_CFLAGS=$CFLAGS
6572 pgac_save_CC=$CC
6573 CC=${CC}
6574 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6575 ac_save_c_werror_flag=$ac_c_werror_flag
6576 ac_c_werror_flag=yes
6577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6578 /* end confdefs.h. */
6579
6580 int
6581 main ()
6582 {
6583
6584 ;
6585 return 0;
6586 }
6587 _ACEOF
6588 if ac_fn_c_try_compile "$LINENO"; then :
6589 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6590 else
6591 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6592 fi
6593 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6594 ac_c_werror_flag=$ac_save_c_werror_flag
6595 CFLAGS="$pgac_save_CFLAGS"
6596 CC="$pgac_save_CC"
6597 fi
6598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6599 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6600 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6601 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6602 fi
6603
6604
6605 if test -n "$NOT_THE_CFLAGS"; then
6606 CFLAGS="$CFLAGS -Wno-format-truncation"
6607 fi
6608 NOT_THE_CFLAGS=""
6609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6610 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6611 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6612 $as_echo_n "(cached) " >&6
6613 else
6614 pgac_save_CFLAGS=$CFLAGS
6615 pgac_save_CC=$CC
6616 CC=${CC}
6617 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6618 ac_save_c_werror_flag=$ac_c_werror_flag
6619 ac_c_werror_flag=yes
6620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6621 /* end confdefs.h. */
6622
6623 int
6624 main ()
6625 {
6626
6627 ;
6628 return 0;
6629 }
6630 _ACEOF
6631 if ac_fn_c_try_compile "$LINENO"; then :
6632 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6633 else
6634 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6635 fi
6636 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6637 ac_c_werror_flag=$ac_save_c_werror_flag
6638 CFLAGS="$pgac_save_CFLAGS"
6639 CC="$pgac_save_CC"
6640 fi
6641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6642 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6643 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6644 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6645 fi
6646
6647
6648 if test -n "$NOT_THE_CFLAGS"; then
6649 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6650 fi
6651 # Suppress clang 16's strict warnings about function casts
6652 NOT_THE_CFLAGS=""
6653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS" >&5
6654 $as_echo_n "checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS... " >&6; }
6655 if ${pgac_cv_prog_CC_cflags__Wcast_function_type_strict+:} false; then :
6656 $as_echo_n "(cached) " >&6
6657 else
6658 pgac_save_CFLAGS=$CFLAGS
6659 pgac_save_CC=$CC
6660 CC=${CC}
6661 CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6662 ac_save_c_werror_flag=$ac_c_werror_flag
6663 ac_c_werror_flag=yes
6664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6665 /* end confdefs.h. */
6666
6667 int
6668 main ()
6669 {
6670
6671 ;
6672 return 0;
6673 }
6674 _ACEOF
6675 if ac_fn_c_try_compile "$LINENO"; then :
6676 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=yes
6677 else
6678 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=no
6679 fi
6680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6681 ac_c_werror_flag=$ac_save_c_werror_flag
6682 CFLAGS="$pgac_save_CFLAGS"
6683 CC="$pgac_save_CC"
6684 fi
6685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&5
6686 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&6; }
6687 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" = x"yes"; then
6688 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6689 fi
6690
6691
6692 if test -n "$NOT_THE_CFLAGS"; then
6693 CFLAGS="$CFLAGS -Wno-cast-function-type-strict"
6694 fi
6695 elif test "$ICC" = yes; then
6696 # Intel's compiler has a bug/misoptimization in checking for
6697 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6698
6699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6700 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6701 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6702 $as_echo_n "(cached) " >&6
6703 else
6704 pgac_save_CFLAGS=$CFLAGS
6705 pgac_save_CC=$CC
6706 CC=${CC}
6707 CFLAGS="${CFLAGS} -mp1"
6708 ac_save_c_werror_flag=$ac_c_werror_flag
6709 ac_c_werror_flag=yes
6710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6711 /* end confdefs.h. */
6712
6713 int
6714 main ()
6715 {
6716
6717 ;
6718 return 0;
6719 }
6720 _ACEOF
6721 if ac_fn_c_try_compile "$LINENO"; then :
6722 pgac_cv_prog_CC_cflags__mp1=yes
6723 else
6724 pgac_cv_prog_CC_cflags__mp1=no
6725 fi
6726 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6727 ac_c_werror_flag=$ac_save_c_werror_flag
6728 CFLAGS="$pgac_save_CFLAGS"
6729 CC="$pgac_save_CC"
6730 fi
6731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6732 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6733 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6734 CFLAGS="${CFLAGS} -mp1"
6735 fi
6736
6737
6738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6739 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6740 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6741 $as_echo_n "(cached) " >&6
6742 else
6743 pgac_save_CXXFLAGS=$CXXFLAGS
6744 pgac_save_CXX=$CXX
6745 CXX=${CXX}
6746 CXXFLAGS="${CXXFLAGS} -mp1"
6747 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6748 ac_cxx_werror_flag=yes
6749 ac_ext=cpp
6750 ac_cpp='$CXXCPP $CPPFLAGS'
6751 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6752 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6753 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6754
6755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6756 /* end confdefs.h. */
6757
6758 int
6759 main ()
6760 {
6761
6762 ;
6763 return 0;
6764 }
6765 _ACEOF
6766 if ac_fn_cxx_try_compile "$LINENO"; then :
6767 pgac_cv_prog_CXX_cxxflags__mp1=yes
6768 else
6769 pgac_cv_prog_CXX_cxxflags__mp1=no
6770 fi
6771 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6772 ac_ext=c
6773 ac_cpp='$CPP $CPPFLAGS'
6774 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6775 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6776 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6777
6778 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6779 CXXFLAGS="$pgac_save_CXXFLAGS"
6780 CXX="$pgac_save_CXX"
6781 fi
6782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6783 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6784 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6785 CXXFLAGS="${CXXFLAGS} -mp1"
6786 fi
6787
6788
6789 # Make sure strict aliasing is off (though this is said to be the default)
6790
6791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6792 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6793 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6794 $as_echo_n "(cached) " >&6
6795 else
6796 pgac_save_CFLAGS=$CFLAGS
6797 pgac_save_CC=$CC
6798 CC=${CC}
6799 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6800 ac_save_c_werror_flag=$ac_c_werror_flag
6801 ac_c_werror_flag=yes
6802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6803 /* end confdefs.h. */
6804
6805 int
6806 main ()
6807 {
6808
6809 ;
6810 return 0;
6811 }
6812 _ACEOF
6813 if ac_fn_c_try_compile "$LINENO"; then :
6814 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6815 else
6816 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6817 fi
6818 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6819 ac_c_werror_flag=$ac_save_c_werror_flag
6820 CFLAGS="$pgac_save_CFLAGS"
6821 CC="$pgac_save_CC"
6822 fi
6823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6824 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6825 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6826 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6827 fi
6828
6829
6830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6831 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6832 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6833 $as_echo_n "(cached) " >&6
6834 else
6835 pgac_save_CXXFLAGS=$CXXFLAGS
6836 pgac_save_CXX=$CXX
6837 CXX=${CXX}
6838 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6839 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6840 ac_cxx_werror_flag=yes
6841 ac_ext=cpp
6842 ac_cpp='$CXXCPP $CPPFLAGS'
6843 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6844 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6845 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6846
6847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6848 /* end confdefs.h. */
6849
6850 int
6851 main ()
6852 {
6853
6854 ;
6855 return 0;
6856 }
6857 _ACEOF
6858 if ac_fn_cxx_try_compile "$LINENO"; then :
6859 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6860 else
6861 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6862 fi
6863 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6864 ac_ext=c
6865 ac_cpp='$CPP $CPPFLAGS'
6866 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6867 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6868 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6869
6870 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6871 CXXFLAGS="$pgac_save_CXXFLAGS"
6872 CXX="$pgac_save_CXX"
6873 fi
6874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6875 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6876 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6877 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6878 fi
6879
6880
6881 fi
6882
6883 # If the compiler knows how to hide symbols, add the switch needed for that to
6884 # CFLAGS_SL_MODULE and define HAVE_VISIBILITY_ATTRIBUTE.
6885 #
6886 # This is done separately from the above because -fvisibility is supported by
6887 # quite a few different compilers, making the required repetition bothersome.
6888 #
6889 # We might need to add a separate test to check if
6890 # __attribute__((visibility("hidden"))) is supported, if we encounter a
6891 # compiler that supports one of the supported variants of -fvisibility=hidden
6892 # but uses a different syntax to mark a symbol as exported.
6893 if test "$GCC" = yes -o "$SUN_STUDIO_CC" = yes ; then
6894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE" >&5
6895 $as_echo_n "checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; }
6896 if ${pgac_cv_prog_CC_cflags__fvisibility_hidden+:} false; then :
6897 $as_echo_n "(cached) " >&6
6898 else
6899 pgac_save_CFLAGS=$CFLAGS
6900 pgac_save_CC=$CC
6901 CC=${CC}
6902 CFLAGS="${CFLAGS_SL_MODULE} -fvisibility=hidden"
6903 ac_save_c_werror_flag=$ac_c_werror_flag
6904 ac_c_werror_flag=yes
6905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6906 /* end confdefs.h. */
6907
6908 int
6909 main ()
6910 {
6911
6912 ;
6913 return 0;
6914 }
6915 _ACEOF
6916 if ac_fn_c_try_compile "$LINENO"; then :
6917 pgac_cv_prog_CC_cflags__fvisibility_hidden=yes
6918 else
6919 pgac_cv_prog_CC_cflags__fvisibility_hidden=no
6920 fi
6921 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6922 ac_c_werror_flag=$ac_save_c_werror_flag
6923 CFLAGS="$pgac_save_CFLAGS"
6924 CC="$pgac_save_CC"
6925 fi
6926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fvisibility_hidden" >&5
6927 $as_echo "$pgac_cv_prog_CC_cflags__fvisibility_hidden" >&6; }
6928 if test x"$pgac_cv_prog_CC_cflags__fvisibility_hidden" = x"yes"; then
6929 CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -fvisibility=hidden"
6930 fi
6931
6932
6933 # For C++ we additionally want -fvisibility-inlines-hidden
6934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5
6935 $as_echo_n "checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; }
6936 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_hidden+:} false; then :
6937 $as_echo_n "(cached) " >&6
6938 else
6939 pgac_save_CXXFLAGS=$CXXFLAGS
6940 pgac_save_CXX=$CXX
6941 CXX=${CXX}
6942 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
6943 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6944 ac_cxx_werror_flag=yes
6945 ac_ext=cpp
6946 ac_cpp='$CXXCPP $CPPFLAGS'
6947 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6948 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6949 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6950
6951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6952 /* end confdefs.h. */
6953
6954 int
6955 main ()
6956 {
6957
6958 ;
6959 return 0;
6960 }
6961 _ACEOF
6962 if ac_fn_cxx_try_compile "$LINENO"; then :
6963 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=yes
6964 else
6965 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=no
6966 fi
6967 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6968 ac_ext=c
6969 ac_cpp='$CPP $CPPFLAGS'
6970 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6971 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6972 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6973
6974 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6975 CXXFLAGS="$pgac_save_CXXFLAGS"
6976 CXX="$pgac_save_CXX"
6977 fi
6978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&5
6979 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&6; }
6980 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" = x"yes"; then
6981 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
6982 fi
6983
6984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE" >&5
6985 $as_echo_n "checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE... " >&6; }
6986 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden+:} false; then :
6987 $as_echo_n "(cached) " >&6
6988 else
6989 pgac_save_CXXFLAGS=$CXXFLAGS
6990 pgac_save_CXX=$CXX
6991 CXX=${CXX}
6992 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
6993 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6994 ac_cxx_werror_flag=yes
6995 ac_ext=cpp
6996 ac_cpp='$CXXCPP $CPPFLAGS'
6997 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6998 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6999 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7000
7001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7002 /* end confdefs.h. */
7003
7004 int
7005 main ()
7006 {
7007
7008 ;
7009 return 0;
7010 }
7011 _ACEOF
7012 if ac_fn_cxx_try_compile "$LINENO"; then :
7013 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=yes
7014 else
7015 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=no
7016 fi
7017 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7018 ac_ext=c
7019 ac_cpp='$CPP $CPPFLAGS'
7020 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7021 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7022 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7023
7024 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7025 CXXFLAGS="$pgac_save_CXXFLAGS"
7026 CXX="$pgac_save_CXX"
7027 fi
7028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&5
7029 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&6; }
7030 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" = x"yes"; then
7031 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
7032 fi
7033
7034 have_visibility_attribute=$pgac_cv_prog_CC_cflags__fvisibility_hidden
7035 fi
7036
7037 if test "$have_visibility_attribute" = "yes"; then
7038
7039 $as_echo "#define HAVE_VISIBILITY_ATTRIBUTE 1" >>confdefs.h
7040
7041 fi
7042
7043
7044
7045
7046
7047
7048 # Determine flags used to emit bitcode for JIT inlining.
7049 # 1. We must duplicate any behaviour-changing compiler flags used above,
7050 # to keep compatibility with the compiler used for normal Postgres code.
7051 # 2. We don't bother to duplicate extra-warnings switches --- seeing a
7052 # warning in the main build is enough.
7053 # 3. But we must duplicate -Wno-warning flags, else we'll see those anyway.
7054 if test "$with_llvm" = yes ; then
7055 CLANGXX="$CLANG -xc++"
7056
7057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
7058 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
7059 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
7060 $as_echo_n "(cached) " >&6
7061 else
7062 pgac_save_CFLAGS=$CFLAGS
7063 pgac_save_CC=$CC
7064 CC=${CLANG}
7065 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7066 ac_save_c_werror_flag=$ac_c_werror_flag
7067 ac_c_werror_flag=yes
7068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7069 /* end confdefs.h. */
7070
7071 int
7072 main ()
7073 {
7074
7075 ;
7076 return 0;
7077 }
7078 _ACEOF
7079 if ac_fn_c_try_compile "$LINENO"; then :
7080 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
7081 else
7082 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
7083 fi
7084 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7085 ac_c_werror_flag=$ac_save_c_werror_flag
7086 CFLAGS="$pgac_save_CFLAGS"
7087 CC="$pgac_save_CC"
7088 fi
7089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
7090 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
7091 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
7092 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7093 fi
7094
7095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
7096 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
7097 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
7098 $as_echo_n "(cached) " >&6
7099 else
7100 pgac_save_CXXFLAGS=$CXXFLAGS
7101 pgac_save_CXX=$CXX
7102 CXX=${CLANGXX}
7103 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7104 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7105 ac_cxx_werror_flag=yes
7106 ac_ext=cpp
7107 ac_cpp='$CXXCPP $CPPFLAGS'
7108 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7109 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7110 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7111
7112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7113 /* end confdefs.h. */
7114
7115 int
7116 main ()
7117 {
7118
7119 ;
7120 return 0;
7121 }
7122 _ACEOF
7123 if ac_fn_cxx_try_compile "$LINENO"; then :
7124 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
7125 else
7126 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
7127 fi
7128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7129 ac_ext=c
7130 ac_cpp='$CPP $CPPFLAGS'
7131 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7132 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7133 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7134
7135 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7136 CXXFLAGS="$pgac_save_CXXFLAGS"
7137 CXX="$pgac_save_CXX"
7138 fi
7139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
7140 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
7141 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
7142 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7143 fi
7144
7145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
7146 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
7147 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
7148 $as_echo_n "(cached) " >&6
7149 else
7150 pgac_save_CFLAGS=$CFLAGS
7151 pgac_save_CC=$CC
7152 CC=${CLANG}
7153 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7154 ac_save_c_werror_flag=$ac_c_werror_flag
7155 ac_c_werror_flag=yes
7156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7157 /* end confdefs.h. */
7158
7159 int
7160 main ()
7161 {
7162
7163 ;
7164 return 0;
7165 }
7166 _ACEOF
7167 if ac_fn_c_try_compile "$LINENO"; then :
7168 pgac_cv_prog_CLANG_cflags__fwrapv=yes
7169 else
7170 pgac_cv_prog_CLANG_cflags__fwrapv=no
7171 fi
7172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7173 ac_c_werror_flag=$ac_save_c_werror_flag
7174 CFLAGS="$pgac_save_CFLAGS"
7175 CC="$pgac_save_CC"
7176 fi
7177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
7178 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
7179 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
7180 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7181 fi
7182
7183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
7184 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
7185 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
7186 $as_echo_n "(cached) " >&6
7187 else
7188 pgac_save_CXXFLAGS=$CXXFLAGS
7189 pgac_save_CXX=$CXX
7190 CXX=${CLANGXX}
7191 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7192 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7193 ac_cxx_werror_flag=yes
7194 ac_ext=cpp
7195 ac_cpp='$CXXCPP $CPPFLAGS'
7196 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7197 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7198 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7199
7200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7201 /* end confdefs.h. */
7202
7203 int
7204 main ()
7205 {
7206
7207 ;
7208 return 0;
7209 }
7210 _ACEOF
7211 if ac_fn_cxx_try_compile "$LINENO"; then :
7212 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
7213 else
7214 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
7215 fi
7216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7217 ac_ext=c
7218 ac_cpp='$CPP $CPPFLAGS'
7219 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7220 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7221 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7222
7223 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7224 CXXFLAGS="$pgac_save_CXXFLAGS"
7225 CXX="$pgac_save_CXX"
7226 fi
7227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
7228 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
7229 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
7230 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7231 fi
7232
7233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
7234 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
7235 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
7236 $as_echo_n "(cached) " >&6
7237 else
7238 pgac_save_CFLAGS=$CFLAGS
7239 pgac_save_CC=$CC
7240 CC=${CLANG}
7241 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7242 ac_save_c_werror_flag=$ac_c_werror_flag
7243 ac_c_werror_flag=yes
7244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7245 /* end confdefs.h. */
7246
7247 int
7248 main ()
7249 {
7250
7251 ;
7252 return 0;
7253 }
7254 _ACEOF
7255 if ac_fn_c_try_compile "$LINENO"; then :
7256 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
7257 else
7258 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7259 fi
7260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7261 ac_c_werror_flag=$ac_save_c_werror_flag
7262 CFLAGS="$pgac_save_CFLAGS"
7263 CC="$pgac_save_CC"
7264 fi
7265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7266 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7267 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7268 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7269 fi
7270
7271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7272 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7273 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7274 $as_echo_n "(cached) " >&6
7275 else
7276 pgac_save_CXXFLAGS=$CXXFLAGS
7277 pgac_save_CXX=$CXX
7278 CXX=${CLANGXX}
7279 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7280 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7281 ac_cxx_werror_flag=yes
7282 ac_ext=cpp
7283 ac_cpp='$CXXCPP $CPPFLAGS'
7284 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7285 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7286 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7287
7288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7289 /* end confdefs.h. */
7290
7291 int
7292 main ()
7293 {
7294
7295 ;
7296 return 0;
7297 }
7298 _ACEOF
7299 if ac_fn_cxx_try_compile "$LINENO"; then :
7300 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7301 else
7302 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7303 fi
7304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7305 ac_ext=c
7306 ac_cpp='$CPP $CPPFLAGS'
7307 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7308 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7309 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7310
7311 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7312 CXXFLAGS="$pgac_save_CXXFLAGS"
7313 CXX="$pgac_save_CXX"
7314 fi
7315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7316 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7317 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7318 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7319 fi
7320
7321
7322 # Ideally bitcode should perhaps match $CC's use, or not, of outline atomic
7323 # functions, but for now we err on the side of suppressing them in bitcode,
7324 # because we can't assume they're available at runtime. This affects aarch64
7325 # builds using the basic armv8-a ISA without LSE support.
7326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -mno-outline-atomics, for BITCODE_CFLAGS" >&5
7327 $as_echo_n "checking whether ${CLANG} supports -mno-outline-atomics, for BITCODE_CFLAGS... " >&6; }
7328 if ${pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics+:} false; then :
7329 $as_echo_n "(cached) " >&6
7330 else
7331 pgac_save_CXXFLAGS=$CXXFLAGS
7332 pgac_save_CXX=$CXX
7333 CXX=${CLANG}
7334 CXXFLAGS="${BITCODE_CFLAGS} -mno-outline-atomics"
7335 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7336 ac_cxx_werror_flag=yes
7337 ac_ext=cpp
7338 ac_cpp='$CXXCPP $CPPFLAGS'
7339 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7340 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7341 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7342
7343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7344 /* end confdefs.h. */
7345
7346 int
7347 main ()
7348 {
7349
7350 ;
7351 return 0;
7352 }
7353 _ACEOF
7354 if ac_fn_cxx_try_compile "$LINENO"; then :
7355 pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics=yes
7356 else
7357 pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics=no
7358 fi
7359 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7360 ac_ext=c
7361 ac_cpp='$CPP $CPPFLAGS'
7362 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7363 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7364 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7365
7366 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7367 CXXFLAGS="$pgac_save_CXXFLAGS"
7368 CXX="$pgac_save_CXX"
7369 fi
7370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics" >&5
7371 $as_echo "$pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics" >&6; }
7372 if test x"$pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics" = x"yes"; then
7373 BITCODE_CFLAGS="${BITCODE_CFLAGS} -mno-outline-atomics"
7374 fi
7375
7376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -mno-outline-atomics, for BITCODE_CXXFLAGS" >&5
7377 $as_echo_n "checking whether ${CLANG} supports -mno-outline-atomics, for BITCODE_CXXFLAGS... " >&6; }
7378 if ${pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics+:} false; then :
7379 $as_echo_n "(cached) " >&6
7380 else
7381 pgac_save_CXXFLAGS=$CXXFLAGS
7382 pgac_save_CXX=$CXX
7383 CXX=${CLANG}
7384 CXXFLAGS="${BITCODE_CXXFLAGS} -mno-outline-atomics"
7385 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7386 ac_cxx_werror_flag=yes
7387 ac_ext=cpp
7388 ac_cpp='$CXXCPP $CPPFLAGS'
7389 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7390 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7391 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7392
7393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7394 /* end confdefs.h. */
7395
7396 int
7397 main ()
7398 {
7399
7400 ;
7401 return 0;
7402 }
7403 _ACEOF
7404 if ac_fn_cxx_try_compile "$LINENO"; then :
7405 pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics=yes
7406 else
7407 pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics=no
7408 fi
7409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7410 ac_ext=c
7411 ac_cpp='$CPP $CPPFLAGS'
7412 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7413 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7414 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7415
7416 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7417 CXXFLAGS="$pgac_save_CXXFLAGS"
7418 CXX="$pgac_save_CXX"
7419 fi
7420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics" >&5
7421 $as_echo "$pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics" >&6; }
7422 if test x"$pgac_cv_prog_CLANG_cxxflags__mno_outline_atomics" = x"yes"; then
7423 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -mno-outline-atomics"
7424 fi
7425
7426
7427 NOT_THE_CFLAGS=""
7428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
7429 $as_echo_n "checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
7430 if ${pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument+:} false; then :
7431 $as_echo_n "(cached) " >&6
7432 else
7433 pgac_save_CFLAGS=$CFLAGS
7434 pgac_save_CC=$CC
7435 CC=${CLANG}
7436 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7437 ac_save_c_werror_flag=$ac_c_werror_flag
7438 ac_c_werror_flag=yes
7439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7440 /* end confdefs.h. */
7441
7442 int
7443 main ()
7444 {
7445
7446 ;
7447 return 0;
7448 }
7449 _ACEOF
7450 if ac_fn_c_try_compile "$LINENO"; then :
7451 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=yes
7452 else
7453 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=no
7454 fi
7455 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7456 ac_c_werror_flag=$ac_save_c_werror_flag
7457 CFLAGS="$pgac_save_CFLAGS"
7458 CC="$pgac_save_CC"
7459 fi
7460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&5
7461 $as_echo "$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&6; }
7462 if test x"$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" = x"yes"; then
7463 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7464 fi
7465
7466 if test -n "$NOT_THE_CFLAGS"; then
7467 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-unused-command-line-argument"
7468 fi
7469 NOT_THE_CFLAGS=""
7470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
7471 $as_echo_n "checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
7472 if ${pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro+:} false; then :
7473 $as_echo_n "(cached) " >&6
7474 else
7475 pgac_save_CFLAGS=$CFLAGS
7476 pgac_save_CC=$CC
7477 CC=${CLANG}
7478 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7479 ac_save_c_werror_flag=$ac_c_werror_flag
7480 ac_c_werror_flag=yes
7481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7482 /* end confdefs.h. */
7483
7484 int
7485 main ()
7486 {
7487
7488 ;
7489 return 0;
7490 }
7491 _ACEOF
7492 if ac_fn_c_try_compile "$LINENO"; then :
7493 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=yes
7494 else
7495 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=no
7496 fi
7497 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7498 ac_c_werror_flag=$ac_save_c_werror_flag
7499 CFLAGS="$pgac_save_CFLAGS"
7500 CC="$pgac_save_CC"
7501 fi
7502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&5
7503 $as_echo "$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&6; }
7504 if test x"$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" = x"yes"; then
7505 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7506 fi
7507
7508 if test -n "$NOT_THE_CFLAGS"; then
7509 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
7510 fi
7511 NOT_THE_CFLAGS=""
7512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
7513 $as_echo_n "checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
7514 if ${pgac_cv_prog_CLANG_cflags__Wformat_truncation+:} false; then :
7515 $as_echo_n "(cached) " >&6
7516 else
7517 pgac_save_CFLAGS=$CFLAGS
7518 pgac_save_CC=$CC
7519 CC=${CLANG}
7520 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7521 ac_save_c_werror_flag=$ac_c_werror_flag
7522 ac_c_werror_flag=yes
7523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7524 /* end confdefs.h. */
7525
7526 int
7527 main ()
7528 {
7529
7530 ;
7531 return 0;
7532 }
7533 _ACEOF
7534 if ac_fn_c_try_compile "$LINENO"; then :
7535 pgac_cv_prog_CLANG_cflags__Wformat_truncation=yes
7536 else
7537 pgac_cv_prog_CLANG_cflags__Wformat_truncation=no
7538 fi
7539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7540 ac_c_werror_flag=$ac_save_c_werror_flag
7541 CFLAGS="$pgac_save_CFLAGS"
7542 CC="$pgac_save_CC"
7543 fi
7544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&5
7545 $as_echo "$pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&6; }
7546 if test x"$pgac_cv_prog_CLANG_cflags__Wformat_truncation" = x"yes"; then
7547 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7548 fi
7549
7550 if test -n "$NOT_THE_CFLAGS"; then
7551 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-format-truncation"
7552 fi
7553 NOT_THE_CFLAGS=""
7554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
7555 $as_echo_n "checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
7556 if ${pgac_cv_prog_CLANG_cflags__Wstringop_truncation+:} false; then :
7557 $as_echo_n "(cached) " >&6
7558 else
7559 pgac_save_CFLAGS=$CFLAGS
7560 pgac_save_CC=$CC
7561 CC=${CLANG}
7562 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7563 ac_save_c_werror_flag=$ac_c_werror_flag
7564 ac_c_werror_flag=yes
7565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7566 /* end confdefs.h. */
7567
7568 int
7569 main ()
7570 {
7571
7572 ;
7573 return 0;
7574 }
7575 _ACEOF
7576 if ac_fn_c_try_compile "$LINENO"; then :
7577 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=yes
7578 else
7579 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=no
7580 fi
7581 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7582 ac_c_werror_flag=$ac_save_c_werror_flag
7583 CFLAGS="$pgac_save_CFLAGS"
7584 CC="$pgac_save_CC"
7585 fi
7586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&5
7587 $as_echo "$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&6; }
7588 if test x"$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" = x"yes"; then
7589 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7590 fi
7591
7592 if test -n "$NOT_THE_CFLAGS"; then
7593 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-stringop-truncation"
7594 fi
7595 fi
7596
7597 # supply -g if --enable-debug
7598 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7599 CFLAGS="$CFLAGS -g"
7600 fi
7601
7602 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7603 CXXFLAGS="$CXXFLAGS -g"
7604 fi
7605
7606 # enable code coverage if --enable-coverage
7607 if test "$enable_coverage" = yes; then
7608 if test "$GCC" = yes; then
7609 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7610 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7611 else
7612 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7613 fi
7614 fi
7615
7616 # enable profiling if --enable-profiling
7617 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7618 if test "$GCC" = yes; then
7619
7620 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7621
7622 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7623 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7624 else
7625 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7626 fi
7627 fi
7628
7629 # On Solaris, we need these #defines to get POSIX-conforming versions
7630 # of many interfaces (sigwait, getpwuid_r, shmdt, ...).
7631 if test "$PORTNAME" = "solaris"; then
7632 CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L -D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS"
7633 fi
7634
7635 # We already have this in Makefile.win32, but configure needs it too
7636 if test "$PORTNAME" = "win32"; then
7637 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7638 fi
7639
7640 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7641 # user-specified flags (if any) at the end. This lets users override
7642 # the automatic additions.
7643 CFLAGS="$CFLAGS $user_CFLAGS"
7644 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7645 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7646 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7647
7648
7649
7650
7651 # The template file must set up CFLAGS_SL; we don't support user override
7652
7653
7654 # Check if the compiler still works with the final flag settings
7655 # (note, we're not checking that for CXX, which is optional)
7656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7657 $as_echo_n "checking whether the C compiler still works... " >&6; }
7658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7659 /* end confdefs.h. */
7660
7661 int
7662 main ()
7663 {
7664 return 0;
7665 ;
7666 return 0;
7667 }
7668 _ACEOF
7669 if ac_fn_c_try_link "$LINENO"; then :
7670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7671 $as_echo "yes" >&6; }
7672 else
7673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7674 $as_echo "no" >&6; }
7675 as_fn_error $? "cannot proceed" "$LINENO" 5
7676 fi
7677 rm -f core conftest.err conftest.$ac_objext \
7678 conftest$ac_exeext conftest.$ac_ext
7679
7680 # Defend against gcc -ffast-math
7681 if test "$GCC" = yes; then
7682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7683 /* end confdefs.h. */
7684
7685 int
7686 main ()
7687 {
7688 #ifdef __FAST_MATH__
7689 choke me
7690 #endif
7691 ;
7692 return 0;
7693 }
7694 _ACEOF
7695 if ac_fn_c_try_compile "$LINENO"; then :
7696
7697 else
7698 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7699 fi
7700 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7701 fi
7702
7703 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7704 # versions of clang do not understand -fexcess-precision=standard, the use of
7705 # x87 floating point operations leads to problems like isinf possibly returning
7706 # false for a value that is infinite when converted from the 80bit register to
7707 # the 8byte memory representation.
7708 #
7709 # Only perform the test if the compiler doesn't understand
7710 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7711 # automatically.
7712 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7714 /* end confdefs.h. */
7715
7716 int
7717 main ()
7718 {
7719
7720 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7721 choke me
7722 #endif
7723
7724 ;
7725 return 0;
7726 }
7727 _ACEOF
7728 if ac_fn_c_try_compile "$LINENO"; then :
7729
7730 else
7731 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7732 fi
7733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7734 fi
7735
7736 ac_ext=c
7737 ac_cpp='$CPP $CPPFLAGS'
7738 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7739 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7740 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7742 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7743 # On Suns, sometimes $CPP names a directory.
7744 if test -n "$CPP" && test -d "$CPP"; then
7745 CPP=
7746 fi
7747 if test -z "$CPP"; then
7748 if ${ac_cv_prog_CPP+:} false; then :
7749 $as_echo_n "(cached) " >&6
7750 else
7751 # Double quotes because CPP needs to be expanded
7752 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7753 do
7754 ac_preproc_ok=false
7755 for ac_c_preproc_warn_flag in '' yes
7756 do
7757 # Use a header file that comes with gcc, so configuring glibc
7758 # with a fresh cross-compiler works.
7759 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7760 # <limits.h> exists even on freestanding compilers.
7761 # On the NeXT, cc -E runs the code through the compiler's parser,
7762 # not just through cpp. "Syntax error" is here to catch this case.
7763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7764 /* end confdefs.h. */
7765 #ifdef __STDC__
7766 # include <limits.h>
7767 #else
7768 # include <assert.h>
7769 #endif
7770 Syntax error
7771 _ACEOF
7772 if ac_fn_c_try_cpp "$LINENO"; then :
7773
7774 else
7775 # Broken: fails on valid input.
7776 continue
7777 fi
7778 rm -f conftest.err conftest.i conftest.$ac_ext
7779
7780 # OK, works on sane cases. Now check whether nonexistent headers
7781 # can be detected and how.
7782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7783 /* end confdefs.h. */
7784 #include <ac_nonexistent.h>
7785 _ACEOF
7786 if ac_fn_c_try_cpp "$LINENO"; then :
7787 # Broken: success on invalid input.
7788 continue
7789 else
7790 # Passes both tests.
7791 ac_preproc_ok=:
7792 break
7793 fi
7794 rm -f conftest.err conftest.i conftest.$ac_ext
7795
7796 done
7797 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7798 rm -f conftest.i conftest.err conftest.$ac_ext
7799 if $ac_preproc_ok; then :
7800 break
7801 fi
7802
7803 done
7804 ac_cv_prog_CPP=$CPP
7805
7806 fi
7807 CPP=$ac_cv_prog_CPP
7808 else
7809 ac_cv_prog_CPP=$CPP
7810 fi
7811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7812 $as_echo "$CPP" >&6; }
7813 ac_preproc_ok=false
7814 for ac_c_preproc_warn_flag in '' yes
7815 do
7816 # Use a header file that comes with gcc, so configuring glibc
7817 # with a fresh cross-compiler works.
7818 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7819 # <limits.h> exists even on freestanding compilers.
7820 # On the NeXT, cc -E runs the code through the compiler's parser,
7821 # not just through cpp. "Syntax error" is here to catch this case.
7822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7823 /* end confdefs.h. */
7824 #ifdef __STDC__
7825 # include <limits.h>
7826 #else
7827 # include <assert.h>
7828 #endif
7829 Syntax error
7830 _ACEOF
7831 if ac_fn_c_try_cpp "$LINENO"; then :
7832
7833 else
7834 # Broken: fails on valid input.
7835 continue
7836 fi
7837 rm -f conftest.err conftest.i conftest.$ac_ext
7838
7839 # OK, works on sane cases. Now check whether nonexistent headers
7840 # can be detected and how.
7841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7842 /* end confdefs.h. */
7843 #include <ac_nonexistent.h>
7844 _ACEOF
7845 if ac_fn_c_try_cpp "$LINENO"; then :
7846 # Broken: success on invalid input.
7847 continue
7848 else
7849 # Passes both tests.
7850 ac_preproc_ok=:
7851 break
7852 fi
7853 rm -f conftest.err conftest.i conftest.$ac_ext
7854
7855 done
7856 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7857 rm -f conftest.i conftest.err conftest.$ac_ext
7858 if $ac_preproc_ok; then :
7859
7860 else
7861 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7862 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7863 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7864 See \`config.log' for more details" "$LINENO" 5; }
7865 fi
7866
7867 ac_ext=c
7868 ac_cpp='$CPP $CPPFLAGS'
7869 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7870 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7871 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7872
7873
7874
7875
7876 #
7877 # Set up TAS assembly code if needed; the template file has now had its
7878 # chance to request this.
7879 #
7880 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7881
7882
7883 if test "$need_tas" = yes ; then
7884 TAS=tas.o
7885 else
7886 TAS=""
7887 fi
7888
7889
7890
7891 cat >>confdefs.h <<_ACEOF
7892 #define DLSUFFIX "$DLSUFFIX"
7893 _ACEOF
7894
7895
7896 #
7897 # Set up pkg_config in case we need it below
7898 #
7899
7900
7901
7902
7903
7904
7905
7906 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7907 if test -n "$ac_tool_prefix"; then
7908 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7909 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7911 $as_echo_n "checking for $ac_word... " >&6; }
7912 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7913 $as_echo_n "(cached) " >&6
7914 else
7915 case $PKG_CONFIG in
7916 [\\/]* | ?:[\\/]*)
7917 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7918 ;;
7919 *)
7920 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7921 for as_dir in $PATH
7922 do
7923 IFS=$as_save_IFS
7924 test -z "$as_dir" && as_dir=.
7925 for ac_exec_ext in '' $ac_executable_extensions; do
7926 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7927 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7928 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7929 break 2
7930 fi
7931 done
7932 done
7933 IFS=$as_save_IFS
7934
7935 ;;
7936 esac
7937 fi
7938 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7939 if test -n "$PKG_CONFIG"; then
7940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7941 $as_echo "$PKG_CONFIG" >&6; }
7942 else
7943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7944 $as_echo "no" >&6; }
7945 fi
7946
7947
7948 fi
7949 if test -z "$ac_cv_path_PKG_CONFIG"; then
7950 ac_pt_PKG_CONFIG=$PKG_CONFIG
7951 # Extract the first word of "pkg-config", so it can be a program name with args.
7952 set dummy pkg-config; ac_word=$2
7953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7954 $as_echo_n "checking for $ac_word... " >&6; }
7955 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7956 $as_echo_n "(cached) " >&6
7957 else
7958 case $ac_pt_PKG_CONFIG in
7959 [\\/]* | ?:[\\/]*)
7960 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7961 ;;
7962 *)
7963 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7964 for as_dir in $PATH
7965 do
7966 IFS=$as_save_IFS
7967 test -z "$as_dir" && as_dir=.
7968 for ac_exec_ext in '' $ac_executable_extensions; do
7969 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7970 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7971 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7972 break 2
7973 fi
7974 done
7975 done
7976 IFS=$as_save_IFS
7977
7978 ;;
7979 esac
7980 fi
7981 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7982 if test -n "$ac_pt_PKG_CONFIG"; then
7983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7984 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7985 else
7986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7987 $as_echo "no" >&6; }
7988 fi
7989
7990 if test "x$ac_pt_PKG_CONFIG" = x; then
7991 PKG_CONFIG=""
7992 else
7993 case $cross_compiling:$ac_tool_warned in
7994 yes:)
7995 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7996 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7997 ac_tool_warned=yes ;;
7998 esac
7999 PKG_CONFIG=$ac_pt_PKG_CONFIG
8000 fi
8001 else
8002 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8003 fi
8004
8005 fi
8006 if test -n "$PKG_CONFIG"; then
8007 _pkg_min_version=0.9.0
8008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
8009 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
8010 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8012 $as_echo "yes" >&6; }
8013 else
8014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8015 $as_echo "no" >&6; }
8016 PKG_CONFIG=""
8017 fi
8018 fi
8019
8020 #
8021 # Automatic dependency tracking
8022 #
8023
8024
8025 # Check whether --enable-depend was given.
8026 if test "${enable_depend+set}" = set; then :
8027 enableval=$enable_depend;
8028 case $enableval in
8029 yes)
8030 autodepend=yes
8031 ;;
8032 no)
8033 :
8034 ;;
8035 *)
8036 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
8037 ;;
8038 esac
8039
8040 else
8041 enable_depend=no
8042
8043 fi
8044
8045
8046
8047
8048
8049 #
8050 # Enable assert checks
8051 #
8052
8053
8054 # Check whether --enable-cassert was given.
8055 if test "${enable_cassert+set}" = set; then :
8056 enableval=$enable_cassert;
8057 case $enableval in
8058 yes)
8059
8060 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
8061
8062 ;;
8063 no)
8064 :
8065 ;;
8066 *)
8067 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
8068 ;;
8069 esac
8070
8071 else
8072 enable_cassert=no
8073
8074 fi
8075
8076
8077
8078
8079 #
8080 # Include directories
8081 #
8082 ac_save_IFS=$IFS
8083 IFS="${IFS}${PATH_SEPARATOR}"
8084 # SRCH_INC comes from the template file
8085 for dir in $with_includes $SRCH_INC; do
8086 if test -d "$dir"; then
8087 INCLUDES="$INCLUDES -I$dir"
8088 else
8089 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
8090 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
8091 fi
8092 done
8093 IFS=$ac_save_IFS
8094
8095
8096 #
8097 # Library directories
8098 #
8099 ac_save_IFS=$IFS
8100 IFS="${IFS}${PATH_SEPARATOR}"
8101 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
8102 for dir in $LIBRARY_DIRS $SRCH_LIB; do
8103 if test -d "$dir"; then
8104 LIBDIRS="$LIBDIRS -L$dir"
8105 else
8106 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
8107 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
8108 fi
8109 done
8110 IFS=$ac_save_IFS
8111
8112 #
8113 # ICU
8114 #
8115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
8116 $as_echo_n "checking whether to build with ICU support... " >&6; }
8117
8118
8119
8120 # Check whether --with-icu was given.
8121 if test "${with_icu+set}" = set; then :
8122 withval=$with_icu;
8123 case $withval in
8124 yes)
8125
8126 $as_echo "#define USE_ICU 1" >>confdefs.h
8127
8128 ;;
8129 no)
8130 :
8131 ;;
8132 *)
8133 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
8134 ;;
8135 esac
8136
8137 else
8138 with_icu=yes
8139
8140 $as_echo "#define USE_ICU 1" >>confdefs.h
8141
8142 fi
8143
8144
8145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
8146 $as_echo "$with_icu" >&6; }
8147
8148
8149 if test "$with_icu" = yes; then
8150
8151 pkg_failed=no
8152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
8153 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
8154
8155 if test -n "$ICU_CFLAGS"; then
8156 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
8157 elif test -n "$PKG_CONFIG"; then
8158 if test -n "$PKG_CONFIG" && \
8159 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8160 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8161 ac_status=$?
8162 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8163 test $ac_status = 0; }; then
8164 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
8165 test "x$?" != "x0" && pkg_failed=yes
8166 else
8167 pkg_failed=yes
8168 fi
8169 else
8170 pkg_failed=untried
8171 fi
8172 if test -n "$ICU_LIBS"; then
8173 pkg_cv_ICU_LIBS="$ICU_LIBS"
8174 elif test -n "$PKG_CONFIG"; then
8175 if test -n "$PKG_CONFIG" && \
8176 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8177 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8178 ac_status=$?
8179 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8180 test $ac_status = 0; }; then
8181 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
8182 test "x$?" != "x0" && pkg_failed=yes
8183 else
8184 pkg_failed=yes
8185 fi
8186 else
8187 pkg_failed=untried
8188 fi
8189
8190
8191
8192 if test $pkg_failed = yes; then
8193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8194 $as_echo "no" >&6; }
8195
8196 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8197 _pkg_short_errors_supported=yes
8198 else
8199 _pkg_short_errors_supported=no
8200 fi
8201 if test $_pkg_short_errors_supported = yes; then
8202 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8203 else
8204 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8205 fi
8206 # Put the nasty error message in config.log where it belongs
8207 echo "$ICU_PKG_ERRORS" >&5
8208
8209 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
8210
8211 $ICU_PKG_ERRORS
8212
8213 Consider adjusting the PKG_CONFIG_PATH environment variable if you
8214 installed software in a non-standard prefix.
8215
8216 Alternatively, you may set the environment variables ICU_CFLAGS
8217 and ICU_LIBS to avoid the need to call pkg-config.
8218 See the pkg-config man page for more details." "$LINENO" 5
8219 elif test $pkg_failed = untried; then
8220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8221 $as_echo "no" >&6; }
8222 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8223 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8224 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
8225 is in your PATH or set the PKG_CONFIG environment variable to the full
8226 path to pkg-config.
8227
8228 Alternatively, you may set the environment variables ICU_CFLAGS
8229 and ICU_LIBS to avoid the need to call pkg-config.
8230 See the pkg-config man page for more details.
8231
8232 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
8233 See \`config.log' for more details" "$LINENO" 5; }
8234 else
8235 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
8236 ICU_LIBS=$pkg_cv_ICU_LIBS
8237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8238 $as_echo "yes" >&6; }
8239
8240 fi
8241 fi
8242
8243 #
8244 # Optionally build Tcl modules (PL/Tcl)
8245 #
8246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
8247 $as_echo_n "checking whether to build with Tcl... " >&6; }
8248
8249
8250
8251 # Check whether --with-tcl was given.
8252 if test "${with_tcl+set}" = set; then :
8253 withval=$with_tcl;
8254 case $withval in
8255 yes)
8256 :
8257 ;;
8258 no)
8259 :
8260 ;;
8261 *)
8262 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
8263 ;;
8264 esac
8265
8266 else
8267 with_tcl=no
8268
8269 fi
8270
8271
8272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
8273 $as_echo "$with_tcl" >&6; }
8274
8275
8276 # We see if the path to the Tcl/Tk configuration scripts is specified.
8277 # This will override the use of tclsh to find the paths to search.
8278
8279
8280
8281
8282 # Check whether --with-tclconfig was given.
8283 if test "${with_tclconfig+set}" = set; then :
8284 withval=$with_tclconfig;
8285 case $withval in
8286 yes)
8287 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8288 ;;
8289 no)
8290 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8291 ;;
8292 *)
8293
8294 ;;
8295 esac
8296
8297 fi
8298
8299
8300
8301 #
8302 # Optionally build Perl modules (PL/Perl)
8303 #
8304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
8305 $as_echo_n "checking whether to build Perl modules... " >&6; }
8306
8307
8308
8309 # Check whether --with-perl was given.
8310 if test "${with_perl+set}" = set; then :
8311 withval=$with_perl;
8312 case $withval in
8313 yes)
8314 :
8315 ;;
8316 no)
8317 :
8318 ;;
8319 *)
8320 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
8321 ;;
8322 esac
8323
8324 else
8325 with_perl=no
8326
8327 fi
8328
8329
8330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
8331 $as_echo "$with_perl" >&6; }
8332
8333
8334 #
8335 # Optionally build Python modules (PL/Python)
8336 #
8337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
8338 $as_echo_n "checking whether to build Python modules... " >&6; }
8339
8340
8341
8342 # Check whether --with-python was given.
8343 if test "${with_python+set}" = set; then :
8344 withval=$with_python;
8345 case $withval in
8346 yes)
8347 :
8348 ;;
8349 no)
8350 :
8351 ;;
8352 *)
8353 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
8354 ;;
8355 esac
8356
8357 else
8358 with_python=no
8359
8360 fi
8361
8362
8363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8364 $as_echo "$with_python" >&6; }
8365
8366
8367 #
8368 # GSSAPI
8369 #
8370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
8371 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
8372
8373
8374
8375 # Check whether --with-gssapi was given.
8376 if test "${with_gssapi+set}" = set; then :
8377 withval=$with_gssapi;
8378 case $withval in
8379 yes)
8380
8381
8382 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
8383
8384 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
8385
8386 ;;
8387 no)
8388 :
8389 ;;
8390 *)
8391 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
8392 ;;
8393 esac
8394
8395 else
8396 with_gssapi=no
8397
8398 fi
8399
8400
8401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
8402 $as_echo "$with_gssapi" >&6; }
8403
8404
8405
8406
8407
8408
8409 #
8410 # Kerberos configuration parameters
8411 #
8412
8413
8414
8415 # Check whether --with-krb-srvnam was given.
8416 if test "${with_krb_srvnam+set}" = set; then :
8417 withval=$with_krb_srvnam;
8418 case $withval in
8419 yes)
8420 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8421 ;;
8422 no)
8423 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8424 ;;
8425 *)
8426
8427 ;;
8428 esac
8429
8430 else
8431 with_krb_srvnam="postgres"
8432 fi
8433
8434
8435
8436
8437 cat >>confdefs.h <<_ACEOF
8438 #define PG_KRB_SRVNAM "$with_krb_srvnam"
8439 _ACEOF
8440
8441
8442
8443 #
8444 # PAM
8445 #
8446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
8447 $as_echo_n "checking whether to build with PAM support... " >&6; }
8448
8449
8450
8451 # Check whether --with-pam was given.
8452 if test "${with_pam+set}" = set; then :
8453 withval=$with_pam;
8454 case $withval in
8455 yes)
8456
8457 $as_echo "#define USE_PAM 1" >>confdefs.h
8458
8459 ;;
8460 no)
8461 :
8462 ;;
8463 *)
8464 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
8465 ;;
8466 esac
8467
8468 else
8469 with_pam=no
8470
8471 fi
8472
8473
8474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
8475 $as_echo "$with_pam" >&6; }
8476
8477
8478 #
8479 # BSD AUTH
8480 #
8481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
8482 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
8483
8484
8485
8486 # Check whether --with-bsd-auth was given.
8487 if test "${with_bsd_auth+set}" = set; then :
8488 withval=$with_bsd_auth;
8489 case $withval in
8490 yes)
8491
8492 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
8493
8494 ;;
8495 no)
8496 :
8497 ;;
8498 *)
8499 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8500 ;;
8501 esac
8502
8503 else
8504 with_bsd_auth=no
8505
8506 fi
8507
8508
8509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8510 $as_echo "$with_bsd_auth" >&6; }
8511
8512
8513 #
8514 # LDAP
8515 #
8516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8517 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8518
8519
8520
8521 # Check whether --with-ldap was given.
8522 if test "${with_ldap+set}" = set; then :
8523 withval=$with_ldap;
8524 case $withval in
8525 yes)
8526
8527 $as_echo "#define USE_LDAP 1" >>confdefs.h
8528
8529 ;;
8530 no)
8531 :
8532 ;;
8533 *)
8534 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8535 ;;
8536 esac
8537
8538 else
8539 with_ldap=no
8540
8541 fi
8542
8543
8544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8545 $as_echo "$with_ldap" >&6; }
8546
8547
8548
8549 #
8550 # Bonjour
8551 #
8552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8553 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8554
8555
8556
8557 # Check whether --with-bonjour was given.
8558 if test "${with_bonjour+set}" = set; then :
8559 withval=$with_bonjour;
8560 case $withval in
8561 yes)
8562
8563 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8564
8565 ;;
8566 no)
8567 :
8568 ;;
8569 *)
8570 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8571 ;;
8572 esac
8573
8574 else
8575 with_bonjour=no
8576
8577 fi
8578
8579
8580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8581 $as_echo "$with_bonjour" >&6; }
8582
8583
8584 #
8585 # SELinux
8586 #
8587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8588 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8589
8590
8591
8592 # Check whether --with-selinux was given.
8593 if test "${with_selinux+set}" = set; then :
8594 withval=$with_selinux;
8595 case $withval in
8596 yes)
8597 :
8598 ;;
8599 no)
8600 :
8601 ;;
8602 *)
8603 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8604 ;;
8605 esac
8606
8607 else
8608 with_selinux=no
8609
8610 fi
8611
8612
8613
8614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8615 $as_echo "$with_selinux" >&6; }
8616
8617 #
8618 # Systemd
8619 #
8620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8621 $as_echo_n "checking whether to build with systemd support... " >&6; }
8622
8623
8624
8625 # Check whether --with-systemd was given.
8626 if test "${with_systemd+set}" = set; then :
8627 withval=$with_systemd;
8628 case $withval in
8629 yes)
8630
8631 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8632
8633 ;;
8634 no)
8635 :
8636 ;;
8637 *)
8638 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8639 ;;
8640 esac
8641
8642 else
8643 with_systemd=no
8644
8645 fi
8646
8647
8648
8649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8650 $as_echo "$with_systemd" >&6; }
8651
8652 #
8653 # Readline
8654 #
8655
8656
8657
8658 # Check whether --with-readline was given.
8659 if test "${with_readline+set}" = set; then :
8660 withval=$with_readline;
8661 case $withval in
8662 yes)
8663 :
8664 ;;
8665 no)
8666 :
8667 ;;
8668 *)
8669 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8670 ;;
8671 esac
8672
8673 else
8674 with_readline=yes
8675
8676 fi
8677
8678
8679 # readline on MinGW has problems with backslashes in psql and other bugs.
8680 # This is particularly a problem with non-US code pages.
8681 # Therefore disable its use until we understand the cause. 2004-07-20
8682 if test "$PORTNAME" = "win32"; then
8683 if test "$with_readline" = yes; then
8684 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8685 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8686 with_readline=no
8687 fi
8688 fi
8689
8690
8691
8692 #
8693 # Prefer libedit
8694 #
8695
8696
8697
8698 # Check whether --with-libedit-preferred was given.
8699 if test "${with_libedit_preferred+set}" = set; then :
8700 withval=$with_libedit_preferred;
8701 case $withval in
8702 yes)
8703 :
8704 ;;
8705 no)
8706 :
8707 ;;
8708 *)
8709 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8710 ;;
8711 esac
8712
8713 else
8714 with_libedit_preferred=no
8715
8716 fi
8717
8718
8719
8720 #
8721 # liburing
8722 #
8723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with liburing support" >&5
8724 $as_echo_n "checking whether to build with liburing support... " >&6; }
8725
8726
8727
8728 # Check whether --with-liburing was given.
8729 if test "${with_liburing+set}" = set; then :
8730 withval=$with_liburing;
8731 case $withval in
8732 yes)
8733
8734 $as_echo "#define USE_LIBURING 1" >>confdefs.h
8735
8736 ;;
8737 no)
8738 :
8739 ;;
8740 *)
8741 as_fn_error $? "no argument expected for --with-liburing option" "$LINENO" 5
8742 ;;
8743 esac
8744
8745 else
8746 with_liburing=no
8747
8748 fi
8749
8750
8751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_liburing" >&5
8752 $as_echo "$with_liburing" >&6; }
8753
8754
8755 if test "$with_liburing" = yes; then
8756
8757 pkg_failed=no
8758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liburing" >&5
8759 $as_echo_n "checking for liburing... " >&6; }
8760
8761 if test -n "$LIBURING_CFLAGS"; then
8762 pkg_cv_LIBURING_CFLAGS="$LIBURING_CFLAGS"
8763 elif test -n "$PKG_CONFIG"; then
8764 if test -n "$PKG_CONFIG" && \
8765 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liburing\""; } >&5
8766 ($PKG_CONFIG --exists --print-errors "liburing") 2>&5
8767 ac_status=$?
8768 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8769 test $ac_status = 0; }; then
8770 pkg_cv_LIBURING_CFLAGS=`$PKG_CONFIG --cflags "liburing" 2>/dev/null`
8771 test "x$?" != "x0" && pkg_failed=yes
8772 else
8773 pkg_failed=yes
8774 fi
8775 else
8776 pkg_failed=untried
8777 fi
8778 if test -n "$LIBURING_LIBS"; then
8779 pkg_cv_LIBURING_LIBS="$LIBURING_LIBS"
8780 elif test -n "$PKG_CONFIG"; then
8781 if test -n "$PKG_CONFIG" && \
8782 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liburing\""; } >&5
8783 ($PKG_CONFIG --exists --print-errors "liburing") 2>&5
8784 ac_status=$?
8785 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8786 test $ac_status = 0; }; then
8787 pkg_cv_LIBURING_LIBS=`$PKG_CONFIG --libs "liburing" 2>/dev/null`
8788 test "x$?" != "x0" && pkg_failed=yes
8789 else
8790 pkg_failed=yes
8791 fi
8792 else
8793 pkg_failed=untried
8794 fi
8795
8796
8797
8798 if test $pkg_failed = yes; then
8799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8800 $as_echo "no" >&6; }
8801
8802 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8803 _pkg_short_errors_supported=yes
8804 else
8805 _pkg_short_errors_supported=no
8806 fi
8807 if test $_pkg_short_errors_supported = yes; then
8808 LIBURING_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liburing" 2>&1`
8809 else
8810 LIBURING_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liburing" 2>&1`
8811 fi
8812 # Put the nasty error message in config.log where it belongs
8813 echo "$LIBURING_PKG_ERRORS" >&5
8814
8815 as_fn_error $? "Package requirements (liburing) were not met:
8816
8817 $LIBURING_PKG_ERRORS
8818
8819 Consider adjusting the PKG_CONFIG_PATH environment variable if you
8820 installed software in a non-standard prefix.
8821
8822 Alternatively, you may set the environment variables LIBURING_CFLAGS
8823 and LIBURING_LIBS to avoid the need to call pkg-config.
8824 See the pkg-config man page for more details." "$LINENO" 5
8825 elif test $pkg_failed = untried; then
8826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8827 $as_echo "no" >&6; }
8828 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8829 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8830 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
8831 is in your PATH or set the PKG_CONFIG environment variable to the full
8832 path to pkg-config.
8833
8834 Alternatively, you may set the environment variables LIBURING_CFLAGS
8835 and LIBURING_LIBS to avoid the need to call pkg-config.
8836 See the pkg-config man page for more details.
8837
8838 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
8839 See \`config.log' for more details" "$LINENO" 5; }
8840 else
8841 LIBURING_CFLAGS=$pkg_cv_LIBURING_CFLAGS
8842 LIBURING_LIBS=$pkg_cv_LIBURING_LIBS
8843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8844 $as_echo "yes" >&6; }
8845
8846 fi
8847 fi
8848
8849 #
8850 # UUID library
8851 #
8852 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8853 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8854 # UUID library. More than one of these might be present on a given platform,
8855 # so we make the user say which one she wants.
8856 #
8857
8858
8859
8860 # Check whether --with-uuid was given.
8861 if test "${with_uuid+set}" = set; then :
8862 withval=$with_uuid;
8863 case $withval in
8864 yes)
8865 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8866 ;;
8867 no)
8868 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8869 ;;
8870 *)
8871
8872 ;;
8873 esac
8874
8875 fi
8876
8877
8878 if test x"$with_uuid" = x"" ; then
8879 with_uuid=no
8880 fi
8881
8882
8883
8884 # Check whether --with-ossp-uuid was given.
8885 if test "${with_ossp_uuid+set}" = set; then :
8886 withval=$with_ossp_uuid;
8887 case $withval in
8888 yes)
8889 :
8890 ;;
8891 no)
8892 :
8893 ;;
8894 *)
8895 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8896 ;;
8897 esac
8898
8899 else
8900 with_ossp_uuid=no
8901
8902 fi
8903
8904
8905 if test "$with_ossp_uuid" = yes ; then
8906 with_uuid=ossp
8907 fi
8908
8909 if test "$with_uuid" != no ; then
8910 if test "$with_uuid" = bsd ; then
8911
8912 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8913
8914 elif test "$with_uuid" = e2fs ; then
8915
8916 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8917
8918 elif test "$with_uuid" = ossp ; then
8919
8920 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8921
8922 else
8923 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8924 fi
8925 fi
8926
8927
8928
8929 #
8930 # libcurl
8931 #
8932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with libcurl support" >&5
8933 $as_echo_n "checking whether to build with libcurl support... " >&6; }
8934
8935
8936
8937 # Check whether --with-libcurl was given.
8938 if test "${with_libcurl+set}" = set; then :
8939 withval=$with_libcurl;
8940 case $withval in
8941 yes)
8942
8943 $as_echo "#define USE_LIBCURL 1" >>confdefs.h
8944
8945 ;;
8946 no)
8947 :
8948 ;;
8949 *)
8950 as_fn_error $? "no argument expected for --with-libcurl option" "$LINENO" 5
8951 ;;
8952 esac
8953
8954 else
8955 with_libcurl=no
8956
8957 fi
8958
8959
8960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libcurl" >&5
8961 $as_echo "$with_libcurl" >&6; }
8962
8963
8964 if test "$with_libcurl" = yes ; then
8965 # Check for libcurl 7.61.0 or higher (corresponding to RHEL8 and the ability
8966 # to explicitly set TLS 1.3 ciphersuites).
8967
8968 pkg_failed=no
8969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libcurl >= 7.61.0" >&5
8970 $as_echo_n "checking for libcurl >= 7.61.0... " >&6; }
8971
8972 if test -n "$LIBCURL_CFLAGS"; then
8973 pkg_cv_LIBCURL_CFLAGS="$LIBCURL_CFLAGS"
8974 elif test -n "$PKG_CONFIG"; then
8975 if test -n "$PKG_CONFIG" && \
8976 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl >= 7.61.0\""; } >&5
8977 ($PKG_CONFIG --exists --print-errors "libcurl >= 7.61.0") 2>&5
8978 ac_status=$?
8979 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8980 test $ac_status = 0; }; then
8981 pkg_cv_LIBCURL_CFLAGS=`$PKG_CONFIG --cflags "libcurl >= 7.61.0" 2>/dev/null`
8982 test "x$?" != "x0" && pkg_failed=yes
8983 else
8984 pkg_failed=yes
8985 fi
8986 else
8987 pkg_failed=untried
8988 fi
8989 if test -n "$LIBCURL_LIBS"; then
8990 pkg_cv_LIBCURL_LIBS="$LIBCURL_LIBS"
8991 elif test -n "$PKG_CONFIG"; then
8992 if test -n "$PKG_CONFIG" && \
8993 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcurl >= 7.61.0\""; } >&5
8994 ($PKG_CONFIG --exists --print-errors "libcurl >= 7.61.0") 2>&5
8995 ac_status=$?
8996 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8997 test $ac_status = 0; }; then
8998 pkg_cv_LIBCURL_LIBS=`$PKG_CONFIG --libs "libcurl >= 7.61.0" 2>/dev/null`
8999 test "x$?" != "x0" && pkg_failed=yes
9000 else
9001 pkg_failed=yes
9002 fi
9003 else
9004 pkg_failed=untried
9005 fi
9006
9007
9008
9009 if test $pkg_failed = yes; then
9010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9011 $as_echo "no" >&6; }
9012
9013 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9014 _pkg_short_errors_supported=yes
9015 else
9016 _pkg_short_errors_supported=no
9017 fi
9018 if test $_pkg_short_errors_supported = yes; then
9019 LIBCURL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libcurl >= 7.61.0" 2>&1`
9020 else
9021 LIBCURL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libcurl >= 7.61.0" 2>&1`
9022 fi
9023 # Put the nasty error message in config.log where it belongs
9024 echo "$LIBCURL_PKG_ERRORS" >&5
9025
9026 as_fn_error $? "Package requirements (libcurl >= 7.61.0) were not met:
9027
9028 $LIBCURL_PKG_ERRORS
9029
9030 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9031 installed software in a non-standard prefix.
9032
9033 Alternatively, you may set the environment variables LIBCURL_CFLAGS
9034 and LIBCURL_LIBS to avoid the need to call pkg-config.
9035 See the pkg-config man page for more details." "$LINENO" 5
9036 elif test $pkg_failed = untried; then
9037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9038 $as_echo "no" >&6; }
9039 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9040 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9041 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9042 is in your PATH or set the PKG_CONFIG environment variable to the full
9043 path to pkg-config.
9044
9045 Alternatively, you may set the environment variables LIBCURL_CFLAGS
9046 and LIBCURL_LIBS to avoid the need to call pkg-config.
9047 See the pkg-config man page for more details.
9048
9049 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9050 See \`config.log' for more details" "$LINENO" 5; }
9051 else
9052 LIBCURL_CFLAGS=$pkg_cv_LIBCURL_CFLAGS
9053 LIBCURL_LIBS=$pkg_cv_LIBCURL_LIBS
9054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9055 $as_echo "yes" >&6; }
9056
9057 fi
9058
9059 # Curl's flags are kept separate from the standard CPPFLAGS/LDFLAGS. We use
9060 # them only for libpq-oauth.
9061 LIBCURL_CPPFLAGS=
9062 LIBCURL_LDFLAGS=
9063
9064 # We only care about -I, -D, and -L switches. Note that -lcurl will be added
9065 # to LIBCURL_LDLIBS by PGAC_CHECK_LIBCURL, below.
9066 for pgac_option in $LIBCURL_CFLAGS; do
9067 case $pgac_option in
9068 -I*|-D*) LIBCURL_CPPFLAGS="$LIBCURL_CPPFLAGS $pgac_option";;
9069 esac
9070 done
9071 for pgac_option in $LIBCURL_LIBS; do
9072 case $pgac_option in
9073 -L*) LIBCURL_LDFLAGS="$LIBCURL_LDFLAGS $pgac_option";;
9074 esac
9075 done
9076
9077
9078
9079
9080 # OAuth requires python for testing
9081 if test "$with_python" != yes; then
9082 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** OAuth support tests require --with-python to run" >&5
9083 $as_echo "$as_me: WARNING: *** OAuth support tests require --with-python to run" >&2;}
9084 fi
9085 fi
9086
9087
9088 #
9089 # libnuma
9090 #
9091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with libnuma support" >&5
9092 $as_echo_n "checking whether to build with libnuma support... " >&6; }
9093
9094
9095
9096 # Check whether --with-libnuma was given.
9097 if test "${with_libnuma+set}" = set; then :
9098 withval=$with_libnuma;
9099 case $withval in
9100 yes)
9101
9102 $as_echo "#define USE_LIBNUMA 1" >>confdefs.h
9103
9104 ;;
9105 no)
9106 :
9107 ;;
9108 *)
9109 as_fn_error $? "no argument expected for --with-libnuma option" "$LINENO" 5
9110 ;;
9111 esac
9112
9113 else
9114 with_libnuma=no
9115
9116 fi
9117
9118
9119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libnuma" >&5
9120 $as_echo "$with_libnuma" >&6; }
9121
9122
9123 if test "$with_libnuma" = yes ; then
9124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for numa_available in -lnuma" >&5
9125 $as_echo_n "checking for numa_available in -lnuma... " >&6; }
9126 if ${ac_cv_lib_numa_numa_available+:} false; then :
9127 $as_echo_n "(cached) " >&6
9128 else
9129 ac_check_lib_save_LIBS=$LIBS
9130 LIBS="-lnuma $LIBS"
9131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9132 /* end confdefs.h. */
9133
9134 /* Override any GCC internal prototype to avoid an error.
9135 Use char because int might match the return type of a GCC
9136 builtin and then its argument prototype would still apply. */
9137 #ifdef __cplusplus
9138 extern "C"
9139 #endif
9140 char numa_available ();
9141 int
9142 main ()
9143 {
9144 return numa_available ();
9145 ;
9146 return 0;
9147 }
9148 _ACEOF
9149 if ac_fn_c_try_link "$LINENO"; then :
9150 ac_cv_lib_numa_numa_available=yes
9151 else
9152 ac_cv_lib_numa_numa_available=no
9153 fi
9154 rm -f core conftest.err conftest.$ac_objext \
9155 conftest$ac_exeext conftest.$ac_ext
9156 LIBS=$ac_check_lib_save_LIBS
9157 fi
9158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_numa_numa_available" >&5
9159 $as_echo "$ac_cv_lib_numa_numa_available" >&6; }
9160 if test "x$ac_cv_lib_numa_numa_available" = xyes; then :
9161 cat >>confdefs.h <<_ACEOF
9162 #define HAVE_LIBNUMA 1
9163 _ACEOF
9164
9165 LIBS="-lnuma $LIBS"
9166
9167 else
9168 as_fn_error $? "library 'libnuma' is required for NUMA support" "$LINENO" 5
9169 fi
9170
9171
9172 pkg_failed=no
9173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for numa" >&5
9174 $as_echo_n "checking for numa... " >&6; }
9175
9176 if test -n "$LIBNUMA_CFLAGS"; then
9177 pkg_cv_LIBNUMA_CFLAGS="$LIBNUMA_CFLAGS"
9178 elif test -n "$PKG_CONFIG"; then
9179 if test -n "$PKG_CONFIG" && \
9180 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"numa\""; } >&5
9181 ($PKG_CONFIG --exists --print-errors "numa") 2>&5
9182 ac_status=$?
9183 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9184 test $ac_status = 0; }; then
9185 pkg_cv_LIBNUMA_CFLAGS=`$PKG_CONFIG --cflags "numa" 2>/dev/null`
9186 test "x$?" != "x0" && pkg_failed=yes
9187 else
9188 pkg_failed=yes
9189 fi
9190 else
9191 pkg_failed=untried
9192 fi
9193 if test -n "$LIBNUMA_LIBS"; then
9194 pkg_cv_LIBNUMA_LIBS="$LIBNUMA_LIBS"
9195 elif test -n "$PKG_CONFIG"; then
9196 if test -n "$PKG_CONFIG" && \
9197 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"numa\""; } >&5
9198 ($PKG_CONFIG --exists --print-errors "numa") 2>&5
9199 ac_status=$?
9200 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9201 test $ac_status = 0; }; then
9202 pkg_cv_LIBNUMA_LIBS=`$PKG_CONFIG --libs "numa" 2>/dev/null`
9203 test "x$?" != "x0" && pkg_failed=yes
9204 else
9205 pkg_failed=yes
9206 fi
9207 else
9208 pkg_failed=untried
9209 fi
9210
9211
9212
9213 if test $pkg_failed = yes; then
9214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9215 $as_echo "no" >&6; }
9216
9217 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9218 _pkg_short_errors_supported=yes
9219 else
9220 _pkg_short_errors_supported=no
9221 fi
9222 if test $_pkg_short_errors_supported = yes; then
9223 LIBNUMA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "numa" 2>&1`
9224 else
9225 LIBNUMA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "numa" 2>&1`
9226 fi
9227 # Put the nasty error message in config.log where it belongs
9228 echo "$LIBNUMA_PKG_ERRORS" >&5
9229
9230 as_fn_error $? "Package requirements (numa) were not met:
9231
9232 $LIBNUMA_PKG_ERRORS
9233
9234 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9235 installed software in a non-standard prefix.
9236
9237 Alternatively, you may set the environment variables LIBNUMA_CFLAGS
9238 and LIBNUMA_LIBS to avoid the need to call pkg-config.
9239 See the pkg-config man page for more details." "$LINENO" 5
9240 elif test $pkg_failed = untried; then
9241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9242 $as_echo "no" >&6; }
9243 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9244 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9245 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9246 is in your PATH or set the PKG_CONFIG environment variable to the full
9247 path to pkg-config.
9248
9249 Alternatively, you may set the environment variables LIBNUMA_CFLAGS
9250 and LIBNUMA_LIBS to avoid the need to call pkg-config.
9251 See the pkg-config man page for more details.
9252
9253 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9254 See \`config.log' for more details" "$LINENO" 5; }
9255 else
9256 LIBNUMA_CFLAGS=$pkg_cv_LIBNUMA_CFLAGS
9257 LIBNUMA_LIBS=$pkg_cv_LIBNUMA_LIBS
9258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9259 $as_echo "yes" >&6; }
9260
9261 fi
9262 fi
9263
9264 #
9265 # XML
9266 #
9267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
9268 $as_echo_n "checking whether to build with XML support... " >&6; }
9269
9270
9271
9272 # Check whether --with-libxml was given.
9273 if test "${with_libxml+set}" = set; then :
9274 withval=$with_libxml;
9275 case $withval in
9276 yes)
9277
9278 $as_echo "#define USE_LIBXML 1" >>confdefs.h
9279
9280 ;;
9281 no)
9282 :
9283 ;;
9284 *)
9285 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
9286 ;;
9287 esac
9288
9289 else
9290 with_libxml=no
9291
9292 fi
9293
9294
9295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
9296 $as_echo "$with_libxml" >&6; }
9297
9298
9299 if test "$with_libxml" = yes ; then
9300 # Check pkg-config, then xml2-config. But for backwards compatibility,
9301 # setting XML2_CONFIG overrides pkg-config.
9302 have_libxml2_pkg_config=no
9303 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
9304
9305 pkg_failed=no
9306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
9307 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
9308
9309 if test -n "$XML2_CFLAGS"; then
9310 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
9311 elif test -n "$PKG_CONFIG"; then
9312 if test -n "$PKG_CONFIG" && \
9313 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
9314 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
9315 ac_status=$?
9316 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9317 test $ac_status = 0; }; then
9318 pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
9319 test "x$?" != "x0" && pkg_failed=yes
9320 else
9321 pkg_failed=yes
9322 fi
9323 else
9324 pkg_failed=untried
9325 fi
9326 if test -n "$XML2_LIBS"; then
9327 pkg_cv_XML2_LIBS="$XML2_LIBS"
9328 elif test -n "$PKG_CONFIG"; then
9329 if test -n "$PKG_CONFIG" && \
9330 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
9331 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
9332 ac_status=$?
9333 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9334 test $ac_status = 0; }; then
9335 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
9336 test "x$?" != "x0" && pkg_failed=yes
9337 else
9338 pkg_failed=yes
9339 fi
9340 else
9341 pkg_failed=untried
9342 fi
9343
9344
9345
9346 if test $pkg_failed = yes; then
9347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9348 $as_echo "no" >&6; }
9349
9350 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9351 _pkg_short_errors_supported=yes
9352 else
9353 _pkg_short_errors_supported=no
9354 fi
9355 if test $_pkg_short_errors_supported = yes; then
9356 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
9357 else
9358 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
9359 fi
9360 # Put the nasty error message in config.log where it belongs
9361 echo "$XML2_PKG_ERRORS" >&5
9362
9363 # do nothing
9364 elif test $pkg_failed = untried; then
9365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9366 $as_echo "no" >&6; }
9367 # do nothing
9368 else
9369 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
9370 XML2_LIBS=$pkg_cv_XML2_LIBS
9371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9372 $as_echo "yes" >&6; }
9373 have_libxml2_pkg_config=yes
9374 fi
9375 fi
9376 if test "$have_libxml2_pkg_config" = no ; then
9377 if test -z "$XML2_CONFIG"; then
9378 for ac_prog in xml2-config
9379 do
9380 # Extract the first word of "$ac_prog", so it can be a program name with args.
9381 set dummy $ac_prog; ac_word=$2
9382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9383 $as_echo_n "checking for $ac_word... " >&6; }
9384 if ${ac_cv_path_XML2_CONFIG+:} false; then :
9385 $as_echo_n "(cached) " >&6
9386 else
9387 case $XML2_CONFIG in
9388 [\\/]* | ?:[\\/]*)
9389 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
9390 ;;
9391 *)
9392 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9393 for as_dir in $PATH
9394 do
9395 IFS=$as_save_IFS
9396 test -z "$as_dir" && as_dir=.
9397 for ac_exec_ext in '' $ac_executable_extensions; do
9398 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9399 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9400 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9401 break 2
9402 fi
9403 done
9404 done
9405 IFS=$as_save_IFS
9406
9407 ;;
9408 esac
9409 fi
9410 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
9411 if test -n "$XML2_CONFIG"; then
9412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
9413 $as_echo "$XML2_CONFIG" >&6; }
9414 else
9415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9416 $as_echo "no" >&6; }
9417 fi
9418
9419
9420 test -n "$XML2_CONFIG" && break
9421 done
9422
9423 else
9424 # Report the value of XML2_CONFIG in configure's output in all cases.
9425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
9426 $as_echo_n "checking for XML2_CONFIG... " >&6; }
9427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
9428 $as_echo "$XML2_CONFIG" >&6; }
9429 fi
9430
9431 if test -n "$XML2_CONFIG"; then
9432 XML2_CFLAGS=`$XML2_CONFIG --cflags`
9433 XML2_LIBS=`$XML2_CONFIG --libs`
9434 fi
9435 fi
9436 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
9437 for pgac_option in $XML2_CFLAGS; do
9438 case $pgac_option in
9439 -I*|-D*) INCLUDES="$INCLUDES $pgac_option";;
9440 esac
9441 done
9442 for pgac_option in $XML2_LIBS; do
9443 case $pgac_option in
9444 -L*) LIBDIRS="$LIBDIRS $pgac_option";;
9445 esac
9446 done
9447 fi
9448
9449
9450 #
9451 # XSLT
9452 #
9453
9454
9455
9456 # Check whether --with-libxslt was given.
9457 if test "${with_libxslt+set}" = set; then :
9458 withval=$with_libxslt;
9459 case $withval in
9460 yes)
9461
9462 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
9463
9464 ;;
9465 no)
9466 :
9467 ;;
9468 *)
9469 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
9470 ;;
9471 esac
9472
9473 else
9474 with_libxslt=no
9475
9476 fi
9477
9478
9479
9480
9481
9482
9483 #
9484 # tzdata
9485 #
9486
9487
9488
9489 # Check whether --with-system-tzdata was given.
9490 if test "${with_system_tzdata+set}" = set; then :
9491 withval=$with_system_tzdata;
9492 case $withval in
9493 yes)
9494 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
9495 ;;
9496 no)
9497 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
9498 ;;
9499 *)
9500
9501 ;;
9502 esac
9503
9504 fi
9505
9506
9507
9508
9509 #
9510 # Zlib
9511 #
9512
9513
9514
9515 # Check whether --with-zlib was given.
9516 if test "${with_zlib+set}" = set; then :
9517 withval=$with_zlib;
9518 case $withval in
9519 yes)
9520 :
9521 ;;
9522 no)
9523 :
9524 ;;
9525 *)
9526 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
9527 ;;
9528 esac
9529
9530 else
9531 with_zlib=yes
9532
9533 fi
9534
9535
9536
9537
9538 #
9539 # LZ4
9540 #
9541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LZ4 support" >&5
9542 $as_echo_n "checking whether to build with LZ4 support... " >&6; }
9543
9544
9545
9546 # Check whether --with-lz4 was given.
9547 if test "${with_lz4+set}" = set; then :
9548 withval=$with_lz4;
9549 case $withval in
9550 yes)
9551
9552 $as_echo "#define USE_LZ4 1" >>confdefs.h
9553
9554 ;;
9555 no)
9556 :
9557 ;;
9558 *)
9559 as_fn_error $? "no argument expected for --with-lz4 option" "$LINENO" 5
9560 ;;
9561 esac
9562
9563 else
9564 with_lz4=no
9565
9566 fi
9567
9568
9569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lz4" >&5
9570 $as_echo "$with_lz4" >&6; }
9571
9572
9573 if test "$with_lz4" = yes; then
9574
9575 pkg_failed=no
9576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5
9577 $as_echo_n "checking for liblz4... " >&6; }
9578
9579 if test -n "$LZ4_CFLAGS"; then
9580 pkg_cv_LZ4_CFLAGS="$LZ4_CFLAGS"
9581 elif test -n "$PKG_CONFIG"; then
9582 if test -n "$PKG_CONFIG" && \
9583 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9584 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9585 ac_status=$?
9586 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9587 test $ac_status = 0; }; then
9588 pkg_cv_LZ4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`
9589 test "x$?" != "x0" && pkg_failed=yes
9590 else
9591 pkg_failed=yes
9592 fi
9593 else
9594 pkg_failed=untried
9595 fi
9596 if test -n "$LZ4_LIBS"; then
9597 pkg_cv_LZ4_LIBS="$LZ4_LIBS"
9598 elif test -n "$PKG_CONFIG"; then
9599 if test -n "$PKG_CONFIG" && \
9600 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9601 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9602 ac_status=$?
9603 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9604 test $ac_status = 0; }; then
9605 pkg_cv_LZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`
9606 test "x$?" != "x0" && pkg_failed=yes
9607 else
9608 pkg_failed=yes
9609 fi
9610 else
9611 pkg_failed=untried
9612 fi
9613
9614
9615
9616 if test $pkg_failed = yes; then
9617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9618 $as_echo "no" >&6; }
9619
9620 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9621 _pkg_short_errors_supported=yes
9622 else
9623 _pkg_short_errors_supported=no
9624 fi
9625 if test $_pkg_short_errors_supported = yes; then
9626 LZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`
9627 else
9628 LZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`
9629 fi
9630 # Put the nasty error message in config.log where it belongs
9631 echo "$LZ4_PKG_ERRORS" >&5
9632
9633 as_fn_error $? "Package requirements (liblz4) were not met:
9634
9635 $LZ4_PKG_ERRORS
9636
9637 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9638 installed software in a non-standard prefix.
9639
9640 Alternatively, you may set the environment variables LZ4_CFLAGS
9641 and LZ4_LIBS to avoid the need to call pkg-config.
9642 See the pkg-config man page for more details." "$LINENO" 5
9643 elif test $pkg_failed = untried; then
9644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9645 $as_echo "no" >&6; }
9646 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9647 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9648 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9649 is in your PATH or set the PKG_CONFIG environment variable to the full
9650 path to pkg-config.
9651
9652 Alternatively, you may set the environment variables LZ4_CFLAGS
9653 and LZ4_LIBS to avoid the need to call pkg-config.
9654 See the pkg-config man page for more details.
9655
9656 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9657 See \`config.log' for more details" "$LINENO" 5; }
9658 else
9659 LZ4_CFLAGS=$pkg_cv_LZ4_CFLAGS
9660 LZ4_LIBS=$pkg_cv_LZ4_LIBS
9661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9662 $as_echo "yes" >&6; }
9663
9664 fi
9665 # We only care about -I, -D, and -L switches;
9666 # note that -llz4 will be added by AC_CHECK_LIB below.
9667 for pgac_option in $LZ4_CFLAGS; do
9668 case $pgac_option in
9669 -I*|-D*) INCLUDES="$INCLUDES $pgac_option";;
9670 esac
9671 done
9672 for pgac_option in $LZ4_LIBS; do
9673 case $pgac_option in
9674 -L*) LIBDIRS="$LIBDIRS $pgac_option";;
9675 esac
9676 done
9677 fi
9678
9679 #
9680 # ZSTD
9681 #
9682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ZSTD support" >&5
9683 $as_echo_n "checking whether to build with ZSTD support... " >&6; }
9684
9685
9686
9687 # Check whether --with-zstd was given.
9688 if test "${with_zstd+set}" = set; then :
9689 withval=$with_zstd;
9690 case $withval in
9691 yes)
9692
9693 $as_echo "#define USE_ZSTD 1" >>confdefs.h
9694
9695 ;;
9696 no)
9697 :
9698 ;;
9699 *)
9700 as_fn_error $? "no argument expected for --with-zstd option" "$LINENO" 5
9701 ;;
9702 esac
9703
9704 else
9705 with_zstd=no
9706
9707 fi
9708
9709
9710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_zstd" >&5
9711 $as_echo "$with_zstd" >&6; }
9712
9713
9714 if test "$with_zstd" = yes; then
9715
9716 pkg_failed=no
9717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd >= 1.4.0" >&5
9718 $as_echo_n "checking for libzstd >= 1.4.0... " >&6; }
9719
9720 if test -n "$ZSTD_CFLAGS"; then
9721 pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"
9722 elif test -n "$PKG_CONFIG"; then
9723 if test -n "$PKG_CONFIG" && \
9724 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9725 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9726 ac_status=$?
9727 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9728 test $ac_status = 0; }; then
9729 pkg_cv_ZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd >= 1.4.0" 2>/dev/null`
9730 test "x$?" != "x0" && pkg_failed=yes
9731 else
9732 pkg_failed=yes
9733 fi
9734 else
9735 pkg_failed=untried
9736 fi
9737 if test -n "$ZSTD_LIBS"; then
9738 pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"
9739 elif test -n "$PKG_CONFIG"; then
9740 if test -n "$PKG_CONFIG" && \
9741 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9742 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9743 ac_status=$?
9744 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9745 test $ac_status = 0; }; then
9746 pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd >= 1.4.0" 2>/dev/null`
9747 test "x$?" != "x0" && pkg_failed=yes
9748 else
9749 pkg_failed=yes
9750 fi
9751 else
9752 pkg_failed=untried
9753 fi
9754
9755
9756
9757 if test $pkg_failed = yes; then
9758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9759 $as_echo "no" >&6; }
9760
9761 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9762 _pkg_short_errors_supported=yes
9763 else
9764 _pkg_short_errors_supported=no
9765 fi
9766 if test $_pkg_short_errors_supported = yes; then
9767 ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9768 else
9769 ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9770 fi
9771 # Put the nasty error message in config.log where it belongs
9772 echo "$ZSTD_PKG_ERRORS" >&5
9773
9774 as_fn_error $? "Package requirements (libzstd >= 1.4.0) were not met:
9775
9776 $ZSTD_PKG_ERRORS
9777
9778 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9779 installed software in a non-standard prefix.
9780
9781 Alternatively, you may set the environment variables ZSTD_CFLAGS
9782 and ZSTD_LIBS to avoid the need to call pkg-config.
9783 See the pkg-config man page for more details." "$LINENO" 5
9784 elif test $pkg_failed = untried; then
9785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9786 $as_echo "no" >&6; }
9787 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9788 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9789 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9790 is in your PATH or set the PKG_CONFIG environment variable to the full
9791 path to pkg-config.
9792
9793 Alternatively, you may set the environment variables ZSTD_CFLAGS
9794 and ZSTD_LIBS to avoid the need to call pkg-config.
9795 See the pkg-config man page for more details.
9796
9797 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9798 See \`config.log' for more details" "$LINENO" 5; }
9799 else
9800 ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS
9801 ZSTD_LIBS=$pkg_cv_ZSTD_LIBS
9802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9803 $as_echo "yes" >&6; }
9804
9805 fi
9806 # We only care about -I, -D, and -L switches;
9807 # note that -lzstd will be added by AC_CHECK_LIB below.
9808 for pgac_option in $ZSTD_CFLAGS; do
9809 case $pgac_option in
9810 -I*|-D*) INCLUDES="$INCLUDES $pgac_option";;
9811 esac
9812 done
9813 for pgac_option in $ZSTD_LIBS; do
9814 case $pgac_option in
9815 -L*) LIBDIRS="$LIBDIRS $pgac_option";;
9816 esac
9817 done
9818 fi
9819 #
9820 # Assignments
9821 #
9822
9823 CPPFLAGS="$CPPFLAGS $INCLUDES"
9824 LDFLAGS="$LDFLAGS $LIBDIRS"
9825
9826
9827
9828
9829
9830 if test -n "$ac_tool_prefix"; then
9831 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9832 set dummy ${ac_tool_prefix}strip; ac_word=$2
9833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9834 $as_echo_n "checking for $ac_word... " >&6; }
9835 if ${ac_cv_prog_STRIP+:} false; then :
9836 $as_echo_n "(cached) " >&6
9837 else
9838 if test -n "$STRIP"; then
9839 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9840 else
9841 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9842 for as_dir in $PATH
9843 do
9844 IFS=$as_save_IFS
9845 test -z "$as_dir" && as_dir=.
9846 for ac_exec_ext in '' $ac_executable_extensions; do
9847 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9848 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9849 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9850 break 2
9851 fi
9852 done
9853 done
9854 IFS=$as_save_IFS
9855
9856 fi
9857 fi
9858 STRIP=$ac_cv_prog_STRIP
9859 if test -n "$STRIP"; then
9860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9861 $as_echo "$STRIP" >&6; }
9862 else
9863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9864 $as_echo "no" >&6; }
9865 fi
9866
9867
9868 fi
9869 if test -z "$ac_cv_prog_STRIP"; then
9870 ac_ct_STRIP=$STRIP
9871 # Extract the first word of "strip", so it can be a program name with args.
9872 set dummy strip; ac_word=$2
9873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9874 $as_echo_n "checking for $ac_word... " >&6; }
9875 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
9876 $as_echo_n "(cached) " >&6
9877 else
9878 if test -n "$ac_ct_STRIP"; then
9879 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9880 else
9881 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9882 for as_dir in $PATH
9883 do
9884 IFS=$as_save_IFS
9885 test -z "$as_dir" && as_dir=.
9886 for ac_exec_ext in '' $ac_executable_extensions; do
9887 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9888 ac_cv_prog_ac_ct_STRIP="strip"
9889 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9890 break 2
9891 fi
9892 done
9893 done
9894 IFS=$as_save_IFS
9895
9896 fi
9897 fi
9898 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9899 if test -n "$ac_ct_STRIP"; then
9900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9901 $as_echo "$ac_ct_STRIP" >&6; }
9902 else
9903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9904 $as_echo "no" >&6; }
9905 fi
9906
9907 if test "x$ac_ct_STRIP" = x; then
9908 STRIP=":"
9909 else
9910 case $cross_compiling:$ac_tool_warned in
9911 yes:)
9912 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9913 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9914 ac_tool_warned=yes ;;
9915 esac
9916 STRIP=$ac_ct_STRIP
9917 fi
9918 else
9919 STRIP="$ac_cv_prog_STRIP"
9920 fi
9921
9922
9923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9924 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9925 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9926 STRIP_STATIC_LIB="$STRIP --strip-unneeded"
9927 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9929 $as_echo "yes" >&6; }
9930 else
9931 case $host_os in
9932 darwin*)
9933 STRIP="$STRIP -x"
9934 STRIP_STATIC_LIB=$STRIP
9935 STRIP_SHARED_LIB=$STRIP
9936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9937 $as_echo "yes" >&6; }
9938 ;;
9939 *)
9940 STRIP_STATIC_LIB=:
9941 STRIP_SHARED_LIB=:
9942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9943 $as_echo "no" >&6; }
9944 ;;
9945 esac
9946 fi
9947
9948
9949
9950 if test -n "$ac_tool_prefix"; then
9951 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9952 set dummy ${ac_tool_prefix}ar; ac_word=$2
9953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9954 $as_echo_n "checking for $ac_word... " >&6; }
9955 if ${ac_cv_prog_AR+:} false; then :
9956 $as_echo_n "(cached) " >&6
9957 else
9958 if test -n "$AR"; then
9959 ac_cv_prog_AR="$AR" # Let the user override the test.
9960 else
9961 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9962 for as_dir in $PATH
9963 do
9964 IFS=$as_save_IFS
9965 test -z "$as_dir" && as_dir=.
9966 for ac_exec_ext in '' $ac_executable_extensions; do
9967 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9968 ac_cv_prog_AR="${ac_tool_prefix}ar"
9969 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9970 break 2
9971 fi
9972 done
9973 done
9974 IFS=$as_save_IFS
9975
9976 fi
9977 fi
9978 AR=$ac_cv_prog_AR
9979 if test -n "$AR"; then
9980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9981 $as_echo "$AR" >&6; }
9982 else
9983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9984 $as_echo "no" >&6; }
9985 fi
9986
9987
9988 fi
9989 if test -z "$ac_cv_prog_AR"; then
9990 ac_ct_AR=$AR
9991 # Extract the first word of "ar", so it can be a program name with args.
9992 set dummy ar; ac_word=$2
9993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9994 $as_echo_n "checking for $ac_word... " >&6; }
9995 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9996 $as_echo_n "(cached) " >&6
9997 else
9998 if test -n "$ac_ct_AR"; then
9999 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
10000 else
10001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10002 for as_dir in $PATH
10003 do
10004 IFS=$as_save_IFS
10005 test -z "$as_dir" && as_dir=.
10006 for ac_exec_ext in '' $ac_executable_extensions; do
10007 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10008 ac_cv_prog_ac_ct_AR="ar"
10009 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10010 break 2
10011 fi
10012 done
10013 done
10014 IFS=$as_save_IFS
10015
10016 fi
10017 fi
10018 ac_ct_AR=$ac_cv_prog_ac_ct_AR
10019 if test -n "$ac_ct_AR"; then
10020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
10021 $as_echo "$ac_ct_AR" >&6; }
10022 else
10023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10024 $as_echo "no" >&6; }
10025 fi
10026
10027 if test "x$ac_ct_AR" = x; then
10028 AR="ar"
10029 else
10030 case $cross_compiling:$ac_tool_warned in
10031 yes:)
10032 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10033 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10034 ac_tool_warned=yes ;;
10035 esac
10036 AR=$ac_ct_AR
10037 fi
10038 else
10039 AR="$ac_cv_prog_AR"
10040 fi
10041
10042 if test "$PORTNAME" = "win32"; then
10043 if test -n "$ac_tool_prefix"; then
10044 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
10045 set dummy ${ac_tool_prefix}windres; ac_word=$2
10046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10047 $as_echo_n "checking for $ac_word... " >&6; }
10048 if ${ac_cv_prog_WINDRES+:} false; then :
10049 $as_echo_n "(cached) " >&6
10050 else
10051 if test -n "$WINDRES"; then
10052 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
10053 else
10054 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10055 for as_dir in $PATH
10056 do
10057 IFS=$as_save_IFS
10058 test -z "$as_dir" && as_dir=.
10059 for ac_exec_ext in '' $ac_executable_extensions; do
10060 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10061 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
10062 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10063 break 2
10064 fi
10065 done
10066 done
10067 IFS=$as_save_IFS
10068
10069 fi
10070 fi
10071 WINDRES=$ac_cv_prog_WINDRES
10072 if test -n "$WINDRES"; then
10073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
10074 $as_echo "$WINDRES" >&6; }
10075 else
10076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10077 $as_echo "no" >&6; }
10078 fi
10079
10080
10081 fi
10082 if test -z "$ac_cv_prog_WINDRES"; then
10083 ac_ct_WINDRES=$WINDRES
10084 # Extract the first word of "windres", so it can be a program name with args.
10085 set dummy windres; ac_word=$2
10086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10087 $as_echo_n "checking for $ac_word... " >&6; }
10088 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
10089 $as_echo_n "(cached) " >&6
10090 else
10091 if test -n "$ac_ct_WINDRES"; then
10092 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
10093 else
10094 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10095 for as_dir in $PATH
10096 do
10097 IFS=$as_save_IFS
10098 test -z "$as_dir" && as_dir=.
10099 for ac_exec_ext in '' $ac_executable_extensions; do
10100 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10101 ac_cv_prog_ac_ct_WINDRES="windres"
10102 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10103 break 2
10104 fi
10105 done
10106 done
10107 IFS=$as_save_IFS
10108
10109 fi
10110 fi
10111 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
10112 if test -n "$ac_ct_WINDRES"; then
10113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
10114 $as_echo "$ac_ct_WINDRES" >&6; }
10115 else
10116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10117 $as_echo "no" >&6; }
10118 fi
10119
10120 if test "x$ac_ct_WINDRES" = x; then
10121 WINDRES="windres"
10122 else
10123 case $cross_compiling:$ac_tool_warned in
10124 yes:)
10125 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10126 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10127 ac_tool_warned=yes ;;
10128 esac
10129 WINDRES=$ac_ct_WINDRES
10130 fi
10131 else
10132 WINDRES="$ac_cv_prog_WINDRES"
10133 fi
10134
10135 fi
10136
10137 # Find a good install program. We prefer a C program (faster),
10138 # so one script is as good as another. But avoid the broken or
10139 # incompatible versions:
10140 # SysV /etc/install, /usr/sbin/install
10141 # SunOS /usr/etc/install
10142 # IRIX /sbin/install
10143 # AIX /bin/install
10144 # AmigaOS /C/install, which installs bootblocks on floppy discs
10145 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
10146 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
10147 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
10148 # OS/2's system install, which has a completely different semantic
10149 # ./install, which can be erroneously created by make from ./install.sh.
10150 # Reject install programs that cannot install multiple files.
10151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
10152 $as_echo_n "checking for a BSD-compatible install... " >&6; }
10153 if test -z "$INSTALL"; then
10154 if ${ac_cv_path_install+:} false; then :
10155 $as_echo_n "(cached) " >&6
10156 else
10157 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10158 for as_dir in $PATH
10159 do
10160 IFS=$as_save_IFS
10161 test -z "$as_dir" && as_dir=.
10162 # Account for people who put trailing slashes in PATH elements.
10163 case $as_dir/ in #((
10164 ./ | .// | /[cC]/* | \
10165 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
10166 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
10167 /usr/ucb/* ) ;;
10168 *)
10169 # OSF1 and SCO ODT 3.0 have their own names for install.
10170 # Don't use installbsd from OSF since it installs stuff as root
10171 # by default.
10172 for ac_prog in ginstall scoinst install; do
10173 for ac_exec_ext in '' $ac_executable_extensions; do
10174 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
10175 if test $ac_prog = install &&
10176 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
10177 # AIX install. It has an incompatible calling convention.
10178 :
10179 elif test $ac_prog = install &&
10180 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
10181 # program-specific install script used by HP pwplus--don't use.
10182 :
10183 else
10184 rm -rf conftest.one conftest.two conftest.dir
10185 echo one > conftest.one
10186 echo two > conftest.two
10187 mkdir conftest.dir
10188 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
10189 test -s conftest.one && test -s conftest.two &&
10190 test -s conftest.dir/conftest.one &&
10191 test -s conftest.dir/conftest.two
10192 then
10193 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
10194 break 3
10195 fi
10196 fi
10197 fi
10198 done
10199 done
10200 ;;
10201 esac
10202
10203 done
10204 IFS=$as_save_IFS
10205
10206 rm -rf conftest.one conftest.two conftest.dir
10207
10208 fi
10209 if test "${ac_cv_path_install+set}" = set; then
10210 INSTALL=$ac_cv_path_install
10211 else
10212 # As a last resort, use the slow shell script. Don't cache a
10213 # value for INSTALL within a source directory, because that will
10214 # break other packages using the cache if that directory is
10215 # removed, or if the value is a relative name.
10216 INSTALL=$ac_install_sh
10217 fi
10218 fi
10219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
10220 $as_echo "$INSTALL" >&6; }
10221
10222 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
10223 # It thinks the first close brace ends the variable substitution.
10224 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
10225
10226 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
10227
10228 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
10229
10230 # When Autoconf chooses install-sh as install program it tries to generate
10231 # a relative path to it in each makefile where it substitutes it. This clashes
10232 # with our Makefile.global concept. This workaround helps.
10233 case $INSTALL in
10234 *install-sh*) install_bin='';;
10235 *) install_bin=$INSTALL;;
10236 esac
10237
10238
10239 if test -z "$TAR"; then
10240 for ac_prog in tar
10241 do
10242 # Extract the first word of "$ac_prog", so it can be a program name with args.
10243 set dummy $ac_prog; ac_word=$2
10244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10245 $as_echo_n "checking for $ac_word... " >&6; }
10246 if ${ac_cv_path_TAR+:} false; then :
10247 $as_echo_n "(cached) " >&6
10248 else
10249 case $TAR in
10250 [\\/]* | ?:[\\/]*)
10251 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10252 ;;
10253 *)
10254 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10255 for as_dir in $PATH
10256 do
10257 IFS=$as_save_IFS
10258 test -z "$as_dir" && as_dir=.
10259 for ac_exec_ext in '' $ac_executable_extensions; do
10260 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10261 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10262 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10263 break 2
10264 fi
10265 done
10266 done
10267 IFS=$as_save_IFS
10268
10269 ;;
10270 esac
10271 fi
10272 TAR=$ac_cv_path_TAR
10273 if test -n "$TAR"; then
10274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10275 $as_echo "$TAR" >&6; }
10276 else
10277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10278 $as_echo "no" >&6; }
10279 fi
10280
10281
10282 test -n "$TAR" && break
10283 done
10284
10285 else
10286 # Report the value of TAR in configure's output in all cases.
10287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10288 $as_echo_n "checking for TAR... " >&6; }
10289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10290 $as_echo "$TAR" >&6; }
10291 fi
10292
10293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
10294 $as_echo_n "checking whether ln -s works... " >&6; }
10295 LN_S=$as_ln_s
10296 if test "$LN_S" = "ln -s"; then
10297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10298 $as_echo "yes" >&6; }
10299 else
10300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
10301 $as_echo "no, using $LN_S" >&6; }
10302 fi
10303
10304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
10305 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
10306 if test -z "$MKDIR_P"; then
10307 if ${ac_cv_path_mkdir+:} false; then :
10308 $as_echo_n "(cached) " >&6
10309 else
10310 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10311 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
10312 do
10313 IFS=$as_save_IFS
10314 test -z "$as_dir" && as_dir=.
10315 for ac_prog in mkdir gmkdir; do
10316 for ac_exec_ext in '' $ac_executable_extensions; do
10317 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
10318 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
10319 'mkdir (GNU coreutils) '* | \
10320 'mkdir (coreutils) '* | \
10321 'mkdir (fileutils) '4.1*)
10322 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
10323 break 3;;
10324 esac
10325 done
10326 done
10327 done
10328 IFS=$as_save_IFS
10329
10330 fi
10331
10332 test -d ./--version && rmdir ./--version
10333 if test "${ac_cv_path_mkdir+set}" = set; then
10334 MKDIR_P="$ac_cv_path_mkdir -p"
10335 else
10336 # As a last resort, use the slow shell script. Don't cache a
10337 # value for MKDIR_P within a source directory, because that will
10338 # break other packages using the cache if that directory is
10339 # removed, or if the value is a relative name.
10340 MKDIR_P="$ac_install_sh -d"
10341 fi
10342 fi
10343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
10344 $as_echo "$MKDIR_P" >&6; }
10345
10346 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
10347 # a relative path to it in each makefile where it substitutes it. This clashes
10348 # with our Makefile.global concept. This workaround helps.
10349 case $MKDIR_P in
10350 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
10351 esac
10352
10353 if test -z "$BISON"; then
10354 for ac_prog in bison
10355 do
10356 # Extract the first word of "$ac_prog", so it can be a program name with args.
10357 set dummy $ac_prog; ac_word=$2
10358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10359 $as_echo_n "checking for $ac_word... " >&6; }
10360 if ${ac_cv_path_BISON+:} false; then :
10361 $as_echo_n "(cached) " >&6
10362 else
10363 case $BISON in
10364 [\\/]* | ?:[\\/]*)
10365 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
10366 ;;
10367 *)
10368 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10369 for as_dir in $PATH
10370 do
10371 IFS=$as_save_IFS
10372 test -z "$as_dir" && as_dir=.
10373 for ac_exec_ext in '' $ac_executable_extensions; do
10374 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10375 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
10376 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10377 break 2
10378 fi
10379 done
10380 done
10381 IFS=$as_save_IFS
10382
10383 ;;
10384 esac
10385 fi
10386 BISON=$ac_cv_path_BISON
10387 if test -n "$BISON"; then
10388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
10389 $as_echo "$BISON" >&6; }
10390 else
10391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10392 $as_echo "no" >&6; }
10393 fi
10394
10395
10396 test -n "$BISON" && break
10397 done
10398
10399 else
10400 # Report the value of BISON in configure's output in all cases.
10401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
10402 $as_echo_n "checking for BISON... " >&6; }
10403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
10404 $as_echo "$BISON" >&6; }
10405 fi
10406
10407
10408 if test "$BISON"; then
10409 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
10410 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
10411 $as_echo "$as_me: using $pgac_bison_version" >&6;}
10412 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 2.3) exit 0; else exit 1;}'
10413 then
10414 as_fn_error $? "
10415 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
10416 *** Bison version 2.3 or later is required, but this is $pgac_bison_version." "$LINENO" 5
10417 fi
10418 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
10419 # of the now preferred %name-prefix "base_yy", but the latter
10420 # doesn't work with Bison 2.3 or less. So for now we silence the
10421 # deprecation warnings.
10422 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
10423 then
10424 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
10425 fi
10426 fi
10427
10428 if test -z "$BISON"; then
10429 as_fn_error $? "bison not found" "$LINENO" 5
10430 fi
10431
10432
10433 if test -z "$FLEX"; then
10434 for ac_prog in flex
10435 do
10436 # Extract the first word of "$ac_prog", so it can be a program name with args.
10437 set dummy $ac_prog; ac_word=$2
10438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10439 $as_echo_n "checking for $ac_word... " >&6; }
10440 if ${ac_cv_path_FLEX+:} false; then :
10441 $as_echo_n "(cached) " >&6
10442 else
10443 case $FLEX in
10444 [\\/]* | ?:[\\/]*)
10445 ac_cv_path_FLEX="$FLEX" # Let the user override the test with a path.
10446 ;;
10447 *)
10448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10449 for as_dir in $PATH
10450 do
10451 IFS=$as_save_IFS
10452 test -z "$as_dir" && as_dir=.
10453 for ac_exec_ext in '' $ac_executable_extensions; do
10454 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10455 ac_cv_path_FLEX="$as_dir/$ac_word$ac_exec_ext"
10456 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10457 break 2
10458 fi
10459 done
10460 done
10461 IFS=$as_save_IFS
10462
10463 ;;
10464 esac
10465 fi
10466 FLEX=$ac_cv_path_FLEX
10467 if test -n "$FLEX"; then
10468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLEX" >&5
10469 $as_echo "$FLEX" >&6; }
10470 else
10471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10472 $as_echo "no" >&6; }
10473 fi
10474
10475
10476 test -n "$FLEX" && break
10477 done
10478
10479 else
10480 # Report the value of FLEX in configure's output in all cases.
10481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLEX" >&5
10482 $as_echo_n "checking for FLEX... " >&6; }
10483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLEX" >&5
10484 $as_echo "$FLEX" >&6; }
10485 fi
10486
10487 if test -z "$FLEX"; then
10488 as_fn_error $? "flex not found" "$LINENO" 5
10489 fi
10490
10491 pgac_flex_version=`$FLEX --version 2>/dev/null`
10492 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
10493 $as_echo "$as_me: using $pgac_flex_version" >&6;}
10494
10495
10496
10497
10498
10499 if test -z "$PERL"; then
10500 for ac_prog in perl
10501 do
10502 # Extract the first word of "$ac_prog", so it can be a program name with args.
10503 set dummy $ac_prog; ac_word=$2
10504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10505 $as_echo_n "checking for $ac_word... " >&6; }
10506 if ${ac_cv_path_PERL+:} false; then :
10507 $as_echo_n "(cached) " >&6
10508 else
10509 case $PERL in
10510 [\\/]* | ?:[\\/]*)
10511 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
10512 ;;
10513 *)
10514 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10515 for as_dir in $PATH
10516 do
10517 IFS=$as_save_IFS
10518 test -z "$as_dir" && as_dir=.
10519 for ac_exec_ext in '' $ac_executable_extensions; do
10520 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10521 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
10522 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10523 break 2
10524 fi
10525 done
10526 done
10527 IFS=$as_save_IFS
10528
10529 ;;
10530 esac
10531 fi
10532 PERL=$ac_cv_path_PERL
10533 if test -n "$PERL"; then
10534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10535 $as_echo "$PERL" >&6; }
10536 else
10537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10538 $as_echo "no" >&6; }
10539 fi
10540
10541
10542 test -n "$PERL" && break
10543 done
10544
10545 else
10546 # Report the value of PERL in configure's output in all cases.
10547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
10548 $as_echo_n "checking for PERL... " >&6; }
10549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10550 $as_echo "$PERL" >&6; }
10551 fi
10552
10553
10554 if test "$PERL"; then
10555 pgac_perl_version=`$PERL -v 2>/dev/null | sed -n 's/This is perl.*v[a-z ]*\([0-9]\.[0-9][0-9.]*\).*$/\1/p'`
10556 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
10557 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
10558 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
10559 $AWK '{ if ($1 == 5 && ($2 >= 14)) exit 1; else exit 0;}'
10560 then
10561 as_fn_error $? "
10562 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10563 *** Perl version 5.14 or later is required, but this is $pgac_perl_version." "$LINENO" 5
10564 fi
10565 fi
10566
10567 if test -z "$PERL"; then
10568 as_fn_error $? "Perl not found" "$LINENO" 5
10569 fi
10570
10571 if test "$with_perl" = yes; then
10572 if test -z "$PERL"; then
10573 as_fn_error $? "Perl not found" "$LINENO" 5
10574 fi
10575
10576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
10577 $as_echo_n "checking for Perl archlibexp... " >&6; }
10578 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
10579 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
10580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
10581 $as_echo "$perl_archlibexp" >&6; }
10582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
10583 $as_echo_n "checking for Perl privlibexp... " >&6; }
10584 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
10585 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
10586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
10587 $as_echo "$perl_privlibexp" >&6; }
10588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
10589 $as_echo_n "checking for Perl useshrplib... " >&6; }
10590 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
10591 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
10592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
10593 $as_echo "$perl_useshrplib" >&6; }
10594 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
10595 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
10596 You might have to rebuild your Perl installation. Refer to the
10597 documentation for details. Use --without-perl to disable building
10598 PL/Perl." "$LINENO" 5
10599 fi
10600 # On most platforms, archlibexp is also where the Perl include files live ...
10601 perl_includespec="-I$perl_archlibexp/CORE"
10602 # ... but on newer macOS versions, we must use -iwithsysroot to look
10603 # under $PG_SYSROOT
10604 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
10605 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
10606 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
10607 fi
10608 fi
10609
10610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
10611 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
10612 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
10613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
10614 $as_echo "$perl_ccflags" >&6; }
10615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
10616 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
10617 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
10618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
10619 $as_echo "$perl_embed_ccflags" >&6; }
10620
10621
10622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
10623 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
10624 if test "$PORTNAME" = "win32" ; then
10625 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
10626 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
10627 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10628 else
10629 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
10630 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
10631 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10632 fi
10633 fi
10634 else
10635 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
10636 pgac_tmp2=`$PERL -MConfig -e 'print "$Config{ccdlflags} $Config{ldflags}"'`
10637 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%"`
10638 fi
10639 if test -z "$perl_embed_ldflags" ; then
10640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10641 $as_echo "no" >&6; }
10642 as_fn_error $? "could not determine flags for linking embedded Perl.
10643 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
10644 installed." "$LINENO" 5
10645 else
10646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
10647 $as_echo "$perl_embed_ldflags" >&6; }
10648 fi
10649
10650 fi
10651
10652 if test "$with_python" = yes; then
10653 if test -z "$PYTHON"; then
10654 for ac_prog in python3 python
10655 do
10656 # Extract the first word of "$ac_prog", so it can be a program name with args.
10657 set dummy $ac_prog; ac_word=$2
10658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10659 $as_echo_n "checking for $ac_word... " >&6; }
10660 if ${ac_cv_path_PYTHON+:} false; then :
10661 $as_echo_n "(cached) " >&6
10662 else
10663 case $PYTHON in
10664 [\\/]* | ?:[\\/]*)
10665 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10666 ;;
10667 *)
10668 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10669 for as_dir in $PATH
10670 do
10671 IFS=$as_save_IFS
10672 test -z "$as_dir" && as_dir=.
10673 for ac_exec_ext in '' $ac_executable_extensions; do
10674 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10675 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
10676 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10677 break 2
10678 fi
10679 done
10680 done
10681 IFS=$as_save_IFS
10682
10683 ;;
10684 esac
10685 fi
10686 PYTHON=$ac_cv_path_PYTHON
10687 if test -n "$PYTHON"; then
10688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10689 $as_echo "$PYTHON" >&6; }
10690 else
10691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10692 $as_echo "no" >&6; }
10693 fi
10694
10695
10696 test -n "$PYTHON" && break
10697 done
10698
10699 else
10700 # Report the value of PYTHON in configure's output in all cases.
10701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10702 $as_echo_n "checking for PYTHON... " >&6; }
10703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10704 $as_echo "$PYTHON" >&6; }
10705 fi
10706
10707 if test x"$PYTHON" = x""; then
10708 as_fn_error $? "Python not found" "$LINENO" 5
10709 fi
10710
10711
10712 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10713 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10714 $as_echo "$as_me: using python $python_fullversion" >&6;}
10715 # python_fullversion is typically n.n.n plus some trailing junk
10716 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10717 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10718 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10719 # Reject unsupported Python versions as soon as practical.
10720 if test "$python_majorversion" -lt 3; then
10721 as_fn_error $? "Python version $python_version is too old (version 3 or later is required)" "$LINENO" 5
10722 fi
10723
10724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python sysconfig module" >&5
10725 $as_echo_n "checking for Python sysconfig module... " >&6; }
10726 if "${PYTHON}" -c 'import sysconfig' 2>&5
10727 then
10728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10729 $as_echo "yes" >&6; }
10730 else
10731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10732 $as_echo "no" >&6; }
10733 as_fn_error $? "sysconfig module not found" "$LINENO" 5
10734 fi
10735
10736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10737 $as_echo_n "checking Python configuration directory... " >&6; }
10738 python_configdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBPL'))))"`
10739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10740 $as_echo "$python_configdir" >&6; }
10741
10742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directory" >&5
10743 $as_echo_n "checking Python include directory... " >&6; }
10744 python_includespec=`${PYTHON} -c "import sysconfig; print('-I' + sysconfig.get_config_var('INCLUDEPY'))"`
10745 if test "$PORTNAME" = win32 ; then
10746 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10747 fi
10748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10749 $as_echo "$python_includespec" >&6; }
10750
10751
10752
10753 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10754 $as_echo_n "checking how to link an embedded Python application... " >&6; }
10755
10756 python_libdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBDIR'))))"`
10757 python_ldlibrary=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDLIBRARY'))))"`
10758
10759 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
10760 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10761 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10762 then
10763 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10764 found_shlib=1
10765 else
10766 # Otherwise, guess the base name of the shlib.
10767 # LDVERSION was added in Python 3.2, before that use VERSION,
10768 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10769 python_ldversion=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDVERSION'))))"`
10770 if test x"${python_ldversion}" != x""; then
10771 ldlibrary="python${python_ldversion}"
10772 else
10773 python_version_var=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('VERSION'))))"`
10774 if test x"${python_version_var}" != x""; then
10775 ldlibrary="python${python_version_var}"
10776 else
10777 ldlibrary="python${python_version}"
10778 fi
10779 fi
10780 # Search for a likely-looking file.
10781 found_shlib=0
10782 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10783 do
10784 if test -e "$d/lib${ldlibrary}${DLSUFFIX}"; then
10785 python_libdir="$d"
10786 found_shlib=1
10787 break 2
10788 fi
10789 done
10790 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10791 # (".so.n.n") as well. However, check this only after failing to find
10792 # ".so" anywhere, because yet other platforms (Debian) put the .so
10793 # symlink in a different directory from the underlying versioned shlib.
10794 if test "$found_shlib" != 1; then
10795 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10796 do
10797 for f in "$d/lib${ldlibrary}.so."* ; do
10798 if test -e "$f"; then
10799 python_libdir="$d"
10800 found_shlib=1
10801 break 2
10802 fi
10803 done
10804 done
10805 fi
10806 # As usual, Windows has its own ideas. Possible default library
10807 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10808 # and the "lib" prefix might not be there.
10809 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10810 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10811 do
10812 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10813 if test -e "$f"; then
10814 python_libdir="$d"
10815 found_shlib=1
10816 break 2
10817 fi
10818 done
10819 done
10820 fi
10821 fi
10822 if test "$found_shlib" != 1; then
10823 as_fn_error $? "could not find shared library for Python
10824 You might have to rebuild your Python installation. Refer to the
10825 documentation for details. Use --without-python to disable building
10826 PL/Python." "$LINENO" 5
10827 fi
10828 python_libspec="-L${python_libdir} -l${ldlibrary}"
10829
10830 python_additional_libs=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10831
10832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10833 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10834
10835
10836
10837 fi
10838
10839 if test x"$cross_compiling" = x"yes" && test -z "$with_system_tzdata"; then
10840 if test -z "$ZIC"; then
10841 for ac_prog in zic
10842 do
10843 # Extract the first word of "$ac_prog", so it can be a program name with args.
10844 set dummy $ac_prog; ac_word=$2
10845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10846 $as_echo_n "checking for $ac_word... " >&6; }
10847 if ${ac_cv_path_ZIC+:} false; then :
10848 $as_echo_n "(cached) " >&6
10849 else
10850 case $ZIC in
10851 [\\/]* | ?:[\\/]*)
10852 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10853 ;;
10854 *)
10855 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10856 for as_dir in $PATH
10857 do
10858 IFS=$as_save_IFS
10859 test -z "$as_dir" && as_dir=.
10860 for ac_exec_ext in '' $ac_executable_extensions; do
10861 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10862 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10863 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10864 break 2
10865 fi
10866 done
10867 done
10868 IFS=$as_save_IFS
10869
10870 ;;
10871 esac
10872 fi
10873 ZIC=$ac_cv_path_ZIC
10874 if test -n "$ZIC"; then
10875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10876 $as_echo "$ZIC" >&6; }
10877 else
10878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10879 $as_echo "no" >&6; }
10880 fi
10881
10882
10883 test -n "$ZIC" && break
10884 done
10885
10886 else
10887 # Report the value of ZIC in configure's output in all cases.
10888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10889 $as_echo_n "checking for ZIC... " >&6; }
10890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10891 $as_echo "$ZIC" >&6; }
10892 fi
10893
10894 if test -z "$ZIC"; then
10895 as_fn_error $? "
10896 When cross-compiling, either use the option --with-system-tzdata to use
10897 existing time-zone data, or set the environment variable ZIC to a zic
10898 program to use during the build." "$LINENO" 5
10899 fi
10900 fi
10901
10902 #
10903 # Pthreads
10904 #
10905 # For each platform, we need to know about any special compile and link
10906 # libraries, and whether the normal C function names are thread-safe.
10907 # WIN32 doesn't need the pthread tests; it always uses threads
10908 #
10909 # These tests are run before the library-tests, because linking with the
10910 # other libraries can pull in the pthread functions as a side-effect. We
10911 # want to use the -pthread or similar flags directly, and not rely on
10912 # the side-effects of linking with some other library.
10913
10914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10915 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10916 if ${ac_cv_path_SED+:} false; then :
10917 $as_echo_n "(cached) " >&6
10918 else
10919 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10920 for ac_i in 1 2 3 4 5 6 7; do
10921 ac_script="$ac_script$as_nl$ac_script"
10922 done
10923 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10924 { ac_script=; unset ac_script;}
10925 if test -z "$SED"; then
10926 ac_path_SED_found=false
10927 # Loop through the user's path and test for each of PROGNAME-LIST
10928 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10929 for as_dir in $PATH
10930 do
10931 IFS=$as_save_IFS
10932 test -z "$as_dir" && as_dir=.
10933 for ac_prog in sed gsed; do
10934 for ac_exec_ext in '' $ac_executable_extensions; do
10935 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10936 as_fn_executable_p "$ac_path_SED" || continue
10937 # Check for GNU ac_path_SED and select it if it is found.
10938 # Check for GNU $ac_path_SED
10939 case `"$ac_path_SED" --version 2>&1` in
10940 *GNU*)
10941 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10942 *)
10943 ac_count=0
10944 $as_echo_n 0123456789 >"conftest.in"
10945 while :
10946 do
10947 cat "conftest.in" "conftest.in" >"conftest.tmp"
10948 mv "conftest.tmp" "conftest.in"
10949 cp "conftest.in" "conftest.nl"
10950 $as_echo '' >> "conftest.nl"
10951 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10952 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10953 as_fn_arith $ac_count + 1 && ac_count=$as_val
10954 if test $ac_count -gt ${ac_path_SED_max-0}; then
10955 # Best one so far, save it but keep looking for a better one
10956 ac_cv_path_SED="$ac_path_SED"
10957 ac_path_SED_max=$ac_count
10958 fi
10959 # 10*(2^10) chars as input seems more than enough
10960 test $ac_count -gt 10 && break
10961 done
10962 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10963 esac
10964
10965 $ac_path_SED_found && break 3
10966 done
10967 done
10968 done
10969 IFS=$as_save_IFS
10970 if test -z "$ac_cv_path_SED"; then
10971 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10972 fi
10973 else
10974 ac_cv_path_SED=$SED
10975 fi
10976
10977 fi
10978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10979 $as_echo "$ac_cv_path_SED" >&6; }
10980 SED="$ac_cv_path_SED"
10981 rm -f conftest.sed
10982
10983
10984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10985 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10986 if ${ac_cv_path_GREP+:} false; then :
10987 $as_echo_n "(cached) " >&6
10988 else
10989 if test -z "$GREP"; then
10990 ac_path_GREP_found=false
10991 # Loop through the user's path and test for each of PROGNAME-LIST
10992 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10993 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10994 do
10995 IFS=$as_save_IFS
10996 test -z "$as_dir" && as_dir=.
10997 for ac_prog in grep ggrep; do
10998 for ac_exec_ext in '' $ac_executable_extensions; do
10999 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11000 as_fn_executable_p "$ac_path_GREP" || continue
11001 # Check for GNU ac_path_GREP and select it if it is found.
11002 # Check for GNU $ac_path_GREP
11003 case `"$ac_path_GREP" --version 2>&1` in
11004 *GNU*)
11005 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11006 *)
11007 ac_count=0
11008 $as_echo_n 0123456789 >"conftest.in"
11009 while :
11010 do
11011 cat "conftest.in" "conftest.in" >"conftest.tmp"
11012 mv "conftest.tmp" "conftest.in"
11013 cp "conftest.in" "conftest.nl"
11014 $as_echo 'GREP' >> "conftest.nl"
11015 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11016 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11017 as_fn_arith $ac_count + 1 && ac_count=$as_val
11018 if test $ac_count -gt ${ac_path_GREP_max-0}; then
11019 # Best one so far, save it but keep looking for a better one
11020 ac_cv_path_GREP="$ac_path_GREP"
11021 ac_path_GREP_max=$ac_count
11022 fi
11023 # 10*(2^10) chars as input seems more than enough
11024 test $ac_count -gt 10 && break
11025 done
11026 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11027 esac
11028
11029 $ac_path_GREP_found && break 3
11030 done
11031 done
11032 done
11033 IFS=$as_save_IFS
11034 if test -z "$ac_cv_path_GREP"; then
11035 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11036 fi
11037 else
11038 ac_cv_path_GREP=$GREP
11039 fi
11040
11041 fi
11042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11043 $as_echo "$ac_cv_path_GREP" >&6; }
11044 GREP="$ac_cv_path_GREP"
11045
11046
11047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11048 $as_echo_n "checking for egrep... " >&6; }
11049 if ${ac_cv_path_EGREP+:} false; then :
11050 $as_echo_n "(cached) " >&6
11051 else
11052 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11053 then ac_cv_path_EGREP="$GREP -E"
11054 else
11055 if test -z "$EGREP"; then
11056 ac_path_EGREP_found=false
11057 # Loop through the user's path and test for each of PROGNAME-LIST
11058 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11059 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11060 do
11061 IFS=$as_save_IFS
11062 test -z "$as_dir" && as_dir=.
11063 for ac_prog in egrep; do
11064 for ac_exec_ext in '' $ac_executable_extensions; do
11065 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11066 as_fn_executable_p "$ac_path_EGREP" || continue
11067 # Check for GNU ac_path_EGREP and select it if it is found.
11068 # Check for GNU $ac_path_EGREP
11069 case `"$ac_path_EGREP" --version 2>&1` in
11070 *GNU*)
11071 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11072 *)
11073 ac_count=0
11074 $as_echo_n 0123456789 >"conftest.in"
11075 while :
11076 do
11077 cat "conftest.in" "conftest.in" >"conftest.tmp"
11078 mv "conftest.tmp" "conftest.in"
11079 cp "conftest.in" "conftest.nl"
11080 $as_echo 'EGREP' >> "conftest.nl"
11081 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11082 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11083 as_fn_arith $ac_count + 1 && ac_count=$as_val
11084 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11085 # Best one so far, save it but keep looking for a better one
11086 ac_cv_path_EGREP="$ac_path_EGREP"
11087 ac_path_EGREP_max=$ac_count
11088 fi
11089 # 10*(2^10) chars as input seems more than enough
11090 test $ac_count -gt 10 && break
11091 done
11092 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11093 esac
11094
11095 $ac_path_EGREP_found && break 3
11096 done
11097 done
11098 done
11099 IFS=$as_save_IFS
11100 if test -z "$ac_cv_path_EGREP"; then
11101 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11102 fi
11103 else
11104 ac_cv_path_EGREP=$EGREP
11105 fi
11106
11107 fi
11108 fi
11109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11110 $as_echo "$ac_cv_path_EGREP" >&6; }
11111 EGREP="$ac_cv_path_EGREP"
11112
11113
11114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11115 $as_echo_n "checking for ANSI C header files... " >&6; }
11116 if ${ac_cv_header_stdc+:} false; then :
11117 $as_echo_n "(cached) " >&6
11118 else
11119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11120 /* end confdefs.h. */
11121 #include <stdlib.h>
11122 #include <stdarg.h>
11123 #include <string.h>
11124 #include <float.h>
11125
11126 int
11127 main ()
11128 {
11129
11130 ;
11131 return 0;
11132 }
11133 _ACEOF
11134 if ac_fn_c_try_compile "$LINENO"; then :
11135 ac_cv_header_stdc=yes
11136 else
11137 ac_cv_header_stdc=no
11138 fi
11139 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11140
11141 if test $ac_cv_header_stdc = yes; then
11142 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11144 /* end confdefs.h. */
11145 #include <string.h>
11146
11147 _ACEOF
11148 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11149 $EGREP "memchr" >/dev/null 2>&1; then :
11150
11151 else
11152 ac_cv_header_stdc=no
11153 fi
11154 rm -f conftest*
11155
11156 fi
11157
11158 if test $ac_cv_header_stdc = yes; then
11159 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11161 /* end confdefs.h. */
11162 #include <stdlib.h>
11163
11164 _ACEOF
11165 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11166 $EGREP "free" >/dev/null 2>&1; then :
11167
11168 else
11169 ac_cv_header_stdc=no
11170 fi
11171 rm -f conftest*
11172
11173 fi
11174
11175 if test $ac_cv_header_stdc = yes; then
11176 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11177 if test "$cross_compiling" = yes; then :
11178 :
11179 else
11180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11181 /* end confdefs.h. */
11182 #include <ctype.h>
11183 #include <stdlib.h>
11184 #if ((' ' & 0x0FF) == 0x020)
11185 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11186 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11187 #else
11188 # define ISLOWER(c) \
11189 (('a' <= (c) && (c) <= 'i') \
11190 || ('j' <= (c) && (c) <= 'r') \
11191 || ('s' <= (c) && (c) <= 'z'))
11192 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11193 #endif
11194
11195 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11196 int
11197 main ()
11198 {
11199 int i;
11200 for (i = 0; i < 256; i++)
11201 if (XOR (islower (i), ISLOWER (i))
11202 || toupper (i) != TOUPPER (i))
11203 return 2;
11204 return 0;
11205 }
11206 _ACEOF
11207 if ac_fn_c_try_run "$LINENO"; then :
11208
11209 else
11210 ac_cv_header_stdc=no
11211 fi
11212 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11213 conftest.$ac_objext conftest.beam conftest.$ac_ext
11214 fi
11215
11216 fi
11217 fi
11218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11219 $as_echo "$ac_cv_header_stdc" >&6; }
11220 if test $ac_cv_header_stdc = yes; then
11221
11222 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
11223
11224 fi
11225
11226 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11227 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11228 inttypes.h stdint.h unistd.h
11229 do :
11230 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11231 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
11232 "
11233 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11234 cat >>confdefs.h <<_ACEOF
11235 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11236 _ACEOF
11237
11238 fi
11239
11240 done
11241
11242
11243 if test "$PORTNAME" != "win32"; then :
11244 # then
11245
11246
11247
11248
11249 ac_ext=c
11250 ac_cpp='$CPP $CPPFLAGS'
11251 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11252 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11253 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11254
11255 ax_pthread_ok=no
11256
11257 # We used to check for pthread.h first, but this fails if pthread.h
11258 # requires special compiler flags (e.g. on Tru64 or Sequent).
11259 # It gets checked for in the link test anyway.
11260
11261 # First of all, check if the user has set any of the PTHREAD_LIBS,
11262 # etcetera environment variables, and if threads linking works using
11263 # them:
11264 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
11265 ax_pthread_save_CC="$CC"
11266 ax_pthread_save_CFLAGS="$CFLAGS"
11267 ax_pthread_save_LIBS="$LIBS"
11268 if test "x$PTHREAD_CC" != "x"; then :
11269 CC="$PTHREAD_CC"
11270 fi
11271 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11272 LIBS="$PTHREAD_LIBS $LIBS"
11273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
11274 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
11275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11276 /* end confdefs.h. */
11277
11278 /* Override any GCC internal prototype to avoid an error.
11279 Use char because int might match the return type of a GCC
11280 builtin and then its argument prototype would still apply. */
11281 #ifdef __cplusplus
11282 extern "C"
11283 #endif
11284 char pthread_join ();
11285 int
11286 main ()
11287 {
11288 return pthread_join ();
11289 ;
11290 return 0;
11291 }
11292 _ACEOF
11293 if ac_fn_c_try_link "$LINENO"; then :
11294 ax_pthread_ok=yes
11295 fi
11296 rm -f core conftest.err conftest.$ac_objext \
11297 conftest$ac_exeext conftest.$ac_ext
11298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11299 $as_echo "$ax_pthread_ok" >&6; }
11300 if test "x$ax_pthread_ok" = "xno"; then
11301 PTHREAD_LIBS=""
11302 PTHREAD_CFLAGS=""
11303 fi
11304 CC="$ax_pthread_save_CC"
11305 CFLAGS="$ax_pthread_save_CFLAGS"
11306 LIBS="$ax_pthread_save_LIBS"
11307 fi
11308
11309 # We must check for the threads library under a number of different
11310 # names; the ordering is very important because some systems
11311 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
11312 # libraries is broken (non-POSIX).
11313
11314 # Create a list of thread flags to try. Items starting with a "-" are
11315 # C compiler flags, and other items are library names, except for "none"
11316 # which indicates that we try without any flags at all, and "pthread-config"
11317 # which is a program returning the flags for the Pth emulation library.
11318
11319 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
11320
11321 # The ordering *is* (sometimes) important. Some notes on the
11322 # individual items follow:
11323
11324 # pthreads: AIX (must check this before -lpthread)
11325 # none: in case threads are in libc; should be tried before -Kthread and
11326 # other compiler flags to prevent continual compiler warnings
11327 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
11328 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
11329 # (Note: HP C rejects this with "bad form for `-t' option")
11330 # -pthreads: Solaris/gcc (Note: HP C also rejects)
11331 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
11332 # doesn't hurt to check since this sometimes defines pthreads and
11333 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
11334 # is present but should not be used directly; and before -mthreads,
11335 # because the compiler interprets this as "-mt" + "-hreads")
11336 # -mthreads: Mingw32/gcc, Lynx/gcc
11337 # pthread: Linux, etcetera
11338 # --thread-safe: KAI C++
11339 # pthread-config: use pthread-config program (for GNU Pth library)
11340
11341 case $host_os in
11342
11343 freebsd*)
11344
11345 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
11346 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
11347
11348 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
11349 ;;
11350
11351 hpux*)
11352
11353 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
11354 # multi-threading and also sets -lpthread."
11355
11356 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
11357 ;;
11358
11359 openedition*)
11360
11361 # IBM z/OS requires a feature-test macro to be defined in order to
11362 # enable POSIX threads at all, so give the user a hint if this is
11363 # not set. (We don't define these ourselves, as they can affect
11364 # other portions of the system API in unpredictable ways.)
11365
11366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11367 /* end confdefs.h. */
11368
11369 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
11370 AX_PTHREAD_ZOS_MISSING
11371 # endif
11372
11373 _ACEOF
11374 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11375 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
11376 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
11377 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
11378 fi
11379 rm -f conftest*
11380
11381 ;;
11382
11383 solaris*)
11384
11385 # On Solaris (at least, for some versions), libc contains stubbed
11386 # (non-functional) versions of the pthreads routines, so link-based
11387 # tests will erroneously succeed. (N.B.: The stubs are missing
11388 # pthread_cleanup_push, or rather a function called by this macro,
11389 # so we could check for that, but who knows whether they'll stub
11390 # that too in a future libc.) So we'll check first for the
11391 # standard Solaris way of linking pthreads (-mt -lpthread).
11392
11393 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
11394 ;;
11395 esac
11396
11397 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
11398
11399 if test "x$GCC" = "xyes"; then :
11400 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
11401 fi
11402
11403 # The presence of a feature test macro requesting re-entrant function
11404 # definitions is, on some systems, a strong hint that pthreads support is
11405 # correctly enabled
11406
11407 case $host_os in
11408 darwin* | hpux* | linux* | osf* | solaris*)
11409 ax_pthread_check_macro="_REENTRANT"
11410 ;;
11411
11412 aix*)
11413 ax_pthread_check_macro="_THREAD_SAFE"
11414 ;;
11415
11416 *)
11417 ax_pthread_check_macro="--"
11418 ;;
11419 esac
11420 if test "x$ax_pthread_check_macro" = "x--"; then :
11421 ax_pthread_check_cond=0
11422 else
11423 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
11424 fi
11425
11426 # Are we compiling with Clang?
11427
11428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
11429 $as_echo_n "checking whether $CC is Clang... " >&6; }
11430 if ${ax_cv_PTHREAD_CLANG+:} false; then :
11431 $as_echo_n "(cached) " >&6
11432 else
11433 ax_cv_PTHREAD_CLANG=no
11434 # Note that Autoconf sets GCC=yes for Clang as well as GCC
11435 if test "x$GCC" = "xyes"; then
11436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11437 /* end confdefs.h. */
11438 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
11439 # if defined(__clang__) && defined(__llvm__)
11440 AX_PTHREAD_CC_IS_CLANG
11441 # endif
11442
11443 _ACEOF
11444 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11445 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
11446 ax_cv_PTHREAD_CLANG=yes
11447 fi
11448 rm -f conftest*
11449
11450 fi
11451
11452 fi
11453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
11454 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
11455 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
11456
11457 ax_pthread_clang_warning=no
11458
11459 # Clang needs special handling, because older versions handle the -pthread
11460 # option in a rather... idiosyncratic way
11461
11462 if test "x$ax_pthread_clang" = "xyes"; then
11463
11464 # Clang takes -pthread; it has never supported any other flag
11465
11466 # (Note 1: This will need to be revisited if a system that Clang
11467 # supports has POSIX threads in a separate library. This tends not
11468 # to be the way of modern systems, but it's conceivable.)
11469
11470 # (Note 2: On some systems, notably Darwin, -pthread is not needed
11471 # to get POSIX threads support; the API is always present and
11472 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
11473 # -pthread does define _REENTRANT, and while the Darwin headers
11474 # ignore this macro, third-party headers might not.)
11475
11476 PTHREAD_CFLAGS="-pthread"
11477 PTHREAD_LIBS=
11478
11479 ax_pthread_ok=yes
11480
11481 # However, older versions of Clang make a point of warning the user
11482 # that, in an invocation where only linking and no compilation is
11483 # taking place, the -pthread option has no effect ("argument unused
11484 # during compilation"). They expect -pthread to be passed in only
11485 # when source code is being compiled.
11486 #
11487 # Problem is, this is at odds with the way Automake and most other
11488 # C build frameworks function, which is that the same flags used in
11489 # compilation (CFLAGS) are also used in linking. Many systems
11490 # supported by AX_PTHREAD require exactly this for POSIX threads
11491 # support, and in fact it is often not straightforward to specify a
11492 # flag that is used only in the compilation phase and not in
11493 # linking. Such a scenario is extremely rare in practice.
11494 #
11495 # Even though use of the -pthread flag in linking would only print
11496 # a warning, this can be a nuisance for well-run software projects
11497 # that build with -Werror. So if the active version of Clang has
11498 # this misfeature, we search for an option to squash it.
11499
11500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
11501 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
11502 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
11503 $as_echo_n "(cached) " >&6
11504 else
11505 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
11506 # Create an alternate version of $ac_link that compiles and
11507 # links in two steps (.c -> .o, .o -> exe) instead of one
11508 # (.c -> exe), because the warning occurs only in the second
11509 # step
11510 ax_pthread_save_ac_link="$ac_link"
11511 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
11512 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
11513 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
11514 ax_pthread_save_CFLAGS="$CFLAGS"
11515 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
11516 if test "x$ax_pthread_try" = "xunknown"; then :
11517 break
11518 fi
11519 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
11520 ac_link="$ax_pthread_save_ac_link"
11521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11522 /* end confdefs.h. */
11523 int main(void){return 0;}
11524 _ACEOF
11525 if ac_fn_c_try_link "$LINENO"; then :
11526 ac_link="$ax_pthread_2step_ac_link"
11527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11528 /* end confdefs.h. */
11529 int main(void){return 0;}
11530 _ACEOF
11531 if ac_fn_c_try_link "$LINENO"; then :
11532 break
11533 fi
11534 rm -f core conftest.err conftest.$ac_objext \
11535 conftest$ac_exeext conftest.$ac_ext
11536
11537 fi
11538 rm -f core conftest.err conftest.$ac_objext \
11539 conftest$ac_exeext conftest.$ac_ext
11540 done
11541 ac_link="$ax_pthread_save_ac_link"
11542 CFLAGS="$ax_pthread_save_CFLAGS"
11543 if test "x$ax_pthread_try" = "x"; then :
11544 ax_pthread_try=no
11545 fi
11546 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
11547
11548 fi
11549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
11550 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
11551
11552 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
11553 no | unknown) ;;
11554 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
11555 esac
11556
11557 fi # $ax_pthread_clang = yes
11558
11559 if test "x$ax_pthread_ok" = "xno"; then
11560 for ax_pthread_try_flag in $ax_pthread_flags; do
11561
11562 case $ax_pthread_try_flag in
11563 none)
11564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
11565 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
11566 ;;
11567
11568 -mt,pthread)
11569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
11570 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
11571 PTHREAD_CFLAGS="-mt"
11572 PTHREAD_LIBS="-lpthread"
11573 ;;
11574
11575 -*)
11576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
11577 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
11578 PTHREAD_CFLAGS="$ax_pthread_try_flag"
11579 ;;
11580
11581 pthread-config)
11582 # Extract the first word of "pthread-config", so it can be a program name with args.
11583 set dummy pthread-config; ac_word=$2
11584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11585 $as_echo_n "checking for $ac_word... " >&6; }
11586 if ${ac_cv_prog_ax_pthread_config+:} false; then :
11587 $as_echo_n "(cached) " >&6
11588 else
11589 if test -n "$ax_pthread_config"; then
11590 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
11591 else
11592 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11593 for as_dir in $PATH
11594 do
11595 IFS=$as_save_IFS
11596 test -z "$as_dir" && as_dir=.
11597 for ac_exec_ext in '' $ac_executable_extensions; do
11598 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11599 ac_cv_prog_ax_pthread_config="yes"
11600 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11601 break 2
11602 fi
11603 done
11604 done
11605 IFS=$as_save_IFS
11606
11607 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
11608 fi
11609 fi
11610 ax_pthread_config=$ac_cv_prog_ax_pthread_config
11611 if test -n "$ax_pthread_config"; then
11612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
11613 $as_echo "$ax_pthread_config" >&6; }
11614 else
11615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11616 $as_echo "no" >&6; }
11617 fi
11618
11619
11620 if test "x$ax_pthread_config" = "xno"; then :
11621 continue
11622 fi
11623 PTHREAD_CFLAGS="`pthread-config --cflags`"
11624 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
11625 ;;
11626
11627 *)
11628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
11629 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
11630 PTHREAD_LIBS="-l$ax_pthread_try_flag"
11631 ;;
11632 esac
11633
11634 ax_pthread_save_CFLAGS="$CFLAGS"
11635 ax_pthread_save_LIBS="$LIBS"
11636 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11637 LIBS="$PTHREAD_LIBS $LIBS"
11638
11639 # Check for various functions. We must include pthread.h,
11640 # since some functions may be macros. (On the Sequent, we
11641 # need a special flag -Kthread to make this header compile.)
11642 # We check for pthread_join because it is in -lpthread on IRIX
11643 # while pthread_create is in libc. We check for pthread_attr_init
11644 # due to DEC craziness with -lpthreads. We check for
11645 # pthread_cleanup_push because it is one of the few pthread
11646 # functions on Solaris that doesn't have a non-functional libc stub.
11647 # We try pthread_create on general principles.
11648
11649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11650 /* end confdefs.h. */
11651 #include <pthread.h>
11652 # if $ax_pthread_check_cond
11653 # error "$ax_pthread_check_macro must be defined"
11654 # endif
11655 static void routine(void *a) { a = 0; }
11656 static void *start_routine(void *a) { return a; }
11657 int
11658 main ()
11659 {
11660 pthread_t th; pthread_attr_t attr;
11661 pthread_create(&th, 0, start_routine, 0);
11662 pthread_join(th, 0);
11663 pthread_attr_init(&attr);
11664 pthread_cleanup_push(routine, 0);
11665 pthread_cleanup_pop(0) /* ; */
11666 ;
11667 return 0;
11668 }
11669 _ACEOF
11670 if ac_fn_c_try_link "$LINENO"; then :
11671 ax_pthread_ok=yes
11672 fi
11673 rm -f core conftest.err conftest.$ac_objext \
11674 conftest$ac_exeext conftest.$ac_ext
11675
11676 CFLAGS="$ax_pthread_save_CFLAGS"
11677 LIBS="$ax_pthread_save_LIBS"
11678
11679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11680 $as_echo "$ax_pthread_ok" >&6; }
11681 if test "x$ax_pthread_ok" = "xyes"; then :
11682 break
11683 fi
11684
11685 PTHREAD_LIBS=""
11686 PTHREAD_CFLAGS=""
11687 done
11688 fi
11689
11690 # Various other checks:
11691 if test "x$ax_pthread_ok" = "xyes"; then
11692 ax_pthread_save_CFLAGS="$CFLAGS"
11693 ax_pthread_save_LIBS="$LIBS"
11694 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11695 LIBS="$PTHREAD_LIBS $LIBS"
11696
11697 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11699 $as_echo_n "checking for joinable pthread attribute... " >&6; }
11700 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11701 $as_echo_n "(cached) " >&6
11702 else
11703 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11704 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11706 /* end confdefs.h. */
11707 #include <pthread.h>
11708 int
11709 main ()
11710 {
11711 int attr = $ax_pthread_attr; return attr /* ; */
11712 ;
11713 return 0;
11714 }
11715 _ACEOF
11716 if ac_fn_c_try_link "$LINENO"; then :
11717 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11718 fi
11719 rm -f core conftest.err conftest.$ac_objext \
11720 conftest$ac_exeext conftest.$ac_ext
11721 done
11722
11723 fi
11724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11725 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11726 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11727 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11728 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11729
11730 cat >>confdefs.h <<_ACEOF
11731 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11732 _ACEOF
11733
11734 ax_pthread_joinable_attr_defined=yes
11735
11736 fi
11737
11738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11739 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11740 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11741 $as_echo_n "(cached) " >&6
11742 else
11743 ax_cv_PTHREAD_SPECIAL_FLAGS=no
11744 case $host_os in
11745 solaris*)
11746 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11747 ;;
11748 esac
11749
11750 fi
11751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11752 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11753 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11754 test "x$ax_pthread_special_flags_added" != "xyes"; then :
11755 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11756 ax_pthread_special_flags_added=yes
11757 fi
11758
11759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11760 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11761 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11762 $as_echo_n "(cached) " >&6
11763 else
11764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11765 /* end confdefs.h. */
11766 #include <pthread.h>
11767 int
11768 main ()
11769 {
11770 int i = PTHREAD_PRIO_INHERIT;
11771 ;
11772 return 0;
11773 }
11774 _ACEOF
11775 if ac_fn_c_try_link "$LINENO"; then :
11776 ax_cv_PTHREAD_PRIO_INHERIT=yes
11777 else
11778 ax_cv_PTHREAD_PRIO_INHERIT=no
11779 fi
11780 rm -f core conftest.err conftest.$ac_objext \
11781 conftest$ac_exeext conftest.$ac_ext
11782
11783 fi
11784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11785 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11786 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11787 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11788
11789 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11790
11791 ax_pthread_prio_inherit_defined=yes
11792
11793 fi
11794
11795 CFLAGS="$ax_pthread_save_CFLAGS"
11796 LIBS="$ax_pthread_save_LIBS"
11797
11798 # More AIX lossage: compile with *_r variant
11799 if test "x$GCC" != "xyes"; then
11800 case $host_os in
11801 aix*)
11802 case "x/$CC" in #(
11803 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11804 #handle absolute path differently from PATH based program lookup
11805 case "x$CC" in #(
11806 x/*) :
11807 if as_fn_executable_p ${CC}_r; then :
11808 PTHREAD_CC="${CC}_r"
11809 fi ;; #(
11810 *) :
11811 for ac_prog in ${CC}_r
11812 do
11813 # Extract the first word of "$ac_prog", so it can be a program name with args.
11814 set dummy $ac_prog; ac_word=$2
11815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11816 $as_echo_n "checking for $ac_word... " >&6; }
11817 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11818 $as_echo_n "(cached) " >&6
11819 else
11820 if test -n "$PTHREAD_CC"; then
11821 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11822 else
11823 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11824 for as_dir in $PATH
11825 do
11826 IFS=$as_save_IFS
11827 test -z "$as_dir" && as_dir=.
11828 for ac_exec_ext in '' $ac_executable_extensions; do
11829 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11830 ac_cv_prog_PTHREAD_CC="$ac_prog"
11831 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11832 break 2
11833 fi
11834 done
11835 done
11836 IFS=$as_save_IFS
11837
11838 fi
11839 fi
11840 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11841 if test -n "$PTHREAD_CC"; then
11842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11843 $as_echo "$PTHREAD_CC" >&6; }
11844 else
11845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11846 $as_echo "no" >&6; }
11847 fi
11848
11849
11850 test -n "$PTHREAD_CC" && break
11851 done
11852 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11853 ;;
11854 esac ;; #(
11855 *) :
11856 ;;
11857 esac
11858 ;;
11859 esac
11860 fi
11861 fi
11862
11863 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11864
11865
11866
11867
11868
11869 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11870 if test "x$ax_pthread_ok" = "xyes"; then
11871
11872 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11873
11874 :
11875 else
11876 ax_pthread_ok=no
11877
11878 fi
11879 ac_ext=c
11880 ac_cpp='$CPP $CPPFLAGS'
11881 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11882 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11883 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11884
11885 # set thread flags
11886
11887 # Some platforms use these, so just define them. They can't hurt if they
11888 # are not supported.
11889 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE"
11890
11891 # Check for *_r functions
11892 _CFLAGS="$CFLAGS"
11893 _LIBS="$LIBS"
11894 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11895 LIBS="$LIBS $PTHREAD_LIBS"
11896
11897 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11898 if test "x$ac_cv_header_pthread_h" = xyes; then :
11899
11900 else
11901 as_fn_error $? "
11902 pthread.h not found" "$LINENO" 5
11903 fi
11904
11905
11906
11907 for ac_func in strerror_r
11908 do :
11909 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
11910 if test "x$ac_cv_func_strerror_r" = xyes; then :
11911 cat >>confdefs.h <<_ACEOF
11912 #define HAVE_STRERROR_R 1
11913 _ACEOF
11914
11915 fi
11916 done
11917
11918
11919 # Do test here with the proper thread flags
11920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11921 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11922 if ${pgac_cv_func_strerror_r_int+:} false; then :
11923 $as_echo_n "(cached) " >&6
11924 else
11925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11926 /* end confdefs.h. */
11927 #include <string.h>
11928 int
11929 main ()
11930 {
11931 char buf[100];
11932 switch (strerror_r(1, buf, sizeof(buf)))
11933 { case 0: break; default: break; }
11934
11935 ;
11936 return 0;
11937 }
11938 _ACEOF
11939 if ac_fn_c_try_compile "$LINENO"; then :
11940 pgac_cv_func_strerror_r_int=yes
11941 else
11942 pgac_cv_func_strerror_r_int=no
11943 fi
11944 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11945 fi
11946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11947 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11948 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11949
11950 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11951
11952 fi
11953
11954
11955 CFLAGS="$_CFLAGS"
11956 LIBS="$_LIBS"
11957
11958
11959 else
11960 # else
11961 # do not use values from template file
11962 PTHREAD_CFLAGS=
11963 PTHREAD_LIBS=
11964
11965 fi # fi
11966
11967
11968
11969
11970
11971 ##
11972 ## Libraries
11973 ##
11974 ## Most libraries are included only if they demonstrably provide a function
11975 ## we need, but libm is an exception: always include it, because there are
11976 ## too many compilers that play cute optimization games that will break
11977 ## probes for standard functions such as pow().
11978 ##
11979
11980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11981 $as_echo_n "checking for main in -lm... " >&6; }
11982 if ${ac_cv_lib_m_main+:} false; then :
11983 $as_echo_n "(cached) " >&6
11984 else
11985 ac_check_lib_save_LIBS=$LIBS
11986 LIBS="-lm $LIBS"
11987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11988 /* end confdefs.h. */
11989
11990
11991 int
11992 main ()
11993 {
11994 return main ();
11995 ;
11996 return 0;
11997 }
11998 _ACEOF
11999 if ac_fn_c_try_link "$LINENO"; then :
12000 ac_cv_lib_m_main=yes
12001 else
12002 ac_cv_lib_m_main=no
12003 fi
12004 rm -f core conftest.err conftest.$ac_objext \
12005 conftest$ac_exeext conftest.$ac_ext
12006 LIBS=$ac_check_lib_save_LIBS
12007 fi
12008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
12009 $as_echo "$ac_cv_lib_m_main" >&6; }
12010 if test "x$ac_cv_lib_m_main" = xyes; then :
12011 cat >>confdefs.h <<_ACEOF
12012 #define HAVE_LIBM 1
12013 _ACEOF
12014
12015 LIBS="-lm $LIBS"
12016
12017 fi
12018
12019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
12020 $as_echo_n "checking for library containing setproctitle... " >&6; }
12021 if ${ac_cv_search_setproctitle+:} false; then :
12022 $as_echo_n "(cached) " >&6
12023 else
12024 ac_func_search_save_LIBS=$LIBS
12025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12026 /* end confdefs.h. */
12027
12028 /* Override any GCC internal prototype to avoid an error.
12029 Use char because int might match the return type of a GCC
12030 builtin and then its argument prototype would still apply. */
12031 #ifdef __cplusplus
12032 extern "C"
12033 #endif
12034 char setproctitle ();
12035 int
12036 main ()
12037 {
12038 return setproctitle ();
12039 ;
12040 return 0;
12041 }
12042 _ACEOF
12043 for ac_lib in '' util; do
12044 if test -z "$ac_lib"; then
12045 ac_res="none required"
12046 else
12047 ac_res=-l$ac_lib
12048 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12049 fi
12050 if ac_fn_c_try_link "$LINENO"; then :
12051 ac_cv_search_setproctitle=$ac_res
12052 fi
12053 rm -f core conftest.err conftest.$ac_objext \
12054 conftest$ac_exeext
12055 if ${ac_cv_search_setproctitle+:} false; then :
12056 break
12057 fi
12058 done
12059 if ${ac_cv_search_setproctitle+:} false; then :
12060
12061 else
12062 ac_cv_search_setproctitle=no
12063 fi
12064 rm conftest.$ac_ext
12065 LIBS=$ac_func_search_save_LIBS
12066 fi
12067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
12068 $as_echo "$ac_cv_search_setproctitle" >&6; }
12069 ac_res=$ac_cv_search_setproctitle
12070 if test "$ac_res" != no; then :
12071 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12072
12073 fi
12074
12075 # gcc/clang's sanitizer helper library provides dlopen but not dlsym, thus
12076 # when enabling asan the dlopen check doesn't notice that -ldl is actually
12077 # required. Just checking for dlsym() ought to suffice.
12078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
12079 $as_echo_n "checking for library containing dlsym... " >&6; }
12080 if ${ac_cv_search_dlsym+:} false; then :
12081 $as_echo_n "(cached) " >&6
12082 else
12083 ac_func_search_save_LIBS=$LIBS
12084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12085 /* end confdefs.h. */
12086
12087 /* Override any GCC internal prototype to avoid an error.
12088 Use char because int might match the return type of a GCC
12089 builtin and then its argument prototype would still apply. */
12090 #ifdef __cplusplus
12091 extern "C"
12092 #endif
12093 char dlsym ();
12094 int
12095 main ()
12096 {
12097 return dlsym ();
12098 ;
12099 return 0;
12100 }
12101 _ACEOF
12102 for ac_lib in '' dl; do
12103 if test -z "$ac_lib"; then
12104 ac_res="none required"
12105 else
12106 ac_res=-l$ac_lib
12107 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12108 fi
12109 if ac_fn_c_try_link "$LINENO"; then :
12110 ac_cv_search_dlsym=$ac_res
12111 fi
12112 rm -f core conftest.err conftest.$ac_objext \
12113 conftest$ac_exeext
12114 if ${ac_cv_search_dlsym+:} false; then :
12115 break
12116 fi
12117 done
12118 if ${ac_cv_search_dlsym+:} false; then :
12119
12120 else
12121 ac_cv_search_dlsym=no
12122 fi
12123 rm conftest.$ac_ext
12124 LIBS=$ac_func_search_save_LIBS
12125 fi
12126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
12127 $as_echo "$ac_cv_search_dlsym" >&6; }
12128 ac_res=$ac_cv_search_dlsym
12129 if test "$ac_res" != no; then :
12130 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12131
12132 fi
12133
12134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
12135 $as_echo_n "checking for library containing socket... " >&6; }
12136 if ${ac_cv_search_socket+:} false; then :
12137 $as_echo_n "(cached) " >&6
12138 else
12139 ac_func_search_save_LIBS=$LIBS
12140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12141 /* end confdefs.h. */
12142
12143 /* Override any GCC internal prototype to avoid an error.
12144 Use char because int might match the return type of a GCC
12145 builtin and then its argument prototype would still apply. */
12146 #ifdef __cplusplus
12147 extern "C"
12148 #endif
12149 char socket ();
12150 int
12151 main ()
12152 {
12153 return socket ();
12154 ;
12155 return 0;
12156 }
12157 _ACEOF
12158 for ac_lib in '' socket ws2_32; do
12159 if test -z "$ac_lib"; then
12160 ac_res="none required"
12161 else
12162 ac_res=-l$ac_lib
12163 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12164 fi
12165 if ac_fn_c_try_link "$LINENO"; then :
12166 ac_cv_search_socket=$ac_res
12167 fi
12168 rm -f core conftest.err conftest.$ac_objext \
12169 conftest$ac_exeext
12170 if ${ac_cv_search_socket+:} false; then :
12171 break
12172 fi
12173 done
12174 if ${ac_cv_search_socket+:} false; then :
12175
12176 else
12177 ac_cv_search_socket=no
12178 fi
12179 rm conftest.$ac_ext
12180 LIBS=$ac_func_search_save_LIBS
12181 fi
12182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
12183 $as_echo "$ac_cv_search_socket" >&6; }
12184 ac_res=$ac_cv_search_socket
12185 if test "$ac_res" != no; then :
12186 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12187
12188 fi
12189
12190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
12191 $as_echo_n "checking for library containing getopt_long... " >&6; }
12192 if ${ac_cv_search_getopt_long+:} false; then :
12193 $as_echo_n "(cached) " >&6
12194 else
12195 ac_func_search_save_LIBS=$LIBS
12196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12197 /* end confdefs.h. */
12198
12199 /* Override any GCC internal prototype to avoid an error.
12200 Use char because int might match the return type of a GCC
12201 builtin and then its argument prototype would still apply. */
12202 #ifdef __cplusplus
12203 extern "C"
12204 #endif
12205 char getopt_long ();
12206 int
12207 main ()
12208 {
12209 return getopt_long ();
12210 ;
12211 return 0;
12212 }
12213 _ACEOF
12214 for ac_lib in '' getopt gnugetopt; do
12215 if test -z "$ac_lib"; then
12216 ac_res="none required"
12217 else
12218 ac_res=-l$ac_lib
12219 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12220 fi
12221 if ac_fn_c_try_link "$LINENO"; then :
12222 ac_cv_search_getopt_long=$ac_res
12223 fi
12224 rm -f core conftest.err conftest.$ac_objext \
12225 conftest$ac_exeext
12226 if ${ac_cv_search_getopt_long+:} false; then :
12227 break
12228 fi
12229 done
12230 if ${ac_cv_search_getopt_long+:} false; then :
12231
12232 else
12233 ac_cv_search_getopt_long=no
12234 fi
12235 rm conftest.$ac_ext
12236 LIBS=$ac_func_search_save_LIBS
12237 fi
12238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
12239 $as_echo "$ac_cv_search_getopt_long" >&6; }
12240 ac_res=$ac_cv_search_getopt_long
12241 if test "$ac_res" != no; then :
12242 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12243
12244 fi
12245
12246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
12247 $as_echo_n "checking for library containing shm_open... " >&6; }
12248 if ${ac_cv_search_shm_open+:} false; then :
12249 $as_echo_n "(cached) " >&6
12250 else
12251 ac_func_search_save_LIBS=$LIBS
12252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12253 /* end confdefs.h. */
12254
12255 /* Override any GCC internal prototype to avoid an error.
12256 Use char because int might match the return type of a GCC
12257 builtin and then its argument prototype would still apply. */
12258 #ifdef __cplusplus
12259 extern "C"
12260 #endif
12261 char shm_open ();
12262 int
12263 main ()
12264 {
12265 return shm_open ();
12266 ;
12267 return 0;
12268 }
12269 _ACEOF
12270 for ac_lib in '' rt; do
12271 if test -z "$ac_lib"; then
12272 ac_res="none required"
12273 else
12274 ac_res=-l$ac_lib
12275 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12276 fi
12277 if ac_fn_c_try_link "$LINENO"; then :
12278 ac_cv_search_shm_open=$ac_res
12279 fi
12280 rm -f core conftest.err conftest.$ac_objext \
12281 conftest$ac_exeext
12282 if ${ac_cv_search_shm_open+:} false; then :
12283 break
12284 fi
12285 done
12286 if ${ac_cv_search_shm_open+:} false; then :
12287
12288 else
12289 ac_cv_search_shm_open=no
12290 fi
12291 rm conftest.$ac_ext
12292 LIBS=$ac_func_search_save_LIBS
12293 fi
12294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
12295 $as_echo "$ac_cv_search_shm_open" >&6; }
12296 ac_res=$ac_cv_search_shm_open
12297 if test "$ac_res" != no; then :
12298 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12299
12300 fi
12301
12302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
12303 $as_echo_n "checking for library containing shm_unlink... " >&6; }
12304 if ${ac_cv_search_shm_unlink+:} false; then :
12305 $as_echo_n "(cached) " >&6
12306 else
12307 ac_func_search_save_LIBS=$LIBS
12308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12309 /* end confdefs.h. */
12310
12311 /* Override any GCC internal prototype to avoid an error.
12312 Use char because int might match the return type of a GCC
12313 builtin and then its argument prototype would still apply. */
12314 #ifdef __cplusplus
12315 extern "C"
12316 #endif
12317 char shm_unlink ();
12318 int
12319 main ()
12320 {
12321 return shm_unlink ();
12322 ;
12323 return 0;
12324 }
12325 _ACEOF
12326 for ac_lib in '' rt; do
12327 if test -z "$ac_lib"; then
12328 ac_res="none required"
12329 else
12330 ac_res=-l$ac_lib
12331 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12332 fi
12333 if ac_fn_c_try_link "$LINENO"; then :
12334 ac_cv_search_shm_unlink=$ac_res
12335 fi
12336 rm -f core conftest.err conftest.$ac_objext \
12337 conftest$ac_exeext
12338 if ${ac_cv_search_shm_unlink+:} false; then :
12339 break
12340 fi
12341 done
12342 if ${ac_cv_search_shm_unlink+:} false; then :
12343
12344 else
12345 ac_cv_search_shm_unlink=no
12346 fi
12347 rm conftest.$ac_ext
12348 LIBS=$ac_func_search_save_LIBS
12349 fi
12350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
12351 $as_echo "$ac_cv_search_shm_unlink" >&6; }
12352 ac_res=$ac_cv_search_shm_unlink
12353 if test "$ac_res" != no; then :
12354 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12355
12356 fi
12357
12358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
12359 $as_echo_n "checking for library containing clock_gettime... " >&6; }
12360 if ${ac_cv_search_clock_gettime+:} false; then :
12361 $as_echo_n "(cached) " >&6
12362 else
12363 ac_func_search_save_LIBS=$LIBS
12364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12365 /* end confdefs.h. */
12366
12367 /* Override any GCC internal prototype to avoid an error.
12368 Use char because int might match the return type of a GCC
12369 builtin and then its argument prototype would still apply. */
12370 #ifdef __cplusplus
12371 extern "C"
12372 #endif
12373 char clock_gettime ();
12374 int
12375 main ()
12376 {
12377 return clock_gettime ();
12378 ;
12379 return 0;
12380 }
12381 _ACEOF
12382 for ac_lib in '' rt; do
12383 if test -z "$ac_lib"; then
12384 ac_res="none required"
12385 else
12386 ac_res=-l$ac_lib
12387 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12388 fi
12389 if ac_fn_c_try_link "$LINENO"; then :
12390 ac_cv_search_clock_gettime=$ac_res
12391 fi
12392 rm -f core conftest.err conftest.$ac_objext \
12393 conftest$ac_exeext
12394 if ${ac_cv_search_clock_gettime+:} false; then :
12395 break
12396 fi
12397 done
12398 if ${ac_cv_search_clock_gettime+:} false; then :
12399
12400 else
12401 ac_cv_search_clock_gettime=no
12402 fi
12403 rm conftest.$ac_ext
12404 LIBS=$ac_func_search_save_LIBS
12405 fi
12406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
12407 $as_echo "$ac_cv_search_clock_gettime" >&6; }
12408 ac_res=$ac_cv_search_clock_gettime
12409 if test "$ac_res" != no; then :
12410 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12411
12412 fi
12413
12414 # Cygwin:
12415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
12416 $as_echo_n "checking for library containing shmget... " >&6; }
12417 if ${ac_cv_search_shmget+:} false; then :
12418 $as_echo_n "(cached) " >&6
12419 else
12420 ac_func_search_save_LIBS=$LIBS
12421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12422 /* end confdefs.h. */
12423
12424 /* Override any GCC internal prototype to avoid an error.
12425 Use char because int might match the return type of a GCC
12426 builtin and then its argument prototype would still apply. */
12427 #ifdef __cplusplus
12428 extern "C"
12429 #endif
12430 char shmget ();
12431 int
12432 main ()
12433 {
12434 return shmget ();
12435 ;
12436 return 0;
12437 }
12438 _ACEOF
12439 for ac_lib in '' cygipc; do
12440 if test -z "$ac_lib"; then
12441 ac_res="none required"
12442 else
12443 ac_res=-l$ac_lib
12444 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12445 fi
12446 if ac_fn_c_try_link "$LINENO"; then :
12447 ac_cv_search_shmget=$ac_res
12448 fi
12449 rm -f core conftest.err conftest.$ac_objext \
12450 conftest$ac_exeext
12451 if ${ac_cv_search_shmget+:} false; then :
12452 break
12453 fi
12454 done
12455 if ${ac_cv_search_shmget+:} false; then :
12456
12457 else
12458 ac_cv_search_shmget=no
12459 fi
12460 rm conftest.$ac_ext
12461 LIBS=$ac_func_search_save_LIBS
12462 fi
12463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
12464 $as_echo "$ac_cv_search_shmget" >&6; }
12465 ac_res=$ac_cv_search_shmget
12466 if test "$ac_res" != no; then :
12467 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12468
12469 fi
12470
12471 # *BSD:
12472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
12473 $as_echo_n "checking for library containing backtrace_symbols... " >&6; }
12474 if ${ac_cv_search_backtrace_symbols+:} false; then :
12475 $as_echo_n "(cached) " >&6
12476 else
12477 ac_func_search_save_LIBS=$LIBS
12478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12479 /* end confdefs.h. */
12480
12481 /* Override any GCC internal prototype to avoid an error.
12482 Use char because int might match the return type of a GCC
12483 builtin and then its argument prototype would still apply. */
12484 #ifdef __cplusplus
12485 extern "C"
12486 #endif
12487 char backtrace_symbols ();
12488 int
12489 main ()
12490 {
12491 return backtrace_symbols ();
12492 ;
12493 return 0;
12494 }
12495 _ACEOF
12496 for ac_lib in '' execinfo; do
12497 if test -z "$ac_lib"; then
12498 ac_res="none required"
12499 else
12500 ac_res=-l$ac_lib
12501 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12502 fi
12503 if ac_fn_c_try_link "$LINENO"; then :
12504 ac_cv_search_backtrace_symbols=$ac_res
12505 fi
12506 rm -f core conftest.err conftest.$ac_objext \
12507 conftest$ac_exeext
12508 if ${ac_cv_search_backtrace_symbols+:} false; then :
12509 break
12510 fi
12511 done
12512 if ${ac_cv_search_backtrace_symbols+:} false; then :
12513
12514 else
12515 ac_cv_search_backtrace_symbols=no
12516 fi
12517 rm conftest.$ac_ext
12518 LIBS=$ac_func_search_save_LIBS
12519 fi
12520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
12521 $as_echo "$ac_cv_search_backtrace_symbols" >&6; }
12522 ac_res=$ac_cv_search_backtrace_symbols
12523 if test "$ac_res" != no; then :
12524 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12525
12526 fi
12527
12528
12529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
12530 $as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
12531 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12532 $as_echo_n "(cached) " >&6
12533 else
12534 ac_func_search_save_LIBS=$LIBS
12535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12536 /* end confdefs.h. */
12537
12538 /* Override any GCC internal prototype to avoid an error.
12539 Use char because int might match the return type of a GCC
12540 builtin and then its argument prototype would still apply. */
12541 #ifdef __cplusplus
12542 extern "C"
12543 #endif
12544 char pthread_barrier_wait ();
12545 int
12546 main ()
12547 {
12548 return pthread_barrier_wait ();
12549 ;
12550 return 0;
12551 }
12552 _ACEOF
12553 for ac_lib in '' pthread; do
12554 if test -z "$ac_lib"; then
12555 ac_res="none required"
12556 else
12557 ac_res=-l$ac_lib
12558 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12559 fi
12560 if ac_fn_c_try_link "$LINENO"; then :
12561 ac_cv_search_pthread_barrier_wait=$ac_res
12562 fi
12563 rm -f core conftest.err conftest.$ac_objext \
12564 conftest$ac_exeext
12565 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12566 break
12567 fi
12568 done
12569 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12570
12571 else
12572 ac_cv_search_pthread_barrier_wait=no
12573 fi
12574 rm conftest.$ac_ext
12575 LIBS=$ac_func_search_save_LIBS
12576 fi
12577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_barrier_wait" >&5
12578 $as_echo "$ac_cv_search_pthread_barrier_wait" >&6; }
12579 ac_res=$ac_cv_search_pthread_barrier_wait
12580 if test "$ac_res" != no; then :
12581 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12582
12583 fi
12584
12585
12586 if test "$with_readline" = yes; then
12587
12588
12589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
12590 $as_echo_n "checking for library containing readline... " >&6; }
12591 if ${pgac_cv_check_readline+:} false; then :
12592 $as_echo_n "(cached) " >&6
12593 else
12594 pgac_cv_check_readline=no
12595 pgac_save_LIBS=$LIBS
12596 if test x"$with_libedit_preferred" != x"yes"
12597 then READLINE_ORDER="-lreadline -ledit"
12598 else READLINE_ORDER="-ledit -lreadline"
12599 fi
12600 for pgac_rllib in $READLINE_ORDER ; do
12601 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
12602 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
12603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12604 /* end confdefs.h. */
12605
12606 /* Override any GCC internal prototype to avoid an error.
12607 Use char because int might match the return type of a GCC
12608 builtin and then its argument prototype would still apply. */
12609 #ifdef __cplusplus
12610 extern "C"
12611 #endif
12612 char readline ();
12613 int
12614 main ()
12615 {
12616 return readline ();
12617 ;
12618 return 0;
12619 }
12620 _ACEOF
12621 if ac_fn_c_try_link "$LINENO"; then :
12622
12623 # Older NetBSD and OpenBSD have a broken linker that does not
12624 # recognize dependent libraries; assume curses is needed if we didn't
12625 # find any dependency.
12626 case $host_os in
12627 netbsd* | openbsd*)
12628 if test x"$pgac_lib" = x"" ; then
12629 pgac_lib=" -lcurses"
12630 fi ;;
12631 esac
12632
12633 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12634 break
12635
12636 fi
12637 rm -f core conftest.err conftest.$ac_objext \
12638 conftest$ac_exeext conftest.$ac_ext
12639 done
12640 if test "$pgac_cv_check_readline" != no ; then
12641 break
12642 fi
12643 done
12644 LIBS=$pgac_save_LIBS
12645
12646 fi
12647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12648 $as_echo "$pgac_cv_check_readline" >&6; }
12649 if test "$pgac_cv_check_readline" != no ; then
12650 LIBS="$pgac_cv_check_readline $LIBS"
12651
12652 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12653
12654 fi
12655
12656
12657 if test x"$pgac_cv_check_readline" = x"no"; then
12658 as_fn_error $? "readline library not found
12659 If you have readline already installed, see config.log for details on the
12660 failure. It is possible the compiler isn't looking in the proper directory.
12661 Use --without-readline to disable readline support." "$LINENO" 5
12662 fi
12663 fi
12664
12665 if test "$with_zlib" = yes; then
12666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12667 $as_echo_n "checking for inflate in -lz... " >&6; }
12668 if ${ac_cv_lib_z_inflate+:} false; then :
12669 $as_echo_n "(cached) " >&6
12670 else
12671 ac_check_lib_save_LIBS=$LIBS
12672 LIBS="-lz $LIBS"
12673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12674 /* end confdefs.h. */
12675
12676 /* Override any GCC internal prototype to avoid an error.
12677 Use char because int might match the return type of a GCC
12678 builtin and then its argument prototype would still apply. */
12679 #ifdef __cplusplus
12680 extern "C"
12681 #endif
12682 char inflate ();
12683 int
12684 main ()
12685 {
12686 return inflate ();
12687 ;
12688 return 0;
12689 }
12690 _ACEOF
12691 if ac_fn_c_try_link "$LINENO"; then :
12692 ac_cv_lib_z_inflate=yes
12693 else
12694 ac_cv_lib_z_inflate=no
12695 fi
12696 rm -f core conftest.err conftest.$ac_objext \
12697 conftest$ac_exeext conftest.$ac_ext
12698 LIBS=$ac_check_lib_save_LIBS
12699 fi
12700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12701 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12702 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12703 cat >>confdefs.h <<_ACEOF
12704 #define HAVE_LIBZ 1
12705 _ACEOF
12706
12707 LIBS="-lz $LIBS"
12708
12709 else
12710 as_fn_error $? "zlib library not found
12711 If you have zlib already installed, see config.log for details on the
12712 failure. It is possible the compiler isn't looking in the proper directory.
12713 Use --without-zlib to disable zlib support." "$LINENO" 5
12714 fi
12715
12716 fi
12717
12718 if test "$with_libcurl" = yes ; then
12719
12720 # libcurl compiler/linker flags are kept separate from the global flags, so
12721 # they have to be added back temporarily for the following tests.
12722 pgac_save_CPPFLAGS=$CPPFLAGS
12723 pgac_save_LDFLAGS=$LDFLAGS
12724 pgac_save_LIBS=$LIBS
12725
12726 CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
12727 LDFLAGS="$LDFLAGS $LIBCURL_LDFLAGS"
12728
12729 ac_fn_c_check_header_mongrel "$LINENO" "curl/curl.h" "ac_cv_header_curl_curl_h" "$ac_includes_default"
12730 if test "x$ac_cv_header_curl_curl_h" = xyes; then :
12731
12732 else
12733 as_fn_error $? "header file <curl/curl.h> is required for --with-libcurl" "$LINENO" 5
12734 fi
12735
12736
12737
12738 # LIBCURL_LDLIBS is determined here. Like the compiler flags, it should not
12739 # pollute the global LIBS setting.
12740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_multi_init in -lcurl" >&5
12741 $as_echo_n "checking for curl_multi_init in -lcurl... " >&6; }
12742 if ${ac_cv_lib_curl_curl_multi_init+:} false; then :
12743 $as_echo_n "(cached) " >&6
12744 else
12745 ac_check_lib_save_LIBS=$LIBS
12746 LIBS="-lcurl $LIBS"
12747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12748 /* end confdefs.h. */
12749
12750 /* Override any GCC internal prototype to avoid an error.
12751 Use char because int might match the return type of a GCC
12752 builtin and then its argument prototype would still apply. */
12753 #ifdef __cplusplus
12754 extern "C"
12755 #endif
12756 char curl_multi_init ();
12757 int
12758 main ()
12759 {
12760 return curl_multi_init ();
12761 ;
12762 return 0;
12763 }
12764 _ACEOF
12765 if ac_fn_c_try_link "$LINENO"; then :
12766 ac_cv_lib_curl_curl_multi_init=yes
12767 else
12768 ac_cv_lib_curl_curl_multi_init=no
12769 fi
12770 rm -f core conftest.err conftest.$ac_objext \
12771 conftest$ac_exeext conftest.$ac_ext
12772 LIBS=$ac_check_lib_save_LIBS
12773 fi
12774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curl_curl_multi_init" >&5
12775 $as_echo "$ac_cv_lib_curl_curl_multi_init" >&6; }
12776 if test "x$ac_cv_lib_curl_curl_multi_init" = xyes; then :
12777
12778
12779 $as_echo "#define HAVE_LIBCURL 1" >>confdefs.h
12780
12781 LIBCURL_LDLIBS=-lcurl
12782
12783
12784 else
12785 as_fn_error $? "library 'curl' does not provide curl_multi_init" "$LINENO" 5
12786 fi
12787
12788
12789 LIBS="$LIBCURL_LDLIBS $LIBS"
12790
12791 # Check to see whether the current platform supports threadsafe Curl
12792 # initialization.
12793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl_global_init thread safety" >&5
12794 $as_echo_n "checking for curl_global_init thread safety... " >&6; }
12795 if ${pgac_cv__libcurl_threadsafe_init+:} false; then :
12796 $as_echo_n "(cached) " >&6
12797 else
12798 if test "$cross_compiling" = yes; then :
12799 pgac_cv__libcurl_threadsafe_init=unknown
12800 else
12801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12802 /* end confdefs.h. */
12803
12804 #include <curl/curl.h>
12805
12806 int
12807 main ()
12808 {
12809
12810 curl_version_info_data *info;
12811
12812 if (curl_global_init(CURL_GLOBAL_ALL))
12813 return -1;
12814
12815 info = curl_version_info(CURLVERSION_NOW);
12816 #ifdef CURL_VERSION_THREADSAFE
12817 if (info->features & CURL_VERSION_THREADSAFE)
12818 return 0;
12819 #endif
12820
12821 return 1;
12822
12823 ;
12824 return 0;
12825 }
12826 _ACEOF
12827 if ac_fn_c_try_run "$LINENO"; then :
12828 pgac_cv__libcurl_threadsafe_init=yes
12829 else
12830 pgac_cv__libcurl_threadsafe_init=no
12831 fi
12832 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12833 conftest.$ac_objext conftest.beam conftest.$ac_ext
12834 fi
12835
12836 fi
12837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__libcurl_threadsafe_init" >&5
12838 $as_echo "$pgac_cv__libcurl_threadsafe_init" >&6; }
12839 if test x"$pgac_cv__libcurl_threadsafe_init" = xyes ; then
12840
12841 $as_echo "#define HAVE_THREADSAFE_CURL_GLOBAL_INIT 1" >>confdefs.h
12842
12843 fi
12844
12845 # Fail if a thread-friendly DNS resolver isn't built.
12846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curl support for asynchronous DNS" >&5
12847 $as_echo_n "checking for curl support for asynchronous DNS... " >&6; }
12848 if ${pgac_cv__libcurl_async_dns+:} false; then :
12849 $as_echo_n "(cached) " >&6
12850 else
12851 if test "$cross_compiling" = yes; then :
12852 pgac_cv__libcurl_async_dns=unknown
12853 else
12854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12855 /* end confdefs.h. */
12856
12857 #include <curl/curl.h>
12858
12859 int
12860 main ()
12861 {
12862
12863 curl_version_info_data *info;
12864
12865 if (curl_global_init(CURL_GLOBAL_ALL))
12866 return -1;
12867
12868 info = curl_version_info(CURLVERSION_NOW);
12869 return (info->features & CURL_VERSION_ASYNCHDNS) ? 0 : 1;
12870
12871 ;
12872 return 0;
12873 }
12874 _ACEOF
12875 if ac_fn_c_try_run "$LINENO"; then :
12876 pgac_cv__libcurl_async_dns=yes
12877 else
12878 pgac_cv__libcurl_async_dns=no
12879 fi
12880 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12881 conftest.$ac_objext conftest.beam conftest.$ac_ext
12882 fi
12883
12884 fi
12885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__libcurl_async_dns" >&5
12886 $as_echo "$pgac_cv__libcurl_async_dns" >&6; }
12887 if test x"$pgac_cv__libcurl_async_dns" = xno ; then
12888 as_fn_error $? "
12889 *** The installed version of libcurl does not support asynchronous DNS
12890 *** lookups. Rebuild libcurl with the AsynchDNS feature enabled in order
12891 *** to use it with libpq." "$LINENO" 5
12892 fi
12893
12894 CPPFLAGS=$pgac_save_CPPFLAGS
12895 LDFLAGS=$pgac_save_LDFLAGS
12896 LIBS=$pgac_save_LIBS
12897
12898 fi
12899
12900 if test "$with_gssapi" = yes ; then
12901 if test "$PORTNAME" != "win32"; then
12902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_store_cred_into" >&5
12903 $as_echo_n "checking for library containing gss_store_cred_into... " >&6; }
12904 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12905 $as_echo_n "(cached) " >&6
12906 else
12907 ac_func_search_save_LIBS=$LIBS
12908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12909 /* end confdefs.h. */
12910
12911 /* Override any GCC internal prototype to avoid an error.
12912 Use char because int might match the return type of a GCC
12913 builtin and then its argument prototype would still apply. */
12914 #ifdef __cplusplus
12915 extern "C"
12916 #endif
12917 char gss_store_cred_into ();
12918 int
12919 main ()
12920 {
12921 return gss_store_cred_into ();
12922 ;
12923 return 0;
12924 }
12925 _ACEOF
12926 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12927 if test -z "$ac_lib"; then
12928 ac_res="none required"
12929 else
12930 ac_res=-l$ac_lib
12931 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12932 fi
12933 if ac_fn_c_try_link "$LINENO"; then :
12934 ac_cv_search_gss_store_cred_into=$ac_res
12935 fi
12936 rm -f core conftest.err conftest.$ac_objext \
12937 conftest$ac_exeext
12938 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12939 break
12940 fi
12941 done
12942 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12943
12944 else
12945 ac_cv_search_gss_store_cred_into=no
12946 fi
12947 rm conftest.$ac_ext
12948 LIBS=$ac_func_search_save_LIBS
12949 fi
12950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_store_cred_into" >&5
12951 $as_echo "$ac_cv_search_gss_store_cred_into" >&6; }
12952 ac_res=$ac_cv_search_gss_store_cred_into
12953 if test "$ac_res" != no; then :
12954 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12955
12956 else
12957 as_fn_error $? "could not find function 'gss_store_cred_into' required for GSSAPI" "$LINENO" 5
12958 fi
12959
12960 else
12961 LIBS="$LIBS -lgssapi32"
12962 fi
12963 fi
12964
12965 #
12966 # SSL Library
12967 #
12968 # There is currently only one supported SSL/TLS library: OpenSSL.
12969 #
12970
12971
12972
12973 # Check whether --with-ssl was given.
12974 if test "${with_ssl+set}" = set; then :
12975 withval=$with_ssl;
12976 case $withval in
12977 yes)
12978 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12979 ;;
12980 no)
12981 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12982 ;;
12983 *)
12984
12985 ;;
12986 esac
12987
12988 fi
12989
12990
12991 if test x"$with_ssl" = x"" ; then
12992 with_ssl=no
12993 fi
12994
12995
12996
12997 # Check whether --with-openssl was given.
12998 if test "${with_openssl+set}" = set; then :
12999 withval=$with_openssl;
13000 case $withval in
13001 yes)
13002 :
13003 ;;
13004 no)
13005 :
13006 ;;
13007 *)
13008 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
13009 ;;
13010 esac
13011
13012 else
13013 with_openssl=no
13014
13015 fi
13016
13017
13018 if test "$with_openssl" = yes ; then
13019 with_ssl=openssl
13020 fi
13021
13022 if test "$with_ssl" = openssl ; then
13023 # Minimum required OpenSSL version is 1.1.1
13024
13025 $as_echo "#define OPENSSL_API_COMPAT 0x10101000L" >>confdefs.h
13026
13027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
13028 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
13029 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
13030 $as_echo_n "(cached) " >&6
13031 else
13032 ac_check_lib_save_LIBS=$LIBS
13033 LIBS="-lcrypto $LIBS"
13034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13035 /* end confdefs.h. */
13036
13037 /* Override any GCC internal prototype to avoid an error.
13038 Use char because int might match the return type of a GCC
13039 builtin and then its argument prototype would still apply. */
13040 #ifdef __cplusplus
13041 extern "C"
13042 #endif
13043 char CRYPTO_new_ex_data ();
13044 int
13045 main ()
13046 {
13047 return CRYPTO_new_ex_data ();
13048 ;
13049 return 0;
13050 }
13051 _ACEOF
13052 if ac_fn_c_try_link "$LINENO"; then :
13053 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
13054 else
13055 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
13056 fi
13057 rm -f core conftest.err conftest.$ac_objext \
13058 conftest$ac_exeext conftest.$ac_ext
13059 LIBS=$ac_check_lib_save_LIBS
13060 fi
13061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
13062 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
13063 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
13064 cat >>confdefs.h <<_ACEOF
13065 #define HAVE_LIBCRYPTO 1
13066 _ACEOF
13067
13068 LIBS="-lcrypto $LIBS"
13069
13070 else
13071 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
13072 fi
13073
13074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
13075 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
13076 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
13077 $as_echo_n "(cached) " >&6
13078 else
13079 ac_check_lib_save_LIBS=$LIBS
13080 LIBS="-lssl $LIBS"
13081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13082 /* end confdefs.h. */
13083
13084 /* Override any GCC internal prototype to avoid an error.
13085 Use char because int might match the return type of a GCC
13086 builtin and then its argument prototype would still apply. */
13087 #ifdef __cplusplus
13088 extern "C"
13089 #endif
13090 char SSL_new ();
13091 int
13092 main ()
13093 {
13094 return SSL_new ();
13095 ;
13096 return 0;
13097 }
13098 _ACEOF
13099 if ac_fn_c_try_link "$LINENO"; then :
13100 ac_cv_lib_ssl_SSL_new=yes
13101 else
13102 ac_cv_lib_ssl_SSL_new=no
13103 fi
13104 rm -f core conftest.err conftest.$ac_objext \
13105 conftest$ac_exeext conftest.$ac_ext
13106 LIBS=$ac_check_lib_save_LIBS
13107 fi
13108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
13109 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
13110 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
13111 cat >>confdefs.h <<_ACEOF
13112 #define HAVE_LIBSSL 1
13113 _ACEOF
13114
13115 LIBS="-lssl $LIBS"
13116
13117 else
13118 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
13119 fi
13120
13121 # Functions introduced in OpenSSL 1.1.1.
13122 for ac_func in SSL_CTX_set_ciphersuites
13123 do :
13124 ac_fn_c_check_func "$LINENO" "SSL_CTX_set_ciphersuites" "ac_cv_func_SSL_CTX_set_ciphersuites"
13125 if test "x$ac_cv_func_SSL_CTX_set_ciphersuites" = xyes; then :
13126 cat >>confdefs.h <<_ACEOF
13127 #define HAVE_SSL_CTX_SET_CIPHERSUITES 1
13128 _ACEOF
13129
13130 else
13131 as_fn_error $? "OpenSSL version >= 1.1.1 is required for SSL support" "$LINENO" 5
13132 fi
13133 done
13134
13135 # Function introduced in OpenSSL 1.0.2, not in LibreSSL.
13136 for ac_func in SSL_CTX_set_cert_cb
13137 do :
13138 ac_fn_c_check_func "$LINENO" "SSL_CTX_set_cert_cb" "ac_cv_func_SSL_CTX_set_cert_cb"
13139 if test "x$ac_cv_func_SSL_CTX_set_cert_cb" = xyes; then :
13140 cat >>confdefs.h <<_ACEOF
13141 #define HAVE_SSL_CTX_SET_CERT_CB 1
13142 _ACEOF
13143
13144 fi
13145 done
13146
13147 # Function introduced in OpenSSL 1.1.1, not in LibreSSL.
13148 for ac_func in X509_get_signature_info SSL_CTX_set_num_tickets SSL_CTX_set_keylog_callback
13149 do :
13150 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13151 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13152 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13153 cat >>confdefs.h <<_ACEOF
13154 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13155 _ACEOF
13156
13157 fi
13158 done
13159
13160
13161 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
13162
13163 elif test "$with_ssl" != no ; then
13164 as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
13165 fi
13166
13167
13168 if test "$with_pam" = yes ; then
13169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
13170 $as_echo_n "checking for pam_start in -lpam... " >&6; }
13171 if ${ac_cv_lib_pam_pam_start+:} false; then :
13172 $as_echo_n "(cached) " >&6
13173 else
13174 ac_check_lib_save_LIBS=$LIBS
13175 LIBS="-lpam $LIBS"
13176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13177 /* end confdefs.h. */
13178
13179 /* Override any GCC internal prototype to avoid an error.
13180 Use char because int might match the return type of a GCC
13181 builtin and then its argument prototype would still apply. */
13182 #ifdef __cplusplus
13183 extern "C"
13184 #endif
13185 char pam_start ();
13186 int
13187 main ()
13188 {
13189 return pam_start ();
13190 ;
13191 return 0;
13192 }
13193 _ACEOF
13194 if ac_fn_c_try_link "$LINENO"; then :
13195 ac_cv_lib_pam_pam_start=yes
13196 else
13197 ac_cv_lib_pam_pam_start=no
13198 fi
13199 rm -f core conftest.err conftest.$ac_objext \
13200 conftest$ac_exeext conftest.$ac_ext
13201 LIBS=$ac_check_lib_save_LIBS
13202 fi
13203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
13204 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
13205 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
13206 cat >>confdefs.h <<_ACEOF
13207 #define HAVE_LIBPAM 1
13208 _ACEOF
13209
13210 LIBS="-lpam $LIBS"
13211
13212 else
13213 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
13214 fi
13215
13216 fi
13217
13218 if test "$with_libxml" = yes ; then
13219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
13220 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
13221 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
13222 $as_echo_n "(cached) " >&6
13223 else
13224 ac_check_lib_save_LIBS=$LIBS
13225 LIBS="-lxml2 $LIBS"
13226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13227 /* end confdefs.h. */
13228
13229 /* Override any GCC internal prototype to avoid an error.
13230 Use char because int might match the return type of a GCC
13231 builtin and then its argument prototype would still apply. */
13232 #ifdef __cplusplus
13233 extern "C"
13234 #endif
13235 char xmlSaveToBuffer ();
13236 int
13237 main ()
13238 {
13239 return xmlSaveToBuffer ();
13240 ;
13241 return 0;
13242 }
13243 _ACEOF
13244 if ac_fn_c_try_link "$LINENO"; then :
13245 ac_cv_lib_xml2_xmlSaveToBuffer=yes
13246 else
13247 ac_cv_lib_xml2_xmlSaveToBuffer=no
13248 fi
13249 rm -f core conftest.err conftest.$ac_objext \
13250 conftest$ac_exeext conftest.$ac_ext
13251 LIBS=$ac_check_lib_save_LIBS
13252 fi
13253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
13254 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
13255 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
13256 cat >>confdefs.h <<_ACEOF
13257 #define HAVE_LIBXML2 1
13258 _ACEOF
13259
13260 LIBS="-lxml2 $LIBS"
13261
13262 else
13263 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
13264 fi
13265
13266 fi
13267
13268 if test "$with_libxslt" = yes ; then
13269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
13270 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
13271 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
13272 $as_echo_n "(cached) " >&6
13273 else
13274 ac_check_lib_save_LIBS=$LIBS
13275 LIBS="-lxslt $LIBS"
13276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13277 /* end confdefs.h. */
13278
13279 /* Override any GCC internal prototype to avoid an error.
13280 Use char because int might match the return type of a GCC
13281 builtin and then its argument prototype would still apply. */
13282 #ifdef __cplusplus
13283 extern "C"
13284 #endif
13285 char xsltCleanupGlobals ();
13286 int
13287 main ()
13288 {
13289 return xsltCleanupGlobals ();
13290 ;
13291 return 0;
13292 }
13293 _ACEOF
13294 if ac_fn_c_try_link "$LINENO"; then :
13295 ac_cv_lib_xslt_xsltCleanupGlobals=yes
13296 else
13297 ac_cv_lib_xslt_xsltCleanupGlobals=no
13298 fi
13299 rm -f core conftest.err conftest.$ac_objext \
13300 conftest$ac_exeext conftest.$ac_ext
13301 LIBS=$ac_check_lib_save_LIBS
13302 fi
13303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
13304 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
13305 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
13306 cat >>confdefs.h <<_ACEOF
13307 #define HAVE_LIBXSLT 1
13308 _ACEOF
13309
13310 LIBS="-lxslt $LIBS"
13311
13312 else
13313 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
13314 fi
13315
13316 fi
13317
13318 if test "$with_liburing" = yes; then
13319 _LIBS="$LIBS"
13320 LIBS="$LIBURING_LIBS $LIBS"
13321 for ac_func in io_uring_queue_init_mem
13322 do :
13323 ac_fn_c_check_func "$LINENO" "io_uring_queue_init_mem" "ac_cv_func_io_uring_queue_init_mem"
13324 if test "x$ac_cv_func_io_uring_queue_init_mem" = xyes; then :
13325 cat >>confdefs.h <<_ACEOF
13326 #define HAVE_IO_URING_QUEUE_INIT_MEM 1
13327 _ACEOF
13328
13329 fi
13330 done
13331
13332 LIBS="$_LIBS"
13333 fi
13334
13335 if test "$with_lz4" = yes ; then
13336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5
13337 $as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; }
13338 if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then :
13339 $as_echo_n "(cached) " >&6
13340 else
13341 ac_check_lib_save_LIBS=$LIBS
13342 LIBS="-llz4 $LIBS"
13343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13344 /* end confdefs.h. */
13345
13346 /* Override any GCC internal prototype to avoid an error.
13347 Use char because int might match the return type of a GCC
13348 builtin and then its argument prototype would still apply. */
13349 #ifdef __cplusplus
13350 extern "C"
13351 #endif
13352 char LZ4_compress_default ();
13353 int
13354 main ()
13355 {
13356 return LZ4_compress_default ();
13357 ;
13358 return 0;
13359 }
13360 _ACEOF
13361 if ac_fn_c_try_link "$LINENO"; then :
13362 ac_cv_lib_lz4_LZ4_compress_default=yes
13363 else
13364 ac_cv_lib_lz4_LZ4_compress_default=no
13365 fi
13366 rm -f core conftest.err conftest.$ac_objext \
13367 conftest$ac_exeext conftest.$ac_ext
13368 LIBS=$ac_check_lib_save_LIBS
13369 fi
13370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5
13371 $as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; }
13372 if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then :
13373 cat >>confdefs.h <<_ACEOF
13374 #define HAVE_LIBLZ4 1
13375 _ACEOF
13376
13377 LIBS="-llz4 $LIBS"
13378
13379 else
13380 as_fn_error $? "library 'lz4' is required for LZ4 support" "$LINENO" 5
13381 fi
13382
13383 fi
13384
13385 if test "$with_zstd" = yes ; then
13386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_compress in -lzstd" >&5
13387 $as_echo_n "checking for ZSTD_compress in -lzstd... " >&6; }
13388 if ${ac_cv_lib_zstd_ZSTD_compress+:} false; then :
13389 $as_echo_n "(cached) " >&6
13390 else
13391 ac_check_lib_save_LIBS=$LIBS
13392 LIBS="-lzstd $LIBS"
13393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13394 /* end confdefs.h. */
13395
13396 /* Override any GCC internal prototype to avoid an error.
13397 Use char because int might match the return type of a GCC
13398 builtin and then its argument prototype would still apply. */
13399 #ifdef __cplusplus
13400 extern "C"
13401 #endif
13402 char ZSTD_compress ();
13403 int
13404 main ()
13405 {
13406 return ZSTD_compress ();
13407 ;
13408 return 0;
13409 }
13410 _ACEOF
13411 if ac_fn_c_try_link "$LINENO"; then :
13412 ac_cv_lib_zstd_ZSTD_compress=yes
13413 else
13414 ac_cv_lib_zstd_ZSTD_compress=no
13415 fi
13416 rm -f core conftest.err conftest.$ac_objext \
13417 conftest$ac_exeext conftest.$ac_ext
13418 LIBS=$ac_check_lib_save_LIBS
13419 fi
13420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_compress" >&5
13421 $as_echo "$ac_cv_lib_zstd_ZSTD_compress" >&6; }
13422 if test "x$ac_cv_lib_zstd_ZSTD_compress" = xyes; then :
13423 cat >>confdefs.h <<_ACEOF
13424 #define HAVE_LIBZSTD 1
13425 _ACEOF
13426
13427 LIBS="-lzstd $LIBS"
13428
13429 else
13430 as_fn_error $? "library 'zstd' is required for ZSTD support" "$LINENO" 5
13431 fi
13432
13433 fi
13434
13435 # Note: We can test for libldap_r only after we know PTHREAD_LIBS
13436 if test "$with_ldap" = yes ; then
13437 _LIBS="$LIBS"
13438 if test "$PORTNAME" != "win32"; then
13439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
13440 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
13441 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
13442 $as_echo_n "(cached) " >&6
13443 else
13444 ac_check_lib_save_LIBS=$LIBS
13445 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
13446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13447 /* end confdefs.h. */
13448
13449 /* Override any GCC internal prototype to avoid an error.
13450 Use char because int might match the return type of a GCC
13451 builtin and then its argument prototype would still apply. */
13452 #ifdef __cplusplus
13453 extern "C"
13454 #endif
13455 char ldap_bind ();
13456 int
13457 main ()
13458 {
13459 return ldap_bind ();
13460 ;
13461 return 0;
13462 }
13463 _ACEOF
13464 if ac_fn_c_try_link "$LINENO"; then :
13465 ac_cv_lib_ldap_ldap_bind=yes
13466 else
13467 ac_cv_lib_ldap_ldap_bind=no
13468 fi
13469 rm -f core conftest.err conftest.$ac_objext \
13470 conftest$ac_exeext conftest.$ac_ext
13471 LIBS=$ac_check_lib_save_LIBS
13472 fi
13473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
13474 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
13475 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
13476 cat >>confdefs.h <<_ACEOF
13477 #define HAVE_LIBLDAP 1
13478 _ACEOF
13479
13480 LIBS="-lldap $LIBS"
13481
13482 else
13483 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
13484 fi
13485
13486 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
13487 # This test is carried out against libldap.
13488 for ac_func in ldap_initialize
13489 do :
13490 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
13491 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
13492 cat >>confdefs.h <<_ACEOF
13493 #define HAVE_LDAP_INITIALIZE 1
13494 _ACEOF
13495
13496 fi
13497 done
13498
13499 # The separate ldap_r library only exists in OpenLDAP < 2.5, and if we
13500 # have 2.5 or later, we shouldn't even probe for ldap_r (we might find a
13501 # library from a separate OpenLDAP installation). The most reliable
13502 # way to check that is to check for a function introduced in 2.5.
13503 ac_fn_c_check_func "$LINENO" "ldap_verify_credentials" "ac_cv_func_ldap_verify_credentials"
13504 if test "x$ac_cv_func_ldap_verify_credentials" = xyes; then :
13505 thread_safe_libldap=yes
13506 else
13507 thread_safe_libldap=no
13508 fi
13509
13510 if test "$thread_safe_libldap" = no; then
13511 # Use ldap_r for FE if available, else assume ldap is thread-safe.
13512 # On some platforms ldap_r fails to link without PTHREAD_LIBS.
13513 LIBS="$_LIBS"
13514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
13515 $as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
13516 if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
13517 $as_echo_n "(cached) " >&6
13518 else
13519 ac_check_lib_save_LIBS=$LIBS
13520 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
13521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13522 /* end confdefs.h. */
13523
13524 /* Override any GCC internal prototype to avoid an error.
13525 Use char because int might match the return type of a GCC
13526 builtin and then its argument prototype would still apply. */
13527 #ifdef __cplusplus
13528 extern "C"
13529 #endif
13530 char ldap_bind ();
13531 int
13532 main ()
13533 {
13534 return ldap_bind ();
13535 ;
13536 return 0;
13537 }
13538 _ACEOF
13539 if ac_fn_c_try_link "$LINENO"; then :
13540 ac_cv_lib_ldap_r_ldap_bind=yes
13541 else
13542 ac_cv_lib_ldap_r_ldap_bind=no
13543 fi
13544 rm -f core conftest.err conftest.$ac_objext \
13545 conftest$ac_exeext conftest.$ac_ext
13546 LIBS=$ac_check_lib_save_LIBS
13547 fi
13548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
13549 $as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
13550 if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
13551 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
13552 else
13553 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13554 fi
13555
13556 else
13557 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13558 fi
13559 else
13560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
13561 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
13562 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
13563 $as_echo_n "(cached) " >&6
13564 else
13565 ac_check_lib_save_LIBS=$LIBS
13566 LIBS="-lwldap32 $LIBS"
13567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13568 /* end confdefs.h. */
13569
13570 /* Override any GCC internal prototype to avoid an error.
13571 Use char because int might match the return type of a GCC
13572 builtin and then its argument prototype would still apply. */
13573 #ifdef __cplusplus
13574 extern "C"
13575 #endif
13576 char ldap_bind ();
13577 int
13578 main ()
13579 {
13580 return ldap_bind ();
13581 ;
13582 return 0;
13583 }
13584 _ACEOF
13585 if ac_fn_c_try_link "$LINENO"; then :
13586 ac_cv_lib_wldap32_ldap_bind=yes
13587 else
13588 ac_cv_lib_wldap32_ldap_bind=no
13589 fi
13590 rm -f core conftest.err conftest.$ac_objext \
13591 conftest$ac_exeext conftest.$ac_ext
13592 LIBS=$ac_check_lib_save_LIBS
13593 fi
13594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
13595 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
13596 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
13597 cat >>confdefs.h <<_ACEOF
13598 #define HAVE_LIBWLDAP32 1
13599 _ACEOF
13600
13601 LIBS="-lwldap32 $LIBS"
13602
13603 else
13604 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
13605 fi
13606
13607 LDAP_LIBS_FE="-lwldap32"
13608 LDAP_LIBS_BE="-lwldap32"
13609 fi
13610 LIBS="$_LIBS"
13611 fi
13612
13613
13614
13615 # for contrib/sepgsql
13616 if test "$with_selinux" = yes; then
13617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
13618 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
13619 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
13620 $as_echo_n "(cached) " >&6
13621 else
13622 ac_check_lib_save_LIBS=$LIBS
13623 LIBS="-lselinux $LIBS"
13624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13625 /* end confdefs.h. */
13626
13627 /* Override any GCC internal prototype to avoid an error.
13628 Use char because int might match the return type of a GCC
13629 builtin and then its argument prototype would still apply. */
13630 #ifdef __cplusplus
13631 extern "C"
13632 #endif
13633 char security_compute_create_name ();
13634 int
13635 main ()
13636 {
13637 return security_compute_create_name ();
13638 ;
13639 return 0;
13640 }
13641 _ACEOF
13642 if ac_fn_c_try_link "$LINENO"; then :
13643 ac_cv_lib_selinux_security_compute_create_name=yes
13644 else
13645 ac_cv_lib_selinux_security_compute_create_name=no
13646 fi
13647 rm -f core conftest.err conftest.$ac_objext \
13648 conftest$ac_exeext conftest.$ac_ext
13649 LIBS=$ac_check_lib_save_LIBS
13650 fi
13651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
13652 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
13653 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
13654 cat >>confdefs.h <<_ACEOF
13655 #define HAVE_LIBSELINUX 1
13656 _ACEOF
13657
13658 LIBS="-lselinux $LIBS"
13659
13660 else
13661 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
13662 fi
13663
13664 fi
13665
13666 # for contrib/uuid-ossp
13667 if test "$with_uuid" = bsd ; then
13668 # On BSD, the UUID functions are in libc
13669 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
13670 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
13671 UUID_LIBS=""
13672 else
13673 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
13674 fi
13675
13676 elif test "$with_uuid" = e2fs ; then
13677 # On macOS, the UUID functions are in libc
13678 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
13679 if test "x$ac_cv_func_uuid_generate" = xyes; then :
13680 UUID_LIBS=""
13681 else
13682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
13683 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
13684 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
13685 $as_echo_n "(cached) " >&6
13686 else
13687 ac_check_lib_save_LIBS=$LIBS
13688 LIBS="-luuid $LIBS"
13689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13690 /* end confdefs.h. */
13691
13692 /* Override any GCC internal prototype to avoid an error.
13693 Use char because int might match the return type of a GCC
13694 builtin and then its argument prototype would still apply. */
13695 #ifdef __cplusplus
13696 extern "C"
13697 #endif
13698 char uuid_generate ();
13699 int
13700 main ()
13701 {
13702 return uuid_generate ();
13703 ;
13704 return 0;
13705 }
13706 _ACEOF
13707 if ac_fn_c_try_link "$LINENO"; then :
13708 ac_cv_lib_uuid_uuid_generate=yes
13709 else
13710 ac_cv_lib_uuid_uuid_generate=no
13711 fi
13712 rm -f core conftest.err conftest.$ac_objext \
13713 conftest$ac_exeext conftest.$ac_ext
13714 LIBS=$ac_check_lib_save_LIBS
13715 fi
13716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13717 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13718 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13719 UUID_LIBS="-luuid"
13720 else
13721 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13722 fi
13723
13724 fi
13725
13726 elif test "$with_uuid" = ossp ; then
13727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13728 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13729 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13730 $as_echo_n "(cached) " >&6
13731 else
13732 ac_check_lib_save_LIBS=$LIBS
13733 LIBS="-lossp-uuid $LIBS"
13734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13735 /* end confdefs.h. */
13736
13737 /* Override any GCC internal prototype to avoid an error.
13738 Use char because int might match the return type of a GCC
13739 builtin and then its argument prototype would still apply. */
13740 #ifdef __cplusplus
13741 extern "C"
13742 #endif
13743 char uuid_export ();
13744 int
13745 main ()
13746 {
13747 return uuid_export ();
13748 ;
13749 return 0;
13750 }
13751 _ACEOF
13752 if ac_fn_c_try_link "$LINENO"; then :
13753 ac_cv_lib_ossp_uuid_uuid_export=yes
13754 else
13755 ac_cv_lib_ossp_uuid_uuid_export=no
13756 fi
13757 rm -f core conftest.err conftest.$ac_objext \
13758 conftest$ac_exeext conftest.$ac_ext
13759 LIBS=$ac_check_lib_save_LIBS
13760 fi
13761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13762 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13763 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13764 UUID_LIBS="-lossp-uuid"
13765 else
13766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13767 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
13768 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13769 $as_echo_n "(cached) " >&6
13770 else
13771 ac_check_lib_save_LIBS=$LIBS
13772 LIBS="-luuid $LIBS"
13773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13774 /* end confdefs.h. */
13775
13776 /* Override any GCC internal prototype to avoid an error.
13777 Use char because int might match the return type of a GCC
13778 builtin and then its argument prototype would still apply. */
13779 #ifdef __cplusplus
13780 extern "C"
13781 #endif
13782 char uuid_export ();
13783 int
13784 main ()
13785 {
13786 return uuid_export ();
13787 ;
13788 return 0;
13789 }
13790 _ACEOF
13791 if ac_fn_c_try_link "$LINENO"; then :
13792 ac_cv_lib_uuid_uuid_export=yes
13793 else
13794 ac_cv_lib_uuid_uuid_export=no
13795 fi
13796 rm -f core conftest.err conftest.$ac_objext \
13797 conftest$ac_exeext conftest.$ac_ext
13798 LIBS=$ac_check_lib_save_LIBS
13799 fi
13800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13801 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13802 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13803 UUID_LIBS="-luuid"
13804 else
13805 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13806 fi
13807
13808 fi
13809
13810 fi
13811
13812
13813
13814 ##
13815 ## Header files
13816 ##
13817
13818 for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h mbarrier.h sys/epoll.h sys/event.h sys/personality.h sys/prctl.h sys/procctl.h sys/signalfd.h sys/ucred.h termios.h ucred.h xlocale.h
13819 do :
13820 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13821 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13822 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13823 cat >>confdefs.h <<_ACEOF
13824 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13825 _ACEOF
13826
13827 fi
13828
13829 done
13830
13831
13832 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13833 for ac_header in readline/readline.h
13834 do :
13835 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13836 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13837 cat >>confdefs.h <<_ACEOF
13838 #define HAVE_READLINE_READLINE_H 1
13839 _ACEOF
13840
13841 else
13842 for ac_header in readline.h
13843 do :
13844 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13845 if test "x$ac_cv_header_readline_h" = xyes; then :
13846 cat >>confdefs.h <<_ACEOF
13847 #define HAVE_READLINE_H 1
13848 _ACEOF
13849
13850 else
13851 as_fn_error $? "readline header not found
13852 If you have readline already installed, see config.log for details on the
13853 failure. It is possible the compiler isn't looking in the proper directory.
13854 Use --without-readline to disable readline support." "$LINENO" 5
13855 fi
13856
13857 done
13858
13859 fi
13860
13861 done
13862
13863 for ac_header in readline/history.h
13864 do :
13865 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13866 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13867 cat >>confdefs.h <<_ACEOF
13868 #define HAVE_READLINE_HISTORY_H 1
13869 _ACEOF
13870
13871 else
13872 for ac_header in history.h
13873 do :
13874 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13875 if test "x$ac_cv_header_history_h" = xyes; then :
13876 cat >>confdefs.h <<_ACEOF
13877 #define HAVE_HISTORY_H 1
13878 _ACEOF
13879
13880 else
13881 as_fn_error $? "history header not found
13882 If you have readline already installed, see config.log for details on the
13883 failure. It is possible the compiler isn't looking in the proper directory.
13884 Use --without-readline to disable readline support." "$LINENO" 5
13885 fi
13886
13887 done
13888
13889 fi
13890
13891 done
13892
13893 fi
13894
13895 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13896 # Some installations of libedit usurp /usr/include/readline/, which seems
13897 # bad practice, since in combined installations readline will have its headers
13898 # there. We might have to resort to AC_EGREP checks to make sure we found
13899 # the proper header...
13900 for ac_header in editline/readline.h
13901 do :
13902 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13903 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13904 cat >>confdefs.h <<_ACEOF
13905 #define HAVE_EDITLINE_READLINE_H 1
13906 _ACEOF
13907
13908 else
13909 for ac_header in readline.h
13910 do :
13911 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13912 if test "x$ac_cv_header_readline_h" = xyes; then :
13913 cat >>confdefs.h <<_ACEOF
13914 #define HAVE_READLINE_H 1
13915 _ACEOF
13916
13917 else
13918 for ac_header in readline/readline.h
13919 do :
13920 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13921 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13922 cat >>confdefs.h <<_ACEOF
13923 #define HAVE_READLINE_READLINE_H 1
13924 _ACEOF
13925
13926 else
13927 as_fn_error $? "readline header not found
13928 If you have libedit already installed, see config.log for details on the
13929 failure. It is possible the compiler isn't looking in the proper directory.
13930 Use --without-readline to disable libedit support." "$LINENO" 5
13931 fi
13932
13933 done
13934
13935 fi
13936
13937 done
13938
13939 fi
13940
13941 done
13942
13943 # Note: in a libedit installation, history.h is sometimes a dummy, and may
13944 # not be there at all. Hence, don't complain if not found. We must check
13945 # though, since in yet other versions it is an independent header.
13946 for ac_header in editline/history.h
13947 do :
13948 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13949 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13950 cat >>confdefs.h <<_ACEOF
13951 #define HAVE_EDITLINE_HISTORY_H 1
13952 _ACEOF
13953
13954 else
13955 for ac_header in history.h
13956 do :
13957 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13958 if test "x$ac_cv_header_history_h" = xyes; then :
13959 cat >>confdefs.h <<_ACEOF
13960 #define HAVE_HISTORY_H 1
13961 _ACEOF
13962
13963 else
13964 for ac_header in readline/history.h
13965 do :
13966 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13967 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13968 cat >>confdefs.h <<_ACEOF
13969 #define HAVE_READLINE_HISTORY_H 1
13970 _ACEOF
13971
13972 fi
13973
13974 done
13975
13976 fi
13977
13978 done
13979
13980 fi
13981
13982 done
13983
13984 fi
13985
13986 if test "$with_zlib" = yes; then
13987 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13988 if test "x$ac_cv_header_zlib_h" = xyes; then :
13989
13990 else
13991 as_fn_error $? "zlib header not found
13992 If you have zlib already installed, see config.log for details on the
13993 failure. It is possible the compiler isn't looking in the proper directory.
13994 Use --without-zlib to disable zlib support." "$LINENO" 5
13995 fi
13996
13997
13998 fi
13999
14000 if test -z "$LZ4"; then
14001 for ac_prog in lz4
14002 do
14003 # Extract the first word of "$ac_prog", so it can be a program name with args.
14004 set dummy $ac_prog; ac_word=$2
14005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14006 $as_echo_n "checking for $ac_word... " >&6; }
14007 if ${ac_cv_path_LZ4+:} false; then :
14008 $as_echo_n "(cached) " >&6
14009 else
14010 case $LZ4 in
14011 [\\/]* | ?:[\\/]*)
14012 ac_cv_path_LZ4="$LZ4" # Let the user override the test with a path.
14013 ;;
14014 *)
14015 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14016 for as_dir in $PATH
14017 do
14018 IFS=$as_save_IFS
14019 test -z "$as_dir" && as_dir=.
14020 for ac_exec_ext in '' $ac_executable_extensions; do
14021 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14022 ac_cv_path_LZ4="$as_dir/$ac_word$ac_exec_ext"
14023 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14024 break 2
14025 fi
14026 done
14027 done
14028 IFS=$as_save_IFS
14029
14030 ;;
14031 esac
14032 fi
14033 LZ4=$ac_cv_path_LZ4
14034 if test -n "$LZ4"; then
14035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
14036 $as_echo "$LZ4" >&6; }
14037 else
14038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14039 $as_echo "no" >&6; }
14040 fi
14041
14042
14043 test -n "$LZ4" && break
14044 done
14045
14046 else
14047 # Report the value of LZ4 in configure's output in all cases.
14048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4" >&5
14049 $as_echo_n "checking for LZ4... " >&6; }
14050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
14051 $as_echo "$LZ4" >&6; }
14052 fi
14053
14054 if test "$with_lz4" = yes; then
14055 ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
14056 if test "x$ac_cv_header_lz4_h" = xyes; then :
14057
14058 else
14059 as_fn_error $? "lz4.h header file is required for LZ4" "$LINENO" 5
14060 fi
14061
14062
14063 fi
14064
14065 if test -z "$ZSTD"; then
14066 for ac_prog in zstd
14067 do
14068 # Extract the first word of "$ac_prog", so it can be a program name with args.
14069 set dummy $ac_prog; ac_word=$2
14070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14071 $as_echo_n "checking for $ac_word... " >&6; }
14072 if ${ac_cv_path_ZSTD+:} false; then :
14073 $as_echo_n "(cached) " >&6
14074 else
14075 case $ZSTD in
14076 [\\/]* | ?:[\\/]*)
14077 ac_cv_path_ZSTD="$ZSTD" # Let the user override the test with a path.
14078 ;;
14079 *)
14080 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14081 for as_dir in $PATH
14082 do
14083 IFS=$as_save_IFS
14084 test -z "$as_dir" && as_dir=.
14085 for ac_exec_ext in '' $ac_executable_extensions; do
14086 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14087 ac_cv_path_ZSTD="$as_dir/$ac_word$ac_exec_ext"
14088 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14089 break 2
14090 fi
14091 done
14092 done
14093 IFS=$as_save_IFS
14094
14095 ;;
14096 esac
14097 fi
14098 ZSTD=$ac_cv_path_ZSTD
14099 if test -n "$ZSTD"; then
14100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
14101 $as_echo "$ZSTD" >&6; }
14102 else
14103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14104 $as_echo "no" >&6; }
14105 fi
14106
14107
14108 test -n "$ZSTD" && break
14109 done
14110
14111 else
14112 # Report the value of ZSTD in configure's output in all cases.
14113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD" >&5
14114 $as_echo_n "checking for ZSTD... " >&6; }
14115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
14116 $as_echo "$ZSTD" >&6; }
14117 fi
14118
14119 if test "$with_zstd" = yes; then
14120 ac_fn_c_check_header_mongrel "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default"
14121 if test "x$ac_cv_header_zstd_h" = xyes; then :
14122
14123 else
14124 as_fn_error $? "zstd.h header file is required for ZSTD" "$LINENO" 5
14125 fi
14126
14127
14128 fi
14129
14130 if test "$with_gssapi" = yes ; then
14131 for ac_header in gssapi/gssapi.h
14132 do :
14133 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
14134 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
14135 cat >>confdefs.h <<_ACEOF
14136 #define HAVE_GSSAPI_GSSAPI_H 1
14137 _ACEOF
14138
14139 else
14140 for ac_header in gssapi.h
14141 do :
14142 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
14143 if test "x$ac_cv_header_gssapi_h" = xyes; then :
14144 cat >>confdefs.h <<_ACEOF
14145 #define HAVE_GSSAPI_H 1
14146 _ACEOF
14147
14148 else
14149 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
14150 fi
14151
14152 done
14153
14154 fi
14155
14156 done
14157
14158 for ac_header in gssapi/gssapi_ext.h
14159 do :
14160 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi_ext.h" "ac_cv_header_gssapi_gssapi_ext_h" "$ac_includes_default"
14161 if test "x$ac_cv_header_gssapi_gssapi_ext_h" = xyes; then :
14162 cat >>confdefs.h <<_ACEOF
14163 #define HAVE_GSSAPI_GSSAPI_EXT_H 1
14164 _ACEOF
14165
14166 else
14167 for ac_header in gssapi_ext.h
14168 do :
14169 ac_fn_c_check_header_mongrel "$LINENO" "gssapi_ext.h" "ac_cv_header_gssapi_ext_h" "$ac_includes_default"
14170 if test "x$ac_cv_header_gssapi_ext_h" = xyes; then :
14171 cat >>confdefs.h <<_ACEOF
14172 #define HAVE_GSSAPI_EXT_H 1
14173 _ACEOF
14174
14175 else
14176 as_fn_error $? "gssapi_ext.h header file is required for GSSAPI" "$LINENO" 5
14177 fi
14178
14179 done
14180
14181 fi
14182
14183 done
14184
14185 fi
14186
14187 if test -z "$OPENSSL"; then
14188 for ac_prog in openssl
14189 do
14190 # Extract the first word of "$ac_prog", so it can be a program name with args.
14191 set dummy $ac_prog; ac_word=$2
14192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14193 $as_echo_n "checking for $ac_word... " >&6; }
14194 if ${ac_cv_path_OPENSSL+:} false; then :
14195 $as_echo_n "(cached) " >&6
14196 else
14197 case $OPENSSL in
14198 [\\/]* | ?:[\\/]*)
14199 ac_cv_path_OPENSSL="$OPENSSL" # Let the user override the test with a path.
14200 ;;
14201 *)
14202 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14203 for as_dir in $PATH
14204 do
14205 IFS=$as_save_IFS
14206 test -z "$as_dir" && as_dir=.
14207 for ac_exec_ext in '' $ac_executable_extensions; do
14208 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14209 ac_cv_path_OPENSSL="$as_dir/$ac_word$ac_exec_ext"
14210 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14211 break 2
14212 fi
14213 done
14214 done
14215 IFS=$as_save_IFS
14216
14217 ;;
14218 esac
14219 fi
14220 OPENSSL=$ac_cv_path_OPENSSL
14221 if test -n "$OPENSSL"; then
14222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
14223 $as_echo "$OPENSSL" >&6; }
14224 else
14225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14226 $as_echo "no" >&6; }
14227 fi
14228
14229
14230 test -n "$OPENSSL" && break
14231 done
14232
14233 else
14234 # Report the value of OPENSSL in configure's output in all cases.
14235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
14236 $as_echo_n "checking for OPENSSL... " >&6; }
14237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
14238 $as_echo "$OPENSSL" >&6; }
14239 fi
14240
14241 pgac_openssl_version="$($OPENSSL version 2> /dev/null || echo openssl not found)"
14242 { $as_echo "$as_me:${as_lineno-$LINENO}: using openssl: $pgac_openssl_version" >&5
14243 $as_echo "$as_me: using openssl: $pgac_openssl_version" >&6;}
14244 if test "$with_ssl" = openssl ; then
14245 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
14246 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
14247
14248 else
14249 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
14250 fi
14251
14252
14253 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
14254 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
14255
14256 else
14257 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
14258 fi
14259
14260
14261 fi
14262
14263 if test "$with_pam" = yes ; then
14264 for ac_header in security/pam_appl.h
14265 do :
14266 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
14267 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
14268 cat >>confdefs.h <<_ACEOF
14269 #define HAVE_SECURITY_PAM_APPL_H 1
14270 _ACEOF
14271
14272 else
14273 for ac_header in pam/pam_appl.h
14274 do :
14275 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
14276 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
14277 cat >>confdefs.h <<_ACEOF
14278 #define HAVE_PAM_PAM_APPL_H 1
14279 _ACEOF
14280
14281 else
14282 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
14283 fi
14284
14285 done
14286
14287 fi
14288
14289 done
14290
14291 fi
14292
14293 if test "$with_bsd_auth" = yes ; then
14294 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
14295 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
14296
14297 else
14298 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
14299 fi
14300
14301
14302 fi
14303
14304 if test "$with_systemd" = yes ; then
14305 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
14306 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
14307
14308 else
14309 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
14310 fi
14311
14312
14313 fi
14314
14315 if test "$with_libxml" = yes ; then
14316 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
14317 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
14318
14319 else
14320 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
14321 fi
14322
14323
14324 fi
14325
14326 if test "$with_libxslt" = yes ; then
14327 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
14328 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
14329
14330 else
14331 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
14332 fi
14333
14334
14335 fi
14336
14337 if test "$with_ldap" = yes ; then
14338 if test "$PORTNAME" != "win32"; then
14339 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
14340 if test "x$ac_cv_header_ldap_h" = xyes; then :
14341
14342 else
14343 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
14344 fi
14345
14346
14347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
14348 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
14349 if ${pgac_cv_ldap_safe+:} false; then :
14350 $as_echo_n "(cached) " >&6
14351 else
14352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14353 /* end confdefs.h. */
14354 #include <ldap.h>
14355 #if !defined(LDAP_VENDOR_VERSION) || \
14356 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
14357 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
14358 choke me
14359 #endif
14360 int
14361 main ()
14362 {
14363
14364 ;
14365 return 0;
14366 }
14367 _ACEOF
14368 if ac_fn_c_try_compile "$LINENO"; then :
14369 pgac_cv_ldap_safe=yes
14370 else
14371 pgac_cv_ldap_safe=no
14372 fi
14373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14374 fi
14375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
14376 $as_echo "$pgac_cv_ldap_safe" >&6; }
14377
14378 if test "$pgac_cv_ldap_safe" != yes; then
14379 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
14380 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
14381 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
14382 *** also uses LDAP will crash on exit." >&5
14383 $as_echo "$as_me: WARNING:
14384 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
14385 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
14386 *** also uses LDAP will crash on exit." >&2;}
14387 fi
14388 else
14389 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
14390 #include <windows.h>
14391
14392 "
14393 if test "x$ac_cv_header_winldap_h" = xyes; then :
14394
14395 else
14396 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
14397 fi
14398
14399
14400 fi
14401 fi
14402
14403 if test "$with_bonjour" = yes ; then
14404 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
14405 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
14406
14407 else
14408 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
14409 fi
14410
14411
14412 fi
14413
14414 # for contrib/uuid-ossp
14415 if test "$with_uuid" = bsd ; then
14416 for ac_header in uuid.h
14417 do :
14418 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14419 if test "x$ac_cv_header_uuid_h" = xyes; then :
14420 cat >>confdefs.h <<_ACEOF
14421 #define HAVE_UUID_H 1
14422 _ACEOF
14423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14424 /* end confdefs.h. */
14425 #include <uuid.h>
14426
14427 _ACEOF
14428 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14429 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
14430
14431 else
14432 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
14433 fi
14434 rm -f conftest*
14435
14436 else
14437 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
14438 fi
14439
14440 done
14441
14442 elif test "$with_uuid" = e2fs ; then
14443 for ac_header in uuid/uuid.h
14444 do :
14445 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
14446 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
14447 cat >>confdefs.h <<_ACEOF
14448 #define HAVE_UUID_UUID_H 1
14449 _ACEOF
14450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14451 /* end confdefs.h. */
14452 #include <uuid/uuid.h>
14453
14454 _ACEOF
14455 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14456 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14457
14458 else
14459 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
14460 fi
14461 rm -f conftest*
14462
14463 else
14464 for ac_header in uuid.h
14465 do :
14466 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14467 if test "x$ac_cv_header_uuid_h" = xyes; then :
14468 cat >>confdefs.h <<_ACEOF
14469 #define HAVE_UUID_H 1
14470 _ACEOF
14471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14472 /* end confdefs.h. */
14473 #include <uuid.h>
14474
14475 _ACEOF
14476 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14477 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14478
14479 else
14480 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
14481 fi
14482 rm -f conftest*
14483
14484 else
14485 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
14486 fi
14487
14488 done
14489
14490 fi
14491
14492 done
14493
14494 elif test "$with_uuid" = ossp ; then
14495 for ac_header in ossp/uuid.h
14496 do :
14497 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
14498 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
14499 cat >>confdefs.h <<_ACEOF
14500 #define HAVE_OSSP_UUID_H 1
14501 _ACEOF
14502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14503 /* end confdefs.h. */
14504 #include <ossp/uuid.h>
14505
14506 _ACEOF
14507 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14508 $EGREP "uuid_export" >/dev/null 2>&1; then :
14509
14510 else
14511 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
14512 fi
14513 rm -f conftest*
14514
14515 else
14516 for ac_header in uuid.h
14517 do :
14518 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14519 if test "x$ac_cv_header_uuid_h" = xyes; then :
14520 cat >>confdefs.h <<_ACEOF
14521 #define HAVE_UUID_H 1
14522 _ACEOF
14523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14524 /* end confdefs.h. */
14525 #include <uuid.h>
14526
14527 _ACEOF
14528 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14529 $EGREP "uuid_export" >/dev/null 2>&1; then :
14530
14531 else
14532 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
14533 fi
14534 rm -f conftest*
14535
14536 else
14537 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
14538 fi
14539
14540 done
14541
14542 fi
14543
14544 done
14545
14546 fi
14547
14548 if test "$PORTNAME" = "win32" ; then
14549 for ac_header in crtdefs.h
14550 do :
14551 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
14552 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
14553 cat >>confdefs.h <<_ACEOF
14554 #define HAVE_CRTDEFS_H 1
14555 _ACEOF
14556
14557 fi
14558
14559 done
14560
14561 fi
14562
14563 if test "$with_libcurl" = yes ; then
14564 # Error out early if this platform can't support libpq-oauth.
14565 if test "$ac_cv_header_sys_event_h" != yes -a "$ac_cv_header_sys_epoll_h" != yes; then
14566 as_fn_error $? "client-side OAuth is not supported on this platform" "$LINENO" 5
14567 fi
14568 fi
14569
14570 ##
14571 ## Types, structures, compiler characteristics
14572 ##
14573
14574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14575 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
14576 if ${ac_cv_c_bigendian+:} false; then :
14577 $as_echo_n "(cached) " >&6
14578 else
14579 ac_cv_c_bigendian=unknown
14580 # See if we're dealing with a universal compiler.
14581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14582 /* end confdefs.h. */
14583 #ifndef __APPLE_CC__
14584 not a universal capable compiler
14585 #endif
14586 typedef int dummy;
14587
14588 _ACEOF
14589 if ac_fn_c_try_compile "$LINENO"; then :
14590
14591 # Check for potential -arch flags. It is not universal unless
14592 # there are at least two -arch flags with different values.
14593 ac_arch=
14594 ac_prev=
14595 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14596 if test -n "$ac_prev"; then
14597 case $ac_word in
14598 i?86 | x86_64 | ppc | ppc64)
14599 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14600 ac_arch=$ac_word
14601 else
14602 ac_cv_c_bigendian=universal
14603 break
14604 fi
14605 ;;
14606 esac
14607 ac_prev=
14608 elif test "x$ac_word" = "x-arch"; then
14609 ac_prev=arch
14610 fi
14611 done
14612 fi
14613 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14614 if test $ac_cv_c_bigendian = unknown; then
14615 # See if sys/param.h defines the BYTE_ORDER macro.
14616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14617 /* end confdefs.h. */
14618 #include <sys/types.h>
14619 #include <sys/param.h>
14620
14621 int
14622 main ()
14623 {
14624 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14625 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14626 && LITTLE_ENDIAN)
14627 bogus endian macros
14628 #endif
14629
14630 ;
14631 return 0;
14632 }
14633 _ACEOF
14634 if ac_fn_c_try_compile "$LINENO"; then :
14635 # It does; now see whether it defined to BIG_ENDIAN or not.
14636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14637 /* end confdefs.h. */
14638 #include <sys/types.h>
14639 #include <sys/param.h>
14640
14641 int
14642 main ()
14643 {
14644 #if BYTE_ORDER != BIG_ENDIAN
14645 not big endian
14646 #endif
14647
14648 ;
14649 return 0;
14650 }
14651 _ACEOF
14652 if ac_fn_c_try_compile "$LINENO"; then :
14653 ac_cv_c_bigendian=yes
14654 else
14655 ac_cv_c_bigendian=no
14656 fi
14657 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14658 fi
14659 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14660 fi
14661 if test $ac_cv_c_bigendian = unknown; then
14662 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14664 /* end confdefs.h. */
14665 #include <limits.h>
14666
14667 int
14668 main ()
14669 {
14670 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14671 bogus endian macros
14672 #endif
14673
14674 ;
14675 return 0;
14676 }
14677 _ACEOF
14678 if ac_fn_c_try_compile "$LINENO"; then :
14679 # It does; now see whether it defined to _BIG_ENDIAN or not.
14680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14681 /* end confdefs.h. */
14682 #include <limits.h>
14683
14684 int
14685 main ()
14686 {
14687 #ifndef _BIG_ENDIAN
14688 not big endian
14689 #endif
14690
14691 ;
14692 return 0;
14693 }
14694 _ACEOF
14695 if ac_fn_c_try_compile "$LINENO"; then :
14696 ac_cv_c_bigendian=yes
14697 else
14698 ac_cv_c_bigendian=no
14699 fi
14700 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14701 fi
14702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14703 fi
14704 if test $ac_cv_c_bigendian = unknown; then
14705 # Compile a test program.
14706 if test "$cross_compiling" = yes; then :
14707 # Try to guess by grepping values from an object file.
14708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14709 /* end confdefs.h. */
14710 short int ascii_mm[] =
14711 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14712 short int ascii_ii[] =
14713 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14714 int use_ascii (int i) {
14715 return ascii_mm[i] + ascii_ii[i];
14716 }
14717 short int ebcdic_ii[] =
14718 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14719 short int ebcdic_mm[] =
14720 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14721 int use_ebcdic (int i) {
14722 return ebcdic_mm[i] + ebcdic_ii[i];
14723 }
14724 extern int foo;
14725
14726 int
14727 main ()
14728 {
14729 return use_ascii (foo) == use_ebcdic (foo);
14730 ;
14731 return 0;
14732 }
14733 _ACEOF
14734 if ac_fn_c_try_compile "$LINENO"; then :
14735 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14736 ac_cv_c_bigendian=yes
14737 fi
14738 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14739 if test "$ac_cv_c_bigendian" = unknown; then
14740 ac_cv_c_bigendian=no
14741 else
14742 # finding both strings is unlikely to happen, but who knows?
14743 ac_cv_c_bigendian=unknown
14744 fi
14745 fi
14746 fi
14747 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14748 else
14749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14750 /* end confdefs.h. */
14751 $ac_includes_default
14752 int
14753 main ()
14754 {
14755
14756 /* Are we little or big endian? From Harbison&Steele. */
14757 union
14758 {
14759 long int l;
14760 char c[sizeof (long int)];
14761 } u;
14762 u.l = 1;
14763 return u.c[sizeof (long int) - 1] == 1;
14764
14765 ;
14766 return 0;
14767 }
14768 _ACEOF
14769 if ac_fn_c_try_run "$LINENO"; then :
14770 ac_cv_c_bigendian=no
14771 else
14772 ac_cv_c_bigendian=yes
14773 fi
14774 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14775 conftest.$ac_objext conftest.beam conftest.$ac_ext
14776 fi
14777
14778 fi
14779 fi
14780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14781 $as_echo "$ac_cv_c_bigendian" >&6; }
14782 case $ac_cv_c_bigendian in #(
14783 yes)
14784 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14785 ;; #(
14786 no)
14787 ;; #(
14788 universal)
14789
14790 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14791
14792 ;; #(
14793 *)
14794 as_fn_error $? "unknown endianness
14795 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14796 esac
14797
14798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14799 $as_echo_n "checking for inline... " >&6; }
14800 if ${ac_cv_c_inline+:} false; then :
14801 $as_echo_n "(cached) " >&6
14802 else
14803 ac_cv_c_inline=no
14804 for ac_kw in inline __inline__ __inline; do
14805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14806 /* end confdefs.h. */
14807 #ifndef __cplusplus
14808 typedef int foo_t;
14809 static $ac_kw foo_t static_foo () {return 0; }
14810 $ac_kw foo_t foo () {return 0; }
14811 #endif
14812
14813 _ACEOF
14814 if ac_fn_c_try_compile "$LINENO"; then :
14815 ac_cv_c_inline=$ac_kw
14816 fi
14817 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14818 test "$ac_cv_c_inline" != no && break
14819 done
14820
14821 fi
14822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14823 $as_echo "$ac_cv_c_inline" >&6; }
14824
14825 case $ac_cv_c_inline in
14826 inline | yes) ;;
14827 *)
14828 case $ac_cv_c_inline in
14829 no) ac_val=;;
14830 *) ac_val=$ac_cv_c_inline;;
14831 esac
14832 cat >>confdefs.h <<_ACEOF
14833 #ifndef __cplusplus
14834 #define inline $ac_val
14835 #endif
14836 _ACEOF
14837 ;;
14838 esac
14839
14840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C printf format archetype" >&5
14841 $as_echo_n "checking for C printf format archetype... " >&6; }
14842 if ${pgac_cv_printf_archetype+:} false; then :
14843 $as_echo_n "(cached) " >&6
14844 else
14845 pgac_cv_printf_archetype=gnu_printf
14846 ac_save_c_werror_flag=$ac_c_werror_flag
14847 ac_c_werror_flag=yes
14848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14849 /* end confdefs.h. */
14850 extern void pgac_write(int ignore, const char *fmt,...)
14851 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14852 int
14853 main ()
14854 {
14855 pgac_write(0, "error %s: %m", "foo");
14856 ;
14857 return 0;
14858 }
14859 _ACEOF
14860 if ac_fn_c_try_compile "$LINENO"; then :
14861 ac_archetype_ok=yes
14862 else
14863 ac_archetype_ok=no
14864 fi
14865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14866 ac_c_werror_flag=$ac_save_c_werror_flag
14867
14868 if [ "$ac_archetype_ok" = no ]; then
14869 pgac_cv_printf_archetype=__syslog__
14870 ac_save_c_werror_flag=$ac_c_werror_flag
14871 ac_c_werror_flag=yes
14872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14873 /* end confdefs.h. */
14874 extern void pgac_write(int ignore, const char *fmt,...)
14875 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14876 int
14877 main ()
14878 {
14879 pgac_write(0, "error %s: %m", "foo");
14880 ;
14881 return 0;
14882 }
14883 _ACEOF
14884 if ac_fn_c_try_compile "$LINENO"; then :
14885 ac_archetype_ok=yes
14886 else
14887 ac_archetype_ok=no
14888 fi
14889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14890 ac_c_werror_flag=$ac_save_c_werror_flag
14891
14892 if [ "$ac_archetype_ok" = no ]; then
14893 pgac_cv_printf_archetype=printf
14894 fi
14895 fi
14896 fi
14897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14898 $as_echo "$pgac_cv_printf_archetype" >&6; }
14899
14900 cat >>confdefs.h <<_ACEOF
14901 #define PG_C_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14902 _ACEOF
14903
14904
14905
14906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ printf format archetype" >&5
14907 $as_echo_n "checking for C++ printf format archetype... " >&6; }
14908 if ${pgac_cv_cxx_printf_archetype+:} false; then :
14909 $as_echo_n "(cached) " >&6
14910 else
14911 pgac_cv_cxx_printf_archetype=gnu_printf
14912 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
14913 ac_cxx_werror_flag=yes
14914 ac_ext=cpp
14915 ac_cpp='$CXXCPP $CPPFLAGS'
14916 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14917 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14918 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14919
14920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14921 /* end confdefs.h. */
14922 extern void pgac_write(int ignore, const char *fmt,...)
14923 __attribute__((format($pgac_cv_cxx_printf_archetype, 2, 3)));
14924 int
14925 main ()
14926 {
14927 pgac_write(0, "error %s: %m", "foo");
14928 ;
14929 return 0;
14930 }
14931 _ACEOF
14932 if ac_fn_cxx_try_compile "$LINENO"; then :
14933 ac_archetype_ok=yes
14934 else
14935 ac_archetype_ok=no
14936 fi
14937 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14938 ac_ext=c
14939 ac_cpp='$CPP $CPPFLAGS'
14940 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14941 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14942 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14943
14944 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
14945
14946 if [ "$ac_archetype_ok" = no ]; then
14947 pgac_cv_cxx_printf_archetype=__syslog__
14948 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
14949 ac_cxx_werror_flag=yes
14950 ac_ext=cpp
14951 ac_cpp='$CXXCPP $CPPFLAGS'
14952 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14953 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14954 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14955
14956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14957 /* end confdefs.h. */
14958 extern void pgac_write(int ignore, const char *fmt,...)
14959 __attribute__((format($pgac_cv_cxx_printf_archetype, 2, 3)));
14960 int
14961 main ()
14962 {
14963 pgac_write(0, "error %s: %m", "foo");
14964 ;
14965 return 0;
14966 }
14967 _ACEOF
14968 if ac_fn_cxx_try_compile "$LINENO"; then :
14969 ac_archetype_ok=yes
14970 else
14971 ac_archetype_ok=no
14972 fi
14973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14974 ac_ext=c
14975 ac_cpp='$CPP $CPPFLAGS'
14976 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14977 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14978 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14979
14980 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
14981
14982 if [ "$ac_archetype_ok" = no ]; then
14983 pgac_cv_cxx_printf_archetype=printf
14984 fi
14985 fi
14986 fi
14987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_cxx_printf_archetype" >&5
14988 $as_echo "$pgac_cv_cxx_printf_archetype" >&6; }
14989
14990 cat >>confdefs.h <<_ACEOF
14991 #define PG_CXX_PRINTF_ATTRIBUTE $pgac_cv_cxx_printf_archetype
14992 _ACEOF
14993
14994
14995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14996 $as_echo_n "checking for _Static_assert... " >&6; }
14997 if ${pgac_cv__static_assert+:} false; then :
14998 $as_echo_n "(cached) " >&6
14999 else
15000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15001 /* end confdefs.h. */
15002
15003 int
15004 main ()
15005 {
15006 ({ _Static_assert(1, "foo"); })
15007 ;
15008 return 0;
15009 }
15010 _ACEOF
15011 if ac_fn_c_try_link "$LINENO"; then :
15012 pgac_cv__static_assert=yes
15013 else
15014 pgac_cv__static_assert=no
15015 fi
15016 rm -f core conftest.err conftest.$ac_objext \
15017 conftest$ac_exeext conftest.$ac_ext
15018 fi
15019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
15020 $as_echo "$pgac_cv__static_assert" >&6; }
15021 if test x"$pgac_cv__static_assert" = xyes ; then
15022
15023 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
15024
15025 fi
15026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
15027 $as_echo_n "checking for typeof... " >&6; }
15028 if ${pgac_cv_c_typeof+:} false; then :
15029 $as_echo_n "(cached) " >&6
15030 else
15031 pgac_cv_c_typeof=no
15032 for pgac_kw in typeof __typeof__; do
15033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15034 /* end confdefs.h. */
15035
15036 int
15037 main ()
15038 {
15039 int x = 0;
15040 $pgac_kw(x) y;
15041 y = x;
15042 return y;
15043 ;
15044 return 0;
15045 }
15046 _ACEOF
15047 if ac_fn_c_try_compile "$LINENO"; then :
15048 pgac_cv_c_typeof=$pgac_kw
15049 fi
15050 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15051 test "$pgac_cv_c_typeof" != no && break
15052 done
15053 fi
15054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
15055 $as_echo "$pgac_cv_c_typeof" >&6; }
15056 if test "$pgac_cv_c_typeof" != no; then
15057
15058 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
15059
15060 if test "$pgac_cv_c_typeof" != typeof; then
15061
15062 cat >>confdefs.h <<_ACEOF
15063 #define typeof $pgac_cv_c_typeof
15064 _ACEOF
15065
15066 fi
15067 fi
15068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
15069 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
15070 if ${pgac_cv__types_compatible+:} false; then :
15071 $as_echo_n "(cached) " >&6
15072 else
15073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15074 /* end confdefs.h. */
15075
15076 int
15077 main ()
15078 {
15079 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
15080 ;
15081 return 0;
15082 }
15083 _ACEOF
15084 if ac_fn_c_try_compile "$LINENO"; then :
15085 pgac_cv__types_compatible=yes
15086 else
15087 pgac_cv__types_compatible=no
15088 fi
15089 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15090 fi
15091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
15092 $as_echo "$pgac_cv__types_compatible" >&6; }
15093 if test x"$pgac_cv__types_compatible" = xyes ; then
15094
15095 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
15096
15097 fi
15098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
15099 $as_echo_n "checking for __builtin_constant_p... " >&6; }
15100 if ${pgac_cv__builtin_constant_p+:} false; then :
15101 $as_echo_n "(cached) " >&6
15102 else
15103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15104 /* end confdefs.h. */
15105 static int x;
15106 static int y[__builtin_constant_p(x) ? x : 1];
15107 static int z[__builtin_constant_p("string literal") ? 1 : x];
15108
15109
15110 _ACEOF
15111 if ac_fn_c_try_compile "$LINENO"; then :
15112 pgac_cv__builtin_constant_p=yes
15113 else
15114 pgac_cv__builtin_constant_p=no
15115 fi
15116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15117 fi
15118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
15119 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
15120 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
15121
15122 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
15123
15124 fi
15125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
15126 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
15127 if ${pgac_cv__builtin_op_overflow+:} false; then :
15128 $as_echo_n "(cached) " >&6
15129 else
15130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15131 /* end confdefs.h. */
15132
15133 #include <stdint.h>
15134 int64_t a = 1;
15135 int64_t b = 1;
15136 int64_t result;
15137 int oflo;
15138
15139 int
15140 main ()
15141 {
15142 oflo = __builtin_mul_overflow(a, b, &result);
15143 ;
15144 return 0;
15145 }
15146 _ACEOF
15147 if ac_fn_c_try_link "$LINENO"; then :
15148 pgac_cv__builtin_op_overflow=yes
15149 else
15150 pgac_cv__builtin_op_overflow=no
15151 fi
15152 rm -f core conftest.err conftest.$ac_objext \
15153 conftest$ac_exeext conftest.$ac_ext
15154 fi
15155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
15156 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
15157 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
15158
15159 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
15160
15161 fi
15162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
15163 $as_echo_n "checking for __builtin_unreachable... " >&6; }
15164 if ${pgac_cv__builtin_unreachable+:} false; then :
15165 $as_echo_n "(cached) " >&6
15166 else
15167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15168 /* end confdefs.h. */
15169
15170 int
15171 main ()
15172 {
15173 __builtin_unreachable();
15174 ;
15175 return 0;
15176 }
15177 _ACEOF
15178 if ac_fn_c_try_link "$LINENO"; then :
15179 pgac_cv__builtin_unreachable=yes
15180 else
15181 pgac_cv__builtin_unreachable=no
15182 fi
15183 rm -f core conftest.err conftest.$ac_objext \
15184 conftest$ac_exeext conftest.$ac_ext
15185 fi
15186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
15187 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
15188 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
15189
15190 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
15191
15192 fi
15193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
15194 $as_echo_n "checking for computed goto support... " >&6; }
15195 if ${pgac_cv_computed_goto+:} false; then :
15196 $as_echo_n "(cached) " >&6
15197 else
15198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15199 /* end confdefs.h. */
15200
15201 int
15202 main ()
15203 {
15204 void *labeladdrs[] = {&&my_label};
15205 goto *labeladdrs[0];
15206 my_label:
15207 return 1;
15208
15209 ;
15210 return 0;
15211 }
15212 _ACEOF
15213 if ac_fn_c_try_compile "$LINENO"; then :
15214 pgac_cv_computed_goto=yes
15215 else
15216 pgac_cv_computed_goto=no
15217 fi
15218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15219 fi
15220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
15221 $as_echo "$pgac_cv_computed_goto" >&6; }
15222 if test x"$pgac_cv_computed_goto" = xyes ; then
15223
15224 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
15225
15226 fi
15227 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
15228 #include <time.h>
15229
15230 "
15231 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
15232
15233 cat >>confdefs.h <<_ACEOF
15234 #define HAVE_STRUCT_TM_TM_ZONE 1
15235 _ACEOF
15236
15237
15238 fi
15239
15240
15241 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
15242 #include <sys/ipc.h>
15243 #include <sys/sem.h>
15244
15245 "
15246 if test "x$ac_cv_type_union_semun" = xyes; then :
15247
15248 cat >>confdefs.h <<_ACEOF
15249 #define HAVE_UNION_SEMUN 1
15250 _ACEOF
15251
15252
15253 fi
15254
15255 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/socket.h>
15256 "
15257 if test "x$ac_cv_type_socklen_t" = xyes; then :
15258
15259 cat >>confdefs.h <<_ACEOF
15260 #define HAVE_SOCKLEN_T 1
15261 _ACEOF
15262
15263
15264 fi
15265
15266 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
15267 #include <sys/socket.h>
15268
15269 "
15270 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
15271
15272 cat >>confdefs.h <<_ACEOF
15273 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
15274 _ACEOF
15275
15276
15277 fi
15278
15279
15280 # MSVC doesn't cope well with defining restrict to __restrict, the
15281 # spelling it understands, because it conflicts with
15282 # __declspec(restrict). Therefore we define pg_restrict to the
15283 # appropriate definition, which presumably won't conflict.
15284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
15285 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
15286 if ${ac_cv_c_restrict+:} false; then :
15287 $as_echo_n "(cached) " >&6
15288 else
15289 ac_cv_c_restrict=no
15290 # The order here caters to the fact that C++ does not require restrict.
15291 for ac_kw in __restrict __restrict__ _Restrict restrict; do
15292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15293 /* end confdefs.h. */
15294 typedef int * int_ptr;
15295 int foo (int_ptr $ac_kw ip) {
15296 return ip[0];
15297 }
15298 int
15299 main ()
15300 {
15301 int s[1];
15302 int * $ac_kw t = s;
15303 t[0] = 0;
15304 return foo(t)
15305 ;
15306 return 0;
15307 }
15308 _ACEOF
15309 if ac_fn_c_try_compile "$LINENO"; then :
15310 ac_cv_c_restrict=$ac_kw
15311 fi
15312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15313 test "$ac_cv_c_restrict" != no && break
15314 done
15315
15316 fi
15317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
15318 $as_echo "$ac_cv_c_restrict" >&6; }
15319
15320 case $ac_cv_c_restrict in
15321 restrict) ;;
15322 no) $as_echo "#define restrict /**/" >>confdefs.h
15323 ;;
15324 *) cat >>confdefs.h <<_ACEOF
15325 #define restrict $ac_cv_c_restrict
15326 _ACEOF
15327 ;;
15328 esac
15329
15330 if test "$ac_cv_c_restrict" = "no"; then
15331 pg_restrict=""
15332 else
15333 pg_restrict="$ac_cv_c_restrict"
15334 fi
15335
15336 cat >>confdefs.h <<_ACEOF
15337 #define pg_restrict $pg_restrict
15338 _ACEOF
15339
15340
15341 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
15342 #include <getopt.h>
15343 #endif
15344 "
15345 if test "x$ac_cv_type_struct_option" = xyes; then :
15346
15347 cat >>confdefs.h <<_ACEOF
15348 #define HAVE_STRUCT_OPTION 1
15349 _ACEOF
15350
15351
15352 fi
15353
15354
15355 case $host_cpu in
15356 x86_64)
15357 # On x86_64, check if we can compile a popcntq instruction
15358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
15359 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
15360 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
15361 $as_echo_n "(cached) " >&6
15362 else
15363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15364 /* end confdefs.h. */
15365
15366 int
15367 main ()
15368 {
15369 long long x = 1; long long r;
15370 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
15371 ;
15372 return 0;
15373 }
15374 _ACEOF
15375 if ac_fn_c_try_compile "$LINENO"; then :
15376 pgac_cv_have_x86_64_popcntq=yes
15377 else
15378 pgac_cv_have_x86_64_popcntq=no
15379 fi
15380 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15381 fi
15382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
15383 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
15384 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
15385
15386 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
15387
15388 fi
15389 ;;
15390 ppc*|powerpc*)
15391 # On PPC, check if compiler accepts "i"(x) when __builtin_constant_p(x).
15392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
15393 $as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
15394 if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
15395 $as_echo_n "(cached) " >&6
15396 else
15397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15398 /* end confdefs.h. */
15399 static inline int
15400 addi(int ra, int si)
15401 {
15402 int res = 0;
15403 if (__builtin_constant_p(si))
15404 __asm__ __volatile__(
15405 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
15406 return res;
15407 }
15408 int test_adds(int x) { return addi(3, x) + addi(x, 5); }
15409 int
15410 main ()
15411 {
15412
15413 ;
15414 return 0;
15415 }
15416 _ACEOF
15417 if ac_fn_c_try_compile "$LINENO"; then :
15418 pgac_cv_have_i_constraint__builtin_constant_p=yes
15419 else
15420 pgac_cv_have_i_constraint__builtin_constant_p=no
15421 fi
15422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15423 fi
15424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
15425 $as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
15426 if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
15427
15428 $as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
15429
15430 fi
15431 ;;
15432 esac
15433
15434 # Check largefile support. You might think this is a system service not a
15435 # compiler characteristic, but you'd be wrong. We must check this before
15436 # probing existence of related functions such as fseeko, since the largefile
15437 # defines can affect what is generated for that.
15438 if test "$PORTNAME" != "win32"; then
15439 # Check whether --enable-largefile was given.
15440 if test "${enable_largefile+set}" = set; then :
15441 enableval=$enable_largefile;
15442 fi
15443
15444 if test "$enable_largefile" != no; then
15445
15446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15447 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15448 if ${ac_cv_sys_largefile_CC+:} false; then :
15449 $as_echo_n "(cached) " >&6
15450 else
15451 ac_cv_sys_largefile_CC=no
15452 if test "$GCC" != yes; then
15453 ac_save_CC=$CC
15454 while :; do
15455 # IRIX 6.2 and later do not support large files by default,
15456 # so use the C compiler's -n32 option if that helps.
15457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15458 /* end confdefs.h. */
15459 #include <sys/types.h>
15460 /* Check that off_t can represent 2**63 - 1 correctly.
15461 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15462 since some C++ compilers masquerading as C compilers
15463 incorrectly reject 9223372036854775807. */
15464 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15465 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15466 && LARGE_OFF_T % 2147483647 == 1)
15467 ? 1 : -1];
15468 int
15469 main ()
15470 {
15471
15472 ;
15473 return 0;
15474 }
15475 _ACEOF
15476 if ac_fn_c_try_compile "$LINENO"; then :
15477 break
15478 fi
15479 rm -f core conftest.err conftest.$ac_objext
15480 CC="$CC -n32"
15481 if ac_fn_c_try_compile "$LINENO"; then :
15482 ac_cv_sys_largefile_CC=' -n32'; break
15483 fi
15484 rm -f core conftest.err conftest.$ac_objext
15485 break
15486 done
15487 CC=$ac_save_CC
15488 rm -f conftest.$ac_ext
15489 fi
15490 fi
15491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15492 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15493 if test "$ac_cv_sys_largefile_CC" != no; then
15494 CC=$CC$ac_cv_sys_largefile_CC
15495 fi
15496
15497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15498 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15499 if ${ac_cv_sys_file_offset_bits+:} false; then :
15500 $as_echo_n "(cached) " >&6
15501 else
15502 while :; do
15503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15504 /* end confdefs.h. */
15505 #include <sys/types.h>
15506 /* Check that off_t can represent 2**63 - 1 correctly.
15507 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15508 since some C++ compilers masquerading as C compilers
15509 incorrectly reject 9223372036854775807. */
15510 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15511 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15512 && LARGE_OFF_T % 2147483647 == 1)
15513 ? 1 : -1];
15514 int
15515 main ()
15516 {
15517
15518 ;
15519 return 0;
15520 }
15521 _ACEOF
15522 if ac_fn_c_try_compile "$LINENO"; then :
15523 ac_cv_sys_file_offset_bits=no; break
15524 fi
15525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15527 /* end confdefs.h. */
15528 #define _FILE_OFFSET_BITS 64
15529 #include <sys/types.h>
15530 /* Check that off_t can represent 2**63 - 1 correctly.
15531 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15532 since some C++ compilers masquerading as C compilers
15533 incorrectly reject 9223372036854775807. */
15534 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15535 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15536 && LARGE_OFF_T % 2147483647 == 1)
15537 ? 1 : -1];
15538 int
15539 main ()
15540 {
15541
15542 ;
15543 return 0;
15544 }
15545 _ACEOF
15546 if ac_fn_c_try_compile "$LINENO"; then :
15547 ac_cv_sys_file_offset_bits=64; break
15548 fi
15549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15550 ac_cv_sys_file_offset_bits=unknown
15551 break
15552 done
15553 fi
15554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15555 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15556 case $ac_cv_sys_file_offset_bits in #(
15557 no | unknown) ;;
15558 *)
15559 cat >>confdefs.h <<_ACEOF
15560 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15561 _ACEOF
15562 ;;
15563 esac
15564 rm -rf conftest*
15565 if test $ac_cv_sys_file_offset_bits = unknown; then
15566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15567 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15568 if ${ac_cv_sys_large_files+:} false; then :
15569 $as_echo_n "(cached) " >&6
15570 else
15571 while :; do
15572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15573 /* end confdefs.h. */
15574 #include <sys/types.h>
15575 /* Check that off_t can represent 2**63 - 1 correctly.
15576 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15577 since some C++ compilers masquerading as C compilers
15578 incorrectly reject 9223372036854775807. */
15579 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15580 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15581 && LARGE_OFF_T % 2147483647 == 1)
15582 ? 1 : -1];
15583 int
15584 main ()
15585 {
15586
15587 ;
15588 return 0;
15589 }
15590 _ACEOF
15591 if ac_fn_c_try_compile "$LINENO"; then :
15592 ac_cv_sys_large_files=no; break
15593 fi
15594 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15596 /* end confdefs.h. */
15597 #define _LARGE_FILES 1
15598 #include <sys/types.h>
15599 /* Check that off_t can represent 2**63 - 1 correctly.
15600 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15601 since some C++ compilers masquerading as C compilers
15602 incorrectly reject 9223372036854775807. */
15603 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15604 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15605 && LARGE_OFF_T % 2147483647 == 1)
15606 ? 1 : -1];
15607 int
15608 main ()
15609 {
15610
15611 ;
15612 return 0;
15613 }
15614 _ACEOF
15615 if ac_fn_c_try_compile "$LINENO"; then :
15616 ac_cv_sys_large_files=1; break
15617 fi
15618 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15619 ac_cv_sys_large_files=unknown
15620 break
15621 done
15622 fi
15623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15624 $as_echo "$ac_cv_sys_large_files" >&6; }
15625 case $ac_cv_sys_large_files in #(
15626 no | unknown) ;;
15627 *)
15628 cat >>confdefs.h <<_ACEOF
15629 #define _LARGE_FILES $ac_cv_sys_large_files
15630 _ACEOF
15631 ;;
15632 esac
15633 rm -rf conftest*
15634 fi
15635
15636
15637 fi
15638
15639
15640 fi
15641
15642 # The cast to long int works around a bug in the HP C Compiler
15643 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15644 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15645 # This bug is HP SR number 8606223364.
15646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15647 $as_echo_n "checking size of off_t... " >&6; }
15648 if ${ac_cv_sizeof_off_t+:} false; then :
15649 $as_echo_n "(cached) " >&6
15650 else
15651 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
15652
15653 else
15654 if test "$ac_cv_type_off_t" = yes; then
15655 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15656 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15657 as_fn_error 77 "cannot compute sizeof (off_t)
15658 See \`config.log' for more details" "$LINENO" 5; }
15659 else
15660 ac_cv_sizeof_off_t=0
15661 fi
15662 fi
15663
15664 fi
15665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15666 $as_echo "$ac_cv_sizeof_off_t" >&6; }
15667
15668
15669
15670 cat >>confdefs.h <<_ACEOF
15671 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
15672 _ACEOF
15673
15674
15675
15676 # If we don't have largefile support, can't handle segment size >= 2GB.
15677 if test "$ac_cv_sizeof_off_t" -lt 8; then
15678 if expr $RELSEG_SIZE '*' $blocksize '>=' 2 '*' 1024 '*' 1024; then
15679 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15680 fi
15681 fi
15682
15683
15684 ##
15685 ## Functions, global variables
15686 ##
15687
15688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15689 $as_echo_n "checking for int timezone... " >&6; }
15690 if ${pgac_cv_var_int_timezone+:} false; then :
15691 $as_echo_n "(cached) " >&6
15692 else
15693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15694 /* end confdefs.h. */
15695 #include <time.h>
15696 int res;
15697 int
15698 main ()
15699 {
15700 #ifndef __CYGWIN__
15701 res = timezone / 60;
15702 #else
15703 res = _timezone / 60;
15704 #endif
15705 ;
15706 return 0;
15707 }
15708 _ACEOF
15709 if ac_fn_c_try_link "$LINENO"; then :
15710 pgac_cv_var_int_timezone=yes
15711 else
15712 pgac_cv_var_int_timezone=no
15713 fi
15714 rm -f core conftest.err conftest.$ac_objext \
15715 conftest$ac_exeext conftest.$ac_ext
15716 fi
15717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15718 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15719 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15720
15721 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15722
15723 fi
15724
15725 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15726 # symbols that that library has no business exposing to the world. Pending
15727 # acquisition of a clue by those developers, ignore libedit (including its
15728 # possible alias of libreadline) while checking for everything else.
15729 LIBS_including_readline="$LIBS"
15730 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15731
15732 for ac_func in backtrace_symbols copyfile copy_file_range elf_aux_info getauxval getifaddrs getpeerucred inet_pton kqueue localeconv_l mbstowcs_l posix_fallocate ppoll pthread_is_threaded_np setproctitle setproctitle_fast strsignal syncfs sync_file_range uselocale wcstombs_l
15733 do :
15734 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15735 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15736 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15737 cat >>confdefs.h <<_ACEOF
15738 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15739 _ACEOF
15740
15741 fi
15742 done
15743
15744
15745 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15747 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15748 if ${pgac_cv__builtin_bswap16+:} false; then :
15749 $as_echo_n "(cached) " >&6
15750 else
15751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15752 /* end confdefs.h. */
15753
15754 int
15755 call__builtin_bswap16(int x)
15756 {
15757 return __builtin_bswap16(x);
15758 }
15759 int
15760 main ()
15761 {
15762
15763 ;
15764 return 0;
15765 }
15766 _ACEOF
15767 if ac_fn_c_try_link "$LINENO"; then :
15768 pgac_cv__builtin_bswap16=yes
15769 else
15770 pgac_cv__builtin_bswap16=no
15771 fi
15772 rm -f core conftest.err conftest.$ac_objext \
15773 conftest$ac_exeext conftest.$ac_ext
15774 fi
15775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15776 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15777 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15778
15779 cat >>confdefs.h <<_ACEOF
15780 #define HAVE__BUILTIN_BSWAP16 1
15781 _ACEOF
15782
15783 fi
15784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15785 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15786 if ${pgac_cv__builtin_bswap32+:} false; then :
15787 $as_echo_n "(cached) " >&6
15788 else
15789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15790 /* end confdefs.h. */
15791
15792 int
15793 call__builtin_bswap32(int x)
15794 {
15795 return __builtin_bswap32(x);
15796 }
15797 int
15798 main ()
15799 {
15800
15801 ;
15802 return 0;
15803 }
15804 _ACEOF
15805 if ac_fn_c_try_link "$LINENO"; then :
15806 pgac_cv__builtin_bswap32=yes
15807 else
15808 pgac_cv__builtin_bswap32=no
15809 fi
15810 rm -f core conftest.err conftest.$ac_objext \
15811 conftest$ac_exeext conftest.$ac_ext
15812 fi
15813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15814 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15815 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15816
15817 cat >>confdefs.h <<_ACEOF
15818 #define HAVE__BUILTIN_BSWAP32 1
15819 _ACEOF
15820
15821 fi
15822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15823 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15824 if ${pgac_cv__builtin_bswap64+:} false; then :
15825 $as_echo_n "(cached) " >&6
15826 else
15827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15828 /* end confdefs.h. */
15829
15830 int
15831 call__builtin_bswap64(long int x)
15832 {
15833 return __builtin_bswap64(x);
15834 }
15835 int
15836 main ()
15837 {
15838
15839 ;
15840 return 0;
15841 }
15842 _ACEOF
15843 if ac_fn_c_try_link "$LINENO"; then :
15844 pgac_cv__builtin_bswap64=yes
15845 else
15846 pgac_cv__builtin_bswap64=no
15847 fi
15848 rm -f core conftest.err conftest.$ac_objext \
15849 conftest$ac_exeext conftest.$ac_ext
15850 fi
15851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15852 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15853 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15854
15855 cat >>confdefs.h <<_ACEOF
15856 #define HAVE__BUILTIN_BSWAP64 1
15857 _ACEOF
15858
15859 fi
15860 # We assume that we needn't test all widths of these explicitly:
15861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15862 $as_echo_n "checking for __builtin_clz... " >&6; }
15863 if ${pgac_cv__builtin_clz+:} false; then :
15864 $as_echo_n "(cached) " >&6
15865 else
15866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15867 /* end confdefs.h. */
15868
15869 int
15870 call__builtin_clz(unsigned int x)
15871 {
15872 return __builtin_clz(x);
15873 }
15874 int
15875 main ()
15876 {
15877
15878 ;
15879 return 0;
15880 }
15881 _ACEOF
15882 if ac_fn_c_try_link "$LINENO"; then :
15883 pgac_cv__builtin_clz=yes
15884 else
15885 pgac_cv__builtin_clz=no
15886 fi
15887 rm -f core conftest.err conftest.$ac_objext \
15888 conftest$ac_exeext conftest.$ac_ext
15889 fi
15890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15891 $as_echo "$pgac_cv__builtin_clz" >&6; }
15892 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15893
15894 cat >>confdefs.h <<_ACEOF
15895 #define HAVE__BUILTIN_CLZ 1
15896 _ACEOF
15897
15898 fi
15899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15900 $as_echo_n "checking for __builtin_ctz... " >&6; }
15901 if ${pgac_cv__builtin_ctz+:} false; then :
15902 $as_echo_n "(cached) " >&6
15903 else
15904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15905 /* end confdefs.h. */
15906
15907 int
15908 call__builtin_ctz(unsigned int x)
15909 {
15910 return __builtin_ctz(x);
15911 }
15912 int
15913 main ()
15914 {
15915
15916 ;
15917 return 0;
15918 }
15919 _ACEOF
15920 if ac_fn_c_try_link "$LINENO"; then :
15921 pgac_cv__builtin_ctz=yes
15922 else
15923 pgac_cv__builtin_ctz=no
15924 fi
15925 rm -f core conftest.err conftest.$ac_objext \
15926 conftest$ac_exeext conftest.$ac_ext
15927 fi
15928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15929 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15930 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15931
15932 cat >>confdefs.h <<_ACEOF
15933 #define HAVE__BUILTIN_CTZ 1
15934 _ACEOF
15935
15936 fi
15937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15938 $as_echo_n "checking for __builtin_popcount... " >&6; }
15939 if ${pgac_cv__builtin_popcount+:} false; then :
15940 $as_echo_n "(cached) " >&6
15941 else
15942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15943 /* end confdefs.h. */
15944
15945 int
15946 call__builtin_popcount(unsigned int x)
15947 {
15948 return __builtin_popcount(x);
15949 }
15950 int
15951 main ()
15952 {
15953
15954 ;
15955 return 0;
15956 }
15957 _ACEOF
15958 if ac_fn_c_try_link "$LINENO"; then :
15959 pgac_cv__builtin_popcount=yes
15960 else
15961 pgac_cv__builtin_popcount=no
15962 fi
15963 rm -f core conftest.err conftest.$ac_objext \
15964 conftest$ac_exeext conftest.$ac_ext
15965 fi
15966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15967 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15968 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15969
15970 cat >>confdefs.h <<_ACEOF
15971 #define HAVE__BUILTIN_POPCOUNT 1
15972 _ACEOF
15973
15974 fi
15975 # __builtin_frame_address may draw a diagnostic for non-constant argument,
15976 # so it needs a different test function.
15977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5
15978 $as_echo_n "checking for __builtin_frame_address... " >&6; }
15979 if ${pgac_cv__builtin_frame_address+:} false; then :
15980 $as_echo_n "(cached) " >&6
15981 else
15982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15983 /* end confdefs.h. */
15984
15985 void *
15986 call__builtin_frame_address(void)
15987 {
15988 return __builtin_frame_address(0);
15989 }
15990 int
15991 main ()
15992 {
15993
15994 ;
15995 return 0;
15996 }
15997 _ACEOF
15998 if ac_fn_c_try_link "$LINENO"; then :
15999 pgac_cv__builtin_frame_address=yes
16000 else
16001 pgac_cv__builtin_frame_address=no
16002 fi
16003 rm -f core conftest.err conftest.$ac_objext \
16004 conftest$ac_exeext conftest.$ac_ext
16005 fi
16006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_frame_address" >&5
16007 $as_echo "$pgac_cv__builtin_frame_address" >&6; }
16008 if test x"${pgac_cv__builtin_frame_address}" = xyes ; then
16009
16010 cat >>confdefs.h <<_ACEOF
16011 #define HAVE__BUILTIN_FRAME_ADDRESS 1
16012 _ACEOF
16013
16014 fi
16015
16016 # We require 64-bit fseeko() to be available, but run this check anyway
16017 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
16018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
16019 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
16020 if ${ac_cv_sys_largefile_source+:} false; then :
16021 $as_echo_n "(cached) " >&6
16022 else
16023 while :; do
16024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16025 /* end confdefs.h. */
16026 #include <sys/types.h> /* for off_t */
16027 #include <stdio.h>
16028 int
16029 main ()
16030 {
16031 int (*fp) (FILE *, off_t, int) = fseeko;
16032 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
16033 ;
16034 return 0;
16035 }
16036 _ACEOF
16037 if ac_fn_c_try_link "$LINENO"; then :
16038 ac_cv_sys_largefile_source=no; break
16039 fi
16040 rm -f core conftest.err conftest.$ac_objext \
16041 conftest$ac_exeext conftest.$ac_ext
16042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16043 /* end confdefs.h. */
16044 #define _LARGEFILE_SOURCE 1
16045 #include <sys/types.h> /* for off_t */
16046 #include <stdio.h>
16047 int
16048 main ()
16049 {
16050 int (*fp) (FILE *, off_t, int) = fseeko;
16051 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
16052 ;
16053 return 0;
16054 }
16055 _ACEOF
16056 if ac_fn_c_try_link "$LINENO"; then :
16057 ac_cv_sys_largefile_source=1; break
16058 fi
16059 rm -f core conftest.err conftest.$ac_objext \
16060 conftest$ac_exeext conftest.$ac_ext
16061 ac_cv_sys_largefile_source=unknown
16062 break
16063 done
16064 fi
16065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
16066 $as_echo "$ac_cv_sys_largefile_source" >&6; }
16067 case $ac_cv_sys_largefile_source in #(
16068 no | unknown) ;;
16069 *)
16070 cat >>confdefs.h <<_ACEOF
16071 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16072 _ACEOF
16073 ;;
16074 esac
16075 rm -rf conftest*
16076
16077 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16078 # in glibc 2.1.3, but that breaks too many other things.
16079 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16080 if test $ac_cv_sys_largefile_source != unknown; then
16081
16082 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
16083
16084 fi
16085
16086
16087 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
16088 # by calling it, 2009-04-02
16089 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
16090 # The Clang compiler raises a warning for an undeclared identifier that matches
16091 # a compiler builtin function. All extant Clang versions are affected, as of
16092 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
16093 # C and Objective C languages, but Clang does report an error under C++ and
16094 # Objective C++.
16095 #
16096 # Passing -fno-builtin to the compiler would suppress this problem. That
16097 # strategy would have the advantage of being insensitive to stray warnings, but
16098 # it would make tests less realistic.
16099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
16100 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
16101 if ${ac_cv_c_decl_report+:} false; then :
16102 $as_echo_n "(cached) " >&6
16103 else
16104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16105 /* end confdefs.h. */
16106
16107 int
16108 main ()
16109 {
16110 (void) strchr;
16111 ;
16112 return 0;
16113 }
16114 _ACEOF
16115 if ac_fn_c_try_compile "$LINENO"; then :
16116 if test -s conftest.err; then :
16117 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
16118 # valid AC_CHECK_DECL input. No library function is consistently available
16119 # on freestanding implementations, so test against a dummy declaration.
16120 # Include always-available headers on the off chance that they somehow
16121 # elicit warnings.
16122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16123 /* end confdefs.h. */
16124 #include <float.h>
16125 #include <limits.h>
16126 #include <stdarg.h>
16127 #include <stddef.h>
16128 extern void ac_decl (int, char *);
16129 int
16130 main ()
16131 {
16132 #ifdef __cplusplus
16133 (void) ac_decl ((int) 0, (char *) 0);
16134 (void) ac_decl;
16135 #else
16136 (void) ac_decl;
16137 #endif
16138
16139 ;
16140 return 0;
16141 }
16142 _ACEOF
16143 if ac_fn_c_try_compile "$LINENO"; then :
16144 if test -s conftest.err; then :
16145 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16146 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16147 as_fn_error $? "cannot detect from compiler exit status or warnings
16148 See \`config.log' for more details" "$LINENO" 5; }
16149 else
16150 ac_cv_c_decl_report=warning
16151 fi
16152 else
16153 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16154 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16155 as_fn_error $? "cannot compile a simple declaration test
16156 See \`config.log' for more details" "$LINENO" 5; }
16157 fi
16158 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16159 else
16160 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16161 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16162 as_fn_error $? "compiler does not report undeclared identifiers
16163 See \`config.log' for more details" "$LINENO" 5; }
16164 fi
16165 else
16166 ac_cv_c_decl_report=error
16167 fi
16168 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16169 fi
16170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
16171 $as_echo "$ac_cv_c_decl_report" >&6; }
16172
16173 case $ac_cv_c_decl_report in
16174 warning) ac_c_decl_warn_flag=yes ;;
16175 *) ac_c_decl_warn_flag= ;;
16176 esac
16177
16178 if test "$PORTNAME" != "solaris"; then :
16179
16180 for ac_func in posix_fadvise
16181 do :
16182 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
16183 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
16184 cat >>confdefs.h <<_ACEOF
16185 #define HAVE_POSIX_FADVISE 1
16186 _ACEOF
16187
16188 fi
16189 done
16190
16191 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
16192 "
16193 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
16194 ac_have_decl=1
16195 else
16196 ac_have_decl=0
16197 fi
16198
16199 cat >>confdefs.h <<_ACEOF
16200 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
16201 _ACEOF
16202
16203
16204 fi # fi
16205
16206 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
16207 "
16208 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
16209 ac_have_decl=1
16210 else
16211 ac_have_decl=0
16212 fi
16213
16214 cat >>confdefs.h <<_ACEOF
16215 #define HAVE_DECL_FDATASYNC $ac_have_decl
16216 _ACEOF
16217
16218 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
16219 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
16220 ac_have_decl=1
16221 else
16222 ac_have_decl=0
16223 fi
16224
16225 cat >>confdefs.h <<_ACEOF
16226 #define HAVE_DECL_STRLCAT $ac_have_decl
16227 _ACEOF
16228 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
16229 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
16230 ac_have_decl=1
16231 else
16232 ac_have_decl=0
16233 fi
16234
16235 cat >>confdefs.h <<_ACEOF
16236 #define HAVE_DECL_STRLCPY $ac_have_decl
16237 _ACEOF
16238 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
16239 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
16240 ac_have_decl=1
16241 else
16242 ac_have_decl=0
16243 fi
16244
16245 cat >>confdefs.h <<_ACEOF
16246 #define HAVE_DECL_STRNLEN $ac_have_decl
16247 _ACEOF
16248 ac_fn_c_check_decl "$LINENO" "strsep" "ac_cv_have_decl_strsep" "$ac_includes_default"
16249 if test "x$ac_cv_have_decl_strsep" = xyes; then :
16250 ac_have_decl=1
16251 else
16252 ac_have_decl=0
16253 fi
16254
16255 cat >>confdefs.h <<_ACEOF
16256 #define HAVE_DECL_STRSEP $ac_have_decl
16257 _ACEOF
16258 ac_fn_c_check_decl "$LINENO" "timingsafe_bcmp" "ac_cv_have_decl_timingsafe_bcmp" "$ac_includes_default"
16259 if test "x$ac_cv_have_decl_timingsafe_bcmp" = xyes; then :
16260 ac_have_decl=1
16261 else
16262 ac_have_decl=0
16263 fi
16264
16265 cat >>confdefs.h <<_ACEOF
16266 #define HAVE_DECL_TIMINGSAFE_BCMP $ac_have_decl
16267 _ACEOF
16268
16269
16270 # We can't use AC_CHECK_FUNCS to detect these functions, because it
16271 # won't handle deployment target restrictions on macOS
16272 ac_fn_c_check_decl "$LINENO" "preadv" "ac_cv_have_decl_preadv" "#include <sys/uio.h>
16273 "
16274 if test "x$ac_cv_have_decl_preadv" = xyes; then :
16275 ac_have_decl=1
16276 else
16277 ac_have_decl=0
16278 fi
16279
16280 cat >>confdefs.h <<_ACEOF
16281 #define HAVE_DECL_PREADV $ac_have_decl
16282 _ACEOF
16283
16284 ac_fn_c_check_decl "$LINENO" "pwritev" "ac_cv_have_decl_pwritev" "#include <sys/uio.h>
16285 "
16286 if test "x$ac_cv_have_decl_pwritev" = xyes; then :
16287 ac_have_decl=1
16288 else
16289 ac_have_decl=0
16290 fi
16291
16292 cat >>confdefs.h <<_ACEOF
16293 #define HAVE_DECL_PWRITEV $ac_have_decl
16294 _ACEOF
16295
16296 ac_fn_c_check_decl "$LINENO" "strchrnul" "ac_cv_have_decl_strchrnul" "#include <string.h>
16297 "
16298 if test "x$ac_cv_have_decl_strchrnul" = xyes; then :
16299 ac_have_decl=1
16300 else
16301 ac_have_decl=0
16302 fi
16303
16304 cat >>confdefs.h <<_ACEOF
16305 #define HAVE_DECL_STRCHRNUL $ac_have_decl
16306 _ACEOF
16307
16308 ac_fn_c_check_decl "$LINENO" "memset_s" "ac_cv_have_decl_memset_s" "#define __STDC_WANT_LIB_EXT1__ 1
16309 #include <string.h>
16310 "
16311 if test "x$ac_cv_have_decl_memset_s" = xyes; then :
16312 ac_have_decl=1
16313 else
16314 ac_have_decl=0
16315 fi
16316
16317 cat >>confdefs.h <<_ACEOF
16318 #define HAVE_DECL_MEMSET_S $ac_have_decl
16319 _ACEOF
16320
16321
16322 # This is probably only present on macOS, but may as well check always
16323 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
16324 "
16325 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
16326 ac_have_decl=1
16327 else
16328 ac_have_decl=0
16329 fi
16330
16331 cat >>confdefs.h <<_ACEOF
16332 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
16333 _ACEOF
16334
16335
16336 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
16337 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
16338 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
16339
16340 else
16341 case " $LIBOBJS " in
16342 *" explicit_bzero.$ac_objext "* ) ;;
16343 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
16344 ;;
16345 esac
16346
16347 fi
16348
16349 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
16350 if test "x$ac_cv_func_getopt" = xyes; then :
16351 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
16352
16353 else
16354 case " $LIBOBJS " in
16355 *" getopt.$ac_objext "* ) ;;
16356 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16357 ;;
16358 esac
16359
16360 fi
16361
16362 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
16363 if test "x$ac_cv_func_getpeereid" = xyes; then :
16364 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
16365
16366 else
16367 case " $LIBOBJS " in
16368 *" getpeereid.$ac_objext "* ) ;;
16369 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
16370 ;;
16371 esac
16372
16373 fi
16374
16375 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
16376 if test "x$ac_cv_func_inet_aton" = xyes; then :
16377 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
16378
16379 else
16380 case " $LIBOBJS " in
16381 *" inet_aton.$ac_objext "* ) ;;
16382 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
16383 ;;
16384 esac
16385
16386 fi
16387
16388 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
16389 if test "x$ac_cv_func_mkdtemp" = xyes; then :
16390 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
16391
16392 else
16393 case " $LIBOBJS " in
16394 *" mkdtemp.$ac_objext "* ) ;;
16395 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
16396 ;;
16397 esac
16398
16399 fi
16400
16401 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
16402 if test "x$ac_cv_func_strlcat" = xyes; then :
16403 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
16404
16405 else
16406 case " $LIBOBJS " in
16407 *" strlcat.$ac_objext "* ) ;;
16408 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
16409 ;;
16410 esac
16411
16412 fi
16413
16414 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
16415 if test "x$ac_cv_func_strlcpy" = xyes; then :
16416 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
16417
16418 else
16419 case " $LIBOBJS " in
16420 *" strlcpy.$ac_objext "* ) ;;
16421 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
16422 ;;
16423 esac
16424
16425 fi
16426
16427 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
16428 if test "x$ac_cv_func_strnlen" = xyes; then :
16429 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
16430
16431 else
16432 case " $LIBOBJS " in
16433 *" strnlen.$ac_objext "* ) ;;
16434 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
16435 ;;
16436 esac
16437
16438 fi
16439
16440 ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
16441 if test "x$ac_cv_func_strsep" = xyes; then :
16442 $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
16443
16444 else
16445 case " $LIBOBJS " in
16446 *" strsep.$ac_objext "* ) ;;
16447 *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
16448 ;;
16449 esac
16450
16451 fi
16452
16453 ac_fn_c_check_func "$LINENO" "timingsafe_bcmp" "ac_cv_func_timingsafe_bcmp"
16454 if test "x$ac_cv_func_timingsafe_bcmp" = xyes; then :
16455 $as_echo "#define HAVE_TIMINGSAFE_BCMP 1" >>confdefs.h
16456
16457 else
16458 case " $LIBOBJS " in
16459 *" timingsafe_bcmp.$ac_objext "* ) ;;
16460 *) LIBOBJS="$LIBOBJS timingsafe_bcmp.$ac_objext"
16461 ;;
16462 esac
16463
16464 fi
16465
16466
16467
16468 ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
16469 if test "x$ac_cv_func_pthread_barrier_wait" = xyes; then :
16470 $as_echo "#define HAVE_PTHREAD_BARRIER_WAIT 1" >>confdefs.h
16471
16472 else
16473 case " $LIBOBJS " in
16474 *" pthread_barrier_wait.$ac_objext "* ) ;;
16475 *) LIBOBJS="$LIBOBJS pthread_barrier_wait.$ac_objext"
16476 ;;
16477 esac
16478
16479 fi
16480
16481
16482
16483 if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
16484 # Cygwin and (apparently, based on test results) Mingw both
16485 # have a broken strtof(), so substitute its implementation.
16486 # That's not a perfect fix, since it doesn't avoid double-rounding,
16487 # but we have no better options.
16488 case " $LIBOBJS " in
16489 *" strtof.$ac_objext "* ) ;;
16490 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16491 ;;
16492 esac
16493
16494 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
16495 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
16496 fi
16497
16498 # Similarly, use system's getopt_long() only if system provides struct option.
16499 if test x"$ac_cv_type_struct_option" = xyes ; then
16500 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
16501 if test "x$ac_cv_func_getopt_long" = xyes; then :
16502 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
16503
16504 else
16505 case " $LIBOBJS " in
16506 *" getopt_long.$ac_objext "* ) ;;
16507 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16508 ;;
16509 esac
16510
16511 fi
16512
16513
16514 else
16515 case " $LIBOBJS " in
16516 *" getopt_long.$ac_objext "* ) ;;
16517 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16518 ;;
16519 esac
16520
16521 fi
16522
16523 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
16524 # (i.e., allow '-' as a flag character), so use our version on those platforms.
16525 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
16526 case " $LIBOBJS " in
16527 *" getopt.$ac_objext "* ) ;;
16528 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16529 ;;
16530 esac
16531
16532 fi
16533
16534 # mingw has adopted a GNU-centric interpretation of optind/optreset,
16535 # so always use our version on Windows.
16536 if test "$PORTNAME" = "win32"; then
16537 case " $LIBOBJS " in
16538 *" getopt.$ac_objext "* ) ;;
16539 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16540 ;;
16541 esac
16542
16543 case " $LIBOBJS " in
16544 *" getopt_long.$ac_objext "* ) ;;
16545 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16546 ;;
16547 esac
16548
16549 fi
16550
16551 # Win32 (really MinGW) support
16552 if test "$PORTNAME" = "win32"; then
16553 case " $LIBOBJS " in
16554 *" dirmod.$ac_objext "* ) ;;
16555 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16556 ;;
16557 esac
16558
16559 case " $LIBOBJS " in
16560 *" kill.$ac_objext "* ) ;;
16561 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16562 ;;
16563 esac
16564
16565 case " $LIBOBJS " in
16566 *" open.$ac_objext "* ) ;;
16567 *) LIBOBJS="$LIBOBJS open.$ac_objext"
16568 ;;
16569 esac
16570
16571 case " $LIBOBJS " in
16572 *" system.$ac_objext "* ) ;;
16573 *) LIBOBJS="$LIBOBJS system.$ac_objext"
16574 ;;
16575 esac
16576
16577 case " $LIBOBJS " in
16578 *" win32common.$ac_objext "* ) ;;
16579 *) LIBOBJS="$LIBOBJS win32common.$ac_objext"
16580 ;;
16581 esac
16582
16583 case " $LIBOBJS " in
16584 *" win32dlopen.$ac_objext "* ) ;;
16585 *) LIBOBJS="$LIBOBJS win32dlopen.$ac_objext"
16586 ;;
16587 esac
16588
16589 case " $LIBOBJS " in
16590 *" win32env.$ac_objext "* ) ;;
16591 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16592 ;;
16593 esac
16594
16595 case " $LIBOBJS " in
16596 *" win32error.$ac_objext "* ) ;;
16597 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16598 ;;
16599 esac
16600
16601 case " $LIBOBJS " in
16602 *" win32fdatasync.$ac_objext "* ) ;;
16603 *) LIBOBJS="$LIBOBJS win32fdatasync.$ac_objext"
16604 ;;
16605 esac
16606
16607 case " $LIBOBJS " in
16608 *" win32gai_strerror.$ac_objext "* ) ;;
16609 *) LIBOBJS="$LIBOBJS win32gai_strerror.$ac_objext"
16610 ;;
16611 esac
16612
16613 case " $LIBOBJS " in
16614 *" win32getrusage.$ac_objext "* ) ;;
16615 *) LIBOBJS="$LIBOBJS win32getrusage.$ac_objext"
16616 ;;
16617 esac
16618
16619 case " $LIBOBJS " in
16620 *" win32link.$ac_objext "* ) ;;
16621 *) LIBOBJS="$LIBOBJS win32link.$ac_objext"
16622 ;;
16623 esac
16624
16625 case " $LIBOBJS " in
16626 *" win32ntdll.$ac_objext "* ) ;;
16627 *) LIBOBJS="$LIBOBJS win32ntdll.$ac_objext"
16628 ;;
16629 esac
16630
16631 case " $LIBOBJS " in
16632 *" win32pread.$ac_objext "* ) ;;
16633 *) LIBOBJS="$LIBOBJS win32pread.$ac_objext"
16634 ;;
16635 esac
16636
16637 case " $LIBOBJS " in
16638 *" win32pwrite.$ac_objext "* ) ;;
16639 *) LIBOBJS="$LIBOBJS win32pwrite.$ac_objext"
16640 ;;
16641 esac
16642
16643 case " $LIBOBJS " in
16644 *" win32security.$ac_objext "* ) ;;
16645 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16646 ;;
16647 esac
16648
16649 case " $LIBOBJS " in
16650 *" win32setlocale.$ac_objext "* ) ;;
16651 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16652 ;;
16653 esac
16654
16655 case " $LIBOBJS " in
16656 *" win32stat.$ac_objext "* ) ;;
16657 *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
16658 ;;
16659 esac
16660
16661 fi
16662 # Cygwin needs only a bit of that
16663 if test "$PORTNAME" = "cygwin"; then
16664 case " $LIBOBJS " in
16665 *" dirmod.$ac_objext "* ) ;;
16666 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16667 ;;
16668 esac
16669
16670 fi
16671
16672 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16673 if test "x$ac_cv_func_syslog" = xyes; then :
16674 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16675 if test "x$ac_cv_header_syslog_h" = xyes; then :
16676
16677 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16678
16679 fi
16680
16681
16682 fi
16683
16684
16685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16686 $as_echo_n "checking for opterr... " >&6; }
16687 if ${pgac_cv_var_int_opterr+:} false; then :
16688 $as_echo_n "(cached) " >&6
16689 else
16690 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16691 /* end confdefs.h. */
16692 #include <unistd.h>
16693 int
16694 main ()
16695 {
16696 extern int opterr; opterr = 1;
16697 ;
16698 return 0;
16699 }
16700 _ACEOF
16701 if ac_fn_c_try_link "$LINENO"; then :
16702 pgac_cv_var_int_opterr=yes
16703 else
16704 pgac_cv_var_int_opterr=no
16705 fi
16706 rm -f core conftest.err conftest.$ac_objext \
16707 conftest$ac_exeext conftest.$ac_ext
16708 fi
16709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16710 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16711 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16712
16713 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16714
16715 fi
16716
16717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16718 $as_echo_n "checking for optreset... " >&6; }
16719 if ${pgac_cv_var_int_optreset+:} false; then :
16720 $as_echo_n "(cached) " >&6
16721 else
16722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16723 /* end confdefs.h. */
16724 #include <unistd.h>
16725 int
16726 main ()
16727 {
16728 extern int optreset; optreset = 1;
16729 ;
16730 return 0;
16731 }
16732 _ACEOF
16733 if ac_fn_c_try_link "$LINENO"; then :
16734 pgac_cv_var_int_optreset=yes
16735 else
16736 pgac_cv_var_int_optreset=no
16737 fi
16738 rm -f core conftest.err conftest.$ac_objext \
16739 conftest$ac_exeext conftest.$ac_ext
16740 fi
16741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16742 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16743 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16744
16745 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16746
16747 fi
16748
16749 if test "$with_icu" = yes; then
16750 ac_save_CPPFLAGS=$CPPFLAGS
16751 CPPFLAGS="$CPPFLAGS $ICU_CFLAGS"
16752
16753 # Verify we have ICU's header files
16754 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16755 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16756
16757 else
16758 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16759 fi
16760
16761
16762
16763 CPPFLAGS=$ac_save_CPPFLAGS
16764 fi
16765
16766 if test "$with_llvm" = yes; then
16767
16768 # Check which functionality is present
16769 SAVE_CPPFLAGS="$CPPFLAGS"
16770 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16771 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16772 "
16773 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16774 ac_have_decl=1
16775 else
16776 ac_have_decl=0
16777 fi
16778
16779 cat >>confdefs.h <<_ACEOF
16780 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16781 _ACEOF
16782 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16783 "
16784 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16785 ac_have_decl=1
16786 else
16787 ac_have_decl=0
16788 fi
16789
16790 cat >>confdefs.h <<_ACEOF
16791 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16792 _ACEOF
16793
16794 CPPFLAGS="$SAVE_CPPFLAGS"
16795
16796 fi
16797
16798 # Lastly, restore full LIBS list and check for readline/libedit symbols
16799 LIBS="$LIBS_including_readline"
16800
16801 if test "$with_readline" = yes; then
16802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
16803 $as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
16804 if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
16805 $as_echo_n "(cached) " >&6
16806 else
16807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16808 /* end confdefs.h. */
16809 #include <stdio.h>
16810 #if defined(HAVE_READLINE_READLINE_H)
16811 #include <readline/readline.h>
16812 #elif defined(HAVE_EDITLINE_READLINE_H)
16813 #include <editline/readline.h>
16814 #elif defined(HAVE_READLINE_H)
16815 #include <readline.h>
16816 #endif
16817
16818 int
16819 main ()
16820 {
16821 rl_completion_suppress_quote = 1;
16822 ;
16823 return 0;
16824 }
16825 _ACEOF
16826 if ac_fn_c_try_link "$LINENO"; then :
16827 pgac_cv_var_rl_completion_suppress_quote=yes
16828 else
16829 pgac_cv_var_rl_completion_suppress_quote=no
16830 fi
16831 rm -f core conftest.err conftest.$ac_objext \
16832 conftest$ac_exeext conftest.$ac_ext
16833 fi
16834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
16835 $as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
16836 if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
16837
16838 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
16839
16840 fi
16841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
16842 $as_echo_n "checking for rl_filename_quote_characters... " >&6; }
16843 if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
16844 $as_echo_n "(cached) " >&6
16845 else
16846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16847 /* end confdefs.h. */
16848 #include <stdio.h>
16849 #if defined(HAVE_READLINE_READLINE_H)
16850 #include <readline/readline.h>
16851 #elif defined(HAVE_EDITLINE_READLINE_H)
16852 #include <editline/readline.h>
16853 #elif defined(HAVE_READLINE_H)
16854 #include <readline.h>
16855 #endif
16856
16857 int
16858 main ()
16859 {
16860 rl_filename_quote_characters = "x";
16861 ;
16862 return 0;
16863 }
16864 _ACEOF
16865 if ac_fn_c_try_link "$LINENO"; then :
16866 pgac_cv_var_rl_filename_quote_characters=yes
16867 else
16868 pgac_cv_var_rl_filename_quote_characters=no
16869 fi
16870 rm -f core conftest.err conftest.$ac_objext \
16871 conftest$ac_exeext conftest.$ac_ext
16872 fi
16873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
16874 $as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
16875 if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
16876
16877 $as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
16878
16879 fi
16880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
16881 $as_echo_n "checking for rl_filename_quoting_function... " >&6; }
16882 if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
16883 $as_echo_n "(cached) " >&6
16884 else
16885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16886 /* end confdefs.h. */
16887 #include <stdio.h>
16888 #if defined(HAVE_READLINE_READLINE_H)
16889 #include <readline/readline.h>
16890 #elif defined(HAVE_EDITLINE_READLINE_H)
16891 #include <editline/readline.h>
16892 #elif defined(HAVE_READLINE_H)
16893 #include <readline.h>
16894 #endif
16895
16896 int
16897 main ()
16898 {
16899 rl_filename_quoting_function = 0;
16900 ;
16901 return 0;
16902 }
16903 _ACEOF
16904 if ac_fn_c_try_link "$LINENO"; then :
16905 pgac_cv_var_rl_filename_quoting_function=yes
16906 else
16907 pgac_cv_var_rl_filename_quoting_function=no
16908 fi
16909 rm -f core conftest.err conftest.$ac_objext \
16910 conftest$ac_exeext conftest.$ac_ext
16911 fi
16912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
16913 $as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
16914 if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
16915
16916 $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
16917
16918 fi
16919
16920 for ac_func in append_history history_truncate_file rl_completion_matches rl_filename_completion_function rl_reset_screen_size rl_variable_bind
16921 do :
16922 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16923 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16924 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16925 cat >>confdefs.h <<_ACEOF
16926 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16927 _ACEOF
16928
16929 fi
16930 done
16931
16932 fi
16933
16934
16935 # This test makes sure that run tests work at all. Sometimes a shared
16936 # library is found by the linker, but the runtime linker can't find it.
16937 # This check should come after all modifications of compiler or linker
16938 # variables, and before any other run tests.
16939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16940 $as_echo_n "checking test program... " >&6; }
16941 if test "$cross_compiling" = yes; then :
16942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16943 $as_echo "cross-compiling" >&6; }
16944 else
16945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16946 /* end confdefs.h. */
16947 int main() { return 0; }
16948 _ACEOF
16949 if ac_fn_c_try_run "$LINENO"; then :
16950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16951 $as_echo "ok" >&6; }
16952 else
16953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16954 $as_echo "failed" >&6; }
16955 as_fn_error $? "
16956 Could not execute a simple test program. This may be a problem
16957 related to locating shared libraries. Check the file 'config.log'
16958 for the exact reason." "$LINENO" 5
16959 fi
16960 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16961 conftest.$ac_objext conftest.beam conftest.$ac_ext
16962 fi
16963
16964
16965 # --------------------
16966 # Run tests below here
16967 # --------------------
16968
16969 # Check size of void *, size_t (enables tweaks for > 32bit address space)
16970 # The cast to long int works around a bug in the HP C Compiler
16971 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16972 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16973 # This bug is HP SR number 8606223364.
16974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
16975 $as_echo_n "checking size of void *... " >&6; }
16976 if ${ac_cv_sizeof_void_p+:} false; then :
16977 $as_echo_n "(cached) " >&6
16978 else
16979 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
16980
16981 else
16982 if test "$ac_cv_type_void_p" = yes; then
16983 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16984 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16985 as_fn_error 77 "cannot compute sizeof (void *)
16986 See \`config.log' for more details" "$LINENO" 5; }
16987 else
16988 ac_cv_sizeof_void_p=0
16989 fi
16990 fi
16991
16992 fi
16993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
16994 $as_echo "$ac_cv_sizeof_void_p" >&6; }
16995
16996
16997
16998 cat >>confdefs.h <<_ACEOF
16999 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
17000 _ACEOF
17001
17002
17003 # The cast to long int works around a bug in the HP C Compiler
17004 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17005 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17006 # This bug is HP SR number 8606223364.
17007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
17008 $as_echo_n "checking size of size_t... " >&6; }
17009 if ${ac_cv_sizeof_size_t+:} false; then :
17010 $as_echo_n "(cached) " >&6
17011 else
17012 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
17013
17014 else
17015 if test "$ac_cv_type_size_t" = yes; then
17016 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17017 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17018 as_fn_error 77 "cannot compute sizeof (size_t)
17019 See \`config.log' for more details" "$LINENO" 5; }
17020 else
17021 ac_cv_sizeof_size_t=0
17022 fi
17023 fi
17024
17025 fi
17026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
17027 $as_echo "$ac_cv_sizeof_size_t" >&6; }
17028
17029
17030
17031 cat >>confdefs.h <<_ACEOF
17032 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
17033 _ACEOF
17034
17035
17036 # The cast to long int works around a bug in the HP C Compiler
17037 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17038 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17039 # This bug is HP SR number 8606223364.
17040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
17041 $as_echo_n "checking size of long... " >&6; }
17042 if ${ac_cv_sizeof_long+:} false; then :
17043 $as_echo_n "(cached) " >&6
17044 else
17045 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
17046
17047 else
17048 if test "$ac_cv_type_long" = yes; then
17049 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17050 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17051 as_fn_error 77 "cannot compute sizeof (long)
17052 See \`config.log' for more details" "$LINENO" 5; }
17053 else
17054 ac_cv_sizeof_long=0
17055 fi
17056 fi
17057
17058 fi
17059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
17060 $as_echo "$ac_cv_sizeof_long" >&6; }
17061
17062
17063
17064 cat >>confdefs.h <<_ACEOF
17065 #define SIZEOF_LONG $ac_cv_sizeof_long
17066 _ACEOF
17067
17068
17069 # The cast to long int works around a bug in the HP C Compiler
17070 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17071 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17072 # This bug is HP SR number 8606223364.
17073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
17074 $as_echo_n "checking size of long long... " >&6; }
17075 if ${ac_cv_sizeof_long_long+:} false; then :
17076 $as_echo_n "(cached) " >&6
17077 else
17078 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
17079
17080 else
17081 if test "$ac_cv_type_long_long" = yes; then
17082 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17083 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17084 as_fn_error 77 "cannot compute sizeof (long long)
17085 See \`config.log' for more details" "$LINENO" 5; }
17086 else
17087 ac_cv_sizeof_long_long=0
17088 fi
17089 fi
17090
17091 fi
17092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
17093 $as_echo "$ac_cv_sizeof_long_long" >&6; }
17094
17095
17096
17097 cat >>confdefs.h <<_ACEOF
17098 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
17099 _ACEOF
17100
17101
17102
17103 # Determine memory alignment requirements for the basic C data types.
17104
17105 # The cast to long int works around a bug in the HP C Compiler,
17106 # see AC_CHECK_SIZEOF for more information.
17107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
17108 $as_echo_n "checking alignment of short... " >&6; }
17109 if ${ac_cv_alignof_short+:} false; then :
17110 $as_echo_n "(cached) " >&6
17111 else
17112 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
17113 #ifndef offsetof
17114 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17115 #endif
17116 typedef struct { char x; short y; } ac__type_alignof_;"; then :
17117
17118 else
17119 if test "$ac_cv_type_short" = yes; then
17120 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17121 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17122 as_fn_error 77 "cannot compute alignment of short
17123 See \`config.log' for more details" "$LINENO" 5; }
17124 else
17125 ac_cv_alignof_short=0
17126 fi
17127 fi
17128
17129 fi
17130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
17131 $as_echo "$ac_cv_alignof_short" >&6; }
17132
17133
17134
17135 cat >>confdefs.h <<_ACEOF
17136 #define ALIGNOF_SHORT $ac_cv_alignof_short
17137 _ACEOF
17138
17139
17140 # The cast to long int works around a bug in the HP C Compiler,
17141 # see AC_CHECK_SIZEOF for more information.
17142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
17143 $as_echo_n "checking alignment of int... " >&6; }
17144 if ${ac_cv_alignof_int+:} false; then :
17145 $as_echo_n "(cached) " >&6
17146 else
17147 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
17148 #ifndef offsetof
17149 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17150 #endif
17151 typedef struct { char x; int y; } ac__type_alignof_;"; then :
17152
17153 else
17154 if test "$ac_cv_type_int" = yes; then
17155 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17156 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17157 as_fn_error 77 "cannot compute alignment of int
17158 See \`config.log' for more details" "$LINENO" 5; }
17159 else
17160 ac_cv_alignof_int=0
17161 fi
17162 fi
17163
17164 fi
17165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
17166 $as_echo "$ac_cv_alignof_int" >&6; }
17167
17168
17169
17170 cat >>confdefs.h <<_ACEOF
17171 #define ALIGNOF_INT $ac_cv_alignof_int
17172 _ACEOF
17173
17174
17175 # The cast to long int works around a bug in the HP C Compiler,
17176 # see AC_CHECK_SIZEOF for more information.
17177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
17178 $as_echo_n "checking alignment of long... " >&6; }
17179 if ${ac_cv_alignof_long+:} false; then :
17180 $as_echo_n "(cached) " >&6
17181 else
17182 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
17183 #ifndef offsetof
17184 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17185 #endif
17186 typedef struct { char x; long y; } ac__type_alignof_;"; then :
17187
17188 else
17189 if test "$ac_cv_type_long" = yes; then
17190 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17191 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17192 as_fn_error 77 "cannot compute alignment of long
17193 See \`config.log' for more details" "$LINENO" 5; }
17194 else
17195 ac_cv_alignof_long=0
17196 fi
17197 fi
17198
17199 fi
17200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
17201 $as_echo "$ac_cv_alignof_long" >&6; }
17202
17203
17204
17205 cat >>confdefs.h <<_ACEOF
17206 #define ALIGNOF_LONG $ac_cv_alignof_long
17207 _ACEOF
17208
17209
17210 # The cast to long int works around a bug in the HP C Compiler,
17211 # see AC_CHECK_SIZEOF for more information.
17212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int64_t" >&5
17213 $as_echo_n "checking alignment of int64_t... " >&6; }
17214 if ${ac_cv_alignof_int64_t+:} false; then :
17215 $as_echo_n "(cached) " >&6
17216 else
17217 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int64_t" "$ac_includes_default
17218 #ifndef offsetof
17219 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17220 #endif
17221 typedef struct { char x; int64_t y; } ac__type_alignof_;"; then :
17222
17223 else
17224 if test "$ac_cv_type_int64_t" = yes; then
17225 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17226 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17227 as_fn_error 77 "cannot compute alignment of int64_t
17228 See \`config.log' for more details" "$LINENO" 5; }
17229 else
17230 ac_cv_alignof_int64_t=0
17231 fi
17232 fi
17233
17234 fi
17235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int64_t" >&5
17236 $as_echo "$ac_cv_alignof_int64_t" >&6; }
17237
17238
17239
17240 cat >>confdefs.h <<_ACEOF
17241 #define ALIGNOF_INT64_T $ac_cv_alignof_int64_t
17242 _ACEOF
17243
17244
17245 # The cast to long int works around a bug in the HP C Compiler,
17246 # see AC_CHECK_SIZEOF for more information.
17247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
17248 $as_echo_n "checking alignment of double... " >&6; }
17249 if ${ac_cv_alignof_double+:} false; then :
17250 $as_echo_n "(cached) " >&6
17251 else
17252 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
17253 #ifndef offsetof
17254 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17255 #endif
17256 typedef struct { char x; double y; } ac__type_alignof_;"; then :
17257
17258 else
17259 if test "$ac_cv_type_double" = yes; then
17260 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17261 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17262 as_fn_error 77 "cannot compute alignment of double
17263 See \`config.log' for more details" "$LINENO" 5; }
17264 else
17265 ac_cv_alignof_double=0
17266 fi
17267 fi
17268
17269 fi
17270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17271 $as_echo "$ac_cv_alignof_double" >&6; }
17272
17273
17274
17275 cat >>confdefs.h <<_ACEOF
17276 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
17277 _ACEOF
17278
17279
17280
17281 # Compute maximum alignment of any basic type.
17282 #
17283 # We require 'double' to have the strictest alignment among the basic types,
17284 # because otherwise the C ABI might impose 8-byte alignment on some of the
17285 # other C types that correspond to TYPALIGN_DOUBLE SQL types. That could
17286 # cause a mismatch between the tuple layout and the C struct layout of a
17287 # catalog tuple. We used to carefully order catalog columns such that any
17288 # fixed-width, attalign=4 columns were at offsets divisible by 8 regardless
17289 # of MAXIMUM_ALIGNOF to avoid that, but we no longer support any platforms
17290 # where TYPALIGN_DOUBLE != MAXIMUM_ALIGNOF.
17291 #
17292 # We assume without checking that long's alignment is at least as strong as
17293 # char, short, or int. Note that we intentionally do not consider any types
17294 # wider than 64 bits, as allowing MAXIMUM_ALIGNOF to exceed 8 would be too
17295 # much of a penalty for disk and memory space.
17296
17297 MAX_ALIGNOF=$ac_cv_alignof_double
17298
17299 if test $ac_cv_alignof_long -gt $MAX_ALIGNOF ; then
17300 as_fn_error $? "alignment of 'long' is greater than the alignment of 'double'" "$LINENO" 5
17301 fi
17302 if test $ac_cv_alignof_int64_t -gt $MAX_ALIGNOF ; then
17303 as_fn_error $? "alignment of 'int64_t' is greater than the alignment of 'double'" "$LINENO" 5
17304 fi
17305
17306 cat >>confdefs.h <<_ACEOF
17307 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17308 _ACEOF
17309
17310
17311 # Some compilers offer a 128-bit integer scalar type.
17312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17313 $as_echo_n "checking for __int128... " >&6; }
17314 if ${pgac_cv__128bit_int+:} false; then :
17315 $as_echo_n "(cached) " >&6
17316 else
17317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17318 /* end confdefs.h. */
17319
17320 /*
17321 * We don't actually run this test, just link it to verify that any support
17322 * functions needed for __int128 are present.
17323 *
17324 * These are globals to discourage the compiler from folding all the
17325 * arithmetic tests down to compile-time constants. We do not have
17326 * convenient support for 128bit literals at this point...
17327 */
17328 __int128 a = 48828125;
17329 __int128 b = 97656250;
17330
17331 int
17332 main ()
17333 {
17334
17335 __int128 c,d;
17336 a = (a << 12) + 1; /* 200000000001 */
17337 b = (b << 12) + 5; /* 400000000005 */
17338 /* try the most relevant arithmetic ops */
17339 c = a * b;
17340 d = (c + b) / b;
17341 /* must use the results, else compiler may optimize arithmetic away */
17342 if (d != a+1)
17343 return 1;
17344
17345 ;
17346 return 0;
17347 }
17348 _ACEOF
17349 if ac_fn_c_try_link "$LINENO"; then :
17350 pgac_cv__128bit_int=yes
17351 else
17352 pgac_cv__128bit_int=no
17353 fi
17354 rm -f core conftest.err conftest.$ac_objext \
17355 conftest$ac_exeext conftest.$ac_ext
17356 fi
17357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17358 $as_echo "$pgac_cv__128bit_int" >&6; }
17359 if test x"$pgac_cv__128bit_int" = xyes ; then
17360 # Use of non-default alignment with __int128 tickles bugs in some compilers.
17361 # If not cross-compiling, we can test for bugs and disable use of __int128
17362 # with buggy compilers. If cross-compiling, hope for the best.
17363 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17365 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17366 if ${pgac_cv__128bit_int_bug+:} false; then :
17367 $as_echo_n "(cached) " >&6
17368 else
17369 if test "$cross_compiling" = yes; then :
17370 pgac_cv__128bit_int_bug="assuming ok"
17371 else
17372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17373 /* end confdefs.h. */
17374
17375 /* This must match the corresponding code in c.h: */
17376 #if defined(__GNUC__) || defined(__SUNPRO_C)
17377 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17378 #elif defined(_MSC_VER)
17379 #define pg_attribute_aligned(a) __declspec(align(a))
17380 #endif
17381 typedef __int128 int128a
17382 #if defined(pg_attribute_aligned)
17383 pg_attribute_aligned(8)
17384 #endif
17385 ;
17386 int128a holder;
17387 void pass_by_val(void *buffer, int128a par) { holder = par; }
17388
17389 int
17390 main ()
17391 {
17392
17393 long int i64 = 97656225L << 12;
17394 int128a q;
17395 pass_by_val(main, (int128a) i64);
17396 q = (int128a) i64;
17397 if (q != holder)
17398 return 1;
17399
17400 ;
17401 return 0;
17402 }
17403 _ACEOF
17404 if ac_fn_c_try_run "$LINENO"; then :
17405 pgac_cv__128bit_int_bug=ok
17406 else
17407 pgac_cv__128bit_int_bug=broken
17408 fi
17409 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17410 conftest.$ac_objext conftest.beam conftest.$ac_ext
17411 fi
17412
17413 fi
17414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17415 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17416 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17417
17418 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17419
17420 # The cast to long int works around a bug in the HP C Compiler,
17421 # see AC_CHECK_SIZEOF for more information.
17422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17423 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17424 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17425 $as_echo_n "(cached) " >&6
17426 else
17427 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
17428 #ifndef offsetof
17429 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17430 #endif
17431 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17432
17433 else
17434 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17435 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17436 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17437 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17438 See \`config.log' for more details" "$LINENO" 5; }
17439 else
17440 ac_cv_alignof_PG_INT128_TYPE=0
17441 fi
17442 fi
17443
17444 fi
17445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17446 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17447
17448
17449
17450 cat >>confdefs.h <<_ACEOF
17451 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17452 _ACEOF
17453
17454
17455 fi
17456 fi
17457
17458 # Check for various atomic operations now that we have checked how to declare
17459 # 64bit integers.
17460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17461 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17462 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17463 $as_echo_n "(cached) " >&6
17464 else
17465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17466 /* end confdefs.h. */
17467
17468 int
17469 main ()
17470 {
17471 char lock = 0;
17472 __sync_lock_test_and_set(&lock, 1);
17473 __sync_lock_release(&lock);
17474 ;
17475 return 0;
17476 }
17477 _ACEOF
17478 if ac_fn_c_try_link "$LINENO"; then :
17479 pgac_cv_gcc_sync_char_tas="yes"
17480 else
17481 pgac_cv_gcc_sync_char_tas="no"
17482 fi
17483 rm -f core conftest.err conftest.$ac_objext \
17484 conftest$ac_exeext conftest.$ac_ext
17485 fi
17486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17487 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17488 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17489
17490 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17491
17492 fi
17493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17494 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17495 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17496 $as_echo_n "(cached) " >&6
17497 else
17498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17499 /* end confdefs.h. */
17500
17501 int
17502 main ()
17503 {
17504 int lock = 0;
17505 __sync_lock_test_and_set(&lock, 1);
17506 __sync_lock_release(&lock);
17507 ;
17508 return 0;
17509 }
17510 _ACEOF
17511 if ac_fn_c_try_link "$LINENO"; then :
17512 pgac_cv_gcc_sync_int32_tas="yes"
17513 else
17514 pgac_cv_gcc_sync_int32_tas="no"
17515 fi
17516 rm -f core conftest.err conftest.$ac_objext \
17517 conftest$ac_exeext conftest.$ac_ext
17518 fi
17519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17520 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17521 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17522
17523 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17524
17525 fi
17526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17527 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17528 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17529 $as_echo_n "(cached) " >&6
17530 else
17531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17532 /* end confdefs.h. */
17533
17534 int
17535 main ()
17536 {
17537 int val = 0;
17538 __sync_val_compare_and_swap(&val, 0, 37);
17539 ;
17540 return 0;
17541 }
17542 _ACEOF
17543 if ac_fn_c_try_link "$LINENO"; then :
17544 pgac_cv_gcc_sync_int32_cas="yes"
17545 else
17546 pgac_cv_gcc_sync_int32_cas="no"
17547 fi
17548 rm -f core conftest.err conftest.$ac_objext \
17549 conftest$ac_exeext conftest.$ac_ext
17550 fi
17551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17552 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17553 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17554
17555 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17556
17557 fi
17558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17559 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17560 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17561 $as_echo_n "(cached) " >&6
17562 else
17563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17564 /* end confdefs.h. */
17565 #include <stdint.h>
17566 int
17567 main ()
17568 {
17569 int64_t lock = 0;
17570 __sync_val_compare_and_swap(&lock, 0, (int64_t) 37);
17571 ;
17572 return 0;
17573 }
17574 _ACEOF
17575 if ac_fn_c_try_link "$LINENO"; then :
17576 pgac_cv_gcc_sync_int64_cas="yes"
17577 else
17578 pgac_cv_gcc_sync_int64_cas="no"
17579 fi
17580 rm -f core conftest.err conftest.$ac_objext \
17581 conftest$ac_exeext conftest.$ac_ext
17582 fi
17583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17584 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17585 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17586
17587 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17588
17589 fi
17590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17591 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17592 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17593 $as_echo_n "(cached) " >&6
17594 else
17595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17596 /* end confdefs.h. */
17597
17598 int
17599 main ()
17600 {
17601 int val = 0;
17602 int expect = 0;
17603 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17604 ;
17605 return 0;
17606 }
17607 _ACEOF
17608 if ac_fn_c_try_link "$LINENO"; then :
17609 pgac_cv_gcc_atomic_int32_cas="yes"
17610 else
17611 pgac_cv_gcc_atomic_int32_cas="no"
17612 fi
17613 rm -f core conftest.err conftest.$ac_objext \
17614 conftest$ac_exeext conftest.$ac_ext
17615 fi
17616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17617 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17618 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17619
17620 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17621
17622 fi
17623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17624 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17625 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17626 $as_echo_n "(cached) " >&6
17627 else
17628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17629 /* end confdefs.h. */
17630 #include <stdint.h>
17631 int
17632 main ()
17633 {
17634 int64_t val = 0;
17635 int64_t expect = 0;
17636 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17637 ;
17638 return 0;
17639 }
17640 _ACEOF
17641 if ac_fn_c_try_link "$LINENO"; then :
17642 pgac_cv_gcc_atomic_int64_cas="yes"
17643 else
17644 pgac_cv_gcc_atomic_int64_cas="no"
17645 fi
17646 rm -f core conftest.err conftest.$ac_objext \
17647 conftest$ac_exeext conftest.$ac_ext
17648 fi
17649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17650 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17651 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17652
17653 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17654
17655 fi
17656
17657
17658 # Check for __get_cpuid() and __cpuid()
17659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17660 $as_echo_n "checking for __get_cpuid... " >&6; }
17661 if ${pgac_cv__get_cpuid+:} false; then :
17662 $as_echo_n "(cached) " >&6
17663 else
17664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17665 /* end confdefs.h. */
17666 #include <cpuid.h>
17667 int
17668 main ()
17669 {
17670 unsigned int exx[4] = {0, 0, 0, 0};
17671 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17672
17673 ;
17674 return 0;
17675 }
17676 _ACEOF
17677 if ac_fn_c_try_link "$LINENO"; then :
17678 pgac_cv__get_cpuid="yes"
17679 else
17680 pgac_cv__get_cpuid="no"
17681 fi
17682 rm -f core conftest.err conftest.$ac_objext \
17683 conftest$ac_exeext conftest.$ac_ext
17684 fi
17685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17686 $as_echo "$pgac_cv__get_cpuid" >&6; }
17687 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17688
17689 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17690
17691 else
17692 # __cpuid()
17693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17694 $as_echo_n "checking for __cpuid... " >&6; }
17695 if ${pgac_cv__cpuid+:} false; then :
17696 $as_echo_n "(cached) " >&6
17697 else
17698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17699 /* end confdefs.h. */
17700 #include <intrin.h>
17701 int
17702 main ()
17703 {
17704 unsigned int exx[4] = {0, 0, 0, 0};
17705 __cpuid(exx, 1);
17706
17707 ;
17708 return 0;
17709 }
17710 _ACEOF
17711 if ac_fn_c_try_link "$LINENO"; then :
17712 pgac_cv__cpuid="yes"
17713 else
17714 pgac_cv__cpuid="no"
17715 fi
17716 rm -f core conftest.err conftest.$ac_objext \
17717 conftest$ac_exeext conftest.$ac_ext
17718 fi
17719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17720 $as_echo "$pgac_cv__cpuid" >&6; }
17721 if test x"$pgac_cv__cpuid" = x"yes"; then
17722
17723 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17724
17725 fi
17726 fi
17727
17728 # Check for __get_cpuid_count() and __cpuidex() in a similar fashion.
17729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid_count" >&5
17730 $as_echo_n "checking for __get_cpuid_count... " >&6; }
17731 if ${pgac_cv__get_cpuid_count+:} false; then :
17732 $as_echo_n "(cached) " >&6
17733 else
17734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17735 /* end confdefs.h. */
17736 #include <cpuid.h>
17737 int
17738 main ()
17739 {
17740 unsigned int exx[4] = {0, 0, 0, 0};
17741 __get_cpuid_count(7, 0, &exx[0], &exx[1], &exx[2], &exx[3]);
17742
17743 ;
17744 return 0;
17745 }
17746 _ACEOF
17747 if ac_fn_c_try_link "$LINENO"; then :
17748 pgac_cv__get_cpuid_count="yes"
17749 else
17750 pgac_cv__get_cpuid_count="no"
17751 fi
17752 rm -f core conftest.err conftest.$ac_objext \
17753 conftest$ac_exeext conftest.$ac_ext
17754 fi
17755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid_count" >&5
17756 $as_echo "$pgac_cv__get_cpuid_count" >&6; }
17757 if test x"$pgac_cv__get_cpuid_count" = x"yes"; then
17758
17759 $as_echo "#define HAVE__GET_CPUID_COUNT 1" >>confdefs.h
17760
17761 else
17762 # __cpuidex()
17763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuidex" >&5
17764 $as_echo_n "checking for __cpuidex... " >&6; }
17765 if ${pgac_cv__cpuidex+:} false; then :
17766 $as_echo_n "(cached) " >&6
17767 else
17768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17769 /* end confdefs.h. */
17770 #include <intrin.h>
17771 int
17772 main ()
17773 {
17774 unsigned int exx[4] = {0, 0, 0, 0};
17775 __cpuidex(exx, 7, 0);
17776
17777 ;
17778 return 0;
17779 }
17780 _ACEOF
17781 if ac_fn_c_try_link "$LINENO"; then :
17782 pgac_cv__cpuidex="yes"
17783 else
17784 pgac_cv__cpuidex="no"
17785 fi
17786 rm -f core conftest.err conftest.$ac_objext \
17787 conftest$ac_exeext conftest.$ac_ext
17788 fi
17789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuidex" >&5
17790 $as_echo "$pgac_cv__cpuidex" >&6; }
17791 if test x"$pgac_cv__cpuidex" = x"yes"; then
17792
17793 $as_echo "#define HAVE__CPUIDEX 1" >>confdefs.h
17794
17795 fi
17796 fi
17797
17798 # Check for XSAVE intrinsics
17799 #
17800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _xgetbv" >&5
17801 $as_echo_n "checking for _xgetbv... " >&6; }
17802 if ${pgac_cv_xsave_intrinsics+:} false; then :
17803 $as_echo_n "(cached) " >&6
17804 else
17805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17806 /* end confdefs.h. */
17807 #include <immintrin.h>
17808 #if defined(__has_attribute) && __has_attribute (target)
17809 __attribute__((target("xsave")))
17810 #endif
17811 static int xsave_test(void)
17812 {
17813 return _xgetbv(0) & 0xe0;
17814 }
17815 int
17816 main ()
17817 {
17818 return xsave_test();
17819 ;
17820 return 0;
17821 }
17822 _ACEOF
17823 if ac_fn_c_try_link "$LINENO"; then :
17824 pgac_cv_xsave_intrinsics=yes
17825 else
17826 pgac_cv_xsave_intrinsics=no
17827 fi
17828 rm -f core conftest.err conftest.$ac_objext \
17829 conftest$ac_exeext conftest.$ac_ext
17830 fi
17831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_xsave_intrinsics" >&5
17832 $as_echo "$pgac_cv_xsave_intrinsics" >&6; }
17833 if test x"$pgac_cv_xsave_intrinsics" = x"yes"; then
17834 pgac_xsave_intrinsics=yes
17835 fi
17836
17837 if test x"$pgac_xsave_intrinsics" = x"yes"; then
17838
17839 $as_echo "#define HAVE_XSAVE_INTRINSICS 1" >>confdefs.h
17840
17841 fi
17842
17843 # Check for AVX-512 popcount intrinsics
17844 #
17845 if test x"$host_cpu" = x"x86_64"; then
17846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm512_popcnt_epi64" >&5
17847 $as_echo_n "checking for _mm512_popcnt_epi64... " >&6; }
17848 if ${pgac_cv_avx512_popcnt_intrinsics+:} false; then :
17849 $as_echo_n "(cached) " >&6
17850 else
17851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17852 /* end confdefs.h. */
17853 #include <immintrin.h>
17854 #include <stdint.h>
17855 char buf[sizeof(__m512i)];
17856
17857 #if defined(__has_attribute) && __has_attribute (target)
17858 __attribute__((target("avx512vpopcntdq,avx512bw")))
17859 #endif
17860 static int popcount_test(void)
17861 {
17862 int64_t popcnt = 0;
17863 __m512i accum = _mm512_setzero_si512();
17864 __m512i val = _mm512_maskz_loadu_epi8((__mmask64) 0xf0f0f0f0f0f0f0f0, (const __m512i *) buf);
17865 __m512i cnt = _mm512_popcnt_epi64(val);
17866 accum = _mm512_add_epi64(accum, cnt);
17867 popcnt = _mm512_reduce_add_epi64(accum);
17868 return (int) popcnt;
17869 }
17870 int
17871 main ()
17872 {
17873 return popcount_test();
17874 ;
17875 return 0;
17876 }
17877 _ACEOF
17878 if ac_fn_c_try_link "$LINENO"; then :
17879 pgac_cv_avx512_popcnt_intrinsics=yes
17880 else
17881 pgac_cv_avx512_popcnt_intrinsics=no
17882 fi
17883 rm -f core conftest.err conftest.$ac_objext \
17884 conftest$ac_exeext conftest.$ac_ext
17885 fi
17886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_avx512_popcnt_intrinsics" >&5
17887 $as_echo "$pgac_cv_avx512_popcnt_intrinsics" >&6; }
17888 if test x"$pgac_cv_avx512_popcnt_intrinsics" = x"yes"; then
17889 pgac_avx512_popcnt_intrinsics=yes
17890 fi
17891
17892 if test x"$pgac_avx512_popcnt_intrinsics" = x"yes"; then
17893
17894 $as_echo "#define USE_AVX512_POPCNT_WITH_RUNTIME_CHECK 1" >>confdefs.h
17895
17896 fi
17897 fi
17898
17899 # Check for SVE popcount intrinsics
17900 #
17901 if test x"$host_cpu" = x"aarch64"; then
17902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for svcnt_x" >&5
17903 $as_echo_n "checking for svcnt_x... " >&6; }
17904 if ${pgac_cv_sve_popcnt_intrinsics+:} false; then :
17905 $as_echo_n "(cached) " >&6
17906 else
17907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17908 /* end confdefs.h. */
17909 #include <arm_sve.h>
17910
17911 char buf[128];
17912
17913 #if defined(__has_attribute) && __has_attribute (target)
17914 __attribute__((target("arch=armv8-a+sve")))
17915 #endif
17916 static int popcount_test(void)
17917 {
17918 svbool_t pred = svptrue_b64();
17919 svuint8_t vec8;
17920 svuint64_t accum1 = svdup_u64(0),
17921 accum2 = svdup_u64(0),
17922 vec64;
17923 char *p = buf;
17924 uint64_t popcnt,
17925 mask = 0x5555555555555555;
17926
17927 vec64 = svand_n_u64_x(pred, svld1_u64(pred, (const uint64_t *) p), mask);
17928 accum1 = svadd_u64_x(pred, accum1, svcnt_u64_x(pred, vec64));
17929 p += svcntb();
17930
17931 vec64 = svand_n_u64_x(pred, svld1_u64(pred, (const uint64_t *) p), mask);
17932 accum2 = svadd_u64_x(pred, accum2, svcnt_u64_x(pred, vec64));
17933 p += svcntb();
17934
17935 popcnt = svaddv_u64(pred, svadd_u64_x(pred, accum1, accum2));
17936
17937 pred = svwhilelt_b8_s32(0, sizeof(buf));
17938 vec8 = svand_n_u8_x(pred, svld1_u8(pred, (const uint8_t *) p), 0x55);
17939 return (int) (popcnt + svaddv_u8(pred, svcnt_u8_x(pred, vec8)));
17940 }
17941 int
17942 main ()
17943 {
17944 return popcount_test();
17945 ;
17946 return 0;
17947 }
17948 _ACEOF
17949 if ac_fn_c_try_link "$LINENO"; then :
17950 pgac_cv_sve_popcnt_intrinsics=yes
17951 else
17952 pgac_cv_sve_popcnt_intrinsics=no
17953 fi
17954 rm -f core conftest.err conftest.$ac_objext \
17955 conftest$ac_exeext conftest.$ac_ext
17956 fi
17957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sve_popcnt_intrinsics" >&5
17958 $as_echo "$pgac_cv_sve_popcnt_intrinsics" >&6; }
17959 if test x"$pgac_cv_sve_popcnt_intrinsics" = x"yes"; then
17960 pgac_sve_popcnt_intrinsics=yes
17961 fi
17962
17963 if test x"$pgac_sve_popcnt_intrinsics" = x"yes"; then
17964
17965 $as_echo "#define USE_SVE_POPCNT_WITH_RUNTIME_CHECK 1" >>confdefs.h
17966
17967 fi
17968 fi
17969
17970 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17971 #
17972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32" >&5
17973 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32... " >&6; }
17974 if ${pgac_cv_sse42_crc32_intrinsics+:} false; then :
17975 $as_echo_n "(cached) " >&6
17976 else
17977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17978 /* end confdefs.h. */
17979 #include <nmmintrin.h>
17980 unsigned int crc;
17981 #if defined(__has_attribute) && __has_attribute (target)
17982 __attribute__((target("sse4.2")))
17983 #endif
17984 static int crc32_sse42_test(void)
17985 {
17986 crc = _mm_crc32_u8(crc, 0);
17987 crc = _mm_crc32_u32(crc, 0);
17988 /* return computed value, to prevent the above being optimized away */
17989 return crc == 0;
17990 }
17991 int
17992 main ()
17993 {
17994 return crc32_sse42_test();
17995 ;
17996 return 0;
17997 }
17998 _ACEOF
17999 if ac_fn_c_try_link "$LINENO"; then :
18000 pgac_cv_sse42_crc32_intrinsics=yes
18001 else
18002 pgac_cv_sse42_crc32_intrinsics=no
18003 fi
18004 rm -f core conftest.err conftest.$ac_objext \
18005 conftest$ac_exeext conftest.$ac_ext
18006 fi
18007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics" >&5
18008 $as_echo "$pgac_cv_sse42_crc32_intrinsics" >&6; }
18009 if test x"$pgac_cv_sse42_crc32_intrinsics" = x"yes"; then
18010 pgac_sse42_crc32_intrinsics=yes
18011 fi
18012
18013
18014 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
18015 # define __SSE4_2__ in that case.
18016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18017 /* end confdefs.h. */
18018
18019 int
18020 main ()
18021 {
18022
18023 #ifndef __SSE4_2__
18024 #error __SSE4_2__ not defined
18025 #endif
18026
18027 ;
18028 return 0;
18029 }
18030 _ACEOF
18031 if ac_fn_c_try_compile "$LINENO"; then :
18032 SSE4_2_TARGETED=1
18033 fi
18034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18035
18036 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
18037 #
18038 # First check if __crc32c* intrinsics can be used with the default compiler
18039 # flags. If not, check if adding "-march=armv8-a+crc+simd" flag helps.
18040 # On systems using soft-float ABI, "-march=armv8-a+crc" is required instead.
18041 # CFLAGS_CRC is set if the extra flag is required.
18042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
18043 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
18044 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
18045 $as_echo_n "(cached) " >&6
18046 else
18047 pgac_save_CFLAGS=$CFLAGS
18048 CFLAGS="$pgac_save_CFLAGS "
18049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18050 /* end confdefs.h. */
18051 #include <arm_acle.h>
18052 unsigned int crc;
18053 int
18054 main ()
18055 {
18056 crc = __crc32cb(crc, 0);
18057 crc = __crc32ch(crc, 0);
18058 crc = __crc32cw(crc, 0);
18059 crc = __crc32cd(crc, 0);
18060 /* return computed value, to prevent the above being optimized away */
18061 return crc == 0;
18062 ;
18063 return 0;
18064 }
18065 _ACEOF
18066 if ac_fn_c_try_link "$LINENO"; then :
18067 pgac_cv_armv8_crc32c_intrinsics_=yes
18068 else
18069 pgac_cv_armv8_crc32c_intrinsics_=no
18070 fi
18071 rm -f core conftest.err conftest.$ac_objext \
18072 conftest$ac_exeext conftest.$ac_ext
18073 CFLAGS="$pgac_save_CFLAGS"
18074 fi
18075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
18076 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
18077 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
18078 CFLAGS_CRC=""
18079 pgac_armv8_crc32c_intrinsics=yes
18080 fi
18081
18082 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
18083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc+simd" >&5
18084 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc+simd... " >&6; }
18085 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrcpsimd+:} false; then :
18086 $as_echo_n "(cached) " >&6
18087 else
18088 pgac_save_CFLAGS=$CFLAGS
18089 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc+simd"
18090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18091 /* end confdefs.h. */
18092 #include <arm_acle.h>
18093 unsigned int crc;
18094 int
18095 main ()
18096 {
18097 crc = __crc32cb(crc, 0);
18098 crc = __crc32ch(crc, 0);
18099 crc = __crc32cw(crc, 0);
18100 crc = __crc32cd(crc, 0);
18101 /* return computed value, to prevent the above being optimized away */
18102 return crc == 0;
18103 ;
18104 return 0;
18105 }
18106 _ACEOF
18107 if ac_fn_c_try_link "$LINENO"; then :
18108 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrcpsimd=yes
18109 else
18110 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrcpsimd=no
18111 fi
18112 rm -f core conftest.err conftest.$ac_objext \
18113 conftest$ac_exeext conftest.$ac_ext
18114 CFLAGS="$pgac_save_CFLAGS"
18115 fi
18116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrcpsimd" >&5
18117 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrcpsimd" >&6; }
18118 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrcpsimd" = x"yes"; then
18119 CFLAGS_CRC="-march=armv8-a+crc+simd"
18120 pgac_armv8_crc32c_intrinsics=yes
18121 fi
18122
18123 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
18124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
18125 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
18126 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
18127 $as_echo_n "(cached) " >&6
18128 else
18129 pgac_save_CFLAGS=$CFLAGS
18130 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
18131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18132 /* end confdefs.h. */
18133 #include <arm_acle.h>
18134 unsigned int crc;
18135 int
18136 main ()
18137 {
18138 crc = __crc32cb(crc, 0);
18139 crc = __crc32ch(crc, 0);
18140 crc = __crc32cw(crc, 0);
18141 crc = __crc32cd(crc, 0);
18142 /* return computed value, to prevent the above being optimized away */
18143 return crc == 0;
18144 ;
18145 return 0;
18146 }
18147 _ACEOF
18148 if ac_fn_c_try_link "$LINENO"; then :
18149 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
18150 else
18151 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
18152 fi
18153 rm -f core conftest.err conftest.$ac_objext \
18154 conftest$ac_exeext conftest.$ac_ext
18155 CFLAGS="$pgac_save_CFLAGS"
18156 fi
18157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
18158 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
18159 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
18160 CFLAGS_CRC="-march=armv8-a+crc"
18161 pgac_armv8_crc32c_intrinsics=yes
18162 fi
18163
18164 fi
18165 fi
18166
18167 # Check for LoongArch CRC intrinsics to do CRC calculations.
18168 #
18169 # Check if __builtin_loongarch_crcc_* intrinsics can be used
18170 # with the default compiler flags.
18171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_loongarch_crcc_w_b_w, __builtin_loongarch_crcc_w_h_w, __builtin_loongarch_crcc_w_w_w and __builtin_loongarch_crcc_w_d_w" >&5
18172 $as_echo_n "checking for __builtin_loongarch_crcc_w_b_w, __builtin_loongarch_crcc_w_h_w, __builtin_loongarch_crcc_w_w_w and __builtin_loongarch_crcc_w_d_w... " >&6; }
18173 if ${pgac_cv_loongarch_crc32c_intrinsics+:} false; then :
18174 $as_echo_n "(cached) " >&6
18175 else
18176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18177 /* end confdefs.h. */
18178 unsigned int crc;
18179 int
18180 main ()
18181 {
18182 crc = __builtin_loongarch_crcc_w_b_w(0, crc);
18183 crc = __builtin_loongarch_crcc_w_h_w(0, crc);
18184 crc = __builtin_loongarch_crcc_w_w_w(0, crc);
18185 crc = __builtin_loongarch_crcc_w_d_w(0, crc);
18186 /* return computed value, to prevent the above being optimized away */
18187 return crc == 0;
18188 ;
18189 return 0;
18190 }
18191 _ACEOF
18192 if ac_fn_c_try_link "$LINENO"; then :
18193 pgac_cv_loongarch_crc32c_intrinsics=yes
18194 else
18195 pgac_cv_loongarch_crc32c_intrinsics=no
18196 fi
18197 rm -f core conftest.err conftest.$ac_objext \
18198 conftest$ac_exeext conftest.$ac_ext
18199 fi
18200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_loongarch_crc32c_intrinsics" >&5
18201 $as_echo "$pgac_cv_loongarch_crc32c_intrinsics" >&6; }
18202 if test x"$pgac_cv_loongarch_crc32c_intrinsics" = x"yes"; then
18203 pgac_loongarch_crc32c_intrinsics=yes
18204 fi
18205
18206
18207
18208
18209 # Select CRC-32C implementation.
18210 #
18211 # There are three methods of calculating CRC, in order of increasing
18212 # performance:
18213 #
18214 # 1. The fallback using a lookup table, called slicing-by-8
18215 # 2. CRC-32C instructions (found in e.g. Intel SSE 4.2 and ARMv8 CRC Extension)
18216 # 3. Algorithms using carryless multiplication instructions
18217 # (e.g. Intel PCLMUL and Arm PMULL)
18218 #
18219 # If we can produce code (via function attributes or additional compiler
18220 # flags) that uses #2 (and possibly #3), we compile all implementations
18221 # and select which one to use at runtime, depending on what is supported
18222 # by the processor we're running on.
18223 #
18224 # If we are targeting a processor that has #2, we can use that without
18225 # runtime selection.
18226 #
18227 # Note that we do not use __attribute__((target("..."))) for the ARM CRC
18228 # instructions because until clang 16, using the ARM intrinsics still requires
18229 # special -march flags. Perhaps we can re-evaluate this decision after some
18230 # time has passed.
18231 #
18232 # You can skip the runtime check by setting the appropriate USE_*_CRC32 flag to 1
18233 # in the template or configure command line.
18234 #
18235 # If we are targeting a LoongArch processor, CRC instructions are
18236 # always available (at least on 64 bit), so no runtime check is needed.
18237 if test x"$USE_SLICING_BY_8_CRC32C" = x"" && test x"$USE_SSE42_CRC32C" = x"" && test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"" && test x"$USE_ARMV8_CRC32C" = x"" && test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"" && test x"$USE_LOONGARCH_CRC32C" = x""; then
18238 # Use Intel SSE 4.2 if available.
18239 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
18240 USE_SSE42_CRC32C=1
18241 else
18242 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
18243 # the runtime check.
18244 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && (test x"$pgac_cv__get_cpuid" = x"yes" || test x"$pgac_cv__cpuid" = x"yes"); then
18245 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
18246 else
18247 # Use ARM CRC Extension if available.
18248 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_CRC" = x""; then
18249 USE_ARMV8_CRC32C=1
18250 else
18251 # ARM CRC Extension, with runtime check?
18252 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
18253 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
18254 else
18255 # LoongArch CRCC instructions.
18256 if test x"$pgac_loongarch_crc32c_intrinsics" = x"yes"; then
18257 USE_LOONGARCH_CRC32C=1
18258 else
18259 # fall back to slicing-by-8 algorithm, which doesn't require any
18260 # special CPU support.
18261 USE_SLICING_BY_8_CRC32C=1
18262 fi
18263 fi
18264 fi
18265 fi
18266 fi
18267 fi
18268
18269 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
18270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
18271 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
18272 if test x"$USE_SSE42_CRC32C" = x"1"; then
18273
18274 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
18275
18276 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sse42_choose.o"
18277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
18278 $as_echo "SSE 4.2" >&6; }
18279 else
18280 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18281
18282 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18283
18284 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
18285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
18286 $as_echo "SSE 4.2 with runtime check" >&6; }
18287 else
18288 if test x"$USE_ARMV8_CRC32C" = x"1"; then
18289
18290 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
18291
18292 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
18293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
18294 $as_echo "ARMv8 CRC instructions" >&6; }
18295 else
18296 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18297
18298 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18299
18300 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
18301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
18302 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
18303 else
18304 if test x"$USE_LOONGARCH_CRC32C" = x"1"; then
18305
18306 $as_echo "#define USE_LOONGARCH_CRC32C 1" >>confdefs.h
18307
18308 PG_CRC32C_OBJS="pg_crc32c_loongarch.o"
18309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: LoongArch CRCC instructions" >&5
18310 $as_echo "LoongArch CRCC instructions" >&6; }
18311 else
18312
18313 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
18314
18315 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
18316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
18317 $as_echo "slicing-by-8" >&6; }
18318 fi
18319 fi
18320 fi
18321 fi
18322 fi
18323
18324
18325 # Check for carryless multiplication intrinsics to do vectorized CRC calculations.
18326 #
18327 if test x"$host_cpu" = x"x86_64"; then
18328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm512_clmulepi64_epi128" >&5
18329 $as_echo_n "checking for _mm512_clmulepi64_epi128... " >&6; }
18330 if ${pgac_cv_avx512_pclmul_intrinsics+:} false; then :
18331 $as_echo_n "(cached) " >&6
18332 else
18333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18334 /* end confdefs.h. */
18335 #include <immintrin.h>
18336 __m512i x;
18337 __m512i y;
18338
18339 #if defined(__has_attribute) && __has_attribute (target)
18340 __attribute__((target("vpclmulqdq,avx512vl")))
18341 #endif
18342 static int avx512_pclmul_test(void)
18343 {
18344 __m128i z;
18345
18346 x = _mm512_xor_si512(_mm512_zextsi128_si512(_mm_cvtsi32_si128(0)), x);
18347 y = _mm512_clmulepi64_epi128(x, y, 0);
18348 z = _mm_ternarylogic_epi64(
18349 _mm512_castsi512_si128(y),
18350 _mm512_extracti32x4_epi32(y, 1),
18351 _mm512_extracti32x4_epi32(y, 2),
18352 0x96);
18353 return _mm_crc32_u64(0, _mm_extract_epi64(z, 0));
18354 }
18355 int
18356 main ()
18357 {
18358 return avx512_pclmul_test();
18359 ;
18360 return 0;
18361 }
18362 _ACEOF
18363 if ac_fn_c_try_link "$LINENO"; then :
18364 pgac_cv_avx512_pclmul_intrinsics=yes
18365 else
18366 pgac_cv_avx512_pclmul_intrinsics=no
18367 fi
18368 rm -f core conftest.err conftest.$ac_objext \
18369 conftest$ac_exeext conftest.$ac_ext
18370 fi
18371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_avx512_pclmul_intrinsics" >&5
18372 $as_echo "$pgac_cv_avx512_pclmul_intrinsics" >&6; }
18373 if test x"$pgac_cv_avx512_pclmul_intrinsics" = x"yes"; then
18374 pgac_avx512_pclmul_intrinsics=yes
18375 fi
18376
18377 fi
18378
18379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vectorized CRC-32C" >&5
18380 $as_echo_n "checking for vectorized CRC-32C... " >&6; }
18381 if test x"$pgac_avx512_pclmul_intrinsics" = x"yes"; then
18382
18383 $as_echo "#define USE_AVX512_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18384
18385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: AVX-512 with runtime check" >&5
18386 $as_echo "AVX-512 with runtime check" >&6; }
18387 else
18388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
18389 $as_echo "none" >&6; }
18390 fi
18391
18392 # Select semaphore implementation type.
18393 if test "$PORTNAME" != "win32"; then
18394 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
18395 # Need sem_open for this
18396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
18397 $as_echo_n "checking for library containing sem_open... " >&6; }
18398 if ${ac_cv_search_sem_open+:} false; then :
18399 $as_echo_n "(cached) " >&6
18400 else
18401 ac_func_search_save_LIBS=$LIBS
18402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18403 /* end confdefs.h. */
18404
18405 /* Override any GCC internal prototype to avoid an error.
18406 Use char because int might match the return type of a GCC
18407 builtin and then its argument prototype would still apply. */
18408 #ifdef __cplusplus
18409 extern "C"
18410 #endif
18411 char sem_open ();
18412 int
18413 main ()
18414 {
18415 return sem_open ();
18416 ;
18417 return 0;
18418 }
18419 _ACEOF
18420 for ac_lib in '' rt pthread; do
18421 if test -z "$ac_lib"; then
18422 ac_res="none required"
18423 else
18424 ac_res=-l$ac_lib
18425 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18426 fi
18427 if ac_fn_c_try_link "$LINENO"; then :
18428 ac_cv_search_sem_open=$ac_res
18429 fi
18430 rm -f core conftest.err conftest.$ac_objext \
18431 conftest$ac_exeext
18432 if ${ac_cv_search_sem_open+:} false; then :
18433 break
18434 fi
18435 done
18436 if ${ac_cv_search_sem_open+:} false; then :
18437
18438 else
18439 ac_cv_search_sem_open=no
18440 fi
18441 rm conftest.$ac_ext
18442 LIBS=$ac_func_search_save_LIBS
18443 fi
18444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
18445 $as_echo "$ac_cv_search_sem_open" >&6; }
18446 ac_res=$ac_cv_search_sem_open
18447 if test "$ac_res" != no; then :
18448 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18449 USE_NAMED_POSIX_SEMAPHORES=1
18450 fi
18451
18452 fi
18453 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
18454 # Need sem_init for this
18455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
18456 $as_echo_n "checking for library containing sem_init... " >&6; }
18457 if ${ac_cv_search_sem_init+:} false; then :
18458 $as_echo_n "(cached) " >&6
18459 else
18460 ac_func_search_save_LIBS=$LIBS
18461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18462 /* end confdefs.h. */
18463
18464 /* Override any GCC internal prototype to avoid an error.
18465 Use char because int might match the return type of a GCC
18466 builtin and then its argument prototype would still apply. */
18467 #ifdef __cplusplus
18468 extern "C"
18469 #endif
18470 char sem_init ();
18471 int
18472 main ()
18473 {
18474 return sem_init ();
18475 ;
18476 return 0;
18477 }
18478 _ACEOF
18479 for ac_lib in '' rt pthread; do
18480 if test -z "$ac_lib"; then
18481 ac_res="none required"
18482 else
18483 ac_res=-l$ac_lib
18484 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18485 fi
18486 if ac_fn_c_try_link "$LINENO"; then :
18487 ac_cv_search_sem_init=$ac_res
18488 fi
18489 rm -f core conftest.err conftest.$ac_objext \
18490 conftest$ac_exeext
18491 if ${ac_cv_search_sem_init+:} false; then :
18492 break
18493 fi
18494 done
18495 if ${ac_cv_search_sem_init+:} false; then :
18496
18497 else
18498 ac_cv_search_sem_init=no
18499 fi
18500 rm conftest.$ac_ext
18501 LIBS=$ac_func_search_save_LIBS
18502 fi
18503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
18504 $as_echo "$ac_cv_search_sem_init" >&6; }
18505 ac_res=$ac_cv_search_sem_init
18506 if test "$ac_res" != no; then :
18507 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18508 USE_UNNAMED_POSIX_SEMAPHORES=1
18509 fi
18510
18511 fi
18512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
18513 $as_echo_n "checking which semaphore API to use... " >&6; }
18514 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
18515
18516 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18517
18518 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18519 sematype="named POSIX"
18520 else
18521 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
18522
18523 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18524
18525 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18526 sematype="unnamed POSIX"
18527 else
18528
18529 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
18530
18531 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
18532 sematype="System V"
18533 fi
18534 fi
18535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
18536 $as_echo "$sematype" >&6; }
18537 else
18538
18539 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
18540
18541 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18542 fi
18543
18544
18545 # Select shared-memory implementation type.
18546 if test "$PORTNAME" != "win32"; then
18547
18548 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18549
18550 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18551 else
18552
18553 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18554
18555 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18556 fi
18557
18558 # Select random number source. If a TLS library is used then it will be the
18559 # first choice, else the native platform sources (Windows API or /dev/urandom)
18560 # will be used.
18561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
18562 $as_echo_n "checking which random number source to use... " >&6; }
18563 if test x"$with_ssl" = x"openssl" ; then
18564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
18565 $as_echo "OpenSSL" >&6; }
18566 elif test x"$PORTNAME" = x"win32" ; then
18567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18568 $as_echo "Windows native" >&6; }
18569 elif test x"$cross_compiling" = x"yes"; then
18570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming /dev/urandom" >&5
18571 $as_echo "assuming /dev/urandom" >&6; }
18572 else
18573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18574 $as_echo "/dev/urandom" >&6; }
18575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
18576 $as_echo_n "checking for /dev/urandom... " >&6; }
18577 if ${ac_cv_file__dev_urandom+:} false; then :
18578 $as_echo_n "(cached) " >&6
18579 else
18580 test "$cross_compiling" = yes &&
18581 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18582 if test -r "/dev/urandom"; then
18583 ac_cv_file__dev_urandom=yes
18584 else
18585 ac_cv_file__dev_urandom=no
18586 fi
18587 fi
18588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
18589 $as_echo "$ac_cv_file__dev_urandom" >&6; }
18590 if test "x$ac_cv_file__dev_urandom" = xyes; then :
18591
18592 fi
18593
18594
18595 if test x"$ac_cv_file__dev_urandom" = x"no" ; then
18596 as_fn_error $? "
18597 no source of strong random numbers was found
18598 PostgreSQL can use OpenSSL, native Windows API or /dev/urandom as a source of random numbers." "$LINENO" 5
18599 fi
18600 fi
18601
18602 # If not set in template file, set bytes to use libc memset()
18603 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18604 MEMSET_LOOP_LIMIT=1024
18605 fi
18606
18607 cat >>confdefs.h <<_ACEOF
18608 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18609 _ACEOF
18610
18611
18612
18613 if test "$enable_nls" = yes ; then
18614
18615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18616 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18617 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18618 $as_echo_n "(cached) " >&6
18619 else
18620 ac_func_search_save_LIBS=$LIBS
18621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18622 /* end confdefs.h. */
18623
18624 /* Override any GCC internal prototype to avoid an error.
18625 Use char because int might match the return type of a GCC
18626 builtin and then its argument prototype would still apply. */
18627 #ifdef __cplusplus
18628 extern "C"
18629 #endif
18630 char bind_textdomain_codeset ();
18631 int
18632 main ()
18633 {
18634 return bind_textdomain_codeset ();
18635 ;
18636 return 0;
18637 }
18638 _ACEOF
18639 for ac_lib in '' intl; do
18640 if test -z "$ac_lib"; then
18641 ac_res="none required"
18642 else
18643 ac_res=-l$ac_lib
18644 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18645 fi
18646 if ac_fn_c_try_link "$LINENO"; then :
18647 ac_cv_search_bind_textdomain_codeset=$ac_res
18648 fi
18649 rm -f core conftest.err conftest.$ac_objext \
18650 conftest$ac_exeext
18651 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18652 break
18653 fi
18654 done
18655 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18656
18657 else
18658 ac_cv_search_bind_textdomain_codeset=no
18659 fi
18660 rm conftest.$ac_ext
18661 LIBS=$ac_func_search_save_LIBS
18662 fi
18663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18664 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18665 ac_res=$ac_cv_search_bind_textdomain_codeset
18666 if test "$ac_res" != no; then :
18667 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18668
18669 else
18670 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18671 fi
18672
18673 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18674 if test "x$ac_cv_header_libintl_h" = xyes; then :
18675
18676 else
18677 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18678 fi
18679
18680
18681 if test -z "$MSGFMT"; then
18682 for ac_prog in msgfmt
18683 do
18684 # Extract the first word of "$ac_prog", so it can be a program name with args.
18685 set dummy $ac_prog; ac_word=$2
18686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18687 $as_echo_n "checking for $ac_word... " >&6; }
18688 if ${ac_cv_path_MSGFMT+:} false; then :
18689 $as_echo_n "(cached) " >&6
18690 else
18691 case $MSGFMT in
18692 [\\/]* | ?:[\\/]*)
18693 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18694 ;;
18695 *)
18696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18697 for as_dir in $PATH
18698 do
18699 IFS=$as_save_IFS
18700 test -z "$as_dir" && as_dir=.
18701 for ac_exec_ext in '' $ac_executable_extensions; do
18702 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18703 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18704 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18705 break 2
18706 fi
18707 done
18708 done
18709 IFS=$as_save_IFS
18710
18711 ;;
18712 esac
18713 fi
18714 MSGFMT=$ac_cv_path_MSGFMT
18715 if test -n "$MSGFMT"; then
18716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18717 $as_echo "$MSGFMT" >&6; }
18718 else
18719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18720 $as_echo "no" >&6; }
18721 fi
18722
18723
18724 test -n "$MSGFMT" && break
18725 done
18726
18727 else
18728 # Report the value of MSGFMT in configure's output in all cases.
18729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18730 $as_echo_n "checking for MSGFMT... " >&6; }
18731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18732 $as_echo "$MSGFMT" >&6; }
18733 fi
18734
18735 if test -z "$MSGFMT"; then
18736 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18737 fi
18738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18739 $as_echo_n "checking for msgfmt flags... " >&6; }
18740 if ${pgac_cv_msgfmt_flags+:} false; then :
18741 $as_echo_n "(cached) " >&6
18742 else
18743 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18744 pgac_cv_msgfmt_flags=-c
18745 fi
18746 fi
18747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18748 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18749 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18750
18751 if test -z "$MSGMERGE"; then
18752 for ac_prog in msgmerge
18753 do
18754 # Extract the first word of "$ac_prog", so it can be a program name with args.
18755 set dummy $ac_prog; ac_word=$2
18756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18757 $as_echo_n "checking for $ac_word... " >&6; }
18758 if ${ac_cv_path_MSGMERGE+:} false; then :
18759 $as_echo_n "(cached) " >&6
18760 else
18761 case $MSGMERGE in
18762 [\\/]* | ?:[\\/]*)
18763 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18764 ;;
18765 *)
18766 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18767 for as_dir in $PATH
18768 do
18769 IFS=$as_save_IFS
18770 test -z "$as_dir" && as_dir=.
18771 for ac_exec_ext in '' $ac_executable_extensions; do
18772 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18773 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18774 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18775 break 2
18776 fi
18777 done
18778 done
18779 IFS=$as_save_IFS
18780
18781 ;;
18782 esac
18783 fi
18784 MSGMERGE=$ac_cv_path_MSGMERGE
18785 if test -n "$MSGMERGE"; then
18786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18787 $as_echo "$MSGMERGE" >&6; }
18788 else
18789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18790 $as_echo "no" >&6; }
18791 fi
18792
18793
18794 test -n "$MSGMERGE" && break
18795 done
18796
18797 else
18798 # Report the value of MSGMERGE in configure's output in all cases.
18799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18800 $as_echo_n "checking for MSGMERGE... " >&6; }
18801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18802 $as_echo "$MSGMERGE" >&6; }
18803 fi
18804
18805 if test -z "$XGETTEXT"; then
18806 for ac_prog in xgettext
18807 do
18808 # Extract the first word of "$ac_prog", so it can be a program name with args.
18809 set dummy $ac_prog; ac_word=$2
18810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18811 $as_echo_n "checking for $ac_word... " >&6; }
18812 if ${ac_cv_path_XGETTEXT+:} false; then :
18813 $as_echo_n "(cached) " >&6
18814 else
18815 case $XGETTEXT in
18816 [\\/]* | ?:[\\/]*)
18817 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18818 ;;
18819 *)
18820 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18821 for as_dir in $PATH
18822 do
18823 IFS=$as_save_IFS
18824 test -z "$as_dir" && as_dir=.
18825 for ac_exec_ext in '' $ac_executable_extensions; do
18826 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18827 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18828 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18829 break 2
18830 fi
18831 done
18832 done
18833 IFS=$as_save_IFS
18834
18835 ;;
18836 esac
18837 fi
18838 XGETTEXT=$ac_cv_path_XGETTEXT
18839 if test -n "$XGETTEXT"; then
18840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18841 $as_echo "$XGETTEXT" >&6; }
18842 else
18843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18844 $as_echo "no" >&6; }
18845 fi
18846
18847
18848 test -n "$XGETTEXT" && break
18849 done
18850
18851 else
18852 # Report the value of XGETTEXT in configure's output in all cases.
18853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18854 $as_echo_n "checking for XGETTEXT... " >&6; }
18855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18856 $as_echo "$XGETTEXT" >&6; }
18857 fi
18858
18859
18860 fi
18861
18862 # Check for Tcl configuration script tclConfig.sh
18863 if test "$with_tcl" = yes; then
18864 if test -z "$TCLSH"; then
18865 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18866 do
18867 # Extract the first word of "$ac_prog", so it can be a program name with args.
18868 set dummy $ac_prog; ac_word=$2
18869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18870 $as_echo_n "checking for $ac_word... " >&6; }
18871 if ${ac_cv_path_TCLSH+:} false; then :
18872 $as_echo_n "(cached) " >&6
18873 else
18874 case $TCLSH in
18875 [\\/]* | ?:[\\/]*)
18876 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18877 ;;
18878 *)
18879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18880 for as_dir in $PATH
18881 do
18882 IFS=$as_save_IFS
18883 test -z "$as_dir" && as_dir=.
18884 for ac_exec_ext in '' $ac_executable_extensions; do
18885 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18886 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18887 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18888 break 2
18889 fi
18890 done
18891 done
18892 IFS=$as_save_IFS
18893
18894 ;;
18895 esac
18896 fi
18897 TCLSH=$ac_cv_path_TCLSH
18898 if test -n "$TCLSH"; then
18899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18900 $as_echo "$TCLSH" >&6; }
18901 else
18902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18903 $as_echo "no" >&6; }
18904 fi
18905
18906
18907 test -n "$TCLSH" && break
18908 done
18909
18910 else
18911 # Report the value of TCLSH in configure's output in all cases.
18912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18913 $as_echo_n "checking for TCLSH... " >&6; }
18914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18915 $as_echo "$TCLSH" >&6; }
18916 fi
18917
18918 if test x"$TCLSH" = x""; then
18919 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18920 fi
18921
18922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18923 $as_echo_n "checking for tclConfig.sh... " >&6; }
18924 # Let user override test
18925 if test -z "$TCL_CONFIG_SH"; then
18926 pgac_test_dirs="$with_tclconfig"
18927
18928 set X $pgac_test_dirs; shift
18929 if test $# -eq 0; then
18930 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18931 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18932 # On newer macOS, $auto_path frequently doesn't include the place
18933 # where tclConfig.sh actually lives. Append that to the end, so as not
18934 # to break cases where a non-default Tcl installation is being used.
18935 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18936 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18937 fi
18938 set X $pgac_test_dirs; shift
18939 fi
18940
18941 for pgac_dir do
18942 if test -r "$pgac_dir/tclConfig.sh"; then
18943 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18944 break
18945 fi
18946 done
18947 fi
18948
18949 if test -z "$TCL_CONFIG_SH"; then
18950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18951 $as_echo "no" >&6; }
18952 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18953 else
18954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18955 $as_echo "$TCL_CONFIG_SH" >&6; }
18956 fi
18957
18958
18959
18960 . "$TCL_CONFIG_SH"
18961 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18962 eval TCL_LIBS=\"$TCL_LIBS\"
18963 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18964 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18965
18966 if test "$TCL_SHARED_BUILD" != 1; then
18967 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18968 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18969 fi
18970 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18971 ac_save_CPPFLAGS=$CPPFLAGS
18972 CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC"
18973 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18974 if test "x$ac_cv_header_tcl_h" = xyes; then :
18975
18976 else
18977 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18978 fi
18979
18980
18981 CPPFLAGS=$ac_save_CPPFLAGS
18982 fi
18983
18984 # check for <perl.h>
18985 if test "$with_perl" = yes; then
18986 ac_save_CPPFLAGS=$CPPFLAGS
18987 CPPFLAGS="$CPPFLAGS $perl_includespec"
18988 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18989 "
18990 if test "x$ac_cv_header_perl_h" = xyes; then :
18991
18992 else
18993 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18994 fi
18995
18996
18997 # While we're at it, check that we can link to libperl.
18998 # On most platforms, if perl.h is there then libperl.so will be too, but at
18999 # this writing Debian packages them separately. There is no known reason to
19000 # waste cycles on separate probes for the Tcl or Python libraries, though.
19001 # On some Red Hat platforms, the link attempt can fail if we don't use
19002 # CFLAGS_SL while building the test program.
19003 ac_save_CFLAGS=$CFLAGS
19004 CFLAGS="$CFLAGS $CFLAGS_SL"
19005 pgac_save_LIBS=$LIBS
19006 LIBS="$perl_embed_ldflags"
19007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
19008 $as_echo_n "checking for libperl... " >&6; }
19009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19010 /* end confdefs.h. */
19011
19012 #include <EXTERN.h>
19013 #include <perl.h>
19014
19015 int
19016 main ()
19017 {
19018 perl_alloc();
19019 ;
19020 return 0;
19021 }
19022 _ACEOF
19023 if ac_fn_c_try_link "$LINENO"; then :
19024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19025 $as_echo "yes" >&6; }
19026 else
19027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19028 $as_echo "no" >&6; }
19029 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
19030 fi
19031 rm -f core conftest.err conftest.$ac_objext \
19032 conftest$ac_exeext conftest.$ac_ext
19033 LIBS=$pgac_save_LIBS
19034 CFLAGS=$ac_save_CFLAGS
19035 CPPFLAGS=$ac_save_CPPFLAGS
19036 fi
19037
19038 # check for <Python.h>
19039 if test "$with_python" = yes; then
19040 ac_save_CPPFLAGS=$CPPFLAGS
19041 CPPFLAGS="$CPPFLAGS $python_includespec"
19042 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
19043 if test "x$ac_cv_header_Python_h" = xyes; then :
19044
19045 else
19046 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
19047 fi
19048
19049
19050 CPPFLAGS=$ac_save_CPPFLAGS
19051 fi
19052
19053 #
19054 # Check for documentation-building tools
19055 #
19056 if test -z "$XMLLINT"; then
19057 for ac_prog in xmllint
19058 do
19059 # Extract the first word of "$ac_prog", so it can be a program name with args.
19060 set dummy $ac_prog; ac_word=$2
19061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19062 $as_echo_n "checking for $ac_word... " >&6; }
19063 if ${ac_cv_path_XMLLINT+:} false; then :
19064 $as_echo_n "(cached) " >&6
19065 else
19066 case $XMLLINT in
19067 [\\/]* | ?:[\\/]*)
19068 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
19069 ;;
19070 *)
19071 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19072 for as_dir in $PATH
19073 do
19074 IFS=$as_save_IFS
19075 test -z "$as_dir" && as_dir=.
19076 for ac_exec_ext in '' $ac_executable_extensions; do
19077 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19078 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
19079 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19080 break 2
19081 fi
19082 done
19083 done
19084 IFS=$as_save_IFS
19085
19086 ;;
19087 esac
19088 fi
19089 XMLLINT=$ac_cv_path_XMLLINT
19090 if test -n "$XMLLINT"; then
19091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
19092 $as_echo "$XMLLINT" >&6; }
19093 else
19094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19095 $as_echo "no" >&6; }
19096 fi
19097
19098
19099 test -n "$XMLLINT" && break
19100 done
19101
19102 else
19103 # Report the value of XMLLINT in configure's output in all cases.
19104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
19105 $as_echo_n "checking for XMLLINT... " >&6; }
19106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
19107 $as_echo "$XMLLINT" >&6; }
19108 fi
19109
19110 if test -z "$XSLTPROC"; then
19111 for ac_prog in xsltproc
19112 do
19113 # Extract the first word of "$ac_prog", so it can be a program name with args.
19114 set dummy $ac_prog; ac_word=$2
19115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19116 $as_echo_n "checking for $ac_word... " >&6; }
19117 if ${ac_cv_path_XSLTPROC+:} false; then :
19118 $as_echo_n "(cached) " >&6
19119 else
19120 case $XSLTPROC in
19121 [\\/]* | ?:[\\/]*)
19122 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19123 ;;
19124 *)
19125 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19126 for as_dir in $PATH
19127 do
19128 IFS=$as_save_IFS
19129 test -z "$as_dir" && as_dir=.
19130 for ac_exec_ext in '' $ac_executable_extensions; do
19131 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19132 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19134 break 2
19135 fi
19136 done
19137 done
19138 IFS=$as_save_IFS
19139
19140 ;;
19141 esac
19142 fi
19143 XSLTPROC=$ac_cv_path_XSLTPROC
19144 if test -n "$XSLTPROC"; then
19145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19146 $as_echo "$XSLTPROC" >&6; }
19147 else
19148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19149 $as_echo "no" >&6; }
19150 fi
19151
19152
19153 test -n "$XSLTPROC" && break
19154 done
19155
19156 else
19157 # Report the value of XSLTPROC in configure's output in all cases.
19158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
19159 $as_echo_n "checking for XSLTPROC... " >&6; }
19160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19161 $as_echo "$XSLTPROC" >&6; }
19162 fi
19163
19164 if test -z "$FOP"; then
19165 for ac_prog in fop
19166 do
19167 # Extract the first word of "$ac_prog", so it can be a program name with args.
19168 set dummy $ac_prog; ac_word=$2
19169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19170 $as_echo_n "checking for $ac_word... " >&6; }
19171 if ${ac_cv_path_FOP+:} false; then :
19172 $as_echo_n "(cached) " >&6
19173 else
19174 case $FOP in
19175 [\\/]* | ?:[\\/]*)
19176 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
19177 ;;
19178 *)
19179 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19180 for as_dir in $PATH
19181 do
19182 IFS=$as_save_IFS
19183 test -z "$as_dir" && as_dir=.
19184 for ac_exec_ext in '' $ac_executable_extensions; do
19185 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19186 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
19187 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19188 break 2
19189 fi
19190 done
19191 done
19192 IFS=$as_save_IFS
19193
19194 ;;
19195 esac
19196 fi
19197 FOP=$ac_cv_path_FOP
19198 if test -n "$FOP"; then
19199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19200 $as_echo "$FOP" >&6; }
19201 else
19202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19203 $as_echo "no" >&6; }
19204 fi
19205
19206
19207 test -n "$FOP" && break
19208 done
19209
19210 else
19211 # Report the value of FOP in configure's output in all cases.
19212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
19213 $as_echo_n "checking for FOP... " >&6; }
19214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19215 $as_echo "$FOP" >&6; }
19216 fi
19217
19218 if test -z "$DBTOEPUB"; then
19219 for ac_prog in dbtoepub
19220 do
19221 # Extract the first word of "$ac_prog", so it can be a program name with args.
19222 set dummy $ac_prog; ac_word=$2
19223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19224 $as_echo_n "checking for $ac_word... " >&6; }
19225 if ${ac_cv_path_DBTOEPUB+:} false; then :
19226 $as_echo_n "(cached) " >&6
19227 else
19228 case $DBTOEPUB in
19229 [\\/]* | ?:[\\/]*)
19230 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
19231 ;;
19232 *)
19233 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19234 for as_dir in $PATH
19235 do
19236 IFS=$as_save_IFS
19237 test -z "$as_dir" && as_dir=.
19238 for ac_exec_ext in '' $ac_executable_extensions; do
19239 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19240 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
19241 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19242 break 2
19243 fi
19244 done
19245 done
19246 IFS=$as_save_IFS
19247
19248 ;;
19249 esac
19250 fi
19251 DBTOEPUB=$ac_cv_path_DBTOEPUB
19252 if test -n "$DBTOEPUB"; then
19253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19254 $as_echo "$DBTOEPUB" >&6; }
19255 else
19256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19257 $as_echo "no" >&6; }
19258 fi
19259
19260
19261 test -n "$DBTOEPUB" && break
19262 done
19263
19264 else
19265 # Report the value of DBTOEPUB in configure's output in all cases.
19266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
19267 $as_echo_n "checking for DBTOEPUB... " >&6; }
19268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19269 $as_echo "$DBTOEPUB" >&6; }
19270 fi
19271
19272
19273 #
19274 # Check for test tools
19275 #
19276 if test "$enable_tap_tests" = yes; then
19277 # Make sure we know where prove is.
19278 if test -z "$PROVE"; then
19279 for ac_prog in prove
19280 do
19281 # Extract the first word of "$ac_prog", so it can be a program name with args.
19282 set dummy $ac_prog; ac_word=$2
19283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19284 $as_echo_n "checking for $ac_word... " >&6; }
19285 if ${ac_cv_path_PROVE+:} false; then :
19286 $as_echo_n "(cached) " >&6
19287 else
19288 case $PROVE in
19289 [\\/]* | ?:[\\/]*)
19290 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
19291 ;;
19292 *)
19293 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19294 for as_dir in $PATH
19295 do
19296 IFS=$as_save_IFS
19297 test -z "$as_dir" && as_dir=.
19298 for ac_exec_ext in '' $ac_executable_extensions; do
19299 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19300 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
19301 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19302 break 2
19303 fi
19304 done
19305 done
19306 IFS=$as_save_IFS
19307
19308 ;;
19309 esac
19310 fi
19311 PROVE=$ac_cv_path_PROVE
19312 if test -n "$PROVE"; then
19313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19314 $as_echo "$PROVE" >&6; }
19315 else
19316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19317 $as_echo "no" >&6; }
19318 fi
19319
19320
19321 test -n "$PROVE" && break
19322 done
19323
19324 else
19325 # Report the value of PROVE in configure's output in all cases.
19326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
19327 $as_echo_n "checking for PROVE... " >&6; }
19328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19329 $as_echo "$PROVE" >&6; }
19330 fi
19331
19332 if test -z "$PROVE"; then
19333 as_fn_error $? "prove not found" "$LINENO" 5
19334 fi
19335 # Check for necessary Perl modules. You might think we should use
19336 # AX_PROG_PERL_MODULES here, but prove might be part of a different Perl
19337 # installation than perl, eg on MSys, so we have to check using prove.
19338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl modules required for TAP tests" >&5
19339 $as_echo_n "checking for Perl modules required for TAP tests... " >&6; }
19340 __CONFIG_HOST_OS__=$host_os; export __CONFIG_HOST_OS__
19341 modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`
19342 if test $? -eq 0; then
19343 # log the module version details, but don't show them interactively
19344 echo "$modulestderr" >&5
19345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19346 $as_echo "yes" >&6; }
19347 else
19348 # on failure, though, show the results to the user
19349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $modulestderr" >&5
19350 $as_echo "$modulestderr" >&6; }
19351 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
19352 fi
19353 fi
19354
19355 # If compiler will take -Wl,--as-needed (or various platform-specific
19356 # spellings thereof) then add that to LDFLAGS. This is much easier than
19357 # trying to filter LIBS to the minimum for each executable.
19358 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
19359 # libreadline; therefore we postpone testing it until we know what library
19360 # dependencies readline has. The test code will try to link with $LIBS.
19361 if test "$with_readline" = yes; then
19362 link_test_func=readline
19363 else
19364 link_test_func=exit
19365 fi
19366
19367 if test "$PORTNAME" = "darwin"; then
19368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS" >&5
19369 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS... " >&6; }
19370 if ${pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs+:} false; then :
19371 $as_echo_n "(cached) " >&6
19372 else
19373 pgac_save_LDFLAGS=$LDFLAGS
19374 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19375 if test "$cross_compiling" = yes; then :
19376 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs="assuming no"
19377 else
19378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19379 /* end confdefs.h. */
19380 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19381 int
19382 main ()
19383 {
19384
19385 ;
19386 return 0;
19387 }
19388 _ACEOF
19389 if ac_fn_c_try_run "$LINENO"; then :
19390 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=yes
19391 else
19392 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=no
19393 fi
19394 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19395 conftest.$ac_objext conftest.beam conftest.$ac_ext
19396 fi
19397
19398 LDFLAGS="$pgac_save_LDFLAGS"
19399 fi
19400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&5
19401 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&6; }
19402 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" = x"yes"; then
19403 LDFLAGS="${LDFLAGS} -Wl,-dead_strip_dylibs"
19404 fi
19405
19406
19407 elif test "$PORTNAME" = "openbsd"; then
19408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS" >&5
19409 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS... " >&6; }
19410 if ${pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic+:} false; then :
19411 $as_echo_n "(cached) " >&6
19412 else
19413 pgac_save_LDFLAGS=$LDFLAGS
19414 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19415 if test "$cross_compiling" = yes; then :
19416 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic="assuming no"
19417 else
19418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19419 /* end confdefs.h. */
19420 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19421 int
19422 main ()
19423 {
19424
19425 ;
19426 return 0;
19427 }
19428 _ACEOF
19429 if ac_fn_c_try_run "$LINENO"; then :
19430 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=yes
19431 else
19432 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=no
19433 fi
19434 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19435 conftest.$ac_objext conftest.beam conftest.$ac_ext
19436 fi
19437
19438 LDFLAGS="$pgac_save_LDFLAGS"
19439 fi
19440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&5
19441 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&6; }
19442 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" = x"yes"; then
19443 LDFLAGS="${LDFLAGS} -Wl,-Bdynamic"
19444 fi
19445
19446
19447 else
19448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed, for LDFLAGS" >&5
19449 $as_echo_n "checking whether $CC supports -Wl,--as-needed, for LDFLAGS... " >&6; }
19450 if ${pgac_cv_prog_cc_LDFLAGS__Wl___as_needed+:} false; then :
19451 $as_echo_n "(cached) " >&6
19452 else
19453 pgac_save_LDFLAGS=$LDFLAGS
19454 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19455 if test "$cross_compiling" = yes; then :
19456 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed="assuming no"
19457 else
19458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19459 /* end confdefs.h. */
19460 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19461 int
19462 main ()
19463 {
19464
19465 ;
19466 return 0;
19467 }
19468 _ACEOF
19469 if ac_fn_c_try_run "$LINENO"; then :
19470 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=yes
19471 else
19472 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=no
19473 fi
19474 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19475 conftest.$ac_objext conftest.beam conftest.$ac_ext
19476 fi
19477
19478 LDFLAGS="$pgac_save_LDFLAGS"
19479 fi
19480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&5
19481 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&6; }
19482 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" = x"yes"; then
19483 LDFLAGS="${LDFLAGS} -Wl,--as-needed"
19484 fi
19485
19486
19487 fi
19488
19489 # For linkers that understand --export-dynamic, add that to the LDFLAGS_EX_BE
19490 # (backend specific ldflags). One some platforms this will always fail (e.g.,
19491 # windows), but on others it depends on the choice of linker (e.g., solaris).
19492 # macOS uses -export_dynamic instead. (On macOS, the option is only
19493 # needed when also using -flto, but we add it anyway since it's
19494 # harmless.)
19495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE" >&5
19496 $as_echo_n "checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE... " >&6; }
19497 if ${pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic+:} false; then :
19498 $as_echo_n "(cached) " >&6
19499 else
19500 pgac_save_LDFLAGS=$LDFLAGS
19501 LDFLAGS="$pgac_save_LDFLAGS -Wl,--export-dynamic"
19502 if test "$cross_compiling" = yes; then :
19503 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic="assuming no"
19504 else
19505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19506 /* end confdefs.h. */
19507 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19508 int
19509 main ()
19510 {
19511
19512 ;
19513 return 0;
19514 }
19515 _ACEOF
19516 if ac_fn_c_try_run "$LINENO"; then :
19517 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=yes
19518 else
19519 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=no
19520 fi
19521 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19522 conftest.$ac_objext conftest.beam conftest.$ac_ext
19523 fi
19524
19525 LDFLAGS="$pgac_save_LDFLAGS"
19526 fi
19527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&5
19528 $as_echo "$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&6; }
19529 if test x"$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" = x"yes"; then
19530 LDFLAGS_EX_BE="${LDFLAGS_EX_BE} -Wl,--export-dynamic"
19531 fi
19532
19533 if test x"$LDFLAGS_EX_BE" = x""; then
19534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-export_dynamic, for LDFLAGS_EX_BE" >&5
19535 $as_echo_n "checking whether $CC supports -Wl,-export_dynamic, for LDFLAGS_EX_BE... " >&6; }
19536 if ${pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic+:} false; then :
19537 $as_echo_n "(cached) " >&6
19538 else
19539 pgac_save_LDFLAGS=$LDFLAGS
19540 LDFLAGS="$pgac_save_LDFLAGS -Wl,-export_dynamic"
19541 if test "$cross_compiling" = yes; then :
19542 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic="assuming no"
19543 else
19544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19545 /* end confdefs.h. */
19546 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19547 int
19548 main ()
19549 {
19550
19551 ;
19552 return 0;
19553 }
19554 _ACEOF
19555 if ac_fn_c_try_run "$LINENO"; then :
19556 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic=yes
19557 else
19558 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic=no
19559 fi
19560 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19561 conftest.$ac_objext conftest.beam conftest.$ac_ext
19562 fi
19563
19564 LDFLAGS="$pgac_save_LDFLAGS"
19565 fi
19566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic" >&5
19567 $as_echo "$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic" >&6; }
19568 if test x"$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl__export_dynamic" = x"yes"; then
19569 LDFLAGS_EX_BE="${LDFLAGS_EX_BE} -Wl,-export_dynamic"
19570 fi
19571
19572 fi
19573
19574
19575 # Create compiler version string
19576 if test x"$GCC" = x"yes" ; then
19577 cc_string=`${CC} --version | sed q`
19578 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19579 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19580 cc_string=`${CC} -V 2>&1 | sed q`
19581 else
19582 cc_string=$CC
19583 fi
19584
19585
19586 cat >>confdefs.h <<_ACEOF
19587 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19588 _ACEOF
19589
19590
19591 # Supply a numeric version string for use by 3rd party add-ons
19592 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19593 PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
19594 $AWK '{printf "%d%04d", $1, $2}'`"
19595
19596 cat >>confdefs.h <<_ACEOF
19597 #define PG_VERSION_NUM $PG_VERSION_NUM
19598 _ACEOF
19599
19600
19601
19602 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19603 # literally, so that it's possible to override it at build time using
19604 # a command like "make ... PG_SYSROOT=path". This has to be done after
19605 # we've finished all configure checks that depend on CPPFLAGS.
19606 # The same for LDFLAGS, too.
19607 if test x"$PG_SYSROOT" != x; then
19608 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19609 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19610 fi
19611
19612
19613
19614 # Begin output steps
19615
19616 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19617 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19618 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19619 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19620 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19621 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19622 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19623 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19624 # Currently only used when LLVM is used
19625 if test "$with_llvm" = yes ; then
19626 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19627 $as_echo "$as_me: using CXX=$CXX" >&6;}
19628 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19629 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19630 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19631 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19632 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19633 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19634 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19635 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19636 fi
19637
19638 # prepare build tree if outside source tree
19639 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19640 # Note 2: /bin/pwd might be better than shell's built-in at getting
19641 # a symlink-free name.
19642 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19643 vpath_build=no
19644 else
19645 vpath_build=yes
19646 if test "$no_create" != yes; then
19647 $as_echo_n "preparing build tree... " >&6
19648 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19649 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19650 || as_fn_error $? "failed" "$LINENO" 5
19651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19652 $as_echo "done" >&6; }
19653 fi
19654 fi
19655
19656
19657
19658 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19659
19660
19661 ac_config_links="$ac_config_links src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION} src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION} src/include/pg_config_os.h:src/include/port/${template}.h src/Makefile.port:src/makefiles/Makefile.${template}"
19662
19663
19664 if test "$PORTNAME" = "win32"; then
19665 ac_config_commands="$ac_config_commands check_win32_symlinks"
19666
19667 fi
19668
19669 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19670
19671
19672 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19673
19674
19675 cat >confcache <<\_ACEOF
19676 # This file is a shell script that caches the results of configure
19677 # tests run on this system so they can be shared between configure
19678 # scripts and configure runs, see configure's option --config-cache.
19679 # It is not useful on other systems. If it contains results you don't
19680 # want to keep, you may remove or edit it.
19681 #
19682 # config.status only pays attention to the cache file if you give it
19683 # the --recheck option to rerun configure.
19684 #
19685 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19686 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19687 # following values.
19688
19689 _ACEOF
19690
19691 # The following way of writing the cache mishandles newlines in values,
19692 # but we know of no workaround that is simple, portable, and efficient.
19693 # So, we kill variables containing newlines.
19694 # Ultrix sh set writes to stderr and can't be redirected directly,
19695 # and sets the high bit in the cache file unless we assign to the vars.
19696 (
19697 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19698 eval ac_val=\$$ac_var
19699 case $ac_val in #(
19700 *${as_nl}*)
19701 case $ac_var in #(
19702 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19703 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19704 esac
19705 case $ac_var in #(
19706 _ | IFS | as_nl) ;; #(
19707 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19708 *) { eval $ac_var=; unset $ac_var;} ;;
19709 esac ;;
19710 esac
19711 done
19712
19713 (set) 2>&1 |
19714 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19715 *${as_nl}ac_space=\ *)
19716 # `set' does not quote correctly, so add quotes: double-quote
19717 # substitution turns \\\\ into \\, and sed turns \\ into \.
19718 sed -n \
19719 "s/'/'\\\\''/g;
19720 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19721 ;; #(
19722 *)
19723 # `set' quotes correctly as required by POSIX, so do not add quotes.
19724 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19725 ;;
19726 esac |
19727 sort
19728 ) |
19729 sed '
19730 /^ac_cv_env_/b end
19731 t clear
19732 :clear
19733 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19734 t end
19735 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19736 :end' >>confcache
19737 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19738 if test -w "$cache_file"; then
19739 if test "x$cache_file" != "x/dev/null"; then
19740 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19741 $as_echo "$as_me: updating cache $cache_file" >&6;}
19742 if test ! -f "$cache_file" || test -h "$cache_file"; then
19743 cat confcache >"$cache_file"
19744 else
19745 case $cache_file in #(
19746 */* | ?:*)
19747 mv -f confcache "$cache_file"$$ &&
19748 mv -f "$cache_file"$$ "$cache_file" ;; #(
19749 *)
19750 mv -f confcache "$cache_file" ;;
19751 esac
19752 fi
19753 fi
19754 else
19755 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19756 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19757 fi
19758 fi
19759 rm -f confcache
19760
19761 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19762 # Let make expand exec_prefix.
19763 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19764
19765 DEFS=-DHAVE_CONFIG_H
19766
19767 ac_libobjs=
19768 ac_ltlibobjs=
19769 U=
19770 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19771 # 1. Remove the extension, and $U if already installed.
19772 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19773 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19774 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19775 # will be set to the directory where LIBOBJS objects are built.
19776 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19777 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19778 done
19779 LIBOBJS=$ac_libobjs
19780
19781 LTLIBOBJS=$ac_ltlibobjs
19782
19783
19784
19785
19786 : "${CONFIG_STATUS=./config.status}"
19787 ac_write_fail=0
19788 ac_clean_files_save=$ac_clean_files
19789 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19790 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19791 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19792 as_write_fail=0
19793 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19794 #! $SHELL
19795 # Generated by $as_me.
19796 # Run this file to recreate the current configuration.
19797 # Compiler output produced by configure, useful for debugging
19798 # configure, is in config.log if it exists.
19799
19800 debug=false
19801 ac_cs_recheck=false
19802 ac_cs_silent=false
19803
19804 SHELL=\${CONFIG_SHELL-$SHELL}
19805 export SHELL
19806 _ASEOF
19807 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19808 ## -------------------- ##
19809 ## M4sh Initialization. ##
19810 ## -------------------- ##
19811
19812 # Be more Bourne compatible
19813 DUALCASE=1; export DUALCASE # for MKS sh
19814 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19815 emulate sh
19816 NULLCMD=:
19817 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19818 # is contrary to our usage. Disable this feature.
19819 alias -g '${1+"$@"}'='"$@"'
19820 setopt NO_GLOB_SUBST
19821 else
19822 case `(set -o) 2>/dev/null` in #(
19823 *posix*) :
19824 set -o posix ;; #(
19825 *) :
19826 ;;
19827 esac
19828 fi
19829
19830
19831 as_nl='
19832 '
19833 export as_nl
19834 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19835 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19836 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19837 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19838 # Prefer a ksh shell builtin over an external printf program on Solaris,
19839 # but without wasting forks for bash or zsh.
19840 if test -z "$BASH_VERSION$ZSH_VERSION" \
19841 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19842 as_echo='print -r --'
19843 as_echo_n='print -rn --'
19844 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19845 as_echo='printf %s\n'
19846 as_echo_n='printf %s'
19847 else
19848 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19849 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19850 as_echo_n='/usr/ucb/echo -n'
19851 else
19852 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19853 as_echo_n_body='eval
19854 arg=$1;
19855 case $arg in #(
19856 *"$as_nl"*)
19857 expr "X$arg" : "X\\(.*\\)$as_nl";
19858 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19859 esac;
19860 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19861 '
19862 export as_echo_n_body
19863 as_echo_n='sh -c $as_echo_n_body as_echo'
19864 fi
19865 export as_echo_body
19866 as_echo='sh -c $as_echo_body as_echo'
19867 fi
19868
19869 # The user is always right.
19870 if test "${PATH_SEPARATOR+set}" != set; then
19871 PATH_SEPARATOR=:
19872 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19873 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19874 PATH_SEPARATOR=';'
19875 }
19876 fi
19877
19878
19879 # IFS
19880 # We need space, tab and new line, in precisely that order. Quoting is
19881 # there to prevent editors from complaining about space-tab.
19882 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19883 # splitting by setting IFS to empty value.)
19884 IFS=" "" $as_nl"
19885
19886 # Find who we are. Look in the path if we contain no directory separator.
19887 as_myself=
19888 case $0 in #((
19889 *[\\/]* ) as_myself=$0 ;;
19890 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19891 for as_dir in $PATH
19892 do
19893 IFS=$as_save_IFS
19894 test -z "$as_dir" && as_dir=.
19895 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19896 done
19897 IFS=$as_save_IFS
19898
19899 ;;
19900 esac
19901 # We did not find ourselves, most probably we were run as `sh COMMAND'
19902 # in which case we are not to be found in the path.
19903 if test "x$as_myself" = x; then
19904 as_myself=$0
19905 fi
19906 if test ! -f "$as_myself"; then
19907 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19908 exit 1
19909 fi
19910
19911 # Unset variables that we do not need and which cause bugs (e.g. in
19912 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19913 # suppresses any "Segmentation fault" message there. '((' could
19914 # trigger a bug in pdksh 5.2.14.
19915 for as_var in BASH_ENV ENV MAIL MAILPATH
19916 do eval test x\${$as_var+set} = xset \
19917 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19918 done
19919 PS1='$ '
19920 PS2='> '
19921 PS4='+ '
19922
19923 # NLS nuisances.
19924 LC_ALL=C
19925 export LC_ALL
19926 LANGUAGE=C
19927 export LANGUAGE
19928
19929 # CDPATH.
19930 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19931
19932
19933 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19934 # ----------------------------------------
19935 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19936 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19937 # script with STATUS, using 1 if that was 0.
19938 as_fn_error ()
19939 {
19940 as_status=$1; test $as_status -eq 0 && as_status=1
19941 if test "$4"; then
19942 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19943 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19944 fi
19945 $as_echo "$as_me: error: $2" >&2
19946 as_fn_exit $as_status
19947 } # as_fn_error
19948
19949
19950 # as_fn_set_status STATUS
19951 # -----------------------
19952 # Set $? to STATUS, without forking.
19953 as_fn_set_status ()
19954 {
19955 return $1
19956 } # as_fn_set_status
19957
19958 # as_fn_exit STATUS
19959 # -----------------
19960 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19961 as_fn_exit ()
19962 {
19963 set +e
19964 as_fn_set_status $1
19965 exit $1
19966 } # as_fn_exit
19967
19968 # as_fn_unset VAR
19969 # ---------------
19970 # Portably unset VAR.
19971 as_fn_unset ()
19972 {
19973 { eval $1=; unset $1;}
19974 }
19975 as_unset=as_fn_unset
19976 # as_fn_append VAR VALUE
19977 # ----------------------
19978 # Append the text in VALUE to the end of the definition contained in VAR. Take
19979 # advantage of any shell optimizations that allow amortized linear growth over
19980 # repeated appends, instead of the typical quadratic growth present in naive
19981 # implementations.
19982 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19983 eval 'as_fn_append ()
19984 {
19985 eval $1+=\$2
19986 }'
19987 else
19988 as_fn_append ()
19989 {
19990 eval $1=\$$1\$2
19991 }
19992 fi # as_fn_append
19993
19994 # as_fn_arith ARG...
19995 # ------------------
19996 # Perform arithmetic evaluation on the ARGs, and store the result in the
19997 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19998 # must be portable across $(()) and expr.
19999 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
20000 eval 'as_fn_arith ()
20001 {
20002 as_val=$(( $* ))
20003 }'
20004 else
20005 as_fn_arith ()
20006 {
20007 as_val=`expr "$@" || test $? -eq 1`
20008 }
20009 fi # as_fn_arith
20010
20011
20012 if expr a : '\(a\)' >/dev/null 2>&1 &&
20013 test "X`expr 00001 : '.*\(...\)'`" = X001; then
20014 as_expr=expr
20015 else
20016 as_expr=false
20017 fi
20018
20019 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20020 as_basename=basename
20021 else
20022 as_basename=false
20023 fi
20024
20025 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20026 as_dirname=dirname
20027 else
20028 as_dirname=false
20029 fi
20030
20031 as_me=`$as_basename -- "$0" ||
20032 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20033 X"$0" : 'X\(//\)$' \| \
20034 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20035 $as_echo X/"$0" |
20036 sed '/^.*\/\([^/][^/]*\)\/*$/{
20037 s//\1/
20038 q
20039 }
20040 /^X\/\(\/\/\)$/{
20041 s//\1/
20042 q
20043 }
20044 /^X\/\(\/\).*/{
20045 s//\1/
20046 q
20047 }
20048 s/.*/./; q'`
20049
20050 # Avoid depending upon Character Ranges.
20051 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20052 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20053 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20054 as_cr_digits='0123456789'
20055 as_cr_alnum=$as_cr_Letters$as_cr_digits
20056
20057 ECHO_C= ECHO_N= ECHO_T=
20058 case `echo -n x` in #(((((
20059 -n*)
20060 case `echo 'xy\c'` in
20061 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
20062 xy) ECHO_C='\c';;
20063 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
20064 ECHO_T=' ';;
20065 esac;;
20066 *)
20067 ECHO_N='-n';;
20068 esac
20069
20070 rm -f conf$$ conf$$.exe conf$$.file
20071 if test -d conf$$.dir; then
20072 rm -f conf$$.dir/conf$$.file
20073 else
20074 rm -f conf$$.dir
20075 mkdir conf$$.dir 2>/dev/null
20076 fi
20077 if (echo >conf$$.file) 2>/dev/null; then
20078 if ln -s conf$$.file conf$$ 2>/dev/null; then
20079 as_ln_s='ln -s'
20080 # ... but there are two gotchas:
20081 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20082 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20083 # In both cases, we have to default to `cp -pR'.
20084 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20085 as_ln_s='cp -pR'
20086 elif ln conf$$.file conf$$ 2>/dev/null; then
20087 as_ln_s=ln
20088 else
20089 as_ln_s='cp -pR'
20090 fi
20091 else
20092 as_ln_s='cp -pR'
20093 fi
20094 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20095 rmdir conf$$.dir 2>/dev/null
20096
20097
20098 # as_fn_mkdir_p
20099 # -------------
20100 # Create "$as_dir" as a directory, including parents if necessary.
20101 as_fn_mkdir_p ()
20102 {
20103
20104 case $as_dir in #(
20105 -*) as_dir=./$as_dir;;
20106 esac
20107 test -d "$as_dir" || eval $as_mkdir_p || {
20108 as_dirs=
20109 while :; do
20110 case $as_dir in #(
20111 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20112 *) as_qdir=$as_dir;;
20113 esac
20114 as_dirs="'$as_qdir' $as_dirs"
20115 as_dir=`$as_dirname -- "$as_dir" ||
20116 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20117 X"$as_dir" : 'X\(//\)[^/]' \| \
20118 X"$as_dir" : 'X\(//\)$' \| \
20119 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20120 $as_echo X"$as_dir" |
20121 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20122 s//\1/
20123 q
20124 }
20125 /^X\(\/\/\)[^/].*/{
20126 s//\1/
20127 q
20128 }
20129 /^X\(\/\/\)$/{
20130 s//\1/
20131 q
20132 }
20133 /^X\(\/\).*/{
20134 s//\1/
20135 q
20136 }
20137 s/.*/./; q'`
20138 test -d "$as_dir" && break
20139 done
20140 test -z "$as_dirs" || eval "mkdir $as_dirs"
20141 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
20142
20143
20144 } # as_fn_mkdir_p
20145 if mkdir -p . 2>/dev/null; then
20146 as_mkdir_p='mkdir -p "$as_dir"'
20147 else
20148 test -d ./-p && rmdir ./-p
20149 as_mkdir_p=false
20150 fi
20151
20152
20153 # as_fn_executable_p FILE
20154 # -----------------------
20155 # Test if FILE is an executable regular file.
20156 as_fn_executable_p ()
20157 {
20158 test -f "$1" && test -x "$1"
20159 } # as_fn_executable_p
20160 as_test_x='test -x'
20161 as_executable_p=as_fn_executable_p
20162
20163 # Sed expression to map a string onto a valid CPP name.
20164 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20165
20166 # Sed expression to map a string onto a valid variable name.
20167 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20168
20169
20170 exec 6>&1
20171 ## ----------------------------------- ##
20172 ## Main body of $CONFIG_STATUS script. ##
20173 ## ----------------------------------- ##
20174 _ASEOF
20175 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20176
20177 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20178 # Save the log message, to keep $0 and so on meaningful, and to
20179 # report actual input values of CONFIG_FILES etc. instead of their
20180 # values after options handling.
20181 ac_log="
20182 This file was extended by PostgreSQL $as_me 18.6, which was
20183 generated by GNU Autoconf 2.69. Invocation command line was
20184
20185 CONFIG_FILES = $CONFIG_FILES
20186 CONFIG_HEADERS = $CONFIG_HEADERS
20187 CONFIG_LINKS = $CONFIG_LINKS
20188 CONFIG_COMMANDS = $CONFIG_COMMANDS
20189 $ $0 $@
20190
20191 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20192 "
20193
20194 _ACEOF
20195
20196 case $ac_config_files in *"
20197 "*) set x $ac_config_files; shift; ac_config_files=$*;;
20198 esac
20199
20200 case $ac_config_headers in *"
20201 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20202 esac
20203
20204
20205 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20206 # Files that config.status was made for.
20207 config_files="$ac_config_files"
20208 config_headers="$ac_config_headers"
20209 config_links="$ac_config_links"
20210 config_commands="$ac_config_commands"
20211
20212 _ACEOF
20213
20214 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20215 ac_cs_usage="\
20216 \`$as_me' instantiates files and other configuration actions
20217 from templates according to the current configuration. Unless the files
20218 and actions are specified as TAGs, all are instantiated by default.
20219
20220 Usage: $0 [OPTION]... [TAG]...
20221
20222 -h, --help print this help, then exit
20223 -V, --version print version number and configuration settings, then exit
20224 --config print configuration, then exit
20225 -q, --quiet, --silent
20226 do not print progress messages
20227 -d, --debug don't remove temporary files
20228 --recheck update $as_me by reconfiguring in the same conditions
20229 --file=FILE[:TEMPLATE]
20230 instantiate the configuration file FILE
20231 --header=FILE[:TEMPLATE]
20232 instantiate the configuration header FILE
20233
20234 Configuration files:
20235 $config_files
20236
20237 Configuration headers:
20238 $config_headers
20239
20240 Configuration links:
20241 $config_links
20242
20243 Configuration commands:
20244 $config_commands
20245
20246 Report bugs to <[email protected]>.
20247 PostgreSQL home page: <https://www.postgresql.org/>."
20248
20249 _ACEOF
20250 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20251 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20252 ac_cs_version="\\
20253 PostgreSQL config.status 18.6
20254 configured by $0, generated by GNU Autoconf 2.69,
20255 with options \\"\$ac_cs_config\\"
20256
20257 Copyright (C) 2012 Free Software Foundation, Inc.
20258 This config.status script is free software; the Free Software Foundation
20259 gives unlimited permission to copy, distribute and modify it."
20260
20261 ac_pwd='$ac_pwd'
20262 srcdir='$srcdir'
20263 INSTALL='$INSTALL'
20264 MKDIR_P='$MKDIR_P'
20265 AWK='$AWK'
20266 test -n "\$AWK" || AWK=awk
20267 _ACEOF
20268
20269 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20270 # The default lists apply if the user does not specify any file.
20271 ac_need_defaults=:
20272 while test $# != 0
20273 do
20274 case $1 in
20275 --*=?*)
20276 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20277 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20278 ac_shift=:
20279 ;;
20280 --*=)
20281 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20282 ac_optarg=
20283 ac_shift=:
20284 ;;
20285 *)
20286 ac_option=$1
20287 ac_optarg=$2
20288 ac_shift=shift
20289 ;;
20290 esac
20291
20292 case $ac_option in
20293 # Handling of the options.
20294 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20295 ac_cs_recheck=: ;;
20296 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20297 $as_echo "$ac_cs_version"; exit ;;
20298 --config | --confi | --conf | --con | --co | --c )
20299 $as_echo "$ac_cs_config"; exit ;;
20300 --debug | --debu | --deb | --de | --d | -d )
20301 debug=: ;;
20302 --file | --fil | --fi | --f )
20303 $ac_shift
20304 case $ac_optarg in
20305 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20306 '') as_fn_error $? "missing file argument" ;;
20307 esac
20308 as_fn_append CONFIG_FILES " '$ac_optarg'"
20309 ac_need_defaults=false;;
20310 --header | --heade | --head | --hea )
20311 $ac_shift
20312 case $ac_optarg in
20313 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20314 esac
20315 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20316 ac_need_defaults=false;;
20317 --he | --h)
20318 # Conflict between --help and --header
20319 as_fn_error $? "ambiguous option: \`$1'
20320 Try \`$0 --help' for more information.";;
20321 --help | --hel | -h )
20322 $as_echo "$ac_cs_usage"; exit ;;
20323 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20324 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20325 ac_cs_silent=: ;;
20326
20327 # This is an error.
20328 -*) as_fn_error $? "unrecognized option: \`$1'
20329 Try \`$0 --help' for more information." ;;
20330
20331 *) as_fn_append ac_config_targets " $1"
20332 ac_need_defaults=false ;;
20333
20334 esac
20335 shift
20336 done
20337
20338 ac_configure_extra_args=
20339
20340 if $ac_cs_silent; then
20341 exec 6>/dev/null
20342 ac_configure_extra_args="$ac_configure_extra_args --silent"
20343 fi
20344
20345 _ACEOF
20346 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20347 if \$ac_cs_recheck; then
20348 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20349 shift
20350 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20351 CONFIG_SHELL='$SHELL'
20352 export CONFIG_SHELL
20353 exec "\$@"
20354 fi
20355
20356 _ACEOF
20357 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20358 exec 5>>config.log
20359 {
20360 echo
20361 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20362 ## Running $as_me. ##
20363 _ASBOX
20364 $as_echo "$ac_log"
20365 } >&5
20366
20367 _ACEOF
20368 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20369 _ACEOF
20370
20371 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20372
20373 # Handling of arguments.
20374 for ac_config_target in $ac_config_targets
20375 do
20376 case $ac_config_target in
20377 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
20378 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
20379 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
20380 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
20381 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
20382 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
20383 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
20384 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
20385 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
20386 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
20387
20388 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20389 esac
20390 done
20391
20392
20393 # If the user did not use the arguments to specify the items to instantiate,
20394 # then the envvar interface is used. Set only those that are not.
20395 # We use the long form for the default assignment because of an extremely
20396 # bizarre bug on SunOS 4.1.3.
20397 if $ac_need_defaults; then
20398 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20399 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20400 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20401 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20402 fi
20403
20404 # Have a temporary directory for convenience. Make it in the build tree
20405 # simply because there is no reason against having it here, and in addition,
20406 # creating and moving files from /tmp can sometimes cause problems.
20407 # Hook for its removal unless debugging.
20408 # Note that there is a small window in which the directory will not be cleaned:
20409 # after its creation but before its name has been assigned to `$tmp'.
20410 $debug ||
20411 {
20412 tmp= ac_tmp=
20413 trap 'exit_status=$?
20414 : "${ac_tmp:=$tmp}"
20415 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20416 ' 0
20417 trap 'as_fn_exit 1' 1 2 13 15
20418 }
20419 # Create a (secure) tmp directory for tmp files.
20420
20421 {
20422 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20423 test -d "$tmp"
20424 } ||
20425 {
20426 tmp=./conf$$-$RANDOM
20427 (umask 077 && mkdir "$tmp")
20428 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20429 ac_tmp=$tmp
20430
20431 # Set up the scripts for CONFIG_FILES section.
20432 # No need to generate them if there are no CONFIG_FILES.
20433 # This happens for instance with `./config.status config.h'.
20434 if test -n "$CONFIG_FILES"; then
20435
20436
20437 ac_cr=`echo X | tr X '\015'`
20438 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20439 # But we know of no other shell where ac_cr would be empty at this
20440 # point, so we can use a bashism as a fallback.
20441 if test "x$ac_cr" = x; then
20442 eval ac_cr=\$\'\\r\'
20443 fi
20444 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20445 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20446 ac_cs_awk_cr='\\r'
20447 else
20448 ac_cs_awk_cr=$ac_cr
20449 fi
20450
20451 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20452 _ACEOF
20453
20454
20455 {
20456 echo "cat >conf$$subs.awk <<_ACEOF" &&
20457 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20458 echo "_ACEOF"
20459 } >conf$$subs.sh ||
20460 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20461 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20462 ac_delim='%!_!# '
20463 for ac_last_try in false false false false false :; do
20464 . ./conf$$subs.sh ||
20465 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20466
20467 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20468 if test $ac_delim_n = $ac_delim_num; then
20469 break
20470 elif $ac_last_try; then
20471 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20472 else
20473 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20474 fi
20475 done
20476 rm -f conf$$subs.sh
20477
20478 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20479 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20480 _ACEOF
20481 sed -n '
20482 h
20483 s/^/S["/; s/!.*/"]=/
20484 p
20485 g
20486 s/^[^!]*!//
20487 :repl
20488 t repl
20489 s/'"$ac_delim"'$//
20490 t delim
20491 :nl
20492 h
20493 s/\(.\{148\}\)..*/\1/
20494 t more1
20495 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20496 p
20497 n
20498 b repl
20499 :more1
20500 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20501 p
20502 g
20503 s/.\{148\}//
20504 t nl
20505 :delim
20506 h
20507 s/\(.\{148\}\)..*/\1/
20508 t more2
20509 s/["\\]/\\&/g; s/^/"/; s/$/"/
20510 p
20511 b
20512 :more2
20513 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20514 p
20515 g
20516 s/.\{148\}//
20517 t delim
20518 ' <conf$$subs.awk | sed '
20519 /^[^""]/{
20520 N
20521 s/\n//
20522 }
20523 ' >>$CONFIG_STATUS || ac_write_fail=1
20524 rm -f conf$$subs.awk
20525 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20526 _ACAWK
20527 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20528 for (key in S) S_is_set[key] = 1
20529 FS = ""
20530
20531 }
20532 {
20533 line = $ 0
20534 nfields = split(line, field, "@")
20535 substed = 0
20536 len = length(field[1])
20537 for (i = 2; i < nfields; i++) {
20538 key = field[i]
20539 keylen = length(key)
20540 if (S_is_set[key]) {
20541 value = S[key]
20542 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20543 len += length(value) + length(field[++i])
20544 substed = 1
20545 } else
20546 len += 1 + keylen
20547 }
20548
20549 print line
20550 }
20551
20552 _ACAWK
20553 _ACEOF
20554 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20555 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20556 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20557 else
20558 cat
20559 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20560 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20561 _ACEOF
20562
20563 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20564 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20565 # trailing colons and then remove the whole line if VPATH becomes empty
20566 # (actually we leave an empty line to preserve line numbers).
20567 if test "x$srcdir" = x.; then
20568 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20569 h
20570 s///
20571 s/^/:/
20572 s/[ ]*$/:/
20573 s/:\$(srcdir):/:/g
20574 s/:\${srcdir}:/:/g
20575 s/:@srcdir@:/:/g
20576 s/^:*//
20577 s/:*$//
20578 x
20579 s/\(=[ ]*\).*/\1/
20580 G
20581 s/\n//
20582 s/^[^=]*=[ ]*$//
20583 }'
20584 fi
20585
20586 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20587 fi # test -n "$CONFIG_FILES"
20588
20589 # Set up the scripts for CONFIG_HEADERS section.
20590 # No need to generate them if there are no CONFIG_HEADERS.
20591 # This happens for instance with `./config.status Makefile'.
20592 if test -n "$CONFIG_HEADERS"; then
20593 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20594 BEGIN {
20595 _ACEOF
20596
20597 # Transform confdefs.h into an awk script `defines.awk', embedded as
20598 # here-document in config.status, that substitutes the proper values into
20599 # config.h.in to produce config.h.
20600
20601 # Create a delimiter string that does not exist in confdefs.h, to ease
20602 # handling of long lines.
20603 ac_delim='%!_!# '
20604 for ac_last_try in false false :; do
20605 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20606 if test -z "$ac_tt"; then
20607 break
20608 elif $ac_last_try; then
20609 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20610 else
20611 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20612 fi
20613 done
20614
20615 # For the awk script, D is an array of macro values keyed by name,
20616 # likewise P contains macro parameters if any. Preserve backslash
20617 # newline sequences.
20618
20619 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20620 sed -n '
20621 s/.\{148\}/&'"$ac_delim"'/g
20622 t rset
20623 :rset
20624 s/^[ ]*#[ ]*define[ ][ ]*/ /
20625 t def
20626 d
20627 :def
20628 s/\\$//
20629 t bsnl
20630 s/["\\]/\\&/g
20631 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20632 D["\1"]=" \3"/p
20633 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20634 d
20635 :bsnl
20636 s/["\\]/\\&/g
20637 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20638 D["\1"]=" \3\\\\\\n"\\/p
20639 t cont
20640 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20641 t cont
20642 d
20643 :cont
20644 n
20645 s/.\{148\}/&'"$ac_delim"'/g
20646 t clear
20647 :clear
20648 s/\\$//
20649 t bsnlc
20650 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20651 d
20652 :bsnlc
20653 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20654 b cont
20655 ' <confdefs.h | sed '
20656 s/'"$ac_delim"'/"\\\
20657 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20658
20659 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20660 for (key in D) D_is_set[key] = 1
20661 FS = ""
20662 }
20663 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20664 line = \$ 0
20665 split(line, arg, " ")
20666 if (arg[1] == "#") {
20667 defundef = arg[2]
20668 mac1 = arg[3]
20669 } else {
20670 defundef = substr(arg[1], 2)
20671 mac1 = arg[2]
20672 }
20673 split(mac1, mac2, "(") #)
20674 macro = mac2[1]
20675 prefix = substr(line, 1, index(line, defundef) - 1)
20676 if (D_is_set[macro]) {
20677 # Preserve the white space surrounding the "#".
20678 print prefix "define", macro P[macro] D[macro]
20679 next
20680 } else {
20681 # Replace #undef with comments. This is necessary, for example,
20682 # in the case of _POSIX_SOURCE, which is predefined and required
20683 # on some systems where configure will not decide to define it.
20684 if (defundef == "undef") {
20685 print "/*", prefix defundef, macro, "*/"
20686 next
20687 }
20688 }
20689 }
20690 { print }
20691 _ACAWK
20692 _ACEOF
20693 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20694 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20695 fi # test -n "$CONFIG_HEADERS"
20696
20697
20698 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20699 shift
20700 for ac_tag
20701 do
20702 case $ac_tag in
20703 :[FHLC]) ac_mode=$ac_tag; continue;;
20704 esac
20705 case $ac_mode$ac_tag in
20706 :[FHL]*:*);;
20707 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20708 :[FH]-) ac_tag=-:-;;
20709 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20710 esac
20711 ac_save_IFS=$IFS
20712 IFS=:
20713 set x $ac_tag
20714 IFS=$ac_save_IFS
20715 shift
20716 ac_file=$1
20717 shift
20718
20719 case $ac_mode in
20720 :L) ac_source=$1;;
20721 :[FH])
20722 ac_file_inputs=
20723 for ac_f
20724 do
20725 case $ac_f in
20726 -) ac_f="$ac_tmp/stdin";;
20727 *) # Look for the file first in the build tree, then in the source tree
20728 # (if the path is not absolute). The absolute path cannot be DOS-style,
20729 # because $ac_f cannot contain `:'.
20730 test -f "$ac_f" ||
20731 case $ac_f in
20732 [\\/$]*) false;;
20733 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20734 esac ||
20735 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20736 esac
20737 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20738 as_fn_append ac_file_inputs " '$ac_f'"
20739 done
20740
20741 # Let's still pretend it is `configure' which instantiates (i.e., don't
20742 # use $as_me), people would be surprised to read:
20743 # /* config.h. Generated by config.status. */
20744 configure_input='Generated from '`
20745 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20746 `' by configure.'
20747 if test x"$ac_file" != x-; then
20748 configure_input="$ac_file. $configure_input"
20749 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20750 $as_echo "$as_me: creating $ac_file" >&6;}
20751 fi
20752 # Neutralize special characters interpreted by sed in replacement strings.
20753 case $configure_input in #(
20754 *\&* | *\|* | *\\* )
20755 ac_sed_conf_input=`$as_echo "$configure_input" |
20756 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20757 *) ac_sed_conf_input=$configure_input;;
20758 esac
20759
20760 case $ac_tag in
20761 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20762 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20763 esac
20764 ;;
20765 esac
20766
20767 ac_dir=`$as_dirname -- "$ac_file" ||
20768 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20769 X"$ac_file" : 'X\(//\)[^/]' \| \
20770 X"$ac_file" : 'X\(//\)$' \| \
20771 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20772 $as_echo X"$ac_file" |
20773 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20774 s//\1/
20775 q
20776 }
20777 /^X\(\/\/\)[^/].*/{
20778 s//\1/
20779 q
20780 }
20781 /^X\(\/\/\)$/{
20782 s//\1/
20783 q
20784 }
20785 /^X\(\/\).*/{
20786 s//\1/
20787 q
20788 }
20789 s/.*/./; q'`
20790 as_dir="$ac_dir"; as_fn_mkdir_p
20791 ac_builddir=.
20792
20793 case "$ac_dir" in
20794 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20795 *)
20796 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20797 # A ".." for each directory in $ac_dir_suffix.
20798 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20799 case $ac_top_builddir_sub in
20800 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20801 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20802 esac ;;
20803 esac
20804 ac_abs_top_builddir=$ac_pwd
20805 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20806 # for backward compatibility:
20807 ac_top_builddir=$ac_top_build_prefix
20808
20809 case $srcdir in
20810 .) # We are building in place.
20811 ac_srcdir=.
20812 ac_top_srcdir=$ac_top_builddir_sub
20813 ac_abs_top_srcdir=$ac_pwd ;;
20814 [\\/]* | ?:[\\/]* ) # Absolute name.
20815 ac_srcdir=$srcdir$ac_dir_suffix;
20816 ac_top_srcdir=$srcdir
20817 ac_abs_top_srcdir=$srcdir ;;
20818 *) # Relative name.
20819 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20820 ac_top_srcdir=$ac_top_build_prefix$srcdir
20821 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20822 esac
20823 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20824
20825
20826 case $ac_mode in
20827 :F)
20828 #
20829 # CONFIG_FILE
20830 #
20831
20832 case $INSTALL in
20833 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20834 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20835 esac
20836 ac_MKDIR_P=$MKDIR_P
20837 case $MKDIR_P in
20838 [\\/$]* | ?:[\\/]* ) ;;
20839 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20840 esac
20841 _ACEOF
20842
20843 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20844 # If the template does not know about datarootdir, expand it.
20845 # FIXME: This hack should be removed a few years after 2.60.
20846 ac_datarootdir_hack=; ac_datarootdir_seen=
20847 ac_sed_dataroot='
20848 /datarootdir/ {
20849 p
20850 q
20851 }
20852 /@datadir@/p
20853 /@docdir@/p
20854 /@infodir@/p
20855 /@localedir@/p
20856 /@mandir@/p'
20857 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20858 *datarootdir*) ac_datarootdir_seen=yes;;
20859 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20860 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20861 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20862 _ACEOF
20863 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20864 ac_datarootdir_hack='
20865 s&@datadir@&$datadir&g
20866 s&@docdir@&$docdir&g
20867 s&@infodir@&$infodir&g
20868 s&@localedir@&$localedir&g
20869 s&@mandir@&$mandir&g
20870 s&\\\${datarootdir}&$datarootdir&g' ;;
20871 esac
20872 _ACEOF
20873
20874 # Neutralize VPATH when `$srcdir' = `.'.
20875 # Shell code in configure.ac might set extrasub.
20876 # FIXME: do we really want to maintain this feature?
20877 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20878 ac_sed_extra="$ac_vpsub
20879 $extrasub
20880 _ACEOF
20881 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20882 :t
20883 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20884 s|@configure_input@|$ac_sed_conf_input|;t t
20885 s&@top_builddir@&$ac_top_builddir_sub&;t t
20886 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20887 s&@srcdir@&$ac_srcdir&;t t
20888 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20889 s&@top_srcdir@&$ac_top_srcdir&;t t
20890 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20891 s&@builddir@&$ac_builddir&;t t
20892 s&@abs_builddir@&$ac_abs_builddir&;t t
20893 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20894 s&@INSTALL@&$ac_INSTALL&;t t
20895 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20896 $ac_datarootdir_hack
20897 "
20898 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20899 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20900
20901 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20902 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20903 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20904 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20905 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20906 which seems to be undefined. Please make sure it is defined" >&5
20907 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20908 which seems to be undefined. Please make sure it is defined" >&2;}
20909
20910 rm -f "$ac_tmp/stdin"
20911 case $ac_file in
20912 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20913 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20914 esac \
20915 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20916 ;;
20917 :H)
20918 #
20919 # CONFIG_HEADER
20920 #
20921 if test x"$ac_file" != x-; then
20922 {
20923 $as_echo "/* $configure_input */" \
20924 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20925 } >"$ac_tmp/config.h" \
20926 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20927 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20928 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20929 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20930 else
20931 rm -f "$ac_file"
20932 mv "$ac_tmp/config.h" "$ac_file" \
20933 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20934 fi
20935 else
20936 $as_echo "/* $configure_input */" \
20937 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20938 || as_fn_error $? "could not create -" "$LINENO" 5
20939 fi
20940 ;;
20941 :L)
20942 #
20943 # CONFIG_LINK
20944 #
20945
20946 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20947 :
20948 else
20949 # Prefer the file from the source tree if names are identical.
20950 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20951 ac_source=$srcdir/$ac_source
20952 fi
20953
20954 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20955 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20956
20957 if test ! -r "$ac_source"; then
20958 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20959 fi
20960 rm -f "$ac_file"
20961
20962 # Try a relative symlink, then a hard link, then a copy.
20963 case $ac_source in
20964 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20965 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20966 esac
20967 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20968 ln "$ac_source" "$ac_file" 2>/dev/null ||
20969 cp -p "$ac_source" "$ac_file" ||
20970 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20971 fi
20972 ;;
20973 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20974 $as_echo "$as_me: executing $ac_file commands" >&6;}
20975 ;;
20976 esac
20977
20978
20979 case $ac_file$ac_mode in
20980 "check_win32_symlinks":C)
20981 # Links sometimes fail undetected on Mingw -
20982 # so here we detect it and warn the user
20983 for FILE in $CONFIG_LINKS
20984 do
20985 # test -e works for symlinks in the MinGW console
20986 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20987 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20988 done
20989 ;;
20990 "src/include/pg_config.h":H)
20991 # Update timestamp for pg_config.h (see Makefile.global)
20992 echo >src/include/stamp-h
20993 ;;
20994 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20995
20996 esac
20997 done # for ac_tag
20998
20999
21000 as_fn_exit 0
21001 _ACEOF
21002 ac_clean_files=$ac_clean_files_save
21003
21004 test $ac_write_fail = 0 ||
21005 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
21006
21007
21008 # configure is writing to config.log, and then calls config.status.
21009 # config.status does its own redirection, appending to config.log.
21010 # Unfortunately, on DOS this fails, as config.log is still kept open
21011 # by configure, so config.status won't be able to write to it; its
21012 # output is simply discarded. So we exec the FD to /dev/null,
21013 # effectively closing config.log, so it can be properly (re)opened and
21014 # appended to by config.status. When coming back to configure, we
21015 # need to make the FD available again.
21016 if test "$no_create" != yes; then
21017 ac_cs_success=:
21018 ac_config_status_args=
21019 test "$silent" = yes &&
21020 ac_config_status_args="$ac_config_status_args --quiet"
21021 exec 5>/dev/null
21022 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21023 exec 5>>config.log
21024 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21025 # would make configure fail if this is the last instruction.
21026 $ac_cs_success || as_fn_exit 1
21027 fi
21028 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
21029 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21030 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
21031 fi
21032
21033
21034 # Ensure that any meson build directories would reconfigure and see that
21035 # there's a conflicting in-tree build and can error out.
21036 if test "$vpath_build" = "no"; then
21037 touch meson.build
21038 fi