Stamp 16.5.
[pgsql.git] / configure
bloba6a9ea30347755356d79e7c328fd5abbbc1ce6f5
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 16.5.
5 # Report bugs to <pgsql-bugs@lists.postgresql.org>.
8 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
14 # Copyright (c) 1996-2023, PostgreSQL Global Development Group
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
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 *) :
34 esac
38 as_nl='
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"
69 export as_echo_n_body
70 as_echo_n='sh -c $as_echo_n_body as_echo'
72 export as_echo_body
73 as_echo='sh -c $as_echo_body as_echo'
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=';'
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"
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
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
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
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
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='+ '
130 # NLS nuisances.
131 LC_ALL=C
132 export LC_ALL
133 LANGUAGE=C
134 export LANGUAGE
136 # CDPATH.
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
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
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 *) :
178 esac
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; }
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 :
194 else
195 exitcode=1; echo positional parameters were not saved.
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
209 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
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
216 IFS=$as_save_IFS
217 test -z "$as_dir" && as_dir=.
218 as_found=:
219 case $as_dir in #(
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
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
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
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 bug-autoconf@gnu.org and
272 $0: pgsql-bugs@lists.postgresql.org 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."
277 exit 1
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
287 ## --------------------- ##
288 ## M4sh Shell Functions. ##
289 ## --------------------- ##
290 # as_fn_unset VAR
291 # ---------------
292 # Portably unset VAR.
293 as_fn_unset ()
295 { eval $1=; unset $1;}
297 as_unset=as_fn_unset
299 # as_fn_set_status STATUS
300 # -----------------------
301 # Set $? to STATUS, without forking.
302 as_fn_set_status ()
304 return $1
305 } # as_fn_set_status
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 ()
312 set +e
313 as_fn_set_status $1
314 exit $1
315 } # as_fn_exit
317 # as_fn_mkdir_p
318 # -------------
319 # Create "$as_dir" as a directory, including parents if necessary.
320 as_fn_mkdir_p ()
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/
344 /^X\(\/\/\)[^/].*/{
345 s//\1/
348 /^X\(\/\/\)$/{
349 s//\1/
352 /^X\(\/\).*/{
353 s//\1/
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"
363 } # as_fn_mkdir_p
365 # as_fn_executable_p FILE
366 # -----------------------
367 # Test if FILE is an executable regular file.
368 as_fn_executable_p ()
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 ()
381 eval $1+=\$2
383 else
384 as_fn_append ()
386 eval $1=\$$1\$2
388 fi # as_fn_append
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 ()
398 as_val=$(( $* ))
400 else
401 as_fn_arith ()
403 as_val=`expr "$@" || test $? -eq 1`
405 fi # as_fn_arith
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 ()
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
420 $as_echo "$as_me: error: $2" >&2
421 as_fn_exit $as_status
422 } # as_fn_error
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
431 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432 as_basename=basename
433 else
434 as_basename=false
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
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/
452 /^X\/\(\/\/\)$/{
453 s//\1/
456 /^X\/\(\/\).*/{
457 s//\1/
460 s/.*/./; q'`
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
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 '
477 /[$]LINENO/=
478 ' <$as_myself |
479 sed '
480 s/[$]LINENO.*/&-/
481 t lineno
483 :lineno
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; }
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
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;;
515 ECHO_N='-n';;
516 esac
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
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'
539 else
540 as_ln_s='cp -pR'
542 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
543 rmdir conf$$.dir 2>/dev/null
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
552 as_test_x='test -x'
553 as_executable_p=as_fn_executable_p
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'"
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'"
562 test -n "$DJDIR" || exec 7<&0 </dev/null
563 exec 6>&1
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`
571 # Initializations.
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=
582 # Identity of this package.
583 PACKAGE_NAME='PostgreSQL'
584 PACKAGE_TARNAME='postgresql'
585 PACKAGE_VERSION='16.5'
586 PACKAGE_STRING='PostgreSQL 16.5'
587 PACKAGE_BUGREPORT='pgsql-bugs@lists.postgresql.org'
588 PACKAGE_URL='https://www.postgresql.org/'
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"
628 ac_subst_vars='LTLIBOBJS
629 vpath_build
630 PG_SYSROOT
631 PG_VERSION_NUM
632 LDFLAGS_EX_BE
633 PROVE
634 DBTOEPUB
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
654 UUID_LIBS
655 LDAP_LIBS_BE
656 LDAP_LIBS_FE
657 with_ssl
658 PTHREAD_CFLAGS
659 PTHREAD_LIBS
660 PTHREAD_CC
661 ax_pthread_config
662 EGREP
663 GREP
666 python_additional_libs
667 python_libspec
668 python_libdir
669 python_includespec
670 python_version
671 python_majorversion
672 PYTHON
673 perl_embed_ldflags
674 perl_embed_ccflags
675 perl_includespec
676 perl_useshrplib
677 perl_privlibexp
678 perl_archlibexp
679 PERL
680 FLEXFLAGS
681 FLEX
682 BISONFLAGS
683 BISON
684 MKDIR_P
685 LN_S
687 install_bin
688 INSTALL_DATA
689 INSTALL_SCRIPT
690 INSTALL_PROGRAM
691 WINDRES
693 STRIP_SHARED_LIB
694 STRIP_STATIC_LIB
695 STRIP
696 LDFLAGS_SL
697 LDFLAGS_EX
698 ZSTD_LIBS
699 ZSTD_CFLAGS
700 with_zstd
701 LZ4_LIBS
702 LZ4_CFLAGS
703 with_lz4
704 with_zlib
705 with_system_tzdata
706 with_libxslt
707 XML2_LIBS
708 XML2_CFLAGS
709 XML2_CONFIG
710 with_libxml
711 with_uuid
712 with_readline
713 with_systemd
714 with_selinux
715 with_ldap
716 with_krb_srvnam
717 krb_srvtab
718 with_gssapi
719 with_python
720 with_perl
721 with_tcl
722 ICU_LIBS
723 ICU_CFLAGS
724 with_icu
725 enable_thread_safety
726 INCLUDES
727 autodepend
728 PKG_CONFIG_LIBDIR
729 PKG_CONFIG_PATH
730 PKG_CONFIG
731 DLSUFFIX
735 CFLAGS_SL
736 BITCODE_CXXFLAGS
737 BITCODE_CFLAGS
738 CXXFLAGS_SL_MODULE
739 CFLAGS_SL_MODULE
740 CFLAGS_VECTORIZE
741 CFLAGS_UNROLL_LOOPS
742 PERMIT_DECLARATION_AFTER_STATEMENT
743 LLVM_BINPATH
744 LLVM_CXXFLAGS
745 LLVM_CFLAGS
746 LLVM_CPPFLAGS
747 LLVM_LIBS
748 CLANG
749 LLVM_CONFIG
751 with_llvm
752 SUN_STUDIO_CC
753 ac_ct_CXX
754 CXXFLAGS
756 OBJEXT
757 EXEEXT
758 ac_ct_CC
759 CPPFLAGS
760 LDFLAGS
761 CFLAGS
763 enable_tap_tests
764 enable_dtrace
765 DTRACEFLAGS
766 DTRACE
767 enable_coverage
768 GENHTML
769 LCOV
770 GCOV
771 enable_debug
772 enable_rpath
773 default_port
774 WANTED_LANGUAGES
775 enable_nls
776 PORTNAME
777 host_os
778 host_vendor
779 host_cpu
780 host
781 build_os
782 build_vendor
783 build_cpu
784 build
785 PG_MAJORVERSION
786 target_alias
787 host_alias
788 build_alias
789 LIBS
790 ECHO_T
791 ECHO_N
792 ECHO_C
793 DEFS
794 mandir
795 localedir
796 libdir
797 psdir
798 pdfdir
799 dvidir
800 htmldir
801 infodir
802 docdir
803 oldincludedir
804 includedir
805 localstatedir
806 sharedstatedir
807 sysconfdir
808 datadir
809 datarootdir
810 libexecdir
811 sbindir
812 bindir
813 program_transform_name
814 prefix
815 exec_prefix
816 PACKAGE_URL
817 PACKAGE_BUGREPORT
818 PACKAGE_STRING
819 PACKAGE_VERSION
820 PACKAGE_TARNAME
821 PACKAGE_NAME
822 PATH_SEPARATOR
823 SHELL'
824 ac_subst_files=''
825 ac_user_opts='
826 enable_option_checking
827 with_extra_version
828 with_template
829 with_includes
830 with_libraries
831 with_libs
832 enable_integer_datetimes
833 enable_nls
834 with_pgport
835 enable_rpath
836 enable_spinlocks
837 enable_atomics
838 enable_debug
839 enable_profiling
840 enable_coverage
841 enable_dtrace
842 enable_tap_tests
843 with_blocksize
844 with_segsize
845 with_segsize_blocks
846 with_wal_blocksize
847 with_CC
848 with_llvm
849 enable_depend
850 enable_cassert
851 enable_thread_safety
852 with_icu
853 with_tcl
854 with_tclconfig
855 with_perl
856 with_python
857 with_gssapi
858 with_krb_srvnam
859 with_pam
860 with_bsd_auth
861 with_ldap
862 with_bonjour
863 with_selinux
864 with_systemd
865 with_readline
866 with_libedit_preferred
867 with_uuid
868 with_ossp_uuid
869 with_libxml
870 with_libxslt
871 with_system_tzdata
872 with_zlib
873 with_lz4
874 with_zstd
875 with_ssl
876 with_openssl
877 enable_largefile
879 ac_precious_vars='build_alias
880 host_alias
881 target_alias
883 CFLAGS
884 LDFLAGS
885 LIBS
886 CPPFLAGS
888 CXXFLAGS
890 LLVM_CONFIG
891 CLANG
893 PKG_CONFIG
894 PKG_CONFIG_PATH
895 PKG_CONFIG_LIBDIR
896 ICU_CFLAGS
897 ICU_LIBS
898 XML2_CONFIG
899 XML2_CFLAGS
900 XML2_LIBS
901 LZ4_CFLAGS
902 LZ4_LIBS
903 ZSTD_CFLAGS
904 ZSTD_LIBS
905 LDFLAGS_EX
906 LDFLAGS_SL
907 PERL
908 PYTHON
909 MSGFMT
910 TCLSH'
913 # Initialize some variables set by options.
914 ac_init_help=
915 ac_init_version=false
916 ac_unrecognized_opts=
917 ac_unrecognized_sep=
918 # The variables have the same names as the options, with
919 # dashes changed to underlines.
920 cache_file=/dev/null
921 exec_prefix=NONE
922 no_create=
923 no_recursion=
924 prefix=NONE
925 program_prefix=NONE
926 program_suffix=NONE
927 program_transform_name=s,x,x,
928 silent=
929 site=
930 srcdir=
931 verbose=
932 x_includes=NONE
933 x_libraries=NONE
935 # Installation directory options.
936 # These are left unexpanded so users can "make install exec_prefix=/foo"
937 # and all the variables that are supposed to be based on exec_prefix
938 # by default will actually change.
939 # Use braces instead of parens because sh, perl, etc. also accept them.
940 # (The list follows the same order as the GNU Coding Standards.)
941 bindir='${exec_prefix}/bin'
942 sbindir='${exec_prefix}/sbin'
943 libexecdir='${exec_prefix}/libexec'
944 datarootdir='${prefix}/share'
945 datadir='${datarootdir}'
946 sysconfdir='${prefix}/etc'
947 sharedstatedir='${prefix}/com'
948 localstatedir='${prefix}/var'
949 includedir='${prefix}/include'
950 oldincludedir='/usr/include'
951 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
952 infodir='${datarootdir}/info'
953 htmldir='${docdir}'
954 dvidir='${docdir}'
955 pdfdir='${docdir}'
956 psdir='${docdir}'
957 libdir='${exec_prefix}/lib'
958 localedir='${datarootdir}/locale'
959 mandir='${datarootdir}/man'
961 ac_prev=
962 ac_dashdash=
963 for ac_option
965 # If the previous option needs an argument, assign it.
966 if test -n "$ac_prev"; then
967 eval $ac_prev=\$ac_option
968 ac_prev=
969 continue
972 case $ac_option in
973 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
974 *=) ac_optarg= ;;
975 *) ac_optarg=yes ;;
976 esac
978 # Accept the important Cygnus configure options, so we can diagnose typos.
980 case $ac_dashdash$ac_option in
982 ac_dashdash=yes ;;
984 -bindir | --bindir | --bindi | --bind | --bin | --bi)
985 ac_prev=bindir ;;
986 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
987 bindir=$ac_optarg ;;
989 -build | --build | --buil | --bui | --bu)
990 ac_prev=build_alias ;;
991 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
992 build_alias=$ac_optarg ;;
994 -cache-file | --cache-file | --cache-fil | --cache-fi \
995 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
996 ac_prev=cache_file ;;
997 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
998 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
999 cache_file=$ac_optarg ;;
1001 --config-cache | -C)
1002 cache_file=config.cache ;;
1004 -datadir | --datadir | --datadi | --datad)
1005 ac_prev=datadir ;;
1006 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1007 datadir=$ac_optarg ;;
1009 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1010 | --dataroo | --dataro | --datar)
1011 ac_prev=datarootdir ;;
1012 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1013 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1014 datarootdir=$ac_optarg ;;
1016 -disable-* | --disable-*)
1017 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1018 # Reject names that are not valid shell variable names.
1019 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1020 as_fn_error $? "invalid feature name: $ac_useropt"
1021 ac_useropt_orig=$ac_useropt
1022 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1023 case $ac_user_opts in
1025 "enable_$ac_useropt"
1026 "*) ;;
1027 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1028 ac_unrecognized_sep=', ';;
1029 esac
1030 eval enable_$ac_useropt=no ;;
1032 -docdir | --docdir | --docdi | --doc | --do)
1033 ac_prev=docdir ;;
1034 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1035 docdir=$ac_optarg ;;
1037 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1038 ac_prev=dvidir ;;
1039 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1040 dvidir=$ac_optarg ;;
1042 -enable-* | --enable-*)
1043 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1044 # Reject names that are not valid shell variable names.
1045 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1046 as_fn_error $? "invalid feature name: $ac_useropt"
1047 ac_useropt_orig=$ac_useropt
1048 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1049 case $ac_user_opts in
1051 "enable_$ac_useropt"
1052 "*) ;;
1053 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1054 ac_unrecognized_sep=', ';;
1055 esac
1056 eval enable_$ac_useropt=\$ac_optarg ;;
1058 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1059 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1060 | --exec | --exe | --ex)
1061 ac_prev=exec_prefix ;;
1062 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1063 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1064 | --exec=* | --exe=* | --ex=*)
1065 exec_prefix=$ac_optarg ;;
1067 -gas | --gas | --ga | --g)
1068 # Obsolete; use --with-gas.
1069 with_gas=yes ;;
1071 -help | --help | --hel | --he | -h)
1072 ac_init_help=long ;;
1073 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1074 ac_init_help=recursive ;;
1075 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1076 ac_init_help=short ;;
1078 -host | --host | --hos | --ho)
1079 ac_prev=host_alias ;;
1080 -host=* | --host=* | --hos=* | --ho=*)
1081 host_alias=$ac_optarg ;;
1083 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1084 ac_prev=htmldir ;;
1085 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1086 | --ht=*)
1087 htmldir=$ac_optarg ;;
1089 -includedir | --includedir | --includedi | --included | --include \
1090 | --includ | --inclu | --incl | --inc)
1091 ac_prev=includedir ;;
1092 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1093 | --includ=* | --inclu=* | --incl=* | --inc=*)
1094 includedir=$ac_optarg ;;
1096 -infodir | --infodir | --infodi | --infod | --info | --inf)
1097 ac_prev=infodir ;;
1098 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1099 infodir=$ac_optarg ;;
1101 -libdir | --libdir | --libdi | --libd)
1102 ac_prev=libdir ;;
1103 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1104 libdir=$ac_optarg ;;
1106 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1107 | --libexe | --libex | --libe)
1108 ac_prev=libexecdir ;;
1109 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1110 | --libexe=* | --libex=* | --libe=*)
1111 libexecdir=$ac_optarg ;;
1113 -localedir | --localedir | --localedi | --localed | --locale)
1114 ac_prev=localedir ;;
1115 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1116 localedir=$ac_optarg ;;
1118 -localstatedir | --localstatedir | --localstatedi | --localstated \
1119 | --localstate | --localstat | --localsta | --localst | --locals)
1120 ac_prev=localstatedir ;;
1121 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1122 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1123 localstatedir=$ac_optarg ;;
1125 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1126 ac_prev=mandir ;;
1127 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1128 mandir=$ac_optarg ;;
1130 -nfp | --nfp | --nf)
1131 # Obsolete; use --without-fp.
1132 with_fp=no ;;
1134 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1135 | --no-cr | --no-c | -n)
1136 no_create=yes ;;
1138 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1139 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1140 no_recursion=yes ;;
1142 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1143 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1144 | --oldin | --oldi | --old | --ol | --o)
1145 ac_prev=oldincludedir ;;
1146 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1147 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1148 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1149 oldincludedir=$ac_optarg ;;
1151 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1152 ac_prev=prefix ;;
1153 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1154 prefix=$ac_optarg ;;
1156 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1157 | --program-pre | --program-pr | --program-p)
1158 ac_prev=program_prefix ;;
1159 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1160 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1161 program_prefix=$ac_optarg ;;
1163 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1164 | --program-suf | --program-su | --program-s)
1165 ac_prev=program_suffix ;;
1166 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1167 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1168 program_suffix=$ac_optarg ;;
1170 -program-transform-name | --program-transform-name \
1171 | --program-transform-nam | --program-transform-na \
1172 | --program-transform-n | --program-transform- \
1173 | --program-transform | --program-transfor \
1174 | --program-transfo | --program-transf \
1175 | --program-trans | --program-tran \
1176 | --progr-tra | --program-tr | --program-t)
1177 ac_prev=program_transform_name ;;
1178 -program-transform-name=* | --program-transform-name=* \
1179 | --program-transform-nam=* | --program-transform-na=* \
1180 | --program-transform-n=* | --program-transform-=* \
1181 | --program-transform=* | --program-transfor=* \
1182 | --program-transfo=* | --program-transf=* \
1183 | --program-trans=* | --program-tran=* \
1184 | --progr-tra=* | --program-tr=* | --program-t=*)
1185 program_transform_name=$ac_optarg ;;
1187 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1188 ac_prev=pdfdir ;;
1189 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1190 pdfdir=$ac_optarg ;;
1192 -psdir | --psdir | --psdi | --psd | --ps)
1193 ac_prev=psdir ;;
1194 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1195 psdir=$ac_optarg ;;
1197 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1198 | -silent | --silent | --silen | --sile | --sil)
1199 silent=yes ;;
1201 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1202 ac_prev=sbindir ;;
1203 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1204 | --sbi=* | --sb=*)
1205 sbindir=$ac_optarg ;;
1207 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1208 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1209 | --sharedst | --shareds | --shared | --share | --shar \
1210 | --sha | --sh)
1211 ac_prev=sharedstatedir ;;
1212 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1213 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1214 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1215 | --sha=* | --sh=*)
1216 sharedstatedir=$ac_optarg ;;
1218 -site | --site | --sit)
1219 ac_prev=site ;;
1220 -site=* | --site=* | --sit=*)
1221 site=$ac_optarg ;;
1223 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1224 ac_prev=srcdir ;;
1225 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1226 srcdir=$ac_optarg ;;
1228 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1229 | --syscon | --sysco | --sysc | --sys | --sy)
1230 ac_prev=sysconfdir ;;
1231 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1232 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1233 sysconfdir=$ac_optarg ;;
1235 -target | --target | --targe | --targ | --tar | --ta | --t)
1236 ac_prev=target_alias ;;
1237 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1238 target_alias=$ac_optarg ;;
1240 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1241 verbose=yes ;;
1243 -version | --version | --versio | --versi | --vers | -V)
1244 ac_init_version=: ;;
1246 -with-* | --with-*)
1247 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1248 # Reject names that are not valid shell variable names.
1249 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1250 as_fn_error $? "invalid package name: $ac_useropt"
1251 ac_useropt_orig=$ac_useropt
1252 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1253 case $ac_user_opts in
1255 "with_$ac_useropt"
1256 "*) ;;
1257 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1258 ac_unrecognized_sep=', ';;
1259 esac
1260 eval with_$ac_useropt=\$ac_optarg ;;
1262 -without-* | --without-*)
1263 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1264 # Reject names that are not valid shell variable names.
1265 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1266 as_fn_error $? "invalid package name: $ac_useropt"
1267 ac_useropt_orig=$ac_useropt
1268 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1269 case $ac_user_opts in
1271 "with_$ac_useropt"
1272 "*) ;;
1273 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1274 ac_unrecognized_sep=', ';;
1275 esac
1276 eval with_$ac_useropt=no ;;
1278 --x)
1279 # Obsolete; use --with-x.
1280 with_x=yes ;;
1282 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1283 | --x-incl | --x-inc | --x-in | --x-i)
1284 ac_prev=x_includes ;;
1285 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1286 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1287 x_includes=$ac_optarg ;;
1289 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1290 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1291 ac_prev=x_libraries ;;
1292 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1293 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1294 x_libraries=$ac_optarg ;;
1296 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1297 Try \`$0 --help' for more information"
1300 *=*)
1301 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1302 # Reject names that are not valid shell variable names.
1303 case $ac_envvar in #(
1304 '' | [0-9]* | *[!_$as_cr_alnum]* )
1305 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1306 esac
1307 eval $ac_envvar=\$ac_optarg
1308 export $ac_envvar ;;
1311 # FIXME: should be removed in autoconf 3.0.
1312 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1313 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1314 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1315 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1318 esac
1319 done
1321 if test -n "$ac_prev"; then
1322 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1323 as_fn_error $? "missing argument to $ac_option"
1326 if test -n "$ac_unrecognized_opts"; then
1327 case $enable_option_checking in
1328 no) ;;
1329 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1330 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1331 esac
1334 # Check all directory arguments for consistency.
1335 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1336 datadir sysconfdir sharedstatedir localstatedir includedir \
1337 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1338 libdir localedir mandir
1340 eval ac_val=\$$ac_var
1341 # Remove trailing slashes.
1342 case $ac_val in
1343 */ )
1344 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1345 eval $ac_var=\$ac_val;;
1346 esac
1347 # Be sure to have absolute directory names.
1348 case $ac_val in
1349 [\\/$]* | ?:[\\/]* ) continue;;
1350 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1351 esac
1352 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1353 done
1355 # There might be people who depend on the old broken behavior: `$host'
1356 # used to hold the argument of --host etc.
1357 # FIXME: To remove some day.
1358 build=$build_alias
1359 host=$host_alias
1360 target=$target_alias
1362 # FIXME: To remove some day.
1363 if test "x$host_alias" != x; then
1364 if test "x$build_alias" = x; then
1365 cross_compiling=maybe
1366 elif test "x$build_alias" != "x$host_alias"; then
1367 cross_compiling=yes
1371 ac_tool_prefix=
1372 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1374 test "$silent" = yes && exec 6>/dev/null
1377 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1378 ac_ls_di=`ls -di .` &&
1379 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1380 as_fn_error $? "working directory cannot be determined"
1381 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1382 as_fn_error $? "pwd does not report name of working directory"
1385 # Find the source files, if location was not specified.
1386 if test -z "$srcdir"; then
1387 ac_srcdir_defaulted=yes
1388 # Try the directory containing this script, then the parent directory.
1389 ac_confdir=`$as_dirname -- "$as_myself" ||
1390 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1391 X"$as_myself" : 'X\(//\)[^/]' \| \
1392 X"$as_myself" : 'X\(//\)$' \| \
1393 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1394 $as_echo X"$as_myself" |
1395 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1396 s//\1/
1399 /^X\(\/\/\)[^/].*/{
1400 s//\1/
1403 /^X\(\/\/\)$/{
1404 s//\1/
1407 /^X\(\/\).*/{
1408 s//\1/
1411 s/.*/./; q'`
1412 srcdir=$ac_confdir
1413 if test ! -r "$srcdir/$ac_unique_file"; then
1414 srcdir=..
1416 else
1417 ac_srcdir_defaulted=no
1419 if test ! -r "$srcdir/$ac_unique_file"; then
1420 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1421 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1423 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1424 ac_abs_confdir=`(
1425 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1426 pwd)`
1427 # When building in place, set srcdir=.
1428 if test "$ac_abs_confdir" = "$ac_pwd"; then
1429 srcdir=.
1431 # Remove unnecessary trailing slashes from srcdir.
1432 # Double slashes in file names in object file debugging info
1433 # mess up M-x gdb in Emacs.
1434 case $srcdir in
1435 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1436 esac
1437 for ac_var in $ac_precious_vars; do
1438 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1439 eval ac_env_${ac_var}_value=\$${ac_var}
1440 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1441 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1442 done
1445 # Report the --help message.
1447 if test "$ac_init_help" = "long"; then
1448 # Omit some internal or obsolete options to make the list less imposing.
1449 # This message is too long to be a string in the A/UX 3.1 sh.
1450 cat <<_ACEOF
1451 \`configure' configures PostgreSQL 16.5 to adapt to many kinds of systems.
1453 Usage: $0 [OPTION]... [VAR=VALUE]...
1455 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1456 VAR=VALUE. See below for descriptions of some of the useful variables.
1458 Defaults for the options are specified in brackets.
1460 Configuration:
1461 -h, --help display this help and exit
1462 --help=short display options specific to this package
1463 --help=recursive display the short help of all the included packages
1464 -V, --version display version information and exit
1465 -q, --quiet, --silent do not print \`checking ...' messages
1466 --cache-file=FILE cache test results in FILE [disabled]
1467 -C, --config-cache alias for \`--cache-file=config.cache'
1468 -n, --no-create do not create output files
1469 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1471 Installation directories:
1472 --prefix=PREFIX install architecture-independent files in PREFIX
1473 [$ac_default_prefix]
1474 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1475 [PREFIX]
1477 By default, \`make install' will install all the files in
1478 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1479 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1480 for instance \`--prefix=\$HOME'.
1482 For better control, use the options below.
1484 Fine tuning of the installation directories:
1485 --bindir=DIR user executables [EPREFIX/bin]
1486 --sbindir=DIR system admin executables [EPREFIX/sbin]
1487 --libexecdir=DIR program executables [EPREFIX/libexec]
1488 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1489 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1490 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1491 --libdir=DIR object code libraries [EPREFIX/lib]
1492 --includedir=DIR C header files [PREFIX/include]
1493 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1494 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1495 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1496 --infodir=DIR info documentation [DATAROOTDIR/info]
1497 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1498 --mandir=DIR man documentation [DATAROOTDIR/man]
1499 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1500 --htmldir=DIR html documentation [DOCDIR]
1501 --dvidir=DIR dvi documentation [DOCDIR]
1502 --pdfdir=DIR pdf documentation [DOCDIR]
1503 --psdir=DIR ps documentation [DOCDIR]
1504 _ACEOF
1506 cat <<\_ACEOF
1508 System types:
1509 --build=BUILD configure for building on BUILD [guessed]
1510 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1511 _ACEOF
1514 if test -n "$ac_init_help"; then
1515 case $ac_init_help in
1516 short | recursive ) echo "Configuration of PostgreSQL 16.5:";;
1517 esac
1518 cat <<\_ACEOF
1520 Optional Features:
1521 --disable-option-checking ignore unrecognized --enable/--with options
1522 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1523 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1524 --disable-integer-datetimes
1525 obsolete option, no longer supported
1526 --enable-nls[=LANGUAGES]
1527 enable Native Language Support
1528 --disable-rpath do not embed shared library search path in
1529 executables
1530 --disable-spinlocks do not use spinlocks
1531 --disable-atomics do not use atomic operations
1532 --enable-debug build with debugging symbols (-g)
1533 --enable-profiling build with profiling enabled
1534 --enable-coverage build with coverage testing instrumentation
1535 --enable-dtrace build with DTrace support
1536 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1537 --enable-depend turn on automatic dependency tracking
1538 --enable-cassert enable assertion checks (for debugging)
1539 --disable-thread-safety disable thread-safety in client libraries
1540 --disable-largefile omit support for large files
1542 Optional Packages:
1543 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1544 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1545 --with-extra-version=STRING
1546 append STRING to version
1547 --with-template=NAME override operating system template
1548 --with-includes=DIRS look for additional header files in DIRS
1549 --with-libraries=DIRS look for additional libraries in DIRS
1550 --with-libs=DIRS alternative spelling of --with-libraries
1551 --with-pgport=PORTNUM set default port number [5432]
1552 --with-blocksize=BLOCKSIZE
1553 set table block size in kB [8]
1554 --with-segsize=SEGSIZE set table segment size in GB [1]
1555 --with-segsize-blocks=SEGSIZE_BLOCKS
1556 set table segment size in blocks [0]
1557 --with-wal-blocksize=BLOCKSIZE
1558 set WAL block size in kB [8]
1559 --with-CC=CMD set compiler (deprecated)
1560 --with-llvm build with LLVM based JIT support
1561 --without-icu build without ICU support
1562 --with-tcl build Tcl modules (PL/Tcl)
1563 --with-tclconfig=DIR tclConfig.sh is in DIR
1564 --with-perl build Perl modules (PL/Perl)
1565 --with-python build Python modules (PL/Python)
1566 --with-gssapi build with GSSAPI support
1567 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1568 [postgres]
1569 --with-pam build with PAM support
1570 --with-bsd-auth build with BSD Authentication support
1571 --with-ldap build with LDAP support
1572 --with-bonjour build with Bonjour support
1573 --with-selinux build with SELinux support
1574 --with-systemd build with systemd support
1575 --without-readline do not use GNU Readline nor BSD Libedit for editing
1576 --with-libedit-preferred
1577 prefer BSD Libedit over GNU Readline
1578 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1579 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1580 --with-libxml build with XML support
1581 --with-libxslt use XSLT support when building contrib/xml2
1582 --with-system-tzdata=DIR
1583 use system time zone data in DIR
1584 --without-zlib do not use Zlib
1585 --with-lz4 build with LZ4 support
1586 --with-zstd build with ZSTD support
1587 --with-ssl=LIB use LIB for SSL/TLS support (openssl)
1588 --with-openssl obsolete spelling of --with-ssl=openssl
1590 Some influential environment variables:
1591 CC C compiler command
1592 CFLAGS C compiler flags
1593 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1594 nonstandard directory <lib dir>
1595 LIBS libraries to pass to the linker, e.g. -l<library>
1596 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1597 you have headers in a nonstandard directory <include dir>
1598 CXX C++ compiler command
1599 CXXFLAGS C++ compiler flags
1600 LLVM_CONFIG path to llvm-config command
1601 CLANG path to clang compiler to generate bitcode
1602 CPP C preprocessor
1603 PKG_CONFIG path to pkg-config utility
1604 PKG_CONFIG_PATH
1605 directories to add to pkg-config's search path
1606 PKG_CONFIG_LIBDIR
1607 path overriding pkg-config's built-in search path
1608 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1609 ICU_LIBS linker flags for ICU, overriding pkg-config
1610 XML2_CONFIG path to xml2-config utility
1611 XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1612 XML2_LIBS linker flags for XML2, overriding pkg-config
1613 LZ4_CFLAGS C compiler flags for LZ4, overriding pkg-config
1614 LZ4_LIBS linker flags for LZ4, overriding pkg-config
1615 ZSTD_CFLAGS C compiler flags for ZSTD, overriding pkg-config
1616 ZSTD_LIBS linker flags for ZSTD, overriding pkg-config
1617 LDFLAGS_EX extra linker flags for linking executables only
1618 LDFLAGS_SL extra linker flags for linking shared libraries only
1619 PERL Perl program
1620 PYTHON Python program
1621 MSGFMT msgfmt program for NLS
1622 TCLSH Tcl interpreter program (tclsh)
1624 Use these variables to override the choices made by `configure' or to help
1625 it to find libraries and programs with nonstandard names/locations.
1627 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1628 PostgreSQL home page: <https://www.postgresql.org/>.
1629 _ACEOF
1630 ac_status=$?
1633 if test "$ac_init_help" = "recursive"; then
1634 # If there are subdirs, report their specific --help.
1635 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1636 test -d "$ac_dir" ||
1637 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1638 continue
1639 ac_builddir=.
1641 case "$ac_dir" in
1642 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1644 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1645 # A ".." for each directory in $ac_dir_suffix.
1646 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1647 case $ac_top_builddir_sub in
1648 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1649 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1650 esac ;;
1651 esac
1652 ac_abs_top_builddir=$ac_pwd
1653 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1654 # for backward compatibility:
1655 ac_top_builddir=$ac_top_build_prefix
1657 case $srcdir in
1658 .) # We are building in place.
1659 ac_srcdir=.
1660 ac_top_srcdir=$ac_top_builddir_sub
1661 ac_abs_top_srcdir=$ac_pwd ;;
1662 [\\/]* | ?:[\\/]* ) # Absolute name.
1663 ac_srcdir=$srcdir$ac_dir_suffix;
1664 ac_top_srcdir=$srcdir
1665 ac_abs_top_srcdir=$srcdir ;;
1666 *) # Relative name.
1667 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1668 ac_top_srcdir=$ac_top_build_prefix$srcdir
1669 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1670 esac
1671 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1673 cd "$ac_dir" || { ac_status=$?; continue; }
1674 # Check for guested configure.
1675 if test -f "$ac_srcdir/configure.gnu"; then
1676 echo &&
1677 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1678 elif test -f "$ac_srcdir/configure"; then
1679 echo &&
1680 $SHELL "$ac_srcdir/configure" --help=recursive
1681 else
1682 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1683 fi || ac_status=$?
1684 cd "$ac_pwd" || { ac_status=$?; break; }
1685 done
1688 test -n "$ac_init_help" && exit $ac_status
1689 if $ac_init_version; then
1690 cat <<\_ACEOF
1691 PostgreSQL configure 16.5
1692 generated by GNU Autoconf 2.69
1694 Copyright (C) 2012 Free Software Foundation, Inc.
1695 This configure script is free software; the Free Software Foundation
1696 gives unlimited permission to copy, distribute and modify it.
1698 Copyright (c) 1996-2023, PostgreSQL Global Development Group
1699 _ACEOF
1700 exit
1703 ## ------------------------ ##
1704 ## Autoconf initialization. ##
1705 ## ------------------------ ##
1707 # ac_fn_c_try_compile LINENO
1708 # --------------------------
1709 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1710 ac_fn_c_try_compile ()
1712 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1713 rm -f conftest.$ac_objext
1714 if { { ac_try="$ac_compile"
1715 case "(($ac_try" in
1716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1717 *) ac_try_echo=$ac_try;;
1718 esac
1719 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1720 $as_echo "$ac_try_echo"; } >&5
1721 (eval "$ac_compile") 2>conftest.err
1722 ac_status=$?
1723 if test -s conftest.err; then
1724 grep -v '^ *+' conftest.err >conftest.er1
1725 cat conftest.er1 >&5
1726 mv -f conftest.er1 conftest.err
1728 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1729 test $ac_status = 0; } && {
1730 test -z "$ac_c_werror_flag" ||
1731 test ! -s conftest.err
1732 } && test -s conftest.$ac_objext; then :
1733 ac_retval=0
1734 else
1735 $as_echo "$as_me: failed program was:" >&5
1736 sed 's/^/| /' conftest.$ac_ext >&5
1738 ac_retval=1
1740 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1741 as_fn_set_status $ac_retval
1743 } # ac_fn_c_try_compile
1745 # ac_fn_cxx_try_compile LINENO
1746 # ----------------------------
1747 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1748 ac_fn_cxx_try_compile ()
1750 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1751 rm -f conftest.$ac_objext
1752 if { { ac_try="$ac_compile"
1753 case "(($ac_try" in
1754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1755 *) ac_try_echo=$ac_try;;
1756 esac
1757 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1758 $as_echo "$ac_try_echo"; } >&5
1759 (eval "$ac_compile") 2>conftest.err
1760 ac_status=$?
1761 if test -s conftest.err; then
1762 grep -v '^ *+' conftest.err >conftest.er1
1763 cat conftest.er1 >&5
1764 mv -f conftest.er1 conftest.err
1766 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1767 test $ac_status = 0; } && {
1768 test -z "$ac_cxx_werror_flag" ||
1769 test ! -s conftest.err
1770 } && test -s conftest.$ac_objext; then :
1771 ac_retval=0
1772 else
1773 $as_echo "$as_me: failed program was:" >&5
1774 sed 's/^/| /' conftest.$ac_ext >&5
1776 ac_retval=1
1778 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1779 as_fn_set_status $ac_retval
1781 } # ac_fn_cxx_try_compile
1783 # ac_fn_c_try_link LINENO
1784 # -----------------------
1785 # Try to link conftest.$ac_ext, and return whether this succeeded.
1786 ac_fn_c_try_link ()
1788 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1789 rm -f conftest.$ac_objext conftest$ac_exeext
1790 if { { ac_try="$ac_link"
1791 case "(($ac_try" in
1792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1793 *) ac_try_echo=$ac_try;;
1794 esac
1795 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1796 $as_echo "$ac_try_echo"; } >&5
1797 (eval "$ac_link") 2>conftest.err
1798 ac_status=$?
1799 if test -s conftest.err; then
1800 grep -v '^ *+' conftest.err >conftest.er1
1801 cat conftest.er1 >&5
1802 mv -f conftest.er1 conftest.err
1804 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1805 test $ac_status = 0; } && {
1806 test -z "$ac_c_werror_flag" ||
1807 test ! -s conftest.err
1808 } && test -s conftest$ac_exeext && {
1809 test "$cross_compiling" = yes ||
1810 test -x conftest$ac_exeext
1811 }; then :
1812 ac_retval=0
1813 else
1814 $as_echo "$as_me: failed program was:" >&5
1815 sed 's/^/| /' conftest.$ac_ext >&5
1817 ac_retval=1
1819 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1820 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1821 # interfere with the next link command; also delete a directory that is
1822 # left behind by Apple's compiler. We do this before executing the actions.
1823 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1824 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1825 as_fn_set_status $ac_retval
1827 } # ac_fn_c_try_link
1829 # ac_fn_c_try_cpp LINENO
1830 # ----------------------
1831 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1832 ac_fn_c_try_cpp ()
1834 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1835 if { { ac_try="$ac_cpp conftest.$ac_ext"
1836 case "(($ac_try" in
1837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1838 *) ac_try_echo=$ac_try;;
1839 esac
1840 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1841 $as_echo "$ac_try_echo"; } >&5
1842 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1843 ac_status=$?
1844 if test -s conftest.err; then
1845 grep -v '^ *+' conftest.err >conftest.er1
1846 cat conftest.er1 >&5
1847 mv -f conftest.er1 conftest.err
1849 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1850 test $ac_status = 0; } > conftest.i && {
1851 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1852 test ! -s conftest.err
1853 }; then :
1854 ac_retval=0
1855 else
1856 $as_echo "$as_me: failed program was:" >&5
1857 sed 's/^/| /' conftest.$ac_ext >&5
1859 ac_retval=1
1861 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1862 as_fn_set_status $ac_retval
1864 } # ac_fn_c_try_cpp
1866 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1867 # -------------------------------------------------------
1868 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1869 # the include files in INCLUDES and setting the cache variable VAR
1870 # accordingly.
1871 ac_fn_c_check_header_mongrel ()
1873 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1874 if eval \${$3+:} false; then :
1875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1876 $as_echo_n "checking for $2... " >&6; }
1877 if eval \${$3+:} false; then :
1878 $as_echo_n "(cached) " >&6
1880 eval ac_res=\$$3
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1882 $as_echo "$ac_res" >&6; }
1883 else
1884 # Is the header compilable?
1885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1886 $as_echo_n "checking $2 usability... " >&6; }
1887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1888 /* end confdefs.h. */
1890 #include <$2>
1891 _ACEOF
1892 if ac_fn_c_try_compile "$LINENO"; then :
1893 ac_header_compiler=yes
1894 else
1895 ac_header_compiler=no
1897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1899 $as_echo "$ac_header_compiler" >&6; }
1901 # Is the header present?
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1903 $as_echo_n "checking $2 presence... " >&6; }
1904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1905 /* end confdefs.h. */
1906 #include <$2>
1907 _ACEOF
1908 if ac_fn_c_try_cpp "$LINENO"; then :
1909 ac_header_preproc=yes
1910 else
1911 ac_header_preproc=no
1913 rm -f conftest.err conftest.i conftest.$ac_ext
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1915 $as_echo "$ac_header_preproc" >&6; }
1917 # So? What about this header?
1918 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1919 yes:no: )
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1921 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1923 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1925 no:yes:* )
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1927 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1929 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1931 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1932 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1933 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1935 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1936 ( $as_echo "## ---------------------------------------------- ##
1937 ## Report this to pgsql-bugs@lists.postgresql.org ##
1938 ## ---------------------------------------------- ##"
1939 ) | sed "s/^/$as_me: WARNING: /" >&2
1941 esac
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1943 $as_echo_n "checking for $2... " >&6; }
1944 if eval \${$3+:} false; then :
1945 $as_echo_n "(cached) " >&6
1946 else
1947 eval "$3=\$ac_header_compiler"
1949 eval ac_res=\$$3
1950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1951 $as_echo "$ac_res" >&6; }
1953 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1955 } # ac_fn_c_check_header_mongrel
1957 # ac_fn_c_try_run LINENO
1958 # ----------------------
1959 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1960 # that executables *can* be run.
1961 ac_fn_c_try_run ()
1963 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1964 if { { ac_try="$ac_link"
1965 case "(($ac_try" in
1966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1967 *) ac_try_echo=$ac_try;;
1968 esac
1969 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1970 $as_echo "$ac_try_echo"; } >&5
1971 (eval "$ac_link") 2>&5
1972 ac_status=$?
1973 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1974 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1975 { { case "(($ac_try" in
1976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1977 *) ac_try_echo=$ac_try;;
1978 esac
1979 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1980 $as_echo "$ac_try_echo"; } >&5
1981 (eval "$ac_try") 2>&5
1982 ac_status=$?
1983 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1984 test $ac_status = 0; }; }; then :
1985 ac_retval=0
1986 else
1987 $as_echo "$as_me: program exited with status $ac_status" >&5
1988 $as_echo "$as_me: failed program was:" >&5
1989 sed 's/^/| /' conftest.$ac_ext >&5
1991 ac_retval=$ac_status
1993 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1994 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1995 as_fn_set_status $ac_retval
1997 } # ac_fn_c_try_run
1999 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2000 # -------------------------------------------------------
2001 # Tests whether HEADER exists and can be compiled using the include files in
2002 # INCLUDES, setting the cache variable VAR accordingly.
2003 ac_fn_c_check_header_compile ()
2005 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2007 $as_echo_n "checking for $2... " >&6; }
2008 if eval \${$3+:} false; then :
2009 $as_echo_n "(cached) " >&6
2010 else
2011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2012 /* end confdefs.h. */
2014 #include <$2>
2015 _ACEOF
2016 if ac_fn_c_try_compile "$LINENO"; then :
2017 eval "$3=yes"
2018 else
2019 eval "$3=no"
2021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2023 eval ac_res=\$$3
2024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2025 $as_echo "$ac_res" >&6; }
2026 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2028 } # ac_fn_c_check_header_compile
2030 # ac_fn_c_check_func LINENO FUNC VAR
2031 # ----------------------------------
2032 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2033 ac_fn_c_check_func ()
2035 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2037 $as_echo_n "checking for $2... " >&6; }
2038 if eval \${$3+:} false; then :
2039 $as_echo_n "(cached) " >&6
2040 else
2041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2042 /* end confdefs.h. */
2043 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2044 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2045 #define $2 innocuous_$2
2047 /* System header to define __stub macros and hopefully few prototypes,
2048 which can conflict with char $2 (); below.
2049 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2050 <limits.h> exists even on freestanding compilers. */
2052 #ifdef __STDC__
2053 # include <limits.h>
2054 #else
2055 # include <assert.h>
2056 #endif
2058 #undef $2
2060 /* Override any GCC internal prototype to avoid an error.
2061 Use char because int might match the return type of a GCC
2062 builtin and then its argument prototype would still apply. */
2063 #ifdef __cplusplus
2064 extern "C"
2065 #endif
2066 char $2 ();
2067 /* The GNU C library defines this for functions which it implements
2068 to always fail with ENOSYS. Some functions are actually named
2069 something starting with __ and the normal name is an alias. */
2070 #if defined __stub_$2 || defined __stub___$2
2071 choke me
2072 #endif
2075 main ()
2077 return $2 ();
2079 return 0;
2081 _ACEOF
2082 if ac_fn_c_try_link "$LINENO"; then :
2083 eval "$3=yes"
2084 else
2085 eval "$3=no"
2087 rm -f core conftest.err conftest.$ac_objext \
2088 conftest$ac_exeext conftest.$ac_ext
2090 eval ac_res=\$$3
2091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2092 $as_echo "$ac_res" >&6; }
2093 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2095 } # ac_fn_c_check_func
2097 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2098 # -------------------------------------------
2099 # Tests whether TYPE exists after having included INCLUDES, setting cache
2100 # variable VAR accordingly.
2101 ac_fn_c_check_type ()
2103 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2105 $as_echo_n "checking for $2... " >&6; }
2106 if eval \${$3+:} false; then :
2107 $as_echo_n "(cached) " >&6
2108 else
2109 eval "$3=no"
2110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2111 /* end confdefs.h. */
2114 main ()
2116 if (sizeof ($2))
2117 return 0;
2119 return 0;
2121 _ACEOF
2122 if ac_fn_c_try_compile "$LINENO"; then :
2123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2124 /* end confdefs.h. */
2127 main ()
2129 if (sizeof (($2)))
2130 return 0;
2132 return 0;
2134 _ACEOF
2135 if ac_fn_c_try_compile "$LINENO"; then :
2137 else
2138 eval "$3=yes"
2140 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2144 eval ac_res=\$$3
2145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2146 $as_echo "$ac_res" >&6; }
2147 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2149 } # ac_fn_c_check_type
2151 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2152 # ----------------------------------------------------
2153 # Tries to find if the field MEMBER exists in type AGGR, after including
2154 # INCLUDES, setting cache variable VAR accordingly.
2155 ac_fn_c_check_member ()
2157 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2159 $as_echo_n "checking for $2.$3... " >&6; }
2160 if eval \${$4+:} false; then :
2161 $as_echo_n "(cached) " >&6
2162 else
2163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2164 /* end confdefs.h. */
2167 main ()
2169 static $2 ac_aggr;
2170 if (ac_aggr.$3)
2171 return 0;
2173 return 0;
2175 _ACEOF
2176 if ac_fn_c_try_compile "$LINENO"; then :
2177 eval "$4=yes"
2178 else
2179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2180 /* end confdefs.h. */
2183 main ()
2185 static $2 ac_aggr;
2186 if (sizeof ac_aggr.$3)
2187 return 0;
2189 return 0;
2191 _ACEOF
2192 if ac_fn_c_try_compile "$LINENO"; then :
2193 eval "$4=yes"
2194 else
2195 eval "$4=no"
2197 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2199 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2201 eval ac_res=\$$4
2202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2203 $as_echo "$ac_res" >&6; }
2204 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2206 } # ac_fn_c_check_member
2208 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2209 # --------------------------------------------
2210 # Tries to find the compile-time value of EXPR in a program that includes
2211 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2212 # computed
2213 ac_fn_c_compute_int ()
2215 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2216 if test "$cross_compiling" = yes; then
2217 # Depending upon the size, compute the lo and hi bounds.
2218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2219 /* end confdefs.h. */
2222 main ()
2224 static int test_array [1 - 2 * !(($2) >= 0)];
2225 test_array [0] = 0;
2226 return test_array [0];
2229 return 0;
2231 _ACEOF
2232 if ac_fn_c_try_compile "$LINENO"; then :
2233 ac_lo=0 ac_mid=0
2234 while :; do
2235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2236 /* end confdefs.h. */
2239 main ()
2241 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2242 test_array [0] = 0;
2243 return test_array [0];
2246 return 0;
2248 _ACEOF
2249 if ac_fn_c_try_compile "$LINENO"; then :
2250 ac_hi=$ac_mid; break
2251 else
2252 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2253 if test $ac_lo -le $ac_mid; then
2254 ac_lo= ac_hi=
2255 break
2257 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2259 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2260 done
2261 else
2262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2263 /* end confdefs.h. */
2266 main ()
2268 static int test_array [1 - 2 * !(($2) < 0)];
2269 test_array [0] = 0;
2270 return test_array [0];
2273 return 0;
2275 _ACEOF
2276 if ac_fn_c_try_compile "$LINENO"; then :
2277 ac_hi=-1 ac_mid=-1
2278 while :; do
2279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2280 /* end confdefs.h. */
2283 main ()
2285 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2286 test_array [0] = 0;
2287 return test_array [0];
2290 return 0;
2292 _ACEOF
2293 if ac_fn_c_try_compile "$LINENO"; then :
2294 ac_lo=$ac_mid; break
2295 else
2296 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2297 if test $ac_mid -le $ac_hi; then
2298 ac_lo= ac_hi=
2299 break
2301 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2304 done
2305 else
2306 ac_lo= ac_hi=
2308 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2310 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2311 # Binary search between lo and hi bounds.
2312 while test "x$ac_lo" != "x$ac_hi"; do
2313 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2315 /* end confdefs.h. */
2318 main ()
2320 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2321 test_array [0] = 0;
2322 return test_array [0];
2325 return 0;
2327 _ACEOF
2328 if ac_fn_c_try_compile "$LINENO"; then :
2329 ac_hi=$ac_mid
2330 else
2331 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2334 done
2335 case $ac_lo in #((
2336 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2337 '') ac_retval=1 ;;
2338 esac
2339 else
2340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2341 /* end confdefs.h. */
2343 static long int longval () { return $2; }
2344 static unsigned long int ulongval () { return $2; }
2345 #include <stdio.h>
2346 #include <stdlib.h>
2348 main ()
2351 FILE *f = fopen ("conftest.val", "w");
2352 if (! f)
2353 return 1;
2354 if (($2) < 0)
2356 long int i = longval ();
2357 if (i != ($2))
2358 return 1;
2359 fprintf (f, "%ld", i);
2361 else
2363 unsigned long int i = ulongval ();
2364 if (i != ($2))
2365 return 1;
2366 fprintf (f, "%lu", i);
2368 /* Do not output a trailing newline, as this causes \r\n confusion
2369 on some platforms. */
2370 return ferror (f) || fclose (f) != 0;
2373 return 0;
2375 _ACEOF
2376 if ac_fn_c_try_run "$LINENO"; then :
2377 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2378 else
2379 ac_retval=1
2381 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2382 conftest.$ac_objext conftest.beam conftest.$ac_ext
2383 rm -f conftest.val
2386 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2387 as_fn_set_status $ac_retval
2389 } # ac_fn_c_compute_int
2391 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2392 # ---------------------------------------------
2393 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2394 # accordingly.
2395 ac_fn_c_check_decl ()
2397 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2398 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2399 as_decl_name=`echo $2|sed 's/ *(.*//'`
2400 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2402 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2403 if eval \${$3+:} false; then :
2404 $as_echo_n "(cached) " >&6
2405 else
2406 ac_save_werror_flag=$ac_c_werror_flag
2407 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2409 /* end confdefs.h. */
2412 main ()
2414 #ifndef $as_decl_name
2415 #ifdef __cplusplus
2416 (void) $as_decl_use;
2417 #else
2418 (void) $as_decl_name;
2419 #endif
2420 #endif
2423 return 0;
2425 _ACEOF
2426 if ac_fn_c_try_compile "$LINENO"; then :
2427 eval "$3=yes"
2428 else
2429 eval "$3=no"
2431 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2432 ac_c_werror_flag=$ac_save_werror_flag
2434 eval ac_res=\$$3
2435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2436 $as_echo "$ac_res" >&6; }
2437 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2439 } # ac_fn_c_check_decl
2440 cat >config.log <<_ACEOF
2441 This file contains any messages produced by compilers while
2442 running configure, to aid debugging if configure makes a mistake.
2444 It was created by PostgreSQL $as_me 16.5, which was
2445 generated by GNU Autoconf 2.69. Invocation command line was
2447 $ $0 $@
2449 _ACEOF
2450 exec 5>>config.log
2452 cat <<_ASUNAME
2453 ## --------- ##
2454 ## Platform. ##
2455 ## --------- ##
2457 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2458 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2459 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2460 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2461 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2463 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2464 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2466 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2467 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2468 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2469 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2470 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2471 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2472 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2474 _ASUNAME
2476 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2477 for as_dir in $PATH
2479 IFS=$as_save_IFS
2480 test -z "$as_dir" && as_dir=.
2481 $as_echo "PATH: $as_dir"
2482 done
2483 IFS=$as_save_IFS
2485 } >&5
2487 cat >&5 <<_ACEOF
2490 ## ----------- ##
2491 ## Core tests. ##
2492 ## ----------- ##
2494 _ACEOF
2497 # Keep a trace of the command line.
2498 # Strip out --no-create and --no-recursion so they do not pile up.
2499 # Strip out --silent because we don't want to record it for future runs.
2500 # Also quote any args containing shell meta-characters.
2501 # Make two passes to allow for proper duplicate-argument suppression.
2502 ac_configure_args=
2503 ac_configure_args0=
2504 ac_configure_args1=
2505 ac_must_keep_next=false
2506 for ac_pass in 1 2
2508 for ac_arg
2510 case $ac_arg in
2511 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2512 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2513 | -silent | --silent | --silen | --sile | --sil)
2514 continue ;;
2515 *\'*)
2516 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2517 esac
2518 case $ac_pass in
2519 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2521 as_fn_append ac_configure_args1 " '$ac_arg'"
2522 if test $ac_must_keep_next = true; then
2523 ac_must_keep_next=false # Got value, back to normal.
2524 else
2525 case $ac_arg in
2526 *=* | --config-cache | -C | -disable-* | --disable-* \
2527 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2528 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2529 | -with-* | --with-* | -without-* | --without-* | --x)
2530 case "$ac_configure_args0 " in
2531 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2532 esac
2534 -* ) ac_must_keep_next=true ;;
2535 esac
2537 as_fn_append ac_configure_args " '$ac_arg'"
2539 esac
2540 done
2541 done
2542 { ac_configure_args0=; unset ac_configure_args0;}
2543 { ac_configure_args1=; unset ac_configure_args1;}
2545 # When interrupted or exit'd, cleanup temporary files, and complete
2546 # config.log. We remove comments because anyway the quotes in there
2547 # would cause problems or look ugly.
2548 # WARNING: Use '\'' to represent an apostrophe within the trap.
2549 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2550 trap 'exit_status=$?
2551 # Save into config.log some information that might help in debugging.
2553 echo
2555 $as_echo "## ---------------- ##
2556 ## Cache variables. ##
2557 ## ---------------- ##"
2558 echo
2559 # The following way of writing the cache mishandles newlines in values,
2561 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2562 eval ac_val=\$$ac_var
2563 case $ac_val in #(
2564 *${as_nl}*)
2565 case $ac_var in #(
2566 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2567 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2568 esac
2569 case $ac_var in #(
2570 _ | IFS | as_nl) ;; #(
2571 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2572 *) { eval $ac_var=; unset $ac_var;} ;;
2573 esac ;;
2574 esac
2575 done
2576 (set) 2>&1 |
2577 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2578 *${as_nl}ac_space=\ *)
2579 sed -n \
2580 "s/'\''/'\''\\\\'\'''\''/g;
2581 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2582 ;; #(
2584 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2586 esac |
2587 sort
2589 echo
2591 $as_echo "## ----------------- ##
2592 ## Output variables. ##
2593 ## ----------------- ##"
2594 echo
2595 for ac_var in $ac_subst_vars
2597 eval ac_val=\$$ac_var
2598 case $ac_val in
2599 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2600 esac
2601 $as_echo "$ac_var='\''$ac_val'\''"
2602 done | sort
2603 echo
2605 if test -n "$ac_subst_files"; then
2606 $as_echo "## ------------------- ##
2607 ## File substitutions. ##
2608 ## ------------------- ##"
2609 echo
2610 for ac_var in $ac_subst_files
2612 eval ac_val=\$$ac_var
2613 case $ac_val in
2614 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2615 esac
2616 $as_echo "$ac_var='\''$ac_val'\''"
2617 done | sort
2618 echo
2621 if test -s confdefs.h; then
2622 $as_echo "## ----------- ##
2623 ## confdefs.h. ##
2624 ## ----------- ##"
2625 echo
2626 cat confdefs.h
2627 echo
2629 test "$ac_signal" != 0 &&
2630 $as_echo "$as_me: caught signal $ac_signal"
2631 $as_echo "$as_me: exit $exit_status"
2632 } >&5
2633 rm -f core *.core core.conftest.* &&
2634 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2635 exit $exit_status
2637 for ac_signal in 1 2 13 15; do
2638 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2639 done
2640 ac_signal=0
2642 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2643 rm -f -r conftest* confdefs.h
2645 $as_echo "/* confdefs.h */" > confdefs.h
2647 # Predefined preprocessor variables.
2649 cat >>confdefs.h <<_ACEOF
2650 #define PACKAGE_NAME "$PACKAGE_NAME"
2651 _ACEOF
2653 cat >>confdefs.h <<_ACEOF
2654 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2655 _ACEOF
2657 cat >>confdefs.h <<_ACEOF
2658 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2659 _ACEOF
2661 cat >>confdefs.h <<_ACEOF
2662 #define PACKAGE_STRING "$PACKAGE_STRING"
2663 _ACEOF
2665 cat >>confdefs.h <<_ACEOF
2666 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2667 _ACEOF
2669 cat >>confdefs.h <<_ACEOF
2670 #define PACKAGE_URL "$PACKAGE_URL"
2671 _ACEOF
2674 # Let the site file select an alternate cache file if it wants to.
2675 # Prefer an explicitly selected file to automatically selected ones.
2676 ac_site_file1=NONE
2677 ac_site_file2=NONE
2678 if test -n "$CONFIG_SITE"; then
2679 # We do not want a PATH search for config.site.
2680 case $CONFIG_SITE in #((
2681 -*) ac_site_file1=./$CONFIG_SITE;;
2682 */*) ac_site_file1=$CONFIG_SITE;;
2683 *) ac_site_file1=./$CONFIG_SITE;;
2684 esac
2685 elif test "x$prefix" != xNONE; then
2686 ac_site_file1=$prefix/share/config.site
2687 ac_site_file2=$prefix/etc/config.site
2688 else
2689 ac_site_file1=$ac_default_prefix/share/config.site
2690 ac_site_file2=$ac_default_prefix/etc/config.site
2692 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2694 test "x$ac_site_file" = xNONE && continue
2695 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2696 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2697 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2698 sed 's/^/| /' "$ac_site_file" >&5
2699 . "$ac_site_file" \
2700 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2701 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2702 as_fn_error $? "failed to load site script $ac_site_file
2703 See \`config.log' for more details" "$LINENO" 5; }
2705 done
2707 if test -r "$cache_file"; then
2708 # Some versions of bash will fail to source /dev/null (special files
2709 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2710 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2711 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2712 $as_echo "$as_me: loading cache $cache_file" >&6;}
2713 case $cache_file in
2714 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2715 *) . "./$cache_file";;
2716 esac
2718 else
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2720 $as_echo "$as_me: creating cache $cache_file" >&6;}
2721 >$cache_file
2724 # Check that the precious variables saved in the cache have kept the same
2725 # value.
2726 ac_cache_corrupted=false
2727 for ac_var in $ac_precious_vars; do
2728 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2729 eval ac_new_set=\$ac_env_${ac_var}_set
2730 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2731 eval ac_new_val=\$ac_env_${ac_var}_value
2732 case $ac_old_set,$ac_new_set in
2733 set,)
2734 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2735 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2736 ac_cache_corrupted=: ;;
2737 ,set)
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2739 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2740 ac_cache_corrupted=: ;;
2741 ,);;
2743 if test "x$ac_old_val" != "x$ac_new_val"; then
2744 # differences in whitespace do not lead to failure.
2745 ac_old_val_w=`echo x $ac_old_val`
2746 ac_new_val_w=`echo x $ac_new_val`
2747 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2749 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2750 ac_cache_corrupted=:
2751 else
2752 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2753 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2754 eval $ac_var=\$ac_old_val
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2757 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2758 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2759 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2760 fi;;
2761 esac
2762 # Pass precious variables to config.status.
2763 if test "$ac_new_set" = set; then
2764 case $ac_new_val in
2765 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2766 *) ac_arg=$ac_var=$ac_new_val ;;
2767 esac
2768 case " $ac_configure_args " in
2769 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2770 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2771 esac
2773 done
2774 if $ac_cache_corrupted; then
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2776 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2778 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2779 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2781 ## -------------------- ##
2782 ## Main body of script. ##
2783 ## -------------------- ##
2785 ac_ext=c
2786 ac_cpp='$CPP $CPPFLAGS'
2787 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2788 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2789 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2796 ac_aux_dir=
2797 for ac_dir in config "$srcdir"/config; do
2798 if test -f "$ac_dir/install-sh"; then
2799 ac_aux_dir=$ac_dir
2800 ac_install_sh="$ac_aux_dir/install-sh -c"
2801 break
2802 elif test -f "$ac_dir/install.sh"; then
2803 ac_aux_dir=$ac_dir
2804 ac_install_sh="$ac_aux_dir/install.sh -c"
2805 break
2806 elif test -f "$ac_dir/shtool"; then
2807 ac_aux_dir=$ac_dir
2808 ac_install_sh="$ac_aux_dir/shtool install -c"
2809 break
2811 done
2812 if test -z "$ac_aux_dir"; then
2813 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2816 # These three variables are undocumented and unsupported,
2817 # and are intended to be withdrawn in a future Autoconf release.
2818 # They can cause serious problems if a builder's source tree is in a directory
2819 # whose full name contains unusual characters.
2820 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2821 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2822 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2827 cat >>confdefs.h <<_ACEOF
2828 #define CONFIGURE_ARGS "$ac_configure_args"
2829 _ACEOF
2832 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2833 PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`
2834 test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
2837 cat >>confdefs.h <<_ACEOF
2838 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2839 _ACEOF
2842 cat >>confdefs.h <<_ACEOF
2843 #define PG_MAJORVERSION_NUM $PG_MAJORVERSION
2844 _ACEOF
2847 cat >>confdefs.h <<_ACEOF
2848 #define PG_MINORVERSION_NUM $PG_MINORVERSION
2849 _ACEOF
2855 # Check whether --with-extra-version was given.
2856 if test "${with_extra_version+set}" = set; then :
2857 withval=$with_extra_version;
2858 case $withval in
2859 yes)
2860 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2863 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2866 PG_VERSION="$PACKAGE_VERSION$withval"
2868 esac
2870 else
2871 PG_VERSION="$PACKAGE_VERSION"
2876 cat >>confdefs.h <<_ACEOF
2877 #define PG_VERSION "$PG_VERSION"
2878 _ACEOF
2881 # Make sure we can run config.sub.
2882 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2883 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2886 $as_echo_n "checking build system type... " >&6; }
2887 if ${ac_cv_build+:} false; then :
2888 $as_echo_n "(cached) " >&6
2889 else
2890 ac_build_alias=$build_alias
2891 test "x$ac_build_alias" = x &&
2892 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2893 test "x$ac_build_alias" = x &&
2894 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2895 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2896 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2900 $as_echo "$ac_cv_build" >&6; }
2901 case $ac_cv_build in
2902 *-*-*) ;;
2903 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2904 esac
2905 build=$ac_cv_build
2906 ac_save_IFS=$IFS; IFS='-'
2907 set x $ac_cv_build
2908 shift
2909 build_cpu=$1
2910 build_vendor=$2
2911 shift; shift
2912 # Remember, the first character of IFS is used to create $*,
2913 # except with old shells:
2914 build_os=$*
2915 IFS=$ac_save_IFS
2916 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2920 $as_echo_n "checking host system type... " >&6; }
2921 if ${ac_cv_host+:} false; then :
2922 $as_echo_n "(cached) " >&6
2923 else
2924 if test "x$host_alias" = x; then
2925 ac_cv_host=$ac_cv_build
2926 else
2927 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2928 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2933 $as_echo "$ac_cv_host" >&6; }
2934 case $ac_cv_host in
2935 *-*-*) ;;
2936 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2937 esac
2938 host=$ac_cv_host
2939 ac_save_IFS=$IFS; IFS='-'
2940 set x $ac_cv_host
2941 shift
2942 host_cpu=$1
2943 host_vendor=$2
2944 shift; shift
2945 # Remember, the first character of IFS is used to create $*,
2946 # except with old shells:
2947 host_os=$*
2948 IFS=$ac_save_IFS
2949 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2953 template=
2954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2955 $as_echo_n "checking which template to use... " >&6; }
2960 # Check whether --with-template was given.
2961 if test "${with_template+set}" = set; then :
2962 withval=$with_template;
2963 case $withval in
2964 yes)
2965 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2968 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2972 case $withval in
2973 list) echo; ls "$srcdir/src/template"; exit;;
2974 *) if test -f "$srcdir/src/template/$with_template" ; then
2975 template=$withval
2976 else
2977 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2978 fi;;
2979 esac
2982 esac
2984 else
2986 # --with-template not given
2988 case $host_os in
2989 aix*) template=aix ;;
2990 cygwin*|msys*) template=cygwin ;;
2991 darwin*) template=darwin ;;
2992 dragonfly*) template=netbsd ;;
2993 freebsd*) template=freebsd ;;
2994 linux*|gnu*|k*bsd*-gnu)
2995 template=linux ;;
2996 mingw*) template=win32 ;;
2997 netbsd*) template=netbsd ;;
2998 openbsd*) template=openbsd ;;
2999 solaris*) template=solaris ;;
3000 esac
3002 if test x"$template" = x"" ; then
3003 as_fn_error $? "
3004 *******************************************************************
3005 PostgreSQL has apparently not been ported to your platform yet.
3006 To try a manual configuration, look into the src/template directory
3007 for a similar platform and use the '--with-template=' option.
3009 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
3010 rectifying this. Include the above 'checking host system type...'
3011 line.
3012 *******************************************************************
3013 " "$LINENO" 5
3021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
3022 $as_echo "$template" >&6; }
3024 PORTNAME=$template
3027 # Initialize default assumption that we do not need separate assembly code
3028 # for TAS (test-and-set). This can be overridden by the template file
3029 # when it's executed.
3030 need_tas=no
3031 tas_file=dummy.s
3033 # Default, works for most platforms, override in template file if needed
3034 DLSUFFIX=".so"
3039 ## Command line options
3043 # Add non-standard directories to the include path
3048 # Check whether --with-includes was given.
3049 if test "${with_includes+set}" = set; then :
3050 withval=$with_includes;
3051 case $withval in
3052 yes)
3053 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3056 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3061 esac
3069 # Add non-standard directories to the library search path
3074 # Check whether --with-libraries was given.
3075 if test "${with_libraries+set}" = set; then :
3076 withval=$with_libraries;
3077 case $withval in
3078 yes)
3079 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3082 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3085 LIBRARY_DIRS=$withval
3087 esac
3096 # Check whether --with-libs was given.
3097 if test "${with_libs+set}" = set; then :
3098 withval=$with_libs;
3099 case $withval in
3100 yes)
3101 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3104 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3107 LIBRARY_DIRS=$withval
3109 esac
3117 # 64-bit integer date/time storage is now the only option, but to avoid
3118 # unnecessary breakage of build scripts, continue to accept an explicit
3119 # "--enable-integer-datetimes" switch.
3123 # Check whether --enable-integer-datetimes was given.
3124 if test "${enable_integer_datetimes+set}" = set; then :
3125 enableval=$enable_integer_datetimes;
3126 case $enableval in
3127 yes)
3131 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3134 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3136 esac
3138 else
3139 enable_integer_datetimes=yes
3147 # NLS
3149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3150 $as_echo_n "checking whether NLS is wanted... " >&6; }
3153 # Check whether --enable-nls was given.
3154 if test "${enable_nls+set}" = set; then :
3155 enableval=$enable_nls;
3156 case $enableval in
3157 yes)
3164 enable_nls=yes
3165 WANTED_LANGUAGES=$enableval
3167 esac
3169 else
3170 enable_nls=no
3175 if test "$enable_nls" = yes; then
3177 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3182 $as_echo "$enable_nls" >&6; }
3187 # Default port number (--with-pgport), default 5432
3189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3190 $as_echo_n "checking for default port number... " >&6; }
3194 # Check whether --with-pgport was given.
3195 if test "${with_pgport+set}" = set; then :
3196 withval=$with_pgport;
3197 case $withval in
3198 yes)
3199 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3202 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3205 default_port=$withval
3207 esac
3209 else
3210 default_port=5432
3214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3215 $as_echo "$default_port" >&6; }
3216 # Need both of these because some places want an integer and some a string
3218 cat >>confdefs.h <<_ACEOF
3219 #define DEF_PGPORT ${default_port}
3220 _ACEOF
3223 cat >>confdefs.h <<_ACEOF
3224 #define DEF_PGPORT_STR "${default_port}"
3225 _ACEOF
3229 # It's worth validating port; you can get very confusing errors otherwise
3230 if test x"$default_port" = x""; then
3231 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3232 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3233 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3234 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3235 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3236 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3237 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3241 # '-rpath'-like feature can be disabled
3245 # Check whether --enable-rpath was given.
3246 if test "${enable_rpath+set}" = set; then :
3247 enableval=$enable_rpath;
3248 case $enableval in
3249 yes)
3256 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3258 esac
3260 else
3261 enable_rpath=yes
3269 # Spinlocks
3273 # Check whether --enable-spinlocks was given.
3274 if test "${enable_spinlocks+set}" = set; then :
3275 enableval=$enable_spinlocks;
3276 case $enableval in
3277 yes)
3284 as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3286 esac
3288 else
3289 enable_spinlocks=yes
3296 # Atomic operations
3300 # Check whether --enable-atomics was given.
3301 if test "${enable_atomics+set}" = set; then :
3302 enableval=$enable_atomics;
3303 case $enableval in
3304 yes)
3311 as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3313 esac
3315 else
3316 enable_atomics=yes
3323 # --enable-debug adds -g to compiler flags
3327 # Check whether --enable-debug was given.
3328 if test "${enable_debug+set}" = set; then :
3329 enableval=$enable_debug;
3330 case $enableval in
3331 yes)
3338 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3340 esac
3342 else
3343 enable_debug=no
3351 # --enable-profiling enables gcc profiling
3355 # Check whether --enable-profiling was given.
3356 if test "${enable_profiling+set}" = set; then :
3357 enableval=$enable_profiling;
3358 case $enableval in
3359 yes)
3366 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3368 esac
3370 else
3371 enable_profiling=no
3378 # --enable-coverage enables generation of code coverage metrics with gcov
3382 # Check whether --enable-coverage was given.
3383 if test "${enable_coverage+set}" = set; then :
3384 enableval=$enable_coverage;
3385 case $enableval in
3386 yes)
3387 if test -z "$GCOV"; then
3388 for ac_prog in gcov
3390 # Extract the first word of "$ac_prog", so it can be a program name with args.
3391 set dummy $ac_prog; ac_word=$2
3392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3393 $as_echo_n "checking for $ac_word... " >&6; }
3394 if ${ac_cv_path_GCOV+:} false; then :
3395 $as_echo_n "(cached) " >&6
3396 else
3397 case $GCOV in
3398 [\\/]* | ?:[\\/]*)
3399 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3403 for as_dir in $PATH
3405 IFS=$as_save_IFS
3406 test -z "$as_dir" && as_dir=.
3407 for ac_exec_ext in '' $ac_executable_extensions; do
3408 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3409 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3410 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3411 break 2
3413 done
3414 done
3415 IFS=$as_save_IFS
3418 esac
3420 GCOV=$ac_cv_path_GCOV
3421 if test -n "$GCOV"; then
3422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3423 $as_echo "$GCOV" >&6; }
3424 else
3425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3426 $as_echo "no" >&6; }
3430 test -n "$GCOV" && break
3431 done
3433 else
3434 # Report the value of GCOV in configure's output in all cases.
3435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3436 $as_echo_n "checking for GCOV... " >&6; }
3437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3438 $as_echo "$GCOV" >&6; }
3441 if test -z "$GCOV"; then
3442 as_fn_error $? "gcov not found" "$LINENO" 5
3444 if test -z "$LCOV"; then
3445 for ac_prog in lcov
3447 # Extract the first word of "$ac_prog", so it can be a program name with args.
3448 set dummy $ac_prog; ac_word=$2
3449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3450 $as_echo_n "checking for $ac_word... " >&6; }
3451 if ${ac_cv_path_LCOV+:} false; then :
3452 $as_echo_n "(cached) " >&6
3453 else
3454 case $LCOV in
3455 [\\/]* | ?:[\\/]*)
3456 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3459 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3460 for as_dir in $PATH
3462 IFS=$as_save_IFS
3463 test -z "$as_dir" && as_dir=.
3464 for ac_exec_ext in '' $ac_executable_extensions; do
3465 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3466 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3467 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3468 break 2
3470 done
3471 done
3472 IFS=$as_save_IFS
3475 esac
3477 LCOV=$ac_cv_path_LCOV
3478 if test -n "$LCOV"; then
3479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3480 $as_echo "$LCOV" >&6; }
3481 else
3482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3483 $as_echo "no" >&6; }
3487 test -n "$LCOV" && break
3488 done
3490 else
3491 # Report the value of LCOV in configure's output in all cases.
3492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3493 $as_echo_n "checking for LCOV... " >&6; }
3494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3495 $as_echo "$LCOV" >&6; }
3498 if test -z "$LCOV"; then
3499 as_fn_error $? "lcov not found" "$LINENO" 5
3501 if test -z "$GENHTML"; then
3502 for ac_prog in genhtml
3504 # Extract the first word of "$ac_prog", so it can be a program name with args.
3505 set dummy $ac_prog; ac_word=$2
3506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3507 $as_echo_n "checking for $ac_word... " >&6; }
3508 if ${ac_cv_path_GENHTML+:} false; then :
3509 $as_echo_n "(cached) " >&6
3510 else
3511 case $GENHTML in
3512 [\\/]* | ?:[\\/]*)
3513 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3517 for as_dir in $PATH
3519 IFS=$as_save_IFS
3520 test -z "$as_dir" && as_dir=.
3521 for ac_exec_ext in '' $ac_executable_extensions; do
3522 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3523 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3524 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3525 break 2
3527 done
3528 done
3529 IFS=$as_save_IFS
3532 esac
3534 GENHTML=$ac_cv_path_GENHTML
3535 if test -n "$GENHTML"; then
3536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3537 $as_echo "$GENHTML" >&6; }
3538 else
3539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3540 $as_echo "no" >&6; }
3544 test -n "$GENHTML" && break
3545 done
3547 else
3548 # Report the value of GENHTML in configure's output in all cases.
3549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3550 $as_echo_n "checking for GENHTML... " >&6; }
3551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3552 $as_echo "$GENHTML" >&6; }
3555 if test -z "$GENHTML"; then
3556 as_fn_error $? "genhtml not found" "$LINENO" 5
3563 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3565 esac
3567 else
3568 enable_coverage=no
3576 # DTrace
3580 # Check whether --enable-dtrace was given.
3581 if test "${enable_dtrace+set}" = set; then :
3582 enableval=$enable_dtrace;
3583 case $enableval in
3584 yes)
3585 if test -z "$DTRACE"; then
3586 for ac_prog in dtrace
3588 # Extract the first word of "$ac_prog", so it can be a program name with args.
3589 set dummy $ac_prog; ac_word=$2
3590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3591 $as_echo_n "checking for $ac_word... " >&6; }
3592 if ${ac_cv_path_DTRACE+:} false; then :
3593 $as_echo_n "(cached) " >&6
3594 else
3595 case $DTRACE in
3596 [\\/]* | ?:[\\/]*)
3597 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3600 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3601 for as_dir in $PATH
3603 IFS=$as_save_IFS
3604 test -z "$as_dir" && as_dir=.
3605 for ac_exec_ext in '' $ac_executable_extensions; do
3606 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3607 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3608 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3609 break 2
3611 done
3612 done
3613 IFS=$as_save_IFS
3616 esac
3618 DTRACE=$ac_cv_path_DTRACE
3619 if test -n "$DTRACE"; then
3620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3621 $as_echo "$DTRACE" >&6; }
3622 else
3623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3624 $as_echo "no" >&6; }
3628 test -n "$DTRACE" && break
3629 done
3631 else
3632 # Report the value of DTRACE in configure's output in all cases.
3633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3634 $as_echo_n "checking for DTRACE... " >&6; }
3635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3636 $as_echo "$DTRACE" >&6; }
3639 if test -z "$DTRACE"; then
3640 as_fn_error $? "dtrace not found" "$LINENO" 5
3648 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3650 esac
3652 else
3653 enable_dtrace=no
3661 # TAP tests
3665 # Check whether --enable-tap-tests was given.
3666 if test "${enable_tap_tests+set}" = set; then :
3667 enableval=$enable_tap_tests;
3668 case $enableval in
3669 yes)
3676 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3678 esac
3680 else
3681 enable_tap_tests=no
3689 # Block size
3691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3692 $as_echo_n "checking for block size... " >&6; }
3696 # Check whether --with-blocksize was given.
3697 if test "${with_blocksize+set}" = set; then :
3698 withval=$with_blocksize;
3699 case $withval in
3700 yes)
3701 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3704 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3707 blocksize=$withval
3709 esac
3711 else
3712 blocksize=8
3716 case ${blocksize} in
3717 1) BLCKSZ=1024;;
3718 2) BLCKSZ=2048;;
3719 4) BLCKSZ=4096;;
3720 8) BLCKSZ=8192;;
3721 16) BLCKSZ=16384;;
3722 32) BLCKSZ=32768;;
3723 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3724 esac
3725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3726 $as_echo "${blocksize}kB" >&6; }
3729 cat >>confdefs.h <<_ACEOF
3730 #define BLCKSZ ${BLCKSZ}
3731 _ACEOF
3735 # Relation segment size
3740 # Check whether --with-segsize was given.
3741 if test "${with_segsize+set}" = set; then :
3742 withval=$with_segsize;
3743 case $withval in
3744 yes)
3745 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3748 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3751 segsize=$withval
3753 esac
3755 else
3756 segsize=1
3763 # Check whether --with-segsize-blocks was given.
3764 if test "${with_segsize_blocks+set}" = set; then :
3765 withval=$with_segsize_blocks;
3766 case $withval in
3767 yes)
3768 as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3771 as_fn_error $? "argument required for --with-segsize-blocks option" "$LINENO" 5
3774 segsize_blocks=$withval
3776 esac
3778 else
3779 segsize_blocks=0
3784 # If --with-segsize-blocks is non-zero, it is used, --with-segsize
3785 # otherwise. segsize-blocks is only really useful for developers wanting to
3786 # test segment related code. Warn if both are used.
3787 if test $segsize_blocks -ne 0 -a $segsize -ne 1; then
3788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&5
3789 $as_echo "$as_me: WARNING: both --with-segsize and --with-segsize-blocks specified, --with-segsize-blocks wins" >&2;}
3792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3793 $as_echo_n "checking for segment size... " >&6; }
3794 if test $segsize_blocks -eq 0; then
3795 # this expression is set up to avoid unnecessary integer overflow
3796 # blocksize is already guaranteed to be a factor of 1024
3797 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3798 test $? -eq 0 || exit 1
3799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3800 $as_echo "${segsize}GB" >&6; }
3801 else
3802 RELSEG_SIZE=$segsize_blocks
3803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${RELSEG_SIZE} blocks" >&5
3804 $as_echo "${RELSEG_SIZE} blocks" >&6; }
3808 cat >>confdefs.h <<_ACEOF
3809 #define RELSEG_SIZE ${RELSEG_SIZE}
3810 _ACEOF
3814 # WAL block size
3816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3817 $as_echo_n "checking for WAL block size... " >&6; }
3821 # Check whether --with-wal-blocksize was given.
3822 if test "${with_wal_blocksize+set}" = set; then :
3823 withval=$with_wal_blocksize;
3824 case $withval in
3825 yes)
3826 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3829 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3832 wal_blocksize=$withval
3834 esac
3836 else
3837 wal_blocksize=8
3841 case ${wal_blocksize} in
3842 1) XLOG_BLCKSZ=1024;;
3843 2) XLOG_BLCKSZ=2048;;
3844 4) XLOG_BLCKSZ=4096;;
3845 8) XLOG_BLCKSZ=8192;;
3846 16) XLOG_BLCKSZ=16384;;
3847 32) XLOG_BLCKSZ=32768;;
3848 64) XLOG_BLCKSZ=65536;;
3849 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3850 esac
3851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3852 $as_echo "${wal_blocksize}kB" >&6; }
3855 cat >>confdefs.h <<_ACEOF
3856 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3857 _ACEOF
3861 # C compiler
3864 # For historical reasons you can also use --with-CC to specify the C compiler
3865 # to use, although the standard way to do this is to set the CC environment
3866 # variable.
3870 # Check whether --with-CC was given.
3871 if test "${with_CC+set}" = set; then :
3872 withval=$with_CC;
3873 case $withval in
3874 yes)
3875 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3878 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3881 CC=$with_CC
3883 esac
3889 case $template in
3890 aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3891 *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3892 esac
3894 ac_ext=c
3895 ac_cpp='$CPP $CPPFLAGS'
3896 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3897 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3898 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3899 if test -n "$ac_tool_prefix"; then
3900 for ac_prog in $pgac_cc_list
3902 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3903 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3905 $as_echo_n "checking for $ac_word... " >&6; }
3906 if ${ac_cv_prog_CC+:} false; then :
3907 $as_echo_n "(cached) " >&6
3908 else
3909 if test -n "$CC"; then
3910 ac_cv_prog_CC="$CC" # Let the user override the test.
3911 else
3912 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3913 for as_dir in $PATH
3915 IFS=$as_save_IFS
3916 test -z "$as_dir" && as_dir=.
3917 for ac_exec_ext in '' $ac_executable_extensions; do
3918 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3919 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3920 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3921 break 2
3923 done
3924 done
3925 IFS=$as_save_IFS
3929 CC=$ac_cv_prog_CC
3930 if test -n "$CC"; then
3931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3932 $as_echo "$CC" >&6; }
3933 else
3934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3935 $as_echo "no" >&6; }
3939 test -n "$CC" && break
3940 done
3942 if test -z "$CC"; then
3943 ac_ct_CC=$CC
3944 for ac_prog in $pgac_cc_list
3946 # Extract the first word of "$ac_prog", so it can be a program name with args.
3947 set dummy $ac_prog; ac_word=$2
3948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3949 $as_echo_n "checking for $ac_word... " >&6; }
3950 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3951 $as_echo_n "(cached) " >&6
3952 else
3953 if test -n "$ac_ct_CC"; then
3954 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3955 else
3956 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3957 for as_dir in $PATH
3959 IFS=$as_save_IFS
3960 test -z "$as_dir" && as_dir=.
3961 for ac_exec_ext in '' $ac_executable_extensions; do
3962 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3963 ac_cv_prog_ac_ct_CC="$ac_prog"
3964 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3965 break 2
3967 done
3968 done
3969 IFS=$as_save_IFS
3973 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3974 if test -n "$ac_ct_CC"; then
3975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3976 $as_echo "$ac_ct_CC" >&6; }
3977 else
3978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3979 $as_echo "no" >&6; }
3983 test -n "$ac_ct_CC" && break
3984 done
3986 if test "x$ac_ct_CC" = x; then
3987 CC=""
3988 else
3989 case $cross_compiling:$ac_tool_warned in
3990 yes:)
3991 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3992 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3993 ac_tool_warned=yes ;;
3994 esac
3995 CC=$ac_ct_CC
4000 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4001 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4002 as_fn_error $? "no acceptable C compiler found in \$PATH
4003 See \`config.log' for more details" "$LINENO" 5; }
4005 # Provide some information about the compiler.
4006 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4007 set X $ac_compile
4008 ac_compiler=$2
4009 for ac_option in --version -v -V -qversion; do
4010 { { ac_try="$ac_compiler $ac_option >&5"
4011 case "(($ac_try" in
4012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4013 *) ac_try_echo=$ac_try;;
4014 esac
4015 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4016 $as_echo "$ac_try_echo"; } >&5
4017 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4018 ac_status=$?
4019 if test -s conftest.err; then
4020 sed '10a\
4021 ... rest of stderr output deleted ...
4022 10q' conftest.err >conftest.er1
4023 cat conftest.er1 >&5
4025 rm -f conftest.er1 conftest.err
4026 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4027 test $ac_status = 0; }
4028 done
4030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4031 /* end confdefs.h. */
4034 main ()
4038 return 0;
4040 _ACEOF
4041 ac_clean_files_save=$ac_clean_files
4042 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4043 # Try to create an executable without -o first, disregard a.out.
4044 # It will help us diagnose broken compilers, and finding out an intuition
4045 # of exeext.
4046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4047 $as_echo_n "checking whether the C compiler works... " >&6; }
4048 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4050 # The possible output files:
4051 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4053 ac_rmfiles=
4054 for ac_file in $ac_files
4056 case $ac_file in
4057 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4058 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4059 esac
4060 done
4061 rm -f $ac_rmfiles
4063 if { { ac_try="$ac_link_default"
4064 case "(($ac_try" in
4065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4066 *) ac_try_echo=$ac_try;;
4067 esac
4068 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4069 $as_echo "$ac_try_echo"; } >&5
4070 (eval "$ac_link_default") 2>&5
4071 ac_status=$?
4072 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4073 test $ac_status = 0; }; then :
4074 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4075 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4076 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4077 # so that the user can short-circuit this test for compilers unknown to
4078 # Autoconf.
4079 for ac_file in $ac_files ''
4081 test -f "$ac_file" || continue
4082 case $ac_file in
4083 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4085 [ab].out )
4086 # We found the default executable, but exeext='' is most
4087 # certainly right.
4088 break;;
4089 *.* )
4090 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4091 then :; else
4092 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4094 # We set ac_cv_exeext here because the later test for it is not
4095 # safe: cross compilers may not add the suffix if given an `-o'
4096 # argument, so we may need to know it at that point already.
4097 # Even if this section looks crufty: it has the advantage of
4098 # actually working.
4099 break;;
4101 break;;
4102 esac
4103 done
4104 test "$ac_cv_exeext" = no && ac_cv_exeext=
4106 else
4107 ac_file=''
4109 if test -z "$ac_file"; then :
4110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4111 $as_echo "no" >&6; }
4112 $as_echo "$as_me: failed program was:" >&5
4113 sed 's/^/| /' conftest.$ac_ext >&5
4115 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4116 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4117 as_fn_error 77 "C compiler cannot create executables
4118 See \`config.log' for more details" "$LINENO" 5; }
4119 else
4120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4121 $as_echo "yes" >&6; }
4123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4124 $as_echo_n "checking for C compiler default output file name... " >&6; }
4125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4126 $as_echo "$ac_file" >&6; }
4127 ac_exeext=$ac_cv_exeext
4129 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4130 ac_clean_files=$ac_clean_files_save
4131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4132 $as_echo_n "checking for suffix of executables... " >&6; }
4133 if { { ac_try="$ac_link"
4134 case "(($ac_try" in
4135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4136 *) ac_try_echo=$ac_try;;
4137 esac
4138 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4139 $as_echo "$ac_try_echo"; } >&5
4140 (eval "$ac_link") 2>&5
4141 ac_status=$?
4142 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4143 test $ac_status = 0; }; then :
4144 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4145 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4146 # work properly (i.e., refer to `conftest.exe'), while it won't with
4147 # `rm'.
4148 for ac_file in conftest.exe conftest conftest.*; do
4149 test -f "$ac_file" || continue
4150 case $ac_file in
4151 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4152 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4153 break;;
4154 * ) break;;
4155 esac
4156 done
4157 else
4158 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4159 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4160 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4161 See \`config.log' for more details" "$LINENO" 5; }
4163 rm -f conftest conftest$ac_cv_exeext
4164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4165 $as_echo "$ac_cv_exeext" >&6; }
4167 rm -f conftest.$ac_ext
4168 EXEEXT=$ac_cv_exeext
4169 ac_exeext=$EXEEXT
4170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4171 /* end confdefs.h. */
4172 #include <stdio.h>
4174 main ()
4176 FILE *f = fopen ("conftest.out", "w");
4177 return ferror (f) || fclose (f) != 0;
4180 return 0;
4182 _ACEOF
4183 ac_clean_files="$ac_clean_files conftest.out"
4184 # Check that the compiler produces executables we can run. If not, either
4185 # the compiler is broken, or we cross compile.
4186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4187 $as_echo_n "checking whether we are cross compiling... " >&6; }
4188 if test "$cross_compiling" != yes; then
4189 { { ac_try="$ac_link"
4190 case "(($ac_try" in
4191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4192 *) ac_try_echo=$ac_try;;
4193 esac
4194 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4195 $as_echo "$ac_try_echo"; } >&5
4196 (eval "$ac_link") 2>&5
4197 ac_status=$?
4198 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4199 test $ac_status = 0; }
4200 if { ac_try='./conftest$ac_cv_exeext'
4201 { { case "(($ac_try" in
4202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4203 *) ac_try_echo=$ac_try;;
4204 esac
4205 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4206 $as_echo "$ac_try_echo"; } >&5
4207 (eval "$ac_try") 2>&5
4208 ac_status=$?
4209 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4210 test $ac_status = 0; }; }; then
4211 cross_compiling=no
4212 else
4213 if test "$cross_compiling" = maybe; then
4214 cross_compiling=yes
4215 else
4216 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4217 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4218 as_fn_error $? "cannot run C compiled programs.
4219 If you meant to cross compile, use \`--host'.
4220 See \`config.log' for more details" "$LINENO" 5; }
4224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4225 $as_echo "$cross_compiling" >&6; }
4227 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4228 ac_clean_files=$ac_clean_files_save
4229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4230 $as_echo_n "checking for suffix of object files... " >&6; }
4231 if ${ac_cv_objext+:} false; then :
4232 $as_echo_n "(cached) " >&6
4233 else
4234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4235 /* end confdefs.h. */
4238 main ()
4242 return 0;
4244 _ACEOF
4245 rm -f conftest.o conftest.obj
4246 if { { ac_try="$ac_compile"
4247 case "(($ac_try" in
4248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4249 *) ac_try_echo=$ac_try;;
4250 esac
4251 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4252 $as_echo "$ac_try_echo"; } >&5
4253 (eval "$ac_compile") 2>&5
4254 ac_status=$?
4255 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4256 test $ac_status = 0; }; then :
4257 for ac_file in conftest.o conftest.obj conftest.*; do
4258 test -f "$ac_file" || continue;
4259 case $ac_file in
4260 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4261 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4262 break;;
4263 esac
4264 done
4265 else
4266 $as_echo "$as_me: failed program was:" >&5
4267 sed 's/^/| /' conftest.$ac_ext >&5
4269 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4270 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4271 as_fn_error $? "cannot compute suffix of object files: cannot compile
4272 See \`config.log' for more details" "$LINENO" 5; }
4274 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4277 $as_echo "$ac_cv_objext" >&6; }
4278 OBJEXT=$ac_cv_objext
4279 ac_objext=$OBJEXT
4280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4281 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4282 if ${ac_cv_c_compiler_gnu+:} false; then :
4283 $as_echo_n "(cached) " >&6
4284 else
4285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4286 /* end confdefs.h. */
4289 main ()
4291 #ifndef __GNUC__
4292 choke me
4293 #endif
4296 return 0;
4298 _ACEOF
4299 if ac_fn_c_try_compile "$LINENO"; then :
4300 ac_compiler_gnu=yes
4301 else
4302 ac_compiler_gnu=no
4304 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4305 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4309 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4310 if test $ac_compiler_gnu = yes; then
4311 GCC=yes
4312 else
4313 GCC=
4315 ac_test_CFLAGS=${CFLAGS+set}
4316 ac_save_CFLAGS=$CFLAGS
4317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4318 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4319 if ${ac_cv_prog_cc_g+:} false; then :
4320 $as_echo_n "(cached) " >&6
4321 else
4322 ac_save_c_werror_flag=$ac_c_werror_flag
4323 ac_c_werror_flag=yes
4324 ac_cv_prog_cc_g=no
4325 CFLAGS="-g"
4326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4327 /* end confdefs.h. */
4330 main ()
4334 return 0;
4336 _ACEOF
4337 if ac_fn_c_try_compile "$LINENO"; then :
4338 ac_cv_prog_cc_g=yes
4339 else
4340 CFLAGS=""
4341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4342 /* end confdefs.h. */
4345 main ()
4349 return 0;
4351 _ACEOF
4352 if ac_fn_c_try_compile "$LINENO"; then :
4354 else
4355 ac_c_werror_flag=$ac_save_c_werror_flag
4356 CFLAGS="-g"
4357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4358 /* end confdefs.h. */
4361 main ()
4365 return 0;
4367 _ACEOF
4368 if ac_fn_c_try_compile "$LINENO"; then :
4369 ac_cv_prog_cc_g=yes
4371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4373 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4376 ac_c_werror_flag=$ac_save_c_werror_flag
4378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4379 $as_echo "$ac_cv_prog_cc_g" >&6; }
4380 if test "$ac_test_CFLAGS" = set; then
4381 CFLAGS=$ac_save_CFLAGS
4382 elif test $ac_cv_prog_cc_g = yes; then
4383 if test "$GCC" = yes; then
4384 CFLAGS="-g -O2"
4385 else
4386 CFLAGS="-g"
4388 else
4389 if test "$GCC" = yes; then
4390 CFLAGS="-O2"
4391 else
4392 CFLAGS=
4395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4396 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4397 if ${ac_cv_prog_cc_c89+:} false; then :
4398 $as_echo_n "(cached) " >&6
4399 else
4400 ac_cv_prog_cc_c89=no
4401 ac_save_CC=$CC
4402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4403 /* end confdefs.h. */
4404 #include <stdarg.h>
4405 #include <stdio.h>
4406 struct stat;
4407 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4408 struct buf { int x; };
4409 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4410 static char *e (p, i)
4411 char **p;
4412 int i;
4414 return p[i];
4416 static char *f (char * (*g) (char **, int), char **p, ...)
4418 char *s;
4419 va_list v;
4420 va_start (v,p);
4421 s = g (p, va_arg (v,int));
4422 va_end (v);
4423 return s;
4426 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4427 function prototypes and stuff, but not '\xHH' hex character constants.
4428 These don't provoke an error unfortunately, instead are silently treated
4429 as 'x'. The following induces an error, until -std is added to get
4430 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4431 array size at least. It's necessary to write '\x00'==0 to get something
4432 that's true only with -std. */
4433 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4435 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4436 inside strings and character constants. */
4437 #define FOO(x) 'x'
4438 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4440 int test (int i, double x);
4441 struct s1 {int (*f) (int a);};
4442 struct s2 {int (*f) (double a);};
4443 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4444 int argc;
4445 char **argv;
4447 main ()
4449 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4451 return 0;
4453 _ACEOF
4454 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4455 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4457 CC="$ac_save_CC $ac_arg"
4458 if ac_fn_c_try_compile "$LINENO"; then :
4459 ac_cv_prog_cc_c89=$ac_arg
4461 rm -f core conftest.err conftest.$ac_objext
4462 test "x$ac_cv_prog_cc_c89" != "xno" && break
4463 done
4464 rm -f conftest.$ac_ext
4465 CC=$ac_save_CC
4468 # AC_CACHE_VAL
4469 case "x$ac_cv_prog_cc_c89" in
4471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4472 $as_echo "none needed" >&6; } ;;
4473 xno)
4474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4475 $as_echo "unsupported" >&6; } ;;
4477 CC="$CC $ac_cv_prog_cc_c89"
4478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4479 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4480 esac
4481 if test "x$ac_cv_prog_cc_c89" != xno; then :
4485 ac_ext=c
4486 ac_cpp='$CPP $CPPFLAGS'
4487 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4488 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4489 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4492 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4493 if ${ac_cv_prog_cc_c99+:} false; then :
4494 $as_echo_n "(cached) " >&6
4495 else
4496 ac_cv_prog_cc_c99=no
4497 ac_save_CC=$CC
4498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4499 /* end confdefs.h. */
4500 #include <stdarg.h>
4501 #include <stdbool.h>
4502 #include <stdlib.h>
4503 #include <wchar.h>
4504 #include <stdio.h>
4506 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4507 #define debug(...) fprintf (stderr, __VA_ARGS__)
4508 #define showlist(...) puts (#__VA_ARGS__)
4509 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4510 static void
4511 test_varargs_macros (void)
4513 int x = 1234;
4514 int y = 5678;
4515 debug ("Flag");
4516 debug ("X = %d\n", x);
4517 showlist (The first, second, and third items.);
4518 report (x>y, "x is %d but y is %d", x, y);
4521 // Check long long types.
4522 #define BIG64 18446744073709551615ull
4523 #define BIG32 4294967295ul
4524 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4525 #if !BIG_OK
4526 your preprocessor is broken;
4527 #endif
4528 #if BIG_OK
4529 #else
4530 your preprocessor is broken;
4531 #endif
4532 static long long int bignum = -9223372036854775807LL;
4533 static unsigned long long int ubignum = BIG64;
4535 struct incomplete_array
4537 int datasize;
4538 double data[];
4541 struct named_init {
4542 int number;
4543 const wchar_t *name;
4544 double average;
4547 typedef const char *ccp;
4549 static inline int
4550 test_restrict (ccp restrict text)
4552 // See if C++-style comments work.
4553 // Iterate through items via the restricted pointer.
4554 // Also check for declarations in for loops.
4555 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4556 continue;
4557 return 0;
4560 // Check varargs and va_copy.
4561 static void
4562 test_varargs (const char *format, ...)
4564 va_list args;
4565 va_start (args, format);
4566 va_list args_copy;
4567 va_copy (args_copy, args);
4569 const char *str;
4570 int number;
4571 float fnumber;
4573 while (*format)
4575 switch (*format++)
4577 case 's': // string
4578 str = va_arg (args_copy, const char *);
4579 break;
4580 case 'd': // int
4581 number = va_arg (args_copy, int);
4582 break;
4583 case 'f': // float
4584 fnumber = va_arg (args_copy, double);
4585 break;
4586 default:
4587 break;
4590 va_end (args_copy);
4591 va_end (args);
4595 main ()
4598 // Check bool.
4599 _Bool success = false;
4601 // Check restrict.
4602 if (test_restrict ("String literal") == 0)
4603 success = true;
4604 char *restrict newvar = "Another string";
4606 // Check varargs.
4607 test_varargs ("s, d' f .", "string", 65, 34.234);
4608 test_varargs_macros ();
4610 // Check flexible array members.
4611 struct incomplete_array *ia =
4612 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4613 ia->datasize = 10;
4614 for (int i = 0; i < ia->datasize; ++i)
4615 ia->data[i] = i * 1.234;
4617 // Check named initializers.
4618 struct named_init ni = {
4619 .number = 34,
4620 .name = L"Test wide string",
4621 .average = 543.34343,
4624 ni.number = 58;
4626 int dynamic_array[ni.number];
4627 dynamic_array[ni.number - 1] = 543;
4629 // work around unused variable warnings
4630 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4631 || dynamic_array[ni.number - 1] != 543);
4634 return 0;
4636 _ACEOF
4637 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4639 CC="$ac_save_CC $ac_arg"
4640 if ac_fn_c_try_compile "$LINENO"; then :
4641 ac_cv_prog_cc_c99=$ac_arg
4643 rm -f core conftest.err conftest.$ac_objext
4644 test "x$ac_cv_prog_cc_c99" != "xno" && break
4645 done
4646 rm -f conftest.$ac_ext
4647 CC=$ac_save_CC
4650 # AC_CACHE_VAL
4651 case "x$ac_cv_prog_cc_c99" in
4653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4654 $as_echo "none needed" >&6; } ;;
4655 xno)
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4657 $as_echo "unsupported" >&6; } ;;
4659 CC="$CC $ac_cv_prog_cc_c99"
4660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4661 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4662 esac
4663 if test "x$ac_cv_prog_cc_c99" != xno; then :
4669 # Error out if the compiler does not support C99, as the codebase
4670 # relies on that.
4671 if test "$ac_cv_prog_cc_c99" = no; then
4672 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4675 ac_ext=cpp
4676 ac_cpp='$CXXCPP $CPPFLAGS'
4677 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4678 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4679 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4680 if test -z "$CXX"; then
4681 if test -n "$CCC"; then
4682 CXX=$CCC
4683 else
4684 if test -n "$ac_tool_prefix"; then
4685 for ac_prog in $pgac_cxx_list
4687 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4688 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4690 $as_echo_n "checking for $ac_word... " >&6; }
4691 if ${ac_cv_prog_CXX+:} false; then :
4692 $as_echo_n "(cached) " >&6
4693 else
4694 if test -n "$CXX"; then
4695 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4696 else
4697 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4698 for as_dir in $PATH
4700 IFS=$as_save_IFS
4701 test -z "$as_dir" && as_dir=.
4702 for ac_exec_ext in '' $ac_executable_extensions; do
4703 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4704 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4706 break 2
4708 done
4709 done
4710 IFS=$as_save_IFS
4714 CXX=$ac_cv_prog_CXX
4715 if test -n "$CXX"; then
4716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4717 $as_echo "$CXX" >&6; }
4718 else
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4720 $as_echo "no" >&6; }
4724 test -n "$CXX" && break
4725 done
4727 if test -z "$CXX"; then
4728 ac_ct_CXX=$CXX
4729 for ac_prog in $pgac_cxx_list
4731 # Extract the first word of "$ac_prog", so it can be a program name with args.
4732 set dummy $ac_prog; ac_word=$2
4733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4734 $as_echo_n "checking for $ac_word... " >&6; }
4735 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4736 $as_echo_n "(cached) " >&6
4737 else
4738 if test -n "$ac_ct_CXX"; then
4739 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4740 else
4741 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4742 for as_dir in $PATH
4744 IFS=$as_save_IFS
4745 test -z "$as_dir" && as_dir=.
4746 for ac_exec_ext in '' $ac_executable_extensions; do
4747 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4748 ac_cv_prog_ac_ct_CXX="$ac_prog"
4749 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4750 break 2
4752 done
4753 done
4754 IFS=$as_save_IFS
4758 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4759 if test -n "$ac_ct_CXX"; then
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4761 $as_echo "$ac_ct_CXX" >&6; }
4762 else
4763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4764 $as_echo "no" >&6; }
4768 test -n "$ac_ct_CXX" && break
4769 done
4771 if test "x$ac_ct_CXX" = x; then
4772 CXX="g++"
4773 else
4774 case $cross_compiling:$ac_tool_warned in
4775 yes:)
4776 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4777 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4778 ac_tool_warned=yes ;;
4779 esac
4780 CXX=$ac_ct_CXX
4786 # Provide some information about the compiler.
4787 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4788 set X $ac_compile
4789 ac_compiler=$2
4790 for ac_option in --version -v -V -qversion; do
4791 { { ac_try="$ac_compiler $ac_option >&5"
4792 case "(($ac_try" in
4793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4794 *) ac_try_echo=$ac_try;;
4795 esac
4796 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4797 $as_echo "$ac_try_echo"; } >&5
4798 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4799 ac_status=$?
4800 if test -s conftest.err; then
4801 sed '10a\
4802 ... rest of stderr output deleted ...
4803 10q' conftest.err >conftest.er1
4804 cat conftest.er1 >&5
4806 rm -f conftest.er1 conftest.err
4807 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4808 test $ac_status = 0; }
4809 done
4811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4812 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4813 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4814 $as_echo_n "(cached) " >&6
4815 else
4816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4817 /* end confdefs.h. */
4820 main ()
4822 #ifndef __GNUC__
4823 choke me
4824 #endif
4827 return 0;
4829 _ACEOF
4830 if ac_fn_cxx_try_compile "$LINENO"; then :
4831 ac_compiler_gnu=yes
4832 else
4833 ac_compiler_gnu=no
4835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4836 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4840 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4841 if test $ac_compiler_gnu = yes; then
4842 GXX=yes
4843 else
4844 GXX=
4846 ac_test_CXXFLAGS=${CXXFLAGS+set}
4847 ac_save_CXXFLAGS=$CXXFLAGS
4848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4849 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4850 if ${ac_cv_prog_cxx_g+:} false; then :
4851 $as_echo_n "(cached) " >&6
4852 else
4853 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4854 ac_cxx_werror_flag=yes
4855 ac_cv_prog_cxx_g=no
4856 CXXFLAGS="-g"
4857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4858 /* end confdefs.h. */
4861 main ()
4865 return 0;
4867 _ACEOF
4868 if ac_fn_cxx_try_compile "$LINENO"; then :
4869 ac_cv_prog_cxx_g=yes
4870 else
4871 CXXFLAGS=""
4872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4873 /* end confdefs.h. */
4876 main ()
4880 return 0;
4882 _ACEOF
4883 if ac_fn_cxx_try_compile "$LINENO"; then :
4885 else
4886 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4887 CXXFLAGS="-g"
4888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4889 /* end confdefs.h. */
4892 main ()
4896 return 0;
4898 _ACEOF
4899 if ac_fn_cxx_try_compile "$LINENO"; then :
4900 ac_cv_prog_cxx_g=yes
4902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4904 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4907 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4910 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4911 if test "$ac_test_CXXFLAGS" = set; then
4912 CXXFLAGS=$ac_save_CXXFLAGS
4913 elif test $ac_cv_prog_cxx_g = yes; then
4914 if test "$GXX" = yes; then
4915 CXXFLAGS="-g -O2"
4916 else
4917 CXXFLAGS="-g"
4919 else
4920 if test "$GXX" = yes; then
4921 CXXFLAGS="-O2"
4922 else
4923 CXXFLAGS=
4926 ac_ext=c
4927 ac_cpp='$CPP $CPPFLAGS'
4928 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4929 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4930 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4933 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4934 # but has idiosyncrasies of its own. We assume icc will define
4935 # __INTEL_COMPILER regardless of CFLAGS.
4937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4938 /* end confdefs.h. */
4941 main ()
4943 #ifndef __INTEL_COMPILER
4944 choke me
4945 #endif
4947 return 0;
4949 _ACEOF
4950 if ac_fn_c_try_compile "$LINENO"; then :
4951 ICC=yes
4952 else
4953 ICC=no
4955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4957 # Check if it's Sun Studio compiler. We assume that
4958 # __SUNPRO_C will be defined for Sun Studio compilers
4959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4960 /* end confdefs.h. */
4963 main ()
4965 #ifndef __SUNPRO_C
4966 choke me
4967 #endif
4969 return 0;
4971 _ACEOF
4972 if ac_fn_c_try_compile "$LINENO"; then :
4973 SUN_STUDIO_CC=yes
4974 else
4975 SUN_STUDIO_CC=no
4977 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4983 # LLVM
4985 # Checked early because subsequent tests depend on it.
4989 # Check whether --with-llvm was given.
4990 if test "${with_llvm+set}" = set; then :
4991 withval=$with_llvm;
4992 case $withval in
4993 yes)
4995 $as_echo "#define USE_LLVM 1" >>confdefs.h
5002 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
5004 esac
5006 else
5007 with_llvm=no
5013 for ac_prog in gawk mawk nawk awk
5015 # Extract the first word of "$ac_prog", so it can be a program name with args.
5016 set dummy $ac_prog; ac_word=$2
5017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5018 $as_echo_n "checking for $ac_word... " >&6; }
5019 if ${ac_cv_prog_AWK+:} false; then :
5020 $as_echo_n "(cached) " >&6
5021 else
5022 if test -n "$AWK"; then
5023 ac_cv_prog_AWK="$AWK" # Let the user override the test.
5024 else
5025 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5026 for as_dir in $PATH
5028 IFS=$as_save_IFS
5029 test -z "$as_dir" && as_dir=.
5030 for ac_exec_ext in '' $ac_executable_extensions; do
5031 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5032 ac_cv_prog_AWK="$ac_prog"
5033 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5034 break 2
5036 done
5037 done
5038 IFS=$as_save_IFS
5042 AWK=$ac_cv_prog_AWK
5043 if test -n "$AWK"; then
5044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5045 $as_echo "$AWK" >&6; }
5046 else
5047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5048 $as_echo "no" >&6; }
5052 test -n "$AWK" && break
5053 done
5055 if test "$with_llvm" = yes; then :
5061 if test -z "$LLVM_CONFIG"; then
5062 for ac_prog in llvm-config llvm-config-7 llvm-config-6.0 llvm-config-5.0 llvm-config-4.0 llvm-config-3.9
5064 # Extract the first word of "$ac_prog", so it can be a program name with args.
5065 set dummy $ac_prog; ac_word=$2
5066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5067 $as_echo_n "checking for $ac_word... " >&6; }
5068 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5069 $as_echo_n "(cached) " >&6
5070 else
5071 case $LLVM_CONFIG in
5072 [\\/]* | ?:[\\/]*)
5073 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5076 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5077 for as_dir in $PATH
5079 IFS=$as_save_IFS
5080 test -z "$as_dir" && as_dir=.
5081 for ac_exec_ext in '' $ac_executable_extensions; do
5082 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5083 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5084 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5085 break 2
5087 done
5088 done
5089 IFS=$as_save_IFS
5092 esac
5094 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5095 if test -n "$LLVM_CONFIG"; then
5096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5097 $as_echo "$LLVM_CONFIG" >&6; }
5098 else
5099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100 $as_echo "no" >&6; }
5104 test -n "$LLVM_CONFIG" && break
5105 done
5107 else
5108 # Report the value of LLVM_CONFIG in configure's output in all cases.
5109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5110 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5112 $as_echo "$LLVM_CONFIG" >&6; }
5116 # no point continuing if llvm wasn't found
5117 if test -z "$LLVM_CONFIG"; then
5118 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5120 # check if detected $LLVM_CONFIG is executable
5121 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5122 if test "x$pgac_llvm_version" = "xno"; then
5123 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5125 # and whether the version is supported
5126 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5127 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5129 { $as_echo "$as_me:${as_lineno-$LINENO}: using llvm $pgac_llvm_version" >&5
5130 $as_echo "$as_me: using llvm $pgac_llvm_version" >&6;}
5132 # need clang to create some bitcode files
5134 if test -z "$CLANG"; then
5135 for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5137 # Extract the first word of "$ac_prog", so it can be a program name with args.
5138 set dummy $ac_prog; ac_word=$2
5139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5140 $as_echo_n "checking for $ac_word... " >&6; }
5141 if ${ac_cv_path_CLANG+:} false; then :
5142 $as_echo_n "(cached) " >&6
5143 else
5144 case $CLANG in
5145 [\\/]* | ?:[\\/]*)
5146 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5149 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5150 for as_dir in $PATH
5152 IFS=$as_save_IFS
5153 test -z "$as_dir" && as_dir=.
5154 for ac_exec_ext in '' $ac_executable_extensions; do
5155 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5156 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5157 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5158 break 2
5160 done
5161 done
5162 IFS=$as_save_IFS
5165 esac
5167 CLANG=$ac_cv_path_CLANG
5168 if test -n "$CLANG"; then
5169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5170 $as_echo "$CLANG" >&6; }
5171 else
5172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5173 $as_echo "no" >&6; }
5177 test -n "$CLANG" && break
5178 done
5180 else
5181 # Report the value of CLANG in configure's output in all cases.
5182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5183 $as_echo_n "checking for CLANG... " >&6; }
5184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5185 $as_echo "$CLANG" >&6; }
5188 if test -z "$CLANG"; then
5189 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5191 # make sure clang is executable
5192 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5193 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5195 # Could check clang version, but it doesn't seem that
5196 # important. Systems with a new enough LLVM version are usually
5197 # going to have a decent clang version too. It's also not entirely
5198 # clear what the minimum version is.
5200 # Collect compiler flags necessary to build the LLVM dependent
5201 # shared library.
5202 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5203 case $pgac_option in
5204 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5205 esac
5206 done
5208 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5209 case $pgac_option in
5210 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5211 esac
5212 done
5214 # ABI influencing options, standard influencing options
5215 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5216 case $pgac_option in
5217 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5218 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5219 esac
5220 done
5222 # Look for components we're interested in, collect necessary
5223 # libs. As some components are optional, we can't just list all of
5224 # them as it'd raise an error.
5225 pgac_components='';
5226 for pgac_component in `$LLVM_CONFIG --components`; do
5227 case $pgac_component in
5228 engine) pgac_components="$pgac_components $pgac_component";;
5229 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5230 orcjit) pgac_components="$pgac_components $pgac_component";;
5231 passes) pgac_components="$pgac_components $pgac_component";;
5232 native) pgac_components="$pgac_components $pgac_component";;
5233 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5234 esac
5235 done;
5237 # And then get the libraries that need to be linked in for the
5238 # selected components. They're large libraries, we only want to
5239 # link them into the LLVM using shared library.
5240 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5241 case $pgac_option in
5242 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5243 esac
5244 done
5246 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5256 fi # fi
5259 unset CFLAGS
5260 unset CXXFLAGS
5263 # Read the template
5265 . "$srcdir/src/template/$template" || exit
5267 # C[XX]FLAGS are selected so:
5268 # If the user specifies something in the environment, that is used.
5269 # else: If the template file set something, that is used.
5270 # else: If coverage was enabled, don't set anything.
5271 # else: If the compiler is GCC, then we use -O2.
5272 # else: If the compiler is something else, then we use -O, unless debugging.
5274 if test "$ac_env_CFLAGS_set" = set; then
5275 CFLAGS=$ac_env_CFLAGS_value
5276 elif test "${CFLAGS+set}" = set; then
5277 : # (keep what template set)
5278 elif test "$enable_coverage" = yes; then
5279 : # no optimization by default
5280 elif test "$GCC" = yes; then
5281 CFLAGS="-O2"
5282 else
5283 # if the user selected debug mode, don't use -O
5284 if test "$enable_debug" != yes; then
5285 CFLAGS="-O"
5289 if test "$ac_env_CXXFLAGS_set" = set; then
5290 CXXFLAGS=$ac_env_CXXFLAGS_value
5291 elif test "${CXXFLAGS+set}" = set; then
5292 : # (keep what template set)
5293 elif test "$enable_coverage" = yes; then
5294 : # no optimization by default
5295 elif test "$GCC" = yes; then
5296 CXXFLAGS="-O2"
5297 else
5298 # if the user selected debug mode, don't use -O
5299 if test "$enable_debug" != yes; then
5300 CXXFLAGS="-O"
5304 # When generating bitcode (for inlining) we always want to use -O2
5305 # even when --enable-debug is specified. The bitcode is not going to
5306 # be used for line-by-line debugging, and JIT inlining doesn't work
5307 # without at least -O1 (otherwise clang will emit 'noinline'
5308 # attributes everywhere), which is bad for testing. Still allow the
5309 # environment to override if done explicitly.
5310 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5311 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5312 else
5313 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5315 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5316 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5317 else
5318 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5321 # C[XX]FLAGS we determined above will be added back at the end
5322 user_CFLAGS=$CFLAGS
5323 CFLAGS=""
5324 user_CXXFLAGS=$CXXFLAGS
5325 CXXFLAGS=""
5326 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5327 BITCODE_CFLAGS=""
5328 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5329 BITCODE_CXXFLAGS=""
5331 # set CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE from the environment, if present
5332 if test "$ac_env_CFLAGS_UNROLL_LOOPS_set" = set; then
5333 CFLAGS_UNROLL_LOOPS=$ac_env_CFLAGS_UNROLL_LOOPS_value
5335 if test "$ac_env_CFLAGS_VECTORIZE_set" = set; then
5336 CFLAGS_VECTORIZE=$ac_env_CFLAGS_VECTORIZE_value
5339 # Some versions of GCC support some additional useful warning flags.
5340 # Check whether they are supported, and add them to CFLAGS if so.
5341 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5342 # but has its own. Also check other compiler-specific flags here.
5344 if test "$GCC" = yes -a "$ICC" = no; then
5345 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5346 CXXFLAGS="-Wall -Wpointer-arith"
5347 # These work in some but not all gcc versions
5348 save_CFLAGS=$CFLAGS
5350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5351 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5352 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5353 $as_echo_n "(cached) " >&6
5354 else
5355 pgac_save_CFLAGS=$CFLAGS
5356 pgac_save_CC=$CC
5357 CC=${CC}
5358 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5359 ac_save_c_werror_flag=$ac_c_werror_flag
5360 ac_c_werror_flag=yes
5361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5362 /* end confdefs.h. */
5365 main ()
5369 return 0;
5371 _ACEOF
5372 if ac_fn_c_try_compile "$LINENO"; then :
5373 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5374 else
5375 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5377 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5378 ac_c_werror_flag=$ac_save_c_werror_flag
5379 CFLAGS="$pgac_save_CFLAGS"
5380 CC="$pgac_save_CC"
5382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5383 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5384 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5385 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5389 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5390 # disable it, so AC_SUBST the negative form.
5391 PERMIT_DECLARATION_AFTER_STATEMENT=
5392 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5393 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5396 # Really don't want VLAs to be used in our dialect of C
5398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5399 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5400 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5401 $as_echo_n "(cached) " >&6
5402 else
5403 pgac_save_CFLAGS=$CFLAGS
5404 pgac_save_CC=$CC
5405 CC=${CC}
5406 CFLAGS="${CFLAGS} -Werror=vla"
5407 ac_save_c_werror_flag=$ac_c_werror_flag
5408 ac_c_werror_flag=yes
5409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5410 /* end confdefs.h. */
5413 main ()
5417 return 0;
5419 _ACEOF
5420 if ac_fn_c_try_compile "$LINENO"; then :
5421 pgac_cv_prog_CC_cflags__Werror_vla=yes
5422 else
5423 pgac_cv_prog_CC_cflags__Werror_vla=no
5425 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5426 ac_c_werror_flag=$ac_save_c_werror_flag
5427 CFLAGS="$pgac_save_CFLAGS"
5428 CC="$pgac_save_CC"
5430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5431 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5432 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5433 CFLAGS="${CFLAGS} -Werror=vla"
5437 # On macOS, complain about usage of symbols newer than the deployment target
5439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS" >&5
5440 $as_echo_n "checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS... " >&6; }
5441 if ${pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new+:} false; then :
5442 $as_echo_n "(cached) " >&6
5443 else
5444 pgac_save_CFLAGS=$CFLAGS
5445 pgac_save_CC=$CC
5446 CC=${CC}
5447 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5448 ac_save_c_werror_flag=$ac_c_werror_flag
5449 ac_c_werror_flag=yes
5450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5451 /* end confdefs.h. */
5454 main ()
5458 return 0;
5460 _ACEOF
5461 if ac_fn_c_try_compile "$LINENO"; then :
5462 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=yes
5463 else
5464 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=no
5466 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5467 ac_c_werror_flag=$ac_save_c_werror_flag
5468 CFLAGS="$pgac_save_CFLAGS"
5469 CC="$pgac_save_CC"
5471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&5
5472 $as_echo "$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&6; }
5473 if test x"$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" = x"yes"; then
5474 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS" >&5
5479 $as_echo_n "checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS... " >&6; }
5480 if ${pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new+:} false; then :
5481 $as_echo_n "(cached) " >&6
5482 else
5483 pgac_save_CXXFLAGS=$CXXFLAGS
5484 pgac_save_CXX=$CXX
5485 CXX=${CXX}
5486 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5487 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5488 ac_cxx_werror_flag=yes
5489 ac_ext=cpp
5490 ac_cpp='$CXXCPP $CPPFLAGS'
5491 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5492 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5493 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5496 /* end confdefs.h. */
5499 main ()
5503 return 0;
5505 _ACEOF
5506 if ac_fn_cxx_try_compile "$LINENO"; then :
5507 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=yes
5508 else
5509 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=no
5511 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5512 ac_ext=c
5513 ac_cpp='$CPP $CPPFLAGS'
5514 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5515 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5516 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5518 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5519 CXXFLAGS="$pgac_save_CXXFLAGS"
5520 CXX="$pgac_save_CXX"
5522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&5
5523 $as_echo "$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&6; }
5524 if test x"$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" = x"yes"; then
5525 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5529 # -Wvla is not applicable for C++
5531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5532 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5533 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5534 $as_echo_n "(cached) " >&6
5535 else
5536 pgac_save_CFLAGS=$CFLAGS
5537 pgac_save_CC=$CC
5538 CC=${CC}
5539 CFLAGS="${CFLAGS} -Wendif-labels"
5540 ac_save_c_werror_flag=$ac_c_werror_flag
5541 ac_c_werror_flag=yes
5542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5543 /* end confdefs.h. */
5546 main ()
5550 return 0;
5552 _ACEOF
5553 if ac_fn_c_try_compile "$LINENO"; then :
5554 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5555 else
5556 pgac_cv_prog_CC_cflags__Wendif_labels=no
5558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5559 ac_c_werror_flag=$ac_save_c_werror_flag
5560 CFLAGS="$pgac_save_CFLAGS"
5561 CC="$pgac_save_CC"
5563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5564 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5565 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5566 CFLAGS="${CFLAGS} -Wendif-labels"
5570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5571 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5572 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5573 $as_echo_n "(cached) " >&6
5574 else
5575 pgac_save_CXXFLAGS=$CXXFLAGS
5576 pgac_save_CXX=$CXX
5577 CXX=${CXX}
5578 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5579 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5580 ac_cxx_werror_flag=yes
5581 ac_ext=cpp
5582 ac_cpp='$CXXCPP $CPPFLAGS'
5583 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5584 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5585 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5588 /* end confdefs.h. */
5591 main ()
5595 return 0;
5597 _ACEOF
5598 if ac_fn_cxx_try_compile "$LINENO"; then :
5599 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5600 else
5601 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5603 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5604 ac_ext=c
5605 ac_cpp='$CPP $CPPFLAGS'
5606 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5607 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5608 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5610 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5611 CXXFLAGS="$pgac_save_CXXFLAGS"
5612 CXX="$pgac_save_CXX"
5614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5615 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5616 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5617 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5623 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5624 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5625 $as_echo_n "(cached) " >&6
5626 else
5627 pgac_save_CFLAGS=$CFLAGS
5628 pgac_save_CC=$CC
5629 CC=${CC}
5630 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5631 ac_save_c_werror_flag=$ac_c_werror_flag
5632 ac_c_werror_flag=yes
5633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5634 /* end confdefs.h. */
5637 main ()
5641 return 0;
5643 _ACEOF
5644 if ac_fn_c_try_compile "$LINENO"; then :
5645 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5646 else
5647 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5649 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5650 ac_c_werror_flag=$ac_save_c_werror_flag
5651 CFLAGS="$pgac_save_CFLAGS"
5652 CC="$pgac_save_CC"
5654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5655 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5656 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5657 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5662 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5663 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5664 $as_echo_n "(cached) " >&6
5665 else
5666 pgac_save_CXXFLAGS=$CXXFLAGS
5667 pgac_save_CXX=$CXX
5668 CXX=${CXX}
5669 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5670 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5671 ac_cxx_werror_flag=yes
5672 ac_ext=cpp
5673 ac_cpp='$CXXCPP $CPPFLAGS'
5674 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5675 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5676 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5679 /* end confdefs.h. */
5682 main ()
5686 return 0;
5688 _ACEOF
5689 if ac_fn_cxx_try_compile "$LINENO"; then :
5690 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5691 else
5692 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5695 ac_ext=c
5696 ac_cpp='$CPP $CPPFLAGS'
5697 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5698 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5699 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5701 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5702 CXXFLAGS="$pgac_save_CXXFLAGS"
5703 CXX="$pgac_save_CXX"
5705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5706 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5707 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5708 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS" >&5
5714 $as_echo_n "checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS... " >&6; }
5715 if ${pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3+:} false; then :
5716 $as_echo_n "(cached) " >&6
5717 else
5718 pgac_save_CFLAGS=$CFLAGS
5719 pgac_save_CC=$CC
5720 CC=${CC}
5721 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5722 ac_save_c_werror_flag=$ac_c_werror_flag
5723 ac_c_werror_flag=yes
5724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5725 /* end confdefs.h. */
5728 main ()
5732 return 0;
5734 _ACEOF
5735 if ac_fn_c_try_compile "$LINENO"; then :
5736 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=yes
5737 else
5738 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=no
5740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5741 ac_c_werror_flag=$ac_save_c_werror_flag
5742 CFLAGS="$pgac_save_CFLAGS"
5743 CC="$pgac_save_CC"
5745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&5
5746 $as_echo "$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&6; }
5747 if test x"$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" = x"yes"; then
5748 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS" >&5
5753 $as_echo_n "checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS... " >&6; }
5754 if ${pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3+:} false; then :
5755 $as_echo_n "(cached) " >&6
5756 else
5757 pgac_save_CXXFLAGS=$CXXFLAGS
5758 pgac_save_CXX=$CXX
5759 CXX=${CXX}
5760 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5761 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5762 ac_cxx_werror_flag=yes
5763 ac_ext=cpp
5764 ac_cpp='$CXXCPP $CPPFLAGS'
5765 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5766 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5767 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5770 /* end confdefs.h. */
5773 main ()
5777 return 0;
5779 _ACEOF
5780 if ac_fn_cxx_try_compile "$LINENO"; then :
5781 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=yes
5782 else
5783 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=no
5785 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5786 ac_ext=c
5787 ac_cpp='$CPP $CPPFLAGS'
5788 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5789 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5790 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5792 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5793 CXXFLAGS="$pgac_save_CXXFLAGS"
5794 CXX="$pgac_save_CXX"
5796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&5
5797 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&6; }
5798 if test x"$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" = x"yes"; then
5799 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type, for CFLAGS" >&5
5805 $as_echo_n "checking whether ${CC} supports -Wcast-function-type, for CFLAGS... " >&6; }
5806 if ${pgac_cv_prog_CC_cflags__Wcast_function_type+:} false; then :
5807 $as_echo_n "(cached) " >&6
5808 else
5809 pgac_save_CFLAGS=$CFLAGS
5810 pgac_save_CC=$CC
5811 CC=${CC}
5812 CFLAGS="${CFLAGS} -Wcast-function-type"
5813 ac_save_c_werror_flag=$ac_c_werror_flag
5814 ac_c_werror_flag=yes
5815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5816 /* end confdefs.h. */
5819 main ()
5823 return 0;
5825 _ACEOF
5826 if ac_fn_c_try_compile "$LINENO"; then :
5827 pgac_cv_prog_CC_cflags__Wcast_function_type=yes
5828 else
5829 pgac_cv_prog_CC_cflags__Wcast_function_type=no
5831 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5832 ac_c_werror_flag=$ac_save_c_werror_flag
5833 CFLAGS="$pgac_save_CFLAGS"
5834 CC="$pgac_save_CC"
5836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type" >&5
5837 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type" >&6; }
5838 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type" = x"yes"; then
5839 CFLAGS="${CFLAGS} -Wcast-function-type"
5843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS" >&5
5844 $as_echo_n "checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS... " >&6; }
5845 if ${pgac_cv_prog_CXX_cxxflags__Wcast_function_type+:} false; then :
5846 $as_echo_n "(cached) " >&6
5847 else
5848 pgac_save_CXXFLAGS=$CXXFLAGS
5849 pgac_save_CXX=$CXX
5850 CXX=${CXX}
5851 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5852 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5853 ac_cxx_werror_flag=yes
5854 ac_ext=cpp
5855 ac_cpp='$CXXCPP $CPPFLAGS'
5856 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5857 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5858 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5861 /* end confdefs.h. */
5864 main ()
5868 return 0;
5870 _ACEOF
5871 if ac_fn_cxx_try_compile "$LINENO"; then :
5872 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=yes
5873 else
5874 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=no
5876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5877 ac_ext=c
5878 ac_cpp='$CPP $CPPFLAGS'
5879 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5880 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5881 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5883 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5884 CXXFLAGS="$pgac_save_CXXFLAGS"
5885 CXX="$pgac_save_CXX"
5887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&5
5888 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&6; }
5889 if test x"$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" = x"yes"; then
5890 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS" >&5
5896 $as_echo_n "checking whether ${CC} supports -Wshadow=compatible-local, for CFLAGS... " >&6; }
5897 if ${pgac_cv_prog_CC_cflags__Wshadow_compatible_local+:} false; then :
5898 $as_echo_n "(cached) " >&6
5899 else
5900 pgac_save_CFLAGS=$CFLAGS
5901 pgac_save_CC=$CC
5902 CC=${CC}
5903 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5904 ac_save_c_werror_flag=$ac_c_werror_flag
5905 ac_c_werror_flag=yes
5906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5907 /* end confdefs.h. */
5910 main ()
5914 return 0;
5916 _ACEOF
5917 if ac_fn_c_try_compile "$LINENO"; then :
5918 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=yes
5919 else
5920 pgac_cv_prog_CC_cflags__Wshadow_compatible_local=no
5922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5923 ac_c_werror_flag=$ac_save_c_werror_flag
5924 CFLAGS="$pgac_save_CFLAGS"
5925 CC="$pgac_save_CC"
5927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&5
5928 $as_echo "$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" >&6; }
5929 if test x"$pgac_cv_prog_CC_cflags__Wshadow_compatible_local" = x"yes"; then
5930 CFLAGS="${CFLAGS} -Wshadow=compatible-local"
5934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS" >&5
5935 $as_echo_n "checking whether ${CXX} supports -Wshadow=compatible-local, for CXXFLAGS... " >&6; }
5936 if ${pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local+:} false; then :
5937 $as_echo_n "(cached) " >&6
5938 else
5939 pgac_save_CXXFLAGS=$CXXFLAGS
5940 pgac_save_CXX=$CXX
5941 CXX=${CXX}
5942 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5943 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5944 ac_cxx_werror_flag=yes
5945 ac_ext=cpp
5946 ac_cpp='$CXXCPP $CPPFLAGS'
5947 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5948 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5949 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5952 /* end confdefs.h. */
5955 main ()
5959 return 0;
5961 _ACEOF
5962 if ac_fn_cxx_try_compile "$LINENO"; then :
5963 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=yes
5964 else
5965 pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local=no
5967 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5968 ac_ext=c
5969 ac_cpp='$CPP $CPPFLAGS'
5970 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5971 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5972 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5974 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5975 CXXFLAGS="$pgac_save_CXXFLAGS"
5976 CXX="$pgac_save_CXX"
5978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&5
5979 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" >&6; }
5980 if test x"$pgac_cv_prog_CXX_cxxflags__Wshadow_compatible_local" = x"yes"; then
5981 CXXFLAGS="${CXXFLAGS} -Wshadow=compatible-local"
5985 # This was included in -Wall/-Wformat in older GCC versions
5987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5988 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5989 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5990 $as_echo_n "(cached) " >&6
5991 else
5992 pgac_save_CFLAGS=$CFLAGS
5993 pgac_save_CC=$CC
5994 CC=${CC}
5995 CFLAGS="${CFLAGS} -Wformat-security"
5996 ac_save_c_werror_flag=$ac_c_werror_flag
5997 ac_c_werror_flag=yes
5998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5999 /* end confdefs.h. */
6002 main ()
6006 return 0;
6008 _ACEOF
6009 if ac_fn_c_try_compile "$LINENO"; then :
6010 pgac_cv_prog_CC_cflags__Wformat_security=yes
6011 else
6012 pgac_cv_prog_CC_cflags__Wformat_security=no
6014 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6015 ac_c_werror_flag=$ac_save_c_werror_flag
6016 CFLAGS="$pgac_save_CFLAGS"
6017 CC="$pgac_save_CC"
6019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
6020 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
6021 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
6022 CFLAGS="${CFLAGS} -Wformat-security"
6026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
6027 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
6028 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
6029 $as_echo_n "(cached) " >&6
6030 else
6031 pgac_save_CXXFLAGS=$CXXFLAGS
6032 pgac_save_CXX=$CXX
6033 CXX=${CXX}
6034 CXXFLAGS="${CXXFLAGS} -Wformat-security"
6035 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6036 ac_cxx_werror_flag=yes
6037 ac_ext=cpp
6038 ac_cpp='$CXXCPP $CPPFLAGS'
6039 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6040 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6041 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6044 /* end confdefs.h. */
6047 main ()
6051 return 0;
6053 _ACEOF
6054 if ac_fn_cxx_try_compile "$LINENO"; then :
6055 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
6056 else
6057 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
6059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6060 ac_ext=c
6061 ac_cpp='$CPP $CPPFLAGS'
6062 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6063 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6064 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6066 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6067 CXXFLAGS="$pgac_save_CXXFLAGS"
6068 CXX="$pgac_save_CXX"
6070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
6071 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
6072 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
6073 CXXFLAGS="${CXXFLAGS} -Wformat-security"
6077 # Disable strict-aliasing rules; needed for gcc 3.3+
6079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6080 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6081 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6082 $as_echo_n "(cached) " >&6
6083 else
6084 pgac_save_CFLAGS=$CFLAGS
6085 pgac_save_CC=$CC
6086 CC=${CC}
6087 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6088 ac_save_c_werror_flag=$ac_c_werror_flag
6089 ac_c_werror_flag=yes
6090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6091 /* end confdefs.h. */
6094 main ()
6098 return 0;
6100 _ACEOF
6101 if ac_fn_c_try_compile "$LINENO"; then :
6102 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6103 else
6104 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6106 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6107 ac_c_werror_flag=$ac_save_c_werror_flag
6108 CFLAGS="$pgac_save_CFLAGS"
6109 CC="$pgac_save_CC"
6111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6112 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6113 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6114 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6119 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6120 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6121 $as_echo_n "(cached) " >&6
6122 else
6123 pgac_save_CXXFLAGS=$CXXFLAGS
6124 pgac_save_CXX=$CXX
6125 CXX=${CXX}
6126 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6127 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6128 ac_cxx_werror_flag=yes
6129 ac_ext=cpp
6130 ac_cpp='$CXXCPP $CPPFLAGS'
6131 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6132 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6133 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6136 /* end confdefs.h. */
6139 main ()
6143 return 0;
6145 _ACEOF
6146 if ac_fn_cxx_try_compile "$LINENO"; then :
6147 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6148 else
6149 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6152 ac_ext=c
6153 ac_cpp='$CPP $CPPFLAGS'
6154 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6155 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6156 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6158 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6159 CXXFLAGS="$pgac_save_CXXFLAGS"
6160 CXX="$pgac_save_CXX"
6162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6163 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6164 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6165 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6169 # Disable optimizations that assume no overflow; needed for gcc 4.3+
6171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
6172 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
6173 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
6174 $as_echo_n "(cached) " >&6
6175 else
6176 pgac_save_CFLAGS=$CFLAGS
6177 pgac_save_CC=$CC
6178 CC=${CC}
6179 CFLAGS="${CFLAGS} -fwrapv"
6180 ac_save_c_werror_flag=$ac_c_werror_flag
6181 ac_c_werror_flag=yes
6182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6183 /* end confdefs.h. */
6186 main ()
6190 return 0;
6192 _ACEOF
6193 if ac_fn_c_try_compile "$LINENO"; then :
6194 pgac_cv_prog_CC_cflags__fwrapv=yes
6195 else
6196 pgac_cv_prog_CC_cflags__fwrapv=no
6198 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6199 ac_c_werror_flag=$ac_save_c_werror_flag
6200 CFLAGS="$pgac_save_CFLAGS"
6201 CC="$pgac_save_CC"
6203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
6204 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
6205 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
6206 CFLAGS="${CFLAGS} -fwrapv"
6210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
6211 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
6212 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
6213 $as_echo_n "(cached) " >&6
6214 else
6215 pgac_save_CXXFLAGS=$CXXFLAGS
6216 pgac_save_CXX=$CXX
6217 CXX=${CXX}
6218 CXXFLAGS="${CXXFLAGS} -fwrapv"
6219 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6220 ac_cxx_werror_flag=yes
6221 ac_ext=cpp
6222 ac_cpp='$CXXCPP $CPPFLAGS'
6223 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6224 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6225 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6228 /* end confdefs.h. */
6231 main ()
6235 return 0;
6237 _ACEOF
6238 if ac_fn_cxx_try_compile "$LINENO"; then :
6239 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
6240 else
6241 pgac_cv_prog_CXX_cxxflags__fwrapv=no
6243 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6244 ac_ext=c
6245 ac_cpp='$CPP $CPPFLAGS'
6246 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6247 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6248 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6250 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6251 CXXFLAGS="$pgac_save_CXXFLAGS"
6252 CXX="$pgac_save_CXX"
6254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
6255 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
6256 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
6257 CXXFLAGS="${CXXFLAGS} -fwrapv"
6261 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
6263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
6264 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
6265 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
6266 $as_echo_n "(cached) " >&6
6267 else
6268 pgac_save_CFLAGS=$CFLAGS
6269 pgac_save_CC=$CC
6270 CC=${CC}
6271 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6272 ac_save_c_werror_flag=$ac_c_werror_flag
6273 ac_c_werror_flag=yes
6274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6275 /* end confdefs.h. */
6278 main ()
6282 return 0;
6284 _ACEOF
6285 if ac_fn_c_try_compile "$LINENO"; then :
6286 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6287 else
6288 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6290 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6291 ac_c_werror_flag=$ac_save_c_werror_flag
6292 CFLAGS="$pgac_save_CFLAGS"
6293 CC="$pgac_save_CC"
6295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6296 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6297 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6298 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6303 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6304 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6305 $as_echo_n "(cached) " >&6
6306 else
6307 pgac_save_CXXFLAGS=$CXXFLAGS
6308 pgac_save_CXX=$CXX
6309 CXX=${CXX}
6310 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6311 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6312 ac_cxx_werror_flag=yes
6313 ac_ext=cpp
6314 ac_cpp='$CXXCPP $CPPFLAGS'
6315 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6316 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6317 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6320 /* end confdefs.h. */
6323 main ()
6327 return 0;
6329 _ACEOF
6330 if ac_fn_cxx_try_compile "$LINENO"; then :
6331 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6332 else
6333 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6336 ac_ext=c
6337 ac_cpp='$CPP $CPPFLAGS'
6338 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6339 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6340 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6342 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6343 CXXFLAGS="$pgac_save_CXXFLAGS"
6344 CXX="$pgac_save_CXX"
6346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6347 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6348 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6349 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6353 # Optimization flags for specific files that benefit from loop unrolling
6354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS" >&5
6355 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... " >&6; }
6356 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6357 $as_echo_n "(cached) " >&6
6358 else
6359 pgac_save_CFLAGS=$CFLAGS
6360 pgac_save_CC=$CC
6361 CC=${CC}
6362 CFLAGS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6363 ac_save_c_werror_flag=$ac_c_werror_flag
6364 ac_c_werror_flag=yes
6365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6366 /* end confdefs.h. */
6369 main ()
6373 return 0;
6375 _ACEOF
6376 if ac_fn_c_try_compile "$LINENO"; then :
6377 pgac_cv_prog_CC_cflags__funroll_loops=yes
6378 else
6379 pgac_cv_prog_CC_cflags__funroll_loops=no
6381 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6382 ac_c_werror_flag=$ac_save_c_werror_flag
6383 CFLAGS="$pgac_save_CFLAGS"
6384 CC="$pgac_save_CC"
6386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6387 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6388 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6389 CFLAGS_UNROLL_LOOPS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6393 # Optimization flags for specific files that benefit from vectorization
6394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE" >&5
6395 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE... " >&6; }
6396 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6397 $as_echo_n "(cached) " >&6
6398 else
6399 pgac_save_CFLAGS=$CFLAGS
6400 pgac_save_CC=$CC
6401 CC=${CC}
6402 CFLAGS="${CFLAGS_VECTORIZE} -ftree-vectorize"
6403 ac_save_c_werror_flag=$ac_c_werror_flag
6404 ac_c_werror_flag=yes
6405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6406 /* end confdefs.h. */
6409 main ()
6413 return 0;
6415 _ACEOF
6416 if ac_fn_c_try_compile "$LINENO"; then :
6417 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6418 else
6419 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6422 ac_c_werror_flag=$ac_save_c_werror_flag
6423 CFLAGS="$pgac_save_CFLAGS"
6424 CC="$pgac_save_CC"
6426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6427 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6428 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6429 CFLAGS_VECTORIZE="${CFLAGS_VECTORIZE} -ftree-vectorize"
6434 # The following tests want to suppress various unhelpful warnings by adding
6435 # -Wno-foo switches. But gcc won't complain about unrecognized -Wno-foo
6436 # switches, so we have to test for the positive form and if that works,
6437 # add the negative form. Note that tests of this form typically need to
6438 # be duplicated in the BITCODE_CFLAGS setup stanza below.
6440 # Suppress clang's unhelpful unused-command-line-argument warnings.
6441 NOT_THE_CFLAGS=""
6442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6443 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6444 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6445 $as_echo_n "(cached) " >&6
6446 else
6447 pgac_save_CFLAGS=$CFLAGS
6448 pgac_save_CC=$CC
6449 CC=${CC}
6450 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6451 ac_save_c_werror_flag=$ac_c_werror_flag
6452 ac_c_werror_flag=yes
6453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6454 /* end confdefs.h. */
6457 main ()
6461 return 0;
6463 _ACEOF
6464 if ac_fn_c_try_compile "$LINENO"; then :
6465 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6466 else
6467 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6469 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6470 ac_c_werror_flag=$ac_save_c_werror_flag
6471 CFLAGS="$pgac_save_CFLAGS"
6472 CC="$pgac_save_CC"
6474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6475 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6476 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6477 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6481 if test -n "$NOT_THE_CFLAGS"; then
6482 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6484 # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot
6485 # of warnings when building plperl because of usages in the Perl headers.
6486 NOT_THE_CFLAGS=""
6487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
6488 $as_echo_n "checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
6489 if ${pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro+:} false; then :
6490 $as_echo_n "(cached) " >&6
6491 else
6492 pgac_save_CFLAGS=$CFLAGS
6493 pgac_save_CC=$CC
6494 CC=${CC}
6495 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6496 ac_save_c_werror_flag=$ac_c_werror_flag
6497 ac_c_werror_flag=yes
6498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6499 /* end confdefs.h. */
6502 main ()
6506 return 0;
6508 _ACEOF
6509 if ac_fn_c_try_compile "$LINENO"; then :
6510 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=yes
6511 else
6512 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=no
6514 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6515 ac_c_werror_flag=$ac_save_c_werror_flag
6516 CFLAGS="$pgac_save_CFLAGS"
6517 CC="$pgac_save_CC"
6519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&5
6520 $as_echo "$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&6; }
6521 if test x"$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" = x"yes"; then
6522 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6526 if test -n "$NOT_THE_CFLAGS"; then
6527 CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
6529 # Similarly disable useless truncation warnings from gcc 8+
6530 NOT_THE_CFLAGS=""
6531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6532 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6533 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6534 $as_echo_n "(cached) " >&6
6535 else
6536 pgac_save_CFLAGS=$CFLAGS
6537 pgac_save_CC=$CC
6538 CC=${CC}
6539 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6540 ac_save_c_werror_flag=$ac_c_werror_flag
6541 ac_c_werror_flag=yes
6542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6543 /* end confdefs.h. */
6546 main ()
6550 return 0;
6552 _ACEOF
6553 if ac_fn_c_try_compile "$LINENO"; then :
6554 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6555 else
6556 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6559 ac_c_werror_flag=$ac_save_c_werror_flag
6560 CFLAGS="$pgac_save_CFLAGS"
6561 CC="$pgac_save_CC"
6563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6564 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6565 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6566 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6570 if test -n "$NOT_THE_CFLAGS"; then
6571 CFLAGS="$CFLAGS -Wno-format-truncation"
6573 NOT_THE_CFLAGS=""
6574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6575 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6576 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6577 $as_echo_n "(cached) " >&6
6578 else
6579 pgac_save_CFLAGS=$CFLAGS
6580 pgac_save_CC=$CC
6581 CC=${CC}
6582 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6583 ac_save_c_werror_flag=$ac_c_werror_flag
6584 ac_c_werror_flag=yes
6585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6586 /* end confdefs.h. */
6589 main ()
6593 return 0;
6595 _ACEOF
6596 if ac_fn_c_try_compile "$LINENO"; then :
6597 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6598 else
6599 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6601 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6602 ac_c_werror_flag=$ac_save_c_werror_flag
6603 CFLAGS="$pgac_save_CFLAGS"
6604 CC="$pgac_save_CC"
6606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6607 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6608 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6609 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6613 if test -n "$NOT_THE_CFLAGS"; then
6614 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6616 # Suppress clang 16's strict warnings about function casts
6617 NOT_THE_CFLAGS=""
6618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS" >&5
6619 $as_echo_n "checking whether ${CC} supports -Wcast-function-type-strict, for NOT_THE_CFLAGS... " >&6; }
6620 if ${pgac_cv_prog_CC_cflags__Wcast_function_type_strict+:} false; then :
6621 $as_echo_n "(cached) " >&6
6622 else
6623 pgac_save_CFLAGS=$CFLAGS
6624 pgac_save_CC=$CC
6625 CC=${CC}
6626 CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6627 ac_save_c_werror_flag=$ac_c_werror_flag
6628 ac_c_werror_flag=yes
6629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6630 /* end confdefs.h. */
6633 main ()
6637 return 0;
6639 _ACEOF
6640 if ac_fn_c_try_compile "$LINENO"; then :
6641 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=yes
6642 else
6643 pgac_cv_prog_CC_cflags__Wcast_function_type_strict=no
6645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6646 ac_c_werror_flag=$ac_save_c_werror_flag
6647 CFLAGS="$pgac_save_CFLAGS"
6648 CC="$pgac_save_CC"
6650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&5
6651 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" >&6; }
6652 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type_strict" = x"yes"; then
6653 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcast-function-type-strict"
6657 if test -n "$NOT_THE_CFLAGS"; then
6658 CFLAGS="$CFLAGS -Wno-cast-function-type-strict"
6660 elif test "$ICC" = yes; then
6661 # Intel's compiler has a bug/misoptimization in checking for
6662 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6665 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6666 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6667 $as_echo_n "(cached) " >&6
6668 else
6669 pgac_save_CFLAGS=$CFLAGS
6670 pgac_save_CC=$CC
6671 CC=${CC}
6672 CFLAGS="${CFLAGS} -mp1"
6673 ac_save_c_werror_flag=$ac_c_werror_flag
6674 ac_c_werror_flag=yes
6675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6676 /* end confdefs.h. */
6679 main ()
6683 return 0;
6685 _ACEOF
6686 if ac_fn_c_try_compile "$LINENO"; then :
6687 pgac_cv_prog_CC_cflags__mp1=yes
6688 else
6689 pgac_cv_prog_CC_cflags__mp1=no
6691 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6692 ac_c_werror_flag=$ac_save_c_werror_flag
6693 CFLAGS="$pgac_save_CFLAGS"
6694 CC="$pgac_save_CC"
6696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6697 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6698 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6699 CFLAGS="${CFLAGS} -mp1"
6703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6704 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6705 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6706 $as_echo_n "(cached) " >&6
6707 else
6708 pgac_save_CXXFLAGS=$CXXFLAGS
6709 pgac_save_CXX=$CXX
6710 CXX=${CXX}
6711 CXXFLAGS="${CXXFLAGS} -mp1"
6712 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6713 ac_cxx_werror_flag=yes
6714 ac_ext=cpp
6715 ac_cpp='$CXXCPP $CPPFLAGS'
6716 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6717 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6718 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6721 /* end confdefs.h. */
6724 main ()
6728 return 0;
6730 _ACEOF
6731 if ac_fn_cxx_try_compile "$LINENO"; then :
6732 pgac_cv_prog_CXX_cxxflags__mp1=yes
6733 else
6734 pgac_cv_prog_CXX_cxxflags__mp1=no
6736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6737 ac_ext=c
6738 ac_cpp='$CPP $CPPFLAGS'
6739 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6740 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6741 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6743 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6744 CXXFLAGS="$pgac_save_CXXFLAGS"
6745 CXX="$pgac_save_CXX"
6747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6748 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6749 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6750 CXXFLAGS="${CXXFLAGS} -mp1"
6754 # Make sure strict aliasing is off (though this is said to be the default)
6756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6757 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6758 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6759 $as_echo_n "(cached) " >&6
6760 else
6761 pgac_save_CFLAGS=$CFLAGS
6762 pgac_save_CC=$CC
6763 CC=${CC}
6764 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6765 ac_save_c_werror_flag=$ac_c_werror_flag
6766 ac_c_werror_flag=yes
6767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6768 /* end confdefs.h. */
6771 main ()
6775 return 0;
6777 _ACEOF
6778 if ac_fn_c_try_compile "$LINENO"; then :
6779 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6780 else
6781 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6784 ac_c_werror_flag=$ac_save_c_werror_flag
6785 CFLAGS="$pgac_save_CFLAGS"
6786 CC="$pgac_save_CC"
6788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6789 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6790 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6791 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6796 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6797 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6798 $as_echo_n "(cached) " >&6
6799 else
6800 pgac_save_CXXFLAGS=$CXXFLAGS
6801 pgac_save_CXX=$CXX
6802 CXX=${CXX}
6803 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6804 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6805 ac_cxx_werror_flag=yes
6806 ac_ext=cpp
6807 ac_cpp='$CXXCPP $CPPFLAGS'
6808 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6809 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6810 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6813 /* end confdefs.h. */
6816 main ()
6820 return 0;
6822 _ACEOF
6823 if ac_fn_cxx_try_compile "$LINENO"; then :
6824 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6825 else
6826 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6829 ac_ext=c
6830 ac_cpp='$CPP $CPPFLAGS'
6831 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6832 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6833 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6835 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6836 CXXFLAGS="$pgac_save_CXXFLAGS"
6837 CXX="$pgac_save_CXX"
6839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6840 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6841 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6842 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6846 elif test "$PORTNAME" = "aix"; then
6847 # AIX's xlc has to have strict aliasing turned off too
6849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6850 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6851 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6852 $as_echo_n "(cached) " >&6
6853 else
6854 pgac_save_CFLAGS=$CFLAGS
6855 pgac_save_CC=$CC
6856 CC=${CC}
6857 CFLAGS="${CFLAGS} -qnoansialias"
6858 ac_save_c_werror_flag=$ac_c_werror_flag
6859 ac_c_werror_flag=yes
6860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6861 /* end confdefs.h. */
6864 main ()
6868 return 0;
6870 _ACEOF
6871 if ac_fn_c_try_compile "$LINENO"; then :
6872 pgac_cv_prog_CC_cflags__qnoansialias=yes
6873 else
6874 pgac_cv_prog_CC_cflags__qnoansialias=no
6876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6877 ac_c_werror_flag=$ac_save_c_werror_flag
6878 CFLAGS="$pgac_save_CFLAGS"
6879 CC="$pgac_save_CC"
6881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6882 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6883 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6884 CFLAGS="${CFLAGS} -qnoansialias"
6888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6889 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6890 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6891 $as_echo_n "(cached) " >&6
6892 else
6893 pgac_save_CXXFLAGS=$CXXFLAGS
6894 pgac_save_CXX=$CXX
6895 CXX=${CXX}
6896 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6897 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6898 ac_cxx_werror_flag=yes
6899 ac_ext=cpp
6900 ac_cpp='$CXXCPP $CPPFLAGS'
6901 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6902 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6903 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6906 /* end confdefs.h. */
6909 main ()
6913 return 0;
6915 _ACEOF
6916 if ac_fn_cxx_try_compile "$LINENO"; then :
6917 pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6918 else
6919 pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6921 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6922 ac_ext=c
6923 ac_cpp='$CPP $CPPFLAGS'
6924 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6925 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6926 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6928 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6929 CXXFLAGS="$pgac_save_CXXFLAGS"
6930 CXX="$pgac_save_CXX"
6932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6933 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6934 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6935 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6941 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6942 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6943 $as_echo_n "(cached) " >&6
6944 else
6945 pgac_save_CFLAGS=$CFLAGS
6946 pgac_save_CC=$CC
6947 CC=${CC}
6948 CFLAGS="${CFLAGS} -qlonglong"
6949 ac_save_c_werror_flag=$ac_c_werror_flag
6950 ac_c_werror_flag=yes
6951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6952 /* end confdefs.h. */
6955 main ()
6959 return 0;
6961 _ACEOF
6962 if ac_fn_c_try_compile "$LINENO"; then :
6963 pgac_cv_prog_CC_cflags__qlonglong=yes
6964 else
6965 pgac_cv_prog_CC_cflags__qlonglong=no
6967 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6968 ac_c_werror_flag=$ac_save_c_werror_flag
6969 CFLAGS="$pgac_save_CFLAGS"
6970 CC="$pgac_save_CC"
6972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6973 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6974 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6975 CFLAGS="${CFLAGS} -qlonglong"
6979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6980 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6981 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6982 $as_echo_n "(cached) " >&6
6983 else
6984 pgac_save_CXXFLAGS=$CXXFLAGS
6985 pgac_save_CXX=$CXX
6986 CXX=${CXX}
6987 CXXFLAGS="${CXXFLAGS} -qlonglong"
6988 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6989 ac_cxx_werror_flag=yes
6990 ac_ext=cpp
6991 ac_cpp='$CXXCPP $CPPFLAGS'
6992 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6993 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6994 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6997 /* end confdefs.h. */
7000 main ()
7004 return 0;
7006 _ACEOF
7007 if ac_fn_cxx_try_compile "$LINENO"; then :
7008 pgac_cv_prog_CXX_cxxflags__qlonglong=yes
7009 else
7010 pgac_cv_prog_CXX_cxxflags__qlonglong=no
7012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7013 ac_ext=c
7014 ac_cpp='$CPP $CPPFLAGS'
7015 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7016 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7017 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7019 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7020 CXXFLAGS="$pgac_save_CXXFLAGS"
7021 CXX="$pgac_save_CXX"
7023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
7024 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
7025 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
7026 CXXFLAGS="${CXXFLAGS} -qlonglong"
7032 # If the compiler knows how to hide symbols, add the switch needed for that to
7033 # CFLAGS_SL_MODULE and define HAVE_VISIBILITY_ATTRIBUTE.
7035 # This is done separately from the above because -fvisibility is supported by
7036 # quite a few different compilers, making the required repetition bothersome.
7038 # We might need to add a separate test to check if
7039 # __attribute__((visibility("hidden"))) is supported, if we encounter a
7040 # compiler that supports one of the supported variants of -fvisibility=hidden
7041 # but uses a different syntax to mark a symbol as exported.
7042 if test "$GCC" = yes -o "$SUN_STUDIO_CC" = yes ; then
7043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE" >&5
7044 $as_echo_n "checking whether ${CC} supports -fvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; }
7045 if ${pgac_cv_prog_CC_cflags__fvisibility_hidden+:} false; then :
7046 $as_echo_n "(cached) " >&6
7047 else
7048 pgac_save_CFLAGS=$CFLAGS
7049 pgac_save_CC=$CC
7050 CC=${CC}
7051 CFLAGS="${CFLAGS_SL_MODULE} -fvisibility=hidden"
7052 ac_save_c_werror_flag=$ac_c_werror_flag
7053 ac_c_werror_flag=yes
7054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7055 /* end confdefs.h. */
7058 main ()
7062 return 0;
7064 _ACEOF
7065 if ac_fn_c_try_compile "$LINENO"; then :
7066 pgac_cv_prog_CC_cflags__fvisibility_hidden=yes
7067 else
7068 pgac_cv_prog_CC_cflags__fvisibility_hidden=no
7070 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7071 ac_c_werror_flag=$ac_save_c_werror_flag
7072 CFLAGS="$pgac_save_CFLAGS"
7073 CC="$pgac_save_CC"
7075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fvisibility_hidden" >&5
7076 $as_echo "$pgac_cv_prog_CC_cflags__fvisibility_hidden" >&6; }
7077 if test x"$pgac_cv_prog_CC_cflags__fvisibility_hidden" = x"yes"; then
7078 CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -fvisibility=hidden"
7082 # For C++ we additionally want -fvisibility-inlines-hidden
7083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5
7084 $as_echo_n "checking whether ${CXX} supports -fvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; }
7085 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_hidden+:} false; then :
7086 $as_echo_n "(cached) " >&6
7087 else
7088 pgac_save_CXXFLAGS=$CXXFLAGS
7089 pgac_save_CXX=$CXX
7090 CXX=${CXX}
7091 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
7092 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7093 ac_cxx_werror_flag=yes
7094 ac_ext=cpp
7095 ac_cpp='$CXXCPP $CPPFLAGS'
7096 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7097 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7098 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7101 /* end confdefs.h. */
7104 main ()
7108 return 0;
7110 _ACEOF
7111 if ac_fn_cxx_try_compile "$LINENO"; then :
7112 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=yes
7113 else
7114 pgac_cv_prog_CXX_cxxflags__fvisibility_hidden=no
7116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7117 ac_ext=c
7118 ac_cpp='$CPP $CPPFLAGS'
7119 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7120 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7121 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7123 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7124 CXXFLAGS="$pgac_save_CXXFLAGS"
7125 CXX="$pgac_save_CXX"
7127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&5
7128 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" >&6; }
7129 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_hidden" = x"yes"; then
7130 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility=hidden"
7133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE" >&5
7134 $as_echo_n "checking whether ${CXX} supports -fvisibility-inlines-hidden, for CXXFLAGS_SL_MODULE... " >&6; }
7135 if ${pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden+:} false; then :
7136 $as_echo_n "(cached) " >&6
7137 else
7138 pgac_save_CXXFLAGS=$CXXFLAGS
7139 pgac_save_CXX=$CXX
7140 CXX=${CXX}
7141 CXXFLAGS="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
7142 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7143 ac_cxx_werror_flag=yes
7144 ac_ext=cpp
7145 ac_cpp='$CXXCPP $CPPFLAGS'
7146 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7147 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7148 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7151 /* end confdefs.h. */
7154 main ()
7158 return 0;
7160 _ACEOF
7161 if ac_fn_cxx_try_compile "$LINENO"; then :
7162 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=yes
7163 else
7164 pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden=no
7166 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7167 ac_ext=c
7168 ac_cpp='$CPP $CPPFLAGS'
7169 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7170 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7171 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7173 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7174 CXXFLAGS="$pgac_save_CXXFLAGS"
7175 CXX="$pgac_save_CXX"
7177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&5
7178 $as_echo "$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" >&6; }
7179 if test x"$pgac_cv_prog_CXX_cxxflags__fvisibility_inlines_hidden" = x"yes"; then
7180 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -fvisibility-inlines-hidden"
7183 have_visibility_attribute=$pgac_cv_prog_CC_cflags__fvisibility_hidden
7184 elif test "$PORTNAME" = "aix"; then
7185 # Note that xlc accepts -fvisibility=hidden as a file.
7186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qvisibility=hidden, for CFLAGS_SL_MODULE" >&5
7187 $as_echo_n "checking whether ${CC} supports -qvisibility=hidden, for CFLAGS_SL_MODULE... " >&6; }
7188 if ${pgac_cv_prog_CC_cflags__qvisibility_hidden+:} false; then :
7189 $as_echo_n "(cached) " >&6
7190 else
7191 pgac_save_CFLAGS=$CFLAGS
7192 pgac_save_CC=$CC
7193 CC=${CC}
7194 CFLAGS="${CFLAGS_SL_MODULE} -qvisibility=hidden"
7195 ac_save_c_werror_flag=$ac_c_werror_flag
7196 ac_c_werror_flag=yes
7197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7198 /* end confdefs.h. */
7201 main ()
7205 return 0;
7207 _ACEOF
7208 if ac_fn_c_try_compile "$LINENO"; then :
7209 pgac_cv_prog_CC_cflags__qvisibility_hidden=yes
7210 else
7211 pgac_cv_prog_CC_cflags__qvisibility_hidden=no
7213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7214 ac_c_werror_flag=$ac_save_c_werror_flag
7215 CFLAGS="$pgac_save_CFLAGS"
7216 CC="$pgac_save_CC"
7218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qvisibility_hidden" >&5
7219 $as_echo "$pgac_cv_prog_CC_cflags__qvisibility_hidden" >&6; }
7220 if test x"$pgac_cv_prog_CC_cflags__qvisibility_hidden" = x"yes"; then
7221 CFLAGS_SL_MODULE="${CFLAGS_SL_MODULE} -qvisibility=hidden"
7225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qvisibility=hidden, for CXXFLAGS_SL_MODULE" >&5
7226 $as_echo_n "checking whether ${CXX} supports -qvisibility=hidden, for CXXFLAGS_SL_MODULE... " >&6; }
7227 if ${pgac_cv_prog_CXX_cxxflags__qvisibility_hidden+:} false; then :
7228 $as_echo_n "(cached) " >&6
7229 else
7230 pgac_save_CXXFLAGS=$CXXFLAGS
7231 pgac_save_CXX=$CXX
7232 CXX=${CXX}
7233 CXXFLAGS="${CXXFLAGS_SL_MODULE} -qvisibility=hidden"
7234 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7235 ac_cxx_werror_flag=yes
7236 ac_ext=cpp
7237 ac_cpp='$CXXCPP $CPPFLAGS'
7238 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7239 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7240 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7243 /* end confdefs.h. */
7246 main ()
7250 return 0;
7252 _ACEOF
7253 if ac_fn_cxx_try_compile "$LINENO"; then :
7254 pgac_cv_prog_CXX_cxxflags__qvisibility_hidden=yes
7255 else
7256 pgac_cv_prog_CXX_cxxflags__qvisibility_hidden=no
7258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7259 ac_ext=c
7260 ac_cpp='$CPP $CPPFLAGS'
7261 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7262 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7263 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7265 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7266 CXXFLAGS="$pgac_save_CXXFLAGS"
7267 CXX="$pgac_save_CXX"
7269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" >&5
7270 $as_echo "$pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" >&6; }
7271 if test x"$pgac_cv_prog_CXX_cxxflags__qvisibility_hidden" = x"yes"; then
7272 CXXFLAGS_SL_MODULE="${CXXFLAGS_SL_MODULE} -qvisibility=hidden"
7275 have_visibility_attribute=$pgac_cv_prog_CC_cflags__qvisibility_hidden
7276 # Old xlc versions (<13.1) don't have support for -qvisibility. Use expfull to force
7277 # all extension module symbols to be exported.
7278 if test "$pgac_cv_prog_CC_cflags__qvisibility_hidden" != "yes"; then
7279 CFLAGS_SL_MODULE="$CFLAGS_SL_MODULE -Wl,-b,expfull"
7283 if test "$have_visibility_attribute" = "yes"; then
7285 $as_echo "#define HAVE_VISIBILITY_ATTRIBUTE 1" >>confdefs.h
7294 # Determine flags used to emit bitcode for JIT inlining.
7295 # 1. We must duplicate any behaviour-changing compiler flags used above,
7296 # to keep compatibility with the compiler used for normal Postgres code.
7297 # 2. We don't bother to duplicate extra-warnings switches --- seeing a
7298 # warning in the main build is enough.
7299 # 3. But we must duplicate -Wno-warning flags, else we'll see those anyway.
7300 if test "$with_llvm" = yes ; then
7301 CLANGXX="$CLANG -xc++"
7303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
7304 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
7305 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
7306 $as_echo_n "(cached) " >&6
7307 else
7308 pgac_save_CFLAGS=$CFLAGS
7309 pgac_save_CC=$CC
7310 CC=${CLANG}
7311 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7312 ac_save_c_werror_flag=$ac_c_werror_flag
7313 ac_c_werror_flag=yes
7314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7315 /* end confdefs.h. */
7318 main ()
7322 return 0;
7324 _ACEOF
7325 if ac_fn_c_try_compile "$LINENO"; then :
7326 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
7327 else
7328 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
7330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7331 ac_c_werror_flag=$ac_save_c_werror_flag
7332 CFLAGS="$pgac_save_CFLAGS"
7333 CC="$pgac_save_CC"
7335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
7336 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
7337 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
7338 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
7342 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
7343 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
7344 $as_echo_n "(cached) " >&6
7345 else
7346 pgac_save_CXXFLAGS=$CXXFLAGS
7347 pgac_save_CXX=$CXX
7348 CXX=${CLANGXX}
7349 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7350 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7351 ac_cxx_werror_flag=yes
7352 ac_ext=cpp
7353 ac_cpp='$CXXCPP $CPPFLAGS'
7354 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7355 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7356 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7359 /* end confdefs.h. */
7362 main ()
7366 return 0;
7368 _ACEOF
7369 if ac_fn_cxx_try_compile "$LINENO"; then :
7370 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
7371 else
7372 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
7374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7375 ac_ext=c
7376 ac_cpp='$CPP $CPPFLAGS'
7377 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7378 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7379 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7381 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7382 CXXFLAGS="$pgac_save_CXXFLAGS"
7383 CXX="$pgac_save_CXX"
7385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
7386 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
7387 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
7388 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
7392 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
7393 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
7394 $as_echo_n "(cached) " >&6
7395 else
7396 pgac_save_CFLAGS=$CFLAGS
7397 pgac_save_CC=$CC
7398 CC=${CLANG}
7399 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7400 ac_save_c_werror_flag=$ac_c_werror_flag
7401 ac_c_werror_flag=yes
7402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7403 /* end confdefs.h. */
7406 main ()
7410 return 0;
7412 _ACEOF
7413 if ac_fn_c_try_compile "$LINENO"; then :
7414 pgac_cv_prog_CLANG_cflags__fwrapv=yes
7415 else
7416 pgac_cv_prog_CLANG_cflags__fwrapv=no
7418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7419 ac_c_werror_flag=$ac_save_c_werror_flag
7420 CFLAGS="$pgac_save_CFLAGS"
7421 CC="$pgac_save_CC"
7423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
7424 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
7425 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
7426 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
7430 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
7431 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
7432 $as_echo_n "(cached) " >&6
7433 else
7434 pgac_save_CXXFLAGS=$CXXFLAGS
7435 pgac_save_CXX=$CXX
7436 CXX=${CLANGXX}
7437 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7438 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7439 ac_cxx_werror_flag=yes
7440 ac_ext=cpp
7441 ac_cpp='$CXXCPP $CPPFLAGS'
7442 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7443 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7444 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7447 /* end confdefs.h. */
7450 main ()
7454 return 0;
7456 _ACEOF
7457 if ac_fn_cxx_try_compile "$LINENO"; then :
7458 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
7459 else
7460 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
7462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7463 ac_ext=c
7464 ac_cpp='$CPP $CPPFLAGS'
7465 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7466 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7467 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7469 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7470 CXXFLAGS="$pgac_save_CXXFLAGS"
7471 CXX="$pgac_save_CXX"
7473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
7474 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
7475 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
7476 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
7480 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
7481 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
7482 $as_echo_n "(cached) " >&6
7483 else
7484 pgac_save_CFLAGS=$CFLAGS
7485 pgac_save_CC=$CC
7486 CC=${CLANG}
7487 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7488 ac_save_c_werror_flag=$ac_c_werror_flag
7489 ac_c_werror_flag=yes
7490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7491 /* end confdefs.h. */
7494 main ()
7498 return 0;
7500 _ACEOF
7501 if ac_fn_c_try_compile "$LINENO"; then :
7502 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
7503 else
7504 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7506 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7507 ac_c_werror_flag=$ac_save_c_werror_flag
7508 CFLAGS="$pgac_save_CFLAGS"
7509 CC="$pgac_save_CC"
7511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7512 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7513 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7514 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7518 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7519 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7520 $as_echo_n "(cached) " >&6
7521 else
7522 pgac_save_CXXFLAGS=$CXXFLAGS
7523 pgac_save_CXX=$CXX
7524 CXX=${CLANGXX}
7525 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7526 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7527 ac_cxx_werror_flag=yes
7528 ac_ext=cpp
7529 ac_cpp='$CXXCPP $CPPFLAGS'
7530 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7531 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7532 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7535 /* end confdefs.h. */
7538 main ()
7542 return 0;
7544 _ACEOF
7545 if ac_fn_cxx_try_compile "$LINENO"; then :
7546 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7547 else
7548 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7550 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7551 ac_ext=c
7552 ac_cpp='$CPP $CPPFLAGS'
7553 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7554 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7555 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7557 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7558 CXXFLAGS="$pgac_save_CXXFLAGS"
7559 CXX="$pgac_save_CXX"
7561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7562 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7563 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7564 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS" >&5
7569 $as_echo_n "checking whether ${CLANG} supports -Xclang -no-opaque-pointers, for BITCODE_CFLAGS... " >&6; }
7570 if ${pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers+:} false; then :
7571 $as_echo_n "(cached) " >&6
7572 else
7573 pgac_save_CFLAGS=$CFLAGS
7574 pgac_save_CC=$CC
7575 CC=${CLANG}
7576 CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers"
7577 ac_save_c_werror_flag=$ac_c_werror_flag
7578 ac_c_werror_flag=yes
7579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7580 /* end confdefs.h. */
7583 main ()
7587 return 0;
7589 _ACEOF
7590 if ac_fn_c_try_compile "$LINENO"; then :
7591 pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=yes
7592 else
7593 pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers=no
7595 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7596 ac_c_werror_flag=$ac_save_c_werror_flag
7597 CFLAGS="$pgac_save_CFLAGS"
7598 CC="$pgac_save_CC"
7600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&5
7601 $as_echo "$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" >&6; }
7602 if test x"$pgac_cv_prog_CLANG_cflags__Xclang__no_opaque_pointers" = x"yes"; then
7603 BITCODE_CFLAGS="${BITCODE_CFLAGS} -Xclang -no-opaque-pointers"
7606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS" >&5
7607 $as_echo_n "checking whether ${CLANGXX} supports -Xclang -no-opaque-pointers, for BITCODE_CXXFLAGS... " >&6; }
7608 if ${pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers+:} false; then :
7609 $as_echo_n "(cached) " >&6
7610 else
7611 pgac_save_CXXFLAGS=$CXXFLAGS
7612 pgac_save_CXX=$CXX
7613 CXX=${CLANGXX}
7614 CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers"
7615 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7616 ac_cxx_werror_flag=yes
7617 ac_ext=cpp
7618 ac_cpp='$CXXCPP $CPPFLAGS'
7619 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7620 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7621 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7624 /* end confdefs.h. */
7627 main ()
7631 return 0;
7633 _ACEOF
7634 if ac_fn_cxx_try_compile "$LINENO"; then :
7635 pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=yes
7636 else
7637 pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers=no
7639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7640 ac_ext=c
7641 ac_cpp='$CPP $CPPFLAGS'
7642 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7643 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7644 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7646 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7647 CXXFLAGS="$pgac_save_CXXFLAGS"
7648 CXX="$pgac_save_CXX"
7650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&5
7651 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" >&6; }
7652 if test x"$pgac_cv_prog_CLANGXX_cxxflags__Xclang__no_opaque_pointers" = x"yes"; then
7653 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -Xclang -no-opaque-pointers"
7657 NOT_THE_CFLAGS=""
7658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
7659 $as_echo_n "checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
7660 if ${pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument+:} false; then :
7661 $as_echo_n "(cached) " >&6
7662 else
7663 pgac_save_CFLAGS=$CFLAGS
7664 pgac_save_CC=$CC
7665 CC=${CLANG}
7666 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7667 ac_save_c_werror_flag=$ac_c_werror_flag
7668 ac_c_werror_flag=yes
7669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7670 /* end confdefs.h. */
7673 main ()
7677 return 0;
7679 _ACEOF
7680 if ac_fn_c_try_compile "$LINENO"; then :
7681 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=yes
7682 else
7683 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=no
7685 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7686 ac_c_werror_flag=$ac_save_c_werror_flag
7687 CFLAGS="$pgac_save_CFLAGS"
7688 CC="$pgac_save_CC"
7690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&5
7691 $as_echo "$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&6; }
7692 if test x"$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" = x"yes"; then
7693 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7696 if test -n "$NOT_THE_CFLAGS"; then
7697 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-unused-command-line-argument"
7699 NOT_THE_CFLAGS=""
7700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
7701 $as_echo_n "checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
7702 if ${pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro+:} false; then :
7703 $as_echo_n "(cached) " >&6
7704 else
7705 pgac_save_CFLAGS=$CFLAGS
7706 pgac_save_CC=$CC
7707 CC=${CLANG}
7708 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7709 ac_save_c_werror_flag=$ac_c_werror_flag
7710 ac_c_werror_flag=yes
7711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7712 /* end confdefs.h. */
7715 main ()
7719 return 0;
7721 _ACEOF
7722 if ac_fn_c_try_compile "$LINENO"; then :
7723 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=yes
7724 else
7725 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=no
7727 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7728 ac_c_werror_flag=$ac_save_c_werror_flag
7729 CFLAGS="$pgac_save_CFLAGS"
7730 CC="$pgac_save_CC"
7732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&5
7733 $as_echo "$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&6; }
7734 if test x"$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" = x"yes"; then
7735 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7738 if test -n "$NOT_THE_CFLAGS"; then
7739 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
7741 NOT_THE_CFLAGS=""
7742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
7743 $as_echo_n "checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
7744 if ${pgac_cv_prog_CLANG_cflags__Wformat_truncation+:} false; then :
7745 $as_echo_n "(cached) " >&6
7746 else
7747 pgac_save_CFLAGS=$CFLAGS
7748 pgac_save_CC=$CC
7749 CC=${CLANG}
7750 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7751 ac_save_c_werror_flag=$ac_c_werror_flag
7752 ac_c_werror_flag=yes
7753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7754 /* end confdefs.h. */
7757 main ()
7761 return 0;
7763 _ACEOF
7764 if ac_fn_c_try_compile "$LINENO"; then :
7765 pgac_cv_prog_CLANG_cflags__Wformat_truncation=yes
7766 else
7767 pgac_cv_prog_CLANG_cflags__Wformat_truncation=no
7769 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7770 ac_c_werror_flag=$ac_save_c_werror_flag
7771 CFLAGS="$pgac_save_CFLAGS"
7772 CC="$pgac_save_CC"
7774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&5
7775 $as_echo "$pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&6; }
7776 if test x"$pgac_cv_prog_CLANG_cflags__Wformat_truncation" = x"yes"; then
7777 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7780 if test -n "$NOT_THE_CFLAGS"; then
7781 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-format-truncation"
7783 NOT_THE_CFLAGS=""
7784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
7785 $as_echo_n "checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
7786 if ${pgac_cv_prog_CLANG_cflags__Wstringop_truncation+:} false; then :
7787 $as_echo_n "(cached) " >&6
7788 else
7789 pgac_save_CFLAGS=$CFLAGS
7790 pgac_save_CC=$CC
7791 CC=${CLANG}
7792 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7793 ac_save_c_werror_flag=$ac_c_werror_flag
7794 ac_c_werror_flag=yes
7795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7796 /* end confdefs.h. */
7799 main ()
7803 return 0;
7805 _ACEOF
7806 if ac_fn_c_try_compile "$LINENO"; then :
7807 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=yes
7808 else
7809 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=no
7811 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7812 ac_c_werror_flag=$ac_save_c_werror_flag
7813 CFLAGS="$pgac_save_CFLAGS"
7814 CC="$pgac_save_CC"
7816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&5
7817 $as_echo "$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&6; }
7818 if test x"$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" = x"yes"; then
7819 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7822 if test -n "$NOT_THE_CFLAGS"; then
7823 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-stringop-truncation"
7827 # supply -g if --enable-debug
7828 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7829 CFLAGS="$CFLAGS -g"
7832 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7833 CXXFLAGS="$CXXFLAGS -g"
7836 # enable code coverage if --enable-coverage
7837 if test "$enable_coverage" = yes; then
7838 if test "$GCC" = yes; then
7839 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7840 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7841 else
7842 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7846 # enable profiling if --enable-profiling
7847 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7848 if test "$GCC" = yes; then
7850 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7852 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7853 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7854 else
7855 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7859 # On Solaris, we need this #define to get POSIX-conforming versions
7860 # of many interfaces (sigwait, getpwuid_r, ...).
7861 if test "$PORTNAME" = "solaris"; then
7862 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
7865 # We already have this in Makefile.win32, but configure needs it too
7866 if test "$PORTNAME" = "win32"; then
7867 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7870 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7871 # user-specified flags (if any) at the end. This lets users override
7872 # the automatic additions.
7873 CFLAGS="$CFLAGS $user_CFLAGS"
7874 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7875 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7876 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7881 # The template file must set up CFLAGS_SL; we don't support user override
7884 # Check if the compiler still works with the final flag settings
7885 # (note, we're not checking that for CXX, which is optional)
7886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7887 $as_echo_n "checking whether the C compiler still works... " >&6; }
7888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7889 /* end confdefs.h. */
7892 main ()
7894 return 0;
7896 return 0;
7898 _ACEOF
7899 if ac_fn_c_try_link "$LINENO"; then :
7900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7901 $as_echo "yes" >&6; }
7902 else
7903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7904 $as_echo "no" >&6; }
7905 as_fn_error $? "cannot proceed" "$LINENO" 5
7907 rm -f core conftest.err conftest.$ac_objext \
7908 conftest$ac_exeext conftest.$ac_ext
7910 # Defend against gcc -ffast-math
7911 if test "$GCC" = yes; then
7912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7913 /* end confdefs.h. */
7916 main ()
7918 #ifdef __FAST_MATH__
7919 choke me
7920 #endif
7922 return 0;
7924 _ACEOF
7925 if ac_fn_c_try_compile "$LINENO"; then :
7927 else
7928 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7933 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7934 # versions of clang do not understand -fexcess-precision=standard, the use of
7935 # x87 floating point operations leads to problems like isinf possibly returning
7936 # false for a value that is infinite when converted from the 80bit register to
7937 # the 8byte memory representation.
7939 # Only perform the test if the compiler doesn't understand
7940 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7941 # automatically.
7942 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7944 /* end confdefs.h. */
7947 main ()
7950 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7951 choke me
7952 #endif
7955 return 0;
7957 _ACEOF
7958 if ac_fn_c_try_compile "$LINENO"; then :
7960 else
7961 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7966 ac_ext=c
7967 ac_cpp='$CPP $CPPFLAGS'
7968 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7969 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7970 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7972 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7973 # On Suns, sometimes $CPP names a directory.
7974 if test -n "$CPP" && test -d "$CPP"; then
7975 CPP=
7977 if test -z "$CPP"; then
7978 if ${ac_cv_prog_CPP+:} false; then :
7979 $as_echo_n "(cached) " >&6
7980 else
7981 # Double quotes because CPP needs to be expanded
7982 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7984 ac_preproc_ok=false
7985 for ac_c_preproc_warn_flag in '' yes
7987 # Use a header file that comes with gcc, so configuring glibc
7988 # with a fresh cross-compiler works.
7989 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7990 # <limits.h> exists even on freestanding compilers.
7991 # On the NeXT, cc -E runs the code through the compiler's parser,
7992 # not just through cpp. "Syntax error" is here to catch this case.
7993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7994 /* end confdefs.h. */
7995 #ifdef __STDC__
7996 # include <limits.h>
7997 #else
7998 # include <assert.h>
7999 #endif
8000 Syntax error
8001 _ACEOF
8002 if ac_fn_c_try_cpp "$LINENO"; then :
8004 else
8005 # Broken: fails on valid input.
8006 continue
8008 rm -f conftest.err conftest.i conftest.$ac_ext
8010 # OK, works on sane cases. Now check whether nonexistent headers
8011 # can be detected and how.
8012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8013 /* end confdefs.h. */
8014 #include <ac_nonexistent.h>
8015 _ACEOF
8016 if ac_fn_c_try_cpp "$LINENO"; then :
8017 # Broken: success on invalid input.
8018 continue
8019 else
8020 # Passes both tests.
8021 ac_preproc_ok=:
8022 break
8024 rm -f conftest.err conftest.i conftest.$ac_ext
8026 done
8027 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8028 rm -f conftest.i conftest.err conftest.$ac_ext
8029 if $ac_preproc_ok; then :
8030 break
8033 done
8034 ac_cv_prog_CPP=$CPP
8037 CPP=$ac_cv_prog_CPP
8038 else
8039 ac_cv_prog_CPP=$CPP
8041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
8042 $as_echo "$CPP" >&6; }
8043 ac_preproc_ok=false
8044 for ac_c_preproc_warn_flag in '' yes
8046 # Use a header file that comes with gcc, so configuring glibc
8047 # with a fresh cross-compiler works.
8048 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8049 # <limits.h> exists even on freestanding compilers.
8050 # On the NeXT, cc -E runs the code through the compiler's parser,
8051 # not just through cpp. "Syntax error" is here to catch this case.
8052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8053 /* end confdefs.h. */
8054 #ifdef __STDC__
8055 # include <limits.h>
8056 #else
8057 # include <assert.h>
8058 #endif
8059 Syntax error
8060 _ACEOF
8061 if ac_fn_c_try_cpp "$LINENO"; then :
8063 else
8064 # Broken: fails on valid input.
8065 continue
8067 rm -f conftest.err conftest.i conftest.$ac_ext
8069 # OK, works on sane cases. Now check whether nonexistent headers
8070 # can be detected and how.
8071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8072 /* end confdefs.h. */
8073 #include <ac_nonexistent.h>
8074 _ACEOF
8075 if ac_fn_c_try_cpp "$LINENO"; then :
8076 # Broken: success on invalid input.
8077 continue
8078 else
8079 # Passes both tests.
8080 ac_preproc_ok=:
8081 break
8083 rm -f conftest.err conftest.i conftest.$ac_ext
8085 done
8086 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
8087 rm -f conftest.i conftest.err conftest.$ac_ext
8088 if $ac_preproc_ok; then :
8090 else
8091 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8092 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8093 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
8094 See \`config.log' for more details" "$LINENO" 5; }
8097 ac_ext=c
8098 ac_cpp='$CPP $CPPFLAGS'
8099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8107 # Set up TAS assembly code if needed; the template file has now had its
8108 # chance to request this.
8110 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
8113 if test "$need_tas" = yes ; then
8114 TAS=tas.o
8115 else
8116 TAS=""
8121 cat >>confdefs.h <<_ACEOF
8122 #define DLSUFFIX "$DLSUFFIX"
8123 _ACEOF
8127 # Set up pkg_config in case we need it below
8136 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
8137 if test -n "$ac_tool_prefix"; then
8138 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8139 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
8140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8141 $as_echo_n "checking for $ac_word... " >&6; }
8142 if ${ac_cv_path_PKG_CONFIG+:} false; then :
8143 $as_echo_n "(cached) " >&6
8144 else
8145 case $PKG_CONFIG in
8146 [\\/]* | ?:[\\/]*)
8147 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8150 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8151 for as_dir in $PATH
8153 IFS=$as_save_IFS
8154 test -z "$as_dir" && as_dir=.
8155 for ac_exec_ext in '' $ac_executable_extensions; do
8156 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8157 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8158 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8159 break 2
8161 done
8162 done
8163 IFS=$as_save_IFS
8166 esac
8168 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8169 if test -n "$PKG_CONFIG"; then
8170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8171 $as_echo "$PKG_CONFIG" >&6; }
8172 else
8173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8174 $as_echo "no" >&6; }
8179 if test -z "$ac_cv_path_PKG_CONFIG"; then
8180 ac_pt_PKG_CONFIG=$PKG_CONFIG
8181 # Extract the first word of "pkg-config", so it can be a program name with args.
8182 set dummy pkg-config; ac_word=$2
8183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8184 $as_echo_n "checking for $ac_word... " >&6; }
8185 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
8186 $as_echo_n "(cached) " >&6
8187 else
8188 case $ac_pt_PKG_CONFIG in
8189 [\\/]* | ?:[\\/]*)
8190 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8193 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8194 for as_dir in $PATH
8196 IFS=$as_save_IFS
8197 test -z "$as_dir" && as_dir=.
8198 for ac_exec_ext in '' $ac_executable_extensions; do
8199 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8200 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8201 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8202 break 2
8204 done
8205 done
8206 IFS=$as_save_IFS
8209 esac
8211 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8212 if test -n "$ac_pt_PKG_CONFIG"; then
8213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
8214 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
8215 else
8216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8217 $as_echo "no" >&6; }
8220 if test "x$ac_pt_PKG_CONFIG" = x; then
8221 PKG_CONFIG=""
8222 else
8223 case $cross_compiling:$ac_tool_warned in
8224 yes:)
8225 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8226 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8227 ac_tool_warned=yes ;;
8228 esac
8229 PKG_CONFIG=$ac_pt_PKG_CONFIG
8231 else
8232 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8236 if test -n "$PKG_CONFIG"; then
8237 _pkg_min_version=0.9.0
8238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
8239 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
8240 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
8241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8242 $as_echo "yes" >&6; }
8243 else
8244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8245 $as_echo "no" >&6; }
8246 PKG_CONFIG=""
8251 # Automatic dependency tracking
8255 # Check whether --enable-depend was given.
8256 if test "${enable_depend+set}" = set; then :
8257 enableval=$enable_depend;
8258 case $enableval in
8259 yes)
8260 autodepend=yes
8266 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
8268 esac
8270 else
8271 enable_depend=no
8280 # Enable assert checks
8284 # Check whether --enable-cassert was given.
8285 if test "${enable_cassert+set}" = set; then :
8286 enableval=$enable_cassert;
8287 case $enableval in
8288 yes)
8290 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
8297 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
8299 esac
8301 else
8302 enable_cassert=no
8310 # Include directories
8312 ac_save_IFS=$IFS
8313 IFS="${IFS}${PATH_SEPARATOR}"
8314 # SRCH_INC comes from the template file
8315 for dir in $with_includes $SRCH_INC; do
8316 if test -d "$dir"; then
8317 INCLUDES="$INCLUDES -I$dir"
8318 else
8319 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
8320 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
8322 done
8323 IFS=$ac_save_IFS
8328 # Library directories
8330 ac_save_IFS=$IFS
8331 IFS="${IFS}${PATH_SEPARATOR}"
8332 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
8333 for dir in $LIBRARY_DIRS $SRCH_LIB; do
8334 if test -d "$dir"; then
8335 LIBDIRS="$LIBDIRS -L$dir"
8336 else
8337 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
8338 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
8340 done
8341 IFS=$ac_save_IFS
8344 # Enable thread-safe client libraries
8346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
8347 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
8350 # Check whether --enable-thread-safety was given.
8351 if test "${enable_thread_safety+set}" = set; then :
8352 enableval=$enable_thread_safety;
8353 case $enableval in
8354 yes)
8361 as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
8363 esac
8365 else
8366 enable_thread_safety=yes
8371 if test "$enable_thread_safety" = yes; then
8373 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
8376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
8377 $as_echo "$enable_thread_safety" >&6; }
8381 # ICU
8383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
8384 $as_echo_n "checking whether to build with ICU support... " >&6; }
8388 # Check whether --with-icu was given.
8389 if test "${with_icu+set}" = set; then :
8390 withval=$with_icu;
8391 case $withval in
8392 yes)
8394 $as_echo "#define USE_ICU 1" >>confdefs.h
8401 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
8403 esac
8405 else
8406 with_icu=yes
8408 $as_echo "#define USE_ICU 1" >>confdefs.h
8413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
8414 $as_echo "$with_icu" >&6; }
8417 if test "$with_icu" = yes; then
8419 pkg_failed=no
8420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
8421 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
8423 if test -n "$ICU_CFLAGS"; then
8424 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
8425 elif test -n "$PKG_CONFIG"; then
8426 if test -n "$PKG_CONFIG" && \
8427 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8428 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8429 ac_status=$?
8430 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8431 test $ac_status = 0; }; then
8432 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
8433 test "x$?" != "x0" && pkg_failed=yes
8434 else
8435 pkg_failed=yes
8437 else
8438 pkg_failed=untried
8440 if test -n "$ICU_LIBS"; then
8441 pkg_cv_ICU_LIBS="$ICU_LIBS"
8442 elif test -n "$PKG_CONFIG"; then
8443 if test -n "$PKG_CONFIG" && \
8444 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8445 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8446 ac_status=$?
8447 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8448 test $ac_status = 0; }; then
8449 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
8450 test "x$?" != "x0" && pkg_failed=yes
8451 else
8452 pkg_failed=yes
8454 else
8455 pkg_failed=untried
8460 if test $pkg_failed = yes; then
8461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8462 $as_echo "no" >&6; }
8464 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8465 _pkg_short_errors_supported=yes
8466 else
8467 _pkg_short_errors_supported=no
8469 if test $_pkg_short_errors_supported = yes; then
8470 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8471 else
8472 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8474 # Put the nasty error message in config.log where it belongs
8475 echo "$ICU_PKG_ERRORS" >&5
8477 as_fn_error $? "ICU library not found
8478 If you have ICU already installed, see config.log for details on the
8479 failure. It is possible the compiler isn't looking in the proper directory.
8480 Use --without-icu to disable ICU support." "$LINENO" 5
8481 elif test $pkg_failed = untried; then
8482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8483 $as_echo "no" >&6; }
8484 as_fn_error $? "ICU library not found
8485 If you have ICU already installed, see config.log for details on the
8486 failure. It is possible the compiler isn't looking in the proper directory.
8487 Use --without-icu to disable ICU support." "$LINENO" 5
8488 else
8489 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
8490 ICU_LIBS=$pkg_cv_ICU_LIBS
8491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8492 $as_echo "yes" >&6; }
8498 # Optionally build Tcl modules (PL/Tcl)
8500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
8501 $as_echo_n "checking whether to build with Tcl... " >&6; }
8505 # Check whether --with-tcl was given.
8506 if test "${with_tcl+set}" = set; then :
8507 withval=$with_tcl;
8508 case $withval in
8509 yes)
8516 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
8518 esac
8520 else
8521 with_tcl=no
8526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
8527 $as_echo "$with_tcl" >&6; }
8530 # We see if the path to the Tcl/Tk configuration scripts is specified.
8531 # This will override the use of tclsh to find the paths to search.
8536 # Check whether --with-tclconfig was given.
8537 if test "${with_tclconfig+set}" = set; then :
8538 withval=$with_tclconfig;
8539 case $withval in
8540 yes)
8541 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8544 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8549 esac
8556 # Optionally build Perl modules (PL/Perl)
8558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
8559 $as_echo_n "checking whether to build Perl modules... " >&6; }
8563 # Check whether --with-perl was given.
8564 if test "${with_perl+set}" = set; then :
8565 withval=$with_perl;
8566 case $withval in
8567 yes)
8574 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
8576 esac
8578 else
8579 with_perl=no
8584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
8585 $as_echo "$with_perl" >&6; }
8589 # Optionally build Python modules (PL/Python)
8591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
8592 $as_echo_n "checking whether to build Python modules... " >&6; }
8596 # Check whether --with-python was given.
8597 if test "${with_python+set}" = set; then :
8598 withval=$with_python;
8599 case $withval in
8600 yes)
8607 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
8609 esac
8611 else
8612 with_python=no
8617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8618 $as_echo "$with_python" >&6; }
8622 # GSSAPI
8624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
8625 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
8629 # Check whether --with-gssapi was given.
8630 if test "${with_gssapi+set}" = set; then :
8631 withval=$with_gssapi;
8632 case $withval in
8633 yes)
8636 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
8638 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
8645 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
8647 esac
8649 else
8650 with_gssapi=no
8655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
8656 $as_echo "$with_gssapi" >&6; }
8664 # Kerberos configuration parameters
8669 # Check whether --with-krb-srvnam was given.
8670 if test "${with_krb_srvnam+set}" = set; then :
8671 withval=$with_krb_srvnam;
8672 case $withval in
8673 yes)
8674 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8677 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8682 esac
8684 else
8685 with_krb_srvnam="postgres"
8691 cat >>confdefs.h <<_ACEOF
8692 #define PG_KRB_SRVNAM "$with_krb_srvnam"
8693 _ACEOF
8698 # PAM
8700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
8701 $as_echo_n "checking whether to build with PAM support... " >&6; }
8705 # Check whether --with-pam was given.
8706 if test "${with_pam+set}" = set; then :
8707 withval=$with_pam;
8708 case $withval in
8709 yes)
8711 $as_echo "#define USE_PAM 1" >>confdefs.h
8718 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
8720 esac
8722 else
8723 with_pam=no
8728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
8729 $as_echo "$with_pam" >&6; }
8733 # BSD AUTH
8735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
8736 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
8740 # Check whether --with-bsd-auth was given.
8741 if test "${with_bsd_auth+set}" = set; then :
8742 withval=$with_bsd_auth;
8743 case $withval in
8744 yes)
8746 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
8753 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8755 esac
8757 else
8758 with_bsd_auth=no
8763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8764 $as_echo "$with_bsd_auth" >&6; }
8768 # LDAP
8770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8771 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8775 # Check whether --with-ldap was given.
8776 if test "${with_ldap+set}" = set; then :
8777 withval=$with_ldap;
8778 case $withval in
8779 yes)
8781 $as_echo "#define USE_LDAP 1" >>confdefs.h
8788 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8790 esac
8792 else
8793 with_ldap=no
8798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8799 $as_echo "$with_ldap" >&6; }
8804 # Bonjour
8806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8807 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8811 # Check whether --with-bonjour was given.
8812 if test "${with_bonjour+set}" = set; then :
8813 withval=$with_bonjour;
8814 case $withval in
8815 yes)
8817 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8824 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8826 esac
8828 else
8829 with_bonjour=no
8834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8835 $as_echo "$with_bonjour" >&6; }
8839 # SELinux
8841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8842 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8846 # Check whether --with-selinux was given.
8847 if test "${with_selinux+set}" = set; then :
8848 withval=$with_selinux;
8849 case $withval in
8850 yes)
8857 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8859 esac
8861 else
8862 with_selinux=no
8868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8869 $as_echo "$with_selinux" >&6; }
8872 # Systemd
8874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8875 $as_echo_n "checking whether to build with systemd support... " >&6; }
8879 # Check whether --with-systemd was given.
8880 if test "${with_systemd+set}" = set; then :
8881 withval=$with_systemd;
8882 case $withval in
8883 yes)
8885 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8892 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8894 esac
8896 else
8897 with_systemd=no
8903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8904 $as_echo "$with_systemd" >&6; }
8907 # Readline
8912 # Check whether --with-readline was given.
8913 if test "${with_readline+set}" = set; then :
8914 withval=$with_readline;
8915 case $withval in
8916 yes)
8923 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8925 esac
8927 else
8928 with_readline=yes
8933 # readline on MinGW has problems with backslashes in psql and other bugs.
8934 # This is particularly a problem with non-US code pages.
8935 # Therefore disable its use until we understand the cause. 2004-07-20
8936 if test "$PORTNAME" = "win32"; then
8937 if test "$with_readline" = yes; then
8938 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8939 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8940 with_readline=no
8947 # Prefer libedit
8952 # Check whether --with-libedit-preferred was given.
8953 if test "${with_libedit_preferred+set}" = set; then :
8954 withval=$with_libedit_preferred;
8955 case $withval in
8956 yes)
8963 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8965 esac
8967 else
8968 with_libedit_preferred=no
8976 # UUID library
8978 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8979 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8980 # UUID library. More than one of these might be present on a given platform,
8981 # so we make the user say which one she wants.
8986 # Check whether --with-uuid was given.
8987 if test "${with_uuid+set}" = set; then :
8988 withval=$with_uuid;
8989 case $withval in
8990 yes)
8991 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8994 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8999 esac
9004 if test x"$with_uuid" = x"" ; then
9005 with_uuid=no
9010 # Check whether --with-ossp-uuid was given.
9011 if test "${with_ossp_uuid+set}" = set; then :
9012 withval=$with_ossp_uuid;
9013 case $withval in
9014 yes)
9021 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
9023 esac
9025 else
9026 with_ossp_uuid=no
9031 if test "$with_ossp_uuid" = yes ; then
9032 with_uuid=ossp
9035 if test "$with_uuid" != no ; then
9036 if test "$with_uuid" = bsd ; then
9038 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
9040 elif test "$with_uuid" = e2fs ; then
9042 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
9044 elif test "$with_uuid" = ossp ; then
9046 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
9048 else
9049 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
9056 # XML
9058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
9059 $as_echo_n "checking whether to build with XML support... " >&6; }
9063 # Check whether --with-libxml was given.
9064 if test "${with_libxml+set}" = set; then :
9065 withval=$with_libxml;
9066 case $withval in
9067 yes)
9069 $as_echo "#define USE_LIBXML 1" >>confdefs.h
9076 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
9078 esac
9080 else
9081 with_libxml=no
9086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
9087 $as_echo "$with_libxml" >&6; }
9090 if test "$with_libxml" = yes ; then
9091 # Check pkg-config, then xml2-config. But for backwards compatibility,
9092 # setting XML2_CONFIG overrides pkg-config.
9093 have_libxml2_pkg_config=no
9094 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
9096 pkg_failed=no
9097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
9098 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
9100 if test -n "$XML2_CFLAGS"; then
9101 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
9102 elif test -n "$PKG_CONFIG"; then
9103 if test -n "$PKG_CONFIG" && \
9104 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
9105 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
9106 ac_status=$?
9107 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9108 test $ac_status = 0; }; then
9109 pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
9110 test "x$?" != "x0" && pkg_failed=yes
9111 else
9112 pkg_failed=yes
9114 else
9115 pkg_failed=untried
9117 if test -n "$XML2_LIBS"; then
9118 pkg_cv_XML2_LIBS="$XML2_LIBS"
9119 elif test -n "$PKG_CONFIG"; then
9120 if test -n "$PKG_CONFIG" && \
9121 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
9122 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
9123 ac_status=$?
9124 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9125 test $ac_status = 0; }; then
9126 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
9127 test "x$?" != "x0" && pkg_failed=yes
9128 else
9129 pkg_failed=yes
9131 else
9132 pkg_failed=untried
9137 if test $pkg_failed = yes; then
9138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9139 $as_echo "no" >&6; }
9141 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9142 _pkg_short_errors_supported=yes
9143 else
9144 _pkg_short_errors_supported=no
9146 if test $_pkg_short_errors_supported = yes; then
9147 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
9148 else
9149 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
9151 # Put the nasty error message in config.log where it belongs
9152 echo "$XML2_PKG_ERRORS" >&5
9154 # do nothing
9155 elif test $pkg_failed = untried; then
9156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9157 $as_echo "no" >&6; }
9158 # do nothing
9159 else
9160 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
9161 XML2_LIBS=$pkg_cv_XML2_LIBS
9162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9163 $as_echo "yes" >&6; }
9164 have_libxml2_pkg_config=yes
9167 if test "$have_libxml2_pkg_config" = no ; then
9168 if test -z "$XML2_CONFIG"; then
9169 for ac_prog in xml2-config
9171 # Extract the first word of "$ac_prog", so it can be a program name with args.
9172 set dummy $ac_prog; ac_word=$2
9173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9174 $as_echo_n "checking for $ac_word... " >&6; }
9175 if ${ac_cv_path_XML2_CONFIG+:} false; then :
9176 $as_echo_n "(cached) " >&6
9177 else
9178 case $XML2_CONFIG in
9179 [\\/]* | ?:[\\/]*)
9180 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
9183 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9184 for as_dir in $PATH
9186 IFS=$as_save_IFS
9187 test -z "$as_dir" && as_dir=.
9188 for ac_exec_ext in '' $ac_executable_extensions; do
9189 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9190 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9191 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9192 break 2
9194 done
9195 done
9196 IFS=$as_save_IFS
9199 esac
9201 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
9202 if test -n "$XML2_CONFIG"; then
9203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
9204 $as_echo "$XML2_CONFIG" >&6; }
9205 else
9206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9207 $as_echo "no" >&6; }
9211 test -n "$XML2_CONFIG" && break
9212 done
9214 else
9215 # Report the value of XML2_CONFIG in configure's output in all cases.
9216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
9217 $as_echo_n "checking for XML2_CONFIG... " >&6; }
9218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
9219 $as_echo "$XML2_CONFIG" >&6; }
9222 if test -n "$XML2_CONFIG"; then
9223 XML2_CFLAGS=`$XML2_CONFIG --cflags`
9224 XML2_LIBS=`$XML2_CONFIG --libs`
9227 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
9228 for pgac_option in $XML2_CFLAGS; do
9229 case $pgac_option in
9230 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9231 esac
9232 done
9233 for pgac_option in $XML2_LIBS; do
9234 case $pgac_option in
9235 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9236 esac
9237 done
9242 # XSLT
9247 # Check whether --with-libxslt was given.
9248 if test "${with_libxslt+set}" = set; then :
9249 withval=$with_libxslt;
9250 case $withval in
9251 yes)
9253 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
9260 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
9262 esac
9264 else
9265 with_libxslt=no
9275 # tzdata
9280 # Check whether --with-system-tzdata was given.
9281 if test "${with_system_tzdata+set}" = set; then :
9282 withval=$with_system_tzdata;
9283 case $withval in
9284 yes)
9285 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
9288 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
9293 esac
9301 # Zlib
9306 # Check whether --with-zlib was given.
9307 if test "${with_zlib+set}" = set; then :
9308 withval=$with_zlib;
9309 case $withval in
9310 yes)
9317 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
9319 esac
9321 else
9322 with_zlib=yes
9330 # LZ4
9332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LZ4 support" >&5
9333 $as_echo_n "checking whether to build with LZ4 support... " >&6; }
9337 # Check whether --with-lz4 was given.
9338 if test "${with_lz4+set}" = set; then :
9339 withval=$with_lz4;
9340 case $withval in
9341 yes)
9343 $as_echo "#define USE_LZ4 1" >>confdefs.h
9350 as_fn_error $? "no argument expected for --with-lz4 option" "$LINENO" 5
9352 esac
9354 else
9355 with_lz4=no
9360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lz4" >&5
9361 $as_echo "$with_lz4" >&6; }
9364 if test "$with_lz4" = yes; then
9366 pkg_failed=no
9367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5
9368 $as_echo_n "checking for liblz4... " >&6; }
9370 if test -n "$LZ4_CFLAGS"; then
9371 pkg_cv_LZ4_CFLAGS="$LZ4_CFLAGS"
9372 elif test -n "$PKG_CONFIG"; then
9373 if test -n "$PKG_CONFIG" && \
9374 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9375 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9376 ac_status=$?
9377 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9378 test $ac_status = 0; }; then
9379 pkg_cv_LZ4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`
9380 test "x$?" != "x0" && pkg_failed=yes
9381 else
9382 pkg_failed=yes
9384 else
9385 pkg_failed=untried
9387 if test -n "$LZ4_LIBS"; then
9388 pkg_cv_LZ4_LIBS="$LZ4_LIBS"
9389 elif test -n "$PKG_CONFIG"; then
9390 if test -n "$PKG_CONFIG" && \
9391 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
9392 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
9393 ac_status=$?
9394 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9395 test $ac_status = 0; }; then
9396 pkg_cv_LZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`
9397 test "x$?" != "x0" && pkg_failed=yes
9398 else
9399 pkg_failed=yes
9401 else
9402 pkg_failed=untried
9407 if test $pkg_failed = yes; then
9408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9409 $as_echo "no" >&6; }
9411 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9412 _pkg_short_errors_supported=yes
9413 else
9414 _pkg_short_errors_supported=no
9416 if test $_pkg_short_errors_supported = yes; then
9417 LZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`
9418 else
9419 LZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`
9421 # Put the nasty error message in config.log where it belongs
9422 echo "$LZ4_PKG_ERRORS" >&5
9424 as_fn_error $? "Package requirements (liblz4) were not met:
9426 $LZ4_PKG_ERRORS
9428 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9429 installed software in a non-standard prefix.
9431 Alternatively, you may set the environment variables LZ4_CFLAGS
9432 and LZ4_LIBS to avoid the need to call pkg-config.
9433 See the pkg-config man page for more details." "$LINENO" 5
9434 elif test $pkg_failed = untried; then
9435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9436 $as_echo "no" >&6; }
9437 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9438 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9439 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9440 is in your PATH or set the PKG_CONFIG environment variable to the full
9441 path to pkg-config.
9443 Alternatively, you may set the environment variables LZ4_CFLAGS
9444 and LZ4_LIBS to avoid the need to call pkg-config.
9445 See the pkg-config man page for more details.
9447 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9448 See \`config.log' for more details" "$LINENO" 5; }
9449 else
9450 LZ4_CFLAGS=$pkg_cv_LZ4_CFLAGS
9451 LZ4_LIBS=$pkg_cv_LZ4_LIBS
9452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9453 $as_echo "yes" >&6; }
9456 # We only care about -I, -D, and -L switches;
9457 # note that -llz4 will be added by AC_CHECK_LIB below.
9458 for pgac_option in $LZ4_CFLAGS; do
9459 case $pgac_option in
9460 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9461 esac
9462 done
9463 for pgac_option in $LZ4_LIBS; do
9464 case $pgac_option in
9465 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9466 esac
9467 done
9471 # ZSTD
9473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ZSTD support" >&5
9474 $as_echo_n "checking whether to build with ZSTD support... " >&6; }
9478 # Check whether --with-zstd was given.
9479 if test "${with_zstd+set}" = set; then :
9480 withval=$with_zstd;
9481 case $withval in
9482 yes)
9484 $as_echo "#define USE_ZSTD 1" >>confdefs.h
9491 as_fn_error $? "no argument expected for --with-zstd option" "$LINENO" 5
9493 esac
9495 else
9496 with_zstd=no
9501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_zstd" >&5
9502 $as_echo "$with_zstd" >&6; }
9505 if test "$with_zstd" = yes; then
9507 pkg_failed=no
9508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd >= 1.4.0" >&5
9509 $as_echo_n "checking for libzstd >= 1.4.0... " >&6; }
9511 if test -n "$ZSTD_CFLAGS"; then
9512 pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"
9513 elif test -n "$PKG_CONFIG"; then
9514 if test -n "$PKG_CONFIG" && \
9515 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9516 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9517 ac_status=$?
9518 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9519 test $ac_status = 0; }; then
9520 pkg_cv_ZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd >= 1.4.0" 2>/dev/null`
9521 test "x$?" != "x0" && pkg_failed=yes
9522 else
9523 pkg_failed=yes
9525 else
9526 pkg_failed=untried
9528 if test -n "$ZSTD_LIBS"; then
9529 pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"
9530 elif test -n "$PKG_CONFIG"; then
9531 if test -n "$PKG_CONFIG" && \
9532 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9533 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9534 ac_status=$?
9535 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9536 test $ac_status = 0; }; then
9537 pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd >= 1.4.0" 2>/dev/null`
9538 test "x$?" != "x0" && pkg_failed=yes
9539 else
9540 pkg_failed=yes
9542 else
9543 pkg_failed=untried
9548 if test $pkg_failed = yes; then
9549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9550 $as_echo "no" >&6; }
9552 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9553 _pkg_short_errors_supported=yes
9554 else
9555 _pkg_short_errors_supported=no
9557 if test $_pkg_short_errors_supported = yes; then
9558 ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9559 else
9560 ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9562 # Put the nasty error message in config.log where it belongs
9563 echo "$ZSTD_PKG_ERRORS" >&5
9565 as_fn_error $? "Package requirements (libzstd >= 1.4.0) were not met:
9567 $ZSTD_PKG_ERRORS
9569 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9570 installed software in a non-standard prefix.
9572 Alternatively, you may set the environment variables ZSTD_CFLAGS
9573 and ZSTD_LIBS to avoid the need to call pkg-config.
9574 See the pkg-config man page for more details." "$LINENO" 5
9575 elif test $pkg_failed = untried; then
9576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9577 $as_echo "no" >&6; }
9578 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9579 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9580 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9581 is in your PATH or set the PKG_CONFIG environment variable to the full
9582 path to pkg-config.
9584 Alternatively, you may set the environment variables ZSTD_CFLAGS
9585 and ZSTD_LIBS to avoid the need to call pkg-config.
9586 See the pkg-config man page for more details.
9588 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9589 See \`config.log' for more details" "$LINENO" 5; }
9590 else
9591 ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS
9592 ZSTD_LIBS=$pkg_cv_ZSTD_LIBS
9593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9594 $as_echo "yes" >&6; }
9597 # We only care about -I, -D, and -L switches;
9598 # note that -lzstd will be added by AC_CHECK_LIB below.
9599 for pgac_option in $ZSTD_CFLAGS; do
9600 case $pgac_option in
9601 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9602 esac
9603 done
9604 for pgac_option in $ZSTD_LIBS; do
9605 case $pgac_option in
9606 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9607 esac
9608 done
9611 # Assignments
9614 CPPFLAGS="$CPPFLAGS $INCLUDES"
9615 LDFLAGS="$LDFLAGS $LIBDIRS"
9621 if test -n "$ac_tool_prefix"; then
9622 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9623 set dummy ${ac_tool_prefix}strip; ac_word=$2
9624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9625 $as_echo_n "checking for $ac_word... " >&6; }
9626 if ${ac_cv_prog_STRIP+:} false; then :
9627 $as_echo_n "(cached) " >&6
9628 else
9629 if test -n "$STRIP"; then
9630 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9631 else
9632 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9633 for as_dir in $PATH
9635 IFS=$as_save_IFS
9636 test -z "$as_dir" && as_dir=.
9637 for ac_exec_ext in '' $ac_executable_extensions; do
9638 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9639 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9640 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9641 break 2
9643 done
9644 done
9645 IFS=$as_save_IFS
9649 STRIP=$ac_cv_prog_STRIP
9650 if test -n "$STRIP"; then
9651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9652 $as_echo "$STRIP" >&6; }
9653 else
9654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9655 $as_echo "no" >&6; }
9660 if test -z "$ac_cv_prog_STRIP"; then
9661 ac_ct_STRIP=$STRIP
9662 # Extract the first word of "strip", so it can be a program name with args.
9663 set dummy strip; ac_word=$2
9664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9665 $as_echo_n "checking for $ac_word... " >&6; }
9666 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
9667 $as_echo_n "(cached) " >&6
9668 else
9669 if test -n "$ac_ct_STRIP"; then
9670 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9671 else
9672 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9673 for as_dir in $PATH
9675 IFS=$as_save_IFS
9676 test -z "$as_dir" && as_dir=.
9677 for ac_exec_ext in '' $ac_executable_extensions; do
9678 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9679 ac_cv_prog_ac_ct_STRIP="strip"
9680 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9681 break 2
9683 done
9684 done
9685 IFS=$as_save_IFS
9689 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9690 if test -n "$ac_ct_STRIP"; then
9691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9692 $as_echo "$ac_ct_STRIP" >&6; }
9693 else
9694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9695 $as_echo "no" >&6; }
9698 if test "x$ac_ct_STRIP" = x; then
9699 STRIP=":"
9700 else
9701 case $cross_compiling:$ac_tool_warned in
9702 yes:)
9703 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9704 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9705 ac_tool_warned=yes ;;
9706 esac
9707 STRIP=$ac_ct_STRIP
9709 else
9710 STRIP="$ac_cv_prog_STRIP"
9714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9715 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9716 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9717 STRIP_STATIC_LIB="$STRIP --strip-unneeded"
9718 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9720 $as_echo "yes" >&6; }
9721 else
9722 case $host_os in
9723 darwin*)
9724 STRIP="$STRIP -x"
9725 STRIP_STATIC_LIB=$STRIP
9726 STRIP_SHARED_LIB=$STRIP
9727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9728 $as_echo "yes" >&6; }
9731 STRIP_STATIC_LIB=:
9732 STRIP_SHARED_LIB=:
9733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9734 $as_echo "no" >&6; }
9736 esac
9741 if test -n "$ac_tool_prefix"; then
9742 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9743 set dummy ${ac_tool_prefix}ar; ac_word=$2
9744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9745 $as_echo_n "checking for $ac_word... " >&6; }
9746 if ${ac_cv_prog_AR+:} false; then :
9747 $as_echo_n "(cached) " >&6
9748 else
9749 if test -n "$AR"; then
9750 ac_cv_prog_AR="$AR" # Let the user override the test.
9751 else
9752 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9753 for as_dir in $PATH
9755 IFS=$as_save_IFS
9756 test -z "$as_dir" && as_dir=.
9757 for ac_exec_ext in '' $ac_executable_extensions; do
9758 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9759 ac_cv_prog_AR="${ac_tool_prefix}ar"
9760 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9761 break 2
9763 done
9764 done
9765 IFS=$as_save_IFS
9769 AR=$ac_cv_prog_AR
9770 if test -n "$AR"; then
9771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9772 $as_echo "$AR" >&6; }
9773 else
9774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9775 $as_echo "no" >&6; }
9780 if test -z "$ac_cv_prog_AR"; then
9781 ac_ct_AR=$AR
9782 # Extract the first word of "ar", so it can be a program name with args.
9783 set dummy ar; ac_word=$2
9784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9785 $as_echo_n "checking for $ac_word... " >&6; }
9786 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9787 $as_echo_n "(cached) " >&6
9788 else
9789 if test -n "$ac_ct_AR"; then
9790 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9791 else
9792 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9793 for as_dir in $PATH
9795 IFS=$as_save_IFS
9796 test -z "$as_dir" && as_dir=.
9797 for ac_exec_ext in '' $ac_executable_extensions; do
9798 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9799 ac_cv_prog_ac_ct_AR="ar"
9800 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9801 break 2
9803 done
9804 done
9805 IFS=$as_save_IFS
9809 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9810 if test -n "$ac_ct_AR"; then
9811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9812 $as_echo "$ac_ct_AR" >&6; }
9813 else
9814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9815 $as_echo "no" >&6; }
9818 if test "x$ac_ct_AR" = x; then
9819 AR="ar"
9820 else
9821 case $cross_compiling:$ac_tool_warned in
9822 yes:)
9823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9824 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9825 ac_tool_warned=yes ;;
9826 esac
9827 AR=$ac_ct_AR
9829 else
9830 AR="$ac_cv_prog_AR"
9833 if test "$PORTNAME" = "win32"; then
9834 if test -n "$ac_tool_prefix"; then
9835 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9836 set dummy ${ac_tool_prefix}windres; ac_word=$2
9837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9838 $as_echo_n "checking for $ac_word... " >&6; }
9839 if ${ac_cv_prog_WINDRES+:} false; then :
9840 $as_echo_n "(cached) " >&6
9841 else
9842 if test -n "$WINDRES"; then
9843 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9844 else
9845 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9846 for as_dir in $PATH
9848 IFS=$as_save_IFS
9849 test -z "$as_dir" && as_dir=.
9850 for ac_exec_ext in '' $ac_executable_extensions; do
9851 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9852 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9853 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9854 break 2
9856 done
9857 done
9858 IFS=$as_save_IFS
9862 WINDRES=$ac_cv_prog_WINDRES
9863 if test -n "$WINDRES"; then
9864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9865 $as_echo "$WINDRES" >&6; }
9866 else
9867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9868 $as_echo "no" >&6; }
9873 if test -z "$ac_cv_prog_WINDRES"; then
9874 ac_ct_WINDRES=$WINDRES
9875 # Extract the first word of "windres", so it can be a program name with args.
9876 set dummy windres; ac_word=$2
9877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9878 $as_echo_n "checking for $ac_word... " >&6; }
9879 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9880 $as_echo_n "(cached) " >&6
9881 else
9882 if test -n "$ac_ct_WINDRES"; then
9883 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9884 else
9885 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9886 for as_dir in $PATH
9888 IFS=$as_save_IFS
9889 test -z "$as_dir" && as_dir=.
9890 for ac_exec_ext in '' $ac_executable_extensions; do
9891 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9892 ac_cv_prog_ac_ct_WINDRES="windres"
9893 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9894 break 2
9896 done
9897 done
9898 IFS=$as_save_IFS
9902 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9903 if test -n "$ac_ct_WINDRES"; then
9904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9905 $as_echo "$ac_ct_WINDRES" >&6; }
9906 else
9907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9908 $as_echo "no" >&6; }
9911 if test "x$ac_ct_WINDRES" = x; then
9912 WINDRES="windres"
9913 else
9914 case $cross_compiling:$ac_tool_warned in
9915 yes:)
9916 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9917 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9918 ac_tool_warned=yes ;;
9919 esac
9920 WINDRES=$ac_ct_WINDRES
9922 else
9923 WINDRES="$ac_cv_prog_WINDRES"
9928 # Find a good install program. We prefer a C program (faster),
9929 # so one script is as good as another. But avoid the broken or
9930 # incompatible versions:
9931 # SysV /etc/install, /usr/sbin/install
9932 # SunOS /usr/etc/install
9933 # IRIX /sbin/install
9934 # AIX /bin/install
9935 # AmigaOS /C/install, which installs bootblocks on floppy discs
9936 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9937 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9938 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9939 # OS/2's system install, which has a completely different semantic
9940 # ./install, which can be erroneously created by make from ./install.sh.
9941 # Reject install programs that cannot install multiple files.
9942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9943 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9944 if test -z "$INSTALL"; then
9945 if ${ac_cv_path_install+:} false; then :
9946 $as_echo_n "(cached) " >&6
9947 else
9948 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9949 for as_dir in $PATH
9951 IFS=$as_save_IFS
9952 test -z "$as_dir" && as_dir=.
9953 # Account for people who put trailing slashes in PATH elements.
9954 case $as_dir/ in #((
9955 ./ | .// | /[cC]/* | \
9956 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9957 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9958 /usr/ucb/* ) ;;
9960 # OSF1 and SCO ODT 3.0 have their own names for install.
9961 # Don't use installbsd from OSF since it installs stuff as root
9962 # by default.
9963 for ac_prog in ginstall scoinst install; do
9964 for ac_exec_ext in '' $ac_executable_extensions; do
9965 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9966 if test $ac_prog = install &&
9967 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9968 # AIX install. It has an incompatible calling convention.
9970 elif test $ac_prog = install &&
9971 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9972 # program-specific install script used by HP pwplus--don't use.
9974 else
9975 rm -rf conftest.one conftest.two conftest.dir
9976 echo one > conftest.one
9977 echo two > conftest.two
9978 mkdir conftest.dir
9979 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9980 test -s conftest.one && test -s conftest.two &&
9981 test -s conftest.dir/conftest.one &&
9982 test -s conftest.dir/conftest.two
9983 then
9984 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9985 break 3
9989 done
9990 done
9992 esac
9994 done
9995 IFS=$as_save_IFS
9997 rm -rf conftest.one conftest.two conftest.dir
10000 if test "${ac_cv_path_install+set}" = set; then
10001 INSTALL=$ac_cv_path_install
10002 else
10003 # As a last resort, use the slow shell script. Don't cache a
10004 # value for INSTALL within a source directory, because that will
10005 # break other packages using the cache if that directory is
10006 # removed, or if the value is a relative name.
10007 INSTALL=$ac_install_sh
10010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
10011 $as_echo "$INSTALL" >&6; }
10013 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
10014 # It thinks the first close brace ends the variable substitution.
10015 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
10017 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
10019 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
10021 # When Autoconf chooses install-sh as install program it tries to generate
10022 # a relative path to it in each makefile where it substitutes it. This clashes
10023 # with our Makefile.global concept. This workaround helps.
10024 case $INSTALL in
10025 *install-sh*) install_bin='';;
10026 *) install_bin=$INSTALL;;
10027 esac
10030 if test -z "$TAR"; then
10031 for ac_prog in tar
10033 # Extract the first word of "$ac_prog", so it can be a program name with args.
10034 set dummy $ac_prog; ac_word=$2
10035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10036 $as_echo_n "checking for $ac_word... " >&6; }
10037 if ${ac_cv_path_TAR+:} false; then :
10038 $as_echo_n "(cached) " >&6
10039 else
10040 case $TAR in
10041 [\\/]* | ?:[\\/]*)
10042 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10046 for as_dir in $PATH
10048 IFS=$as_save_IFS
10049 test -z "$as_dir" && as_dir=.
10050 for ac_exec_ext in '' $ac_executable_extensions; do
10051 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10052 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10053 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10054 break 2
10056 done
10057 done
10058 IFS=$as_save_IFS
10061 esac
10063 TAR=$ac_cv_path_TAR
10064 if test -n "$TAR"; then
10065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10066 $as_echo "$TAR" >&6; }
10067 else
10068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10069 $as_echo "no" >&6; }
10073 test -n "$TAR" && break
10074 done
10076 else
10077 # Report the value of TAR in configure's output in all cases.
10078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10079 $as_echo_n "checking for TAR... " >&6; }
10080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10081 $as_echo "$TAR" >&6; }
10084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
10085 $as_echo_n "checking whether ln -s works... " >&6; }
10086 LN_S=$as_ln_s
10087 if test "$LN_S" = "ln -s"; then
10088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10089 $as_echo "yes" >&6; }
10090 else
10091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
10092 $as_echo "no, using $LN_S" >&6; }
10095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
10096 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
10097 if test -z "$MKDIR_P"; then
10098 if ${ac_cv_path_mkdir+:} false; then :
10099 $as_echo_n "(cached) " >&6
10100 else
10101 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10102 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
10104 IFS=$as_save_IFS
10105 test -z "$as_dir" && as_dir=.
10106 for ac_prog in mkdir gmkdir; do
10107 for ac_exec_ext in '' $ac_executable_extensions; do
10108 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
10109 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
10110 'mkdir (GNU coreutils) '* | \
10111 'mkdir (coreutils) '* | \
10112 'mkdir (fileutils) '4.1*)
10113 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
10114 break 3;;
10115 esac
10116 done
10117 done
10118 done
10119 IFS=$as_save_IFS
10123 test -d ./--version && rmdir ./--version
10124 if test "${ac_cv_path_mkdir+set}" = set; then
10125 MKDIR_P="$ac_cv_path_mkdir -p"
10126 else
10127 # As a last resort, use the slow shell script. Don't cache a
10128 # value for MKDIR_P within a source directory, because that will
10129 # break other packages using the cache if that directory is
10130 # removed, or if the value is a relative name.
10131 MKDIR_P="$ac_install_sh -d"
10134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
10135 $as_echo "$MKDIR_P" >&6; }
10137 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
10138 # a relative path to it in each makefile where it substitutes it. This clashes
10139 # with our Makefile.global concept. This workaround helps.
10140 case $MKDIR_P in
10141 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
10142 esac
10144 if test -z "$BISON"; then
10145 for ac_prog in bison
10147 # Extract the first word of "$ac_prog", so it can be a program name with args.
10148 set dummy $ac_prog; ac_word=$2
10149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10150 $as_echo_n "checking for $ac_word... " >&6; }
10151 if ${ac_cv_path_BISON+:} false; then :
10152 $as_echo_n "(cached) " >&6
10153 else
10154 case $BISON in
10155 [\\/]* | ?:[\\/]*)
10156 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
10159 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10160 for as_dir in $PATH
10162 IFS=$as_save_IFS
10163 test -z "$as_dir" && as_dir=.
10164 for ac_exec_ext in '' $ac_executable_extensions; do
10165 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10166 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
10167 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10168 break 2
10170 done
10171 done
10172 IFS=$as_save_IFS
10175 esac
10177 BISON=$ac_cv_path_BISON
10178 if test -n "$BISON"; then
10179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
10180 $as_echo "$BISON" >&6; }
10181 else
10182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10183 $as_echo "no" >&6; }
10187 test -n "$BISON" && break
10188 done
10190 else
10191 # Report the value of BISON in configure's output in all cases.
10192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
10193 $as_echo_n "checking for BISON... " >&6; }
10194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
10195 $as_echo "$BISON" >&6; }
10199 if test "$BISON"; then
10200 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
10201 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
10202 $as_echo "$as_me: using $pgac_bison_version" >&6;}
10203 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 2.3) exit 0; else exit 1;}'
10204 then
10205 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10206 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
10207 *** Bison version 2.3 or later is required, but this is $pgac_bison_version." >&5
10208 $as_echo "$as_me: WARNING:
10209 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
10210 *** Bison version 2.3 or later is required, but this is $pgac_bison_version." >&2;}
10211 BISON=""
10213 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
10214 # of the now preferred %name-prefix "base_yy", but the latter
10215 # doesn't work with Bison 2.3 or less. So for now we silence the
10216 # deprecation warnings.
10217 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
10218 then
10219 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
10223 if test -z "$BISON"; then
10224 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10225 *** Without Bison you will not be able to build PostgreSQL from Git nor
10226 *** change any of the parser definition files. You can obtain Bison from
10227 *** a GNU mirror site. (If you are using the official distribution of
10228 *** PostgreSQL then you do not need to worry about this, because the Bison
10229 *** output is pre-generated.)" >&5
10230 $as_echo "$as_me: WARNING:
10231 *** Without Bison you will not be able to build PostgreSQL from Git nor
10232 *** change any of the parser definition files. You can obtain Bison from
10233 *** a GNU mirror site. (If you are using the official distribution of
10234 *** PostgreSQL then you do not need to worry about this, because the Bison
10235 *** output is pre-generated.)" >&2;}
10239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
10240 $as_echo_n "checking for flex... " >&6; }
10241 if ${pgac_cv_path_flex+:} false; then :
10242 $as_echo_n "(cached) " >&6
10243 else
10244 # Let the user override the test
10245 if test -n "$FLEX"; then
10246 pgac_cv_path_flex=$FLEX
10247 else
10248 pgac_save_IFS=$IFS
10249 IFS=$PATH_SEPARATOR
10250 for pgac_dir in $PATH; do
10251 IFS=$pgac_save_IFS
10252 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
10253 pgac_dir=`pwd`
10255 for pgac_prog in flex lex; do
10256 pgac_candidate="$pgac_dir/$pgac_prog"
10257 if test -f "$pgac_candidate" \
10258 && $pgac_candidate --version </dev/null >/dev/null 2>&1
10259 then
10260 echo '%%' > conftest.l
10261 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
10262 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
10263 if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 == 2 && ($2 > 5 || ($2 == 5 && $3 >= 35))) exit 0; else exit 1;}'
10264 then
10265 pgac_cv_path_flex=$pgac_candidate
10266 break 2
10267 else
10268 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10269 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10270 *** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." >&5
10271 $as_echo "$as_me: WARNING:
10272 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10273 *** Flex version 2.5.35 or later is required, but this is $pgac_flex_version." >&2;}
10277 done
10278 done
10279 rm -f conftest.l lex.yy.c
10280 : ${pgac_cv_path_flex=no}
10284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
10285 $as_echo "$pgac_cv_path_flex" >&6; }
10286 if test x"$pgac_cv_path_flex" = x"no"; then
10287 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10288 *** Without Flex you will not be able to build PostgreSQL from Git nor
10289 *** change any of the scanner definition files. You can obtain Flex from
10290 *** a GNU mirror site. (If you are using the official distribution of
10291 *** PostgreSQL then you do not need to worry about this because the Flex
10292 *** output is pre-generated.)" >&5
10293 $as_echo "$as_me: WARNING:
10294 *** Without Flex you will not be able to build PostgreSQL from Git nor
10295 *** change any of the scanner definition files. You can obtain Flex from
10296 *** a GNU mirror site. (If you are using the official distribution of
10297 *** PostgreSQL then you do not need to worry about this because the Flex
10298 *** output is pre-generated.)" >&2;}
10300 FLEX=
10301 else
10302 FLEX=$pgac_cv_path_flex
10303 pgac_flex_version=`$FLEX --version 2>/dev/null`
10304 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
10305 $as_echo "$as_me: using $pgac_flex_version" >&6;}
10312 if test -z "$PERL"; then
10313 for ac_prog in perl
10315 # Extract the first word of "$ac_prog", so it can be a program name with args.
10316 set dummy $ac_prog; ac_word=$2
10317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10318 $as_echo_n "checking for $ac_word... " >&6; }
10319 if ${ac_cv_path_PERL+:} false; then :
10320 $as_echo_n "(cached) " >&6
10321 else
10322 case $PERL in
10323 [\\/]* | ?:[\\/]*)
10324 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
10327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10328 for as_dir in $PATH
10330 IFS=$as_save_IFS
10331 test -z "$as_dir" && as_dir=.
10332 for ac_exec_ext in '' $ac_executable_extensions; do
10333 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10334 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
10335 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10336 break 2
10338 done
10339 done
10340 IFS=$as_save_IFS
10343 esac
10345 PERL=$ac_cv_path_PERL
10346 if test -n "$PERL"; then
10347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10348 $as_echo "$PERL" >&6; }
10349 else
10350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10351 $as_echo "no" >&6; }
10355 test -n "$PERL" && break
10356 done
10358 else
10359 # Report the value of PERL in configure's output in all cases.
10360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
10361 $as_echo_n "checking for PERL... " >&6; }
10362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10363 $as_echo "$PERL" >&6; }
10367 if test "$PERL"; then
10368 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'`
10369 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
10370 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
10371 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
10372 $AWK '{ if ($1 == 5 && ($2 >= 14)) exit 1; else exit 0;}'
10373 then
10374 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10375 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10376 *** Perl version 5.14 or later is required, but this is $pgac_perl_version." >&5
10377 $as_echo "$as_me: WARNING:
10378 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10379 *** Perl version 5.14 or later is required, but this is $pgac_perl_version." >&2;}
10380 PERL=""
10384 if test -z "$PERL"; then
10385 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10386 *** Without Perl you will not be able to build PostgreSQL from Git.
10387 *** You can obtain Perl from any CPAN mirror site.
10388 *** (If you are using the official distribution of PostgreSQL then you do not
10389 *** need to worry about this, because the Perl output is pre-generated.)" >&5
10390 $as_echo "$as_me: WARNING:
10391 *** Without Perl you will not be able to build PostgreSQL from Git.
10392 *** You can obtain Perl from any CPAN mirror site.
10393 *** (If you are using the official distribution of PostgreSQL then you do not
10394 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
10397 if test "$with_perl" = yes; then
10398 if test -z "$PERL"; then
10399 as_fn_error $? "Perl not found" "$LINENO" 5
10402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
10403 $as_echo_n "checking for Perl archlibexp... " >&6; }
10404 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
10405 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
10406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
10407 $as_echo "$perl_archlibexp" >&6; }
10408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
10409 $as_echo_n "checking for Perl privlibexp... " >&6; }
10410 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
10411 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
10412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
10413 $as_echo "$perl_privlibexp" >&6; }
10414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
10415 $as_echo_n "checking for Perl useshrplib... " >&6; }
10416 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
10417 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
10418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
10419 $as_echo "$perl_useshrplib" >&6; }
10420 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
10421 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
10422 You might have to rebuild your Perl installation. Refer to the
10423 documentation for details. Use --without-perl to disable building
10424 PL/Perl." "$LINENO" 5
10426 # On most platforms, archlibexp is also where the Perl include files live ...
10427 perl_includespec="-I$perl_archlibexp/CORE"
10428 # ... but on newer macOS versions, we must use -iwithsysroot to look
10429 # under $PG_SYSROOT
10430 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
10431 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
10432 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
10436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
10437 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
10438 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
10439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
10440 $as_echo "$perl_ccflags" >&6; }
10441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
10442 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
10443 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
10444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
10445 $as_echo "$perl_embed_ccflags" >&6; }
10448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
10449 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
10450 if test "$PORTNAME" = "win32" ; then
10451 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
10452 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
10453 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10454 else
10455 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
10456 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
10457 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10460 else
10461 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
10462 pgac_tmp2=`$PERL -MConfig -e 'print "$Config{ccdlflags} $Config{ldflags}"'`
10463 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%"`
10465 if test -z "$perl_embed_ldflags" ; then
10466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10467 $as_echo "no" >&6; }
10468 as_fn_error $? "could not determine flags for linking embedded Perl.
10469 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
10470 installed." "$LINENO" 5
10471 else
10472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
10473 $as_echo "$perl_embed_ldflags" >&6; }
10478 if test "$with_python" = yes; then
10479 if test -z "$PYTHON"; then
10480 for ac_prog in python3 python
10482 # Extract the first word of "$ac_prog", so it can be a program name with args.
10483 set dummy $ac_prog; ac_word=$2
10484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10485 $as_echo_n "checking for $ac_word... " >&6; }
10486 if ${ac_cv_path_PYTHON+:} false; then :
10487 $as_echo_n "(cached) " >&6
10488 else
10489 case $PYTHON in
10490 [\\/]* | ?:[\\/]*)
10491 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10494 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10495 for as_dir in $PATH
10497 IFS=$as_save_IFS
10498 test -z "$as_dir" && as_dir=.
10499 for ac_exec_ext in '' $ac_executable_extensions; do
10500 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10501 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
10502 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10503 break 2
10505 done
10506 done
10507 IFS=$as_save_IFS
10510 esac
10512 PYTHON=$ac_cv_path_PYTHON
10513 if test -n "$PYTHON"; then
10514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10515 $as_echo "$PYTHON" >&6; }
10516 else
10517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10518 $as_echo "no" >&6; }
10522 test -n "$PYTHON" && break
10523 done
10525 else
10526 # Report the value of PYTHON in configure's output in all cases.
10527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10528 $as_echo_n "checking for PYTHON... " >&6; }
10529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10530 $as_echo "$PYTHON" >&6; }
10533 if test x"$PYTHON" = x""; then
10534 as_fn_error $? "Python not found" "$LINENO" 5
10538 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10539 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10540 $as_echo "$as_me: using python $python_fullversion" >&6;}
10541 # python_fullversion is typically n.n.n plus some trailing junk
10542 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10543 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10544 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10545 # Reject unsupported Python versions as soon as practical.
10546 if test "$python_majorversion" -lt 3; then
10547 as_fn_error $? "Python version $python_version is too old (version 3 or later is required)" "$LINENO" 5
10550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python sysconfig module" >&5
10551 $as_echo_n "checking for Python sysconfig module... " >&6; }
10552 if "${PYTHON}" -c 'import sysconfig' 2>&5
10553 then
10554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10555 $as_echo "yes" >&6; }
10556 else
10557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10558 $as_echo "no" >&6; }
10559 as_fn_error $? "sysconfig module not found" "$LINENO" 5
10562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10563 $as_echo_n "checking Python configuration directory... " >&6; }
10564 python_configdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBPL'))))"`
10565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10566 $as_echo "$python_configdir" >&6; }
10568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directory" >&5
10569 $as_echo_n "checking Python include directory... " >&6; }
10570 python_includespec=`${PYTHON} -c "import sysconfig; print('-I' + sysconfig.get_config_var('INCLUDEPY'))"`
10571 if test "$PORTNAME" = win32 ; then
10572 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10575 $as_echo "$python_includespec" >&6; }
10579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10580 $as_echo_n "checking how to link an embedded Python application... " >&6; }
10582 python_libdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBDIR'))))"`
10583 python_ldlibrary=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDLIBRARY'))))"`
10585 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
10586 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10587 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10588 then
10589 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10590 found_shlib=1
10591 else
10592 # Otherwise, guess the base name of the shlib.
10593 # LDVERSION was added in Python 3.2, before that use VERSION,
10594 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10595 python_ldversion=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDVERSION'))))"`
10596 if test x"${python_ldversion}" != x""; then
10597 ldlibrary="python${python_ldversion}"
10598 else
10599 python_version_var=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('VERSION'))))"`
10600 if test x"${python_version_var}" != x""; then
10601 ldlibrary="python${python_version_var}"
10602 else
10603 ldlibrary="python${python_version}"
10606 # Search for a likely-looking file.
10607 found_shlib=0
10608 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10610 if test -e "$d/lib${ldlibrary}${DLSUFFIX}"; then
10611 python_libdir="$d"
10612 found_shlib=1
10613 break 2
10615 done
10616 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10617 # (".so.n.n") as well. However, check this only after failing to find
10618 # ".so" anywhere, because yet other platforms (Debian) put the .so
10619 # symlink in a different directory from the underlying versioned shlib.
10620 if test "$found_shlib" != 1; then
10621 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10623 for f in "$d/lib${ldlibrary}.so."* ; do
10624 if test -e "$f"; then
10625 python_libdir="$d"
10626 found_shlib=1
10627 break 2
10629 done
10630 done
10632 # As usual, Windows has its own ideas. Possible default library
10633 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10634 # and the "lib" prefix might not be there.
10635 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10636 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10638 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10639 if test -e "$f"; then
10640 python_libdir="$d"
10641 found_shlib=1
10642 break 2
10644 done
10645 done
10648 if test "$found_shlib" != 1; then
10649 as_fn_error $? "could not find shared library for Python
10650 You might have to rebuild your Python installation. Refer to the
10651 documentation for details. Use --without-python to disable building
10652 PL/Python." "$LINENO" 5
10654 python_libspec="-L${python_libdir} -l${ldlibrary}"
10656 python_additional_libs=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10659 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10665 if test x"$cross_compiling" = x"yes" && test -z "$with_system_tzdata"; then
10666 if test -z "$ZIC"; then
10667 for ac_prog in zic
10669 # Extract the first word of "$ac_prog", so it can be a program name with args.
10670 set dummy $ac_prog; ac_word=$2
10671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10672 $as_echo_n "checking for $ac_word... " >&6; }
10673 if ${ac_cv_path_ZIC+:} false; then :
10674 $as_echo_n "(cached) " >&6
10675 else
10676 case $ZIC in
10677 [\\/]* | ?:[\\/]*)
10678 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10681 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10682 for as_dir in $PATH
10684 IFS=$as_save_IFS
10685 test -z "$as_dir" && as_dir=.
10686 for ac_exec_ext in '' $ac_executable_extensions; do
10687 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10688 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10689 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10690 break 2
10692 done
10693 done
10694 IFS=$as_save_IFS
10697 esac
10699 ZIC=$ac_cv_path_ZIC
10700 if test -n "$ZIC"; then
10701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10702 $as_echo "$ZIC" >&6; }
10703 else
10704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10705 $as_echo "no" >&6; }
10709 test -n "$ZIC" && break
10710 done
10712 else
10713 # Report the value of ZIC in configure's output in all cases.
10714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10715 $as_echo_n "checking for ZIC... " >&6; }
10716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10717 $as_echo "$ZIC" >&6; }
10720 if test -z "$ZIC"; then
10721 as_fn_error $? "
10722 When cross-compiling, either use the option --with-system-tzdata to use
10723 existing time-zone data, or set the environment variable ZIC to a zic
10724 program to use during the build." "$LINENO" 5
10729 # Pthreads
10731 # For each platform, we need to know about any special compile and link
10732 # libraries, and whether the normal C function names are thread-safe.
10733 # See the comment at the top of src/port/thread.c for more information.
10734 # WIN32 doesn't need the pthread tests; it always uses threads
10736 # These tests are run before the library-tests, because linking with the
10737 # other libraries can pull in the pthread functions as a side-effect. We
10738 # want to use the -pthread or similar flags directly, and not rely on
10739 # the side-effects of linking with some other library.
10741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10742 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10743 if ${ac_cv_path_SED+:} false; then :
10744 $as_echo_n "(cached) " >&6
10745 else
10746 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10747 for ac_i in 1 2 3 4 5 6 7; do
10748 ac_script="$ac_script$as_nl$ac_script"
10749 done
10750 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10751 { ac_script=; unset ac_script;}
10752 if test -z "$SED"; then
10753 ac_path_SED_found=false
10754 # Loop through the user's path and test for each of PROGNAME-LIST
10755 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10756 for as_dir in $PATH
10758 IFS=$as_save_IFS
10759 test -z "$as_dir" && as_dir=.
10760 for ac_prog in sed gsed; do
10761 for ac_exec_ext in '' $ac_executable_extensions; do
10762 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10763 as_fn_executable_p "$ac_path_SED" || continue
10764 # Check for GNU ac_path_SED and select it if it is found.
10765 # Check for GNU $ac_path_SED
10766 case `"$ac_path_SED" --version 2>&1` in
10767 *GNU*)
10768 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10770 ac_count=0
10771 $as_echo_n 0123456789 >"conftest.in"
10772 while :
10774 cat "conftest.in" "conftest.in" >"conftest.tmp"
10775 mv "conftest.tmp" "conftest.in"
10776 cp "conftest.in" "conftest.nl"
10777 $as_echo '' >> "conftest.nl"
10778 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10779 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10780 as_fn_arith $ac_count + 1 && ac_count=$as_val
10781 if test $ac_count -gt ${ac_path_SED_max-0}; then
10782 # Best one so far, save it but keep looking for a better one
10783 ac_cv_path_SED="$ac_path_SED"
10784 ac_path_SED_max=$ac_count
10786 # 10*(2^10) chars as input seems more than enough
10787 test $ac_count -gt 10 && break
10788 done
10789 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10790 esac
10792 $ac_path_SED_found && break 3
10793 done
10794 done
10795 done
10796 IFS=$as_save_IFS
10797 if test -z "$ac_cv_path_SED"; then
10798 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10800 else
10801 ac_cv_path_SED=$SED
10805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10806 $as_echo "$ac_cv_path_SED" >&6; }
10807 SED="$ac_cv_path_SED"
10808 rm -f conftest.sed
10811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10812 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10813 if ${ac_cv_path_GREP+:} false; then :
10814 $as_echo_n "(cached) " >&6
10815 else
10816 if test -z "$GREP"; then
10817 ac_path_GREP_found=false
10818 # Loop through the user's path and test for each of PROGNAME-LIST
10819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10820 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10822 IFS=$as_save_IFS
10823 test -z "$as_dir" && as_dir=.
10824 for ac_prog in grep ggrep; do
10825 for ac_exec_ext in '' $ac_executable_extensions; do
10826 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10827 as_fn_executable_p "$ac_path_GREP" || continue
10828 # Check for GNU ac_path_GREP and select it if it is found.
10829 # Check for GNU $ac_path_GREP
10830 case `"$ac_path_GREP" --version 2>&1` in
10831 *GNU*)
10832 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10834 ac_count=0
10835 $as_echo_n 0123456789 >"conftest.in"
10836 while :
10838 cat "conftest.in" "conftest.in" >"conftest.tmp"
10839 mv "conftest.tmp" "conftest.in"
10840 cp "conftest.in" "conftest.nl"
10841 $as_echo 'GREP' >> "conftest.nl"
10842 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10843 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10844 as_fn_arith $ac_count + 1 && ac_count=$as_val
10845 if test $ac_count -gt ${ac_path_GREP_max-0}; then
10846 # Best one so far, save it but keep looking for a better one
10847 ac_cv_path_GREP="$ac_path_GREP"
10848 ac_path_GREP_max=$ac_count
10850 # 10*(2^10) chars as input seems more than enough
10851 test $ac_count -gt 10 && break
10852 done
10853 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10854 esac
10856 $ac_path_GREP_found && break 3
10857 done
10858 done
10859 done
10860 IFS=$as_save_IFS
10861 if test -z "$ac_cv_path_GREP"; then
10862 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10864 else
10865 ac_cv_path_GREP=$GREP
10869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10870 $as_echo "$ac_cv_path_GREP" >&6; }
10871 GREP="$ac_cv_path_GREP"
10874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10875 $as_echo_n "checking for egrep... " >&6; }
10876 if ${ac_cv_path_EGREP+:} false; then :
10877 $as_echo_n "(cached) " >&6
10878 else
10879 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10880 then ac_cv_path_EGREP="$GREP -E"
10881 else
10882 if test -z "$EGREP"; then
10883 ac_path_EGREP_found=false
10884 # Loop through the user's path and test for each of PROGNAME-LIST
10885 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10886 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10888 IFS=$as_save_IFS
10889 test -z "$as_dir" && as_dir=.
10890 for ac_prog in egrep; do
10891 for ac_exec_ext in '' $ac_executable_extensions; do
10892 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10893 as_fn_executable_p "$ac_path_EGREP" || continue
10894 # Check for GNU ac_path_EGREP and select it if it is found.
10895 # Check for GNU $ac_path_EGREP
10896 case `"$ac_path_EGREP" --version 2>&1` in
10897 *GNU*)
10898 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10900 ac_count=0
10901 $as_echo_n 0123456789 >"conftest.in"
10902 while :
10904 cat "conftest.in" "conftest.in" >"conftest.tmp"
10905 mv "conftest.tmp" "conftest.in"
10906 cp "conftest.in" "conftest.nl"
10907 $as_echo 'EGREP' >> "conftest.nl"
10908 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10909 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10910 as_fn_arith $ac_count + 1 && ac_count=$as_val
10911 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10912 # Best one so far, save it but keep looking for a better one
10913 ac_cv_path_EGREP="$ac_path_EGREP"
10914 ac_path_EGREP_max=$ac_count
10916 # 10*(2^10) chars as input seems more than enough
10917 test $ac_count -gt 10 && break
10918 done
10919 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10920 esac
10922 $ac_path_EGREP_found && break 3
10923 done
10924 done
10925 done
10926 IFS=$as_save_IFS
10927 if test -z "$ac_cv_path_EGREP"; then
10928 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10930 else
10931 ac_cv_path_EGREP=$EGREP
10936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10937 $as_echo "$ac_cv_path_EGREP" >&6; }
10938 EGREP="$ac_cv_path_EGREP"
10941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10942 $as_echo_n "checking for ANSI C header files... " >&6; }
10943 if ${ac_cv_header_stdc+:} false; then :
10944 $as_echo_n "(cached) " >&6
10945 else
10946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10947 /* end confdefs.h. */
10948 #include <stdlib.h>
10949 #include <stdarg.h>
10950 #include <string.h>
10951 #include <float.h>
10954 main ()
10958 return 0;
10960 _ACEOF
10961 if ac_fn_c_try_compile "$LINENO"; then :
10962 ac_cv_header_stdc=yes
10963 else
10964 ac_cv_header_stdc=no
10966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10968 if test $ac_cv_header_stdc = yes; then
10969 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10971 /* end confdefs.h. */
10972 #include <string.h>
10974 _ACEOF
10975 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10976 $EGREP "memchr" >/dev/null 2>&1; then :
10978 else
10979 ac_cv_header_stdc=no
10981 rm -f conftest*
10985 if test $ac_cv_header_stdc = yes; then
10986 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10988 /* end confdefs.h. */
10989 #include <stdlib.h>
10991 _ACEOF
10992 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10993 $EGREP "free" >/dev/null 2>&1; then :
10995 else
10996 ac_cv_header_stdc=no
10998 rm -f conftest*
11002 if test $ac_cv_header_stdc = yes; then
11003 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11004 if test "$cross_compiling" = yes; then :
11006 else
11007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11008 /* end confdefs.h. */
11009 #include <ctype.h>
11010 #include <stdlib.h>
11011 #if ((' ' & 0x0FF) == 0x020)
11012 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11013 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11014 #else
11015 # define ISLOWER(c) \
11016 (('a' <= (c) && (c) <= 'i') \
11017 || ('j' <= (c) && (c) <= 'r') \
11018 || ('s' <= (c) && (c) <= 'z'))
11019 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11020 #endif
11022 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11024 main ()
11026 int i;
11027 for (i = 0; i < 256; i++)
11028 if (XOR (islower (i), ISLOWER (i))
11029 || toupper (i) != TOUPPER (i))
11030 return 2;
11031 return 0;
11033 _ACEOF
11034 if ac_fn_c_try_run "$LINENO"; then :
11036 else
11037 ac_cv_header_stdc=no
11039 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11040 conftest.$ac_objext conftest.beam conftest.$ac_ext
11045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11046 $as_echo "$ac_cv_header_stdc" >&6; }
11047 if test $ac_cv_header_stdc = yes; then
11049 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
11053 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11054 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11055 inttypes.h stdint.h unistd.h
11056 do :
11057 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11058 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
11060 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11061 cat >>confdefs.h <<_ACEOF
11062 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11063 _ACEOF
11067 done
11070 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
11071 # then
11076 ac_ext=c
11077 ac_cpp='$CPP $CPPFLAGS'
11078 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11079 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11080 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11082 ax_pthread_ok=no
11084 # We used to check for pthread.h first, but this fails if pthread.h
11085 # requires special compiler flags (e.g. on Tru64 or Sequent).
11086 # It gets checked for in the link test anyway.
11088 # First of all, check if the user has set any of the PTHREAD_LIBS,
11089 # etcetera environment variables, and if threads linking works using
11090 # them:
11091 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
11092 ax_pthread_save_CC="$CC"
11093 ax_pthread_save_CFLAGS="$CFLAGS"
11094 ax_pthread_save_LIBS="$LIBS"
11095 if test "x$PTHREAD_CC" != "x"; then :
11096 CC="$PTHREAD_CC"
11098 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11099 LIBS="$PTHREAD_LIBS $LIBS"
11100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
11101 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
11102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11103 /* end confdefs.h. */
11105 /* Override any GCC internal prototype to avoid an error.
11106 Use char because int might match the return type of a GCC
11107 builtin and then its argument prototype would still apply. */
11108 #ifdef __cplusplus
11109 extern "C"
11110 #endif
11111 char pthread_join ();
11113 main ()
11115 return pthread_join ();
11117 return 0;
11119 _ACEOF
11120 if ac_fn_c_try_link "$LINENO"; then :
11121 ax_pthread_ok=yes
11123 rm -f core conftest.err conftest.$ac_objext \
11124 conftest$ac_exeext conftest.$ac_ext
11125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11126 $as_echo "$ax_pthread_ok" >&6; }
11127 if test "x$ax_pthread_ok" = "xno"; then
11128 PTHREAD_LIBS=""
11129 PTHREAD_CFLAGS=""
11131 CC="$ax_pthread_save_CC"
11132 CFLAGS="$ax_pthread_save_CFLAGS"
11133 LIBS="$ax_pthread_save_LIBS"
11136 # We must check for the threads library under a number of different
11137 # names; the ordering is very important because some systems
11138 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
11139 # libraries is broken (non-POSIX).
11141 # Create a list of thread flags to try. Items starting with a "-" are
11142 # C compiler flags, and other items are library names, except for "none"
11143 # which indicates that we try without any flags at all, and "pthread-config"
11144 # which is a program returning the flags for the Pth emulation library.
11146 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
11148 # The ordering *is* (sometimes) important. Some notes on the
11149 # individual items follow:
11151 # pthreads: AIX (must check this before -lpthread)
11152 # none: in case threads are in libc; should be tried before -Kthread and
11153 # other compiler flags to prevent continual compiler warnings
11154 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
11155 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
11156 # (Note: HP C rejects this with "bad form for `-t' option")
11157 # -pthreads: Solaris/gcc (Note: HP C also rejects)
11158 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
11159 # doesn't hurt to check since this sometimes defines pthreads and
11160 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
11161 # is present but should not be used directly; and before -mthreads,
11162 # because the compiler interprets this as "-mt" + "-hreads")
11163 # -mthreads: Mingw32/gcc, Lynx/gcc
11164 # pthread: Linux, etcetera
11165 # --thread-safe: KAI C++
11166 # pthread-config: use pthread-config program (for GNU Pth library)
11168 case $host_os in
11170 freebsd*)
11172 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
11173 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
11175 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
11178 hpux*)
11180 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
11181 # multi-threading and also sets -lpthread."
11183 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
11186 openedition*)
11188 # IBM z/OS requires a feature-test macro to be defined in order to
11189 # enable POSIX threads at all, so give the user a hint if this is
11190 # not set. (We don't define these ourselves, as they can affect
11191 # other portions of the system API in unpredictable ways.)
11193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11194 /* end confdefs.h. */
11196 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
11197 AX_PTHREAD_ZOS_MISSING
11198 # endif
11200 _ACEOF
11201 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11202 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
11203 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
11204 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
11206 rm -f conftest*
11210 solaris*)
11212 # On Solaris (at least, for some versions), libc contains stubbed
11213 # (non-functional) versions of the pthreads routines, so link-based
11214 # tests will erroneously succeed. (N.B.: The stubs are missing
11215 # pthread_cleanup_push, or rather a function called by this macro,
11216 # so we could check for that, but who knows whether they'll stub
11217 # that too in a future libc.) So we'll check first for the
11218 # standard Solaris way of linking pthreads (-mt -lpthread).
11220 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
11222 esac
11224 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
11226 if test "x$GCC" = "xyes"; then :
11227 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
11230 # The presence of a feature test macro requesting re-entrant function
11231 # definitions is, on some systems, a strong hint that pthreads support is
11232 # correctly enabled
11234 case $host_os in
11235 darwin* | hpux* | linux* | osf* | solaris*)
11236 ax_pthread_check_macro="_REENTRANT"
11239 aix*)
11240 ax_pthread_check_macro="_THREAD_SAFE"
11244 ax_pthread_check_macro="--"
11246 esac
11247 if test "x$ax_pthread_check_macro" = "x--"; then :
11248 ax_pthread_check_cond=0
11249 else
11250 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
11253 # Are we compiling with Clang?
11255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
11256 $as_echo_n "checking whether $CC is Clang... " >&6; }
11257 if ${ax_cv_PTHREAD_CLANG+:} false; then :
11258 $as_echo_n "(cached) " >&6
11259 else
11260 ax_cv_PTHREAD_CLANG=no
11261 # Note that Autoconf sets GCC=yes for Clang as well as GCC
11262 if test "x$GCC" = "xyes"; then
11263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11264 /* end confdefs.h. */
11265 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
11266 # if defined(__clang__) && defined(__llvm__)
11267 AX_PTHREAD_CC_IS_CLANG
11268 # endif
11270 _ACEOF
11271 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11272 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
11273 ax_cv_PTHREAD_CLANG=yes
11275 rm -f conftest*
11280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
11281 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
11282 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
11284 ax_pthread_clang_warning=no
11286 # Clang needs special handling, because older versions handle the -pthread
11287 # option in a rather... idiosyncratic way
11289 if test "x$ax_pthread_clang" = "xyes"; then
11291 # Clang takes -pthread; it has never supported any other flag
11293 # (Note 1: This will need to be revisited if a system that Clang
11294 # supports has POSIX threads in a separate library. This tends not
11295 # to be the way of modern systems, but it's conceivable.)
11297 # (Note 2: On some systems, notably Darwin, -pthread is not needed
11298 # to get POSIX threads support; the API is always present and
11299 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
11300 # -pthread does define _REENTRANT, and while the Darwin headers
11301 # ignore this macro, third-party headers might not.)
11303 PTHREAD_CFLAGS="-pthread"
11304 PTHREAD_LIBS=
11306 ax_pthread_ok=yes
11308 # However, older versions of Clang make a point of warning the user
11309 # that, in an invocation where only linking and no compilation is
11310 # taking place, the -pthread option has no effect ("argument unused
11311 # during compilation"). They expect -pthread to be passed in only
11312 # when source code is being compiled.
11314 # Problem is, this is at odds with the way Automake and most other
11315 # C build frameworks function, which is that the same flags used in
11316 # compilation (CFLAGS) are also used in linking. Many systems
11317 # supported by AX_PTHREAD require exactly this for POSIX threads
11318 # support, and in fact it is often not straightforward to specify a
11319 # flag that is used only in the compilation phase and not in
11320 # linking. Such a scenario is extremely rare in practice.
11322 # Even though use of the -pthread flag in linking would only print
11323 # a warning, this can be a nuisance for well-run software projects
11324 # that build with -Werror. So if the active version of Clang has
11325 # this misfeature, we search for an option to squash it.
11327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
11328 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
11329 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
11330 $as_echo_n "(cached) " >&6
11331 else
11332 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
11333 # Create an alternate version of $ac_link that compiles and
11334 # links in two steps (.c -> .o, .o -> exe) instead of one
11335 # (.c -> exe), because the warning occurs only in the second
11336 # step
11337 ax_pthread_save_ac_link="$ac_link"
11338 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
11339 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
11340 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
11341 ax_pthread_save_CFLAGS="$CFLAGS"
11342 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
11343 if test "x$ax_pthread_try" = "xunknown"; then :
11344 break
11346 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
11347 ac_link="$ax_pthread_save_ac_link"
11348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11349 /* end confdefs.h. */
11350 int main(void){return 0;}
11351 _ACEOF
11352 if ac_fn_c_try_link "$LINENO"; then :
11353 ac_link="$ax_pthread_2step_ac_link"
11354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11355 /* end confdefs.h. */
11356 int main(void){return 0;}
11357 _ACEOF
11358 if ac_fn_c_try_link "$LINENO"; then :
11359 break
11361 rm -f core conftest.err conftest.$ac_objext \
11362 conftest$ac_exeext conftest.$ac_ext
11365 rm -f core conftest.err conftest.$ac_objext \
11366 conftest$ac_exeext conftest.$ac_ext
11367 done
11368 ac_link="$ax_pthread_save_ac_link"
11369 CFLAGS="$ax_pthread_save_CFLAGS"
11370 if test "x$ax_pthread_try" = "x"; then :
11371 ax_pthread_try=no
11373 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
11376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
11377 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
11379 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
11380 no | unknown) ;;
11381 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
11382 esac
11384 fi # $ax_pthread_clang = yes
11386 if test "x$ax_pthread_ok" = "xno"; then
11387 for ax_pthread_try_flag in $ax_pthread_flags; do
11389 case $ax_pthread_try_flag in
11390 none)
11391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
11392 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
11395 -mt,pthread)
11396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
11397 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
11398 PTHREAD_CFLAGS="-mt"
11399 PTHREAD_LIBS="-lpthread"
11403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
11404 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
11405 PTHREAD_CFLAGS="$ax_pthread_try_flag"
11408 pthread-config)
11409 # Extract the first word of "pthread-config", so it can be a program name with args.
11410 set dummy pthread-config; ac_word=$2
11411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11412 $as_echo_n "checking for $ac_word... " >&6; }
11413 if ${ac_cv_prog_ax_pthread_config+:} false; then :
11414 $as_echo_n "(cached) " >&6
11415 else
11416 if test -n "$ax_pthread_config"; then
11417 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
11418 else
11419 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11420 for as_dir in $PATH
11422 IFS=$as_save_IFS
11423 test -z "$as_dir" && as_dir=.
11424 for ac_exec_ext in '' $ac_executable_extensions; do
11425 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11426 ac_cv_prog_ax_pthread_config="yes"
11427 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11428 break 2
11430 done
11431 done
11432 IFS=$as_save_IFS
11434 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
11437 ax_pthread_config=$ac_cv_prog_ax_pthread_config
11438 if test -n "$ax_pthread_config"; then
11439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
11440 $as_echo "$ax_pthread_config" >&6; }
11441 else
11442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11443 $as_echo "no" >&6; }
11447 if test "x$ax_pthread_config" = "xno"; then :
11448 continue
11450 PTHREAD_CFLAGS="`pthread-config --cflags`"
11451 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
11455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
11456 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
11457 PTHREAD_LIBS="-l$ax_pthread_try_flag"
11459 esac
11461 ax_pthread_save_CFLAGS="$CFLAGS"
11462 ax_pthread_save_LIBS="$LIBS"
11463 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11464 LIBS="$PTHREAD_LIBS $LIBS"
11466 # Check for various functions. We must include pthread.h,
11467 # since some functions may be macros. (On the Sequent, we
11468 # need a special flag -Kthread to make this header compile.)
11469 # We check for pthread_join because it is in -lpthread on IRIX
11470 # while pthread_create is in libc. We check for pthread_attr_init
11471 # due to DEC craziness with -lpthreads. We check for
11472 # pthread_cleanup_push because it is one of the few pthread
11473 # functions on Solaris that doesn't have a non-functional libc stub.
11474 # We try pthread_create on general principles.
11476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11477 /* end confdefs.h. */
11478 #include <pthread.h>
11479 # if $ax_pthread_check_cond
11480 # error "$ax_pthread_check_macro must be defined"
11481 # endif
11482 static void routine(void *a) { a = 0; }
11483 static void *start_routine(void *a) { return a; }
11485 main ()
11487 pthread_t th; pthread_attr_t attr;
11488 pthread_create(&th, 0, start_routine, 0);
11489 pthread_join(th, 0);
11490 pthread_attr_init(&attr);
11491 pthread_cleanup_push(routine, 0);
11492 pthread_cleanup_pop(0) /* ; */
11494 return 0;
11496 _ACEOF
11497 if ac_fn_c_try_link "$LINENO"; then :
11498 ax_pthread_ok=yes
11500 rm -f core conftest.err conftest.$ac_objext \
11501 conftest$ac_exeext conftest.$ac_ext
11503 CFLAGS="$ax_pthread_save_CFLAGS"
11504 LIBS="$ax_pthread_save_LIBS"
11506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11507 $as_echo "$ax_pthread_ok" >&6; }
11508 if test "x$ax_pthread_ok" = "xyes"; then :
11509 break
11512 PTHREAD_LIBS=""
11513 PTHREAD_CFLAGS=""
11514 done
11517 # Various other checks:
11518 if test "x$ax_pthread_ok" = "xyes"; then
11519 ax_pthread_save_CFLAGS="$CFLAGS"
11520 ax_pthread_save_LIBS="$LIBS"
11521 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11522 LIBS="$PTHREAD_LIBS $LIBS"
11524 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11526 $as_echo_n "checking for joinable pthread attribute... " >&6; }
11527 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11528 $as_echo_n "(cached) " >&6
11529 else
11530 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11531 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11533 /* end confdefs.h. */
11534 #include <pthread.h>
11536 main ()
11538 int attr = $ax_pthread_attr; return attr /* ; */
11540 return 0;
11542 _ACEOF
11543 if ac_fn_c_try_link "$LINENO"; then :
11544 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11546 rm -f core conftest.err conftest.$ac_objext \
11547 conftest$ac_exeext conftest.$ac_ext
11548 done
11551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11552 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11553 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11554 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11555 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11557 cat >>confdefs.h <<_ACEOF
11558 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11559 _ACEOF
11561 ax_pthread_joinable_attr_defined=yes
11565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11566 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11567 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11568 $as_echo_n "(cached) " >&6
11569 else
11570 ax_cv_PTHREAD_SPECIAL_FLAGS=no
11571 case $host_os in
11572 solaris*)
11573 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11575 esac
11578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11579 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11580 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11581 test "x$ax_pthread_special_flags_added" != "xyes"; then :
11582 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11583 ax_pthread_special_flags_added=yes
11586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11587 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11588 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11589 $as_echo_n "(cached) " >&6
11590 else
11591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11592 /* end confdefs.h. */
11593 #include <pthread.h>
11595 main ()
11597 int i = PTHREAD_PRIO_INHERIT;
11599 return 0;
11601 _ACEOF
11602 if ac_fn_c_try_link "$LINENO"; then :
11603 ax_cv_PTHREAD_PRIO_INHERIT=yes
11604 else
11605 ax_cv_PTHREAD_PRIO_INHERIT=no
11607 rm -f core conftest.err conftest.$ac_objext \
11608 conftest$ac_exeext conftest.$ac_ext
11611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11612 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11613 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11614 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11616 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11618 ax_pthread_prio_inherit_defined=yes
11622 CFLAGS="$ax_pthread_save_CFLAGS"
11623 LIBS="$ax_pthread_save_LIBS"
11625 # More AIX lossage: compile with *_r variant
11626 if test "x$GCC" != "xyes"; then
11627 case $host_os in
11628 aix*)
11629 case "x/$CC" in #(
11630 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11631 #handle absolute path differently from PATH based program lookup
11632 case "x$CC" in #(
11633 x/*) :
11634 if as_fn_executable_p ${CC}_r; then :
11635 PTHREAD_CC="${CC}_r"
11636 fi ;; #(
11637 *) :
11638 for ac_prog in ${CC}_r
11640 # Extract the first word of "$ac_prog", so it can be a program name with args.
11641 set dummy $ac_prog; ac_word=$2
11642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11643 $as_echo_n "checking for $ac_word... " >&6; }
11644 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11645 $as_echo_n "(cached) " >&6
11646 else
11647 if test -n "$PTHREAD_CC"; then
11648 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11649 else
11650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11651 for as_dir in $PATH
11653 IFS=$as_save_IFS
11654 test -z "$as_dir" && as_dir=.
11655 for ac_exec_ext in '' $ac_executable_extensions; do
11656 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11657 ac_cv_prog_PTHREAD_CC="$ac_prog"
11658 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11659 break 2
11661 done
11662 done
11663 IFS=$as_save_IFS
11667 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11668 if test -n "$PTHREAD_CC"; then
11669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11670 $as_echo "$PTHREAD_CC" >&6; }
11671 else
11672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11673 $as_echo "no" >&6; }
11677 test -n "$PTHREAD_CC" && break
11678 done
11679 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11681 esac ;; #(
11682 *) :
11684 esac
11686 esac
11690 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11696 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11697 if test "x$ax_pthread_ok" = "xyes"; then
11699 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11702 else
11703 ax_pthread_ok=no
11706 ac_ext=c
11707 ac_cpp='$CPP $CPPFLAGS'
11708 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11709 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11710 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11712 # set thread flags
11714 # Some platforms use these, so just define them. They can't hurt if they
11715 # are not supported.
11716 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE"
11718 # Check for *_r functions
11719 _CFLAGS="$CFLAGS"
11720 _LIBS="$LIBS"
11721 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11722 LIBS="$LIBS $PTHREAD_LIBS"
11724 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11725 if test "x$ac_cv_header_pthread_h" = xyes; then :
11727 else
11728 as_fn_error $? "
11729 pthread.h not found; use --disable-thread-safety to disable thread safety" "$LINENO" 5
11734 for ac_func in strerror_r
11735 do :
11736 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
11737 if test "x$ac_cv_func_strerror_r" = xyes; then :
11738 cat >>confdefs.h <<_ACEOF
11739 #define HAVE_STRERROR_R 1
11740 _ACEOF
11743 done
11746 # Do test here with the proper thread flags
11747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11748 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11749 if ${pgac_cv_func_strerror_r_int+:} false; then :
11750 $as_echo_n "(cached) " >&6
11751 else
11752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11753 /* end confdefs.h. */
11754 #include <string.h>
11756 main ()
11758 char buf[100];
11759 switch (strerror_r(1, buf, sizeof(buf)))
11760 { case 0: break; default: break; }
11763 return 0;
11765 _ACEOF
11766 if ac_fn_c_try_compile "$LINENO"; then :
11767 pgac_cv_func_strerror_r_int=yes
11768 else
11769 pgac_cv_func_strerror_r_int=no
11771 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11774 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11775 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11777 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11782 CFLAGS="$_CFLAGS"
11783 LIBS="$_LIBS"
11786 else
11787 # else
11788 # do not use values from template file
11789 PTHREAD_CFLAGS=
11790 PTHREAD_LIBS=
11792 fi # fi
11799 ## Libraries
11801 ## Most libraries are included only if they demonstrably provide a function
11802 ## we need, but libm is an exception: always include it, because there are
11803 ## too many compilers that play cute optimization games that will break
11804 ## probes for standard functions such as pow().
11807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11808 $as_echo_n "checking for main in -lm... " >&6; }
11809 if ${ac_cv_lib_m_main+:} false; then :
11810 $as_echo_n "(cached) " >&6
11811 else
11812 ac_check_lib_save_LIBS=$LIBS
11813 LIBS="-lm $LIBS"
11814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11815 /* end confdefs.h. */
11819 main ()
11821 return main ();
11823 return 0;
11825 _ACEOF
11826 if ac_fn_c_try_link "$LINENO"; then :
11827 ac_cv_lib_m_main=yes
11828 else
11829 ac_cv_lib_m_main=no
11831 rm -f core conftest.err conftest.$ac_objext \
11832 conftest$ac_exeext conftest.$ac_ext
11833 LIBS=$ac_check_lib_save_LIBS
11835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11836 $as_echo "$ac_cv_lib_m_main" >&6; }
11837 if test "x$ac_cv_lib_m_main" = xyes; then :
11838 cat >>confdefs.h <<_ACEOF
11839 #define HAVE_LIBM 1
11840 _ACEOF
11842 LIBS="-lm $LIBS"
11846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11847 $as_echo_n "checking for library containing setproctitle... " >&6; }
11848 if ${ac_cv_search_setproctitle+:} false; then :
11849 $as_echo_n "(cached) " >&6
11850 else
11851 ac_func_search_save_LIBS=$LIBS
11852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11853 /* end confdefs.h. */
11855 /* Override any GCC internal prototype to avoid an error.
11856 Use char because int might match the return type of a GCC
11857 builtin and then its argument prototype would still apply. */
11858 #ifdef __cplusplus
11859 extern "C"
11860 #endif
11861 char setproctitle ();
11863 main ()
11865 return setproctitle ();
11867 return 0;
11869 _ACEOF
11870 for ac_lib in '' util; do
11871 if test -z "$ac_lib"; then
11872 ac_res="none required"
11873 else
11874 ac_res=-l$ac_lib
11875 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11877 if ac_fn_c_try_link "$LINENO"; then :
11878 ac_cv_search_setproctitle=$ac_res
11880 rm -f core conftest.err conftest.$ac_objext \
11881 conftest$ac_exeext
11882 if ${ac_cv_search_setproctitle+:} false; then :
11883 break
11885 done
11886 if ${ac_cv_search_setproctitle+:} false; then :
11888 else
11889 ac_cv_search_setproctitle=no
11891 rm conftest.$ac_ext
11892 LIBS=$ac_func_search_save_LIBS
11894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11895 $as_echo "$ac_cv_search_setproctitle" >&6; }
11896 ac_res=$ac_cv_search_setproctitle
11897 if test "$ac_res" != no; then :
11898 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11902 # gcc/clang's sanitizer helper library provides dlopen but not dlsym, thus
11903 # when enabling asan the dlopen check doesn't notice that -ldl is actually
11904 # required. Just checking for dlsym() ought to suffice.
11905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
11906 $as_echo_n "checking for library containing dlsym... " >&6; }
11907 if ${ac_cv_search_dlsym+:} false; then :
11908 $as_echo_n "(cached) " >&6
11909 else
11910 ac_func_search_save_LIBS=$LIBS
11911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11912 /* end confdefs.h. */
11914 /* Override any GCC internal prototype to avoid an error.
11915 Use char because int might match the return type of a GCC
11916 builtin and then its argument prototype would still apply. */
11917 #ifdef __cplusplus
11918 extern "C"
11919 #endif
11920 char dlsym ();
11922 main ()
11924 return dlsym ();
11926 return 0;
11928 _ACEOF
11929 for ac_lib in '' dl; do
11930 if test -z "$ac_lib"; then
11931 ac_res="none required"
11932 else
11933 ac_res=-l$ac_lib
11934 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11936 if ac_fn_c_try_link "$LINENO"; then :
11937 ac_cv_search_dlsym=$ac_res
11939 rm -f core conftest.err conftest.$ac_objext \
11940 conftest$ac_exeext
11941 if ${ac_cv_search_dlsym+:} false; then :
11942 break
11944 done
11945 if ${ac_cv_search_dlsym+:} false; then :
11947 else
11948 ac_cv_search_dlsym=no
11950 rm conftest.$ac_ext
11951 LIBS=$ac_func_search_save_LIBS
11953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
11954 $as_echo "$ac_cv_search_dlsym" >&6; }
11955 ac_res=$ac_cv_search_dlsym
11956 if test "$ac_res" != no; then :
11957 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11962 $as_echo_n "checking for library containing socket... " >&6; }
11963 if ${ac_cv_search_socket+:} false; then :
11964 $as_echo_n "(cached) " >&6
11965 else
11966 ac_func_search_save_LIBS=$LIBS
11967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11968 /* end confdefs.h. */
11970 /* Override any GCC internal prototype to avoid an error.
11971 Use char because int might match the return type of a GCC
11972 builtin and then its argument prototype would still apply. */
11973 #ifdef __cplusplus
11974 extern "C"
11975 #endif
11976 char socket ();
11978 main ()
11980 return socket ();
11982 return 0;
11984 _ACEOF
11985 for ac_lib in '' socket ws2_32; do
11986 if test -z "$ac_lib"; then
11987 ac_res="none required"
11988 else
11989 ac_res=-l$ac_lib
11990 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11992 if ac_fn_c_try_link "$LINENO"; then :
11993 ac_cv_search_socket=$ac_res
11995 rm -f core conftest.err conftest.$ac_objext \
11996 conftest$ac_exeext
11997 if ${ac_cv_search_socket+:} false; then :
11998 break
12000 done
12001 if ${ac_cv_search_socket+:} false; then :
12003 else
12004 ac_cv_search_socket=no
12006 rm conftest.$ac_ext
12007 LIBS=$ac_func_search_save_LIBS
12009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
12010 $as_echo "$ac_cv_search_socket" >&6; }
12011 ac_res=$ac_cv_search_socket
12012 if test "$ac_res" != no; then :
12013 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
12018 $as_echo_n "checking for library containing getopt_long... " >&6; }
12019 if ${ac_cv_search_getopt_long+:} false; then :
12020 $as_echo_n "(cached) " >&6
12021 else
12022 ac_func_search_save_LIBS=$LIBS
12023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12024 /* end confdefs.h. */
12026 /* Override any GCC internal prototype to avoid an error.
12027 Use char because int might match the return type of a GCC
12028 builtin and then its argument prototype would still apply. */
12029 #ifdef __cplusplus
12030 extern "C"
12031 #endif
12032 char getopt_long ();
12034 main ()
12036 return getopt_long ();
12038 return 0;
12040 _ACEOF
12041 for ac_lib in '' getopt gnugetopt; do
12042 if test -z "$ac_lib"; then
12043 ac_res="none required"
12044 else
12045 ac_res=-l$ac_lib
12046 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12048 if ac_fn_c_try_link "$LINENO"; then :
12049 ac_cv_search_getopt_long=$ac_res
12051 rm -f core conftest.err conftest.$ac_objext \
12052 conftest$ac_exeext
12053 if ${ac_cv_search_getopt_long+:} false; then :
12054 break
12056 done
12057 if ${ac_cv_search_getopt_long+:} false; then :
12059 else
12060 ac_cv_search_getopt_long=no
12062 rm conftest.$ac_ext
12063 LIBS=$ac_func_search_save_LIBS
12065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
12066 $as_echo "$ac_cv_search_getopt_long" >&6; }
12067 ac_res=$ac_cv_search_getopt_long
12068 if test "$ac_res" != no; then :
12069 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
12074 $as_echo_n "checking for library containing shm_open... " >&6; }
12075 if ${ac_cv_search_shm_open+:} false; then :
12076 $as_echo_n "(cached) " >&6
12077 else
12078 ac_func_search_save_LIBS=$LIBS
12079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12080 /* end confdefs.h. */
12082 /* Override any GCC internal prototype to avoid an error.
12083 Use char because int might match the return type of a GCC
12084 builtin and then its argument prototype would still apply. */
12085 #ifdef __cplusplus
12086 extern "C"
12087 #endif
12088 char shm_open ();
12090 main ()
12092 return shm_open ();
12094 return 0;
12096 _ACEOF
12097 for ac_lib in '' rt; do
12098 if test -z "$ac_lib"; then
12099 ac_res="none required"
12100 else
12101 ac_res=-l$ac_lib
12102 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12104 if ac_fn_c_try_link "$LINENO"; then :
12105 ac_cv_search_shm_open=$ac_res
12107 rm -f core conftest.err conftest.$ac_objext \
12108 conftest$ac_exeext
12109 if ${ac_cv_search_shm_open+:} false; then :
12110 break
12112 done
12113 if ${ac_cv_search_shm_open+:} false; then :
12115 else
12116 ac_cv_search_shm_open=no
12118 rm conftest.$ac_ext
12119 LIBS=$ac_func_search_save_LIBS
12121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
12122 $as_echo "$ac_cv_search_shm_open" >&6; }
12123 ac_res=$ac_cv_search_shm_open
12124 if test "$ac_res" != no; then :
12125 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
12130 $as_echo_n "checking for library containing shm_unlink... " >&6; }
12131 if ${ac_cv_search_shm_unlink+:} false; then :
12132 $as_echo_n "(cached) " >&6
12133 else
12134 ac_func_search_save_LIBS=$LIBS
12135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12136 /* end confdefs.h. */
12138 /* Override any GCC internal prototype to avoid an error.
12139 Use char because int might match the return type of a GCC
12140 builtin and then its argument prototype would still apply. */
12141 #ifdef __cplusplus
12142 extern "C"
12143 #endif
12144 char shm_unlink ();
12146 main ()
12148 return shm_unlink ();
12150 return 0;
12152 _ACEOF
12153 for ac_lib in '' rt; do
12154 if test -z "$ac_lib"; then
12155 ac_res="none required"
12156 else
12157 ac_res=-l$ac_lib
12158 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12160 if ac_fn_c_try_link "$LINENO"; then :
12161 ac_cv_search_shm_unlink=$ac_res
12163 rm -f core conftest.err conftest.$ac_objext \
12164 conftest$ac_exeext
12165 if ${ac_cv_search_shm_unlink+:} false; then :
12166 break
12168 done
12169 if ${ac_cv_search_shm_unlink+:} false; then :
12171 else
12172 ac_cv_search_shm_unlink=no
12174 rm conftest.$ac_ext
12175 LIBS=$ac_func_search_save_LIBS
12177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
12178 $as_echo "$ac_cv_search_shm_unlink" >&6; }
12179 ac_res=$ac_cv_search_shm_unlink
12180 if test "$ac_res" != no; then :
12181 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
12186 $as_echo_n "checking for library containing clock_gettime... " >&6; }
12187 if ${ac_cv_search_clock_gettime+:} false; then :
12188 $as_echo_n "(cached) " >&6
12189 else
12190 ac_func_search_save_LIBS=$LIBS
12191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12192 /* end confdefs.h. */
12194 /* Override any GCC internal prototype to avoid an error.
12195 Use char because int might match the return type of a GCC
12196 builtin and then its argument prototype would still apply. */
12197 #ifdef __cplusplus
12198 extern "C"
12199 #endif
12200 char clock_gettime ();
12202 main ()
12204 return clock_gettime ();
12206 return 0;
12208 _ACEOF
12209 for ac_lib in '' rt posix4; do
12210 if test -z "$ac_lib"; then
12211 ac_res="none required"
12212 else
12213 ac_res=-l$ac_lib
12214 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12216 if ac_fn_c_try_link "$LINENO"; then :
12217 ac_cv_search_clock_gettime=$ac_res
12219 rm -f core conftest.err conftest.$ac_objext \
12220 conftest$ac_exeext
12221 if ${ac_cv_search_clock_gettime+:} false; then :
12222 break
12224 done
12225 if ${ac_cv_search_clock_gettime+:} false; then :
12227 else
12228 ac_cv_search_clock_gettime=no
12230 rm conftest.$ac_ext
12231 LIBS=$ac_func_search_save_LIBS
12233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
12234 $as_echo "$ac_cv_search_clock_gettime" >&6; }
12235 ac_res=$ac_cv_search_clock_gettime
12236 if test "$ac_res" != no; then :
12237 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12241 # Solaris:
12242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
12243 $as_echo_n "checking for library containing fdatasync... " >&6; }
12244 if ${ac_cv_search_fdatasync+:} false; then :
12245 $as_echo_n "(cached) " >&6
12246 else
12247 ac_func_search_save_LIBS=$LIBS
12248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12249 /* end confdefs.h. */
12251 /* Override any GCC internal prototype to avoid an error.
12252 Use char because int might match the return type of a GCC
12253 builtin and then its argument prototype would still apply. */
12254 #ifdef __cplusplus
12255 extern "C"
12256 #endif
12257 char fdatasync ();
12259 main ()
12261 return fdatasync ();
12263 return 0;
12265 _ACEOF
12266 for ac_lib in '' rt posix4; do
12267 if test -z "$ac_lib"; then
12268 ac_res="none required"
12269 else
12270 ac_res=-l$ac_lib
12271 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12273 if ac_fn_c_try_link "$LINENO"; then :
12274 ac_cv_search_fdatasync=$ac_res
12276 rm -f core conftest.err conftest.$ac_objext \
12277 conftest$ac_exeext
12278 if ${ac_cv_search_fdatasync+:} false; then :
12279 break
12281 done
12282 if ${ac_cv_search_fdatasync+:} false; then :
12284 else
12285 ac_cv_search_fdatasync=no
12287 rm conftest.$ac_ext
12288 LIBS=$ac_func_search_save_LIBS
12290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
12291 $as_echo "$ac_cv_search_fdatasync" >&6; }
12292 ac_res=$ac_cv_search_fdatasync
12293 if test "$ac_res" != no; then :
12294 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12298 # Cygwin:
12299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
12300 $as_echo_n "checking for library containing shmget... " >&6; }
12301 if ${ac_cv_search_shmget+:} false; then :
12302 $as_echo_n "(cached) " >&6
12303 else
12304 ac_func_search_save_LIBS=$LIBS
12305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12306 /* end confdefs.h. */
12308 /* Override any GCC internal prototype to avoid an error.
12309 Use char because int might match the return type of a GCC
12310 builtin and then its argument prototype would still apply. */
12311 #ifdef __cplusplus
12312 extern "C"
12313 #endif
12314 char shmget ();
12316 main ()
12318 return shmget ();
12320 return 0;
12322 _ACEOF
12323 for ac_lib in '' cygipc; do
12324 if test -z "$ac_lib"; then
12325 ac_res="none required"
12326 else
12327 ac_res=-l$ac_lib
12328 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12330 if ac_fn_c_try_link "$LINENO"; then :
12331 ac_cv_search_shmget=$ac_res
12333 rm -f core conftest.err conftest.$ac_objext \
12334 conftest$ac_exeext
12335 if ${ac_cv_search_shmget+:} false; then :
12336 break
12338 done
12339 if ${ac_cv_search_shmget+:} false; then :
12341 else
12342 ac_cv_search_shmget=no
12344 rm conftest.$ac_ext
12345 LIBS=$ac_func_search_save_LIBS
12347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
12348 $as_echo "$ac_cv_search_shmget" >&6; }
12349 ac_res=$ac_cv_search_shmget
12350 if test "$ac_res" != no; then :
12351 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12355 # *BSD:
12356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
12357 $as_echo_n "checking for library containing backtrace_symbols... " >&6; }
12358 if ${ac_cv_search_backtrace_symbols+:} false; then :
12359 $as_echo_n "(cached) " >&6
12360 else
12361 ac_func_search_save_LIBS=$LIBS
12362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12363 /* end confdefs.h. */
12365 /* Override any GCC internal prototype to avoid an error.
12366 Use char because int might match the return type of a GCC
12367 builtin and then its argument prototype would still apply. */
12368 #ifdef __cplusplus
12369 extern "C"
12370 #endif
12371 char backtrace_symbols ();
12373 main ()
12375 return backtrace_symbols ();
12377 return 0;
12379 _ACEOF
12380 for ac_lib in '' execinfo; do
12381 if test -z "$ac_lib"; then
12382 ac_res="none required"
12383 else
12384 ac_res=-l$ac_lib
12385 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12387 if ac_fn_c_try_link "$LINENO"; then :
12388 ac_cv_search_backtrace_symbols=$ac_res
12390 rm -f core conftest.err conftest.$ac_objext \
12391 conftest$ac_exeext
12392 if ${ac_cv_search_backtrace_symbols+:} false; then :
12393 break
12395 done
12396 if ${ac_cv_search_backtrace_symbols+:} false; then :
12398 else
12399 ac_cv_search_backtrace_symbols=no
12401 rm conftest.$ac_ext
12402 LIBS=$ac_func_search_save_LIBS
12404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
12405 $as_echo "$ac_cv_search_backtrace_symbols" >&6; }
12406 ac_res=$ac_cv_search_backtrace_symbols
12407 if test "$ac_res" != no; then :
12408 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12413 if test "$enable_thread_safety" = yes; then
12414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
12415 $as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
12416 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12417 $as_echo_n "(cached) " >&6
12418 else
12419 ac_func_search_save_LIBS=$LIBS
12420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12421 /* end confdefs.h. */
12423 /* Override any GCC internal prototype to avoid an error.
12424 Use char because int might match the return type of a GCC
12425 builtin and then its argument prototype would still apply. */
12426 #ifdef __cplusplus
12427 extern "C"
12428 #endif
12429 char pthread_barrier_wait ();
12431 main ()
12433 return pthread_barrier_wait ();
12435 return 0;
12437 _ACEOF
12438 for ac_lib in '' pthread; do
12439 if test -z "$ac_lib"; then
12440 ac_res="none required"
12441 else
12442 ac_res=-l$ac_lib
12443 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12445 if ac_fn_c_try_link "$LINENO"; then :
12446 ac_cv_search_pthread_barrier_wait=$ac_res
12448 rm -f core conftest.err conftest.$ac_objext \
12449 conftest$ac_exeext
12450 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12451 break
12453 done
12454 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12456 else
12457 ac_cv_search_pthread_barrier_wait=no
12459 rm conftest.$ac_ext
12460 LIBS=$ac_func_search_save_LIBS
12462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_barrier_wait" >&5
12463 $as_echo "$ac_cv_search_pthread_barrier_wait" >&6; }
12464 ac_res=$ac_cv_search_pthread_barrier_wait
12465 if test "$ac_res" != no; then :
12466 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12472 if test "$with_readline" = yes; then
12475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
12476 $as_echo_n "checking for library containing readline... " >&6; }
12477 if ${pgac_cv_check_readline+:} false; then :
12478 $as_echo_n "(cached) " >&6
12479 else
12480 pgac_cv_check_readline=no
12481 pgac_save_LIBS=$LIBS
12482 if test x"$with_libedit_preferred" != x"yes"
12483 then READLINE_ORDER="-lreadline -ledit"
12484 else READLINE_ORDER="-ledit -lreadline"
12486 for pgac_rllib in $READLINE_ORDER ; do
12487 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
12488 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
12489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12490 /* end confdefs.h. */
12492 /* Override any GCC internal prototype to avoid an error.
12493 Use char because int might match the return type of a GCC
12494 builtin and then its argument prototype would still apply. */
12495 #ifdef __cplusplus
12496 extern "C"
12497 #endif
12498 char readline ();
12500 main ()
12502 return readline ();
12504 return 0;
12506 _ACEOF
12507 if ac_fn_c_try_link "$LINENO"; then :
12509 # Older NetBSD and OpenBSD have a broken linker that does not
12510 # recognize dependent libraries; assume curses is needed if we didn't
12511 # find any dependency.
12512 case $host_os in
12513 netbsd* | openbsd*)
12514 if test x"$pgac_lib" = x"" ; then
12515 pgac_lib=" -lcurses"
12516 fi ;;
12517 esac
12519 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12520 break
12523 rm -f core conftest.err conftest.$ac_objext \
12524 conftest$ac_exeext conftest.$ac_ext
12525 done
12526 if test "$pgac_cv_check_readline" != no ; then
12527 break
12529 done
12530 LIBS=$pgac_save_LIBS
12533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12534 $as_echo "$pgac_cv_check_readline" >&6; }
12535 if test "$pgac_cv_check_readline" != no ; then
12536 LIBS="$pgac_cv_check_readline $LIBS"
12538 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12543 if test x"$pgac_cv_check_readline" = x"no"; then
12544 as_fn_error $? "readline library not found
12545 If you have readline already installed, see config.log for details on the
12546 failure. It is possible the compiler isn't looking in the proper directory.
12547 Use --without-readline to disable readline support." "$LINENO" 5
12551 if test "$with_zlib" = yes; then
12552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12553 $as_echo_n "checking for inflate in -lz... " >&6; }
12554 if ${ac_cv_lib_z_inflate+:} false; then :
12555 $as_echo_n "(cached) " >&6
12556 else
12557 ac_check_lib_save_LIBS=$LIBS
12558 LIBS="-lz $LIBS"
12559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12560 /* end confdefs.h. */
12562 /* Override any GCC internal prototype to avoid an error.
12563 Use char because int might match the return type of a GCC
12564 builtin and then its argument prototype would still apply. */
12565 #ifdef __cplusplus
12566 extern "C"
12567 #endif
12568 char inflate ();
12570 main ()
12572 return inflate ();
12574 return 0;
12576 _ACEOF
12577 if ac_fn_c_try_link "$LINENO"; then :
12578 ac_cv_lib_z_inflate=yes
12579 else
12580 ac_cv_lib_z_inflate=no
12582 rm -f core conftest.err conftest.$ac_objext \
12583 conftest$ac_exeext conftest.$ac_ext
12584 LIBS=$ac_check_lib_save_LIBS
12586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12587 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12588 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12589 cat >>confdefs.h <<_ACEOF
12590 #define HAVE_LIBZ 1
12591 _ACEOF
12593 LIBS="-lz $LIBS"
12595 else
12596 as_fn_error $? "zlib library not found
12597 If you have zlib already installed, see config.log for details on the
12598 failure. It is possible the compiler isn't looking in the proper directory.
12599 Use --without-zlib to disable zlib support." "$LINENO" 5
12604 if test "$enable_spinlocks" = yes; then
12606 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
12608 else
12609 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12610 *** Not using spinlocks will cause poor performance." >&5
12611 $as_echo "$as_me: WARNING:
12612 *** Not using spinlocks will cause poor performance." >&2;}
12615 if test "$enable_atomics" = yes; then
12617 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
12619 else
12620 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12621 *** Not using atomic operations will cause poor performance." >&5
12622 $as_echo "$as_me: WARNING:
12623 *** Not using atomic operations will cause poor performance." >&2;}
12626 if test "$with_gssapi" = yes ; then
12627 if test "$PORTNAME" != "win32"; then
12628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_store_cred_into" >&5
12629 $as_echo_n "checking for library containing gss_store_cred_into... " >&6; }
12630 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12631 $as_echo_n "(cached) " >&6
12632 else
12633 ac_func_search_save_LIBS=$LIBS
12634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12635 /* end confdefs.h. */
12637 /* Override any GCC internal prototype to avoid an error.
12638 Use char because int might match the return type of a GCC
12639 builtin and then its argument prototype would still apply. */
12640 #ifdef __cplusplus
12641 extern "C"
12642 #endif
12643 char gss_store_cred_into ();
12645 main ()
12647 return gss_store_cred_into ();
12649 return 0;
12651 _ACEOF
12652 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12653 if test -z "$ac_lib"; then
12654 ac_res="none required"
12655 else
12656 ac_res=-l$ac_lib
12657 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12659 if ac_fn_c_try_link "$LINENO"; then :
12660 ac_cv_search_gss_store_cred_into=$ac_res
12662 rm -f core conftest.err conftest.$ac_objext \
12663 conftest$ac_exeext
12664 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12665 break
12667 done
12668 if ${ac_cv_search_gss_store_cred_into+:} false; then :
12670 else
12671 ac_cv_search_gss_store_cred_into=no
12673 rm conftest.$ac_ext
12674 LIBS=$ac_func_search_save_LIBS
12676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_store_cred_into" >&5
12677 $as_echo "$ac_cv_search_gss_store_cred_into" >&6; }
12678 ac_res=$ac_cv_search_gss_store_cred_into
12679 if test "$ac_res" != no; then :
12680 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12682 else
12683 as_fn_error $? "could not find function 'gss_store_cred_into' required for GSSAPI" "$LINENO" 5
12686 else
12687 LIBS="$LIBS -lgssapi32"
12692 # SSL Library
12694 # There is currently only one supported SSL/TLS library: OpenSSL.
12699 # Check whether --with-ssl was given.
12700 if test "${with_ssl+set}" = set; then :
12701 withval=$with_ssl;
12702 case $withval in
12703 yes)
12704 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12707 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12712 esac
12717 if test x"$with_ssl" = x"" ; then
12718 with_ssl=no
12723 # Check whether --with-openssl was given.
12724 if test "${with_openssl+set}" = set; then :
12725 withval=$with_openssl;
12726 case $withval in
12727 yes)
12734 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
12736 esac
12738 else
12739 with_openssl=no
12744 if test "$with_openssl" = yes ; then
12745 with_ssl=openssl
12748 if test "$with_ssl" = openssl ; then
12749 # Minimum required OpenSSL version is 1.0.1
12751 $as_echo "#define OPENSSL_API_COMPAT 0x10001000L" >>confdefs.h
12753 if test "$PORTNAME" != "win32"; then
12754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12755 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12756 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12757 $as_echo_n "(cached) " >&6
12758 else
12759 ac_check_lib_save_LIBS=$LIBS
12760 LIBS="-lcrypto $LIBS"
12761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12762 /* end confdefs.h. */
12764 /* Override any GCC internal prototype to avoid an error.
12765 Use char because int might match the return type of a GCC
12766 builtin and then its argument prototype would still apply. */
12767 #ifdef __cplusplus
12768 extern "C"
12769 #endif
12770 char CRYPTO_new_ex_data ();
12772 main ()
12774 return CRYPTO_new_ex_data ();
12776 return 0;
12778 _ACEOF
12779 if ac_fn_c_try_link "$LINENO"; then :
12780 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12781 else
12782 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12784 rm -f core conftest.err conftest.$ac_objext \
12785 conftest$ac_exeext conftest.$ac_ext
12786 LIBS=$ac_check_lib_save_LIBS
12788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12789 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12790 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12791 cat >>confdefs.h <<_ACEOF
12792 #define HAVE_LIBCRYPTO 1
12793 _ACEOF
12795 LIBS="-lcrypto $LIBS"
12797 else
12798 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12802 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
12803 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12804 $as_echo_n "(cached) " >&6
12805 else
12806 ac_check_lib_save_LIBS=$LIBS
12807 LIBS="-lssl $LIBS"
12808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12809 /* end confdefs.h. */
12811 /* Override any GCC internal prototype to avoid an error.
12812 Use char because int might match the return type of a GCC
12813 builtin and then its argument prototype would still apply. */
12814 #ifdef __cplusplus
12815 extern "C"
12816 #endif
12817 char SSL_new ();
12819 main ()
12821 return SSL_new ();
12823 return 0;
12825 _ACEOF
12826 if ac_fn_c_try_link "$LINENO"; then :
12827 ac_cv_lib_ssl_SSL_new=yes
12828 else
12829 ac_cv_lib_ssl_SSL_new=no
12831 rm -f core conftest.err conftest.$ac_objext \
12832 conftest$ac_exeext conftest.$ac_ext
12833 LIBS=$ac_check_lib_save_LIBS
12835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12836 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12837 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12838 cat >>confdefs.h <<_ACEOF
12839 #define HAVE_LIBSSL 1
12840 _ACEOF
12842 LIBS="-lssl $LIBS"
12844 else
12845 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12848 else
12849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12850 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12851 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12852 $as_echo_n "(cached) " >&6
12853 else
12854 ac_func_search_save_LIBS=$LIBS
12855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12856 /* end confdefs.h. */
12858 /* Override any GCC internal prototype to avoid an error.
12859 Use char because int might match the return type of a GCC
12860 builtin and then its argument prototype would still apply. */
12861 #ifdef __cplusplus
12862 extern "C"
12863 #endif
12864 char CRYPTO_new_ex_data ();
12866 main ()
12868 return CRYPTO_new_ex_data ();
12870 return 0;
12872 _ACEOF
12873 for ac_lib in '' eay32 crypto; do
12874 if test -z "$ac_lib"; then
12875 ac_res="none required"
12876 else
12877 ac_res=-l$ac_lib
12878 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12880 if ac_fn_c_try_link "$LINENO"; then :
12881 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12883 rm -f core conftest.err conftest.$ac_objext \
12884 conftest$ac_exeext
12885 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12886 break
12888 done
12889 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12891 else
12892 ac_cv_search_CRYPTO_new_ex_data=no
12894 rm conftest.$ac_ext
12895 LIBS=$ac_func_search_save_LIBS
12897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12898 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12899 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12900 if test "$ac_res" != no; then :
12901 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12903 else
12904 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12908 $as_echo_n "checking for library containing SSL_new... " >&6; }
12909 if ${ac_cv_search_SSL_new+:} false; then :
12910 $as_echo_n "(cached) " >&6
12911 else
12912 ac_func_search_save_LIBS=$LIBS
12913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12914 /* end confdefs.h. */
12916 /* Override any GCC internal prototype to avoid an error.
12917 Use char because int might match the return type of a GCC
12918 builtin and then its argument prototype would still apply. */
12919 #ifdef __cplusplus
12920 extern "C"
12921 #endif
12922 char SSL_new ();
12924 main ()
12926 return SSL_new ();
12928 return 0;
12930 _ACEOF
12931 for ac_lib in '' ssleay32 ssl; do
12932 if test -z "$ac_lib"; then
12933 ac_res="none required"
12934 else
12935 ac_res=-l$ac_lib
12936 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12938 if ac_fn_c_try_link "$LINENO"; then :
12939 ac_cv_search_SSL_new=$ac_res
12941 rm -f core conftest.err conftest.$ac_objext \
12942 conftest$ac_exeext
12943 if ${ac_cv_search_SSL_new+:} false; then :
12944 break
12946 done
12947 if ${ac_cv_search_SSL_new+:} false; then :
12949 else
12950 ac_cv_search_SSL_new=no
12952 rm conftest.$ac_ext
12953 LIBS=$ac_func_search_save_LIBS
12955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
12956 $as_echo "$ac_cv_search_SSL_new" >&6; }
12957 ac_res=$ac_cv_search_SSL_new
12958 if test "$ac_res" != no; then :
12959 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12961 else
12962 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
12966 # Functions introduced in OpenSSL 1.0.2. LibreSSL does not have
12967 # SSL_CTX_set_cert_cb().
12968 for ac_func in X509_get_signature_nid SSL_CTX_set_cert_cb
12969 do :
12970 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12971 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12972 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12973 cat >>confdefs.h <<_ACEOF
12974 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12975 _ACEOF
12978 done
12980 # Functions introduced in OpenSSL 1.1.0. We used to check for
12981 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
12982 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
12983 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
12984 # functions.
12985 for ac_func in OPENSSL_init_ssl BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free
12986 do :
12987 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12988 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12989 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12990 cat >>confdefs.h <<_ACEOF
12991 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12992 _ACEOF
12995 done
12997 # OpenSSL versions before 1.1.0 required setting callback functions, for
12998 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
12999 # function was removed.
13000 for ac_func in CRYPTO_lock
13001 do :
13002 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
13003 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
13004 cat >>confdefs.h <<_ACEOF
13005 #define HAVE_CRYPTO_LOCK 1
13006 _ACEOF
13009 done
13011 # Function introduced in OpenSSL 1.1.1.
13012 for ac_func in X509_get_signature_info SSL_CTX_set_num_tickets
13013 do :
13014 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13015 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13016 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13017 cat >>confdefs.h <<_ACEOF
13018 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13019 _ACEOF
13022 done
13025 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
13027 elif test "$with_ssl" != no ; then
13028 as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
13032 if test "$with_pam" = yes ; then
13033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
13034 $as_echo_n "checking for pam_start in -lpam... " >&6; }
13035 if ${ac_cv_lib_pam_pam_start+:} false; then :
13036 $as_echo_n "(cached) " >&6
13037 else
13038 ac_check_lib_save_LIBS=$LIBS
13039 LIBS="-lpam $LIBS"
13040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13041 /* end confdefs.h. */
13043 /* Override any GCC internal prototype to avoid an error.
13044 Use char because int might match the return type of a GCC
13045 builtin and then its argument prototype would still apply. */
13046 #ifdef __cplusplus
13047 extern "C"
13048 #endif
13049 char pam_start ();
13051 main ()
13053 return pam_start ();
13055 return 0;
13057 _ACEOF
13058 if ac_fn_c_try_link "$LINENO"; then :
13059 ac_cv_lib_pam_pam_start=yes
13060 else
13061 ac_cv_lib_pam_pam_start=no
13063 rm -f core conftest.err conftest.$ac_objext \
13064 conftest$ac_exeext conftest.$ac_ext
13065 LIBS=$ac_check_lib_save_LIBS
13067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
13068 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
13069 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
13070 cat >>confdefs.h <<_ACEOF
13071 #define HAVE_LIBPAM 1
13072 _ACEOF
13074 LIBS="-lpam $LIBS"
13076 else
13077 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
13082 if test "$with_libxml" = yes ; then
13083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
13084 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
13085 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
13086 $as_echo_n "(cached) " >&6
13087 else
13088 ac_check_lib_save_LIBS=$LIBS
13089 LIBS="-lxml2 $LIBS"
13090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13091 /* end confdefs.h. */
13093 /* Override any GCC internal prototype to avoid an error.
13094 Use char because int might match the return type of a GCC
13095 builtin and then its argument prototype would still apply. */
13096 #ifdef __cplusplus
13097 extern "C"
13098 #endif
13099 char xmlSaveToBuffer ();
13101 main ()
13103 return xmlSaveToBuffer ();
13105 return 0;
13107 _ACEOF
13108 if ac_fn_c_try_link "$LINENO"; then :
13109 ac_cv_lib_xml2_xmlSaveToBuffer=yes
13110 else
13111 ac_cv_lib_xml2_xmlSaveToBuffer=no
13113 rm -f core conftest.err conftest.$ac_objext \
13114 conftest$ac_exeext conftest.$ac_ext
13115 LIBS=$ac_check_lib_save_LIBS
13117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
13118 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
13119 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
13120 cat >>confdefs.h <<_ACEOF
13121 #define HAVE_LIBXML2 1
13122 _ACEOF
13124 LIBS="-lxml2 $LIBS"
13126 else
13127 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
13132 if test "$with_libxslt" = yes ; then
13133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
13134 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
13135 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
13136 $as_echo_n "(cached) " >&6
13137 else
13138 ac_check_lib_save_LIBS=$LIBS
13139 LIBS="-lxslt $LIBS"
13140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13141 /* end confdefs.h. */
13143 /* Override any GCC internal prototype to avoid an error.
13144 Use char because int might match the return type of a GCC
13145 builtin and then its argument prototype would still apply. */
13146 #ifdef __cplusplus
13147 extern "C"
13148 #endif
13149 char xsltCleanupGlobals ();
13151 main ()
13153 return xsltCleanupGlobals ();
13155 return 0;
13157 _ACEOF
13158 if ac_fn_c_try_link "$LINENO"; then :
13159 ac_cv_lib_xslt_xsltCleanupGlobals=yes
13160 else
13161 ac_cv_lib_xslt_xsltCleanupGlobals=no
13163 rm -f core conftest.err conftest.$ac_objext \
13164 conftest$ac_exeext conftest.$ac_ext
13165 LIBS=$ac_check_lib_save_LIBS
13167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
13168 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
13169 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
13170 cat >>confdefs.h <<_ACEOF
13171 #define HAVE_LIBXSLT 1
13172 _ACEOF
13174 LIBS="-lxslt $LIBS"
13176 else
13177 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
13182 if test "$with_lz4" = yes ; then
13183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5
13184 $as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; }
13185 if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then :
13186 $as_echo_n "(cached) " >&6
13187 else
13188 ac_check_lib_save_LIBS=$LIBS
13189 LIBS="-llz4 $LIBS"
13190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13191 /* end confdefs.h. */
13193 /* Override any GCC internal prototype to avoid an error.
13194 Use char because int might match the return type of a GCC
13195 builtin and then its argument prototype would still apply. */
13196 #ifdef __cplusplus
13197 extern "C"
13198 #endif
13199 char LZ4_compress_default ();
13201 main ()
13203 return LZ4_compress_default ();
13205 return 0;
13207 _ACEOF
13208 if ac_fn_c_try_link "$LINENO"; then :
13209 ac_cv_lib_lz4_LZ4_compress_default=yes
13210 else
13211 ac_cv_lib_lz4_LZ4_compress_default=no
13213 rm -f core conftest.err conftest.$ac_objext \
13214 conftest$ac_exeext conftest.$ac_ext
13215 LIBS=$ac_check_lib_save_LIBS
13217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5
13218 $as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; }
13219 if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then :
13220 cat >>confdefs.h <<_ACEOF
13221 #define HAVE_LIBLZ4 1
13222 _ACEOF
13224 LIBS="-llz4 $LIBS"
13226 else
13227 as_fn_error $? "library 'lz4' is required for LZ4 support" "$LINENO" 5
13232 if test "$with_zstd" = yes ; then
13233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_compress in -lzstd" >&5
13234 $as_echo_n "checking for ZSTD_compress in -lzstd... " >&6; }
13235 if ${ac_cv_lib_zstd_ZSTD_compress+:} false; then :
13236 $as_echo_n "(cached) " >&6
13237 else
13238 ac_check_lib_save_LIBS=$LIBS
13239 LIBS="-lzstd $LIBS"
13240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13241 /* end confdefs.h. */
13243 /* Override any GCC internal prototype to avoid an error.
13244 Use char because int might match the return type of a GCC
13245 builtin and then its argument prototype would still apply. */
13246 #ifdef __cplusplus
13247 extern "C"
13248 #endif
13249 char ZSTD_compress ();
13251 main ()
13253 return ZSTD_compress ();
13255 return 0;
13257 _ACEOF
13258 if ac_fn_c_try_link "$LINENO"; then :
13259 ac_cv_lib_zstd_ZSTD_compress=yes
13260 else
13261 ac_cv_lib_zstd_ZSTD_compress=no
13263 rm -f core conftest.err conftest.$ac_objext \
13264 conftest$ac_exeext conftest.$ac_ext
13265 LIBS=$ac_check_lib_save_LIBS
13267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_compress" >&5
13268 $as_echo "$ac_cv_lib_zstd_ZSTD_compress" >&6; }
13269 if test "x$ac_cv_lib_zstd_ZSTD_compress" = xyes; then :
13270 cat >>confdefs.h <<_ACEOF
13271 #define HAVE_LIBZSTD 1
13272 _ACEOF
13274 LIBS="-lzstd $LIBS"
13276 else
13277 as_fn_error $? "library 'zstd' is required for ZSTD support" "$LINENO" 5
13282 # Note: We can test for libldap_r only after we know PTHREAD_LIBS;
13283 # also, on AIX, we may need to have openssl in LIBS for this step.
13284 if test "$with_ldap" = yes ; then
13285 _LIBS="$LIBS"
13286 if test "$PORTNAME" != "win32"; then
13287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
13288 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
13289 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
13290 $as_echo_n "(cached) " >&6
13291 else
13292 ac_check_lib_save_LIBS=$LIBS
13293 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
13294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13295 /* end confdefs.h. */
13297 /* Override any GCC internal prototype to avoid an error.
13298 Use char because int might match the return type of a GCC
13299 builtin and then its argument prototype would still apply. */
13300 #ifdef __cplusplus
13301 extern "C"
13302 #endif
13303 char ldap_bind ();
13305 main ()
13307 return ldap_bind ();
13309 return 0;
13311 _ACEOF
13312 if ac_fn_c_try_link "$LINENO"; then :
13313 ac_cv_lib_ldap_ldap_bind=yes
13314 else
13315 ac_cv_lib_ldap_ldap_bind=no
13317 rm -f core conftest.err conftest.$ac_objext \
13318 conftest$ac_exeext conftest.$ac_ext
13319 LIBS=$ac_check_lib_save_LIBS
13321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
13322 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
13323 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
13324 cat >>confdefs.h <<_ACEOF
13325 #define HAVE_LIBLDAP 1
13326 _ACEOF
13328 LIBS="-lldap $LIBS"
13330 else
13331 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
13334 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
13335 # This test is carried out against libldap.
13336 for ac_func in ldap_initialize
13337 do :
13338 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
13339 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
13340 cat >>confdefs.h <<_ACEOF
13341 #define HAVE_LDAP_INITIALIZE 1
13342 _ACEOF
13345 done
13347 # The separate ldap_r library only exists in OpenLDAP < 2.5, and if we
13348 # have 2.5 or later, we shouldn't even probe for ldap_r (we might find a
13349 # library from a separate OpenLDAP installation). The most reliable
13350 # way to check that is to check for a function introduced in 2.5.
13351 ac_fn_c_check_func "$LINENO" "ldap_verify_credentials" "ac_cv_func_ldap_verify_credentials"
13352 if test "x$ac_cv_func_ldap_verify_credentials" = xyes; then :
13353 thread_safe_libldap=yes
13354 else
13355 thread_safe_libldap=no
13358 if test "$enable_thread_safety" = yes -a "$thread_safe_libldap" = no; then
13359 # Use ldap_r for FE if available, else assume ldap is thread-safe.
13360 # On some platforms ldap_r fails to link without PTHREAD_LIBS.
13361 LIBS="$_LIBS"
13362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
13363 $as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
13364 if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
13365 $as_echo_n "(cached) " >&6
13366 else
13367 ac_check_lib_save_LIBS=$LIBS
13368 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
13369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13370 /* end confdefs.h. */
13372 /* Override any GCC internal prototype to avoid an error.
13373 Use char because int might match the return type of a GCC
13374 builtin and then its argument prototype would still apply. */
13375 #ifdef __cplusplus
13376 extern "C"
13377 #endif
13378 char ldap_bind ();
13380 main ()
13382 return ldap_bind ();
13384 return 0;
13386 _ACEOF
13387 if ac_fn_c_try_link "$LINENO"; then :
13388 ac_cv_lib_ldap_r_ldap_bind=yes
13389 else
13390 ac_cv_lib_ldap_r_ldap_bind=no
13392 rm -f core conftest.err conftest.$ac_objext \
13393 conftest$ac_exeext conftest.$ac_ext
13394 LIBS=$ac_check_lib_save_LIBS
13396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
13397 $as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
13398 if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
13399 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
13400 else
13401 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13404 else
13405 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13407 else
13408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
13409 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
13410 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
13411 $as_echo_n "(cached) " >&6
13412 else
13413 ac_check_lib_save_LIBS=$LIBS
13414 LIBS="-lwldap32 $LIBS"
13415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13416 /* end confdefs.h. */
13418 /* Override any GCC internal prototype to avoid an error.
13419 Use char because int might match the return type of a GCC
13420 builtin and then its argument prototype would still apply. */
13421 #ifdef __cplusplus
13422 extern "C"
13423 #endif
13424 char ldap_bind ();
13426 main ()
13428 return ldap_bind ();
13430 return 0;
13432 _ACEOF
13433 if ac_fn_c_try_link "$LINENO"; then :
13434 ac_cv_lib_wldap32_ldap_bind=yes
13435 else
13436 ac_cv_lib_wldap32_ldap_bind=no
13438 rm -f core conftest.err conftest.$ac_objext \
13439 conftest$ac_exeext conftest.$ac_ext
13440 LIBS=$ac_check_lib_save_LIBS
13442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
13443 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
13444 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
13445 cat >>confdefs.h <<_ACEOF
13446 #define HAVE_LIBWLDAP32 1
13447 _ACEOF
13449 LIBS="-lwldap32 $LIBS"
13451 else
13452 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
13455 LDAP_LIBS_FE="-lwldap32"
13456 LDAP_LIBS_BE="-lwldap32"
13458 LIBS="$_LIBS"
13463 # for contrib/sepgsql
13464 if test "$with_selinux" = yes; then
13465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
13466 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
13467 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
13468 $as_echo_n "(cached) " >&6
13469 else
13470 ac_check_lib_save_LIBS=$LIBS
13471 LIBS="-lselinux $LIBS"
13472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13473 /* end confdefs.h. */
13475 /* Override any GCC internal prototype to avoid an error.
13476 Use char because int might match the return type of a GCC
13477 builtin and then its argument prototype would still apply. */
13478 #ifdef __cplusplus
13479 extern "C"
13480 #endif
13481 char security_compute_create_name ();
13483 main ()
13485 return security_compute_create_name ();
13487 return 0;
13489 _ACEOF
13490 if ac_fn_c_try_link "$LINENO"; then :
13491 ac_cv_lib_selinux_security_compute_create_name=yes
13492 else
13493 ac_cv_lib_selinux_security_compute_create_name=no
13495 rm -f core conftest.err conftest.$ac_objext \
13496 conftest$ac_exeext conftest.$ac_ext
13497 LIBS=$ac_check_lib_save_LIBS
13499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
13500 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
13501 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
13502 cat >>confdefs.h <<_ACEOF
13503 #define HAVE_LIBSELINUX 1
13504 _ACEOF
13506 LIBS="-lselinux $LIBS"
13508 else
13509 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
13514 # for contrib/uuid-ossp
13515 if test "$with_uuid" = bsd ; then
13516 # On BSD, the UUID functions are in libc
13517 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
13518 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
13519 UUID_LIBS=""
13520 else
13521 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
13524 elif test "$with_uuid" = e2fs ; then
13525 # On macOS, the UUID functions are in libc
13526 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
13527 if test "x$ac_cv_func_uuid_generate" = xyes; then :
13528 UUID_LIBS=""
13529 else
13530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
13531 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
13532 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
13533 $as_echo_n "(cached) " >&6
13534 else
13535 ac_check_lib_save_LIBS=$LIBS
13536 LIBS="-luuid $LIBS"
13537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13538 /* end confdefs.h. */
13540 /* Override any GCC internal prototype to avoid an error.
13541 Use char because int might match the return type of a GCC
13542 builtin and then its argument prototype would still apply. */
13543 #ifdef __cplusplus
13544 extern "C"
13545 #endif
13546 char uuid_generate ();
13548 main ()
13550 return uuid_generate ();
13552 return 0;
13554 _ACEOF
13555 if ac_fn_c_try_link "$LINENO"; then :
13556 ac_cv_lib_uuid_uuid_generate=yes
13557 else
13558 ac_cv_lib_uuid_uuid_generate=no
13560 rm -f core conftest.err conftest.$ac_objext \
13561 conftest$ac_exeext conftest.$ac_ext
13562 LIBS=$ac_check_lib_save_LIBS
13564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13565 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13566 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13567 UUID_LIBS="-luuid"
13568 else
13569 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13574 elif test "$with_uuid" = ossp ; then
13575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13576 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13577 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13578 $as_echo_n "(cached) " >&6
13579 else
13580 ac_check_lib_save_LIBS=$LIBS
13581 LIBS="-lossp-uuid $LIBS"
13582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13583 /* end confdefs.h. */
13585 /* Override any GCC internal prototype to avoid an error.
13586 Use char because int might match the return type of a GCC
13587 builtin and then its argument prototype would still apply. */
13588 #ifdef __cplusplus
13589 extern "C"
13590 #endif
13591 char uuid_export ();
13593 main ()
13595 return uuid_export ();
13597 return 0;
13599 _ACEOF
13600 if ac_fn_c_try_link "$LINENO"; then :
13601 ac_cv_lib_ossp_uuid_uuid_export=yes
13602 else
13603 ac_cv_lib_ossp_uuid_uuid_export=no
13605 rm -f core conftest.err conftest.$ac_objext \
13606 conftest$ac_exeext conftest.$ac_ext
13607 LIBS=$ac_check_lib_save_LIBS
13609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13610 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13611 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13612 UUID_LIBS="-lossp-uuid"
13613 else
13614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13615 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
13616 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13617 $as_echo_n "(cached) " >&6
13618 else
13619 ac_check_lib_save_LIBS=$LIBS
13620 LIBS="-luuid $LIBS"
13621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13622 /* end confdefs.h. */
13624 /* Override any GCC internal prototype to avoid an error.
13625 Use char because int might match the return type of a GCC
13626 builtin and then its argument prototype would still apply. */
13627 #ifdef __cplusplus
13628 extern "C"
13629 #endif
13630 char uuid_export ();
13632 main ()
13634 return uuid_export ();
13636 return 0;
13638 _ACEOF
13639 if ac_fn_c_try_link "$LINENO"; then :
13640 ac_cv_lib_uuid_uuid_export=yes
13641 else
13642 ac_cv_lib_uuid_uuid_export=no
13644 rm -f core conftest.err conftest.$ac_objext \
13645 conftest$ac_exeext conftest.$ac_ext
13646 LIBS=$ac_check_lib_save_LIBS
13648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13649 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13650 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13651 UUID_LIBS="-luuid"
13652 else
13653 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13663 ## Header files
13666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13667 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13668 if ${ac_cv_header_stdbool_h+:} false; then :
13669 $as_echo_n "(cached) " >&6
13670 else
13671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13672 /* end confdefs.h. */
13674 #include <stdbool.h>
13675 #ifndef bool
13676 "error: bool is not defined"
13677 #endif
13678 #ifndef false
13679 "error: false is not defined"
13680 #endif
13681 #if false
13682 "error: false is not 0"
13683 #endif
13684 #ifndef true
13685 "error: true is not defined"
13686 #endif
13687 #if true != 1
13688 "error: true is not 1"
13689 #endif
13690 #ifndef __bool_true_false_are_defined
13691 "error: __bool_true_false_are_defined is not defined"
13692 #endif
13694 struct s { _Bool s: 1; _Bool t; } s;
13696 char a[true == 1 ? 1 : -1];
13697 char b[false == 0 ? 1 : -1];
13698 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13699 char d[(bool) 0.5 == true ? 1 : -1];
13700 /* See body of main program for 'e'. */
13701 char f[(_Bool) 0.0 == false ? 1 : -1];
13702 char g[true];
13703 char h[sizeof (_Bool)];
13704 char i[sizeof s.t];
13705 enum { j = false, k = true, l = false * true, m = true * 256 };
13706 /* The following fails for
13707 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13708 _Bool n[m];
13709 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13710 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13711 /* Catch a bug in an HP-UX C compiler. See
13712 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13713 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13715 _Bool q = true;
13716 _Bool *pq = &q;
13719 main ()
13722 bool e = &s;
13723 *pq |= q;
13724 *pq |= ! q;
13725 /* Refer to every declared value, to avoid compiler optimizations. */
13726 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13727 + !m + !n + !o + !p + !q + !pq);
13730 return 0;
13732 _ACEOF
13733 if ac_fn_c_try_compile "$LINENO"; then :
13734 ac_cv_header_stdbool_h=yes
13735 else
13736 ac_cv_header_stdbool_h=no
13738 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13741 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13742 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13743 if test "x$ac_cv_type__Bool" = xyes; then :
13745 cat >>confdefs.h <<_ACEOF
13746 #define HAVE__BOOL 1
13747 _ACEOF
13753 if test $ac_cv_header_stdbool_h = yes; then
13755 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
13760 for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.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
13761 do :
13762 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13763 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13764 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13765 cat >>confdefs.h <<_ACEOF
13766 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13767 _ACEOF
13771 done
13774 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13775 for ac_header in readline/readline.h
13776 do :
13777 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13778 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13779 cat >>confdefs.h <<_ACEOF
13780 #define HAVE_READLINE_READLINE_H 1
13781 _ACEOF
13783 else
13784 for ac_header in readline.h
13785 do :
13786 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13787 if test "x$ac_cv_header_readline_h" = xyes; then :
13788 cat >>confdefs.h <<_ACEOF
13789 #define HAVE_READLINE_H 1
13790 _ACEOF
13792 else
13793 as_fn_error $? "readline header not found
13794 If you have readline already installed, see config.log for details on the
13795 failure. It is possible the compiler isn't looking in the proper directory.
13796 Use --without-readline to disable readline support." "$LINENO" 5
13799 done
13803 done
13805 for ac_header in readline/history.h
13806 do :
13807 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13808 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13809 cat >>confdefs.h <<_ACEOF
13810 #define HAVE_READLINE_HISTORY_H 1
13811 _ACEOF
13813 else
13814 for ac_header in history.h
13815 do :
13816 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13817 if test "x$ac_cv_header_history_h" = xyes; then :
13818 cat >>confdefs.h <<_ACEOF
13819 #define HAVE_HISTORY_H 1
13820 _ACEOF
13822 else
13823 as_fn_error $? "history header not found
13824 If you have readline already installed, see config.log for details on the
13825 failure. It is possible the compiler isn't looking in the proper directory.
13826 Use --without-readline to disable readline support." "$LINENO" 5
13829 done
13833 done
13837 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13838 # Some installations of libedit usurp /usr/include/readline/, which seems
13839 # bad practice, since in combined installations readline will have its headers
13840 # there. We might have to resort to AC_EGREP checks to make sure we found
13841 # the proper header...
13842 for ac_header in editline/readline.h
13843 do :
13844 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13845 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13846 cat >>confdefs.h <<_ACEOF
13847 #define HAVE_EDITLINE_READLINE_H 1
13848 _ACEOF
13850 else
13851 for ac_header in readline.h
13852 do :
13853 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13854 if test "x$ac_cv_header_readline_h" = xyes; then :
13855 cat >>confdefs.h <<_ACEOF
13856 #define HAVE_READLINE_H 1
13857 _ACEOF
13859 else
13860 for ac_header in readline/readline.h
13861 do :
13862 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13863 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13864 cat >>confdefs.h <<_ACEOF
13865 #define HAVE_READLINE_READLINE_H 1
13866 _ACEOF
13868 else
13869 as_fn_error $? "readline header not found
13870 If you have libedit already installed, see config.log for details on the
13871 failure. It is possible the compiler isn't looking in the proper directory.
13872 Use --without-readline to disable libedit support." "$LINENO" 5
13875 done
13879 done
13883 done
13885 # Note: in a libedit installation, history.h is sometimes a dummy, and may
13886 # not be there at all. Hence, don't complain if not found. We must check
13887 # though, since in yet other versions it is an independent header.
13888 for ac_header in editline/history.h
13889 do :
13890 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
13891 if test "x$ac_cv_header_editline_history_h" = xyes; then :
13892 cat >>confdefs.h <<_ACEOF
13893 #define HAVE_EDITLINE_HISTORY_H 1
13894 _ACEOF
13896 else
13897 for ac_header in history.h
13898 do :
13899 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13900 if test "x$ac_cv_header_history_h" = xyes; then :
13901 cat >>confdefs.h <<_ACEOF
13902 #define HAVE_HISTORY_H 1
13903 _ACEOF
13905 else
13906 for ac_header in readline/history.h
13907 do :
13908 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13909 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13910 cat >>confdefs.h <<_ACEOF
13911 #define HAVE_READLINE_HISTORY_H 1
13912 _ACEOF
13916 done
13920 done
13924 done
13928 if test "$with_zlib" = yes; then
13929 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
13930 if test "x$ac_cv_header_zlib_h" = xyes; then :
13932 else
13933 as_fn_error $? "zlib header not found
13934 If you have zlib already installed, see config.log for details on the
13935 failure. It is possible the compiler isn't looking in the proper directory.
13936 Use --without-zlib to disable zlib support." "$LINENO" 5
13942 if test -z "$LZ4"; then
13943 for ac_prog in lz4
13945 # Extract the first word of "$ac_prog", so it can be a program name with args.
13946 set dummy $ac_prog; ac_word=$2
13947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13948 $as_echo_n "checking for $ac_word... " >&6; }
13949 if ${ac_cv_path_LZ4+:} false; then :
13950 $as_echo_n "(cached) " >&6
13951 else
13952 case $LZ4 in
13953 [\\/]* | ?:[\\/]*)
13954 ac_cv_path_LZ4="$LZ4" # Let the user override the test with a path.
13957 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13958 for as_dir in $PATH
13960 IFS=$as_save_IFS
13961 test -z "$as_dir" && as_dir=.
13962 for ac_exec_ext in '' $ac_executable_extensions; do
13963 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13964 ac_cv_path_LZ4="$as_dir/$ac_word$ac_exec_ext"
13965 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13966 break 2
13968 done
13969 done
13970 IFS=$as_save_IFS
13973 esac
13975 LZ4=$ac_cv_path_LZ4
13976 if test -n "$LZ4"; then
13977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13978 $as_echo "$LZ4" >&6; }
13979 else
13980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13981 $as_echo "no" >&6; }
13985 test -n "$LZ4" && break
13986 done
13988 else
13989 # Report the value of LZ4 in configure's output in all cases.
13990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4" >&5
13991 $as_echo_n "checking for LZ4... " >&6; }
13992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
13993 $as_echo "$LZ4" >&6; }
13996 if test "$with_lz4" = yes; then
13997 ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
13998 if test "x$ac_cv_header_lz4_h" = xyes; then :
14000 else
14001 as_fn_error $? "lz4.h header file is required for LZ4" "$LINENO" 5
14007 if test -z "$ZSTD"; then
14008 for ac_prog in zstd
14010 # Extract the first word of "$ac_prog", so it can be a program name with args.
14011 set dummy $ac_prog; ac_word=$2
14012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14013 $as_echo_n "checking for $ac_word... " >&6; }
14014 if ${ac_cv_path_ZSTD+:} false; then :
14015 $as_echo_n "(cached) " >&6
14016 else
14017 case $ZSTD in
14018 [\\/]* | ?:[\\/]*)
14019 ac_cv_path_ZSTD="$ZSTD" # Let the user override the test with a path.
14022 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14023 for as_dir in $PATH
14025 IFS=$as_save_IFS
14026 test -z "$as_dir" && as_dir=.
14027 for ac_exec_ext in '' $ac_executable_extensions; do
14028 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14029 ac_cv_path_ZSTD="$as_dir/$ac_word$ac_exec_ext"
14030 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14031 break 2
14033 done
14034 done
14035 IFS=$as_save_IFS
14038 esac
14040 ZSTD=$ac_cv_path_ZSTD
14041 if test -n "$ZSTD"; then
14042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
14043 $as_echo "$ZSTD" >&6; }
14044 else
14045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14046 $as_echo "no" >&6; }
14050 test -n "$ZSTD" && break
14051 done
14053 else
14054 # Report the value of ZSTD in configure's output in all cases.
14055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD" >&5
14056 $as_echo_n "checking for ZSTD... " >&6; }
14057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
14058 $as_echo "$ZSTD" >&6; }
14061 if test "$with_zstd" = yes; then
14062 ac_fn_c_check_header_mongrel "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default"
14063 if test "x$ac_cv_header_zstd_h" = xyes; then :
14065 else
14066 as_fn_error $? "zstd.h header file is required for ZSTD" "$LINENO" 5
14072 if test "$with_gssapi" = yes ; then
14073 for ac_header in gssapi/gssapi.h
14074 do :
14075 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
14076 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
14077 cat >>confdefs.h <<_ACEOF
14078 #define HAVE_GSSAPI_GSSAPI_H 1
14079 _ACEOF
14081 else
14082 for ac_header in gssapi.h
14083 do :
14084 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
14085 if test "x$ac_cv_header_gssapi_h" = xyes; then :
14086 cat >>confdefs.h <<_ACEOF
14087 #define HAVE_GSSAPI_H 1
14088 _ACEOF
14090 else
14091 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
14094 done
14098 done
14100 for ac_header in gssapi/gssapi_ext.h
14101 do :
14102 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi_ext.h" "ac_cv_header_gssapi_gssapi_ext_h" "$ac_includes_default"
14103 if test "x$ac_cv_header_gssapi_gssapi_ext_h" = xyes; then :
14104 cat >>confdefs.h <<_ACEOF
14105 #define HAVE_GSSAPI_GSSAPI_EXT_H 1
14106 _ACEOF
14108 else
14109 for ac_header in gssapi_ext.h
14110 do :
14111 ac_fn_c_check_header_mongrel "$LINENO" "gssapi_ext.h" "ac_cv_header_gssapi_ext_h" "$ac_includes_default"
14112 if test "x$ac_cv_header_gssapi_ext_h" = xyes; then :
14113 cat >>confdefs.h <<_ACEOF
14114 #define HAVE_GSSAPI_EXT_H 1
14115 _ACEOF
14117 else
14118 as_fn_error $? "gssapi_ext.h header file is required for GSSAPI" "$LINENO" 5
14121 done
14125 done
14129 if test -z "$OPENSSL"; then
14130 for ac_prog in openssl
14132 # Extract the first word of "$ac_prog", so it can be a program name with args.
14133 set dummy $ac_prog; ac_word=$2
14134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14135 $as_echo_n "checking for $ac_word... " >&6; }
14136 if ${ac_cv_path_OPENSSL+:} false; then :
14137 $as_echo_n "(cached) " >&6
14138 else
14139 case $OPENSSL in
14140 [\\/]* | ?:[\\/]*)
14141 ac_cv_path_OPENSSL="$OPENSSL" # Let the user override the test with a path.
14144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14145 for as_dir in $PATH
14147 IFS=$as_save_IFS
14148 test -z "$as_dir" && as_dir=.
14149 for ac_exec_ext in '' $ac_executable_extensions; do
14150 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14151 ac_cv_path_OPENSSL="$as_dir/$ac_word$ac_exec_ext"
14152 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14153 break 2
14155 done
14156 done
14157 IFS=$as_save_IFS
14160 esac
14162 OPENSSL=$ac_cv_path_OPENSSL
14163 if test -n "$OPENSSL"; then
14164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
14165 $as_echo "$OPENSSL" >&6; }
14166 else
14167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14168 $as_echo "no" >&6; }
14172 test -n "$OPENSSL" && break
14173 done
14175 else
14176 # Report the value of OPENSSL in configure's output in all cases.
14177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OPENSSL" >&5
14178 $as_echo_n "checking for OPENSSL... " >&6; }
14179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENSSL" >&5
14180 $as_echo "$OPENSSL" >&6; }
14183 pgac_openssl_version="$($OPENSSL version 2> /dev/null || echo openssl not found)"
14184 { $as_echo "$as_me:${as_lineno-$LINENO}: using openssl: $pgac_openssl_version" >&5
14185 $as_echo "$as_me: using openssl: $pgac_openssl_version" >&6;}
14186 if test "$with_ssl" = openssl ; then
14187 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
14188 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
14190 else
14191 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
14195 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
14196 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
14198 else
14199 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
14205 if test "$with_pam" = yes ; then
14206 for ac_header in security/pam_appl.h
14207 do :
14208 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
14209 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
14210 cat >>confdefs.h <<_ACEOF
14211 #define HAVE_SECURITY_PAM_APPL_H 1
14212 _ACEOF
14214 else
14215 for ac_header in pam/pam_appl.h
14216 do :
14217 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
14218 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
14219 cat >>confdefs.h <<_ACEOF
14220 #define HAVE_PAM_PAM_APPL_H 1
14221 _ACEOF
14223 else
14224 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
14227 done
14231 done
14235 if test "$with_bsd_auth" = yes ; then
14236 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
14237 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
14239 else
14240 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
14246 if test "$with_systemd" = yes ; then
14247 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
14248 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
14250 else
14251 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
14257 if test "$with_libxml" = yes ; then
14258 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
14259 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
14261 else
14262 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
14268 if test "$with_libxslt" = yes ; then
14269 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
14270 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
14272 else
14273 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
14279 if test "$with_ldap" = yes ; then
14280 if test "$PORTNAME" != "win32"; then
14281 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
14282 if test "x$ac_cv_header_ldap_h" = xyes; then :
14284 else
14285 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
14289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
14290 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
14291 if ${pgac_cv_ldap_safe+:} false; then :
14292 $as_echo_n "(cached) " >&6
14293 else
14294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14295 /* end confdefs.h. */
14296 #include <ldap.h>
14297 #if !defined(LDAP_VENDOR_VERSION) || \
14298 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
14299 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
14300 choke me
14301 #endif
14303 main ()
14307 return 0;
14309 _ACEOF
14310 if ac_fn_c_try_compile "$LINENO"; then :
14311 pgac_cv_ldap_safe=yes
14312 else
14313 pgac_cv_ldap_safe=no
14315 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
14318 $as_echo "$pgac_cv_ldap_safe" >&6; }
14320 if test "$pgac_cv_ldap_safe" != yes; then
14321 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
14322 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
14323 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
14324 *** also uses LDAP will crash on exit." >&5
14325 $as_echo "$as_me: WARNING:
14326 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
14327 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
14328 *** also uses LDAP will crash on exit." >&2;}
14330 else
14331 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
14332 #include <windows.h>
14335 if test "x$ac_cv_header_winldap_h" = xyes; then :
14337 else
14338 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
14345 if test "$with_bonjour" = yes ; then
14346 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
14347 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
14349 else
14350 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
14356 # for contrib/uuid-ossp
14357 if test "$with_uuid" = bsd ; then
14358 for ac_header in uuid.h
14359 do :
14360 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14361 if test "x$ac_cv_header_uuid_h" = xyes; then :
14362 cat >>confdefs.h <<_ACEOF
14363 #define HAVE_UUID_H 1
14364 _ACEOF
14365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14366 /* end confdefs.h. */
14367 #include <uuid.h>
14369 _ACEOF
14370 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14371 $EGREP "uuid_to_string" >/dev/null 2>&1; then :
14373 else
14374 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
14376 rm -f conftest*
14378 else
14379 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
14382 done
14384 elif test "$with_uuid" = e2fs ; then
14385 for ac_header in uuid/uuid.h
14386 do :
14387 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
14388 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
14389 cat >>confdefs.h <<_ACEOF
14390 #define HAVE_UUID_UUID_H 1
14391 _ACEOF
14392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14393 /* end confdefs.h. */
14394 #include <uuid/uuid.h>
14396 _ACEOF
14397 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14398 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14400 else
14401 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
14403 rm -f conftest*
14405 else
14406 for ac_header in uuid.h
14407 do :
14408 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14409 if test "x$ac_cv_header_uuid_h" = xyes; then :
14410 cat >>confdefs.h <<_ACEOF
14411 #define HAVE_UUID_H 1
14412 _ACEOF
14413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14414 /* end confdefs.h. */
14415 #include <uuid.h>
14417 _ACEOF
14418 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14419 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14421 else
14422 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
14424 rm -f conftest*
14426 else
14427 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
14430 done
14434 done
14436 elif test "$with_uuid" = ossp ; then
14437 for ac_header in ossp/uuid.h
14438 do :
14439 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
14440 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
14441 cat >>confdefs.h <<_ACEOF
14442 #define HAVE_OSSP_UUID_H 1
14443 _ACEOF
14444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14445 /* end confdefs.h. */
14446 #include <ossp/uuid.h>
14448 _ACEOF
14449 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14450 $EGREP "uuid_export" >/dev/null 2>&1; then :
14452 else
14453 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
14455 rm -f conftest*
14457 else
14458 for ac_header in uuid.h
14459 do :
14460 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14461 if test "x$ac_cv_header_uuid_h" = xyes; then :
14462 cat >>confdefs.h <<_ACEOF
14463 #define HAVE_UUID_H 1
14464 _ACEOF
14465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14466 /* end confdefs.h. */
14467 #include <uuid.h>
14469 _ACEOF
14470 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14471 $EGREP "uuid_export" >/dev/null 2>&1; then :
14473 else
14474 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
14476 rm -f conftest*
14478 else
14479 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
14482 done
14486 done
14490 if test "$PORTNAME" = "win32" ; then
14491 for ac_header in crtdefs.h
14492 do :
14493 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
14494 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
14495 cat >>confdefs.h <<_ACEOF
14496 #define HAVE_CRTDEFS_H 1
14497 _ACEOF
14501 done
14506 ## Types, structures, compiler characteristics
14509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14510 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
14511 if ${ac_cv_c_bigendian+:} false; then :
14512 $as_echo_n "(cached) " >&6
14513 else
14514 ac_cv_c_bigendian=unknown
14515 # See if we're dealing with a universal compiler.
14516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14517 /* end confdefs.h. */
14518 #ifndef __APPLE_CC__
14519 not a universal capable compiler
14520 #endif
14521 typedef int dummy;
14523 _ACEOF
14524 if ac_fn_c_try_compile "$LINENO"; then :
14526 # Check for potential -arch flags. It is not universal unless
14527 # there are at least two -arch flags with different values.
14528 ac_arch=
14529 ac_prev=
14530 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14531 if test -n "$ac_prev"; then
14532 case $ac_word in
14533 i?86 | x86_64 | ppc | ppc64)
14534 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14535 ac_arch=$ac_word
14536 else
14537 ac_cv_c_bigendian=universal
14538 break
14541 esac
14542 ac_prev=
14543 elif test "x$ac_word" = "x-arch"; then
14544 ac_prev=arch
14546 done
14548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14549 if test $ac_cv_c_bigendian = unknown; then
14550 # See if sys/param.h defines the BYTE_ORDER macro.
14551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14552 /* end confdefs.h. */
14553 #include <sys/types.h>
14554 #include <sys/param.h>
14557 main ()
14559 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14560 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14561 && LITTLE_ENDIAN)
14562 bogus endian macros
14563 #endif
14566 return 0;
14568 _ACEOF
14569 if ac_fn_c_try_compile "$LINENO"; then :
14570 # It does; now see whether it defined to BIG_ENDIAN or not.
14571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14572 /* end confdefs.h. */
14573 #include <sys/types.h>
14574 #include <sys/param.h>
14577 main ()
14579 #if BYTE_ORDER != BIG_ENDIAN
14580 not big endian
14581 #endif
14584 return 0;
14586 _ACEOF
14587 if ac_fn_c_try_compile "$LINENO"; then :
14588 ac_cv_c_bigendian=yes
14589 else
14590 ac_cv_c_bigendian=no
14592 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14594 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14596 if test $ac_cv_c_bigendian = unknown; then
14597 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14599 /* end confdefs.h. */
14600 #include <limits.h>
14603 main ()
14605 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14606 bogus endian macros
14607 #endif
14610 return 0;
14612 _ACEOF
14613 if ac_fn_c_try_compile "$LINENO"; then :
14614 # It does; now see whether it defined to _BIG_ENDIAN or not.
14615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14616 /* end confdefs.h. */
14617 #include <limits.h>
14620 main ()
14622 #ifndef _BIG_ENDIAN
14623 not big endian
14624 #endif
14627 return 0;
14629 _ACEOF
14630 if ac_fn_c_try_compile "$LINENO"; then :
14631 ac_cv_c_bigendian=yes
14632 else
14633 ac_cv_c_bigendian=no
14635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14639 if test $ac_cv_c_bigendian = unknown; then
14640 # Compile a test program.
14641 if test "$cross_compiling" = yes; then :
14642 # Try to guess by grepping values from an object file.
14643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14644 /* end confdefs.h. */
14645 short int ascii_mm[] =
14646 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14647 short int ascii_ii[] =
14648 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14649 int use_ascii (int i) {
14650 return ascii_mm[i] + ascii_ii[i];
14652 short int ebcdic_ii[] =
14653 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14654 short int ebcdic_mm[] =
14655 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14656 int use_ebcdic (int i) {
14657 return ebcdic_mm[i] + ebcdic_ii[i];
14659 extern int foo;
14662 main ()
14664 return use_ascii (foo) == use_ebcdic (foo);
14666 return 0;
14668 _ACEOF
14669 if ac_fn_c_try_compile "$LINENO"; then :
14670 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14671 ac_cv_c_bigendian=yes
14673 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14674 if test "$ac_cv_c_bigendian" = unknown; then
14675 ac_cv_c_bigendian=no
14676 else
14677 # finding both strings is unlikely to happen, but who knows?
14678 ac_cv_c_bigendian=unknown
14682 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14683 else
14684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14685 /* end confdefs.h. */
14686 $ac_includes_default
14688 main ()
14691 /* Are we little or big endian? From Harbison&Steele. */
14692 union
14694 long int l;
14695 char c[sizeof (long int)];
14696 } u;
14697 u.l = 1;
14698 return u.c[sizeof (long int) - 1] == 1;
14701 return 0;
14703 _ACEOF
14704 if ac_fn_c_try_run "$LINENO"; then :
14705 ac_cv_c_bigendian=no
14706 else
14707 ac_cv_c_bigendian=yes
14709 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14710 conftest.$ac_objext conftest.beam conftest.$ac_ext
14715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14716 $as_echo "$ac_cv_c_bigendian" >&6; }
14717 case $ac_cv_c_bigendian in #(
14718 yes)
14719 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14720 ;; #(
14722 ;; #(
14723 universal)
14725 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14727 ;; #(
14729 as_fn_error $? "unknown endianness
14730 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14731 esac
14733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14734 $as_echo_n "checking for inline... " >&6; }
14735 if ${ac_cv_c_inline+:} false; then :
14736 $as_echo_n "(cached) " >&6
14737 else
14738 ac_cv_c_inline=no
14739 for ac_kw in inline __inline__ __inline; do
14740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14741 /* end confdefs.h. */
14742 #ifndef __cplusplus
14743 typedef int foo_t;
14744 static $ac_kw foo_t static_foo () {return 0; }
14745 $ac_kw foo_t foo () {return 0; }
14746 #endif
14748 _ACEOF
14749 if ac_fn_c_try_compile "$LINENO"; then :
14750 ac_cv_c_inline=$ac_kw
14752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14753 test "$ac_cv_c_inline" != no && break
14754 done
14757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14758 $as_echo "$ac_cv_c_inline" >&6; }
14760 case $ac_cv_c_inline in
14761 inline | yes) ;;
14763 case $ac_cv_c_inline in
14764 no) ac_val=;;
14765 *) ac_val=$ac_cv_c_inline;;
14766 esac
14767 cat >>confdefs.h <<_ACEOF
14768 #ifndef __cplusplus
14769 #define inline $ac_val
14770 #endif
14771 _ACEOF
14773 esac
14775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
14776 $as_echo_n "checking for printf format archetype... " >&6; }
14777 if ${pgac_cv_printf_archetype+:} false; then :
14778 $as_echo_n "(cached) " >&6
14779 else
14780 pgac_cv_printf_archetype=gnu_printf
14781 ac_save_c_werror_flag=$ac_c_werror_flag
14782 ac_c_werror_flag=yes
14783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14784 /* end confdefs.h. */
14785 extern void pgac_write(int ignore, const char *fmt,...)
14786 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14788 main ()
14790 pgac_write(0, "error %s: %m", "foo");
14792 return 0;
14794 _ACEOF
14795 if ac_fn_c_try_compile "$LINENO"; then :
14796 ac_archetype_ok=yes
14797 else
14798 ac_archetype_ok=no
14800 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14801 ac_c_werror_flag=$ac_save_c_werror_flag
14803 if [ "$ac_archetype_ok" = no ]; then
14804 pgac_cv_printf_archetype=__syslog__
14805 ac_save_c_werror_flag=$ac_c_werror_flag
14806 ac_c_werror_flag=yes
14807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14808 /* end confdefs.h. */
14809 extern void pgac_write(int ignore, const char *fmt,...)
14810 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14812 main ()
14814 pgac_write(0, "error %s: %m", "foo");
14816 return 0;
14818 _ACEOF
14819 if ac_fn_c_try_compile "$LINENO"; then :
14820 ac_archetype_ok=yes
14821 else
14822 ac_archetype_ok=no
14824 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14825 ac_c_werror_flag=$ac_save_c_werror_flag
14827 if [ "$ac_archetype_ok" = no ]; then
14828 pgac_cv_printf_archetype=printf
14832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14833 $as_echo "$pgac_cv_printf_archetype" >&6; }
14835 cat >>confdefs.h <<_ACEOF
14836 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14837 _ACEOF
14840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14841 $as_echo_n "checking for _Static_assert... " >&6; }
14842 if ${pgac_cv__static_assert+:} false; then :
14843 $as_echo_n "(cached) " >&6
14844 else
14845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14846 /* end confdefs.h. */
14849 main ()
14851 ({ _Static_assert(1, "foo"); })
14853 return 0;
14855 _ACEOF
14856 if ac_fn_c_try_link "$LINENO"; then :
14857 pgac_cv__static_assert=yes
14858 else
14859 pgac_cv__static_assert=no
14861 rm -f core conftest.err conftest.$ac_objext \
14862 conftest$ac_exeext conftest.$ac_ext
14864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14865 $as_echo "$pgac_cv__static_assert" >&6; }
14866 if test x"$pgac_cv__static_assert" = xyes ; then
14868 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14872 $as_echo_n "checking for typeof... " >&6; }
14873 if ${pgac_cv_c_typeof+:} false; then :
14874 $as_echo_n "(cached) " >&6
14875 else
14876 pgac_cv_c_typeof=no
14877 for pgac_kw in typeof __typeof__ decltype; do
14878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14879 /* end confdefs.h. */
14882 main ()
14884 int x = 0;
14885 $pgac_kw(x) y;
14886 y = x;
14887 return y;
14889 return 0;
14891 _ACEOF
14892 if ac_fn_c_try_compile "$LINENO"; then :
14893 pgac_cv_c_typeof=$pgac_kw
14895 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14896 test "$pgac_cv_c_typeof" != no && break
14897 done
14899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
14900 $as_echo "$pgac_cv_c_typeof" >&6; }
14901 if test "$pgac_cv_c_typeof" != no; then
14903 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
14905 if test "$pgac_cv_c_typeof" != typeof; then
14907 cat >>confdefs.h <<_ACEOF
14908 #define typeof $pgac_cv_c_typeof
14909 _ACEOF
14913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
14914 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
14915 if ${pgac_cv__types_compatible+:} false; then :
14916 $as_echo_n "(cached) " >&6
14917 else
14918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14919 /* end confdefs.h. */
14922 main ()
14924 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
14926 return 0;
14928 _ACEOF
14929 if ac_fn_c_try_compile "$LINENO"; then :
14930 pgac_cv__types_compatible=yes
14931 else
14932 pgac_cv__types_compatible=no
14934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
14937 $as_echo "$pgac_cv__types_compatible" >&6; }
14938 if test x"$pgac_cv__types_compatible" = xyes ; then
14940 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
14943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
14944 $as_echo_n "checking for __builtin_constant_p... " >&6; }
14945 if ${pgac_cv__builtin_constant_p+:} false; then :
14946 $as_echo_n "(cached) " >&6
14947 else
14948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14949 /* end confdefs.h. */
14950 static int x;
14951 static int y[__builtin_constant_p(x) ? x : 1];
14952 static int z[__builtin_constant_p("string literal") ? 1 : x];
14955 _ACEOF
14956 if ac_fn_c_try_compile "$LINENO"; then :
14957 pgac_cv__builtin_constant_p=yes
14958 else
14959 pgac_cv__builtin_constant_p=no
14961 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
14964 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
14965 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
14967 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
14970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
14971 $as_echo_n "checking for __builtin_unreachable... " >&6; }
14972 if ${pgac_cv__builtin_unreachable+:} false; then :
14973 $as_echo_n "(cached) " >&6
14974 else
14975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14976 /* end confdefs.h. */
14979 main ()
14981 __builtin_unreachable();
14983 return 0;
14985 _ACEOF
14986 if ac_fn_c_try_link "$LINENO"; then :
14987 pgac_cv__builtin_unreachable=yes
14988 else
14989 pgac_cv__builtin_unreachable=no
14991 rm -f core conftest.err conftest.$ac_objext \
14992 conftest$ac_exeext conftest.$ac_ext
14994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
14995 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
14996 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
14998 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
15001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
15002 $as_echo_n "checking for computed goto support... " >&6; }
15003 if ${pgac_cv_computed_goto+:} false; then :
15004 $as_echo_n "(cached) " >&6
15005 else
15006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15007 /* end confdefs.h. */
15010 main ()
15012 void *labeladdrs[] = {&&my_label};
15013 goto *labeladdrs[0];
15014 my_label:
15015 return 1;
15018 return 0;
15020 _ACEOF
15021 if ac_fn_c_try_compile "$LINENO"; then :
15022 pgac_cv_computed_goto=yes
15023 else
15024 pgac_cv_computed_goto=no
15026 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
15029 $as_echo "$pgac_cv_computed_goto" >&6; }
15030 if test x"$pgac_cv_computed_goto" = xyes ; then
15032 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
15035 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
15036 #include <time.h>
15039 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
15041 cat >>confdefs.h <<_ACEOF
15042 #define HAVE_STRUCT_TM_TM_ZONE 1
15043 _ACEOF
15049 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
15050 #include <sys/ipc.h>
15051 #include <sys/sem.h>
15054 if test "x$ac_cv_type_union_semun" = xyes; then :
15056 cat >>confdefs.h <<_ACEOF
15057 #define HAVE_UNION_SEMUN 1
15058 _ACEOF
15063 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/socket.h>
15065 if test "x$ac_cv_type_socklen_t" = xyes; then :
15067 cat >>confdefs.h <<_ACEOF
15068 #define HAVE_SOCKLEN_T 1
15069 _ACEOF
15074 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
15075 #include <sys/socket.h>
15078 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
15080 cat >>confdefs.h <<_ACEOF
15081 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
15082 _ACEOF
15088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
15089 $as_echo_n "checking for locale_t... " >&6; }
15090 if ${pgac_cv_type_locale_t+:} false; then :
15091 $as_echo_n "(cached) " >&6
15092 else
15093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15094 /* end confdefs.h. */
15095 #include <locale.h>
15096 locale_t x;
15098 main ()
15102 return 0;
15104 _ACEOF
15105 if ac_fn_c_try_compile "$LINENO"; then :
15106 pgac_cv_type_locale_t=yes
15107 else
15108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15109 /* end confdefs.h. */
15110 #include <xlocale.h>
15111 locale_t x;
15113 main ()
15117 return 0;
15119 _ACEOF
15120 if ac_fn_c_try_compile "$LINENO"; then :
15121 pgac_cv_type_locale_t='yes (in xlocale.h)'
15122 else
15123 pgac_cv_type_locale_t=no
15125 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15127 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
15130 $as_echo "$pgac_cv_type_locale_t" >&6; }
15131 if test "$pgac_cv_type_locale_t" != no; then
15133 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
15136 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
15138 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
15142 # MSVC doesn't cope well with defining restrict to __restrict, the
15143 # spelling it understands, because it conflicts with
15144 # __declspec(restrict). Therefore we define pg_restrict to the
15145 # appropriate definition, which presumably won't conflict.
15147 # Allow platforms with buggy compilers to force restrict to not be
15148 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
15149 # template.
15150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
15151 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
15152 if ${ac_cv_c_restrict+:} false; then :
15153 $as_echo_n "(cached) " >&6
15154 else
15155 ac_cv_c_restrict=no
15156 # The order here caters to the fact that C++ does not require restrict.
15157 for ac_kw in __restrict __restrict__ _Restrict restrict; do
15158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15159 /* end confdefs.h. */
15160 typedef int * int_ptr;
15161 int foo (int_ptr $ac_kw ip) {
15162 return ip[0];
15165 main ()
15167 int s[1];
15168 int * $ac_kw t = s;
15169 t[0] = 0;
15170 return foo(t)
15172 return 0;
15174 _ACEOF
15175 if ac_fn_c_try_compile "$LINENO"; then :
15176 ac_cv_c_restrict=$ac_kw
15178 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15179 test "$ac_cv_c_restrict" != no && break
15180 done
15183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
15184 $as_echo "$ac_cv_c_restrict" >&6; }
15186 case $ac_cv_c_restrict in
15187 restrict) ;;
15188 no) $as_echo "#define restrict /**/" >>confdefs.h
15190 *) cat >>confdefs.h <<_ACEOF
15191 #define restrict $ac_cv_c_restrict
15192 _ACEOF
15194 esac
15196 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
15197 pg_restrict=""
15198 else
15199 pg_restrict="$ac_cv_c_restrict"
15202 cat >>confdefs.h <<_ACEOF
15203 #define pg_restrict $pg_restrict
15204 _ACEOF
15207 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
15208 #include <getopt.h>
15209 #endif
15211 if test "x$ac_cv_type_struct_option" = xyes; then :
15213 cat >>confdefs.h <<_ACEOF
15214 #define HAVE_STRUCT_OPTION 1
15215 _ACEOF
15221 if test "$with_zlib" = yes; then
15222 # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
15223 # did not). While we could work around the lack of z_streamp, it
15224 # seems unwise to encourage people to use such old zlib versions...
15225 ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
15227 if test "x$ac_cv_type_z_streamp" = xyes; then :
15229 else
15230 as_fn_error $? "zlib version is too old
15231 Use --without-zlib to disable zlib support." "$LINENO" 5
15236 case $host_cpu in
15237 x86_64)
15238 # On x86_64, check if we can compile a popcntq instruction
15239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
15240 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
15241 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
15242 $as_echo_n "(cached) " >&6
15243 else
15244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15245 /* end confdefs.h. */
15248 main ()
15250 long long x = 1; long long r;
15251 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
15253 return 0;
15255 _ACEOF
15256 if ac_fn_c_try_compile "$LINENO"; then :
15257 pgac_cv_have_x86_64_popcntq=yes
15258 else
15259 pgac_cv_have_x86_64_popcntq=no
15261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
15264 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
15265 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
15267 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
15271 ppc*|powerpc*)
15272 # On PPC, check if compiler accepts "i"(x) when __builtin_constant_p(x).
15273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
15274 $as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
15275 if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
15276 $as_echo_n "(cached) " >&6
15277 else
15278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15279 /* end confdefs.h. */
15280 static inline int
15281 addi(int ra, int si)
15283 int res = 0;
15284 if (__builtin_constant_p(si))
15285 __asm__ __volatile__(
15286 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
15287 return res;
15289 int test_adds(int x) { return addi(3, x) + addi(x, 5); }
15291 main ()
15295 return 0;
15297 _ACEOF
15298 if ac_fn_c_try_compile "$LINENO"; then :
15299 pgac_cv_have_i_constraint__builtin_constant_p=yes
15300 else
15301 pgac_cv_have_i_constraint__builtin_constant_p=no
15303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
15306 $as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
15307 if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
15309 $as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
15313 esac
15315 # Check largefile support. You might think this is a system service not a
15316 # compiler characteristic, but you'd be wrong. We must check this before
15317 # probing existence of related functions such as fseeko, since the largefile
15318 # defines can affect what is generated for that.
15319 if test "$PORTNAME" != "win32"; then
15320 # Check whether --enable-largefile was given.
15321 if test "${enable_largefile+set}" = set; then :
15322 enableval=$enable_largefile;
15325 if test "$enable_largefile" != no; then
15327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15328 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15329 if ${ac_cv_sys_largefile_CC+:} false; then :
15330 $as_echo_n "(cached) " >&6
15331 else
15332 ac_cv_sys_largefile_CC=no
15333 if test "$GCC" != yes; then
15334 ac_save_CC=$CC
15335 while :; do
15336 # IRIX 6.2 and later do not support large files by default,
15337 # so use the C compiler's -n32 option if that helps.
15338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15339 /* end confdefs.h. */
15340 #include <sys/types.h>
15341 /* Check that off_t can represent 2**63 - 1 correctly.
15342 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15343 since some C++ compilers masquerading as C compilers
15344 incorrectly reject 9223372036854775807. */
15345 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15346 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15347 && LARGE_OFF_T % 2147483647 == 1)
15348 ? 1 : -1];
15350 main ()
15354 return 0;
15356 _ACEOF
15357 if ac_fn_c_try_compile "$LINENO"; then :
15358 break
15360 rm -f core conftest.err conftest.$ac_objext
15361 CC="$CC -n32"
15362 if ac_fn_c_try_compile "$LINENO"; then :
15363 ac_cv_sys_largefile_CC=' -n32'; break
15365 rm -f core conftest.err conftest.$ac_objext
15366 break
15367 done
15368 CC=$ac_save_CC
15369 rm -f conftest.$ac_ext
15372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15373 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15374 if test "$ac_cv_sys_largefile_CC" != no; then
15375 CC=$CC$ac_cv_sys_largefile_CC
15378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15379 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15380 if ${ac_cv_sys_file_offset_bits+:} false; then :
15381 $as_echo_n "(cached) " >&6
15382 else
15383 while :; do
15384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15385 /* end confdefs.h. */
15386 #include <sys/types.h>
15387 /* Check that off_t can represent 2**63 - 1 correctly.
15388 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15389 since some C++ compilers masquerading as C compilers
15390 incorrectly reject 9223372036854775807. */
15391 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15392 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15393 && LARGE_OFF_T % 2147483647 == 1)
15394 ? 1 : -1];
15396 main ()
15400 return 0;
15402 _ACEOF
15403 if ac_fn_c_try_compile "$LINENO"; then :
15404 ac_cv_sys_file_offset_bits=no; break
15406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15408 /* end confdefs.h. */
15409 #define _FILE_OFFSET_BITS 64
15410 #include <sys/types.h>
15411 /* Check that off_t can represent 2**63 - 1 correctly.
15412 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15413 since some C++ compilers masquerading as C compilers
15414 incorrectly reject 9223372036854775807. */
15415 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15416 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15417 && LARGE_OFF_T % 2147483647 == 1)
15418 ? 1 : -1];
15420 main ()
15424 return 0;
15426 _ACEOF
15427 if ac_fn_c_try_compile "$LINENO"; then :
15428 ac_cv_sys_file_offset_bits=64; break
15430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15431 ac_cv_sys_file_offset_bits=unknown
15432 break
15433 done
15435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15436 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15437 case $ac_cv_sys_file_offset_bits in #(
15438 no | unknown) ;;
15440 cat >>confdefs.h <<_ACEOF
15441 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15442 _ACEOF
15444 esac
15445 rm -rf conftest*
15446 if test $ac_cv_sys_file_offset_bits = unknown; then
15447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15448 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15449 if ${ac_cv_sys_large_files+:} false; then :
15450 $as_echo_n "(cached) " >&6
15451 else
15452 while :; do
15453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15454 /* end confdefs.h. */
15455 #include <sys/types.h>
15456 /* Check that off_t can represent 2**63 - 1 correctly.
15457 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15458 since some C++ compilers masquerading as C compilers
15459 incorrectly reject 9223372036854775807. */
15460 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15461 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15462 && LARGE_OFF_T % 2147483647 == 1)
15463 ? 1 : -1];
15465 main ()
15469 return 0;
15471 _ACEOF
15472 if ac_fn_c_try_compile "$LINENO"; then :
15473 ac_cv_sys_large_files=no; break
15475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15477 /* end confdefs.h. */
15478 #define _LARGE_FILES 1
15479 #include <sys/types.h>
15480 /* Check that off_t can represent 2**63 - 1 correctly.
15481 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15482 since some C++ compilers masquerading as C compilers
15483 incorrectly reject 9223372036854775807. */
15484 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15485 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15486 && LARGE_OFF_T % 2147483647 == 1)
15487 ? 1 : -1];
15489 main ()
15493 return 0;
15495 _ACEOF
15496 if ac_fn_c_try_compile "$LINENO"; then :
15497 ac_cv_sys_large_files=1; break
15499 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15500 ac_cv_sys_large_files=unknown
15501 break
15502 done
15504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15505 $as_echo "$ac_cv_sys_large_files" >&6; }
15506 case $ac_cv_sys_large_files in #(
15507 no | unknown) ;;
15509 cat >>confdefs.h <<_ACEOF
15510 #define _LARGE_FILES $ac_cv_sys_large_files
15511 _ACEOF
15513 esac
15514 rm -rf conftest*
15523 # The cast to long int works around a bug in the HP C Compiler
15524 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15525 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15526 # This bug is HP SR number 8606223364.
15527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15528 $as_echo_n "checking size of off_t... " >&6; }
15529 if ${ac_cv_sizeof_off_t+:} false; then :
15530 $as_echo_n "(cached) " >&6
15531 else
15532 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
15534 else
15535 if test "$ac_cv_type_off_t" = yes; then
15536 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15537 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15538 as_fn_error 77 "cannot compute sizeof (off_t)
15539 See \`config.log' for more details" "$LINENO" 5; }
15540 else
15541 ac_cv_sizeof_off_t=0
15546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15547 $as_echo "$ac_cv_sizeof_off_t" >&6; }
15551 cat >>confdefs.h <<_ACEOF
15552 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
15553 _ACEOF
15557 # If we don't have largefile support, can't handle segment size >= 2GB.
15558 if test "$ac_cv_sizeof_off_t" -lt 8; then
15559 if expr $RELSEG_SIZE '*' $blocksize '>=' 2 '*' 1024 '*' 1024; then
15560 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15564 # The cast to long int works around a bug in the HP C Compiler
15565 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15566 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15567 # This bug is HP SR number 8606223364.
15568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
15569 $as_echo_n "checking size of bool... " >&6; }
15570 if ${ac_cv_sizeof_bool+:} false; then :
15571 $as_echo_n "(cached) " >&6
15572 else
15573 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
15574 #include <stdbool.h>
15575 #endif
15576 "; then :
15578 else
15579 if test "$ac_cv_type_bool" = yes; then
15580 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15581 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15582 as_fn_error 77 "cannot compute sizeof (bool)
15583 See \`config.log' for more details" "$LINENO" 5; }
15584 else
15585 ac_cv_sizeof_bool=0
15590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
15591 $as_echo "$ac_cv_sizeof_bool" >&6; }
15595 cat >>confdefs.h <<_ACEOF
15596 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15597 _ACEOF
15601 if test "$ac_cv_header_stdbool_h" = yes -a "$ac_cv_sizeof_bool" = 1; then
15603 $as_echo "#define PG_USE_STDBOOL 1" >>confdefs.h
15609 ## Functions, global variables
15612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15613 $as_echo_n "checking for int timezone... " >&6; }
15614 if ${pgac_cv_var_int_timezone+:} false; then :
15615 $as_echo_n "(cached) " >&6
15616 else
15617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15618 /* end confdefs.h. */
15619 #include <time.h>
15620 int res;
15622 main ()
15624 #ifndef __CYGWIN__
15625 res = timezone / 60;
15626 #else
15627 res = _timezone / 60;
15628 #endif
15630 return 0;
15632 _ACEOF
15633 if ac_fn_c_try_link "$LINENO"; then :
15634 pgac_cv_var_int_timezone=yes
15635 else
15636 pgac_cv_var_int_timezone=no
15638 rm -f core conftest.err conftest.$ac_objext \
15639 conftest$ac_exeext conftest.$ac_ext
15641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15642 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15643 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15645 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15649 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15650 if ${pgac_cv_func_wcstombs_l+:} false; then :
15651 $as_echo_n "(cached) " >&6
15652 else
15653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15654 /* end confdefs.h. */
15655 #include <stdlib.h>
15656 #include <locale.h>
15658 main ()
15660 #ifndef wcstombs_l
15661 (void) wcstombs_l;
15662 #endif
15664 return 0;
15666 _ACEOF
15667 if ac_fn_c_try_compile "$LINENO"; then :
15668 pgac_cv_func_wcstombs_l='yes'
15669 else
15670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15671 /* end confdefs.h. */
15672 #include <stdlib.h>
15673 #include <locale.h>
15674 #include <xlocale.h>
15676 main ()
15678 #ifndef wcstombs_l
15679 (void) wcstombs_l;
15680 #endif
15682 return 0;
15684 _ACEOF
15685 if ac_fn_c_try_compile "$LINENO"; then :
15686 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15687 else
15688 pgac_cv_func_wcstombs_l='no'
15690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15692 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15695 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15696 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15698 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15702 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15703 # symbols that that library has no business exposing to the world. Pending
15704 # acquisition of a clue by those developers, ignore libedit (including its
15705 # possible alias of libreadline) while checking for everything else.
15706 LIBS_including_readline="$LIBS"
15707 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15709 for ac_func in backtrace_symbols copyfile getifaddrs getpeerucred inet_pton kqueue mbstowcs_l memset_s posix_fallocate ppoll pthread_is_threaded_np setproctitle setproctitle_fast strchrnul strsignal syncfs sync_file_range uselocale wcstombs_l
15710 do :
15711 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15712 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15713 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15714 cat >>confdefs.h <<_ACEOF
15715 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15716 _ACEOF
15719 done
15722 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
15723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
15724 $as_echo_n "checking for __builtin_bswap16... " >&6; }
15725 if ${pgac_cv__builtin_bswap16+:} false; then :
15726 $as_echo_n "(cached) " >&6
15727 else
15728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15729 /* end confdefs.h. */
15732 call__builtin_bswap16(int x)
15734 return __builtin_bswap16(x);
15737 main ()
15741 return 0;
15743 _ACEOF
15744 if ac_fn_c_try_link "$LINENO"; then :
15745 pgac_cv__builtin_bswap16=yes
15746 else
15747 pgac_cv__builtin_bswap16=no
15749 rm -f core conftest.err conftest.$ac_objext \
15750 conftest$ac_exeext conftest.$ac_ext
15752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
15753 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
15754 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
15756 cat >>confdefs.h <<_ACEOF
15757 #define HAVE__BUILTIN_BSWAP16 1
15758 _ACEOF
15761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
15762 $as_echo_n "checking for __builtin_bswap32... " >&6; }
15763 if ${pgac_cv__builtin_bswap32+:} false; then :
15764 $as_echo_n "(cached) " >&6
15765 else
15766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15767 /* end confdefs.h. */
15770 call__builtin_bswap32(int x)
15772 return __builtin_bswap32(x);
15775 main ()
15779 return 0;
15781 _ACEOF
15782 if ac_fn_c_try_link "$LINENO"; then :
15783 pgac_cv__builtin_bswap32=yes
15784 else
15785 pgac_cv__builtin_bswap32=no
15787 rm -f core conftest.err conftest.$ac_objext \
15788 conftest$ac_exeext conftest.$ac_ext
15790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
15791 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
15792 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
15794 cat >>confdefs.h <<_ACEOF
15795 #define HAVE__BUILTIN_BSWAP32 1
15796 _ACEOF
15799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
15800 $as_echo_n "checking for __builtin_bswap64... " >&6; }
15801 if ${pgac_cv__builtin_bswap64+:} false; then :
15802 $as_echo_n "(cached) " >&6
15803 else
15804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15805 /* end confdefs.h. */
15808 call__builtin_bswap64(long int x)
15810 return __builtin_bswap64(x);
15813 main ()
15817 return 0;
15819 _ACEOF
15820 if ac_fn_c_try_link "$LINENO"; then :
15821 pgac_cv__builtin_bswap64=yes
15822 else
15823 pgac_cv__builtin_bswap64=no
15825 rm -f core conftest.err conftest.$ac_objext \
15826 conftest$ac_exeext conftest.$ac_ext
15828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
15829 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
15830 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
15832 cat >>confdefs.h <<_ACEOF
15833 #define HAVE__BUILTIN_BSWAP64 1
15834 _ACEOF
15837 # We assume that we needn't test all widths of these explicitly:
15838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
15839 $as_echo_n "checking for __builtin_clz... " >&6; }
15840 if ${pgac_cv__builtin_clz+:} false; then :
15841 $as_echo_n "(cached) " >&6
15842 else
15843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15844 /* end confdefs.h. */
15847 call__builtin_clz(unsigned int x)
15849 return __builtin_clz(x);
15852 main ()
15856 return 0;
15858 _ACEOF
15859 if ac_fn_c_try_link "$LINENO"; then :
15860 pgac_cv__builtin_clz=yes
15861 else
15862 pgac_cv__builtin_clz=no
15864 rm -f core conftest.err conftest.$ac_objext \
15865 conftest$ac_exeext conftest.$ac_ext
15867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
15868 $as_echo "$pgac_cv__builtin_clz" >&6; }
15869 if test x"${pgac_cv__builtin_clz}" = xyes ; then
15871 cat >>confdefs.h <<_ACEOF
15872 #define HAVE__BUILTIN_CLZ 1
15873 _ACEOF
15876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
15877 $as_echo_n "checking for __builtin_ctz... " >&6; }
15878 if ${pgac_cv__builtin_ctz+:} false; then :
15879 $as_echo_n "(cached) " >&6
15880 else
15881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15882 /* end confdefs.h. */
15885 call__builtin_ctz(unsigned int x)
15887 return __builtin_ctz(x);
15890 main ()
15894 return 0;
15896 _ACEOF
15897 if ac_fn_c_try_link "$LINENO"; then :
15898 pgac_cv__builtin_ctz=yes
15899 else
15900 pgac_cv__builtin_ctz=no
15902 rm -f core conftest.err conftest.$ac_objext \
15903 conftest$ac_exeext conftest.$ac_ext
15905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
15906 $as_echo "$pgac_cv__builtin_ctz" >&6; }
15907 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
15909 cat >>confdefs.h <<_ACEOF
15910 #define HAVE__BUILTIN_CTZ 1
15911 _ACEOF
15914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
15915 $as_echo_n "checking for __builtin_popcount... " >&6; }
15916 if ${pgac_cv__builtin_popcount+:} false; then :
15917 $as_echo_n "(cached) " >&6
15918 else
15919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15920 /* end confdefs.h. */
15923 call__builtin_popcount(unsigned int x)
15925 return __builtin_popcount(x);
15928 main ()
15932 return 0;
15934 _ACEOF
15935 if ac_fn_c_try_link "$LINENO"; then :
15936 pgac_cv__builtin_popcount=yes
15937 else
15938 pgac_cv__builtin_popcount=no
15940 rm -f core conftest.err conftest.$ac_objext \
15941 conftest$ac_exeext conftest.$ac_ext
15943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
15944 $as_echo "$pgac_cv__builtin_popcount" >&6; }
15945 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
15947 cat >>confdefs.h <<_ACEOF
15948 #define HAVE__BUILTIN_POPCOUNT 1
15949 _ACEOF
15952 # __builtin_frame_address may draw a diagnostic for non-constant argument,
15953 # so it needs a different test function.
15954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5
15955 $as_echo_n "checking for __builtin_frame_address... " >&6; }
15956 if ${pgac_cv__builtin_frame_address+:} false; then :
15957 $as_echo_n "(cached) " >&6
15958 else
15959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15960 /* end confdefs.h. */
15962 void *
15963 call__builtin_frame_address(void)
15965 return __builtin_frame_address(0);
15968 main ()
15972 return 0;
15974 _ACEOF
15975 if ac_fn_c_try_link "$LINENO"; then :
15976 pgac_cv__builtin_frame_address=yes
15977 else
15978 pgac_cv__builtin_frame_address=no
15980 rm -f core conftest.err conftest.$ac_objext \
15981 conftest$ac_exeext conftest.$ac_ext
15983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_frame_address" >&5
15984 $as_echo "$pgac_cv__builtin_frame_address" >&6; }
15985 if test x"${pgac_cv__builtin_frame_address}" = xyes ; then
15987 cat >>confdefs.h <<_ACEOF
15988 #define HAVE__BUILTIN_FRAME_ADDRESS 1
15989 _ACEOF
15993 # We require 64-bit fseeko() to be available, but run this check anyway
15994 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
15995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
15996 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
15997 if ${ac_cv_sys_largefile_source+:} false; then :
15998 $as_echo_n "(cached) " >&6
15999 else
16000 while :; do
16001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16002 /* end confdefs.h. */
16003 #include <sys/types.h> /* for off_t */
16004 #include <stdio.h>
16006 main ()
16008 int (*fp) (FILE *, off_t, int) = fseeko;
16009 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
16011 return 0;
16013 _ACEOF
16014 if ac_fn_c_try_link "$LINENO"; then :
16015 ac_cv_sys_largefile_source=no; break
16017 rm -f core conftest.err conftest.$ac_objext \
16018 conftest$ac_exeext conftest.$ac_ext
16019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16020 /* end confdefs.h. */
16021 #define _LARGEFILE_SOURCE 1
16022 #include <sys/types.h> /* for off_t */
16023 #include <stdio.h>
16025 main ()
16027 int (*fp) (FILE *, off_t, int) = fseeko;
16028 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
16030 return 0;
16032 _ACEOF
16033 if ac_fn_c_try_link "$LINENO"; then :
16034 ac_cv_sys_largefile_source=1; break
16036 rm -f core conftest.err conftest.$ac_objext \
16037 conftest$ac_exeext conftest.$ac_ext
16038 ac_cv_sys_largefile_source=unknown
16039 break
16040 done
16042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
16043 $as_echo "$ac_cv_sys_largefile_source" >&6; }
16044 case $ac_cv_sys_largefile_source in #(
16045 no | unknown) ;;
16047 cat >>confdefs.h <<_ACEOF
16048 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16049 _ACEOF
16051 esac
16052 rm -rf conftest*
16054 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16055 # in glibc 2.1.3, but that breaks too many other things.
16056 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16057 if test $ac_cv_sys_largefile_source != unknown; then
16059 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
16064 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
16065 # by calling it, 2009-04-02
16066 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
16067 # The Clang compiler raises a warning for an undeclared identifier that matches
16068 # a compiler builtin function. All extant Clang versions are affected, as of
16069 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
16070 # C and Objective C languages, but Clang does report an error under C++ and
16071 # Objective C++.
16073 # Passing -fno-builtin to the compiler would suppress this problem. That
16074 # strategy would have the advantage of being insensitive to stray warnings, but
16075 # it would make tests less realistic.
16076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
16077 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
16078 if ${ac_cv_c_decl_report+:} false; then :
16079 $as_echo_n "(cached) " >&6
16080 else
16081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16082 /* end confdefs.h. */
16085 main ()
16087 (void) strchr;
16089 return 0;
16091 _ACEOF
16092 if ac_fn_c_try_compile "$LINENO"; then :
16093 if test -s conftest.err; then :
16094 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
16095 # valid AC_CHECK_DECL input. No library function is consistently available
16096 # on freestanding implementations, so test against a dummy declaration.
16097 # Include always-available headers on the off chance that they somehow
16098 # elicit warnings.
16099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16100 /* end confdefs.h. */
16101 #include <float.h>
16102 #include <limits.h>
16103 #include <stdarg.h>
16104 #include <stddef.h>
16105 extern void ac_decl (int, char *);
16107 main ()
16109 #ifdef __cplusplus
16110 (void) ac_decl ((int) 0, (char *) 0);
16111 (void) ac_decl;
16112 #else
16113 (void) ac_decl;
16114 #endif
16117 return 0;
16119 _ACEOF
16120 if ac_fn_c_try_compile "$LINENO"; then :
16121 if test -s conftest.err; then :
16122 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16123 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16124 as_fn_error $? "cannot detect from compiler exit status or warnings
16125 See \`config.log' for more details" "$LINENO" 5; }
16126 else
16127 ac_cv_c_decl_report=warning
16129 else
16130 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16131 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16132 as_fn_error $? "cannot compile a simple declaration test
16133 See \`config.log' for more details" "$LINENO" 5; }
16135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16136 else
16137 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16138 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16139 as_fn_error $? "compiler does not report undeclared identifiers
16140 See \`config.log' for more details" "$LINENO" 5; }
16142 else
16143 ac_cv_c_decl_report=error
16145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
16148 $as_echo "$ac_cv_c_decl_report" >&6; }
16150 case $ac_cv_c_decl_report in
16151 warning) ac_c_decl_warn_flag=yes ;;
16152 *) ac_c_decl_warn_flag= ;;
16153 esac
16155 if test "$PORTNAME" != "solaris"; then :
16157 for ac_func in posix_fadvise
16158 do :
16159 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
16160 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
16161 cat >>confdefs.h <<_ACEOF
16162 #define HAVE_POSIX_FADVISE 1
16163 _ACEOF
16166 done
16168 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
16170 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
16171 ac_have_decl=1
16172 else
16173 ac_have_decl=0
16176 cat >>confdefs.h <<_ACEOF
16177 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
16178 _ACEOF
16181 fi # fi
16183 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
16185 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
16186 ac_have_decl=1
16187 else
16188 ac_have_decl=0
16191 cat >>confdefs.h <<_ACEOF
16192 #define HAVE_DECL_FDATASYNC $ac_have_decl
16193 _ACEOF
16195 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
16196 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
16197 ac_have_decl=1
16198 else
16199 ac_have_decl=0
16202 cat >>confdefs.h <<_ACEOF
16203 #define HAVE_DECL_STRLCAT $ac_have_decl
16204 _ACEOF
16205 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
16206 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
16207 ac_have_decl=1
16208 else
16209 ac_have_decl=0
16212 cat >>confdefs.h <<_ACEOF
16213 #define HAVE_DECL_STRLCPY $ac_have_decl
16214 _ACEOF
16215 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
16216 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
16217 ac_have_decl=1
16218 else
16219 ac_have_decl=0
16222 cat >>confdefs.h <<_ACEOF
16223 #define HAVE_DECL_STRNLEN $ac_have_decl
16224 _ACEOF
16227 # We can't use AC_REPLACE_FUNCS to replace these functions, because it
16228 # won't handle deployment target restrictions on macOS
16229 ac_fn_c_check_decl "$LINENO" "preadv" "ac_cv_have_decl_preadv" "#include <sys/uio.h>
16231 if test "x$ac_cv_have_decl_preadv" = xyes; then :
16232 ac_have_decl=1
16233 else
16234 ac_have_decl=0
16237 cat >>confdefs.h <<_ACEOF
16238 #define HAVE_DECL_PREADV $ac_have_decl
16239 _ACEOF
16240 if test $ac_have_decl = 1; then :
16242 else
16243 case " $LIBOBJS " in
16244 *" preadv.$ac_objext "* ) ;;
16245 *) LIBOBJS="$LIBOBJS preadv.$ac_objext"
16247 esac
16251 ac_fn_c_check_decl "$LINENO" "pwritev" "ac_cv_have_decl_pwritev" "#include <sys/uio.h>
16253 if test "x$ac_cv_have_decl_pwritev" = xyes; then :
16254 ac_have_decl=1
16255 else
16256 ac_have_decl=0
16259 cat >>confdefs.h <<_ACEOF
16260 #define HAVE_DECL_PWRITEV $ac_have_decl
16261 _ACEOF
16262 if test $ac_have_decl = 1; then :
16264 else
16265 case " $LIBOBJS " in
16266 *" pwritev.$ac_objext "* ) ;;
16267 *) LIBOBJS="$LIBOBJS pwritev.$ac_objext"
16269 esac
16274 # This is probably only present on macOS, but may as well check always
16275 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
16277 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
16278 ac_have_decl=1
16279 else
16280 ac_have_decl=0
16283 cat >>confdefs.h <<_ACEOF
16284 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
16285 _ACEOF
16288 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
16289 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
16290 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
16292 else
16293 case " $LIBOBJS " in
16294 *" explicit_bzero.$ac_objext "* ) ;;
16295 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
16297 esac
16301 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
16302 if test "x$ac_cv_func_getopt" = xyes; then :
16303 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
16305 else
16306 case " $LIBOBJS " in
16307 *" getopt.$ac_objext "* ) ;;
16308 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16310 esac
16314 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
16315 if test "x$ac_cv_func_getpeereid" = xyes; then :
16316 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
16318 else
16319 case " $LIBOBJS " in
16320 *" getpeereid.$ac_objext "* ) ;;
16321 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
16323 esac
16327 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
16328 if test "x$ac_cv_func_inet_aton" = xyes; then :
16329 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
16331 else
16332 case " $LIBOBJS " in
16333 *" inet_aton.$ac_objext "* ) ;;
16334 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
16336 esac
16340 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
16341 if test "x$ac_cv_func_mkdtemp" = xyes; then :
16342 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
16344 else
16345 case " $LIBOBJS " in
16346 *" mkdtemp.$ac_objext "* ) ;;
16347 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
16349 esac
16353 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
16354 if test "x$ac_cv_func_strlcat" = xyes; then :
16355 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
16357 else
16358 case " $LIBOBJS " in
16359 *" strlcat.$ac_objext "* ) ;;
16360 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
16362 esac
16366 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
16367 if test "x$ac_cv_func_strlcpy" = xyes; then :
16368 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
16370 else
16371 case " $LIBOBJS " in
16372 *" strlcpy.$ac_objext "* ) ;;
16373 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
16375 esac
16379 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
16380 if test "x$ac_cv_func_strnlen" = xyes; then :
16381 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
16383 else
16384 case " $LIBOBJS " in
16385 *" strnlen.$ac_objext "* ) ;;
16386 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
16388 esac
16394 if test "$enable_thread_safety" = yes; then
16395 ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
16396 if test "x$ac_cv_func_pthread_barrier_wait" = xyes; then :
16397 $as_echo "#define HAVE_PTHREAD_BARRIER_WAIT 1" >>confdefs.h
16399 else
16400 case " $LIBOBJS " in
16401 *" pthread_barrier_wait.$ac_objext "* ) ;;
16402 *) LIBOBJS="$LIBOBJS pthread_barrier_wait.$ac_objext"
16404 esac
16411 if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
16412 # Cygwin and (apparently, based on test results) Mingw both
16413 # have a broken strtof(), so substitute its implementation.
16414 # That's not a perfect fix, since it doesn't avoid double-rounding,
16415 # but we have no better options.
16416 case " $LIBOBJS " in
16417 *" strtof.$ac_objext "* ) ;;
16418 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16420 esac
16422 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
16423 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
16426 # Similarly, use system's getopt_long() only if system provides struct option.
16427 if test x"$ac_cv_type_struct_option" = xyes ; then
16428 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
16429 if test "x$ac_cv_func_getopt_long" = xyes; then :
16430 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
16432 else
16433 case " $LIBOBJS " in
16434 *" getopt_long.$ac_objext "* ) ;;
16435 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16437 esac
16442 else
16443 case " $LIBOBJS " in
16444 *" getopt_long.$ac_objext "* ) ;;
16445 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16447 esac
16451 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
16452 # (i.e., allow '-' as a flag character), so use our version on those platforms.
16453 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
16454 case " $LIBOBJS " in
16455 *" getopt.$ac_objext "* ) ;;
16456 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16458 esac
16462 # mingw has adopted a GNU-centric interpretation of optind/optreset,
16463 # so always use our version on Windows.
16464 if test "$PORTNAME" = "win32"; then
16465 case " $LIBOBJS " in
16466 *" getopt.$ac_objext "* ) ;;
16467 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16469 esac
16471 case " $LIBOBJS " in
16472 *" getopt_long.$ac_objext "* ) ;;
16473 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
16475 esac
16479 # Win32 (really MinGW) support
16480 if test "$PORTNAME" = "win32"; then
16481 for ac_func in _configthreadlocale
16482 do :
16483 ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
16484 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
16485 cat >>confdefs.h <<_ACEOF
16486 #define HAVE__CONFIGTHREADLOCALE 1
16487 _ACEOF
16490 done
16492 case " $LIBOBJS " in
16493 *" dirmod.$ac_objext "* ) ;;
16494 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16496 esac
16498 case " $LIBOBJS " in
16499 *" kill.$ac_objext "* ) ;;
16500 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
16502 esac
16504 case " $LIBOBJS " in
16505 *" open.$ac_objext "* ) ;;
16506 *) LIBOBJS="$LIBOBJS open.$ac_objext"
16508 esac
16510 case " $LIBOBJS " in
16511 *" system.$ac_objext "* ) ;;
16512 *) LIBOBJS="$LIBOBJS system.$ac_objext"
16514 esac
16516 case " $LIBOBJS " in
16517 *" win32common.$ac_objext "* ) ;;
16518 *) LIBOBJS="$LIBOBJS win32common.$ac_objext"
16520 esac
16522 case " $LIBOBJS " in
16523 *" win32dlopen.$ac_objext "* ) ;;
16524 *) LIBOBJS="$LIBOBJS win32dlopen.$ac_objext"
16526 esac
16528 case " $LIBOBJS " in
16529 *" win32env.$ac_objext "* ) ;;
16530 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
16532 esac
16534 case " $LIBOBJS " in
16535 *" win32error.$ac_objext "* ) ;;
16536 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
16538 esac
16540 case " $LIBOBJS " in
16541 *" win32fdatasync.$ac_objext "* ) ;;
16542 *) LIBOBJS="$LIBOBJS win32fdatasync.$ac_objext"
16544 esac
16546 case " $LIBOBJS " in
16547 *" win32gai_strerror.$ac_objext "* ) ;;
16548 *) LIBOBJS="$LIBOBJS win32gai_strerror.$ac_objext"
16550 esac
16552 case " $LIBOBJS " in
16553 *" win32getrusage.$ac_objext "* ) ;;
16554 *) LIBOBJS="$LIBOBJS win32getrusage.$ac_objext"
16556 esac
16558 case " $LIBOBJS " in
16559 *" win32link.$ac_objext "* ) ;;
16560 *) LIBOBJS="$LIBOBJS win32link.$ac_objext"
16562 esac
16564 case " $LIBOBJS " in
16565 *" win32ntdll.$ac_objext "* ) ;;
16566 *) LIBOBJS="$LIBOBJS win32ntdll.$ac_objext"
16568 esac
16570 case " $LIBOBJS " in
16571 *" win32pread.$ac_objext "* ) ;;
16572 *) LIBOBJS="$LIBOBJS win32pread.$ac_objext"
16574 esac
16576 case " $LIBOBJS " in
16577 *" win32pwrite.$ac_objext "* ) ;;
16578 *) LIBOBJS="$LIBOBJS win32pwrite.$ac_objext"
16580 esac
16582 case " $LIBOBJS " in
16583 *" win32security.$ac_objext "* ) ;;
16584 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
16586 esac
16588 case " $LIBOBJS " in
16589 *" win32setlocale.$ac_objext "* ) ;;
16590 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
16592 esac
16594 case " $LIBOBJS " in
16595 *" win32stat.$ac_objext "* ) ;;
16596 *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
16598 esac
16601 # Cygwin needs only a bit of that
16602 if test "$PORTNAME" = "cygwin"; then
16603 case " $LIBOBJS " in
16604 *" dirmod.$ac_objext "* ) ;;
16605 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
16607 esac
16611 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
16612 if test "x$ac_cv_func_syslog" = xyes; then :
16613 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
16614 if test "x$ac_cv_header_syslog_h" = xyes; then :
16616 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
16624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
16625 $as_echo_n "checking for opterr... " >&6; }
16626 if ${pgac_cv_var_int_opterr+:} false; then :
16627 $as_echo_n "(cached) " >&6
16628 else
16629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16630 /* end confdefs.h. */
16631 #include <unistd.h>
16633 main ()
16635 extern int opterr; opterr = 1;
16637 return 0;
16639 _ACEOF
16640 if ac_fn_c_try_link "$LINENO"; then :
16641 pgac_cv_var_int_opterr=yes
16642 else
16643 pgac_cv_var_int_opterr=no
16645 rm -f core conftest.err conftest.$ac_objext \
16646 conftest$ac_exeext conftest.$ac_ext
16648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
16649 $as_echo "$pgac_cv_var_int_opterr" >&6; }
16650 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
16652 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
16656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
16657 $as_echo_n "checking for optreset... " >&6; }
16658 if ${pgac_cv_var_int_optreset+:} false; then :
16659 $as_echo_n "(cached) " >&6
16660 else
16661 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16662 /* end confdefs.h. */
16663 #include <unistd.h>
16665 main ()
16667 extern int optreset; optreset = 1;
16669 return 0;
16671 _ACEOF
16672 if ac_fn_c_try_link "$LINENO"; then :
16673 pgac_cv_var_int_optreset=yes
16674 else
16675 pgac_cv_var_int_optreset=no
16677 rm -f core conftest.err conftest.$ac_objext \
16678 conftest$ac_exeext conftest.$ac_ext
16680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
16681 $as_echo "$pgac_cv_var_int_optreset" >&6; }
16682 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
16684 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
16688 if test "$with_icu" = yes; then
16689 ac_save_CPPFLAGS=$CPPFLAGS
16690 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
16692 # Verify we have ICU's header files
16693 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
16694 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
16696 else
16697 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
16702 CPPFLAGS=$ac_save_CPPFLAGS
16705 if test "$with_llvm" = yes; then
16707 # Check which functionality is present
16708 SAVE_CPPFLAGS="$CPPFLAGS"
16709 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
16710 ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
16712 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
16713 ac_have_decl=1
16714 else
16715 ac_have_decl=0
16718 cat >>confdefs.h <<_ACEOF
16719 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
16720 _ACEOF
16722 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
16724 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
16725 ac_have_decl=1
16726 else
16727 ac_have_decl=0
16730 cat >>confdefs.h <<_ACEOF
16731 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
16732 _ACEOF
16733 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
16735 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
16736 ac_have_decl=1
16737 else
16738 ac_have_decl=0
16741 cat >>confdefs.h <<_ACEOF
16742 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
16743 _ACEOF
16745 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
16747 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
16748 ac_have_decl=1
16749 else
16750 ac_have_decl=0
16753 cat >>confdefs.h <<_ACEOF
16754 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
16755 _ACEOF
16756 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
16758 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
16759 ac_have_decl=1
16760 else
16761 ac_have_decl=0
16764 cat >>confdefs.h <<_ACEOF
16765 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
16766 _ACEOF
16768 CPPFLAGS="$SAVE_CPPFLAGS"
16772 # Lastly, restore full LIBS list and check for readline/libedit symbols
16773 LIBS="$LIBS_including_readline"
16775 if test "$with_readline" = yes; then
16776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
16777 $as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
16778 if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
16779 $as_echo_n "(cached) " >&6
16780 else
16781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16782 /* end confdefs.h. */
16783 #include <stdio.h>
16784 #if defined(HAVE_READLINE_READLINE_H)
16785 #include <readline/readline.h>
16786 #elif defined(HAVE_EDITLINE_READLINE_H)
16787 #include <editline/readline.h>
16788 #elif defined(HAVE_READLINE_H)
16789 #include <readline.h>
16790 #endif
16793 main ()
16795 rl_completion_suppress_quote = 1;
16797 return 0;
16799 _ACEOF
16800 if ac_fn_c_try_link "$LINENO"; then :
16801 pgac_cv_var_rl_completion_suppress_quote=yes
16802 else
16803 pgac_cv_var_rl_completion_suppress_quote=no
16805 rm -f core conftest.err conftest.$ac_objext \
16806 conftest$ac_exeext conftest.$ac_ext
16808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
16809 $as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
16810 if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
16812 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
16815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
16816 $as_echo_n "checking for rl_filename_quote_characters... " >&6; }
16817 if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
16818 $as_echo_n "(cached) " >&6
16819 else
16820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16821 /* end confdefs.h. */
16822 #include <stdio.h>
16823 #if defined(HAVE_READLINE_READLINE_H)
16824 #include <readline/readline.h>
16825 #elif defined(HAVE_EDITLINE_READLINE_H)
16826 #include <editline/readline.h>
16827 #elif defined(HAVE_READLINE_H)
16828 #include <readline.h>
16829 #endif
16832 main ()
16834 rl_filename_quote_characters = "x";
16836 return 0;
16838 _ACEOF
16839 if ac_fn_c_try_link "$LINENO"; then :
16840 pgac_cv_var_rl_filename_quote_characters=yes
16841 else
16842 pgac_cv_var_rl_filename_quote_characters=no
16844 rm -f core conftest.err conftest.$ac_objext \
16845 conftest$ac_exeext conftest.$ac_ext
16847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
16848 $as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
16849 if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
16851 $as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
16854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
16855 $as_echo_n "checking for rl_filename_quoting_function... " >&6; }
16856 if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
16857 $as_echo_n "(cached) " >&6
16858 else
16859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16860 /* end confdefs.h. */
16861 #include <stdio.h>
16862 #if defined(HAVE_READLINE_READLINE_H)
16863 #include <readline/readline.h>
16864 #elif defined(HAVE_EDITLINE_READLINE_H)
16865 #include <editline/readline.h>
16866 #elif defined(HAVE_READLINE_H)
16867 #include <readline.h>
16868 #endif
16871 main ()
16873 rl_filename_quoting_function = 0;
16875 return 0;
16877 _ACEOF
16878 if ac_fn_c_try_link "$LINENO"; then :
16879 pgac_cv_var_rl_filename_quoting_function=yes
16880 else
16881 pgac_cv_var_rl_filename_quoting_function=no
16883 rm -f core conftest.err conftest.$ac_objext \
16884 conftest$ac_exeext conftest.$ac_ext
16886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
16887 $as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
16888 if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
16890 $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
16894 for ac_func in append_history history_truncate_file rl_completion_matches rl_filename_completion_function rl_reset_screen_size rl_variable_bind
16895 do :
16896 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16897 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16898 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16899 cat >>confdefs.h <<_ACEOF
16900 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16901 _ACEOF
16904 done
16909 # This test makes sure that run tests work at all. Sometimes a shared
16910 # library is found by the linker, but the runtime linker can't find it.
16911 # This check should come after all modifications of compiler or linker
16912 # variables, and before any other run tests.
16913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
16914 $as_echo_n "checking test program... " >&6; }
16915 if test "$cross_compiling" = yes; then :
16916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
16917 $as_echo "cross-compiling" >&6; }
16918 else
16919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16920 /* end confdefs.h. */
16921 int main() { return 0; }
16922 _ACEOF
16923 if ac_fn_c_try_run "$LINENO"; then :
16924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
16925 $as_echo "ok" >&6; }
16926 else
16927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
16928 $as_echo "failed" >&6; }
16929 as_fn_error $? "
16930 Could not execute a simple test program. This may be a problem
16931 related to locating shared libraries. Check the file 'config.log'
16932 for the exact reason." "$LINENO" 5
16934 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16935 conftest.$ac_objext conftest.beam conftest.$ac_ext
16939 # --------------------
16940 # Run tests below here
16941 # --------------------
16944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
16945 $as_echo_n "checking whether long int is 64 bits... " >&6; }
16946 if ${pgac_cv_type_long_int_64+:} false; then :
16947 $as_echo_n "(cached) " >&6
16948 else
16949 if test "$cross_compiling" = yes; then :
16950 # If cross-compiling, check the size reported by the compiler and
16951 # trust that the arithmetic works.
16952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16953 /* end confdefs.h. */
16956 main ()
16958 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
16959 test_array [0] = 0;
16960 return test_array [0];
16963 return 0;
16965 _ACEOF
16966 if ac_fn_c_try_compile "$LINENO"; then :
16967 pgac_cv_type_long_int_64=yes
16968 else
16969 pgac_cv_type_long_int_64=no
16971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16972 else
16973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16974 /* end confdefs.h. */
16975 typedef long int ac_int64;
16978 * These are globals to discourage the compiler from folding all the
16979 * arithmetic tests down to compile-time constants.
16981 ac_int64 a = 20000001;
16982 ac_int64 b = 40000005;
16984 int does_int64_work()
16986 ac_int64 c,d;
16988 if (sizeof(ac_int64) != 8)
16989 return 0; /* definitely not the right size */
16991 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
16992 c = a * b;
16993 d = (c + b) / b;
16994 if (d != a+1)
16995 return 0;
16996 return 1;
17000 main() {
17001 return (! does_int64_work());
17003 _ACEOF
17004 if ac_fn_c_try_run "$LINENO"; then :
17005 pgac_cv_type_long_int_64=yes
17006 else
17007 pgac_cv_type_long_int_64=no
17009 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17010 conftest.$ac_objext conftest.beam conftest.$ac_ext
17014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
17015 $as_echo "$pgac_cv_type_long_int_64" >&6; }
17017 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17018 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17020 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
17025 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
17026 pg_int64_type="long int"
17027 else
17028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
17029 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
17030 if ${pgac_cv_type_long_long_int_64+:} false; then :
17031 $as_echo_n "(cached) " >&6
17032 else
17033 if test "$cross_compiling" = yes; then :
17034 # If cross-compiling, check the size reported by the compiler and
17035 # trust that the arithmetic works.
17036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17037 /* end confdefs.h. */
17040 main ()
17042 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17043 test_array [0] = 0;
17044 return test_array [0];
17047 return 0;
17049 _ACEOF
17050 if ac_fn_c_try_compile "$LINENO"; then :
17051 pgac_cv_type_long_long_int_64=yes
17052 else
17053 pgac_cv_type_long_long_int_64=no
17055 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17056 else
17057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17058 /* end confdefs.h. */
17059 typedef long long int ac_int64;
17062 * These are globals to discourage the compiler from folding all the
17063 * arithmetic tests down to compile-time constants.
17065 ac_int64 a = 20000001;
17066 ac_int64 b = 40000005;
17068 int does_int64_work()
17070 ac_int64 c,d;
17072 if (sizeof(ac_int64) != 8)
17073 return 0; /* definitely not the right size */
17075 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17076 c = a * b;
17077 d = (c + b) / b;
17078 if (d != a+1)
17079 return 0;
17080 return 1;
17084 main() {
17085 return (! does_int64_work());
17087 _ACEOF
17088 if ac_fn_c_try_run "$LINENO"; then :
17089 pgac_cv_type_long_long_int_64=yes
17090 else
17091 pgac_cv_type_long_long_int_64=no
17093 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17094 conftest.$ac_objext conftest.beam conftest.$ac_ext
17098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
17099 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
17101 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17102 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17104 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
17108 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17109 pg_int64_type="long long int"
17110 else
17111 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
17116 cat >>confdefs.h <<_ACEOF
17117 #define PG_INT64_TYPE $pg_int64_type
17118 _ACEOF
17121 # Select the printf length modifier that goes with that, too.
17122 if test x"$pg_int64_type" = x"long long int" ; then
17123 INT64_MODIFIER='"ll"'
17124 else
17125 INT64_MODIFIER='"l"'
17129 cat >>confdefs.h <<_ACEOF
17130 #define INT64_MODIFIER $INT64_MODIFIER
17131 _ACEOF
17134 # has to be down here, rather than with the other builtins, because
17135 # the test uses PG_INT64_TYPE.
17136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
17137 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
17138 if ${pgac_cv__builtin_op_overflow+:} false; then :
17139 $as_echo_n "(cached) " >&6
17140 else
17141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17142 /* end confdefs.h. */
17144 PG_INT64_TYPE a = 1;
17145 PG_INT64_TYPE b = 1;
17146 PG_INT64_TYPE result;
17147 int oflo;
17150 main ()
17152 oflo = __builtin_mul_overflow(a, b, &result);
17154 return 0;
17156 _ACEOF
17157 if ac_fn_c_try_link "$LINENO"; then :
17158 pgac_cv__builtin_op_overflow=yes
17159 else
17160 pgac_cv__builtin_op_overflow=no
17162 rm -f core conftest.err conftest.$ac_objext \
17163 conftest$ac_exeext conftest.$ac_ext
17165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
17166 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
17167 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
17169 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
17173 # Check size of void *, size_t (enables tweaks for > 32bit address space)
17174 # The cast to long int works around a bug in the HP C Compiler
17175 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17176 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17177 # This bug is HP SR number 8606223364.
17178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
17179 $as_echo_n "checking size of void *... " >&6; }
17180 if ${ac_cv_sizeof_void_p+:} false; then :
17181 $as_echo_n "(cached) " >&6
17182 else
17183 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
17185 else
17186 if test "$ac_cv_type_void_p" = yes; then
17187 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17188 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17189 as_fn_error 77 "cannot compute sizeof (void *)
17190 See \`config.log' for more details" "$LINENO" 5; }
17191 else
17192 ac_cv_sizeof_void_p=0
17197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
17198 $as_echo "$ac_cv_sizeof_void_p" >&6; }
17202 cat >>confdefs.h <<_ACEOF
17203 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
17204 _ACEOF
17207 # The cast to long int works around a bug in the HP C Compiler
17208 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17209 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17210 # This bug is HP SR number 8606223364.
17211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
17212 $as_echo_n "checking size of size_t... " >&6; }
17213 if ${ac_cv_sizeof_size_t+:} false; then :
17214 $as_echo_n "(cached) " >&6
17215 else
17216 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
17218 else
17219 if test "$ac_cv_type_size_t" = yes; then
17220 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17221 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17222 as_fn_error 77 "cannot compute sizeof (size_t)
17223 See \`config.log' for more details" "$LINENO" 5; }
17224 else
17225 ac_cv_sizeof_size_t=0
17230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
17231 $as_echo "$ac_cv_sizeof_size_t" >&6; }
17235 cat >>confdefs.h <<_ACEOF
17236 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
17237 _ACEOF
17240 # The cast to long int works around a bug in the HP C Compiler
17241 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17242 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17243 # This bug is HP SR number 8606223364.
17244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
17245 $as_echo_n "checking size of long... " >&6; }
17246 if ${ac_cv_sizeof_long+:} false; then :
17247 $as_echo_n "(cached) " >&6
17248 else
17249 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
17251 else
17252 if test "$ac_cv_type_long" = yes; then
17253 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17254 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17255 as_fn_error 77 "cannot compute sizeof (long)
17256 See \`config.log' for more details" "$LINENO" 5; }
17257 else
17258 ac_cv_sizeof_long=0
17263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
17264 $as_echo "$ac_cv_sizeof_long" >&6; }
17268 cat >>confdefs.h <<_ACEOF
17269 #define SIZEOF_LONG $ac_cv_sizeof_long
17270 _ACEOF
17274 # Determine memory alignment requirements for the basic C data types.
17276 # The cast to long int works around a bug in the HP C Compiler,
17277 # see AC_CHECK_SIZEOF for more information.
17278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
17279 $as_echo_n "checking alignment of short... " >&6; }
17280 if ${ac_cv_alignof_short+:} false; then :
17281 $as_echo_n "(cached) " >&6
17282 else
17283 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
17284 #ifndef offsetof
17285 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17286 #endif
17287 typedef struct { char x; short y; } ac__type_alignof_;"; then :
17289 else
17290 if test "$ac_cv_type_short" = yes; then
17291 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17292 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17293 as_fn_error 77 "cannot compute alignment of short
17294 See \`config.log' for more details" "$LINENO" 5; }
17295 else
17296 ac_cv_alignof_short=0
17301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
17302 $as_echo "$ac_cv_alignof_short" >&6; }
17306 cat >>confdefs.h <<_ACEOF
17307 #define ALIGNOF_SHORT $ac_cv_alignof_short
17308 _ACEOF
17311 # The cast to long int works around a bug in the HP C Compiler,
17312 # see AC_CHECK_SIZEOF for more information.
17313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
17314 $as_echo_n "checking alignment of int... " >&6; }
17315 if ${ac_cv_alignof_int+:} false; then :
17316 $as_echo_n "(cached) " >&6
17317 else
17318 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
17319 #ifndef offsetof
17320 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17321 #endif
17322 typedef struct { char x; int y; } ac__type_alignof_;"; then :
17324 else
17325 if test "$ac_cv_type_int" = yes; then
17326 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17327 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17328 as_fn_error 77 "cannot compute alignment of int
17329 See \`config.log' for more details" "$LINENO" 5; }
17330 else
17331 ac_cv_alignof_int=0
17336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
17337 $as_echo "$ac_cv_alignof_int" >&6; }
17341 cat >>confdefs.h <<_ACEOF
17342 #define ALIGNOF_INT $ac_cv_alignof_int
17343 _ACEOF
17346 # The cast to long int works around a bug in the HP C Compiler,
17347 # see AC_CHECK_SIZEOF for more information.
17348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
17349 $as_echo_n "checking alignment of long... " >&6; }
17350 if ${ac_cv_alignof_long+:} false; then :
17351 $as_echo_n "(cached) " >&6
17352 else
17353 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
17354 #ifndef offsetof
17355 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17356 #endif
17357 typedef struct { char x; long y; } ac__type_alignof_;"; then :
17359 else
17360 if test "$ac_cv_type_long" = yes; then
17361 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17362 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17363 as_fn_error 77 "cannot compute alignment of long
17364 See \`config.log' for more details" "$LINENO" 5; }
17365 else
17366 ac_cv_alignof_long=0
17371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
17372 $as_echo "$ac_cv_alignof_long" >&6; }
17376 cat >>confdefs.h <<_ACEOF
17377 #define ALIGNOF_LONG $ac_cv_alignof_long
17378 _ACEOF
17381 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17382 # The cast to long int works around a bug in the HP C Compiler,
17383 # see AC_CHECK_SIZEOF for more information.
17384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
17385 $as_echo_n "checking alignment of long long int... " >&6; }
17386 if ${ac_cv_alignof_long_long_int+:} false; then :
17387 $as_echo_n "(cached) " >&6
17388 else
17389 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
17390 #ifndef offsetof
17391 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17392 #endif
17393 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
17395 else
17396 if test "$ac_cv_type_long_long_int" = yes; then
17397 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17398 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17399 as_fn_error 77 "cannot compute alignment of long long int
17400 See \`config.log' for more details" "$LINENO" 5; }
17401 else
17402 ac_cv_alignof_long_long_int=0
17407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
17408 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
17412 cat >>confdefs.h <<_ACEOF
17413 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
17414 _ACEOF
17418 # The cast to long int works around a bug in the HP C Compiler,
17419 # see AC_CHECK_SIZEOF for more information.
17420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
17421 $as_echo_n "checking alignment of double... " >&6; }
17422 if ${ac_cv_alignof_double+:} false; then :
17423 $as_echo_n "(cached) " >&6
17424 else
17425 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
17426 #ifndef offsetof
17427 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17428 #endif
17429 typedef struct { char x; double y; } ac__type_alignof_;"; then :
17431 else
17432 if test "$ac_cv_type_double" = yes; then
17433 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17434 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17435 as_fn_error 77 "cannot compute alignment of double
17436 See \`config.log' for more details" "$LINENO" 5; }
17437 else
17438 ac_cv_alignof_double=0
17443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17444 $as_echo "$ac_cv_alignof_double" >&6; }
17448 cat >>confdefs.h <<_ACEOF
17449 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
17450 _ACEOF
17454 # Compute maximum alignment of any basic type.
17455 # We assume long's alignment is at least as strong as char, short, or int;
17456 # but we must check long long (if it is being used for int64) and double.
17457 # Note that we intentionally do not consider any types wider than 64 bits,
17458 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
17459 # for disk and memory space.
17461 MAX_ALIGNOF=$ac_cv_alignof_long
17462 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
17463 MAX_ALIGNOF=$ac_cv_alignof_double
17465 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
17466 MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
17469 cat >>confdefs.h <<_ACEOF
17470 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
17471 _ACEOF
17475 # Some platforms predefine the types int8, int16, etc. Only check
17476 # a (hopefully) representative subset.
17477 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
17479 if test "x$ac_cv_type_int8" = xyes; then :
17481 cat >>confdefs.h <<_ACEOF
17482 #define HAVE_INT8 1
17483 _ACEOF
17487 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
17489 if test "x$ac_cv_type_uint8" = xyes; then :
17491 cat >>confdefs.h <<_ACEOF
17492 #define HAVE_UINT8 1
17493 _ACEOF
17497 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
17499 if test "x$ac_cv_type_int64" = xyes; then :
17501 cat >>confdefs.h <<_ACEOF
17502 #define HAVE_INT64 1
17503 _ACEOF
17507 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
17509 if test "x$ac_cv_type_uint64" = xyes; then :
17511 cat >>confdefs.h <<_ACEOF
17512 #define HAVE_UINT64 1
17513 _ACEOF
17519 # Some compilers offer a 128-bit integer scalar type.
17520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
17521 $as_echo_n "checking for __int128... " >&6; }
17522 if ${pgac_cv__128bit_int+:} false; then :
17523 $as_echo_n "(cached) " >&6
17524 else
17525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17526 /* end confdefs.h. */
17529 * We don't actually run this test, just link it to verify that any support
17530 * functions needed for __int128 are present.
17532 * These are globals to discourage the compiler from folding all the
17533 * arithmetic tests down to compile-time constants. We do not have
17534 * convenient support for 128bit literals at this point...
17536 __int128 a = 48828125;
17537 __int128 b = 97656250;
17540 main ()
17543 __int128 c,d;
17544 a = (a << 12) + 1; /* 200000000001 */
17545 b = (b << 12) + 5; /* 400000000005 */
17546 /* try the most relevant arithmetic ops */
17547 c = a * b;
17548 d = (c + b) / b;
17549 /* must use the results, else compiler may optimize arithmetic away */
17550 if (d != a+1)
17551 return 1;
17554 return 0;
17556 _ACEOF
17557 if ac_fn_c_try_link "$LINENO"; then :
17558 pgac_cv__128bit_int=yes
17559 else
17560 pgac_cv__128bit_int=no
17562 rm -f core conftest.err conftest.$ac_objext \
17563 conftest$ac_exeext conftest.$ac_ext
17565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
17566 $as_echo "$pgac_cv__128bit_int" >&6; }
17567 if test x"$pgac_cv__128bit_int" = xyes ; then
17568 # Use of non-default alignment with __int128 tickles bugs in some compilers.
17569 # If not cross-compiling, we can test for bugs and disable use of __int128
17570 # with buggy compilers. If cross-compiling, hope for the best.
17571 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
17572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
17573 $as_echo_n "checking for __int128 alignment bug... " >&6; }
17574 if ${pgac_cv__128bit_int_bug+:} false; then :
17575 $as_echo_n "(cached) " >&6
17576 else
17577 if test "$cross_compiling" = yes; then :
17578 pgac_cv__128bit_int_bug="assuming ok"
17579 else
17580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17581 /* end confdefs.h. */
17583 /* This must match the corresponding code in c.h: */
17584 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
17585 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
17586 #elif defined(_MSC_VER)
17587 #define pg_attribute_aligned(a) __declspec(align(a))
17588 #endif
17589 typedef __int128 int128a
17590 #if defined(pg_attribute_aligned)
17591 pg_attribute_aligned(8)
17592 #endif
17594 int128a holder;
17595 void pass_by_val(void *buffer, int128a par) { holder = par; }
17598 main ()
17601 long int i64 = 97656225L << 12;
17602 int128a q;
17603 pass_by_val(main, (int128a) i64);
17604 q = (int128a) i64;
17605 if (q != holder)
17606 return 1;
17609 return 0;
17611 _ACEOF
17612 if ac_fn_c_try_run "$LINENO"; then :
17613 pgac_cv__128bit_int_bug=ok
17614 else
17615 pgac_cv__128bit_int_bug=broken
17617 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17618 conftest.$ac_objext conftest.beam conftest.$ac_ext
17622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
17623 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
17624 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
17626 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
17628 # The cast to long int works around a bug in the HP C Compiler,
17629 # see AC_CHECK_SIZEOF for more information.
17630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
17631 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
17632 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
17633 $as_echo_n "(cached) " >&6
17634 else
17635 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
17636 #ifndef offsetof
17637 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17638 #endif
17639 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
17641 else
17642 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
17643 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17644 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17645 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
17646 See \`config.log' for more details" "$LINENO" 5; }
17647 else
17648 ac_cv_alignof_PG_INT128_TYPE=0
17653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
17654 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
17658 cat >>confdefs.h <<_ACEOF
17659 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
17660 _ACEOF
17666 # Check for various atomic operations now that we have checked how to declare
17667 # 64bit integers.
17668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
17669 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
17670 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
17671 $as_echo_n "(cached) " >&6
17672 else
17673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17674 /* end confdefs.h. */
17677 main ()
17679 char lock = 0;
17680 __sync_lock_test_and_set(&lock, 1);
17681 __sync_lock_release(&lock);
17683 return 0;
17685 _ACEOF
17686 if ac_fn_c_try_link "$LINENO"; then :
17687 pgac_cv_gcc_sync_char_tas="yes"
17688 else
17689 pgac_cv_gcc_sync_char_tas="no"
17691 rm -f core conftest.err conftest.$ac_objext \
17692 conftest$ac_exeext conftest.$ac_ext
17694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
17695 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
17696 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
17698 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
17701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
17702 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
17703 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
17704 $as_echo_n "(cached) " >&6
17705 else
17706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17707 /* end confdefs.h. */
17710 main ()
17712 int lock = 0;
17713 __sync_lock_test_and_set(&lock, 1);
17714 __sync_lock_release(&lock);
17716 return 0;
17718 _ACEOF
17719 if ac_fn_c_try_link "$LINENO"; then :
17720 pgac_cv_gcc_sync_int32_tas="yes"
17721 else
17722 pgac_cv_gcc_sync_int32_tas="no"
17724 rm -f core conftest.err conftest.$ac_objext \
17725 conftest$ac_exeext conftest.$ac_ext
17727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
17728 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
17729 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
17731 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
17734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
17735 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
17736 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
17737 $as_echo_n "(cached) " >&6
17738 else
17739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17740 /* end confdefs.h. */
17743 main ()
17745 int val = 0;
17746 __sync_val_compare_and_swap(&val, 0, 37);
17748 return 0;
17750 _ACEOF
17751 if ac_fn_c_try_link "$LINENO"; then :
17752 pgac_cv_gcc_sync_int32_cas="yes"
17753 else
17754 pgac_cv_gcc_sync_int32_cas="no"
17756 rm -f core conftest.err conftest.$ac_objext \
17757 conftest$ac_exeext conftest.$ac_ext
17759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
17760 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
17761 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
17763 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
17766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
17767 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
17768 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
17769 $as_echo_n "(cached) " >&6
17770 else
17771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17772 /* end confdefs.h. */
17775 main ()
17777 PG_INT64_TYPE lock = 0;
17778 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
17780 return 0;
17782 _ACEOF
17783 if ac_fn_c_try_link "$LINENO"; then :
17784 pgac_cv_gcc_sync_int64_cas="yes"
17785 else
17786 pgac_cv_gcc_sync_int64_cas="no"
17788 rm -f core conftest.err conftest.$ac_objext \
17789 conftest$ac_exeext conftest.$ac_ext
17791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
17792 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
17793 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
17795 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
17798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
17799 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
17800 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
17801 $as_echo_n "(cached) " >&6
17802 else
17803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17804 /* end confdefs.h. */
17807 main ()
17809 int val = 0;
17810 int expect = 0;
17811 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17813 return 0;
17815 _ACEOF
17816 if ac_fn_c_try_link "$LINENO"; then :
17817 pgac_cv_gcc_atomic_int32_cas="yes"
17818 else
17819 pgac_cv_gcc_atomic_int32_cas="no"
17821 rm -f core conftest.err conftest.$ac_objext \
17822 conftest$ac_exeext conftest.$ac_ext
17824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
17825 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
17826 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
17828 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
17831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
17832 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
17833 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
17834 $as_echo_n "(cached) " >&6
17835 else
17836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17837 /* end confdefs.h. */
17840 main ()
17842 PG_INT64_TYPE val = 0;
17843 PG_INT64_TYPE expect = 0;
17844 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
17846 return 0;
17848 _ACEOF
17849 if ac_fn_c_try_link "$LINENO"; then :
17850 pgac_cv_gcc_atomic_int64_cas="yes"
17851 else
17852 pgac_cv_gcc_atomic_int64_cas="no"
17854 rm -f core conftest.err conftest.$ac_objext \
17855 conftest$ac_exeext conftest.$ac_ext
17857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
17858 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
17859 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
17861 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
17866 # Check for x86 cpuid instruction
17867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
17868 $as_echo_n "checking for __get_cpuid... " >&6; }
17869 if ${pgac_cv__get_cpuid+:} false; then :
17870 $as_echo_n "(cached) " >&6
17871 else
17872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17873 /* end confdefs.h. */
17874 #include <cpuid.h>
17876 main ()
17878 unsigned int exx[4] = {0, 0, 0, 0};
17879 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
17882 return 0;
17884 _ACEOF
17885 if ac_fn_c_try_link "$LINENO"; then :
17886 pgac_cv__get_cpuid="yes"
17887 else
17888 pgac_cv__get_cpuid="no"
17890 rm -f core conftest.err conftest.$ac_objext \
17891 conftest$ac_exeext conftest.$ac_ext
17893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
17894 $as_echo "$pgac_cv__get_cpuid" >&6; }
17895 if test x"$pgac_cv__get_cpuid" = x"yes"; then
17897 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
17901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
17902 $as_echo_n "checking for __cpuid... " >&6; }
17903 if ${pgac_cv__cpuid+:} false; then :
17904 $as_echo_n "(cached) " >&6
17905 else
17906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17907 /* end confdefs.h. */
17908 #include <intrin.h>
17910 main ()
17912 unsigned int exx[4] = {0, 0, 0, 0};
17913 __get_cpuid(exx[0], 1);
17916 return 0;
17918 _ACEOF
17919 if ac_fn_c_try_link "$LINENO"; then :
17920 pgac_cv__cpuid="yes"
17921 else
17922 pgac_cv__cpuid="no"
17924 rm -f core conftest.err conftest.$ac_objext \
17925 conftest$ac_exeext conftest.$ac_ext
17927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
17928 $as_echo "$pgac_cv__cpuid" >&6; }
17929 if test x"$pgac_cv__cpuid" = x"yes"; then
17931 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
17935 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
17937 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
17938 # with the default compiler flags. If not, check if adding the -msse4.2
17939 # flag helps. CFLAGS_CRC is set to -msse4.2 if that's required.
17940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
17941 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
17942 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
17943 $as_echo_n "(cached) " >&6
17944 else
17945 pgac_save_CFLAGS=$CFLAGS
17946 CFLAGS="$pgac_save_CFLAGS "
17947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17948 /* end confdefs.h. */
17949 #include <nmmintrin.h>
17951 main ()
17953 unsigned int crc = 0;
17954 crc = _mm_crc32_u8(crc, 0);
17955 crc = _mm_crc32_u32(crc, 0);
17956 /* return computed value, to prevent the above being optimized away */
17957 return crc == 0;
17959 return 0;
17961 _ACEOF
17962 if ac_fn_c_try_link "$LINENO"; then :
17963 pgac_cv_sse42_crc32_intrinsics_=yes
17964 else
17965 pgac_cv_sse42_crc32_intrinsics_=no
17967 rm -f core conftest.err conftest.$ac_objext \
17968 conftest$ac_exeext conftest.$ac_ext
17969 CFLAGS="$pgac_save_CFLAGS"
17971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
17972 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
17973 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
17974 CFLAGS_CRC=""
17975 pgac_sse42_crc32_intrinsics=yes
17978 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
17979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
17980 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
17981 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
17982 $as_echo_n "(cached) " >&6
17983 else
17984 pgac_save_CFLAGS=$CFLAGS
17985 CFLAGS="$pgac_save_CFLAGS -msse4.2"
17986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17987 /* end confdefs.h. */
17988 #include <nmmintrin.h>
17990 main ()
17992 unsigned int crc = 0;
17993 crc = _mm_crc32_u8(crc, 0);
17994 crc = _mm_crc32_u32(crc, 0);
17995 /* return computed value, to prevent the above being optimized away */
17996 return crc == 0;
17998 return 0;
18000 _ACEOF
18001 if ac_fn_c_try_link "$LINENO"; then :
18002 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
18003 else
18004 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
18006 rm -f core conftest.err conftest.$ac_objext \
18007 conftest$ac_exeext conftest.$ac_ext
18008 CFLAGS="$pgac_save_CFLAGS"
18010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
18011 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
18012 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
18013 CFLAGS_CRC="-msse4.2"
18014 pgac_sse42_crc32_intrinsics=yes
18019 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
18020 # define __SSE4_2__ in that case.
18021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18022 /* end confdefs.h. */
18025 main ()
18028 #ifndef __SSE4_2__
18029 #error __SSE4_2__ not defined
18030 #endif
18033 return 0;
18035 _ACEOF
18036 if ac_fn_c_try_compile "$LINENO"; then :
18037 SSE4_2_TARGETED=1
18039 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18041 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
18043 # First check if __crc32c* intrinsics can be used with the default compiler
18044 # flags. If not, check if adding -march=armv8-a+crc flag helps.
18045 # CFLAGS_CRC is set if the extra flag is required.
18046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
18047 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
18048 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
18049 $as_echo_n "(cached) " >&6
18050 else
18051 pgac_save_CFLAGS=$CFLAGS
18052 CFLAGS="$pgac_save_CFLAGS "
18053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18054 /* end confdefs.h. */
18055 #include <arm_acle.h>
18057 main ()
18059 unsigned int crc = 0;
18060 crc = __crc32cb(crc, 0);
18061 crc = __crc32ch(crc, 0);
18062 crc = __crc32cw(crc, 0);
18063 crc = __crc32cd(crc, 0);
18064 /* return computed value, to prevent the above being optimized away */
18065 return crc == 0;
18067 return 0;
18069 _ACEOF
18070 if ac_fn_c_try_link "$LINENO"; then :
18071 pgac_cv_armv8_crc32c_intrinsics_=yes
18072 else
18073 pgac_cv_armv8_crc32c_intrinsics_=no
18075 rm -f core conftest.err conftest.$ac_objext \
18076 conftest$ac_exeext conftest.$ac_ext
18077 CFLAGS="$pgac_save_CFLAGS"
18079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
18080 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
18081 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
18082 CFLAGS_CRC=""
18083 pgac_armv8_crc32c_intrinsics=yes
18086 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
18087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
18088 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
18089 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
18090 $as_echo_n "(cached) " >&6
18091 else
18092 pgac_save_CFLAGS=$CFLAGS
18093 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
18094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18095 /* end confdefs.h. */
18096 #include <arm_acle.h>
18098 main ()
18100 unsigned int crc = 0;
18101 crc = __crc32cb(crc, 0);
18102 crc = __crc32ch(crc, 0);
18103 crc = __crc32cw(crc, 0);
18104 crc = __crc32cd(crc, 0);
18105 /* return computed value, to prevent the above being optimized away */
18106 return crc == 0;
18108 return 0;
18110 _ACEOF
18111 if ac_fn_c_try_link "$LINENO"; then :
18112 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
18113 else
18114 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
18116 rm -f core conftest.err conftest.$ac_objext \
18117 conftest$ac_exeext conftest.$ac_ext
18118 CFLAGS="$pgac_save_CFLAGS"
18120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
18121 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
18122 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
18123 CFLAGS_CRC="-march=armv8-a+crc"
18124 pgac_armv8_crc32c_intrinsics=yes
18131 # Select CRC-32C implementation.
18133 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
18134 # use the special CRC instructions for calculating CRC-32C. If we're not
18135 # targeting such a processor, but we can nevertheless produce code that uses
18136 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
18137 # implementations and select which one to use at runtime, depending on whether
18138 # SSE 4.2 is supported by the processor we're running on.
18140 # Similarly, if we are targeting an ARM processor that has the CRC
18141 # instructions that are part of the ARMv8 CRC Extension, use them. And if
18142 # we're not targeting such a processor, but can nevertheless produce code that
18143 # uses the CRC instructions, compile both, and select at runtime.
18145 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
18146 # in the template or configure command line.
18147 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""; then
18148 # Use Intel SSE 4.2 if available.
18149 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
18150 USE_SSE42_CRC32C=1
18151 else
18152 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
18153 # the runtime check.
18154 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
18155 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
18156 else
18157 # Use ARM CRC Extension if available.
18158 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_CRC" = x""; then
18159 USE_ARMV8_CRC32C=1
18160 else
18161 # ARM CRC Extension, with runtime check?
18162 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
18163 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
18164 else
18165 # fall back to slicing-by-8 algorithm, which doesn't require any
18166 # special CPU support.
18167 USE_SLICING_BY_8_CRC32C=1
18174 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
18175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
18176 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
18177 if test x"$USE_SSE42_CRC32C" = x"1"; then
18179 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
18181 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
18182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
18183 $as_echo "SSE 4.2" >&6; }
18184 else
18185 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18187 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18189 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
18190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
18191 $as_echo "SSE 4.2 with runtime check" >&6; }
18192 else
18193 if test x"$USE_ARMV8_CRC32C" = x"1"; then
18195 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
18197 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
18198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
18199 $as_echo "ARMv8 CRC instructions" >&6; }
18200 else
18201 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18203 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18205 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
18206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
18207 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
18208 else
18210 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
18212 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
18213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
18214 $as_echo "slicing-by-8" >&6; }
18222 # Select semaphore implementation type.
18223 if test "$PORTNAME" != "win32"; then
18224 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
18225 # Need sem_open for this
18226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
18227 $as_echo_n "checking for library containing sem_open... " >&6; }
18228 if ${ac_cv_search_sem_open+:} false; then :
18229 $as_echo_n "(cached) " >&6
18230 else
18231 ac_func_search_save_LIBS=$LIBS
18232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18233 /* end confdefs.h. */
18235 /* Override any GCC internal prototype to avoid an error.
18236 Use char because int might match the return type of a GCC
18237 builtin and then its argument prototype would still apply. */
18238 #ifdef __cplusplus
18239 extern "C"
18240 #endif
18241 char sem_open ();
18243 main ()
18245 return sem_open ();
18247 return 0;
18249 _ACEOF
18250 for ac_lib in '' rt pthread; do
18251 if test -z "$ac_lib"; then
18252 ac_res="none required"
18253 else
18254 ac_res=-l$ac_lib
18255 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18257 if ac_fn_c_try_link "$LINENO"; then :
18258 ac_cv_search_sem_open=$ac_res
18260 rm -f core conftest.err conftest.$ac_objext \
18261 conftest$ac_exeext
18262 if ${ac_cv_search_sem_open+:} false; then :
18263 break
18265 done
18266 if ${ac_cv_search_sem_open+:} false; then :
18268 else
18269 ac_cv_search_sem_open=no
18271 rm conftest.$ac_ext
18272 LIBS=$ac_func_search_save_LIBS
18274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
18275 $as_echo "$ac_cv_search_sem_open" >&6; }
18276 ac_res=$ac_cv_search_sem_open
18277 if test "$ac_res" != no; then :
18278 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18279 USE_NAMED_POSIX_SEMAPHORES=1
18283 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
18284 # Need sem_init for this
18285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
18286 $as_echo_n "checking for library containing sem_init... " >&6; }
18287 if ${ac_cv_search_sem_init+:} false; then :
18288 $as_echo_n "(cached) " >&6
18289 else
18290 ac_func_search_save_LIBS=$LIBS
18291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18292 /* end confdefs.h. */
18294 /* Override any GCC internal prototype to avoid an error.
18295 Use char because int might match the return type of a GCC
18296 builtin and then its argument prototype would still apply. */
18297 #ifdef __cplusplus
18298 extern "C"
18299 #endif
18300 char sem_init ();
18302 main ()
18304 return sem_init ();
18306 return 0;
18308 _ACEOF
18309 for ac_lib in '' rt pthread; do
18310 if test -z "$ac_lib"; then
18311 ac_res="none required"
18312 else
18313 ac_res=-l$ac_lib
18314 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18316 if ac_fn_c_try_link "$LINENO"; then :
18317 ac_cv_search_sem_init=$ac_res
18319 rm -f core conftest.err conftest.$ac_objext \
18320 conftest$ac_exeext
18321 if ${ac_cv_search_sem_init+:} false; then :
18322 break
18324 done
18325 if ${ac_cv_search_sem_init+:} false; then :
18327 else
18328 ac_cv_search_sem_init=no
18330 rm conftest.$ac_ext
18331 LIBS=$ac_func_search_save_LIBS
18333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
18334 $as_echo "$ac_cv_search_sem_init" >&6; }
18335 ac_res=$ac_cv_search_sem_init
18336 if test "$ac_res" != no; then :
18337 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18338 USE_UNNAMED_POSIX_SEMAPHORES=1
18342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
18343 $as_echo_n "checking which semaphore API to use... " >&6; }
18344 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
18346 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18348 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18349 sematype="named POSIX"
18350 else
18351 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
18353 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18355 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18356 sematype="unnamed POSIX"
18357 else
18359 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
18361 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
18362 sematype="System V"
18365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
18366 $as_echo "$sematype" >&6; }
18367 else
18369 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
18371 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18375 # Select shared-memory implementation type.
18376 if test "$PORTNAME" != "win32"; then
18378 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18380 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18381 else
18383 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18385 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18388 # Select random number source. If a TLS library is used then it will be the
18389 # first choice, else the native platform sources (Windows API or /dev/urandom)
18390 # will be used.
18391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
18392 $as_echo_n "checking which random number source to use... " >&6; }
18393 if test x"$with_ssl" = x"openssl" ; then
18394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
18395 $as_echo "OpenSSL" >&6; }
18396 elif test x"$PORTNAME" = x"win32" ; then
18397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
18398 $as_echo "Windows native" >&6; }
18399 elif test x"$cross_compiling" = x"yes"; then
18400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming /dev/urandom" >&5
18401 $as_echo "assuming /dev/urandom" >&6; }
18402 else
18403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
18404 $as_echo "/dev/urandom" >&6; }
18405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
18406 $as_echo_n "checking for /dev/urandom... " >&6; }
18407 if ${ac_cv_file__dev_urandom+:} false; then :
18408 $as_echo_n "(cached) " >&6
18409 else
18410 test "$cross_compiling" = yes &&
18411 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18412 if test -r "/dev/urandom"; then
18413 ac_cv_file__dev_urandom=yes
18414 else
18415 ac_cv_file__dev_urandom=no
18418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
18419 $as_echo "$ac_cv_file__dev_urandom" >&6; }
18420 if test "x$ac_cv_file__dev_urandom" = xyes; then :
18425 if test x"$ac_cv_file__dev_urandom" = x"no" ; then
18426 as_fn_error $? "
18427 no source of strong random numbers was found
18428 PostgreSQL can use OpenSSL, native Windows API or /dev/urandom as a source of random numbers." "$LINENO" 5
18432 # If not set in template file, set bytes to use libc memset()
18433 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
18434 MEMSET_LOOP_LIMIT=1024
18437 cat >>confdefs.h <<_ACEOF
18438 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
18439 _ACEOF
18443 if test "$enable_nls" = yes ; then
18445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
18446 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
18447 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18448 $as_echo_n "(cached) " >&6
18449 else
18450 ac_func_search_save_LIBS=$LIBS
18451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18452 /* end confdefs.h. */
18454 /* Override any GCC internal prototype to avoid an error.
18455 Use char because int might match the return type of a GCC
18456 builtin and then its argument prototype would still apply. */
18457 #ifdef __cplusplus
18458 extern "C"
18459 #endif
18460 char bind_textdomain_codeset ();
18462 main ()
18464 return bind_textdomain_codeset ();
18466 return 0;
18468 _ACEOF
18469 for ac_lib in '' intl; do
18470 if test -z "$ac_lib"; then
18471 ac_res="none required"
18472 else
18473 ac_res=-l$ac_lib
18474 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18476 if ac_fn_c_try_link "$LINENO"; then :
18477 ac_cv_search_bind_textdomain_codeset=$ac_res
18479 rm -f core conftest.err conftest.$ac_objext \
18480 conftest$ac_exeext
18481 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18482 break
18484 done
18485 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
18487 else
18488 ac_cv_search_bind_textdomain_codeset=no
18490 rm conftest.$ac_ext
18491 LIBS=$ac_func_search_save_LIBS
18493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
18494 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
18495 ac_res=$ac_cv_search_bind_textdomain_codeset
18496 if test "$ac_res" != no; then :
18497 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18499 else
18500 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
18503 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
18504 if test "x$ac_cv_header_libintl_h" = xyes; then :
18506 else
18507 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
18511 if test -z "$MSGFMT"; then
18512 for ac_prog in msgfmt
18514 # Extract the first word of "$ac_prog", so it can be a program name with args.
18515 set dummy $ac_prog; ac_word=$2
18516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18517 $as_echo_n "checking for $ac_word... " >&6; }
18518 if ${ac_cv_path_MSGFMT+:} false; then :
18519 $as_echo_n "(cached) " >&6
18520 else
18521 case $MSGFMT in
18522 [\\/]* | ?:[\\/]*)
18523 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
18526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18527 for as_dir in $PATH
18529 IFS=$as_save_IFS
18530 test -z "$as_dir" && as_dir=.
18531 for ac_exec_ext in '' $ac_executable_extensions; do
18532 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18533 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
18534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18535 break 2
18537 done
18538 done
18539 IFS=$as_save_IFS
18542 esac
18544 MSGFMT=$ac_cv_path_MSGFMT
18545 if test -n "$MSGFMT"; then
18546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18547 $as_echo "$MSGFMT" >&6; }
18548 else
18549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18550 $as_echo "no" >&6; }
18554 test -n "$MSGFMT" && break
18555 done
18557 else
18558 # Report the value of MSGFMT in configure's output in all cases.
18559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
18560 $as_echo_n "checking for MSGFMT... " >&6; }
18561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
18562 $as_echo "$MSGFMT" >&6; }
18565 if test -z "$MSGFMT"; then
18566 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
18568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
18569 $as_echo_n "checking for msgfmt flags... " >&6; }
18570 if ${pgac_cv_msgfmt_flags+:} false; then :
18571 $as_echo_n "(cached) " >&6
18572 else
18573 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
18574 pgac_cv_msgfmt_flags=-c
18577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
18578 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
18579 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
18581 if test -z "$MSGMERGE"; then
18582 for ac_prog in msgmerge
18584 # Extract the first word of "$ac_prog", so it can be a program name with args.
18585 set dummy $ac_prog; ac_word=$2
18586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18587 $as_echo_n "checking for $ac_word... " >&6; }
18588 if ${ac_cv_path_MSGMERGE+:} false; then :
18589 $as_echo_n "(cached) " >&6
18590 else
18591 case $MSGMERGE in
18592 [\\/]* | ?:[\\/]*)
18593 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
18596 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18597 for as_dir in $PATH
18599 IFS=$as_save_IFS
18600 test -z "$as_dir" && as_dir=.
18601 for ac_exec_ext in '' $ac_executable_extensions; do
18602 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18603 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
18604 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18605 break 2
18607 done
18608 done
18609 IFS=$as_save_IFS
18612 esac
18614 MSGMERGE=$ac_cv_path_MSGMERGE
18615 if test -n "$MSGMERGE"; then
18616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18617 $as_echo "$MSGMERGE" >&6; }
18618 else
18619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18620 $as_echo "no" >&6; }
18624 test -n "$MSGMERGE" && break
18625 done
18627 else
18628 # Report the value of MSGMERGE in configure's output in all cases.
18629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
18630 $as_echo_n "checking for MSGMERGE... " >&6; }
18631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
18632 $as_echo "$MSGMERGE" >&6; }
18635 if test -z "$XGETTEXT"; then
18636 for ac_prog in xgettext
18638 # Extract the first word of "$ac_prog", so it can be a program name with args.
18639 set dummy $ac_prog; ac_word=$2
18640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18641 $as_echo_n "checking for $ac_word... " >&6; }
18642 if ${ac_cv_path_XGETTEXT+:} false; then :
18643 $as_echo_n "(cached) " >&6
18644 else
18645 case $XGETTEXT in
18646 [\\/]* | ?:[\\/]*)
18647 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
18650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18651 for as_dir in $PATH
18653 IFS=$as_save_IFS
18654 test -z "$as_dir" && as_dir=.
18655 for ac_exec_ext in '' $ac_executable_extensions; do
18656 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18657 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
18658 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18659 break 2
18661 done
18662 done
18663 IFS=$as_save_IFS
18666 esac
18668 XGETTEXT=$ac_cv_path_XGETTEXT
18669 if test -n "$XGETTEXT"; then
18670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18671 $as_echo "$XGETTEXT" >&6; }
18672 else
18673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18674 $as_echo "no" >&6; }
18678 test -n "$XGETTEXT" && break
18679 done
18681 else
18682 # Report the value of XGETTEXT in configure's output in all cases.
18683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
18684 $as_echo_n "checking for XGETTEXT... " >&6; }
18685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
18686 $as_echo "$XGETTEXT" >&6; }
18692 # Check for Tcl configuration script tclConfig.sh
18693 if test "$with_tcl" = yes; then
18694 if test -z "$TCLSH"; then
18695 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
18697 # Extract the first word of "$ac_prog", so it can be a program name with args.
18698 set dummy $ac_prog; ac_word=$2
18699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18700 $as_echo_n "checking for $ac_word... " >&6; }
18701 if ${ac_cv_path_TCLSH+:} false; then :
18702 $as_echo_n "(cached) " >&6
18703 else
18704 case $TCLSH in
18705 [\\/]* | ?:[\\/]*)
18706 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
18709 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18710 for as_dir in $PATH
18712 IFS=$as_save_IFS
18713 test -z "$as_dir" && as_dir=.
18714 for ac_exec_ext in '' $ac_executable_extensions; do
18715 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18716 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
18717 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18718 break 2
18720 done
18721 done
18722 IFS=$as_save_IFS
18725 esac
18727 TCLSH=$ac_cv_path_TCLSH
18728 if test -n "$TCLSH"; then
18729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18730 $as_echo "$TCLSH" >&6; }
18731 else
18732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18733 $as_echo "no" >&6; }
18737 test -n "$TCLSH" && break
18738 done
18740 else
18741 # Report the value of TCLSH in configure's output in all cases.
18742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
18743 $as_echo_n "checking for TCLSH... " >&6; }
18744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
18745 $as_echo "$TCLSH" >&6; }
18748 if test x"$TCLSH" = x""; then
18749 as_fn_error $? "Tcl shell not found" "$LINENO" 5
18752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
18753 $as_echo_n "checking for tclConfig.sh... " >&6; }
18754 # Let user override test
18755 if test -z "$TCL_CONFIG_SH"; then
18756 pgac_test_dirs="$with_tclconfig"
18758 set X $pgac_test_dirs; shift
18759 if test $# -eq 0; then
18760 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
18761 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
18762 # On newer macOS, $auto_path frequently doesn't include the place
18763 # where tclConfig.sh actually lives. Append that to the end, so as not
18764 # to break cases where a non-default Tcl installation is being used.
18765 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
18766 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
18768 set X $pgac_test_dirs; shift
18771 for pgac_dir do
18772 if test -r "$pgac_dir/tclConfig.sh"; then
18773 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
18774 break
18776 done
18779 if test -z "$TCL_CONFIG_SH"; then
18780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18781 $as_echo "no" >&6; }
18782 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
18783 else
18784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
18785 $as_echo "$TCL_CONFIG_SH" >&6; }
18790 . "$TCL_CONFIG_SH"
18791 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
18792 eval TCL_LIBS=\"$TCL_LIBS\"
18793 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
18794 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
18796 if test "$TCL_SHARED_BUILD" != 1; then
18797 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
18798 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
18800 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
18801 ac_save_CPPFLAGS=$CPPFLAGS
18802 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
18803 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
18804 if test "x$ac_cv_header_tcl_h" = xyes; then :
18806 else
18807 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
18811 CPPFLAGS=$ac_save_CPPFLAGS
18814 # check for <perl.h>
18815 if test "$with_perl" = yes; then
18816 ac_save_CPPFLAGS=$CPPFLAGS
18817 CPPFLAGS="$CPPFLAGS $perl_includespec"
18818 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
18820 if test "x$ac_cv_header_perl_h" = xyes; then :
18822 else
18823 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
18827 # While we're at it, check that we can link to libperl.
18828 # On most platforms, if perl.h is there then libperl.so will be too, but at
18829 # this writing Debian packages them separately. There is no known reason to
18830 # waste cycles on separate probes for the Tcl or Python libraries, though.
18831 # On some Red Hat platforms, the link attempt can fail if we don't use
18832 # CFLAGS_SL while building the test program.
18833 ac_save_CFLAGS=$CFLAGS
18834 CFLAGS="$CFLAGS $CFLAGS_SL"
18835 pgac_save_LIBS=$LIBS
18836 LIBS="$perl_embed_ldflags"
18837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
18838 $as_echo_n "checking for libperl... " >&6; }
18839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18840 /* end confdefs.h. */
18842 #include <EXTERN.h>
18843 #include <perl.h>
18846 main ()
18848 perl_alloc();
18850 return 0;
18852 _ACEOF
18853 if ac_fn_c_try_link "$LINENO"; then :
18854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18855 $as_echo "yes" >&6; }
18856 else
18857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18858 $as_echo "no" >&6; }
18859 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
18861 rm -f core conftest.err conftest.$ac_objext \
18862 conftest$ac_exeext conftest.$ac_ext
18863 LIBS=$pgac_save_LIBS
18864 CFLAGS=$ac_save_CFLAGS
18865 CPPFLAGS=$ac_save_CPPFLAGS
18868 # check for <Python.h>
18869 if test "$with_python" = yes; then
18870 ac_save_CPPFLAGS=$CPPFLAGS
18871 CPPFLAGS="$python_includespec $CPPFLAGS"
18872 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
18873 if test "x$ac_cv_header_Python_h" = xyes; then :
18875 else
18876 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
18880 CPPFLAGS=$ac_save_CPPFLAGS
18884 # Check for documentation-building tools
18886 if test -z "$XMLLINT"; then
18887 for ac_prog in xmllint
18889 # Extract the first word of "$ac_prog", so it can be a program name with args.
18890 set dummy $ac_prog; ac_word=$2
18891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18892 $as_echo_n "checking for $ac_word... " >&6; }
18893 if ${ac_cv_path_XMLLINT+:} false; then :
18894 $as_echo_n "(cached) " >&6
18895 else
18896 case $XMLLINT in
18897 [\\/]* | ?:[\\/]*)
18898 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
18901 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18902 for as_dir in $PATH
18904 IFS=$as_save_IFS
18905 test -z "$as_dir" && as_dir=.
18906 for ac_exec_ext in '' $ac_executable_extensions; do
18907 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18908 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
18909 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18910 break 2
18912 done
18913 done
18914 IFS=$as_save_IFS
18917 esac
18919 XMLLINT=$ac_cv_path_XMLLINT
18920 if test -n "$XMLLINT"; then
18921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18922 $as_echo "$XMLLINT" >&6; }
18923 else
18924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18925 $as_echo "no" >&6; }
18929 test -n "$XMLLINT" && break
18930 done
18932 else
18933 # Report the value of XMLLINT in configure's output in all cases.
18934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
18935 $as_echo_n "checking for XMLLINT... " >&6; }
18936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
18937 $as_echo "$XMLLINT" >&6; }
18940 if test -z "$XSLTPROC"; then
18941 for ac_prog in xsltproc
18943 # Extract the first word of "$ac_prog", so it can be a program name with args.
18944 set dummy $ac_prog; ac_word=$2
18945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18946 $as_echo_n "checking for $ac_word... " >&6; }
18947 if ${ac_cv_path_XSLTPROC+:} false; then :
18948 $as_echo_n "(cached) " >&6
18949 else
18950 case $XSLTPROC in
18951 [\\/]* | ?:[\\/]*)
18952 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18955 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18956 for as_dir in $PATH
18958 IFS=$as_save_IFS
18959 test -z "$as_dir" && as_dir=.
18960 for ac_exec_ext in '' $ac_executable_extensions; do
18961 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18962 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18963 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18964 break 2
18966 done
18967 done
18968 IFS=$as_save_IFS
18971 esac
18973 XSLTPROC=$ac_cv_path_XSLTPROC
18974 if test -n "$XSLTPROC"; then
18975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18976 $as_echo "$XSLTPROC" >&6; }
18977 else
18978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18979 $as_echo "no" >&6; }
18983 test -n "$XSLTPROC" && break
18984 done
18986 else
18987 # Report the value of XSLTPROC in configure's output in all cases.
18988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
18989 $as_echo_n "checking for XSLTPROC... " >&6; }
18990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18991 $as_echo "$XSLTPROC" >&6; }
18994 if test -z "$FOP"; then
18995 for ac_prog in fop
18997 # Extract the first word of "$ac_prog", so it can be a program name with args.
18998 set dummy $ac_prog; ac_word=$2
18999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19000 $as_echo_n "checking for $ac_word... " >&6; }
19001 if ${ac_cv_path_FOP+:} false; then :
19002 $as_echo_n "(cached) " >&6
19003 else
19004 case $FOP in
19005 [\\/]* | ?:[\\/]*)
19006 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
19009 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19010 for as_dir in $PATH
19012 IFS=$as_save_IFS
19013 test -z "$as_dir" && as_dir=.
19014 for ac_exec_ext in '' $ac_executable_extensions; do
19015 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19016 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
19017 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19018 break 2
19020 done
19021 done
19022 IFS=$as_save_IFS
19025 esac
19027 FOP=$ac_cv_path_FOP
19028 if test -n "$FOP"; then
19029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19030 $as_echo "$FOP" >&6; }
19031 else
19032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19033 $as_echo "no" >&6; }
19037 test -n "$FOP" && break
19038 done
19040 else
19041 # Report the value of FOP in configure's output in all cases.
19042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
19043 $as_echo_n "checking for FOP... " >&6; }
19044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19045 $as_echo "$FOP" >&6; }
19048 if test -z "$DBTOEPUB"; then
19049 for ac_prog in dbtoepub
19051 # Extract the first word of "$ac_prog", so it can be a program name with args.
19052 set dummy $ac_prog; ac_word=$2
19053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19054 $as_echo_n "checking for $ac_word... " >&6; }
19055 if ${ac_cv_path_DBTOEPUB+:} false; then :
19056 $as_echo_n "(cached) " >&6
19057 else
19058 case $DBTOEPUB in
19059 [\\/]* | ?:[\\/]*)
19060 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
19063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19064 for as_dir in $PATH
19066 IFS=$as_save_IFS
19067 test -z "$as_dir" && as_dir=.
19068 for ac_exec_ext in '' $ac_executable_extensions; do
19069 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19070 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
19071 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19072 break 2
19074 done
19075 done
19076 IFS=$as_save_IFS
19079 esac
19081 DBTOEPUB=$ac_cv_path_DBTOEPUB
19082 if test -n "$DBTOEPUB"; then
19083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19084 $as_echo "$DBTOEPUB" >&6; }
19085 else
19086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19087 $as_echo "no" >&6; }
19091 test -n "$DBTOEPUB" && break
19092 done
19094 else
19095 # Report the value of DBTOEPUB in configure's output in all cases.
19096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
19097 $as_echo_n "checking for DBTOEPUB... " >&6; }
19098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19099 $as_echo "$DBTOEPUB" >&6; }
19104 # Check for test tools
19106 if test "$enable_tap_tests" = yes; then
19107 # Make sure we know where prove is.
19108 if test -z "$PROVE"; then
19109 for ac_prog in prove
19111 # Extract the first word of "$ac_prog", so it can be a program name with args.
19112 set dummy $ac_prog; ac_word=$2
19113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19114 $as_echo_n "checking for $ac_word... " >&6; }
19115 if ${ac_cv_path_PROVE+:} false; then :
19116 $as_echo_n "(cached) " >&6
19117 else
19118 case $PROVE in
19119 [\\/]* | ?:[\\/]*)
19120 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
19123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19124 for as_dir in $PATH
19126 IFS=$as_save_IFS
19127 test -z "$as_dir" && as_dir=.
19128 for ac_exec_ext in '' $ac_executable_extensions; do
19129 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19130 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
19131 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19132 break 2
19134 done
19135 done
19136 IFS=$as_save_IFS
19139 esac
19141 PROVE=$ac_cv_path_PROVE
19142 if test -n "$PROVE"; then
19143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19144 $as_echo "$PROVE" >&6; }
19145 else
19146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19147 $as_echo "no" >&6; }
19151 test -n "$PROVE" && break
19152 done
19154 else
19155 # Report the value of PROVE in configure's output in all cases.
19156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
19157 $as_echo_n "checking for PROVE... " >&6; }
19158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19159 $as_echo "$PROVE" >&6; }
19162 if test -z "$PROVE"; then
19163 as_fn_error $? "prove not found" "$LINENO" 5
19165 # Check for necessary Perl modules. You might think we should use
19166 # AX_PROG_PERL_MODULES here, but prove might be part of a different Perl
19167 # installation than perl, eg on MSys, so we have to check using prove.
19168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl modules required for TAP tests" >&5
19169 $as_echo_n "checking for Perl modules required for TAP tests... " >&6; }
19170 __CONFIG_HOST_OS__=$host_os; export __CONFIG_HOST_OS__
19171 modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`
19172 if test $? -eq 0; then
19173 # log the module version details, but don't show them interactively
19174 echo "$modulestderr" >&5
19175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19176 $as_echo "yes" >&6; }
19177 else
19178 # on failure, though, show the results to the user
19179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $modulestderr" >&5
19180 $as_echo "$modulestderr" >&6; }
19181 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
19185 # If compiler will take -Wl,--as-needed (or various platform-specific
19186 # spellings thereof) then add that to LDFLAGS. This is much easier than
19187 # trying to filter LIBS to the minimum for each executable.
19188 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
19189 # libreadline; therefore we postpone testing it until we know what library
19190 # dependencies readline has. The test code will try to link with $LIBS.
19191 if test "$with_readline" = yes; then
19192 link_test_func=readline
19193 else
19194 link_test_func=exit
19197 if test "$PORTNAME" = "darwin"; then
19198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS" >&5
19199 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs, for LDFLAGS... " >&6; }
19200 if ${pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs+:} false; then :
19201 $as_echo_n "(cached) " >&6
19202 else
19203 pgac_save_LDFLAGS=$LDFLAGS
19204 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19205 if test "$cross_compiling" = yes; then :
19206 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs="assuming no"
19207 else
19208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19209 /* end confdefs.h. */
19210 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19212 main ()
19216 return 0;
19218 _ACEOF
19219 if ac_fn_c_try_run "$LINENO"; then :
19220 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=yes
19221 else
19222 pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs=no
19224 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19225 conftest.$ac_objext conftest.beam conftest.$ac_ext
19228 LDFLAGS="$pgac_save_LDFLAGS"
19230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&5
19231 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" >&6; }
19232 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__dead_strip_dylibs" = x"yes"; then
19233 LDFLAGS="${LDFLAGS} -Wl,-dead_strip_dylibs"
19237 elif test "$PORTNAME" = "openbsd"; then
19238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS" >&5
19239 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic, for LDFLAGS... " >&6; }
19240 if ${pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic+:} false; then :
19241 $as_echo_n "(cached) " >&6
19242 else
19243 pgac_save_LDFLAGS=$LDFLAGS
19244 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19245 if test "$cross_compiling" = yes; then :
19246 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic="assuming no"
19247 else
19248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19249 /* end confdefs.h. */
19250 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19252 main ()
19256 return 0;
19258 _ACEOF
19259 if ac_fn_c_try_run "$LINENO"; then :
19260 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=yes
19261 else
19262 pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic=no
19264 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19265 conftest.$ac_objext conftest.beam conftest.$ac_ext
19268 LDFLAGS="$pgac_save_LDFLAGS"
19270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&5
19271 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" >&6; }
19272 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl__Bdynamic" = x"yes"; then
19273 LDFLAGS="${LDFLAGS} -Wl,-Bdynamic"
19277 else
19278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed, for LDFLAGS" >&5
19279 $as_echo_n "checking whether $CC supports -Wl,--as-needed, for LDFLAGS... " >&6; }
19280 if ${pgac_cv_prog_cc_LDFLAGS__Wl___as_needed+:} false; then :
19281 $as_echo_n "(cached) " >&6
19282 else
19283 pgac_save_LDFLAGS=$LDFLAGS
19284 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19285 if test "$cross_compiling" = yes; then :
19286 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed="assuming no"
19287 else
19288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19289 /* end confdefs.h. */
19290 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19292 main ()
19296 return 0;
19298 _ACEOF
19299 if ac_fn_c_try_run "$LINENO"; then :
19300 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=yes
19301 else
19302 pgac_cv_prog_cc_LDFLAGS__Wl___as_needed=no
19304 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19305 conftest.$ac_objext conftest.beam conftest.$ac_ext
19308 LDFLAGS="$pgac_save_LDFLAGS"
19310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&5
19311 $as_echo "$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" >&6; }
19312 if test x"$pgac_cv_prog_cc_LDFLAGS__Wl___as_needed" = x"yes"; then
19313 LDFLAGS="${LDFLAGS} -Wl,--as-needed"
19319 # For linkers that understand --export-dynamic, add that to the LDFLAGS_EX_BE
19320 # (backend specific ldflags). One some platforms this will always fail (e.g.,
19321 # windows), but on others it depends on the choice of linker (e.g., solaris).
19322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE" >&5
19323 $as_echo_n "checking whether $CC supports -Wl,--export-dynamic, for LDFLAGS_EX_BE... " >&6; }
19324 if ${pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic+:} false; then :
19325 $as_echo_n "(cached) " >&6
19326 else
19327 pgac_save_LDFLAGS=$LDFLAGS
19328 LDFLAGS="$pgac_save_LDFLAGS -Wl,--export-dynamic"
19329 if test "$cross_compiling" = yes; then :
19330 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic="assuming no"
19331 else
19332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19333 /* end confdefs.h. */
19334 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19336 main ()
19340 return 0;
19342 _ACEOF
19343 if ac_fn_c_try_run "$LINENO"; then :
19344 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=yes
19345 else
19346 pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=no
19348 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19349 conftest.$ac_objext conftest.beam conftest.$ac_ext
19352 LDFLAGS="$pgac_save_LDFLAGS"
19354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&5
19355 $as_echo "$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" >&6; }
19356 if test x"$pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic" = x"yes"; then
19357 LDFLAGS_EX_BE="${LDFLAGS_EX_BE} -Wl,--export-dynamic"
19362 # Create compiler version string
19363 if test x"$GCC" = x"yes" ; then
19364 cc_string=`${CC} --version | sed q`
19365 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19366 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19367 cc_string=`${CC} -V 2>&1 | sed q`
19368 else
19369 cc_string=$CC
19373 cat >>confdefs.h <<_ACEOF
19374 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19375 _ACEOF
19378 # Supply a numeric version string for use by 3rd party add-ons
19379 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19380 PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
19381 $AWK '{printf "%d%04d", $1, $2}'`"
19383 cat >>confdefs.h <<_ACEOF
19384 #define PG_VERSION_NUM $PG_VERSION_NUM
19385 _ACEOF
19389 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19390 # literally, so that it's possible to override it at build time using
19391 # a command like "make ... PG_SYSROOT=path". This has to be done after
19392 # we've finished all configure checks that depend on CPPFLAGS.
19393 # The same for LDFLAGS, too.
19394 if test x"$PG_SYSROOT" != x; then
19395 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19396 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19401 # Begin output steps
19403 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19404 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19405 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19406 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19407 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19408 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19409 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19410 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19411 # Currently only used when LLVM is used
19412 if test "$with_llvm" = yes ; then
19413 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19414 $as_echo "$as_me: using CXX=$CXX" >&6;}
19415 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19416 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19417 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19418 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19419 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19420 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19421 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19422 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19425 # prepare build tree if outside source tree
19426 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19427 # Note 2: /bin/pwd might be better than shell's built-in at getting
19428 # a symlink-free name.
19429 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19430 vpath_build=no
19431 else
19432 vpath_build=yes
19433 if test "$no_create" != yes; then
19434 $as_echo_n "preparing build tree... " >&6
19435 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
19436 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
19437 || as_fn_error $? "failed" "$LINENO" 5
19438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
19439 $as_echo "done" >&6; }
19445 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
19448 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}"
19451 if test "$PORTNAME" = "win32"; then
19452 ac_config_commands="$ac_config_commands check_win32_symlinks"
19456 ac_config_headers="$ac_config_headers src/include/pg_config.h"
19459 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
19462 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
19465 cat >confcache <<\_ACEOF
19466 # This file is a shell script that caches the results of configure
19467 # tests run on this system so they can be shared between configure
19468 # scripts and configure runs, see configure's option --config-cache.
19469 # It is not useful on other systems. If it contains results you don't
19470 # want to keep, you may remove or edit it.
19472 # config.status only pays attention to the cache file if you give it
19473 # the --recheck option to rerun configure.
19475 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19476 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19477 # following values.
19479 _ACEOF
19481 # The following way of writing the cache mishandles newlines in values,
19482 # but we know of no workaround that is simple, portable, and efficient.
19483 # So, we kill variables containing newlines.
19484 # Ultrix sh set writes to stderr and can't be redirected directly,
19485 # and sets the high bit in the cache file unless we assign to the vars.
19487 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19488 eval ac_val=\$$ac_var
19489 case $ac_val in #(
19490 *${as_nl}*)
19491 case $ac_var in #(
19492 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19493 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19494 esac
19495 case $ac_var in #(
19496 _ | IFS | as_nl) ;; #(
19497 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19498 *) { eval $ac_var=; unset $ac_var;} ;;
19499 esac ;;
19500 esac
19501 done
19503 (set) 2>&1 |
19504 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19505 *${as_nl}ac_space=\ *)
19506 # `set' does not quote correctly, so add quotes: double-quote
19507 # substitution turns \\\\ into \\, and sed turns \\ into \.
19508 sed -n \
19509 "s/'/'\\\\''/g;
19510 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19511 ;; #(
19513 # `set' quotes correctly as required by POSIX, so do not add quotes.
19514 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19516 esac |
19517 sort
19519 sed '
19520 /^ac_cv_env_/b end
19521 t clear
19522 :clear
19523 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19524 t end
19525 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19526 :end' >>confcache
19527 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19528 if test -w "$cache_file"; then
19529 if test "x$cache_file" != "x/dev/null"; then
19530 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19531 $as_echo "$as_me: updating cache $cache_file" >&6;}
19532 if test ! -f "$cache_file" || test -h "$cache_file"; then
19533 cat confcache >"$cache_file"
19534 else
19535 case $cache_file in #(
19536 */* | ?:*)
19537 mv -f confcache "$cache_file"$$ &&
19538 mv -f "$cache_file"$$ "$cache_file" ;; #(
19540 mv -f confcache "$cache_file" ;;
19541 esac
19544 else
19545 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19546 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19549 rm -f confcache
19551 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19552 # Let make expand exec_prefix.
19553 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19555 DEFS=-DHAVE_CONFIG_H
19557 ac_libobjs=
19558 ac_ltlibobjs=
19560 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19561 # 1. Remove the extension, and $U if already installed.
19562 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19563 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19564 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19565 # will be set to the directory where LIBOBJS objects are built.
19566 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19567 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19568 done
19569 LIBOBJS=$ac_libobjs
19571 LTLIBOBJS=$ac_ltlibobjs
19576 : "${CONFIG_STATUS=./config.status}"
19577 ac_write_fail=0
19578 ac_clean_files_save=$ac_clean_files
19579 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19580 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19581 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19582 as_write_fail=0
19583 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19584 #! $SHELL
19585 # Generated by $as_me.
19586 # Run this file to recreate the current configuration.
19587 # Compiler output produced by configure, useful for debugging
19588 # configure, is in config.log if it exists.
19590 debug=false
19591 ac_cs_recheck=false
19592 ac_cs_silent=false
19594 SHELL=\${CONFIG_SHELL-$SHELL}
19595 export SHELL
19596 _ASEOF
19597 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19598 ## -------------------- ##
19599 ## M4sh Initialization. ##
19600 ## -------------------- ##
19602 # Be more Bourne compatible
19603 DUALCASE=1; export DUALCASE # for MKS sh
19604 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19605 emulate sh
19606 NULLCMD=:
19607 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19608 # is contrary to our usage. Disable this feature.
19609 alias -g '${1+"$@"}'='"$@"'
19610 setopt NO_GLOB_SUBST
19611 else
19612 case `(set -o) 2>/dev/null` in #(
19613 *posix*) :
19614 set -o posix ;; #(
19615 *) :
19617 esac
19621 as_nl='
19623 export as_nl
19624 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19625 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19626 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19627 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19628 # Prefer a ksh shell builtin over an external printf program on Solaris,
19629 # but without wasting forks for bash or zsh.
19630 if test -z "$BASH_VERSION$ZSH_VERSION" \
19631 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19632 as_echo='print -r --'
19633 as_echo_n='print -rn --'
19634 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19635 as_echo='printf %s\n'
19636 as_echo_n='printf %s'
19637 else
19638 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19639 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19640 as_echo_n='/usr/ucb/echo -n'
19641 else
19642 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19643 as_echo_n_body='eval
19644 arg=$1;
19645 case $arg in #(
19646 *"$as_nl"*)
19647 expr "X$arg" : "X\\(.*\\)$as_nl";
19648 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19649 esac;
19650 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19652 export as_echo_n_body
19653 as_echo_n='sh -c $as_echo_n_body as_echo'
19655 export as_echo_body
19656 as_echo='sh -c $as_echo_body as_echo'
19659 # The user is always right.
19660 if test "${PATH_SEPARATOR+set}" != set; then
19661 PATH_SEPARATOR=:
19662 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19663 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19664 PATH_SEPARATOR=';'
19669 # IFS
19670 # We need space, tab and new line, in precisely that order. Quoting is
19671 # there to prevent editors from complaining about space-tab.
19672 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19673 # splitting by setting IFS to empty value.)
19674 IFS=" "" $as_nl"
19676 # Find who we are. Look in the path if we contain no directory separator.
19677 as_myself=
19678 case $0 in #((
19679 *[\\/]* ) as_myself=$0 ;;
19680 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19681 for as_dir in $PATH
19683 IFS=$as_save_IFS
19684 test -z "$as_dir" && as_dir=.
19685 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19686 done
19687 IFS=$as_save_IFS
19690 esac
19691 # We did not find ourselves, most probably we were run as `sh COMMAND'
19692 # in which case we are not to be found in the path.
19693 if test "x$as_myself" = x; then
19694 as_myself=$0
19696 if test ! -f "$as_myself"; then
19697 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19698 exit 1
19701 # Unset variables that we do not need and which cause bugs (e.g. in
19702 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19703 # suppresses any "Segmentation fault" message there. '((' could
19704 # trigger a bug in pdksh 5.2.14.
19705 for as_var in BASH_ENV ENV MAIL MAILPATH
19706 do eval test x\${$as_var+set} = xset \
19707 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19708 done
19709 PS1='$ '
19710 PS2='> '
19711 PS4='+ '
19713 # NLS nuisances.
19714 LC_ALL=C
19715 export LC_ALL
19716 LANGUAGE=C
19717 export LANGUAGE
19719 # CDPATH.
19720 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19723 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19724 # ----------------------------------------
19725 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19726 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19727 # script with STATUS, using 1 if that was 0.
19728 as_fn_error ()
19730 as_status=$1; test $as_status -eq 0 && as_status=1
19731 if test "$4"; then
19732 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19733 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19735 $as_echo "$as_me: error: $2" >&2
19736 as_fn_exit $as_status
19737 } # as_fn_error
19740 # as_fn_set_status STATUS
19741 # -----------------------
19742 # Set $? to STATUS, without forking.
19743 as_fn_set_status ()
19745 return $1
19746 } # as_fn_set_status
19748 # as_fn_exit STATUS
19749 # -----------------
19750 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19751 as_fn_exit ()
19753 set +e
19754 as_fn_set_status $1
19755 exit $1
19756 } # as_fn_exit
19758 # as_fn_unset VAR
19759 # ---------------
19760 # Portably unset VAR.
19761 as_fn_unset ()
19763 { eval $1=; unset $1;}
19765 as_unset=as_fn_unset
19766 # as_fn_append VAR VALUE
19767 # ----------------------
19768 # Append the text in VALUE to the end of the definition contained in VAR. Take
19769 # advantage of any shell optimizations that allow amortized linear growth over
19770 # repeated appends, instead of the typical quadratic growth present in naive
19771 # implementations.
19772 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19773 eval 'as_fn_append ()
19775 eval $1+=\$2
19777 else
19778 as_fn_append ()
19780 eval $1=\$$1\$2
19782 fi # as_fn_append
19784 # as_fn_arith ARG...
19785 # ------------------
19786 # Perform arithmetic evaluation on the ARGs, and store the result in the
19787 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19788 # must be portable across $(()) and expr.
19789 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19790 eval 'as_fn_arith ()
19792 as_val=$(( $* ))
19794 else
19795 as_fn_arith ()
19797 as_val=`expr "$@" || test $? -eq 1`
19799 fi # as_fn_arith
19802 if expr a : '\(a\)' >/dev/null 2>&1 &&
19803 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19804 as_expr=expr
19805 else
19806 as_expr=false
19809 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19810 as_basename=basename
19811 else
19812 as_basename=false
19815 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19816 as_dirname=dirname
19817 else
19818 as_dirname=false
19821 as_me=`$as_basename -- "$0" ||
19822 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19823 X"$0" : 'X\(//\)$' \| \
19824 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19825 $as_echo X/"$0" |
19826 sed '/^.*\/\([^/][^/]*\)\/*$/{
19827 s//\1/
19830 /^X\/\(\/\/\)$/{
19831 s//\1/
19834 /^X\/\(\/\).*/{
19835 s//\1/
19838 s/.*/./; q'`
19840 # Avoid depending upon Character Ranges.
19841 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19842 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19843 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19844 as_cr_digits='0123456789'
19845 as_cr_alnum=$as_cr_Letters$as_cr_digits
19847 ECHO_C= ECHO_N= ECHO_T=
19848 case `echo -n x` in #(((((
19849 -n*)
19850 case `echo 'xy\c'` in
19851 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19852 xy) ECHO_C='\c';;
19853 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19854 ECHO_T=' ';;
19855 esac;;
19857 ECHO_N='-n';;
19858 esac
19860 rm -f conf$$ conf$$.exe conf$$.file
19861 if test -d conf$$.dir; then
19862 rm -f conf$$.dir/conf$$.file
19863 else
19864 rm -f conf$$.dir
19865 mkdir conf$$.dir 2>/dev/null
19867 if (echo >conf$$.file) 2>/dev/null; then
19868 if ln -s conf$$.file conf$$ 2>/dev/null; then
19869 as_ln_s='ln -s'
19870 # ... but there are two gotchas:
19871 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19872 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19873 # In both cases, we have to default to `cp -pR'.
19874 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19875 as_ln_s='cp -pR'
19876 elif ln conf$$.file conf$$ 2>/dev/null; then
19877 as_ln_s=ln
19878 else
19879 as_ln_s='cp -pR'
19881 else
19882 as_ln_s='cp -pR'
19884 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19885 rmdir conf$$.dir 2>/dev/null
19888 # as_fn_mkdir_p
19889 # -------------
19890 # Create "$as_dir" as a directory, including parents if necessary.
19891 as_fn_mkdir_p ()
19894 case $as_dir in #(
19895 -*) as_dir=./$as_dir;;
19896 esac
19897 test -d "$as_dir" || eval $as_mkdir_p || {
19898 as_dirs=
19899 while :; do
19900 case $as_dir in #(
19901 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19902 *) as_qdir=$as_dir;;
19903 esac
19904 as_dirs="'$as_qdir' $as_dirs"
19905 as_dir=`$as_dirname -- "$as_dir" ||
19906 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19907 X"$as_dir" : 'X\(//\)[^/]' \| \
19908 X"$as_dir" : 'X\(//\)$' \| \
19909 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19910 $as_echo X"$as_dir" |
19911 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19912 s//\1/
19915 /^X\(\/\/\)[^/].*/{
19916 s//\1/
19919 /^X\(\/\/\)$/{
19920 s//\1/
19923 /^X\(\/\).*/{
19924 s//\1/
19927 s/.*/./; q'`
19928 test -d "$as_dir" && break
19929 done
19930 test -z "$as_dirs" || eval "mkdir $as_dirs"
19931 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19934 } # as_fn_mkdir_p
19935 if mkdir -p . 2>/dev/null; then
19936 as_mkdir_p='mkdir -p "$as_dir"'
19937 else
19938 test -d ./-p && rmdir ./-p
19939 as_mkdir_p=false
19943 # as_fn_executable_p FILE
19944 # -----------------------
19945 # Test if FILE is an executable regular file.
19946 as_fn_executable_p ()
19948 test -f "$1" && test -x "$1"
19949 } # as_fn_executable_p
19950 as_test_x='test -x'
19951 as_executable_p=as_fn_executable_p
19953 # Sed expression to map a string onto a valid CPP name.
19954 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19956 # Sed expression to map a string onto a valid variable name.
19957 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19960 exec 6>&1
19961 ## ----------------------------------- ##
19962 ## Main body of $CONFIG_STATUS script. ##
19963 ## ----------------------------------- ##
19964 _ASEOF
19965 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19967 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19968 # Save the log message, to keep $0 and so on meaningful, and to
19969 # report actual input values of CONFIG_FILES etc. instead of their
19970 # values after options handling.
19971 ac_log="
19972 This file was extended by PostgreSQL $as_me 16.5, which was
19973 generated by GNU Autoconf 2.69. Invocation command line was
19975 CONFIG_FILES = $CONFIG_FILES
19976 CONFIG_HEADERS = $CONFIG_HEADERS
19977 CONFIG_LINKS = $CONFIG_LINKS
19978 CONFIG_COMMANDS = $CONFIG_COMMANDS
19979 $ $0 $@
19981 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19984 _ACEOF
19986 case $ac_config_files in *"
19987 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19988 esac
19990 case $ac_config_headers in *"
19991 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19992 esac
19995 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19996 # Files that config.status was made for.
19997 config_files="$ac_config_files"
19998 config_headers="$ac_config_headers"
19999 config_links="$ac_config_links"
20000 config_commands="$ac_config_commands"
20002 _ACEOF
20004 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20005 ac_cs_usage="\
20006 \`$as_me' instantiates files and other configuration actions
20007 from templates according to the current configuration. Unless the files
20008 and actions are specified as TAGs, all are instantiated by default.
20010 Usage: $0 [OPTION]... [TAG]...
20012 -h, --help print this help, then exit
20013 -V, --version print version number and configuration settings, then exit
20014 --config print configuration, then exit
20015 -q, --quiet, --silent
20016 do not print progress messages
20017 -d, --debug don't remove temporary files
20018 --recheck update $as_me by reconfiguring in the same conditions
20019 --file=FILE[:TEMPLATE]
20020 instantiate the configuration file FILE
20021 --header=FILE[:TEMPLATE]
20022 instantiate the configuration header FILE
20024 Configuration files:
20025 $config_files
20027 Configuration headers:
20028 $config_headers
20030 Configuration links:
20031 $config_links
20033 Configuration commands:
20034 $config_commands
20036 Report bugs to <pgsql-bugs@lists.postgresql.org>.
20037 PostgreSQL home page: <https://www.postgresql.org/>."
20039 _ACEOF
20040 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20041 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20042 ac_cs_version="\\
20043 PostgreSQL config.status 16.5
20044 configured by $0, generated by GNU Autoconf 2.69,
20045 with options \\"\$ac_cs_config\\"
20047 Copyright (C) 2012 Free Software Foundation, Inc.
20048 This config.status script is free software; the Free Software Foundation
20049 gives unlimited permission to copy, distribute and modify it."
20051 ac_pwd='$ac_pwd'
20052 srcdir='$srcdir'
20053 INSTALL='$INSTALL'
20054 MKDIR_P='$MKDIR_P'
20055 AWK='$AWK'
20056 test -n "\$AWK" || AWK=awk
20057 _ACEOF
20059 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20060 # The default lists apply if the user does not specify any file.
20061 ac_need_defaults=:
20062 while test $# != 0
20064 case $1 in
20065 --*=?*)
20066 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20067 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20068 ac_shift=:
20070 --*=)
20071 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20072 ac_optarg=
20073 ac_shift=:
20076 ac_option=$1
20077 ac_optarg=$2
20078 ac_shift=shift
20080 esac
20082 case $ac_option in
20083 # Handling of the options.
20084 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20085 ac_cs_recheck=: ;;
20086 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20087 $as_echo "$ac_cs_version"; exit ;;
20088 --config | --confi | --conf | --con | --co | --c )
20089 $as_echo "$ac_cs_config"; exit ;;
20090 --debug | --debu | --deb | --de | --d | -d )
20091 debug=: ;;
20092 --file | --fil | --fi | --f )
20093 $ac_shift
20094 case $ac_optarg in
20095 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20096 '') as_fn_error $? "missing file argument" ;;
20097 esac
20098 as_fn_append CONFIG_FILES " '$ac_optarg'"
20099 ac_need_defaults=false;;
20100 --header | --heade | --head | --hea )
20101 $ac_shift
20102 case $ac_optarg in
20103 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20104 esac
20105 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20106 ac_need_defaults=false;;
20107 --he | --h)
20108 # Conflict between --help and --header
20109 as_fn_error $? "ambiguous option: \`$1'
20110 Try \`$0 --help' for more information.";;
20111 --help | --hel | -h )
20112 $as_echo "$ac_cs_usage"; exit ;;
20113 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20114 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20115 ac_cs_silent=: ;;
20117 # This is an error.
20118 -*) as_fn_error $? "unrecognized option: \`$1'
20119 Try \`$0 --help' for more information." ;;
20121 *) as_fn_append ac_config_targets " $1"
20122 ac_need_defaults=false ;;
20124 esac
20125 shift
20126 done
20128 ac_configure_extra_args=
20130 if $ac_cs_silent; then
20131 exec 6>/dev/null
20132 ac_configure_extra_args="$ac_configure_extra_args --silent"
20135 _ACEOF
20136 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20137 if \$ac_cs_recheck; then
20138 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20139 shift
20140 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20141 CONFIG_SHELL='$SHELL'
20142 export CONFIG_SHELL
20143 exec "\$@"
20146 _ACEOF
20147 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20148 exec 5>>config.log
20150 echo
20151 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20152 ## Running $as_me. ##
20153 _ASBOX
20154 $as_echo "$ac_log"
20155 } >&5
20157 _ACEOF
20158 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20159 _ACEOF
20161 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20163 # Handling of arguments.
20164 for ac_config_target in $ac_config_targets
20166 case $ac_config_target in
20167 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
20168 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
20169 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
20170 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
20171 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
20172 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
20173 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
20174 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
20175 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
20176 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
20177 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
20179 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20180 esac
20181 done
20184 # If the user did not use the arguments to specify the items to instantiate,
20185 # then the envvar interface is used. Set only those that are not.
20186 # We use the long form for the default assignment because of an extremely
20187 # bizarre bug on SunOS 4.1.3.
20188 if $ac_need_defaults; then
20189 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20190 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20191 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20192 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20195 # Have a temporary directory for convenience. Make it in the build tree
20196 # simply because there is no reason against having it here, and in addition,
20197 # creating and moving files from /tmp can sometimes cause problems.
20198 # Hook for its removal unless debugging.
20199 # Note that there is a small window in which the directory will not be cleaned:
20200 # after its creation but before its name has been assigned to `$tmp'.
20201 $debug ||
20203 tmp= ac_tmp=
20204 trap 'exit_status=$?
20205 : "${ac_tmp:=$tmp}"
20206 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20208 trap 'as_fn_exit 1' 1 2 13 15
20210 # Create a (secure) tmp directory for tmp files.
20213 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20214 test -d "$tmp"
20215 } ||
20217 tmp=./conf$$-$RANDOM
20218 (umask 077 && mkdir "$tmp")
20219 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20220 ac_tmp=$tmp
20222 # Set up the scripts for CONFIG_FILES section.
20223 # No need to generate them if there are no CONFIG_FILES.
20224 # This happens for instance with `./config.status config.h'.
20225 if test -n "$CONFIG_FILES"; then
20228 ac_cr=`echo X | tr X '\015'`
20229 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20230 # But we know of no other shell where ac_cr would be empty at this
20231 # point, so we can use a bashism as a fallback.
20232 if test "x$ac_cr" = x; then
20233 eval ac_cr=\$\'\\r\'
20235 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20236 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20237 ac_cs_awk_cr='\\r'
20238 else
20239 ac_cs_awk_cr=$ac_cr
20242 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20243 _ACEOF
20247 echo "cat >conf$$subs.awk <<_ACEOF" &&
20248 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20249 echo "_ACEOF"
20250 } >conf$$subs.sh ||
20251 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20252 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20253 ac_delim='%!_!# '
20254 for ac_last_try in false false false false false :; do
20255 . ./conf$$subs.sh ||
20256 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20258 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20259 if test $ac_delim_n = $ac_delim_num; then
20260 break
20261 elif $ac_last_try; then
20262 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20263 else
20264 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20266 done
20267 rm -f conf$$subs.sh
20269 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20270 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20271 _ACEOF
20272 sed -n '
20274 s/^/S["/; s/!.*/"]=/
20277 s/^[^!]*!//
20278 :repl
20279 t repl
20280 s/'"$ac_delim"'$//
20281 t delim
20284 s/\(.\{148\}\)..*/\1/
20285 t more1
20286 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20289 b repl
20290 :more1
20291 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20294 s/.\{148\}//
20295 t nl
20296 :delim
20298 s/\(.\{148\}\)..*/\1/
20299 t more2
20300 s/["\\]/\\&/g; s/^/"/; s/$/"/
20303 :more2
20304 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20307 s/.\{148\}//
20308 t delim
20309 ' <conf$$subs.awk | sed '
20310 /^[^""]/{
20312 s/\n//
20314 ' >>$CONFIG_STATUS || ac_write_fail=1
20315 rm -f conf$$subs.awk
20316 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20317 _ACAWK
20318 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20319 for (key in S) S_is_set[key] = 1
20320 FS = "\a"
20324 line = $ 0
20325 nfields = split(line, field, "@")
20326 substed = 0
20327 len = length(field[1])
20328 for (i = 2; i < nfields; i++) {
20329 key = field[i]
20330 keylen = length(key)
20331 if (S_is_set[key]) {
20332 value = S[key]
20333 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20334 len += length(value) + length(field[++i])
20335 substed = 1
20336 } else
20337 len += 1 + keylen
20340 print line
20343 _ACAWK
20344 _ACEOF
20345 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20346 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20347 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20348 else
20350 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20351 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20352 _ACEOF
20354 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20355 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20356 # trailing colons and then remove the whole line if VPATH becomes empty
20357 # (actually we leave an empty line to preserve line numbers).
20358 if test "x$srcdir" = x.; then
20359 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20361 s///
20362 s/^/:/
20363 s/[ ]*$/:/
20364 s/:\$(srcdir):/:/g
20365 s/:\${srcdir}:/:/g
20366 s/:@srcdir@:/:/g
20367 s/^:*//
20368 s/:*$//
20370 s/\(=[ ]*\).*/\1/
20372 s/\n//
20373 s/^[^=]*=[ ]*$//
20377 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20378 fi # test -n "$CONFIG_FILES"
20380 # Set up the scripts for CONFIG_HEADERS section.
20381 # No need to generate them if there are no CONFIG_HEADERS.
20382 # This happens for instance with `./config.status Makefile'.
20383 if test -n "$CONFIG_HEADERS"; then
20384 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20385 BEGIN {
20386 _ACEOF
20388 # Transform confdefs.h into an awk script `defines.awk', embedded as
20389 # here-document in config.status, that substitutes the proper values into
20390 # config.h.in to produce config.h.
20392 # Create a delimiter string that does not exist in confdefs.h, to ease
20393 # handling of long lines.
20394 ac_delim='%!_!# '
20395 for ac_last_try in false false :; do
20396 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20397 if test -z "$ac_tt"; then
20398 break
20399 elif $ac_last_try; then
20400 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20401 else
20402 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20404 done
20406 # For the awk script, D is an array of macro values keyed by name,
20407 # likewise P contains macro parameters if any. Preserve backslash
20408 # newline sequences.
20410 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20411 sed -n '
20412 s/.\{148\}/&'"$ac_delim"'/g
20413 t rset
20414 :rset
20415 s/^[ ]*#[ ]*define[ ][ ]*/ /
20416 t def
20418 :def
20419 s/\\$//
20420 t bsnl
20421 s/["\\]/\\&/g
20422 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20423 D["\1"]=" \3"/p
20424 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20426 :bsnl
20427 s/["\\]/\\&/g
20428 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20429 D["\1"]=" \3\\\\\\n"\\/p
20430 t cont
20431 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20432 t cont
20434 :cont
20436 s/.\{148\}/&'"$ac_delim"'/g
20437 t clear
20438 :clear
20439 s/\\$//
20440 t bsnlc
20441 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20443 :bsnlc
20444 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20445 b cont
20446 ' <confdefs.h | sed '
20447 s/'"$ac_delim"'/"\\\
20448 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20450 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20451 for (key in D) D_is_set[key] = 1
20452 FS = "\a"
20454 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20455 line = \$ 0
20456 split(line, arg, " ")
20457 if (arg[1] == "#") {
20458 defundef = arg[2]
20459 mac1 = arg[3]
20460 } else {
20461 defundef = substr(arg[1], 2)
20462 mac1 = arg[2]
20464 split(mac1, mac2, "(") #)
20465 macro = mac2[1]
20466 prefix = substr(line, 1, index(line, defundef) - 1)
20467 if (D_is_set[macro]) {
20468 # Preserve the white space surrounding the "#".
20469 print prefix "define", macro P[macro] D[macro]
20470 next
20471 } else {
20472 # Replace #undef with comments. This is necessary, for example,
20473 # in the case of _POSIX_SOURCE, which is predefined and required
20474 # on some systems where configure will not decide to define it.
20475 if (defundef == "undef") {
20476 print "/*", prefix defundef, macro, "*/"
20477 next
20481 { print }
20482 _ACAWK
20483 _ACEOF
20484 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20485 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20486 fi # test -n "$CONFIG_HEADERS"
20489 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20490 shift
20491 for ac_tag
20493 case $ac_tag in
20494 :[FHLC]) ac_mode=$ac_tag; continue;;
20495 esac
20496 case $ac_mode$ac_tag in
20497 :[FHL]*:*);;
20498 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20499 :[FH]-) ac_tag=-:-;;
20500 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20501 esac
20502 ac_save_IFS=$IFS
20503 IFS=:
20504 set x $ac_tag
20505 IFS=$ac_save_IFS
20506 shift
20507 ac_file=$1
20508 shift
20510 case $ac_mode in
20511 :L) ac_source=$1;;
20512 :[FH])
20513 ac_file_inputs=
20514 for ac_f
20516 case $ac_f in
20517 -) ac_f="$ac_tmp/stdin";;
20518 *) # Look for the file first in the build tree, then in the source tree
20519 # (if the path is not absolute). The absolute path cannot be DOS-style,
20520 # because $ac_f cannot contain `:'.
20521 test -f "$ac_f" ||
20522 case $ac_f in
20523 [\\/$]*) false;;
20524 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20525 esac ||
20526 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20527 esac
20528 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20529 as_fn_append ac_file_inputs " '$ac_f'"
20530 done
20532 # Let's still pretend it is `configure' which instantiates (i.e., don't
20533 # use $as_me), people would be surprised to read:
20534 # /* config.h. Generated by config.status. */
20535 configure_input='Generated from '`
20536 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20537 `' by configure.'
20538 if test x"$ac_file" != x-; then
20539 configure_input="$ac_file. $configure_input"
20540 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20541 $as_echo "$as_me: creating $ac_file" >&6;}
20543 # Neutralize special characters interpreted by sed in replacement strings.
20544 case $configure_input in #(
20545 *\&* | *\|* | *\\* )
20546 ac_sed_conf_input=`$as_echo "$configure_input" |
20547 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20548 *) ac_sed_conf_input=$configure_input;;
20549 esac
20551 case $ac_tag in
20552 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20553 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20554 esac
20556 esac
20558 ac_dir=`$as_dirname -- "$ac_file" ||
20559 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20560 X"$ac_file" : 'X\(//\)[^/]' \| \
20561 X"$ac_file" : 'X\(//\)$' \| \
20562 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20563 $as_echo X"$ac_file" |
20564 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20565 s//\1/
20568 /^X\(\/\/\)[^/].*/{
20569 s//\1/
20572 /^X\(\/\/\)$/{
20573 s//\1/
20576 /^X\(\/\).*/{
20577 s//\1/
20580 s/.*/./; q'`
20581 as_dir="$ac_dir"; as_fn_mkdir_p
20582 ac_builddir=.
20584 case "$ac_dir" in
20585 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20587 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20588 # A ".." for each directory in $ac_dir_suffix.
20589 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20590 case $ac_top_builddir_sub in
20591 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20592 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20593 esac ;;
20594 esac
20595 ac_abs_top_builddir=$ac_pwd
20596 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20597 # for backward compatibility:
20598 ac_top_builddir=$ac_top_build_prefix
20600 case $srcdir in
20601 .) # We are building in place.
20602 ac_srcdir=.
20603 ac_top_srcdir=$ac_top_builddir_sub
20604 ac_abs_top_srcdir=$ac_pwd ;;
20605 [\\/]* | ?:[\\/]* ) # Absolute name.
20606 ac_srcdir=$srcdir$ac_dir_suffix;
20607 ac_top_srcdir=$srcdir
20608 ac_abs_top_srcdir=$srcdir ;;
20609 *) # Relative name.
20610 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20611 ac_top_srcdir=$ac_top_build_prefix$srcdir
20612 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20613 esac
20614 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20617 case $ac_mode in
20620 # CONFIG_FILE
20623 case $INSTALL in
20624 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20625 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20626 esac
20627 ac_MKDIR_P=$MKDIR_P
20628 case $MKDIR_P in
20629 [\\/$]* | ?:[\\/]* ) ;;
20630 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20631 esac
20632 _ACEOF
20634 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20635 # If the template does not know about datarootdir, expand it.
20636 # FIXME: This hack should be removed a few years after 2.60.
20637 ac_datarootdir_hack=; ac_datarootdir_seen=
20638 ac_sed_dataroot='
20639 /datarootdir/ {
20643 /@datadir@/p
20644 /@docdir@/p
20645 /@infodir@/p
20646 /@localedir@/p
20647 /@mandir@/p'
20648 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20649 *datarootdir*) ac_datarootdir_seen=yes;;
20650 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20651 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20652 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20653 _ACEOF
20654 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20655 ac_datarootdir_hack='
20656 s&@datadir@&$datadir&g
20657 s&@docdir@&$docdir&g
20658 s&@infodir@&$infodir&g
20659 s&@localedir@&$localedir&g
20660 s&@mandir@&$mandir&g
20661 s&\\\${datarootdir}&$datarootdir&g' ;;
20662 esac
20663 _ACEOF
20665 # Neutralize VPATH when `$srcdir' = `.'.
20666 # Shell code in configure.ac might set extrasub.
20667 # FIXME: do we really want to maintain this feature?
20668 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20669 ac_sed_extra="$ac_vpsub
20670 $extrasub
20671 _ACEOF
20672 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20674 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20675 s|@configure_input@|$ac_sed_conf_input|;t t
20676 s&@top_builddir@&$ac_top_builddir_sub&;t t
20677 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20678 s&@srcdir@&$ac_srcdir&;t t
20679 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20680 s&@top_srcdir@&$ac_top_srcdir&;t t
20681 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20682 s&@builddir@&$ac_builddir&;t t
20683 s&@abs_builddir@&$ac_abs_builddir&;t t
20684 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20685 s&@INSTALL@&$ac_INSTALL&;t t
20686 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20687 $ac_datarootdir_hack
20689 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20690 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20692 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20693 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20694 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20695 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20696 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20697 which seems to be undefined. Please make sure it is defined" >&5
20698 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20699 which seems to be undefined. Please make sure it is defined" >&2;}
20701 rm -f "$ac_tmp/stdin"
20702 case $ac_file in
20703 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20704 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20705 esac \
20706 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20710 # CONFIG_HEADER
20712 if test x"$ac_file" != x-; then
20714 $as_echo "/* $configure_input */" \
20715 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20716 } >"$ac_tmp/config.h" \
20717 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20718 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20719 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20720 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20721 else
20722 rm -f "$ac_file"
20723 mv "$ac_tmp/config.h" "$ac_file" \
20724 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20726 else
20727 $as_echo "/* $configure_input */" \
20728 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20729 || as_fn_error $? "could not create -" "$LINENO" 5
20734 # CONFIG_LINK
20737 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20739 else
20740 # Prefer the file from the source tree if names are identical.
20741 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20742 ac_source=$srcdir/$ac_source
20745 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20746 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20748 if test ! -r "$ac_source"; then
20749 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20751 rm -f "$ac_file"
20753 # Try a relative symlink, then a hard link, then a copy.
20754 case $ac_source in
20755 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20756 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20757 esac
20758 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20759 ln "$ac_source" "$ac_file" 2>/dev/null ||
20760 cp -p "$ac_source" "$ac_file" ||
20761 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20764 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20765 $as_echo "$as_me: executing $ac_file commands" >&6;}
20767 esac
20770 case $ac_file$ac_mode in
20771 "check_win32_symlinks":C)
20772 # Links sometimes fail undetected on Mingw -
20773 # so here we detect it and warn the user
20774 for FILE in $CONFIG_LINKS
20776 # test -e works for symlinks in the MinGW console
20777 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
20778 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
20779 done
20781 "src/include/pg_config.h":H)
20782 # Update timestamp for pg_config.h (see Makefile.global)
20783 echo >src/include/stamp-h
20785 "src/include/pg_config_ext.h":H)
20786 # Update timestamp for pg_config_ext.h (see Makefile.global)
20787 echo >src/include/stamp-ext-h
20789 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
20791 esac
20792 done # for ac_tag
20795 as_fn_exit 0
20796 _ACEOF
20797 ac_clean_files=$ac_clean_files_save
20799 test $ac_write_fail = 0 ||
20800 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20803 # configure is writing to config.log, and then calls config.status.
20804 # config.status does its own redirection, appending to config.log.
20805 # Unfortunately, on DOS this fails, as config.log is still kept open
20806 # by configure, so config.status won't be able to write to it; its
20807 # output is simply discarded. So we exec the FD to /dev/null,
20808 # effectively closing config.log, so it can be properly (re)opened and
20809 # appended to by config.status. When coming back to configure, we
20810 # need to make the FD available again.
20811 if test "$no_create" != yes; then
20812 ac_cs_success=:
20813 ac_config_status_args=
20814 test "$silent" = yes &&
20815 ac_config_status_args="$ac_config_status_args --quiet"
20816 exec 5>/dev/null
20817 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20818 exec 5>>config.log
20819 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20820 # would make configure fail if this is the last instruction.
20821 $ac_cs_success || as_fn_exit 1
20823 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20825 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20829 # Ensure that any meson build directories would reconfigure and see that
20830 # there's a conflicting in-tree build and can error out.
20831 if test "$vpath_build" = "no"; then
20832 touch meson.build