relnotes: add null logical replication item
[pgsql.git] / configure
blob274e0db8c5524f9afbfad7e3e5f1b59b041cbd7e
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for PostgreSQL 15devel.
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-2022, 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='15devel'
586 PACKAGE_STRING='PostgreSQL 15devel'
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 PROVE
633 DBTOEPUB
635 XSLTPROC
636 XMLLINT
637 TCL_SHLIB_LD_LIBS
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_ARMV8_CRC32C
650 CFLAGS_SSE42
651 have_win32_dbghelp
652 LIBOBJS
653 ZSTD
655 UUID_LIBS
656 LDAP_LIBS_BE
657 LDAP_LIBS_FE
658 with_ssl
659 PTHREAD_CFLAGS
660 PTHREAD_LIBS
661 PTHREAD_CC
662 ax_pthread_config
663 EGREP
664 GREP
667 python_additional_libs
668 python_libspec
669 python_libdir
670 python_includespec
671 python_version
672 python_majorversion
673 PYTHON
674 perl_embed_ldflags
675 perl_embed_ccflags
676 perl_includespec
677 perl_useshrplib
678 perl_privlibexp
679 perl_archlibexp
680 PERL
681 FLEXFLAGS
682 FLEX
683 BISONFLAGS
684 BISON
685 MKDIR_P
686 LN_S
688 install_bin
689 INSTALL_DATA
690 INSTALL_SCRIPT
691 INSTALL_PROGRAM
692 WINDRES
693 DLLWRAP
694 DLLTOOL
696 STRIP_SHARED_LIB
697 STRIP_STATIC_LIB
698 STRIP
699 RANLIB
700 with_gnu_ld
702 LDFLAGS_SL
703 LDFLAGS_EX
704 ZSTD_LIBS
705 ZSTD_CFLAGS
706 with_zstd
707 LZ4_LIBS
708 LZ4_CFLAGS
709 with_lz4
710 with_zlib
711 with_system_tzdata
712 with_libxslt
713 XML2_LIBS
714 XML2_CFLAGS
715 XML2_CONFIG
716 with_libxml
717 with_uuid
718 with_readline
719 with_systemd
720 with_selinux
721 with_ldap
722 with_krb_srvnam
723 krb_srvtab
724 with_gssapi
725 with_python
726 with_perl
727 with_tcl
728 ICU_LIBS
729 ICU_CFLAGS
730 with_icu
731 enable_thread_safety
732 INCLUDES
733 autodepend
734 PKG_CONFIG_LIBDIR
735 PKG_CONFIG_PATH
736 PKG_CONFIG
737 DLSUFFIX
741 CFLAGS_SL
742 BITCODE_CXXFLAGS
743 BITCODE_CFLAGS
744 CFLAGS_VECTORIZE
745 CFLAGS_UNROLL_LOOPS
746 PERMIT_DECLARATION_AFTER_STATEMENT
747 LLVM_BINPATH
748 LLVM_CXXFLAGS
749 LLVM_CFLAGS
750 LLVM_CPPFLAGS
751 LLVM_LIBS
752 CLANG
753 LLVM_CONFIG
755 with_llvm
756 SUN_STUDIO_CC
757 ac_ct_CXX
758 CXXFLAGS
760 OBJEXT
761 EXEEXT
762 ac_ct_CC
763 CPPFLAGS
764 LDFLAGS
765 CFLAGS
767 enable_tap_tests
768 enable_dtrace
769 DTRACEFLAGS
770 DTRACE
771 enable_coverage
772 GENHTML
773 LCOV
774 GCOV
775 enable_debug
776 enable_rpath
777 default_port
778 WANTED_LANGUAGES
779 enable_nls
780 PORTNAME
781 host_os
782 host_vendor
783 host_cpu
784 host
785 build_os
786 build_vendor
787 build_cpu
788 build
789 PG_MAJORVERSION
790 target_alias
791 host_alias
792 build_alias
793 LIBS
794 ECHO_T
795 ECHO_N
796 ECHO_C
797 DEFS
798 mandir
799 localedir
800 libdir
801 psdir
802 pdfdir
803 dvidir
804 htmldir
805 infodir
806 docdir
807 oldincludedir
808 includedir
809 localstatedir
810 sharedstatedir
811 sysconfdir
812 datadir
813 datarootdir
814 libexecdir
815 sbindir
816 bindir
817 program_transform_name
818 prefix
819 exec_prefix
820 PACKAGE_URL
821 PACKAGE_BUGREPORT
822 PACKAGE_STRING
823 PACKAGE_VERSION
824 PACKAGE_TARNAME
825 PACKAGE_NAME
826 PATH_SEPARATOR
827 SHELL'
828 ac_subst_files=''
829 ac_user_opts='
830 enable_option_checking
831 with_extra_version
832 with_template
833 with_includes
834 with_libraries
835 with_libs
836 enable_integer_datetimes
837 enable_nls
838 with_pgport
839 enable_rpath
840 enable_spinlocks
841 enable_atomics
842 enable_debug
843 enable_profiling
844 enable_coverage
845 enable_dtrace
846 enable_tap_tests
847 with_blocksize
848 with_segsize
849 with_wal_blocksize
850 with_CC
851 with_llvm
852 enable_depend
853 enable_cassert
854 enable_thread_safety
855 with_icu
856 with_tcl
857 with_tclconfig
858 with_perl
859 with_python
860 with_gssapi
861 with_krb_srvnam
862 with_pam
863 with_bsd_auth
864 with_ldap
865 with_bonjour
866 with_selinux
867 with_systemd
868 with_readline
869 with_libedit_preferred
870 with_uuid
871 with_ossp_uuid
872 with_libxml
873 with_libxslt
874 with_system_tzdata
875 with_zlib
876 with_lz4
877 with_zstd
878 with_gnu_ld
879 with_ssl
880 with_openssl
881 enable_largefile
883 ac_precious_vars='build_alias
884 host_alias
885 target_alias
887 CFLAGS
888 LDFLAGS
889 LIBS
890 CPPFLAGS
892 CXXFLAGS
894 LLVM_CONFIG
895 CLANG
897 PKG_CONFIG
898 PKG_CONFIG_PATH
899 PKG_CONFIG_LIBDIR
900 ICU_CFLAGS
901 ICU_LIBS
902 XML2_CONFIG
903 XML2_CFLAGS
904 XML2_LIBS
905 LZ4_CFLAGS
906 LZ4_LIBS
907 ZSTD_CFLAGS
908 ZSTD_LIBS
909 LDFLAGS_EX
910 LDFLAGS_SL
911 PERL
912 PYTHON
913 MSGFMT
914 TCLSH'
917 # Initialize some variables set by options.
918 ac_init_help=
919 ac_init_version=false
920 ac_unrecognized_opts=
921 ac_unrecognized_sep=
922 # The variables have the same names as the options, with
923 # dashes changed to underlines.
924 cache_file=/dev/null
925 exec_prefix=NONE
926 no_create=
927 no_recursion=
928 prefix=NONE
929 program_prefix=NONE
930 program_suffix=NONE
931 program_transform_name=s,x,x,
932 silent=
933 site=
934 srcdir=
935 verbose=
936 x_includes=NONE
937 x_libraries=NONE
939 # Installation directory options.
940 # These are left unexpanded so users can "make install exec_prefix=/foo"
941 # and all the variables that are supposed to be based on exec_prefix
942 # by default will actually change.
943 # Use braces instead of parens because sh, perl, etc. also accept them.
944 # (The list follows the same order as the GNU Coding Standards.)
945 bindir='${exec_prefix}/bin'
946 sbindir='${exec_prefix}/sbin'
947 libexecdir='${exec_prefix}/libexec'
948 datarootdir='${prefix}/share'
949 datadir='${datarootdir}'
950 sysconfdir='${prefix}/etc'
951 sharedstatedir='${prefix}/com'
952 localstatedir='${prefix}/var'
953 includedir='${prefix}/include'
954 oldincludedir='/usr/include'
955 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
956 infodir='${datarootdir}/info'
957 htmldir='${docdir}'
958 dvidir='${docdir}'
959 pdfdir='${docdir}'
960 psdir='${docdir}'
961 libdir='${exec_prefix}/lib'
962 localedir='${datarootdir}/locale'
963 mandir='${datarootdir}/man'
965 ac_prev=
966 ac_dashdash=
967 for ac_option
969 # If the previous option needs an argument, assign it.
970 if test -n "$ac_prev"; then
971 eval $ac_prev=\$ac_option
972 ac_prev=
973 continue
976 case $ac_option in
977 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
978 *=) ac_optarg= ;;
979 *) ac_optarg=yes ;;
980 esac
982 # Accept the important Cygnus configure options, so we can diagnose typos.
984 case $ac_dashdash$ac_option in
986 ac_dashdash=yes ;;
988 -bindir | --bindir | --bindi | --bind | --bin | --bi)
989 ac_prev=bindir ;;
990 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
991 bindir=$ac_optarg ;;
993 -build | --build | --buil | --bui | --bu)
994 ac_prev=build_alias ;;
995 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
996 build_alias=$ac_optarg ;;
998 -cache-file | --cache-file | --cache-fil | --cache-fi \
999 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1000 ac_prev=cache_file ;;
1001 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1002 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1003 cache_file=$ac_optarg ;;
1005 --config-cache | -C)
1006 cache_file=config.cache ;;
1008 -datadir | --datadir | --datadi | --datad)
1009 ac_prev=datadir ;;
1010 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1011 datadir=$ac_optarg ;;
1013 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1014 | --dataroo | --dataro | --datar)
1015 ac_prev=datarootdir ;;
1016 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1017 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1018 datarootdir=$ac_optarg ;;
1020 -disable-* | --disable-*)
1021 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1022 # Reject names that are not valid shell variable names.
1023 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1024 as_fn_error $? "invalid feature name: $ac_useropt"
1025 ac_useropt_orig=$ac_useropt
1026 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1027 case $ac_user_opts in
1029 "enable_$ac_useropt"
1030 "*) ;;
1031 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1032 ac_unrecognized_sep=', ';;
1033 esac
1034 eval enable_$ac_useropt=no ;;
1036 -docdir | --docdir | --docdi | --doc | --do)
1037 ac_prev=docdir ;;
1038 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1039 docdir=$ac_optarg ;;
1041 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1042 ac_prev=dvidir ;;
1043 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1044 dvidir=$ac_optarg ;;
1046 -enable-* | --enable-*)
1047 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1048 # Reject names that are not valid shell variable names.
1049 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1050 as_fn_error $? "invalid feature name: $ac_useropt"
1051 ac_useropt_orig=$ac_useropt
1052 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1053 case $ac_user_opts in
1055 "enable_$ac_useropt"
1056 "*) ;;
1057 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1058 ac_unrecognized_sep=', ';;
1059 esac
1060 eval enable_$ac_useropt=\$ac_optarg ;;
1062 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1063 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1064 | --exec | --exe | --ex)
1065 ac_prev=exec_prefix ;;
1066 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1067 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1068 | --exec=* | --exe=* | --ex=*)
1069 exec_prefix=$ac_optarg ;;
1071 -gas | --gas | --ga | --g)
1072 # Obsolete; use --with-gas.
1073 with_gas=yes ;;
1075 -help | --help | --hel | --he | -h)
1076 ac_init_help=long ;;
1077 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1078 ac_init_help=recursive ;;
1079 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1080 ac_init_help=short ;;
1082 -host | --host | --hos | --ho)
1083 ac_prev=host_alias ;;
1084 -host=* | --host=* | --hos=* | --ho=*)
1085 host_alias=$ac_optarg ;;
1087 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1088 ac_prev=htmldir ;;
1089 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1090 | --ht=*)
1091 htmldir=$ac_optarg ;;
1093 -includedir | --includedir | --includedi | --included | --include \
1094 | --includ | --inclu | --incl | --inc)
1095 ac_prev=includedir ;;
1096 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1097 | --includ=* | --inclu=* | --incl=* | --inc=*)
1098 includedir=$ac_optarg ;;
1100 -infodir | --infodir | --infodi | --infod | --info | --inf)
1101 ac_prev=infodir ;;
1102 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1103 infodir=$ac_optarg ;;
1105 -libdir | --libdir | --libdi | --libd)
1106 ac_prev=libdir ;;
1107 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1108 libdir=$ac_optarg ;;
1110 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1111 | --libexe | --libex | --libe)
1112 ac_prev=libexecdir ;;
1113 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1114 | --libexe=* | --libex=* | --libe=*)
1115 libexecdir=$ac_optarg ;;
1117 -localedir | --localedir | --localedi | --localed | --locale)
1118 ac_prev=localedir ;;
1119 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1120 localedir=$ac_optarg ;;
1122 -localstatedir | --localstatedir | --localstatedi | --localstated \
1123 | --localstate | --localstat | --localsta | --localst | --locals)
1124 ac_prev=localstatedir ;;
1125 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1126 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1127 localstatedir=$ac_optarg ;;
1129 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1130 ac_prev=mandir ;;
1131 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1132 mandir=$ac_optarg ;;
1134 -nfp | --nfp | --nf)
1135 # Obsolete; use --without-fp.
1136 with_fp=no ;;
1138 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1139 | --no-cr | --no-c | -n)
1140 no_create=yes ;;
1142 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1143 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1144 no_recursion=yes ;;
1146 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1147 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1148 | --oldin | --oldi | --old | --ol | --o)
1149 ac_prev=oldincludedir ;;
1150 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1151 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1152 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1153 oldincludedir=$ac_optarg ;;
1155 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1156 ac_prev=prefix ;;
1157 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1158 prefix=$ac_optarg ;;
1160 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1161 | --program-pre | --program-pr | --program-p)
1162 ac_prev=program_prefix ;;
1163 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1164 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1165 program_prefix=$ac_optarg ;;
1167 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1168 | --program-suf | --program-su | --program-s)
1169 ac_prev=program_suffix ;;
1170 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1171 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1172 program_suffix=$ac_optarg ;;
1174 -program-transform-name | --program-transform-name \
1175 | --program-transform-nam | --program-transform-na \
1176 | --program-transform-n | --program-transform- \
1177 | --program-transform | --program-transfor \
1178 | --program-transfo | --program-transf \
1179 | --program-trans | --program-tran \
1180 | --progr-tra | --program-tr | --program-t)
1181 ac_prev=program_transform_name ;;
1182 -program-transform-name=* | --program-transform-name=* \
1183 | --program-transform-nam=* | --program-transform-na=* \
1184 | --program-transform-n=* | --program-transform-=* \
1185 | --program-transform=* | --program-transfor=* \
1186 | --program-transfo=* | --program-transf=* \
1187 | --program-trans=* | --program-tran=* \
1188 | --progr-tra=* | --program-tr=* | --program-t=*)
1189 program_transform_name=$ac_optarg ;;
1191 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1192 ac_prev=pdfdir ;;
1193 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1194 pdfdir=$ac_optarg ;;
1196 -psdir | --psdir | --psdi | --psd | --ps)
1197 ac_prev=psdir ;;
1198 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1199 psdir=$ac_optarg ;;
1201 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1202 | -silent | --silent | --silen | --sile | --sil)
1203 silent=yes ;;
1205 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1206 ac_prev=sbindir ;;
1207 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1208 | --sbi=* | --sb=*)
1209 sbindir=$ac_optarg ;;
1211 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1212 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1213 | --sharedst | --shareds | --shared | --share | --shar \
1214 | --sha | --sh)
1215 ac_prev=sharedstatedir ;;
1216 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1217 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1218 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1219 | --sha=* | --sh=*)
1220 sharedstatedir=$ac_optarg ;;
1222 -site | --site | --sit)
1223 ac_prev=site ;;
1224 -site=* | --site=* | --sit=*)
1225 site=$ac_optarg ;;
1227 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1228 ac_prev=srcdir ;;
1229 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1230 srcdir=$ac_optarg ;;
1232 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1233 | --syscon | --sysco | --sysc | --sys | --sy)
1234 ac_prev=sysconfdir ;;
1235 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1236 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1237 sysconfdir=$ac_optarg ;;
1239 -target | --target | --targe | --targ | --tar | --ta | --t)
1240 ac_prev=target_alias ;;
1241 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1242 target_alias=$ac_optarg ;;
1244 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1245 verbose=yes ;;
1247 -version | --version | --versio | --versi | --vers | -V)
1248 ac_init_version=: ;;
1250 -with-* | --with-*)
1251 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1252 # Reject names that are not valid shell variable names.
1253 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1254 as_fn_error $? "invalid package name: $ac_useropt"
1255 ac_useropt_orig=$ac_useropt
1256 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1257 case $ac_user_opts in
1259 "with_$ac_useropt"
1260 "*) ;;
1261 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1262 ac_unrecognized_sep=', ';;
1263 esac
1264 eval with_$ac_useropt=\$ac_optarg ;;
1266 -without-* | --without-*)
1267 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1268 # Reject names that are not valid shell variable names.
1269 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1270 as_fn_error $? "invalid package name: $ac_useropt"
1271 ac_useropt_orig=$ac_useropt
1272 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1273 case $ac_user_opts in
1275 "with_$ac_useropt"
1276 "*) ;;
1277 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1278 ac_unrecognized_sep=', ';;
1279 esac
1280 eval with_$ac_useropt=no ;;
1282 --x)
1283 # Obsolete; use --with-x.
1284 with_x=yes ;;
1286 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1287 | --x-incl | --x-inc | --x-in | --x-i)
1288 ac_prev=x_includes ;;
1289 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1290 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1291 x_includes=$ac_optarg ;;
1293 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1294 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1295 ac_prev=x_libraries ;;
1296 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1297 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1298 x_libraries=$ac_optarg ;;
1300 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1301 Try \`$0 --help' for more information"
1304 *=*)
1305 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1306 # Reject names that are not valid shell variable names.
1307 case $ac_envvar in #(
1308 '' | [0-9]* | *[!_$as_cr_alnum]* )
1309 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1310 esac
1311 eval $ac_envvar=\$ac_optarg
1312 export $ac_envvar ;;
1315 # FIXME: should be removed in autoconf 3.0.
1316 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1317 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1318 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1319 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1322 esac
1323 done
1325 if test -n "$ac_prev"; then
1326 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1327 as_fn_error $? "missing argument to $ac_option"
1330 if test -n "$ac_unrecognized_opts"; then
1331 case $enable_option_checking in
1332 no) ;;
1333 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1334 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1335 esac
1338 # Check all directory arguments for consistency.
1339 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1340 datadir sysconfdir sharedstatedir localstatedir includedir \
1341 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1342 libdir localedir mandir
1344 eval ac_val=\$$ac_var
1345 # Remove trailing slashes.
1346 case $ac_val in
1347 */ )
1348 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1349 eval $ac_var=\$ac_val;;
1350 esac
1351 # Be sure to have absolute directory names.
1352 case $ac_val in
1353 [\\/$]* | ?:[\\/]* ) continue;;
1354 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1355 esac
1356 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1357 done
1359 # There might be people who depend on the old broken behavior: `$host'
1360 # used to hold the argument of --host etc.
1361 # FIXME: To remove some day.
1362 build=$build_alias
1363 host=$host_alias
1364 target=$target_alias
1366 # FIXME: To remove some day.
1367 if test "x$host_alias" != x; then
1368 if test "x$build_alias" = x; then
1369 cross_compiling=maybe
1370 elif test "x$build_alias" != "x$host_alias"; then
1371 cross_compiling=yes
1375 ac_tool_prefix=
1376 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1378 test "$silent" = yes && exec 6>/dev/null
1381 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1382 ac_ls_di=`ls -di .` &&
1383 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1384 as_fn_error $? "working directory cannot be determined"
1385 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1386 as_fn_error $? "pwd does not report name of working directory"
1389 # Find the source files, if location was not specified.
1390 if test -z "$srcdir"; then
1391 ac_srcdir_defaulted=yes
1392 # Try the directory containing this script, then the parent directory.
1393 ac_confdir=`$as_dirname -- "$as_myself" ||
1394 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1395 X"$as_myself" : 'X\(//\)[^/]' \| \
1396 X"$as_myself" : 'X\(//\)$' \| \
1397 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1398 $as_echo X"$as_myself" |
1399 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1400 s//\1/
1403 /^X\(\/\/\)[^/].*/{
1404 s//\1/
1407 /^X\(\/\/\)$/{
1408 s//\1/
1411 /^X\(\/\).*/{
1412 s//\1/
1415 s/.*/./; q'`
1416 srcdir=$ac_confdir
1417 if test ! -r "$srcdir/$ac_unique_file"; then
1418 srcdir=..
1420 else
1421 ac_srcdir_defaulted=no
1423 if test ! -r "$srcdir/$ac_unique_file"; then
1424 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1425 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1427 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1428 ac_abs_confdir=`(
1429 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1430 pwd)`
1431 # When building in place, set srcdir=.
1432 if test "$ac_abs_confdir" = "$ac_pwd"; then
1433 srcdir=.
1435 # Remove unnecessary trailing slashes from srcdir.
1436 # Double slashes in file names in object file debugging info
1437 # mess up M-x gdb in Emacs.
1438 case $srcdir in
1439 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1440 esac
1441 for ac_var in $ac_precious_vars; do
1442 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1443 eval ac_env_${ac_var}_value=\$${ac_var}
1444 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1445 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1446 done
1449 # Report the --help message.
1451 if test "$ac_init_help" = "long"; then
1452 # Omit some internal or obsolete options to make the list less imposing.
1453 # This message is too long to be a string in the A/UX 3.1 sh.
1454 cat <<_ACEOF
1455 \`configure' configures PostgreSQL 15devel to adapt to many kinds of systems.
1457 Usage: $0 [OPTION]... [VAR=VALUE]...
1459 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1460 VAR=VALUE. See below for descriptions of some of the useful variables.
1462 Defaults for the options are specified in brackets.
1464 Configuration:
1465 -h, --help display this help and exit
1466 --help=short display options specific to this package
1467 --help=recursive display the short help of all the included packages
1468 -V, --version display version information and exit
1469 -q, --quiet, --silent do not print \`checking ...' messages
1470 --cache-file=FILE cache test results in FILE [disabled]
1471 -C, --config-cache alias for \`--cache-file=config.cache'
1472 -n, --no-create do not create output files
1473 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1475 Installation directories:
1476 --prefix=PREFIX install architecture-independent files in PREFIX
1477 [$ac_default_prefix]
1478 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1479 [PREFIX]
1481 By default, \`make install' will install all the files in
1482 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1483 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1484 for instance \`--prefix=\$HOME'.
1486 For better control, use the options below.
1488 Fine tuning of the installation directories:
1489 --bindir=DIR user executables [EPREFIX/bin]
1490 --sbindir=DIR system admin executables [EPREFIX/sbin]
1491 --libexecdir=DIR program executables [EPREFIX/libexec]
1492 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1493 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1494 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1495 --libdir=DIR object code libraries [EPREFIX/lib]
1496 --includedir=DIR C header files [PREFIX/include]
1497 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1498 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1499 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1500 --infodir=DIR info documentation [DATAROOTDIR/info]
1501 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1502 --mandir=DIR man documentation [DATAROOTDIR/man]
1503 --docdir=DIR documentation root [DATAROOTDIR/doc/postgresql]
1504 --htmldir=DIR html documentation [DOCDIR]
1505 --dvidir=DIR dvi documentation [DOCDIR]
1506 --pdfdir=DIR pdf documentation [DOCDIR]
1507 --psdir=DIR ps documentation [DOCDIR]
1508 _ACEOF
1510 cat <<\_ACEOF
1512 System types:
1513 --build=BUILD configure for building on BUILD [guessed]
1514 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1515 _ACEOF
1518 if test -n "$ac_init_help"; then
1519 case $ac_init_help in
1520 short | recursive ) echo "Configuration of PostgreSQL 15devel:";;
1521 esac
1522 cat <<\_ACEOF
1524 Optional Features:
1525 --disable-option-checking ignore unrecognized --enable/--with options
1526 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1527 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1528 --disable-integer-datetimes
1529 obsolete option, no longer supported
1530 --enable-nls[=LANGUAGES]
1531 enable Native Language Support
1532 --disable-rpath do not embed shared library search path in
1533 executables
1534 --disable-spinlocks do not use spinlocks
1535 --disable-atomics do not use atomic operations
1536 --enable-debug build with debugging symbols (-g)
1537 --enable-profiling build with profiling enabled
1538 --enable-coverage build with coverage testing instrumentation
1539 --enable-dtrace build with DTrace support
1540 --enable-tap-tests enable TAP tests (requires Perl and IPC::Run)
1541 --enable-depend turn on automatic dependency tracking
1542 --enable-cassert enable assertion checks (for debugging)
1543 --disable-thread-safety disable thread-safety in client libraries
1544 --disable-largefile omit support for large files
1546 Optional Packages:
1547 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1548 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1549 --with-extra-version=STRING
1550 append STRING to version
1551 --with-template=NAME override operating system template
1552 --with-includes=DIRS look for additional header files in DIRS
1553 --with-libraries=DIRS look for additional libraries in DIRS
1554 --with-libs=DIRS alternative spelling of --with-libraries
1555 --with-pgport=PORTNUM set default port number [5432]
1556 --with-blocksize=BLOCKSIZE
1557 set table block size in kB [8]
1558 --with-segsize=SEGSIZE set table segment size in GB [1]
1559 --with-wal-blocksize=BLOCKSIZE
1560 set WAL block size in kB [8]
1561 --with-CC=CMD set compiler (deprecated)
1562 --with-llvm build with LLVM based JIT support
1563 --with-icu build with ICU support
1564 --with-tcl build Tcl modules (PL/Tcl)
1565 --with-tclconfig=DIR tclConfig.sh is in DIR
1566 --with-perl build Perl modules (PL/Perl)
1567 --with-python build Python modules (PL/Python)
1568 --with-gssapi build with GSSAPI support
1569 --with-krb-srvnam=NAME default service principal name in Kerberos (GSSAPI)
1570 [postgres]
1571 --with-pam build with PAM support
1572 --with-bsd-auth build with BSD Authentication support
1573 --with-ldap build with LDAP support
1574 --with-bonjour build with Bonjour support
1575 --with-selinux build with SELinux support
1576 --with-systemd build with systemd support
1577 --without-readline do not use GNU Readline nor BSD Libedit for editing
1578 --with-libedit-preferred
1579 prefer BSD Libedit over GNU Readline
1580 --with-uuid=LIB build contrib/uuid-ossp using LIB (bsd,e2fs,ossp)
1581 --with-ossp-uuid obsolete spelling of --with-uuid=ossp
1582 --with-libxml build with XML support
1583 --with-libxslt use XSLT support when building contrib/xml2
1584 --with-system-tzdata=DIR
1585 use system time zone data in DIR
1586 --without-zlib do not use Zlib
1587 --with-lz4 build with LZ4 support
1588 --with-zstd build with ZSTD support
1589 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1590 --with-ssl=LIB use LIB for SSL/TLS support (openssl)
1591 --with-openssl obsolete spelling of --with-ssl=openssl
1593 Some influential environment variables:
1594 CC C compiler command
1595 CFLAGS C compiler flags
1596 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1597 nonstandard directory <lib dir>
1598 LIBS libraries to pass to the linker, e.g. -l<library>
1599 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1600 you have headers in a nonstandard directory <include dir>
1601 CXX C++ compiler command
1602 CXXFLAGS C++ compiler flags
1603 LLVM_CONFIG path to llvm-config command
1604 CLANG path to clang compiler to generate bitcode
1605 CPP C preprocessor
1606 PKG_CONFIG path to pkg-config utility
1607 PKG_CONFIG_PATH
1608 directories to add to pkg-config's search path
1609 PKG_CONFIG_LIBDIR
1610 path overriding pkg-config's built-in search path
1611 ICU_CFLAGS C compiler flags for ICU, overriding pkg-config
1612 ICU_LIBS linker flags for ICU, overriding pkg-config
1613 XML2_CONFIG path to xml2-config utility
1614 XML2_CFLAGS C compiler flags for XML2, overriding pkg-config
1615 XML2_LIBS linker flags for XML2, overriding pkg-config
1616 LZ4_CFLAGS C compiler flags for LZ4, overriding pkg-config
1617 LZ4_LIBS linker flags for LZ4, overriding pkg-config
1618 ZSTD_CFLAGS C compiler flags for ZSTD, overriding pkg-config
1619 ZSTD_LIBS linker flags for ZSTD, overriding pkg-config
1620 LDFLAGS_EX extra linker flags for linking executables only
1621 LDFLAGS_SL extra linker flags for linking shared libraries only
1622 PERL Perl program
1623 PYTHON Python program
1624 MSGFMT msgfmt program for NLS
1625 TCLSH Tcl interpreter program (tclsh)
1627 Use these variables to override the choices made by `configure' or to help
1628 it to find libraries and programs with nonstandard names/locations.
1630 Report bugs to <pgsql-bugs@lists.postgresql.org>.
1631 PostgreSQL home page: <https://www.postgresql.org/>.
1632 _ACEOF
1633 ac_status=$?
1636 if test "$ac_init_help" = "recursive"; then
1637 # If there are subdirs, report their specific --help.
1638 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1639 test -d "$ac_dir" ||
1640 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1641 continue
1642 ac_builddir=.
1644 case "$ac_dir" in
1645 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1647 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1648 # A ".." for each directory in $ac_dir_suffix.
1649 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1650 case $ac_top_builddir_sub in
1651 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1652 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1653 esac ;;
1654 esac
1655 ac_abs_top_builddir=$ac_pwd
1656 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1657 # for backward compatibility:
1658 ac_top_builddir=$ac_top_build_prefix
1660 case $srcdir in
1661 .) # We are building in place.
1662 ac_srcdir=.
1663 ac_top_srcdir=$ac_top_builddir_sub
1664 ac_abs_top_srcdir=$ac_pwd ;;
1665 [\\/]* | ?:[\\/]* ) # Absolute name.
1666 ac_srcdir=$srcdir$ac_dir_suffix;
1667 ac_top_srcdir=$srcdir
1668 ac_abs_top_srcdir=$srcdir ;;
1669 *) # Relative name.
1670 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1671 ac_top_srcdir=$ac_top_build_prefix$srcdir
1672 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1673 esac
1674 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1676 cd "$ac_dir" || { ac_status=$?; continue; }
1677 # Check for guested configure.
1678 if test -f "$ac_srcdir/configure.gnu"; then
1679 echo &&
1680 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1681 elif test -f "$ac_srcdir/configure"; then
1682 echo &&
1683 $SHELL "$ac_srcdir/configure" --help=recursive
1684 else
1685 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1686 fi || ac_status=$?
1687 cd "$ac_pwd" || { ac_status=$?; break; }
1688 done
1691 test -n "$ac_init_help" && exit $ac_status
1692 if $ac_init_version; then
1693 cat <<\_ACEOF
1694 PostgreSQL configure 15devel
1695 generated by GNU Autoconf 2.69
1697 Copyright (C) 2012 Free Software Foundation, Inc.
1698 This configure script is free software; the Free Software Foundation
1699 gives unlimited permission to copy, distribute and modify it.
1701 Copyright (c) 1996-2022, PostgreSQL Global Development Group
1702 _ACEOF
1703 exit
1706 ## ------------------------ ##
1707 ## Autoconf initialization. ##
1708 ## ------------------------ ##
1710 # ac_fn_c_try_compile LINENO
1711 # --------------------------
1712 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1713 ac_fn_c_try_compile ()
1715 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1716 rm -f conftest.$ac_objext
1717 if { { ac_try="$ac_compile"
1718 case "(($ac_try" in
1719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1720 *) ac_try_echo=$ac_try;;
1721 esac
1722 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1723 $as_echo "$ac_try_echo"; } >&5
1724 (eval "$ac_compile") 2>conftest.err
1725 ac_status=$?
1726 if test -s conftest.err; then
1727 grep -v '^ *+' conftest.err >conftest.er1
1728 cat conftest.er1 >&5
1729 mv -f conftest.er1 conftest.err
1731 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1732 test $ac_status = 0; } && {
1733 test -z "$ac_c_werror_flag" ||
1734 test ! -s conftest.err
1735 } && test -s conftest.$ac_objext; then :
1736 ac_retval=0
1737 else
1738 $as_echo "$as_me: failed program was:" >&5
1739 sed 's/^/| /' conftest.$ac_ext >&5
1741 ac_retval=1
1743 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1744 as_fn_set_status $ac_retval
1746 } # ac_fn_c_try_compile
1748 # ac_fn_cxx_try_compile LINENO
1749 # ----------------------------
1750 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1751 ac_fn_cxx_try_compile ()
1753 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1754 rm -f conftest.$ac_objext
1755 if { { ac_try="$ac_compile"
1756 case "(($ac_try" in
1757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1758 *) ac_try_echo=$ac_try;;
1759 esac
1760 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1761 $as_echo "$ac_try_echo"; } >&5
1762 (eval "$ac_compile") 2>conftest.err
1763 ac_status=$?
1764 if test -s conftest.err; then
1765 grep -v '^ *+' conftest.err >conftest.er1
1766 cat conftest.er1 >&5
1767 mv -f conftest.er1 conftest.err
1769 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1770 test $ac_status = 0; } && {
1771 test -z "$ac_cxx_werror_flag" ||
1772 test ! -s conftest.err
1773 } && test -s conftest.$ac_objext; then :
1774 ac_retval=0
1775 else
1776 $as_echo "$as_me: failed program was:" >&5
1777 sed 's/^/| /' conftest.$ac_ext >&5
1779 ac_retval=1
1781 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1782 as_fn_set_status $ac_retval
1784 } # ac_fn_cxx_try_compile
1786 # ac_fn_c_try_link LINENO
1787 # -----------------------
1788 # Try to link conftest.$ac_ext, and return whether this succeeded.
1789 ac_fn_c_try_link ()
1791 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1792 rm -f conftest.$ac_objext conftest$ac_exeext
1793 if { { ac_try="$ac_link"
1794 case "(($ac_try" in
1795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1796 *) ac_try_echo=$ac_try;;
1797 esac
1798 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1799 $as_echo "$ac_try_echo"; } >&5
1800 (eval "$ac_link") 2>conftest.err
1801 ac_status=$?
1802 if test -s conftest.err; then
1803 grep -v '^ *+' conftest.err >conftest.er1
1804 cat conftest.er1 >&5
1805 mv -f conftest.er1 conftest.err
1807 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1808 test $ac_status = 0; } && {
1809 test -z "$ac_c_werror_flag" ||
1810 test ! -s conftest.err
1811 } && test -s conftest$ac_exeext && {
1812 test "$cross_compiling" = yes ||
1813 test -x conftest$ac_exeext
1814 }; then :
1815 ac_retval=0
1816 else
1817 $as_echo "$as_me: failed program was:" >&5
1818 sed 's/^/| /' conftest.$ac_ext >&5
1820 ac_retval=1
1822 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1823 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1824 # interfere with the next link command; also delete a directory that is
1825 # left behind by Apple's compiler. We do this before executing the actions.
1826 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1827 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1828 as_fn_set_status $ac_retval
1830 } # ac_fn_c_try_link
1832 # ac_fn_c_try_cpp LINENO
1833 # ----------------------
1834 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1835 ac_fn_c_try_cpp ()
1837 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1838 if { { ac_try="$ac_cpp conftest.$ac_ext"
1839 case "(($ac_try" in
1840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1841 *) ac_try_echo=$ac_try;;
1842 esac
1843 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1844 $as_echo "$ac_try_echo"; } >&5
1845 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1846 ac_status=$?
1847 if test -s conftest.err; then
1848 grep -v '^ *+' conftest.err >conftest.er1
1849 cat conftest.er1 >&5
1850 mv -f conftest.er1 conftest.err
1852 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1853 test $ac_status = 0; } > conftest.i && {
1854 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1855 test ! -s conftest.err
1856 }; then :
1857 ac_retval=0
1858 else
1859 $as_echo "$as_me: failed program was:" >&5
1860 sed 's/^/| /' conftest.$ac_ext >&5
1862 ac_retval=1
1864 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1865 as_fn_set_status $ac_retval
1867 } # ac_fn_c_try_cpp
1869 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1870 # -------------------------------------------------------
1871 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1872 # the include files in INCLUDES and setting the cache variable VAR
1873 # accordingly.
1874 ac_fn_c_check_header_mongrel ()
1876 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1877 if eval \${$3+:} false; then :
1878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1879 $as_echo_n "checking for $2... " >&6; }
1880 if eval \${$3+:} false; then :
1881 $as_echo_n "(cached) " >&6
1883 eval ac_res=\$$3
1884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1885 $as_echo "$ac_res" >&6; }
1886 else
1887 # Is the header compilable?
1888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1889 $as_echo_n "checking $2 usability... " >&6; }
1890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1891 /* end confdefs.h. */
1893 #include <$2>
1894 _ACEOF
1895 if ac_fn_c_try_compile "$LINENO"; then :
1896 ac_header_compiler=yes
1897 else
1898 ac_header_compiler=no
1900 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1902 $as_echo "$ac_header_compiler" >&6; }
1904 # Is the header present?
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1906 $as_echo_n "checking $2 presence... " >&6; }
1907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1908 /* end confdefs.h. */
1909 #include <$2>
1910 _ACEOF
1911 if ac_fn_c_try_cpp "$LINENO"; then :
1912 ac_header_preproc=yes
1913 else
1914 ac_header_preproc=no
1916 rm -f conftest.err conftest.i conftest.$ac_ext
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1918 $as_echo "$ac_header_preproc" >&6; }
1920 # So? What about this header?
1921 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1922 yes:no: )
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1924 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1926 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1928 no:yes:* )
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1930 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1932 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1934 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1936 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1938 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1939 ( $as_echo "## ---------------------------------------------- ##
1940 ## Report this to pgsql-bugs@lists.postgresql.org ##
1941 ## ---------------------------------------------- ##"
1942 ) | sed "s/^/$as_me: WARNING: /" >&2
1944 esac
1945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1946 $as_echo_n "checking for $2... " >&6; }
1947 if eval \${$3+:} false; then :
1948 $as_echo_n "(cached) " >&6
1949 else
1950 eval "$3=\$ac_header_compiler"
1952 eval ac_res=\$$3
1953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1954 $as_echo "$ac_res" >&6; }
1956 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1958 } # ac_fn_c_check_header_mongrel
1960 # ac_fn_c_try_run LINENO
1961 # ----------------------
1962 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1963 # that executables *can* be run.
1964 ac_fn_c_try_run ()
1966 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1967 if { { ac_try="$ac_link"
1968 case "(($ac_try" in
1969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1970 *) ac_try_echo=$ac_try;;
1971 esac
1972 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1973 $as_echo "$ac_try_echo"; } >&5
1974 (eval "$ac_link") 2>&5
1975 ac_status=$?
1976 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1977 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1978 { { case "(($ac_try" in
1979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1980 *) ac_try_echo=$ac_try;;
1981 esac
1982 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1983 $as_echo "$ac_try_echo"; } >&5
1984 (eval "$ac_try") 2>&5
1985 ac_status=$?
1986 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1987 test $ac_status = 0; }; }; then :
1988 ac_retval=0
1989 else
1990 $as_echo "$as_me: program exited with status $ac_status" >&5
1991 $as_echo "$as_me: failed program was:" >&5
1992 sed 's/^/| /' conftest.$ac_ext >&5
1994 ac_retval=$ac_status
1996 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1997 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1998 as_fn_set_status $ac_retval
2000 } # ac_fn_c_try_run
2002 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2003 # -------------------------------------------------------
2004 # Tests whether HEADER exists and can be compiled using the include files in
2005 # INCLUDES, setting the cache variable VAR accordingly.
2006 ac_fn_c_check_header_compile ()
2008 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2010 $as_echo_n "checking for $2... " >&6; }
2011 if eval \${$3+:} false; then :
2012 $as_echo_n "(cached) " >&6
2013 else
2014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2015 /* end confdefs.h. */
2017 #include <$2>
2018 _ACEOF
2019 if ac_fn_c_try_compile "$LINENO"; then :
2020 eval "$3=yes"
2021 else
2022 eval "$3=no"
2024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2026 eval ac_res=\$$3
2027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2028 $as_echo "$ac_res" >&6; }
2029 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2031 } # ac_fn_c_check_header_compile
2033 # ac_fn_c_check_func LINENO FUNC VAR
2034 # ----------------------------------
2035 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2036 ac_fn_c_check_func ()
2038 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2040 $as_echo_n "checking for $2... " >&6; }
2041 if eval \${$3+:} false; then :
2042 $as_echo_n "(cached) " >&6
2043 else
2044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2045 /* end confdefs.h. */
2046 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2047 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2048 #define $2 innocuous_$2
2050 /* System header to define __stub macros and hopefully few prototypes,
2051 which can conflict with char $2 (); below.
2052 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2053 <limits.h> exists even on freestanding compilers. */
2055 #ifdef __STDC__
2056 # include <limits.h>
2057 #else
2058 # include <assert.h>
2059 #endif
2061 #undef $2
2063 /* Override any GCC internal prototype to avoid an error.
2064 Use char because int might match the return type of a GCC
2065 builtin and then its argument prototype would still apply. */
2066 #ifdef __cplusplus
2067 extern "C"
2068 #endif
2069 char $2 ();
2070 /* The GNU C library defines this for functions which it implements
2071 to always fail with ENOSYS. Some functions are actually named
2072 something starting with __ and the normal name is an alias. */
2073 #if defined __stub_$2 || defined __stub___$2
2074 choke me
2075 #endif
2078 main ()
2080 return $2 ();
2082 return 0;
2084 _ACEOF
2085 if ac_fn_c_try_link "$LINENO"; then :
2086 eval "$3=yes"
2087 else
2088 eval "$3=no"
2090 rm -f core conftest.err conftest.$ac_objext \
2091 conftest$ac_exeext conftest.$ac_ext
2093 eval ac_res=\$$3
2094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2095 $as_echo "$ac_res" >&6; }
2096 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2098 } # ac_fn_c_check_func
2100 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2101 # -------------------------------------------
2102 # Tests whether TYPE exists after having included INCLUDES, setting cache
2103 # variable VAR accordingly.
2104 ac_fn_c_check_type ()
2106 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2108 $as_echo_n "checking for $2... " >&6; }
2109 if eval \${$3+:} false; then :
2110 $as_echo_n "(cached) " >&6
2111 else
2112 eval "$3=no"
2113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2114 /* end confdefs.h. */
2117 main ()
2119 if (sizeof ($2))
2120 return 0;
2122 return 0;
2124 _ACEOF
2125 if ac_fn_c_try_compile "$LINENO"; then :
2126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2127 /* end confdefs.h. */
2130 main ()
2132 if (sizeof (($2)))
2133 return 0;
2135 return 0;
2137 _ACEOF
2138 if ac_fn_c_try_compile "$LINENO"; then :
2140 else
2141 eval "$3=yes"
2143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2147 eval ac_res=\$$3
2148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2149 $as_echo "$ac_res" >&6; }
2150 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2152 } # ac_fn_c_check_type
2154 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2155 # ----------------------------------------------------
2156 # Tries to find if the field MEMBER exists in type AGGR, after including
2157 # INCLUDES, setting cache variable VAR accordingly.
2158 ac_fn_c_check_member ()
2160 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2162 $as_echo_n "checking for $2.$3... " >&6; }
2163 if eval \${$4+:} false; then :
2164 $as_echo_n "(cached) " >&6
2165 else
2166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167 /* end confdefs.h. */
2170 main ()
2172 static $2 ac_aggr;
2173 if (ac_aggr.$3)
2174 return 0;
2176 return 0;
2178 _ACEOF
2179 if ac_fn_c_try_compile "$LINENO"; then :
2180 eval "$4=yes"
2181 else
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183 /* end confdefs.h. */
2186 main ()
2188 static $2 ac_aggr;
2189 if (sizeof ac_aggr.$3)
2190 return 0;
2192 return 0;
2194 _ACEOF
2195 if ac_fn_c_try_compile "$LINENO"; then :
2196 eval "$4=yes"
2197 else
2198 eval "$4=no"
2200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2202 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2204 eval ac_res=\$$4
2205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2206 $as_echo "$ac_res" >&6; }
2207 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2209 } # ac_fn_c_check_member
2211 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2212 # --------------------------------------------
2213 # Tries to find the compile-time value of EXPR in a program that includes
2214 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2215 # computed
2216 ac_fn_c_compute_int ()
2218 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2219 if test "$cross_compiling" = yes; then
2220 # Depending upon the size, compute the lo and hi bounds.
2221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2222 /* end confdefs.h. */
2225 main ()
2227 static int test_array [1 - 2 * !(($2) >= 0)];
2228 test_array [0] = 0;
2229 return test_array [0];
2232 return 0;
2234 _ACEOF
2235 if ac_fn_c_try_compile "$LINENO"; then :
2236 ac_lo=0 ac_mid=0
2237 while :; do
2238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2239 /* end confdefs.h. */
2242 main ()
2244 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2245 test_array [0] = 0;
2246 return test_array [0];
2249 return 0;
2251 _ACEOF
2252 if ac_fn_c_try_compile "$LINENO"; then :
2253 ac_hi=$ac_mid; break
2254 else
2255 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2256 if test $ac_lo -le $ac_mid; then
2257 ac_lo= ac_hi=
2258 break
2260 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2263 done
2264 else
2265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2266 /* end confdefs.h. */
2269 main ()
2271 static int test_array [1 - 2 * !(($2) < 0)];
2272 test_array [0] = 0;
2273 return test_array [0];
2276 return 0;
2278 _ACEOF
2279 if ac_fn_c_try_compile "$LINENO"; then :
2280 ac_hi=-1 ac_mid=-1
2281 while :; do
2282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2283 /* end confdefs.h. */
2286 main ()
2288 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2289 test_array [0] = 0;
2290 return test_array [0];
2293 return 0;
2295 _ACEOF
2296 if ac_fn_c_try_compile "$LINENO"; then :
2297 ac_lo=$ac_mid; break
2298 else
2299 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2300 if test $ac_mid -le $ac_hi; then
2301 ac_lo= ac_hi=
2302 break
2304 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2306 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2307 done
2308 else
2309 ac_lo= ac_hi=
2311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2314 # Binary search between lo and hi bounds.
2315 while test "x$ac_lo" != "x$ac_hi"; do
2316 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2318 /* end confdefs.h. */
2321 main ()
2323 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2324 test_array [0] = 0;
2325 return test_array [0];
2328 return 0;
2330 _ACEOF
2331 if ac_fn_c_try_compile "$LINENO"; then :
2332 ac_hi=$ac_mid
2333 else
2334 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2336 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2337 done
2338 case $ac_lo in #((
2339 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2340 '') ac_retval=1 ;;
2341 esac
2342 else
2343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2344 /* end confdefs.h. */
2346 static long int longval () { return $2; }
2347 static unsigned long int ulongval () { return $2; }
2348 #include <stdio.h>
2349 #include <stdlib.h>
2351 main ()
2354 FILE *f = fopen ("conftest.val", "w");
2355 if (! f)
2356 return 1;
2357 if (($2) < 0)
2359 long int i = longval ();
2360 if (i != ($2))
2361 return 1;
2362 fprintf (f, "%ld", i);
2364 else
2366 unsigned long int i = ulongval ();
2367 if (i != ($2))
2368 return 1;
2369 fprintf (f, "%lu", i);
2371 /* Do not output a trailing newline, as this causes \r\n confusion
2372 on some platforms. */
2373 return ferror (f) || fclose (f) != 0;
2376 return 0;
2378 _ACEOF
2379 if ac_fn_c_try_run "$LINENO"; then :
2380 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2381 else
2382 ac_retval=1
2384 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2385 conftest.$ac_objext conftest.beam conftest.$ac_ext
2386 rm -f conftest.val
2389 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2390 as_fn_set_status $ac_retval
2392 } # ac_fn_c_compute_int
2394 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2395 # ---------------------------------------------
2396 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2397 # accordingly.
2398 ac_fn_c_check_decl ()
2400 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2401 # Initialize each $ac_[]_AC_LANG_ABBREV[]_decl_warn_flag once.
2402 as_decl_name=`echo $2|sed 's/ *(.*//'`
2403 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2405 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2406 if eval \${$3+:} false; then :
2407 $as_echo_n "(cached) " >&6
2408 else
2409 ac_save_werror_flag=$ac_c_werror_flag
2410 ac_c_werror_flag="$ac_c_decl_warn_flag$ac_c_werror_flag"
2411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2412 /* end confdefs.h. */
2415 main ()
2417 #ifndef $as_decl_name
2418 #ifdef __cplusplus
2419 (void) $as_decl_use;
2420 #else
2421 (void) $as_decl_name;
2422 #endif
2423 #endif
2426 return 0;
2428 _ACEOF
2429 if ac_fn_c_try_compile "$LINENO"; then :
2430 eval "$3=yes"
2431 else
2432 eval "$3=no"
2434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2435 ac_c_werror_flag=$ac_save_werror_flag
2437 eval ac_res=\$$3
2438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2439 $as_echo "$ac_res" >&6; }
2440 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2442 } # ac_fn_c_check_decl
2443 cat >config.log <<_ACEOF
2444 This file contains any messages produced by compilers while
2445 running configure, to aid debugging if configure makes a mistake.
2447 It was created by PostgreSQL $as_me 15devel, which was
2448 generated by GNU Autoconf 2.69. Invocation command line was
2450 $ $0 $@
2452 _ACEOF
2453 exec 5>>config.log
2455 cat <<_ASUNAME
2456 ## --------- ##
2457 ## Platform. ##
2458 ## --------- ##
2460 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2461 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2462 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2463 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2464 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2466 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2467 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2469 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2470 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2471 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2472 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2473 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2474 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2475 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2477 _ASUNAME
2479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2480 for as_dir in $PATH
2482 IFS=$as_save_IFS
2483 test -z "$as_dir" && as_dir=.
2484 $as_echo "PATH: $as_dir"
2485 done
2486 IFS=$as_save_IFS
2488 } >&5
2490 cat >&5 <<_ACEOF
2493 ## ----------- ##
2494 ## Core tests. ##
2495 ## ----------- ##
2497 _ACEOF
2500 # Keep a trace of the command line.
2501 # Strip out --no-create and --no-recursion so they do not pile up.
2502 # Strip out --silent because we don't want to record it for future runs.
2503 # Also quote any args containing shell meta-characters.
2504 # Make two passes to allow for proper duplicate-argument suppression.
2505 ac_configure_args=
2506 ac_configure_args0=
2507 ac_configure_args1=
2508 ac_must_keep_next=false
2509 for ac_pass in 1 2
2511 for ac_arg
2513 case $ac_arg in
2514 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2515 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2516 | -silent | --silent | --silen | --sile | --sil)
2517 continue ;;
2518 *\'*)
2519 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2520 esac
2521 case $ac_pass in
2522 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2524 as_fn_append ac_configure_args1 " '$ac_arg'"
2525 if test $ac_must_keep_next = true; then
2526 ac_must_keep_next=false # Got value, back to normal.
2527 else
2528 case $ac_arg in
2529 *=* | --config-cache | -C | -disable-* | --disable-* \
2530 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2531 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2532 | -with-* | --with-* | -without-* | --without-* | --x)
2533 case "$ac_configure_args0 " in
2534 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2535 esac
2537 -* ) ac_must_keep_next=true ;;
2538 esac
2540 as_fn_append ac_configure_args " '$ac_arg'"
2542 esac
2543 done
2544 done
2545 { ac_configure_args0=; unset ac_configure_args0;}
2546 { ac_configure_args1=; unset ac_configure_args1;}
2548 # When interrupted or exit'd, cleanup temporary files, and complete
2549 # config.log. We remove comments because anyway the quotes in there
2550 # would cause problems or look ugly.
2551 # WARNING: Use '\'' to represent an apostrophe within the trap.
2552 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2553 trap 'exit_status=$?
2554 # Save into config.log some information that might help in debugging.
2556 echo
2558 $as_echo "## ---------------- ##
2559 ## Cache variables. ##
2560 ## ---------------- ##"
2561 echo
2562 # The following way of writing the cache mishandles newlines in values,
2564 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2565 eval ac_val=\$$ac_var
2566 case $ac_val in #(
2567 *${as_nl}*)
2568 case $ac_var in #(
2569 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2570 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2571 esac
2572 case $ac_var in #(
2573 _ | IFS | as_nl) ;; #(
2574 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2575 *) { eval $ac_var=; unset $ac_var;} ;;
2576 esac ;;
2577 esac
2578 done
2579 (set) 2>&1 |
2580 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2581 *${as_nl}ac_space=\ *)
2582 sed -n \
2583 "s/'\''/'\''\\\\'\'''\''/g;
2584 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2585 ;; #(
2587 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2589 esac |
2590 sort
2592 echo
2594 $as_echo "## ----------------- ##
2595 ## Output variables. ##
2596 ## ----------------- ##"
2597 echo
2598 for ac_var in $ac_subst_vars
2600 eval ac_val=\$$ac_var
2601 case $ac_val in
2602 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2603 esac
2604 $as_echo "$ac_var='\''$ac_val'\''"
2605 done | sort
2606 echo
2608 if test -n "$ac_subst_files"; then
2609 $as_echo "## ------------------- ##
2610 ## File substitutions. ##
2611 ## ------------------- ##"
2612 echo
2613 for ac_var in $ac_subst_files
2615 eval ac_val=\$$ac_var
2616 case $ac_val in
2617 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2618 esac
2619 $as_echo "$ac_var='\''$ac_val'\''"
2620 done | sort
2621 echo
2624 if test -s confdefs.h; then
2625 $as_echo "## ----------- ##
2626 ## confdefs.h. ##
2627 ## ----------- ##"
2628 echo
2629 cat confdefs.h
2630 echo
2632 test "$ac_signal" != 0 &&
2633 $as_echo "$as_me: caught signal $ac_signal"
2634 $as_echo "$as_me: exit $exit_status"
2635 } >&5
2636 rm -f core *.core core.conftest.* &&
2637 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2638 exit $exit_status
2640 for ac_signal in 1 2 13 15; do
2641 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2642 done
2643 ac_signal=0
2645 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2646 rm -f -r conftest* confdefs.h
2648 $as_echo "/* confdefs.h */" > confdefs.h
2650 # Predefined preprocessor variables.
2652 cat >>confdefs.h <<_ACEOF
2653 #define PACKAGE_NAME "$PACKAGE_NAME"
2654 _ACEOF
2656 cat >>confdefs.h <<_ACEOF
2657 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2658 _ACEOF
2660 cat >>confdefs.h <<_ACEOF
2661 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2662 _ACEOF
2664 cat >>confdefs.h <<_ACEOF
2665 #define PACKAGE_STRING "$PACKAGE_STRING"
2666 _ACEOF
2668 cat >>confdefs.h <<_ACEOF
2669 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2670 _ACEOF
2672 cat >>confdefs.h <<_ACEOF
2673 #define PACKAGE_URL "$PACKAGE_URL"
2674 _ACEOF
2677 # Let the site file select an alternate cache file if it wants to.
2678 # Prefer an explicitly selected file to automatically selected ones.
2679 ac_site_file1=NONE
2680 ac_site_file2=NONE
2681 if test -n "$CONFIG_SITE"; then
2682 # We do not want a PATH search for config.site.
2683 case $CONFIG_SITE in #((
2684 -*) ac_site_file1=./$CONFIG_SITE;;
2685 */*) ac_site_file1=$CONFIG_SITE;;
2686 *) ac_site_file1=./$CONFIG_SITE;;
2687 esac
2688 elif test "x$prefix" != xNONE; then
2689 ac_site_file1=$prefix/share/config.site
2690 ac_site_file2=$prefix/etc/config.site
2691 else
2692 ac_site_file1=$ac_default_prefix/share/config.site
2693 ac_site_file2=$ac_default_prefix/etc/config.site
2695 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2697 test "x$ac_site_file" = xNONE && continue
2698 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2699 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2700 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2701 sed 's/^/| /' "$ac_site_file" >&5
2702 . "$ac_site_file" \
2703 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2704 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2705 as_fn_error $? "failed to load site script $ac_site_file
2706 See \`config.log' for more details" "$LINENO" 5; }
2708 done
2710 if test -r "$cache_file"; then
2711 # Some versions of bash will fail to source /dev/null (special files
2712 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2713 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2714 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2715 $as_echo "$as_me: loading cache $cache_file" >&6;}
2716 case $cache_file in
2717 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2718 *) . "./$cache_file";;
2719 esac
2721 else
2722 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2723 $as_echo "$as_me: creating cache $cache_file" >&6;}
2724 >$cache_file
2727 # Check that the precious variables saved in the cache have kept the same
2728 # value.
2729 ac_cache_corrupted=false
2730 for ac_var in $ac_precious_vars; do
2731 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2732 eval ac_new_set=\$ac_env_${ac_var}_set
2733 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2734 eval ac_new_val=\$ac_env_${ac_var}_value
2735 case $ac_old_set,$ac_new_set in
2736 set,)
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2738 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2739 ac_cache_corrupted=: ;;
2740 ,set)
2741 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2742 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2743 ac_cache_corrupted=: ;;
2744 ,);;
2746 if test "x$ac_old_val" != "x$ac_new_val"; then
2747 # differences in whitespace do not lead to failure.
2748 ac_old_val_w=`echo x $ac_old_val`
2749 ac_new_val_w=`echo x $ac_new_val`
2750 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2751 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2752 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2753 ac_cache_corrupted=:
2754 else
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2756 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2757 eval $ac_var=\$ac_old_val
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2760 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2761 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2762 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2763 fi;;
2764 esac
2765 # Pass precious variables to config.status.
2766 if test "$ac_new_set" = set; then
2767 case $ac_new_val in
2768 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2769 *) ac_arg=$ac_var=$ac_new_val ;;
2770 esac
2771 case " $ac_configure_args " in
2772 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2773 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2774 esac
2776 done
2777 if $ac_cache_corrupted; then
2778 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2779 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2780 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2781 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2782 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2784 ## -------------------- ##
2785 ## Main body of script. ##
2786 ## -------------------- ##
2788 ac_ext=c
2789 ac_cpp='$CPP $CPPFLAGS'
2790 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2791 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2792 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2799 ac_aux_dir=
2800 for ac_dir in config "$srcdir"/config; do
2801 if test -f "$ac_dir/install-sh"; then
2802 ac_aux_dir=$ac_dir
2803 ac_install_sh="$ac_aux_dir/install-sh -c"
2804 break
2805 elif test -f "$ac_dir/install.sh"; then
2806 ac_aux_dir=$ac_dir
2807 ac_install_sh="$ac_aux_dir/install.sh -c"
2808 break
2809 elif test -f "$ac_dir/shtool"; then
2810 ac_aux_dir=$ac_dir
2811 ac_install_sh="$ac_aux_dir/shtool install -c"
2812 break
2814 done
2815 if test -z "$ac_aux_dir"; then
2816 as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5
2819 # These three variables are undocumented and unsupported,
2820 # and are intended to be withdrawn in a future Autoconf release.
2821 # They can cause serious problems if a builder's source tree is in a directory
2822 # whose full name contains unusual characters.
2823 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2824 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2825 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2830 cat >>confdefs.h <<_ACEOF
2831 #define CONFIGURE_ARGS "$ac_configure_args"
2832 _ACEOF
2835 PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`
2836 PG_MINORVERSION=`expr "$PACKAGE_VERSION" : '.*\.\([0-9][0-9]*\)'`
2837 test -n "$PG_MINORVERSION" || PG_MINORVERSION=0
2840 cat >>confdefs.h <<_ACEOF
2841 #define PG_MAJORVERSION "$PG_MAJORVERSION"
2842 _ACEOF
2845 cat >>confdefs.h <<_ACEOF
2846 #define PG_MAJORVERSION_NUM $PG_MAJORVERSION
2847 _ACEOF
2850 cat >>confdefs.h <<_ACEOF
2851 #define PG_MINORVERSION_NUM $PG_MINORVERSION
2852 _ACEOF
2858 # Check whether --with-extra-version was given.
2859 if test "${with_extra_version+set}" = set; then :
2860 withval=$with_extra_version;
2861 case $withval in
2862 yes)
2863 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2866 as_fn_error $? "argument required for --with-extra-version option" "$LINENO" 5
2869 PG_VERSION="$PACKAGE_VERSION$withval"
2871 esac
2873 else
2874 PG_VERSION="$PACKAGE_VERSION"
2879 cat >>confdefs.h <<_ACEOF
2880 #define PG_VERSION "$PG_VERSION"
2881 _ACEOF
2884 # Make sure we can run config.sub.
2885 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2886 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2889 $as_echo_n "checking build system type... " >&6; }
2890 if ${ac_cv_build+:} false; then :
2891 $as_echo_n "(cached) " >&6
2892 else
2893 ac_build_alias=$build_alias
2894 test "x$ac_build_alias" = x &&
2895 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2896 test "x$ac_build_alias" = x &&
2897 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2898 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2899 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2903 $as_echo "$ac_cv_build" >&6; }
2904 case $ac_cv_build in
2905 *-*-*) ;;
2906 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2907 esac
2908 build=$ac_cv_build
2909 ac_save_IFS=$IFS; IFS='-'
2910 set x $ac_cv_build
2911 shift
2912 build_cpu=$1
2913 build_vendor=$2
2914 shift; shift
2915 # Remember, the first character of IFS is used to create $*,
2916 # except with old shells:
2917 build_os=$*
2918 IFS=$ac_save_IFS
2919 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2923 $as_echo_n "checking host system type... " >&6; }
2924 if ${ac_cv_host+:} false; then :
2925 $as_echo_n "(cached) " >&6
2926 else
2927 if test "x$host_alias" = x; then
2928 ac_cv_host=$ac_cv_build
2929 else
2930 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2931 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2936 $as_echo "$ac_cv_host" >&6; }
2937 case $ac_cv_host in
2938 *-*-*) ;;
2939 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2940 esac
2941 host=$ac_cv_host
2942 ac_save_IFS=$IFS; IFS='-'
2943 set x $ac_cv_host
2944 shift
2945 host_cpu=$1
2946 host_vendor=$2
2947 shift; shift
2948 # Remember, the first character of IFS is used to create $*,
2949 # except with old shells:
2950 host_os=$*
2951 IFS=$ac_save_IFS
2952 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2956 template=
2957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which template to use" >&5
2958 $as_echo_n "checking which template to use... " >&6; }
2963 # Check whether --with-template was given.
2964 if test "${with_template+set}" = set; then :
2965 withval=$with_template;
2966 case $withval in
2967 yes)
2968 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2971 as_fn_error $? "argument required for --with-template option" "$LINENO" 5
2975 case $withval in
2976 list) echo; ls "$srcdir/src/template"; exit;;
2977 *) if test -f "$srcdir/src/template/$with_template" ; then
2978 template=$withval
2979 else
2980 as_fn_error $? "'$withval' is not a valid template name. Use 'list' for a list." "$LINENO" 5
2981 fi;;
2982 esac
2985 esac
2987 else
2989 # --with-template not given
2991 case $host_os in
2992 aix*) template=aix ;;
2993 cygwin*|msys*) template=cygwin ;;
2994 darwin*) template=darwin ;;
2995 dragonfly*) template=netbsd ;;
2996 freebsd*) template=freebsd ;;
2997 hpux*) template=hpux ;;
2998 linux*|gnu*|k*bsd*-gnu)
2999 template=linux ;;
3000 mingw*) template=win32 ;;
3001 netbsd*) template=netbsd ;;
3002 openbsd*) template=openbsd ;;
3003 solaris*) template=solaris ;;
3004 esac
3006 if test x"$template" = x"" ; then
3007 as_fn_error $? "
3008 *******************************************************************
3009 PostgreSQL has apparently not been ported to your platform yet.
3010 To try a manual configuration, look into the src/template directory
3011 for a similar platform and use the '--with-template=' option.
3013 Please also contact <pgsql-bugs@lists.postgresql.org> to see about
3014 rectifying this. Include the above 'checking host system type...'
3015 line.
3016 *******************************************************************
3017 " "$LINENO" 5
3025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $template" >&5
3026 $as_echo "$template" >&6; }
3028 PORTNAME=$template
3031 # Initialize default assumption that we do not need separate assembly code
3032 # for TAS (test-and-set). This can be overridden by the template file
3033 # when it's executed.
3034 need_tas=no
3035 tas_file=dummy.s
3037 # Default, works for most platforms, override in template file if needed
3038 DLSUFFIX=".so"
3043 ## Command line options
3047 # Add non-standard directories to the include path
3052 # Check whether --with-includes was given.
3053 if test "${with_includes+set}" = set; then :
3054 withval=$with_includes;
3055 case $withval in
3056 yes)
3057 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3060 as_fn_error $? "argument required for --with-includes option" "$LINENO" 5
3065 esac
3073 # Add non-standard directories to the library search path
3078 # Check whether --with-libraries was given.
3079 if test "${with_libraries+set}" = set; then :
3080 withval=$with_libraries;
3081 case $withval in
3082 yes)
3083 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3086 as_fn_error $? "argument required for --with-libraries option" "$LINENO" 5
3089 LIBRARY_DIRS=$withval
3091 esac
3100 # Check whether --with-libs was given.
3101 if test "${with_libs+set}" = set; then :
3102 withval=$with_libs;
3103 case $withval in
3104 yes)
3105 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3108 as_fn_error $? "argument required for --with-libs option" "$LINENO" 5
3111 LIBRARY_DIRS=$withval
3113 esac
3121 # 64-bit integer date/time storage is now the only option, but to avoid
3122 # unnecessary breakage of build scripts, continue to accept an explicit
3123 # "--enable-integer-datetimes" switch.
3127 # Check whether --enable-integer-datetimes was given.
3128 if test "${enable_integer_datetimes+set}" = set; then :
3129 enableval=$enable_integer_datetimes;
3130 case $enableval in
3131 yes)
3135 as_fn_error $? "--disable-integer-datetimes is no longer supported" "$LINENO" 5
3138 as_fn_error $? "no argument expected for --enable-integer-datetimes option" "$LINENO" 5
3140 esac
3142 else
3143 enable_integer_datetimes=yes
3151 # NLS
3153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is wanted" >&5
3154 $as_echo_n "checking whether NLS is wanted... " >&6; }
3157 # Check whether --enable-nls was given.
3158 if test "${enable_nls+set}" = set; then :
3159 enableval=$enable_nls;
3160 case $enableval in
3161 yes)
3168 enable_nls=yes
3169 WANTED_LANGUAGES=$enableval
3171 esac
3173 else
3174 enable_nls=no
3179 if test "$enable_nls" = yes; then
3181 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
3185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_nls" >&5
3186 $as_echo "$enable_nls" >&6; }
3191 # Default port number (--with-pgport), default 5432
3193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default port number" >&5
3194 $as_echo_n "checking for default port number... " >&6; }
3198 # Check whether --with-pgport was given.
3199 if test "${with_pgport+set}" = set; then :
3200 withval=$with_pgport;
3201 case $withval in
3202 yes)
3203 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3206 as_fn_error $? "argument required for --with-pgport option" "$LINENO" 5
3209 default_port=$withval
3211 esac
3213 else
3214 default_port=5432
3218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_port" >&5
3219 $as_echo "$default_port" >&6; }
3220 # Need both of these because some places want an integer and some a string
3222 cat >>confdefs.h <<_ACEOF
3223 #define DEF_PGPORT ${default_port}
3224 _ACEOF
3227 cat >>confdefs.h <<_ACEOF
3228 #define DEF_PGPORT_STR "${default_port}"
3229 _ACEOF
3233 # It's worth validating port; you can get very confusing errors otherwise
3234 if test x"$default_port" = x""; then
3235 as_fn_error $? "invalid --with-pgport specification: empty string" "$LINENO" 5
3236 elif test ! x`echo "$default_port" | sed -e 's/[0-9]*//'` = x""; then
3237 as_fn_error $? "invalid --with-pgport specification: must be a number" "$LINENO" 5
3238 elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
3239 as_fn_error $? "invalid --with-pgport specification: must not have leading 0" "$LINENO" 5
3240 elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
3241 as_fn_error $? "invalid --with-pgport specification: must be between 1 and 65535" "$LINENO" 5
3245 # '-rpath'-like feature can be disabled
3249 # Check whether --enable-rpath was given.
3250 if test "${enable_rpath+set}" = set; then :
3251 enableval=$enable_rpath;
3252 case $enableval in
3253 yes)
3260 as_fn_error $? "no argument expected for --enable-rpath option" "$LINENO" 5
3262 esac
3264 else
3265 enable_rpath=yes
3273 # Spinlocks
3277 # Check whether --enable-spinlocks was given.
3278 if test "${enable_spinlocks+set}" = set; then :
3279 enableval=$enable_spinlocks;
3280 case $enableval in
3281 yes)
3288 as_fn_error $? "no argument expected for --enable-spinlocks option" "$LINENO" 5
3290 esac
3292 else
3293 enable_spinlocks=yes
3300 # Atomic operations
3304 # Check whether --enable-atomics was given.
3305 if test "${enable_atomics+set}" = set; then :
3306 enableval=$enable_atomics;
3307 case $enableval in
3308 yes)
3315 as_fn_error $? "no argument expected for --enable-atomics option" "$LINENO" 5
3317 esac
3319 else
3320 enable_atomics=yes
3327 # --enable-debug adds -g to compiler flags
3331 # Check whether --enable-debug was given.
3332 if test "${enable_debug+set}" = set; then :
3333 enableval=$enable_debug;
3334 case $enableval in
3335 yes)
3342 as_fn_error $? "no argument expected for --enable-debug option" "$LINENO" 5
3344 esac
3346 else
3347 enable_debug=no
3355 # --enable-profiling enables gcc profiling
3359 # Check whether --enable-profiling was given.
3360 if test "${enable_profiling+set}" = set; then :
3361 enableval=$enable_profiling;
3362 case $enableval in
3363 yes)
3370 as_fn_error $? "no argument expected for --enable-profiling option" "$LINENO" 5
3372 esac
3374 else
3375 enable_profiling=no
3382 # --enable-coverage enables generation of code coverage metrics with gcov
3386 # Check whether --enable-coverage was given.
3387 if test "${enable_coverage+set}" = set; then :
3388 enableval=$enable_coverage;
3389 case $enableval in
3390 yes)
3391 if test -z "$GCOV"; then
3392 for ac_prog in gcov
3394 # Extract the first word of "$ac_prog", so it can be a program name with args.
3395 set dummy $ac_prog; ac_word=$2
3396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3397 $as_echo_n "checking for $ac_word... " >&6; }
3398 if ${ac_cv_path_GCOV+:} false; then :
3399 $as_echo_n "(cached) " >&6
3400 else
3401 case $GCOV in
3402 [\\/]* | ?:[\\/]*)
3403 ac_cv_path_GCOV="$GCOV" # Let the user override the test with a path.
3406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3407 for as_dir in $PATH
3409 IFS=$as_save_IFS
3410 test -z "$as_dir" && as_dir=.
3411 for ac_exec_ext in '' $ac_executable_extensions; do
3412 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3413 ac_cv_path_GCOV="$as_dir/$ac_word$ac_exec_ext"
3414 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3415 break 2
3417 done
3418 done
3419 IFS=$as_save_IFS
3422 esac
3424 GCOV=$ac_cv_path_GCOV
3425 if test -n "$GCOV"; then
3426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3427 $as_echo "$GCOV" >&6; }
3428 else
3429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3430 $as_echo "no" >&6; }
3434 test -n "$GCOV" && break
3435 done
3437 else
3438 # Report the value of GCOV in configure's output in all cases.
3439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCOV" >&5
3440 $as_echo_n "checking for GCOV... " >&6; }
3441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5
3442 $as_echo "$GCOV" >&6; }
3445 if test -z "$GCOV"; then
3446 as_fn_error $? "gcov not found" "$LINENO" 5
3448 if test -z "$LCOV"; then
3449 for ac_prog in lcov
3451 # Extract the first word of "$ac_prog", so it can be a program name with args.
3452 set dummy $ac_prog; ac_word=$2
3453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3454 $as_echo_n "checking for $ac_word... " >&6; }
3455 if ${ac_cv_path_LCOV+:} false; then :
3456 $as_echo_n "(cached) " >&6
3457 else
3458 case $LCOV in
3459 [\\/]* | ?:[\\/]*)
3460 ac_cv_path_LCOV="$LCOV" # Let the user override the test with a path.
3463 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3464 for as_dir in $PATH
3466 IFS=$as_save_IFS
3467 test -z "$as_dir" && as_dir=.
3468 for ac_exec_ext in '' $ac_executable_extensions; do
3469 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3470 ac_cv_path_LCOV="$as_dir/$ac_word$ac_exec_ext"
3471 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3472 break 2
3474 done
3475 done
3476 IFS=$as_save_IFS
3479 esac
3481 LCOV=$ac_cv_path_LCOV
3482 if test -n "$LCOV"; then
3483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3484 $as_echo "$LCOV" >&6; }
3485 else
3486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3487 $as_echo "no" >&6; }
3491 test -n "$LCOV" && break
3492 done
3494 else
3495 # Report the value of LCOV in configure's output in all cases.
3496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCOV" >&5
3497 $as_echo_n "checking for LCOV... " >&6; }
3498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5
3499 $as_echo "$LCOV" >&6; }
3502 if test -z "$LCOV"; then
3503 as_fn_error $? "lcov not found" "$LINENO" 5
3505 if test -z "$GENHTML"; then
3506 for ac_prog in genhtml
3508 # Extract the first word of "$ac_prog", so it can be a program name with args.
3509 set dummy $ac_prog; ac_word=$2
3510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3511 $as_echo_n "checking for $ac_word... " >&6; }
3512 if ${ac_cv_path_GENHTML+:} false; then :
3513 $as_echo_n "(cached) " >&6
3514 else
3515 case $GENHTML in
3516 [\\/]* | ?:[\\/]*)
3517 ac_cv_path_GENHTML="$GENHTML" # Let the user override the test with a path.
3520 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3521 for as_dir in $PATH
3523 IFS=$as_save_IFS
3524 test -z "$as_dir" && as_dir=.
3525 for ac_exec_ext in '' $ac_executable_extensions; do
3526 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3527 ac_cv_path_GENHTML="$as_dir/$ac_word$ac_exec_ext"
3528 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3529 break 2
3531 done
3532 done
3533 IFS=$as_save_IFS
3536 esac
3538 GENHTML=$ac_cv_path_GENHTML
3539 if test -n "$GENHTML"; then
3540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3541 $as_echo "$GENHTML" >&6; }
3542 else
3543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3544 $as_echo "no" >&6; }
3548 test -n "$GENHTML" && break
3549 done
3551 else
3552 # Report the value of GENHTML in configure's output in all cases.
3553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GENHTML" >&5
3554 $as_echo_n "checking for GENHTML... " >&6; }
3555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5
3556 $as_echo "$GENHTML" >&6; }
3559 if test -z "$GENHTML"; then
3560 as_fn_error $? "genhtml not found" "$LINENO" 5
3567 as_fn_error $? "no argument expected for --enable-coverage option" "$LINENO" 5
3569 esac
3571 else
3572 enable_coverage=no
3580 # DTrace
3584 # Check whether --enable-dtrace was given.
3585 if test "${enable_dtrace+set}" = set; then :
3586 enableval=$enable_dtrace;
3587 case $enableval in
3588 yes)
3589 if test -z "$DTRACE"; then
3590 for ac_prog in dtrace
3592 # Extract the first word of "$ac_prog", so it can be a program name with args.
3593 set dummy $ac_prog; ac_word=$2
3594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3595 $as_echo_n "checking for $ac_word... " >&6; }
3596 if ${ac_cv_path_DTRACE+:} false; then :
3597 $as_echo_n "(cached) " >&6
3598 else
3599 case $DTRACE in
3600 [\\/]* | ?:[\\/]*)
3601 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
3604 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3605 for as_dir in $PATH
3607 IFS=$as_save_IFS
3608 test -z "$as_dir" && as_dir=.
3609 for ac_exec_ext in '' $ac_executable_extensions; do
3610 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3611 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
3612 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3613 break 2
3615 done
3616 done
3617 IFS=$as_save_IFS
3620 esac
3622 DTRACE=$ac_cv_path_DTRACE
3623 if test -n "$DTRACE"; then
3624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3625 $as_echo "$DTRACE" >&6; }
3626 else
3627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3628 $as_echo "no" >&6; }
3632 test -n "$DTRACE" && break
3633 done
3635 else
3636 # Report the value of DTRACE in configure's output in all cases.
3637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
3638 $as_echo_n "checking for DTRACE... " >&6; }
3639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
3640 $as_echo "$DTRACE" >&6; }
3643 if test -z "$DTRACE"; then
3644 as_fn_error $? "dtrace not found" "$LINENO" 5
3652 as_fn_error $? "no argument expected for --enable-dtrace option" "$LINENO" 5
3654 esac
3656 else
3657 enable_dtrace=no
3665 # TAP tests
3669 # Check whether --enable-tap-tests was given.
3670 if test "${enable_tap_tests+set}" = set; then :
3671 enableval=$enable_tap_tests;
3672 case $enableval in
3673 yes)
3680 as_fn_error $? "no argument expected for --enable-tap-tests option" "$LINENO" 5
3682 esac
3684 else
3685 enable_tap_tests=no
3693 # Block size
3695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for block size" >&5
3696 $as_echo_n "checking for block size... " >&6; }
3700 # Check whether --with-blocksize was given.
3701 if test "${with_blocksize+set}" = set; then :
3702 withval=$with_blocksize;
3703 case $withval in
3704 yes)
3705 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3708 as_fn_error $? "argument required for --with-blocksize option" "$LINENO" 5
3711 blocksize=$withval
3713 esac
3715 else
3716 blocksize=8
3720 case ${blocksize} in
3721 1) BLCKSZ=1024;;
3722 2) BLCKSZ=2048;;
3723 4) BLCKSZ=4096;;
3724 8) BLCKSZ=8192;;
3725 16) BLCKSZ=16384;;
3726 32) BLCKSZ=32768;;
3727 *) as_fn_error $? "Invalid block size. Allowed values are 1,2,4,8,16,32." "$LINENO" 5
3728 esac
3729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${blocksize}kB" >&5
3730 $as_echo "${blocksize}kB" >&6; }
3733 cat >>confdefs.h <<_ACEOF
3734 #define BLCKSZ ${BLCKSZ}
3735 _ACEOF
3739 # Relation segment size
3741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for segment size" >&5
3742 $as_echo_n "checking for segment size... " >&6; }
3746 # Check whether --with-segsize was given.
3747 if test "${with_segsize+set}" = set; then :
3748 withval=$with_segsize;
3749 case $withval in
3750 yes)
3751 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3754 as_fn_error $? "argument required for --with-segsize option" "$LINENO" 5
3757 segsize=$withval
3759 esac
3761 else
3762 segsize=1
3766 # this expression is set up to avoid unnecessary integer overflow
3767 # blocksize is already guaranteed to be a factor of 1024
3768 RELSEG_SIZE=`expr '(' 1024 / ${blocksize} ')' '*' ${segsize} '*' 1024`
3769 test $? -eq 0 || exit 1
3770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${segsize}GB" >&5
3771 $as_echo "${segsize}GB" >&6; }
3774 cat >>confdefs.h <<_ACEOF
3775 #define RELSEG_SIZE ${RELSEG_SIZE}
3776 _ACEOF
3780 # WAL block size
3782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WAL block size" >&5
3783 $as_echo_n "checking for WAL block size... " >&6; }
3787 # Check whether --with-wal-blocksize was given.
3788 if test "${with_wal_blocksize+set}" = set; then :
3789 withval=$with_wal_blocksize;
3790 case $withval in
3791 yes)
3792 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3795 as_fn_error $? "argument required for --with-wal-blocksize option" "$LINENO" 5
3798 wal_blocksize=$withval
3800 esac
3802 else
3803 wal_blocksize=8
3807 case ${wal_blocksize} in
3808 1) XLOG_BLCKSZ=1024;;
3809 2) XLOG_BLCKSZ=2048;;
3810 4) XLOG_BLCKSZ=4096;;
3811 8) XLOG_BLCKSZ=8192;;
3812 16) XLOG_BLCKSZ=16384;;
3813 32) XLOG_BLCKSZ=32768;;
3814 64) XLOG_BLCKSZ=65536;;
3815 *) as_fn_error $? "Invalid WAL block size. Allowed values are 1,2,4,8,16,32,64." "$LINENO" 5
3816 esac
3817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${wal_blocksize}kB" >&5
3818 $as_echo "${wal_blocksize}kB" >&6; }
3821 cat >>confdefs.h <<_ACEOF
3822 #define XLOG_BLCKSZ ${XLOG_BLCKSZ}
3823 _ACEOF
3827 # C compiler
3830 # For historical reasons you can also use --with-CC to specify the C compiler
3831 # to use, although the standard way to do this is to set the CC environment
3832 # variable.
3836 # Check whether --with-CC was given.
3837 if test "${with_CC+set}" = set; then :
3838 withval=$with_CC;
3839 case $withval in
3840 yes)
3841 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3844 as_fn_error $? "argument required for --with-CC option" "$LINENO" 5
3847 CC=$with_CC
3849 esac
3855 case $template in
3856 aix) pgac_cc_list="gcc xlc"; pgac_cxx_list="g++ xlC";;
3857 *) pgac_cc_list="gcc cc"; pgac_cxx_list="g++ c++";;
3858 esac
3860 ac_ext=c
3861 ac_cpp='$CPP $CPPFLAGS'
3862 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3863 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3864 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3865 if test -n "$ac_tool_prefix"; then
3866 for ac_prog in $pgac_cc_list
3868 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3869 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3871 $as_echo_n "checking for $ac_word... " >&6; }
3872 if ${ac_cv_prog_CC+:} false; then :
3873 $as_echo_n "(cached) " >&6
3874 else
3875 if test -n "$CC"; then
3876 ac_cv_prog_CC="$CC" # Let the user override the test.
3877 else
3878 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3879 for as_dir in $PATH
3881 IFS=$as_save_IFS
3882 test -z "$as_dir" && as_dir=.
3883 for ac_exec_ext in '' $ac_executable_extensions; do
3884 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3885 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3887 break 2
3889 done
3890 done
3891 IFS=$as_save_IFS
3895 CC=$ac_cv_prog_CC
3896 if test -n "$CC"; then
3897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3898 $as_echo "$CC" >&6; }
3899 else
3900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3901 $as_echo "no" >&6; }
3905 test -n "$CC" && break
3906 done
3908 if test -z "$CC"; then
3909 ac_ct_CC=$CC
3910 for ac_prog in $pgac_cc_list
3912 # Extract the first word of "$ac_prog", so it can be a program name with args.
3913 set dummy $ac_prog; ac_word=$2
3914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3915 $as_echo_n "checking for $ac_word... " >&6; }
3916 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3917 $as_echo_n "(cached) " >&6
3918 else
3919 if test -n "$ac_ct_CC"; then
3920 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3921 else
3922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3923 for as_dir in $PATH
3925 IFS=$as_save_IFS
3926 test -z "$as_dir" && as_dir=.
3927 for ac_exec_ext in '' $ac_executable_extensions; do
3928 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3929 ac_cv_prog_ac_ct_CC="$ac_prog"
3930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3931 break 2
3933 done
3934 done
3935 IFS=$as_save_IFS
3939 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3940 if test -n "$ac_ct_CC"; then
3941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3942 $as_echo "$ac_ct_CC" >&6; }
3943 else
3944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3945 $as_echo "no" >&6; }
3949 test -n "$ac_ct_CC" && break
3950 done
3952 if test "x$ac_ct_CC" = x; then
3953 CC=""
3954 else
3955 case $cross_compiling:$ac_tool_warned in
3956 yes:)
3957 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3958 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3959 ac_tool_warned=yes ;;
3960 esac
3961 CC=$ac_ct_CC
3966 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3967 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3968 as_fn_error $? "no acceptable C compiler found in \$PATH
3969 See \`config.log' for more details" "$LINENO" 5; }
3971 # Provide some information about the compiler.
3972 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3973 set X $ac_compile
3974 ac_compiler=$2
3975 for ac_option in --version -v -V -qversion; do
3976 { { ac_try="$ac_compiler $ac_option >&5"
3977 case "(($ac_try" in
3978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3979 *) ac_try_echo=$ac_try;;
3980 esac
3981 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3982 $as_echo "$ac_try_echo"; } >&5
3983 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3984 ac_status=$?
3985 if test -s conftest.err; then
3986 sed '10a\
3987 ... rest of stderr output deleted ...
3988 10q' conftest.err >conftest.er1
3989 cat conftest.er1 >&5
3991 rm -f conftest.er1 conftest.err
3992 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3993 test $ac_status = 0; }
3994 done
3996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3997 /* end confdefs.h. */
4000 main ()
4004 return 0;
4006 _ACEOF
4007 ac_clean_files_save=$ac_clean_files
4008 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4009 # Try to create an executable without -o first, disregard a.out.
4010 # It will help us diagnose broken compilers, and finding out an intuition
4011 # of exeext.
4012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4013 $as_echo_n "checking whether the C compiler works... " >&6; }
4014 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4016 # The possible output files:
4017 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4019 ac_rmfiles=
4020 for ac_file in $ac_files
4022 case $ac_file in
4023 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4024 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4025 esac
4026 done
4027 rm -f $ac_rmfiles
4029 if { { ac_try="$ac_link_default"
4030 case "(($ac_try" in
4031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4032 *) ac_try_echo=$ac_try;;
4033 esac
4034 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4035 $as_echo "$ac_try_echo"; } >&5
4036 (eval "$ac_link_default") 2>&5
4037 ac_status=$?
4038 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4039 test $ac_status = 0; }; then :
4040 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4041 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4042 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4043 # so that the user can short-circuit this test for compilers unknown to
4044 # Autoconf.
4045 for ac_file in $ac_files ''
4047 test -f "$ac_file" || continue
4048 case $ac_file in
4049 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4051 [ab].out )
4052 # We found the default executable, but exeext='' is most
4053 # certainly right.
4054 break;;
4055 *.* )
4056 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4057 then :; else
4058 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4060 # We set ac_cv_exeext here because the later test for it is not
4061 # safe: cross compilers may not add the suffix if given an `-o'
4062 # argument, so we may need to know it at that point already.
4063 # Even if this section looks crufty: it has the advantage of
4064 # actually working.
4065 break;;
4067 break;;
4068 esac
4069 done
4070 test "$ac_cv_exeext" = no && ac_cv_exeext=
4072 else
4073 ac_file=''
4075 if test -z "$ac_file"; then :
4076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4077 $as_echo "no" >&6; }
4078 $as_echo "$as_me: failed program was:" >&5
4079 sed 's/^/| /' conftest.$ac_ext >&5
4081 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4082 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4083 as_fn_error 77 "C compiler cannot create executables
4084 See \`config.log' for more details" "$LINENO" 5; }
4085 else
4086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4087 $as_echo "yes" >&6; }
4089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4090 $as_echo_n "checking for C compiler default output file name... " >&6; }
4091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4092 $as_echo "$ac_file" >&6; }
4093 ac_exeext=$ac_cv_exeext
4095 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4096 ac_clean_files=$ac_clean_files_save
4097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4098 $as_echo_n "checking for suffix of executables... " >&6; }
4099 if { { ac_try="$ac_link"
4100 case "(($ac_try" in
4101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4102 *) ac_try_echo=$ac_try;;
4103 esac
4104 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4105 $as_echo "$ac_try_echo"; } >&5
4106 (eval "$ac_link") 2>&5
4107 ac_status=$?
4108 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4109 test $ac_status = 0; }; then :
4110 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4111 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4112 # work properly (i.e., refer to `conftest.exe'), while it won't with
4113 # `rm'.
4114 for ac_file in conftest.exe conftest conftest.*; do
4115 test -f "$ac_file" || continue
4116 case $ac_file in
4117 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4118 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4119 break;;
4120 * ) break;;
4121 esac
4122 done
4123 else
4124 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4125 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4126 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4127 See \`config.log' for more details" "$LINENO" 5; }
4129 rm -f conftest conftest$ac_cv_exeext
4130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4131 $as_echo "$ac_cv_exeext" >&6; }
4133 rm -f conftest.$ac_ext
4134 EXEEXT=$ac_cv_exeext
4135 ac_exeext=$EXEEXT
4136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4137 /* end confdefs.h. */
4138 #include <stdio.h>
4140 main ()
4142 FILE *f = fopen ("conftest.out", "w");
4143 return ferror (f) || fclose (f) != 0;
4146 return 0;
4148 _ACEOF
4149 ac_clean_files="$ac_clean_files conftest.out"
4150 # Check that the compiler produces executables we can run. If not, either
4151 # the compiler is broken, or we cross compile.
4152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4153 $as_echo_n "checking whether we are cross compiling... " >&6; }
4154 if test "$cross_compiling" != yes; then
4155 { { ac_try="$ac_link"
4156 case "(($ac_try" in
4157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4158 *) ac_try_echo=$ac_try;;
4159 esac
4160 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4161 $as_echo "$ac_try_echo"; } >&5
4162 (eval "$ac_link") 2>&5
4163 ac_status=$?
4164 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4165 test $ac_status = 0; }
4166 if { ac_try='./conftest$ac_cv_exeext'
4167 { { case "(($ac_try" in
4168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4169 *) ac_try_echo=$ac_try;;
4170 esac
4171 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4172 $as_echo "$ac_try_echo"; } >&5
4173 (eval "$ac_try") 2>&5
4174 ac_status=$?
4175 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4176 test $ac_status = 0; }; }; then
4177 cross_compiling=no
4178 else
4179 if test "$cross_compiling" = maybe; then
4180 cross_compiling=yes
4181 else
4182 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4183 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4184 as_fn_error $? "cannot run C compiled programs.
4185 If you meant to cross compile, use \`--host'.
4186 See \`config.log' for more details" "$LINENO" 5; }
4190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4191 $as_echo "$cross_compiling" >&6; }
4193 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4194 ac_clean_files=$ac_clean_files_save
4195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4196 $as_echo_n "checking for suffix of object files... " >&6; }
4197 if ${ac_cv_objext+:} false; then :
4198 $as_echo_n "(cached) " >&6
4199 else
4200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4201 /* end confdefs.h. */
4204 main ()
4208 return 0;
4210 _ACEOF
4211 rm -f conftest.o conftest.obj
4212 if { { ac_try="$ac_compile"
4213 case "(($ac_try" in
4214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4215 *) ac_try_echo=$ac_try;;
4216 esac
4217 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4218 $as_echo "$ac_try_echo"; } >&5
4219 (eval "$ac_compile") 2>&5
4220 ac_status=$?
4221 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4222 test $ac_status = 0; }; then :
4223 for ac_file in conftest.o conftest.obj conftest.*; do
4224 test -f "$ac_file" || continue;
4225 case $ac_file in
4226 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4227 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4228 break;;
4229 esac
4230 done
4231 else
4232 $as_echo "$as_me: failed program was:" >&5
4233 sed 's/^/| /' conftest.$ac_ext >&5
4235 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4236 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4237 as_fn_error $? "cannot compute suffix of object files: cannot compile
4238 See \`config.log' for more details" "$LINENO" 5; }
4240 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4243 $as_echo "$ac_cv_objext" >&6; }
4244 OBJEXT=$ac_cv_objext
4245 ac_objext=$OBJEXT
4246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4247 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4248 if ${ac_cv_c_compiler_gnu+:} false; then :
4249 $as_echo_n "(cached) " >&6
4250 else
4251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4252 /* end confdefs.h. */
4255 main ()
4257 #ifndef __GNUC__
4258 choke me
4259 #endif
4262 return 0;
4264 _ACEOF
4265 if ac_fn_c_try_compile "$LINENO"; then :
4266 ac_compiler_gnu=yes
4267 else
4268 ac_compiler_gnu=no
4270 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4271 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4275 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4276 if test $ac_compiler_gnu = yes; then
4277 GCC=yes
4278 else
4279 GCC=
4281 ac_test_CFLAGS=${CFLAGS+set}
4282 ac_save_CFLAGS=$CFLAGS
4283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4284 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4285 if ${ac_cv_prog_cc_g+:} false; then :
4286 $as_echo_n "(cached) " >&6
4287 else
4288 ac_save_c_werror_flag=$ac_c_werror_flag
4289 ac_c_werror_flag=yes
4290 ac_cv_prog_cc_g=no
4291 CFLAGS="-g"
4292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4293 /* end confdefs.h. */
4296 main ()
4300 return 0;
4302 _ACEOF
4303 if ac_fn_c_try_compile "$LINENO"; then :
4304 ac_cv_prog_cc_g=yes
4305 else
4306 CFLAGS=""
4307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4308 /* end confdefs.h. */
4311 main ()
4315 return 0;
4317 _ACEOF
4318 if ac_fn_c_try_compile "$LINENO"; then :
4320 else
4321 ac_c_werror_flag=$ac_save_c_werror_flag
4322 CFLAGS="-g"
4323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4324 /* end confdefs.h. */
4327 main ()
4331 return 0;
4333 _ACEOF
4334 if ac_fn_c_try_compile "$LINENO"; then :
4335 ac_cv_prog_cc_g=yes
4337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4341 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4342 ac_c_werror_flag=$ac_save_c_werror_flag
4344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4345 $as_echo "$ac_cv_prog_cc_g" >&6; }
4346 if test "$ac_test_CFLAGS" = set; then
4347 CFLAGS=$ac_save_CFLAGS
4348 elif test $ac_cv_prog_cc_g = yes; then
4349 if test "$GCC" = yes; then
4350 CFLAGS="-g -O2"
4351 else
4352 CFLAGS="-g"
4354 else
4355 if test "$GCC" = yes; then
4356 CFLAGS="-O2"
4357 else
4358 CFLAGS=
4361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4362 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4363 if ${ac_cv_prog_cc_c89+:} false; then :
4364 $as_echo_n "(cached) " >&6
4365 else
4366 ac_cv_prog_cc_c89=no
4367 ac_save_CC=$CC
4368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4369 /* end confdefs.h. */
4370 #include <stdarg.h>
4371 #include <stdio.h>
4372 struct stat;
4373 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4374 struct buf { int x; };
4375 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4376 static char *e (p, i)
4377 char **p;
4378 int i;
4380 return p[i];
4382 static char *f (char * (*g) (char **, int), char **p, ...)
4384 char *s;
4385 va_list v;
4386 va_start (v,p);
4387 s = g (p, va_arg (v,int));
4388 va_end (v);
4389 return s;
4392 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4393 function prototypes and stuff, but not '\xHH' hex character constants.
4394 These don't provoke an error unfortunately, instead are silently treated
4395 as 'x'. The following induces an error, until -std is added to get
4396 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4397 array size at least. It's necessary to write '\x00'==0 to get something
4398 that's true only with -std. */
4399 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4401 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4402 inside strings and character constants. */
4403 #define FOO(x) 'x'
4404 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4406 int test (int i, double x);
4407 struct s1 {int (*f) (int a);};
4408 struct s2 {int (*f) (double a);};
4409 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4410 int argc;
4411 char **argv;
4413 main ()
4415 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4417 return 0;
4419 _ACEOF
4420 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4421 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4423 CC="$ac_save_CC $ac_arg"
4424 if ac_fn_c_try_compile "$LINENO"; then :
4425 ac_cv_prog_cc_c89=$ac_arg
4427 rm -f core conftest.err conftest.$ac_objext
4428 test "x$ac_cv_prog_cc_c89" != "xno" && break
4429 done
4430 rm -f conftest.$ac_ext
4431 CC=$ac_save_CC
4434 # AC_CACHE_VAL
4435 case "x$ac_cv_prog_cc_c89" in
4437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4438 $as_echo "none needed" >&6; } ;;
4439 xno)
4440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4441 $as_echo "unsupported" >&6; } ;;
4443 CC="$CC $ac_cv_prog_cc_c89"
4444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4445 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4446 esac
4447 if test "x$ac_cv_prog_cc_c89" != xno; then :
4451 ac_ext=c
4452 ac_cpp='$CPP $CPPFLAGS'
4453 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4454 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4455 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4458 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4459 if ${ac_cv_prog_cc_c99+:} false; then :
4460 $as_echo_n "(cached) " >&6
4461 else
4462 ac_cv_prog_cc_c99=no
4463 ac_save_CC=$CC
4464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4465 /* end confdefs.h. */
4466 #include <stdarg.h>
4467 #include <stdbool.h>
4468 #include <stdlib.h>
4469 #include <wchar.h>
4470 #include <stdio.h>
4472 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4473 #define debug(...) fprintf (stderr, __VA_ARGS__)
4474 #define showlist(...) puts (#__VA_ARGS__)
4475 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4476 static void
4477 test_varargs_macros (void)
4479 int x = 1234;
4480 int y = 5678;
4481 debug ("Flag");
4482 debug ("X = %d\n", x);
4483 showlist (The first, second, and third items.);
4484 report (x>y, "x is %d but y is %d", x, y);
4487 // Check long long types.
4488 #define BIG64 18446744073709551615ull
4489 #define BIG32 4294967295ul
4490 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4491 #if !BIG_OK
4492 your preprocessor is broken;
4493 #endif
4494 #if BIG_OK
4495 #else
4496 your preprocessor is broken;
4497 #endif
4498 static long long int bignum = -9223372036854775807LL;
4499 static unsigned long long int ubignum = BIG64;
4501 struct incomplete_array
4503 int datasize;
4504 double data[];
4507 struct named_init {
4508 int number;
4509 const wchar_t *name;
4510 double average;
4513 typedef const char *ccp;
4515 static inline int
4516 test_restrict (ccp restrict text)
4518 // See if C++-style comments work.
4519 // Iterate through items via the restricted pointer.
4520 // Also check for declarations in for loops.
4521 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4522 continue;
4523 return 0;
4526 // Check varargs and va_copy.
4527 static void
4528 test_varargs (const char *format, ...)
4530 va_list args;
4531 va_start (args, format);
4532 va_list args_copy;
4533 va_copy (args_copy, args);
4535 const char *str;
4536 int number;
4537 float fnumber;
4539 while (*format)
4541 switch (*format++)
4543 case 's': // string
4544 str = va_arg (args_copy, const char *);
4545 break;
4546 case 'd': // int
4547 number = va_arg (args_copy, int);
4548 break;
4549 case 'f': // float
4550 fnumber = va_arg (args_copy, double);
4551 break;
4552 default:
4553 break;
4556 va_end (args_copy);
4557 va_end (args);
4561 main ()
4564 // Check bool.
4565 _Bool success = false;
4567 // Check restrict.
4568 if (test_restrict ("String literal") == 0)
4569 success = true;
4570 char *restrict newvar = "Another string";
4572 // Check varargs.
4573 test_varargs ("s, d' f .", "string", 65, 34.234);
4574 test_varargs_macros ();
4576 // Check flexible array members.
4577 struct incomplete_array *ia =
4578 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4579 ia->datasize = 10;
4580 for (int i = 0; i < ia->datasize; ++i)
4581 ia->data[i] = i * 1.234;
4583 // Check named initializers.
4584 struct named_init ni = {
4585 .number = 34,
4586 .name = L"Test wide string",
4587 .average = 543.34343,
4590 ni.number = 58;
4592 int dynamic_array[ni.number];
4593 dynamic_array[ni.number - 1] = 543;
4595 // work around unused variable warnings
4596 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4597 || dynamic_array[ni.number - 1] != 543);
4600 return 0;
4602 _ACEOF
4603 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4605 CC="$ac_save_CC $ac_arg"
4606 if ac_fn_c_try_compile "$LINENO"; then :
4607 ac_cv_prog_cc_c99=$ac_arg
4609 rm -f core conftest.err conftest.$ac_objext
4610 test "x$ac_cv_prog_cc_c99" != "xno" && break
4611 done
4612 rm -f conftest.$ac_ext
4613 CC=$ac_save_CC
4616 # AC_CACHE_VAL
4617 case "x$ac_cv_prog_cc_c99" in
4619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4620 $as_echo "none needed" >&6; } ;;
4621 xno)
4622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4623 $as_echo "unsupported" >&6; } ;;
4625 CC="$CC $ac_cv_prog_cc_c99"
4626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4627 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4628 esac
4629 if test "x$ac_cv_prog_cc_c99" != xno; then :
4635 # Error out if the compiler does not support C99, as the codebase
4636 # relies on that.
4637 if test "$ac_cv_prog_cc_c99" = no; then
4638 as_fn_error $? "C compiler \"$CC\" does not support C99" "$LINENO" 5
4641 ac_ext=cpp
4642 ac_cpp='$CXXCPP $CPPFLAGS'
4643 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4644 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4645 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4646 if test -z "$CXX"; then
4647 if test -n "$CCC"; then
4648 CXX=$CCC
4649 else
4650 if test -n "$ac_tool_prefix"; then
4651 for ac_prog in $pgac_cxx_list
4653 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4654 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4656 $as_echo_n "checking for $ac_word... " >&6; }
4657 if ${ac_cv_prog_CXX+:} false; then :
4658 $as_echo_n "(cached) " >&6
4659 else
4660 if test -n "$CXX"; then
4661 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4662 else
4663 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4664 for as_dir in $PATH
4666 IFS=$as_save_IFS
4667 test -z "$as_dir" && as_dir=.
4668 for ac_exec_ext in '' $ac_executable_extensions; do
4669 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4670 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4671 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4672 break 2
4674 done
4675 done
4676 IFS=$as_save_IFS
4680 CXX=$ac_cv_prog_CXX
4681 if test -n "$CXX"; then
4682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4683 $as_echo "$CXX" >&6; }
4684 else
4685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4686 $as_echo "no" >&6; }
4690 test -n "$CXX" && break
4691 done
4693 if test -z "$CXX"; then
4694 ac_ct_CXX=$CXX
4695 for ac_prog in $pgac_cxx_list
4697 # Extract the first word of "$ac_prog", so it can be a program name with args.
4698 set dummy $ac_prog; ac_word=$2
4699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4700 $as_echo_n "checking for $ac_word... " >&6; }
4701 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4702 $as_echo_n "(cached) " >&6
4703 else
4704 if test -n "$ac_ct_CXX"; then
4705 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4706 else
4707 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4708 for as_dir in $PATH
4710 IFS=$as_save_IFS
4711 test -z "$as_dir" && as_dir=.
4712 for ac_exec_ext in '' $ac_executable_extensions; do
4713 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4714 ac_cv_prog_ac_ct_CXX="$ac_prog"
4715 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4716 break 2
4718 done
4719 done
4720 IFS=$as_save_IFS
4724 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4725 if test -n "$ac_ct_CXX"; then
4726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4727 $as_echo "$ac_ct_CXX" >&6; }
4728 else
4729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4730 $as_echo "no" >&6; }
4734 test -n "$ac_ct_CXX" && break
4735 done
4737 if test "x$ac_ct_CXX" = x; then
4738 CXX="g++"
4739 else
4740 case $cross_compiling:$ac_tool_warned in
4741 yes:)
4742 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4743 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4744 ac_tool_warned=yes ;;
4745 esac
4746 CXX=$ac_ct_CXX
4752 # Provide some information about the compiler.
4753 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4754 set X $ac_compile
4755 ac_compiler=$2
4756 for ac_option in --version -v -V -qversion; do
4757 { { ac_try="$ac_compiler $ac_option >&5"
4758 case "(($ac_try" in
4759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4760 *) ac_try_echo=$ac_try;;
4761 esac
4762 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4763 $as_echo "$ac_try_echo"; } >&5
4764 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4765 ac_status=$?
4766 if test -s conftest.err; then
4767 sed '10a\
4768 ... rest of stderr output deleted ...
4769 10q' conftest.err >conftest.er1
4770 cat conftest.er1 >&5
4772 rm -f conftest.er1 conftest.err
4773 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4774 test $ac_status = 0; }
4775 done
4777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4778 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4779 if ${ac_cv_cxx_compiler_gnu+:} false; then :
4780 $as_echo_n "(cached) " >&6
4781 else
4782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4783 /* end confdefs.h. */
4786 main ()
4788 #ifndef __GNUC__
4789 choke me
4790 #endif
4793 return 0;
4795 _ACEOF
4796 if ac_fn_cxx_try_compile "$LINENO"; then :
4797 ac_compiler_gnu=yes
4798 else
4799 ac_compiler_gnu=no
4801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4802 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4806 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4807 if test $ac_compiler_gnu = yes; then
4808 GXX=yes
4809 else
4810 GXX=
4812 ac_test_CXXFLAGS=${CXXFLAGS+set}
4813 ac_save_CXXFLAGS=$CXXFLAGS
4814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4815 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
4816 if ${ac_cv_prog_cxx_g+:} false; then :
4817 $as_echo_n "(cached) " >&6
4818 else
4819 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4820 ac_cxx_werror_flag=yes
4821 ac_cv_prog_cxx_g=no
4822 CXXFLAGS="-g"
4823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4824 /* end confdefs.h. */
4827 main ()
4831 return 0;
4833 _ACEOF
4834 if ac_fn_cxx_try_compile "$LINENO"; then :
4835 ac_cv_prog_cxx_g=yes
4836 else
4837 CXXFLAGS=""
4838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4839 /* end confdefs.h. */
4842 main ()
4846 return 0;
4848 _ACEOF
4849 if ac_fn_cxx_try_compile "$LINENO"; then :
4851 else
4852 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4853 CXXFLAGS="-g"
4854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4855 /* end confdefs.h. */
4858 main ()
4862 return 0;
4864 _ACEOF
4865 if ac_fn_cxx_try_compile "$LINENO"; then :
4866 ac_cv_prog_cxx_g=yes
4868 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4873 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4876 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4877 if test "$ac_test_CXXFLAGS" = set; then
4878 CXXFLAGS=$ac_save_CXXFLAGS
4879 elif test $ac_cv_prog_cxx_g = yes; then
4880 if test "$GXX" = yes; then
4881 CXXFLAGS="-g -O2"
4882 else
4883 CXXFLAGS="-g"
4885 else
4886 if test "$GXX" = yes; then
4887 CXXFLAGS="-O2"
4888 else
4889 CXXFLAGS=
4892 ac_ext=c
4893 ac_cpp='$CPP $CPPFLAGS'
4894 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4895 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4896 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4899 # Check if it's Intel's compiler, which (usually) pretends to be gcc,
4900 # but has idiosyncrasies of its own. We assume icc will define
4901 # __INTEL_COMPILER regardless of CFLAGS.
4903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4904 /* end confdefs.h. */
4907 main ()
4909 #ifndef __INTEL_COMPILER
4910 choke me
4911 #endif
4913 return 0;
4915 _ACEOF
4916 if ac_fn_c_try_compile "$LINENO"; then :
4917 ICC=yes
4918 else
4919 ICC=no
4921 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4923 # Check if it's Sun Studio compiler. We assume that
4924 # __SUNPRO_C will be defined for Sun Studio compilers
4925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4926 /* end confdefs.h. */
4929 main ()
4931 #ifndef __SUNPRO_C
4932 choke me
4933 #endif
4935 return 0;
4937 _ACEOF
4938 if ac_fn_c_try_compile "$LINENO"; then :
4939 SUN_STUDIO_CC=yes
4940 else
4941 SUN_STUDIO_CC=no
4943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4949 # LLVM
4951 # Checked early because subsequent tests depend on it.
4955 # Check whether --with-llvm was given.
4956 if test "${with_llvm+set}" = set; then :
4957 withval=$with_llvm;
4958 case $withval in
4959 yes)
4961 $as_echo "#define USE_LLVM 1" >>confdefs.h
4968 as_fn_error $? "no argument expected for --with-llvm option" "$LINENO" 5
4970 esac
4972 else
4973 with_llvm=no
4979 for ac_prog in gawk mawk nawk awk
4981 # Extract the first word of "$ac_prog", so it can be a program name with args.
4982 set dummy $ac_prog; ac_word=$2
4983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4984 $as_echo_n "checking for $ac_word... " >&6; }
4985 if ${ac_cv_prog_AWK+:} false; then :
4986 $as_echo_n "(cached) " >&6
4987 else
4988 if test -n "$AWK"; then
4989 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4990 else
4991 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4992 for as_dir in $PATH
4994 IFS=$as_save_IFS
4995 test -z "$as_dir" && as_dir=.
4996 for ac_exec_ext in '' $ac_executable_extensions; do
4997 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4998 ac_cv_prog_AWK="$ac_prog"
4999 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5000 break 2
5002 done
5003 done
5004 IFS=$as_save_IFS
5008 AWK=$ac_cv_prog_AWK
5009 if test -n "$AWK"; then
5010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
5011 $as_echo "$AWK" >&6; }
5012 else
5013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5014 $as_echo "no" >&6; }
5018 test -n "$AWK" && break
5019 done
5021 if test "$with_llvm" = yes; then :
5027 if test -z "$LLVM_CONFIG"; then
5028 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
5030 # Extract the first word of "$ac_prog", so it can be a program name with args.
5031 set dummy $ac_prog; ac_word=$2
5032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5033 $as_echo_n "checking for $ac_word... " >&6; }
5034 if ${ac_cv_path_LLVM_CONFIG+:} false; then :
5035 $as_echo_n "(cached) " >&6
5036 else
5037 case $LLVM_CONFIG in
5038 [\\/]* | ?:[\\/]*)
5039 ac_cv_path_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test with a path.
5042 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5043 for as_dir in $PATH
5045 IFS=$as_save_IFS
5046 test -z "$as_dir" && as_dir=.
5047 for ac_exec_ext in '' $ac_executable_extensions; do
5048 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5049 ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5050 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5051 break 2
5053 done
5054 done
5055 IFS=$as_save_IFS
5058 esac
5060 LLVM_CONFIG=$ac_cv_path_LLVM_CONFIG
5061 if test -n "$LLVM_CONFIG"; then
5062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5063 $as_echo "$LLVM_CONFIG" >&6; }
5064 else
5065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5066 $as_echo "no" >&6; }
5070 test -n "$LLVM_CONFIG" && break
5071 done
5073 else
5074 # Report the value of LLVM_CONFIG in configure's output in all cases.
5075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LLVM_CONFIG" >&5
5076 $as_echo_n "checking for LLVM_CONFIG... " >&6; }
5077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
5078 $as_echo "$LLVM_CONFIG" >&6; }
5082 # no point continuing if llvm wasn't found
5083 if test -z "$LLVM_CONFIG"; then
5084 as_fn_error $? "llvm-config not found, but required when compiling --with-llvm, specify with LLVM_CONFIG=" "$LINENO" 5
5086 # check if detected $LLVM_CONFIG is executable
5087 pgac_llvm_version="$($LLVM_CONFIG --version 2> /dev/null || echo no)"
5088 if test "x$pgac_llvm_version" = "xno"; then
5089 as_fn_error $? "$LLVM_CONFIG does not work" "$LINENO" 5
5091 # and whether the version is supported
5092 if echo $pgac_llvm_version | $AWK -F '.' '{ if ($1 >= 4 || ($1 == 3 && $2 >= 9)) exit 1; else exit 0;}';then
5093 as_fn_error $? "$LLVM_CONFIG version is $pgac_llvm_version but at least 3.9 is required" "$LINENO" 5
5096 # need clang to create some bitcode files
5098 if test -z "$CLANG"; then
5099 for ac_prog in clang clang-7 clang-6.0 clang-5.0 clang-4.0 clang-3.9
5101 # Extract the first word of "$ac_prog", so it can be a program name with args.
5102 set dummy $ac_prog; ac_word=$2
5103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5104 $as_echo_n "checking for $ac_word... " >&6; }
5105 if ${ac_cv_path_CLANG+:} false; then :
5106 $as_echo_n "(cached) " >&6
5107 else
5108 case $CLANG in
5109 [\\/]* | ?:[\\/]*)
5110 ac_cv_path_CLANG="$CLANG" # Let the user override the test with a path.
5113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5114 for as_dir in $PATH
5116 IFS=$as_save_IFS
5117 test -z "$as_dir" && as_dir=.
5118 for ac_exec_ext in '' $ac_executable_extensions; do
5119 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5120 ac_cv_path_CLANG="$as_dir/$ac_word$ac_exec_ext"
5121 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5122 break 2
5124 done
5125 done
5126 IFS=$as_save_IFS
5129 esac
5131 CLANG=$ac_cv_path_CLANG
5132 if test -n "$CLANG"; then
5133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5134 $as_echo "$CLANG" >&6; }
5135 else
5136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5137 $as_echo "no" >&6; }
5141 test -n "$CLANG" && break
5142 done
5144 else
5145 # Report the value of CLANG in configure's output in all cases.
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CLANG" >&5
5147 $as_echo_n "checking for CLANG... " >&6; }
5148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLANG" >&5
5149 $as_echo "$CLANG" >&6; }
5152 if test -z "$CLANG"; then
5153 as_fn_error $? "clang not found, but required when compiling --with-llvm, specify with CLANG=" "$LINENO" 5
5155 # make sure clang is executable
5156 if test "x$($CLANG --version 2> /dev/null || echo no)" = "xno"; then
5157 as_fn_error $? "$CLANG does not work" "$LINENO" 5
5159 # Could check clang version, but it doesn't seem that
5160 # important. Systems with a new enough LLVM version are usually
5161 # going to have a decent clang version too. It's also not entirely
5162 # clear what the minimum version is.
5164 # Collect compiler flags necessary to build the LLVM dependent
5165 # shared library.
5166 for pgac_option in `$LLVM_CONFIG --cppflags`; do
5167 case $pgac_option in
5168 -I*|-D*) LLVM_CPPFLAGS="$pgac_option $LLVM_CPPFLAGS";;
5169 esac
5170 done
5172 for pgac_option in `$LLVM_CONFIG --ldflags`; do
5173 case $pgac_option in
5174 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
5175 esac
5176 done
5178 # ABI influencing options, standard influencing options
5179 for pgac_option in `$LLVM_CONFIG --cxxflags`; do
5180 case $pgac_option in
5181 -fno-rtti*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5182 -std=*) LLVM_CXXFLAGS="$LLVM_CXXFLAGS $pgac_option";;
5183 esac
5184 done
5186 # Look for components we're interested in, collect necessary
5187 # libs. As some components are optional, we can't just list all of
5188 # them as it'd raise an error.
5189 pgac_components='';
5190 for pgac_component in `$LLVM_CONFIG --components`; do
5191 case $pgac_component in
5192 engine) pgac_components="$pgac_components $pgac_component";;
5193 debuginfodwarf) pgac_components="$pgac_components $pgac_component";;
5194 orcjit) pgac_components="$pgac_components $pgac_component";;
5195 passes) pgac_components="$pgac_components $pgac_component";;
5196 native) pgac_components="$pgac_components $pgac_component";;
5197 perfjitevents) pgac_components="$pgac_components $pgac_component";;
5198 esac
5199 done;
5201 # And then get the libraries that need to be linked in for the
5202 # selected components. They're large libraries, we only want to
5203 # link them into the LLVM using shared library.
5204 for pgac_option in `$LLVM_CONFIG --libs --system-libs $pgac_components`; do
5205 case $pgac_option in
5206 -l*) LLVM_LIBS="$LLVM_LIBS $pgac_option";;
5207 esac
5208 done
5210 LLVM_BINPATH=`$LLVM_CONFIG --bindir`
5220 fi # fi
5223 unset CFLAGS
5224 unset CXXFLAGS
5227 # Read the template
5229 . "$srcdir/src/template/$template" || exit
5231 # C[XX]FLAGS are selected so:
5232 # If the user specifies something in the environment, that is used.
5233 # else: If the template file set something, that is used.
5234 # else: If coverage was enabled, don't set anything.
5235 # else: If the compiler is GCC, then we use -O2.
5236 # else: If the compiler is something else, then we use -O, unless debugging.
5238 if test "$ac_env_CFLAGS_set" = set; then
5239 CFLAGS=$ac_env_CFLAGS_value
5240 elif test "${CFLAGS+set}" = set; then
5241 : # (keep what template set)
5242 elif test "$enable_coverage" = yes; then
5243 : # no optimization by default
5244 elif test "$GCC" = yes; then
5245 CFLAGS="-O2"
5246 else
5247 # if the user selected debug mode, don't use -O
5248 if test "$enable_debug" != yes; then
5249 CFLAGS="-O"
5253 if test "$ac_env_CXXFLAGS_set" = set; then
5254 CXXFLAGS=$ac_env_CXXFLAGS_value
5255 elif test "${CXXFLAGS+set}" = set; then
5256 : # (keep what template set)
5257 elif test "$enable_coverage" = yes; then
5258 : # no optimization by default
5259 elif test "$GCC" = yes; then
5260 CXXFLAGS="-O2"
5261 else
5262 # if the user selected debug mode, don't use -O
5263 if test "$enable_debug" != yes; then
5264 CXXFLAGS="-O"
5268 # When generating bitcode (for inlining) we always want to use -O2
5269 # even when --enable-debug is specified. The bitcode is not going to
5270 # be used for line-by-line debugging, and JIT inlining doesn't work
5271 # without at least -O1 (otherwise clang will emit 'noinline'
5272 # attributes everywhere), which is bad for testing. Still allow the
5273 # environment to override if done explicitly.
5274 if test "$ac_env_BITCODE_CFLAGS_set" = set; then
5275 BITCODE_CFLAGS=$ac_env_BITCODE_CFLAGS_value
5276 else
5277 BITCODE_CFLAGS="-O2 $BITCODE_CFLAGS"
5279 if test "$ac_env_BITCODE_CXXFLAGS_set" = set; then
5280 BITCODE_CXXFLAGS=$ac_env_BITCODE_CXXFLAGS_value
5281 else
5282 BITCODE_CXXFLAGS="-O2 $BITCODE_CXXFLAGS"
5285 # C[XX]FLAGS we determined above will be added back at the end
5286 user_CFLAGS=$CFLAGS
5287 CFLAGS=""
5288 user_CXXFLAGS=$CXXFLAGS
5289 CXXFLAGS=""
5290 user_BITCODE_CFLAGS=$BITCODE_CFLAGS
5291 BITCODE_CFLAGS=""
5292 user_BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS
5293 BITCODE_CXXFLAGS=""
5295 # set CFLAGS_UNROLL_LOOPS and CFLAGS_VECTORIZE from the environment, if present
5296 if test "$ac_env_CFLAGS_UNROLL_LOOPS_set" = set; then
5297 CFLAGS_UNROLL_LOOPS=$ac_env_CFLAGS_UNROLL_LOOPS_value
5299 if test "$ac_env_CFLAGS_VECTORIZE_set" = set; then
5300 CFLAGS_VECTORIZE=$ac_env_CFLAGS_VECTORIZE_value
5303 # Some versions of GCC support some additional useful warning flags.
5304 # Check whether they are supported, and add them to CFLAGS if so.
5305 # ICC pretends to be GCC but it's lying; it doesn't support these flags,
5306 # but has its own. Also check other compiler-specific flags here.
5308 if test "$GCC" = yes -a "$ICC" = no; then
5309 CFLAGS="-Wall -Wmissing-prototypes -Wpointer-arith"
5310 CXXFLAGS="-Wall -Wpointer-arith"
5311 # These work in some but not all gcc versions
5312 save_CFLAGS=$CFLAGS
5314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS" >&5
5315 $as_echo_n "checking whether ${CC} supports -Wdeclaration-after-statement, for CFLAGS... " >&6; }
5316 if ${pgac_cv_prog_CC_cflags__Wdeclaration_after_statement+:} false; then :
5317 $as_echo_n "(cached) " >&6
5318 else
5319 pgac_save_CFLAGS=$CFLAGS
5320 pgac_save_CC=$CC
5321 CC=${CC}
5322 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5323 ac_save_c_werror_flag=$ac_c_werror_flag
5324 ac_c_werror_flag=yes
5325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5326 /* end confdefs.h. */
5329 main ()
5333 return 0;
5335 _ACEOF
5336 if ac_fn_c_try_compile "$LINENO"; then :
5337 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=yes
5338 else
5339 pgac_cv_prog_CC_cflags__Wdeclaration_after_statement=no
5341 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5342 ac_c_werror_flag=$ac_save_c_werror_flag
5343 CFLAGS="$pgac_save_CFLAGS"
5344 CC="$pgac_save_CC"
5346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&5
5347 $as_echo "$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" >&6; }
5348 if test x"$pgac_cv_prog_CC_cflags__Wdeclaration_after_statement" = x"yes"; then
5349 CFLAGS="${CFLAGS} -Wdeclaration-after-statement"
5353 # -Wdeclaration-after-statement isn't applicable for C++. Specific C files
5354 # disable it, so AC_SUBST the negative form.
5355 PERMIT_DECLARATION_AFTER_STATEMENT=
5356 if test x"$save_CFLAGS" != x"$CFLAGS"; then
5357 PERMIT_DECLARATION_AFTER_STATEMENT=-Wno-declaration-after-statement
5360 # Really don't want VLAs to be used in our dialect of C
5362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=vla, for CFLAGS" >&5
5363 $as_echo_n "checking whether ${CC} supports -Werror=vla, for CFLAGS... " >&6; }
5364 if ${pgac_cv_prog_CC_cflags__Werror_vla+:} false; then :
5365 $as_echo_n "(cached) " >&6
5366 else
5367 pgac_save_CFLAGS=$CFLAGS
5368 pgac_save_CC=$CC
5369 CC=${CC}
5370 CFLAGS="${CFLAGS} -Werror=vla"
5371 ac_save_c_werror_flag=$ac_c_werror_flag
5372 ac_c_werror_flag=yes
5373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5374 /* end confdefs.h. */
5377 main ()
5381 return 0;
5383 _ACEOF
5384 if ac_fn_c_try_compile "$LINENO"; then :
5385 pgac_cv_prog_CC_cflags__Werror_vla=yes
5386 else
5387 pgac_cv_prog_CC_cflags__Werror_vla=no
5389 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5390 ac_c_werror_flag=$ac_save_c_werror_flag
5391 CFLAGS="$pgac_save_CFLAGS"
5392 CC="$pgac_save_CC"
5394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_vla" >&5
5395 $as_echo "$pgac_cv_prog_CC_cflags__Werror_vla" >&6; }
5396 if test x"$pgac_cv_prog_CC_cflags__Werror_vla" = x"yes"; then
5397 CFLAGS="${CFLAGS} -Werror=vla"
5401 # On macOS, complain about usage of symbols newer than the deployment target
5403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS" >&5
5404 $as_echo_n "checking whether ${CC} supports -Werror=unguarded-availability-new, for CFLAGS... " >&6; }
5405 if ${pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new+:} false; then :
5406 $as_echo_n "(cached) " >&6
5407 else
5408 pgac_save_CFLAGS=$CFLAGS
5409 pgac_save_CC=$CC
5410 CC=${CC}
5411 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5412 ac_save_c_werror_flag=$ac_c_werror_flag
5413 ac_c_werror_flag=yes
5414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5415 /* end confdefs.h. */
5418 main ()
5422 return 0;
5424 _ACEOF
5425 if ac_fn_c_try_compile "$LINENO"; then :
5426 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=yes
5427 else
5428 pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new=no
5430 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5431 ac_c_werror_flag=$ac_save_c_werror_flag
5432 CFLAGS="$pgac_save_CFLAGS"
5433 CC="$pgac_save_CC"
5435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&5
5436 $as_echo "$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" >&6; }
5437 if test x"$pgac_cv_prog_CC_cflags__Werror_unguarded_availability_new" = x"yes"; then
5438 CFLAGS="${CFLAGS} -Werror=unguarded-availability-new"
5442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS" >&5
5443 $as_echo_n "checking whether ${CXX} supports -Werror=unguarded-availability-new, for CXXFLAGS... " >&6; }
5444 if ${pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new+:} false; then :
5445 $as_echo_n "(cached) " >&6
5446 else
5447 pgac_save_CXXFLAGS=$CXXFLAGS
5448 pgac_save_CXX=$CXX
5449 CXX=${CXX}
5450 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5451 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5452 ac_cxx_werror_flag=yes
5453 ac_ext=cpp
5454 ac_cpp='$CXXCPP $CPPFLAGS'
5455 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5456 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5457 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5460 /* end confdefs.h. */
5463 main ()
5467 return 0;
5469 _ACEOF
5470 if ac_fn_cxx_try_compile "$LINENO"; then :
5471 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=yes
5472 else
5473 pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new=no
5475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476 ac_ext=c
5477 ac_cpp='$CPP $CPPFLAGS'
5478 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5479 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5480 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5482 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5483 CXXFLAGS="$pgac_save_CXXFLAGS"
5484 CXX="$pgac_save_CXX"
5486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&5
5487 $as_echo "$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" >&6; }
5488 if test x"$pgac_cv_prog_CXX_cxxflags__Werror_unguarded_availability_new" = x"yes"; then
5489 CXXFLAGS="${CXXFLAGS} -Werror=unguarded-availability-new"
5493 # -Wvla is not applicable for C++
5495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wendif-labels, for CFLAGS" >&5
5496 $as_echo_n "checking whether ${CC} supports -Wendif-labels, for CFLAGS... " >&6; }
5497 if ${pgac_cv_prog_CC_cflags__Wendif_labels+:} false; then :
5498 $as_echo_n "(cached) " >&6
5499 else
5500 pgac_save_CFLAGS=$CFLAGS
5501 pgac_save_CC=$CC
5502 CC=${CC}
5503 CFLAGS="${CFLAGS} -Wendif-labels"
5504 ac_save_c_werror_flag=$ac_c_werror_flag
5505 ac_c_werror_flag=yes
5506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5507 /* end confdefs.h. */
5510 main ()
5514 return 0;
5516 _ACEOF
5517 if ac_fn_c_try_compile "$LINENO"; then :
5518 pgac_cv_prog_CC_cflags__Wendif_labels=yes
5519 else
5520 pgac_cv_prog_CC_cflags__Wendif_labels=no
5522 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5523 ac_c_werror_flag=$ac_save_c_werror_flag
5524 CFLAGS="$pgac_save_CFLAGS"
5525 CC="$pgac_save_CC"
5527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wendif_labels" >&5
5528 $as_echo "$pgac_cv_prog_CC_cflags__Wendif_labels" >&6; }
5529 if test x"$pgac_cv_prog_CC_cflags__Wendif_labels" = x"yes"; then
5530 CFLAGS="${CFLAGS} -Wendif-labels"
5534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS" >&5
5535 $as_echo_n "checking whether ${CXX} supports -Wendif-labels, for CXXFLAGS... " >&6; }
5536 if ${pgac_cv_prog_CXX_cxxflags__Wendif_labels+:} false; then :
5537 $as_echo_n "(cached) " >&6
5538 else
5539 pgac_save_CXXFLAGS=$CXXFLAGS
5540 pgac_save_CXX=$CXX
5541 CXX=${CXX}
5542 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5543 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5544 ac_cxx_werror_flag=yes
5545 ac_ext=cpp
5546 ac_cpp='$CXXCPP $CPPFLAGS'
5547 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5548 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5549 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5552 /* end confdefs.h. */
5555 main ()
5559 return 0;
5561 _ACEOF
5562 if ac_fn_cxx_try_compile "$LINENO"; then :
5563 pgac_cv_prog_CXX_cxxflags__Wendif_labels=yes
5564 else
5565 pgac_cv_prog_CXX_cxxflags__Wendif_labels=no
5567 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5568 ac_ext=c
5569 ac_cpp='$CPP $CPPFLAGS'
5570 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5571 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5572 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5574 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5575 CXXFLAGS="$pgac_save_CXXFLAGS"
5576 CXX="$pgac_save_CXX"
5578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&5
5579 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wendif_labels" >&6; }
5580 if test x"$pgac_cv_prog_CXX_cxxflags__Wendif_labels" = x"yes"; then
5581 CXXFLAGS="${CXXFLAGS} -Wendif-labels"
5586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS" >&5
5587 $as_echo_n "checking whether ${CC} supports -Wmissing-format-attribute, for CFLAGS... " >&6; }
5588 if ${pgac_cv_prog_CC_cflags__Wmissing_format_attribute+:} false; then :
5589 $as_echo_n "(cached) " >&6
5590 else
5591 pgac_save_CFLAGS=$CFLAGS
5592 pgac_save_CC=$CC
5593 CC=${CC}
5594 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5595 ac_save_c_werror_flag=$ac_c_werror_flag
5596 ac_c_werror_flag=yes
5597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5598 /* end confdefs.h. */
5601 main ()
5605 return 0;
5607 _ACEOF
5608 if ac_fn_c_try_compile "$LINENO"; then :
5609 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=yes
5610 else
5611 pgac_cv_prog_CC_cflags__Wmissing_format_attribute=no
5613 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5614 ac_c_werror_flag=$ac_save_c_werror_flag
5615 CFLAGS="$pgac_save_CFLAGS"
5616 CC="$pgac_save_CC"
5618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&5
5619 $as_echo "$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" >&6; }
5620 if test x"$pgac_cv_prog_CC_cflags__Wmissing_format_attribute" = x"yes"; then
5621 CFLAGS="${CFLAGS} -Wmissing-format-attribute"
5625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS" >&5
5626 $as_echo_n "checking whether ${CXX} supports -Wmissing-format-attribute, for CXXFLAGS... " >&6; }
5627 if ${pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute+:} false; then :
5628 $as_echo_n "(cached) " >&6
5629 else
5630 pgac_save_CXXFLAGS=$CXXFLAGS
5631 pgac_save_CXX=$CXX
5632 CXX=${CXX}
5633 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5634 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5635 ac_cxx_werror_flag=yes
5636 ac_ext=cpp
5637 ac_cpp='$CXXCPP $CPPFLAGS'
5638 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5639 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5640 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5643 /* end confdefs.h. */
5646 main ()
5650 return 0;
5652 _ACEOF
5653 if ac_fn_cxx_try_compile "$LINENO"; then :
5654 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=yes
5655 else
5656 pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute=no
5658 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5659 ac_ext=c
5660 ac_cpp='$CPP $CPPFLAGS'
5661 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5662 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5663 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5665 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5666 CXXFLAGS="$pgac_save_CXXFLAGS"
5667 CXX="$pgac_save_CXX"
5669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&5
5670 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" >&6; }
5671 if test x"$pgac_cv_prog_CXX_cxxflags__Wmissing_format_attribute" = x"yes"; then
5672 CXXFLAGS="${CXXFLAGS} -Wmissing-format-attribute"
5677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS" >&5
5678 $as_echo_n "checking whether ${CC} supports -Wimplicit-fallthrough=3, for CFLAGS... " >&6; }
5679 if ${pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3+:} false; then :
5680 $as_echo_n "(cached) " >&6
5681 else
5682 pgac_save_CFLAGS=$CFLAGS
5683 pgac_save_CC=$CC
5684 CC=${CC}
5685 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5686 ac_save_c_werror_flag=$ac_c_werror_flag
5687 ac_c_werror_flag=yes
5688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5689 /* end confdefs.h. */
5692 main ()
5696 return 0;
5698 _ACEOF
5699 if ac_fn_c_try_compile "$LINENO"; then :
5700 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=yes
5701 else
5702 pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3=no
5704 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5705 ac_c_werror_flag=$ac_save_c_werror_flag
5706 CFLAGS="$pgac_save_CFLAGS"
5707 CC="$pgac_save_CC"
5709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&5
5710 $as_echo "$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" >&6; }
5711 if test x"$pgac_cv_prog_CC_cflags__Wimplicit_fallthrough_3" = x"yes"; then
5712 CFLAGS="${CFLAGS} -Wimplicit-fallthrough=3"
5716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS" >&5
5717 $as_echo_n "checking whether ${CXX} supports -Wimplicit-fallthrough=3, for CXXFLAGS... " >&6; }
5718 if ${pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3+:} false; then :
5719 $as_echo_n "(cached) " >&6
5720 else
5721 pgac_save_CXXFLAGS=$CXXFLAGS
5722 pgac_save_CXX=$CXX
5723 CXX=${CXX}
5724 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5725 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5726 ac_cxx_werror_flag=yes
5727 ac_ext=cpp
5728 ac_cpp='$CXXCPP $CPPFLAGS'
5729 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5730 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5731 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5734 /* end confdefs.h. */
5737 main ()
5741 return 0;
5743 _ACEOF
5744 if ac_fn_cxx_try_compile "$LINENO"; then :
5745 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=yes
5746 else
5747 pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3=no
5749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5750 ac_ext=c
5751 ac_cpp='$CPP $CPPFLAGS'
5752 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5753 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5754 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5756 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5757 CXXFLAGS="$pgac_save_CXXFLAGS"
5758 CXX="$pgac_save_CXX"
5760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&5
5761 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" >&6; }
5762 if test x"$pgac_cv_prog_CXX_cxxflags__Wimplicit_fallthrough_3" = x"yes"; then
5763 CXXFLAGS="${CXXFLAGS} -Wimplicit-fallthrough=3"
5768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcast-function-type, for CFLAGS" >&5
5769 $as_echo_n "checking whether ${CC} supports -Wcast-function-type, for CFLAGS... " >&6; }
5770 if ${pgac_cv_prog_CC_cflags__Wcast_function_type+:} false; then :
5771 $as_echo_n "(cached) " >&6
5772 else
5773 pgac_save_CFLAGS=$CFLAGS
5774 pgac_save_CC=$CC
5775 CC=${CC}
5776 CFLAGS="${CFLAGS} -Wcast-function-type"
5777 ac_save_c_werror_flag=$ac_c_werror_flag
5778 ac_c_werror_flag=yes
5779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5780 /* end confdefs.h. */
5783 main ()
5787 return 0;
5789 _ACEOF
5790 if ac_fn_c_try_compile "$LINENO"; then :
5791 pgac_cv_prog_CC_cflags__Wcast_function_type=yes
5792 else
5793 pgac_cv_prog_CC_cflags__Wcast_function_type=no
5795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5796 ac_c_werror_flag=$ac_save_c_werror_flag
5797 CFLAGS="$pgac_save_CFLAGS"
5798 CC="$pgac_save_CC"
5800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcast_function_type" >&5
5801 $as_echo "$pgac_cv_prog_CC_cflags__Wcast_function_type" >&6; }
5802 if test x"$pgac_cv_prog_CC_cflags__Wcast_function_type" = x"yes"; then
5803 CFLAGS="${CFLAGS} -Wcast-function-type"
5807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS" >&5
5808 $as_echo_n "checking whether ${CXX} supports -Wcast-function-type, for CXXFLAGS... " >&6; }
5809 if ${pgac_cv_prog_CXX_cxxflags__Wcast_function_type+:} false; then :
5810 $as_echo_n "(cached) " >&6
5811 else
5812 pgac_save_CXXFLAGS=$CXXFLAGS
5813 pgac_save_CXX=$CXX
5814 CXX=${CXX}
5815 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5816 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5817 ac_cxx_werror_flag=yes
5818 ac_ext=cpp
5819 ac_cpp='$CXXCPP $CPPFLAGS'
5820 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5821 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5822 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5825 /* end confdefs.h. */
5828 main ()
5832 return 0;
5834 _ACEOF
5835 if ac_fn_cxx_try_compile "$LINENO"; then :
5836 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=yes
5837 else
5838 pgac_cv_prog_CXX_cxxflags__Wcast_function_type=no
5840 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5841 ac_ext=c
5842 ac_cpp='$CPP $CPPFLAGS'
5843 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5844 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5845 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5847 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5848 CXXFLAGS="$pgac_save_CXXFLAGS"
5849 CXX="$pgac_save_CXX"
5851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&5
5852 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" >&6; }
5853 if test x"$pgac_cv_prog_CXX_cxxflags__Wcast_function_type" = x"yes"; then
5854 CXXFLAGS="${CXXFLAGS} -Wcast-function-type"
5858 # This was included in -Wall/-Wformat in older GCC versions
5860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-security, for CFLAGS" >&5
5861 $as_echo_n "checking whether ${CC} supports -Wformat-security, for CFLAGS... " >&6; }
5862 if ${pgac_cv_prog_CC_cflags__Wformat_security+:} false; then :
5863 $as_echo_n "(cached) " >&6
5864 else
5865 pgac_save_CFLAGS=$CFLAGS
5866 pgac_save_CC=$CC
5867 CC=${CC}
5868 CFLAGS="${CFLAGS} -Wformat-security"
5869 ac_save_c_werror_flag=$ac_c_werror_flag
5870 ac_c_werror_flag=yes
5871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5872 /* end confdefs.h. */
5875 main ()
5879 return 0;
5881 _ACEOF
5882 if ac_fn_c_try_compile "$LINENO"; then :
5883 pgac_cv_prog_CC_cflags__Wformat_security=yes
5884 else
5885 pgac_cv_prog_CC_cflags__Wformat_security=no
5887 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5888 ac_c_werror_flag=$ac_save_c_werror_flag
5889 CFLAGS="$pgac_save_CFLAGS"
5890 CC="$pgac_save_CC"
5892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_security" >&5
5893 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_security" >&6; }
5894 if test x"$pgac_cv_prog_CC_cflags__Wformat_security" = x"yes"; then
5895 CFLAGS="${CFLAGS} -Wformat-security"
5899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -Wformat-security, for CXXFLAGS" >&5
5900 $as_echo_n "checking whether ${CXX} supports -Wformat-security, for CXXFLAGS... " >&6; }
5901 if ${pgac_cv_prog_CXX_cxxflags__Wformat_security+:} false; then :
5902 $as_echo_n "(cached) " >&6
5903 else
5904 pgac_save_CXXFLAGS=$CXXFLAGS
5905 pgac_save_CXX=$CXX
5906 CXX=${CXX}
5907 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5908 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
5909 ac_cxx_werror_flag=yes
5910 ac_ext=cpp
5911 ac_cpp='$CXXCPP $CPPFLAGS'
5912 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5913 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5914 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5917 /* end confdefs.h. */
5920 main ()
5924 return 0;
5926 _ACEOF
5927 if ac_fn_cxx_try_compile "$LINENO"; then :
5928 pgac_cv_prog_CXX_cxxflags__Wformat_security=yes
5929 else
5930 pgac_cv_prog_CXX_cxxflags__Wformat_security=no
5932 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5933 ac_ext=c
5934 ac_cpp='$CPP $CPPFLAGS'
5935 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5936 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5937 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5939 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
5940 CXXFLAGS="$pgac_save_CXXFLAGS"
5941 CXX="$pgac_save_CXX"
5943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__Wformat_security" >&5
5944 $as_echo "$pgac_cv_prog_CXX_cxxflags__Wformat_security" >&6; }
5945 if test x"$pgac_cv_prog_CXX_cxxflags__Wformat_security" = x"yes"; then
5946 CXXFLAGS="${CXXFLAGS} -Wformat-security"
5950 # Disable strict-aliasing rules; needed for gcc 3.3+
5952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
5953 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
5954 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
5955 $as_echo_n "(cached) " >&6
5956 else
5957 pgac_save_CFLAGS=$CFLAGS
5958 pgac_save_CC=$CC
5959 CC=${CC}
5960 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5961 ac_save_c_werror_flag=$ac_c_werror_flag
5962 ac_c_werror_flag=yes
5963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5964 /* end confdefs.h. */
5967 main ()
5971 return 0;
5973 _ACEOF
5974 if ac_fn_c_try_compile "$LINENO"; then :
5975 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
5976 else
5977 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
5979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5980 ac_c_werror_flag=$ac_save_c_werror_flag
5981 CFLAGS="$pgac_save_CFLAGS"
5982 CC="$pgac_save_CC"
5984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
5985 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
5986 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
5987 CFLAGS="${CFLAGS} -fno-strict-aliasing"
5991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
5992 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
5993 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
5994 $as_echo_n "(cached) " >&6
5995 else
5996 pgac_save_CXXFLAGS=$CXXFLAGS
5997 pgac_save_CXX=$CXX
5998 CXX=${CXX}
5999 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6000 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6001 ac_cxx_werror_flag=yes
6002 ac_ext=cpp
6003 ac_cpp='$CXXCPP $CPPFLAGS'
6004 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6005 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6006 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6009 /* end confdefs.h. */
6012 main ()
6016 return 0;
6018 _ACEOF
6019 if ac_fn_cxx_try_compile "$LINENO"; then :
6020 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6021 else
6022 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6025 ac_ext=c
6026 ac_cpp='$CPP $CPPFLAGS'
6027 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6028 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6029 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6031 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6032 CXXFLAGS="$pgac_save_CXXFLAGS"
6033 CXX="$pgac_save_CXX"
6035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6036 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6037 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6038 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6042 # Disable optimizations that assume no overflow; needed for gcc 4.3+
6044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fwrapv, for CFLAGS" >&5
6045 $as_echo_n "checking whether ${CC} supports -fwrapv, for CFLAGS... " >&6; }
6046 if ${pgac_cv_prog_CC_cflags__fwrapv+:} false; then :
6047 $as_echo_n "(cached) " >&6
6048 else
6049 pgac_save_CFLAGS=$CFLAGS
6050 pgac_save_CC=$CC
6051 CC=${CC}
6052 CFLAGS="${CFLAGS} -fwrapv"
6053 ac_save_c_werror_flag=$ac_c_werror_flag
6054 ac_c_werror_flag=yes
6055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6056 /* end confdefs.h. */
6059 main ()
6063 return 0;
6065 _ACEOF
6066 if ac_fn_c_try_compile "$LINENO"; then :
6067 pgac_cv_prog_CC_cflags__fwrapv=yes
6068 else
6069 pgac_cv_prog_CC_cflags__fwrapv=no
6071 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6072 ac_c_werror_flag=$ac_save_c_werror_flag
6073 CFLAGS="$pgac_save_CFLAGS"
6074 CC="$pgac_save_CC"
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fwrapv" >&5
6077 $as_echo "$pgac_cv_prog_CC_cflags__fwrapv" >&6; }
6078 if test x"$pgac_cv_prog_CC_cflags__fwrapv" = x"yes"; then
6079 CFLAGS="${CFLAGS} -fwrapv"
6083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fwrapv, for CXXFLAGS" >&5
6084 $as_echo_n "checking whether ${CXX} supports -fwrapv, for CXXFLAGS... " >&6; }
6085 if ${pgac_cv_prog_CXX_cxxflags__fwrapv+:} false; then :
6086 $as_echo_n "(cached) " >&6
6087 else
6088 pgac_save_CXXFLAGS=$CXXFLAGS
6089 pgac_save_CXX=$CXX
6090 CXX=${CXX}
6091 CXXFLAGS="${CXXFLAGS} -fwrapv"
6092 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6093 ac_cxx_werror_flag=yes
6094 ac_ext=cpp
6095 ac_cpp='$CXXCPP $CPPFLAGS'
6096 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6097 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6098 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6101 /* end confdefs.h. */
6104 main ()
6108 return 0;
6110 _ACEOF
6111 if ac_fn_cxx_try_compile "$LINENO"; then :
6112 pgac_cv_prog_CXX_cxxflags__fwrapv=yes
6113 else
6114 pgac_cv_prog_CXX_cxxflags__fwrapv=no
6116 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6117 ac_ext=c
6118 ac_cpp='$CPP $CPPFLAGS'
6119 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6120 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6121 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6123 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6124 CXXFLAGS="$pgac_save_CXXFLAGS"
6125 CXX="$pgac_save_CXX"
6127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fwrapv" >&5
6128 $as_echo "$pgac_cv_prog_CXX_cxxflags__fwrapv" >&6; }
6129 if test x"$pgac_cv_prog_CXX_cxxflags__fwrapv" = x"yes"; then
6130 CXXFLAGS="${CXXFLAGS} -fwrapv"
6134 # Disable FP optimizations that cause various errors on gcc 4.5+ or maybe 4.6+
6136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS" >&5
6137 $as_echo_n "checking whether ${CC} supports -fexcess-precision=standard, for CFLAGS... " >&6; }
6138 if ${pgac_cv_prog_CC_cflags__fexcess_precision_standard+:} false; then :
6139 $as_echo_n "(cached) " >&6
6140 else
6141 pgac_save_CFLAGS=$CFLAGS
6142 pgac_save_CC=$CC
6143 CC=${CC}
6144 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6145 ac_save_c_werror_flag=$ac_c_werror_flag
6146 ac_c_werror_flag=yes
6147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6148 /* end confdefs.h. */
6151 main ()
6155 return 0;
6157 _ACEOF
6158 if ac_fn_c_try_compile "$LINENO"; then :
6159 pgac_cv_prog_CC_cflags__fexcess_precision_standard=yes
6160 else
6161 pgac_cv_prog_CC_cflags__fexcess_precision_standard=no
6163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6164 ac_c_werror_flag=$ac_save_c_werror_flag
6165 CFLAGS="$pgac_save_CFLAGS"
6166 CC="$pgac_save_CC"
6168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&5
6169 $as_echo "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" >&6; }
6170 if test x"$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = x"yes"; then
6171 CFLAGS="${CFLAGS} -fexcess-precision=standard"
6175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS" >&5
6176 $as_echo_n "checking whether ${CXX} supports -fexcess-precision=standard, for CXXFLAGS... " >&6; }
6177 if ${pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard+:} false; then :
6178 $as_echo_n "(cached) " >&6
6179 else
6180 pgac_save_CXXFLAGS=$CXXFLAGS
6181 pgac_save_CXX=$CXX
6182 CXX=${CXX}
6183 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6184 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6185 ac_cxx_werror_flag=yes
6186 ac_ext=cpp
6187 ac_cpp='$CXXCPP $CPPFLAGS'
6188 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6189 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6190 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6193 /* end confdefs.h. */
6196 main ()
6200 return 0;
6202 _ACEOF
6203 if ac_fn_cxx_try_compile "$LINENO"; then :
6204 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=yes
6205 else
6206 pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard=no
6208 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6209 ac_ext=c
6210 ac_cpp='$CPP $CPPFLAGS'
6211 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6212 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6213 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6215 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6216 CXXFLAGS="$pgac_save_CXXFLAGS"
6217 CXX="$pgac_save_CXX"
6219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&5
6220 $as_echo "$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" >&6; }
6221 if test x"$pgac_cv_prog_CXX_cxxflags__fexcess_precision_standard" = x"yes"; then
6222 CXXFLAGS="${CXXFLAGS} -fexcess-precision=standard"
6226 # Optimization flags for specific files that benefit from loop unrolling
6227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS" >&5
6228 $as_echo_n "checking whether ${CC} supports -funroll-loops, for CFLAGS_UNROLL_LOOPS... " >&6; }
6229 if ${pgac_cv_prog_CC_cflags__funroll_loops+:} false; then :
6230 $as_echo_n "(cached) " >&6
6231 else
6232 pgac_save_CFLAGS=$CFLAGS
6233 pgac_save_CC=$CC
6234 CC=${CC}
6235 CFLAGS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6236 ac_save_c_werror_flag=$ac_c_werror_flag
6237 ac_c_werror_flag=yes
6238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6239 /* end confdefs.h. */
6242 main ()
6246 return 0;
6248 _ACEOF
6249 if ac_fn_c_try_compile "$LINENO"; then :
6250 pgac_cv_prog_CC_cflags__funroll_loops=yes
6251 else
6252 pgac_cv_prog_CC_cflags__funroll_loops=no
6254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6255 ac_c_werror_flag=$ac_save_c_werror_flag
6256 CFLAGS="$pgac_save_CFLAGS"
6257 CC="$pgac_save_CC"
6259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__funroll_loops" >&5
6260 $as_echo "$pgac_cv_prog_CC_cflags__funroll_loops" >&6; }
6261 if test x"$pgac_cv_prog_CC_cflags__funroll_loops" = x"yes"; then
6262 CFLAGS_UNROLL_LOOPS="${CFLAGS_UNROLL_LOOPS} -funroll-loops"
6266 # Optimization flags for specific files that benefit from vectorization
6267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE" >&5
6268 $as_echo_n "checking whether ${CC} supports -ftree-vectorize, for CFLAGS_VECTORIZE... " >&6; }
6269 if ${pgac_cv_prog_CC_cflags__ftree_vectorize+:} false; then :
6270 $as_echo_n "(cached) " >&6
6271 else
6272 pgac_save_CFLAGS=$CFLAGS
6273 pgac_save_CC=$CC
6274 CC=${CC}
6275 CFLAGS="${CFLAGS_VECTORIZE} -ftree-vectorize"
6276 ac_save_c_werror_flag=$ac_c_werror_flag
6277 ac_c_werror_flag=yes
6278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6279 /* end confdefs.h. */
6282 main ()
6286 return 0;
6288 _ACEOF
6289 if ac_fn_c_try_compile "$LINENO"; then :
6290 pgac_cv_prog_CC_cflags__ftree_vectorize=yes
6291 else
6292 pgac_cv_prog_CC_cflags__ftree_vectorize=no
6294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6295 ac_c_werror_flag=$ac_save_c_werror_flag
6296 CFLAGS="$pgac_save_CFLAGS"
6297 CC="$pgac_save_CC"
6299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__ftree_vectorize" >&5
6300 $as_echo "$pgac_cv_prog_CC_cflags__ftree_vectorize" >&6; }
6301 if test x"$pgac_cv_prog_CC_cflags__ftree_vectorize" = x"yes"; then
6302 CFLAGS_VECTORIZE="${CFLAGS_VECTORIZE} -ftree-vectorize"
6307 # The following tests want to suppress various unhelpful warnings by adding
6308 # -Wno-foo switches. But gcc won't complain about unrecognized -Wno-foo
6309 # switches, so we have to test for the positive form and if that works,
6310 # add the negative form. Note that tests of this form typically need to
6311 # be duplicated in the BITCODE_CFLAGS setup stanza below.
6313 # Suppress clang's unhelpful unused-command-line-argument warnings.
6314 NOT_THE_CFLAGS=""
6315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
6316 $as_echo_n "checking whether ${CC} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
6317 if ${pgac_cv_prog_CC_cflags__Wunused_command_line_argument+:} false; then :
6318 $as_echo_n "(cached) " >&6
6319 else
6320 pgac_save_CFLAGS=$CFLAGS
6321 pgac_save_CC=$CC
6322 CC=${CC}
6323 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6324 ac_save_c_werror_flag=$ac_c_werror_flag
6325 ac_c_werror_flag=yes
6326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6327 /* end confdefs.h. */
6330 main ()
6334 return 0;
6336 _ACEOF
6337 if ac_fn_c_try_compile "$LINENO"; then :
6338 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=yes
6339 else
6340 pgac_cv_prog_CC_cflags__Wunused_command_line_argument=no
6342 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6343 ac_c_werror_flag=$ac_save_c_werror_flag
6344 CFLAGS="$pgac_save_CFLAGS"
6345 CC="$pgac_save_CC"
6347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&5
6348 $as_echo "$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" >&6; }
6349 if test x"$pgac_cv_prog_CC_cflags__Wunused_command_line_argument" = x"yes"; then
6350 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
6354 if test -n "$NOT_THE_CFLAGS"; then
6355 CFLAGS="$CFLAGS -Wno-unused-command-line-argument"
6357 # Remove clang 12+'s compound-token-split-by-macro, as this causes a lot
6358 # of warnings when building plperl because of usages in the Perl headers.
6359 NOT_THE_CFLAGS=""
6360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
6361 $as_echo_n "checking whether ${CC} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
6362 if ${pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro+:} false; then :
6363 $as_echo_n "(cached) " >&6
6364 else
6365 pgac_save_CFLAGS=$CFLAGS
6366 pgac_save_CC=$CC
6367 CC=${CC}
6368 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6369 ac_save_c_werror_flag=$ac_c_werror_flag
6370 ac_c_werror_flag=yes
6371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6372 /* end confdefs.h. */
6375 main ()
6379 return 0;
6381 _ACEOF
6382 if ac_fn_c_try_compile "$LINENO"; then :
6383 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=yes
6384 else
6385 pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro=no
6387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6388 ac_c_werror_flag=$ac_save_c_werror_flag
6389 CFLAGS="$pgac_save_CFLAGS"
6390 CC="$pgac_save_CC"
6392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&5
6393 $as_echo "$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" >&6; }
6394 if test x"$pgac_cv_prog_CC_cflags__Wcompound_token_split_by_macro" = x"yes"; then
6395 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
6399 if test -n "$NOT_THE_CFLAGS"; then
6400 CFLAGS="$CFLAGS -Wno-compound-token-split-by-macro"
6402 # Similarly disable useless truncation warnings from gcc 8+
6403 NOT_THE_CFLAGS=""
6404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
6405 $as_echo_n "checking whether ${CC} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
6406 if ${pgac_cv_prog_CC_cflags__Wformat_truncation+:} false; then :
6407 $as_echo_n "(cached) " >&6
6408 else
6409 pgac_save_CFLAGS=$CFLAGS
6410 pgac_save_CC=$CC
6411 CC=${CC}
6412 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6413 ac_save_c_werror_flag=$ac_c_werror_flag
6414 ac_c_werror_flag=yes
6415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6416 /* end confdefs.h. */
6419 main ()
6423 return 0;
6425 _ACEOF
6426 if ac_fn_c_try_compile "$LINENO"; then :
6427 pgac_cv_prog_CC_cflags__Wformat_truncation=yes
6428 else
6429 pgac_cv_prog_CC_cflags__Wformat_truncation=no
6431 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6432 ac_c_werror_flag=$ac_save_c_werror_flag
6433 CFLAGS="$pgac_save_CFLAGS"
6434 CC="$pgac_save_CC"
6436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wformat_truncation" >&5
6437 $as_echo "$pgac_cv_prog_CC_cflags__Wformat_truncation" >&6; }
6438 if test x"$pgac_cv_prog_CC_cflags__Wformat_truncation" = x"yes"; then
6439 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
6443 if test -n "$NOT_THE_CFLAGS"; then
6444 CFLAGS="$CFLAGS -Wno-format-truncation"
6446 NOT_THE_CFLAGS=""
6447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
6448 $as_echo_n "checking whether ${CC} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
6449 if ${pgac_cv_prog_CC_cflags__Wstringop_truncation+:} false; then :
6450 $as_echo_n "(cached) " >&6
6451 else
6452 pgac_save_CFLAGS=$CFLAGS
6453 pgac_save_CC=$CC
6454 CC=${CC}
6455 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6456 ac_save_c_werror_flag=$ac_c_werror_flag
6457 ac_c_werror_flag=yes
6458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6459 /* end confdefs.h. */
6462 main ()
6466 return 0;
6468 _ACEOF
6469 if ac_fn_c_try_compile "$LINENO"; then :
6470 pgac_cv_prog_CC_cflags__Wstringop_truncation=yes
6471 else
6472 pgac_cv_prog_CC_cflags__Wstringop_truncation=no
6474 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6475 ac_c_werror_flag=$ac_save_c_werror_flag
6476 CFLAGS="$pgac_save_CFLAGS"
6477 CC="$pgac_save_CC"
6479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__Wstringop_truncation" >&5
6480 $as_echo "$pgac_cv_prog_CC_cflags__Wstringop_truncation" >&6; }
6481 if test x"$pgac_cv_prog_CC_cflags__Wstringop_truncation" = x"yes"; then
6482 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
6486 if test -n "$NOT_THE_CFLAGS"; then
6487 CFLAGS="$CFLAGS -Wno-stringop-truncation"
6489 elif test "$ICC" = yes; then
6490 # Intel's compiler has a bug/misoptimization in checking for
6491 # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
6493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -mp1, for CFLAGS" >&5
6494 $as_echo_n "checking whether ${CC} supports -mp1, for CFLAGS... " >&6; }
6495 if ${pgac_cv_prog_CC_cflags__mp1+:} false; then :
6496 $as_echo_n "(cached) " >&6
6497 else
6498 pgac_save_CFLAGS=$CFLAGS
6499 pgac_save_CC=$CC
6500 CC=${CC}
6501 CFLAGS="${CFLAGS} -mp1"
6502 ac_save_c_werror_flag=$ac_c_werror_flag
6503 ac_c_werror_flag=yes
6504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6505 /* end confdefs.h. */
6508 main ()
6512 return 0;
6514 _ACEOF
6515 if ac_fn_c_try_compile "$LINENO"; then :
6516 pgac_cv_prog_CC_cflags__mp1=yes
6517 else
6518 pgac_cv_prog_CC_cflags__mp1=no
6520 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6521 ac_c_werror_flag=$ac_save_c_werror_flag
6522 CFLAGS="$pgac_save_CFLAGS"
6523 CC="$pgac_save_CC"
6525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__mp1" >&5
6526 $as_echo "$pgac_cv_prog_CC_cflags__mp1" >&6; }
6527 if test x"$pgac_cv_prog_CC_cflags__mp1" = x"yes"; then
6528 CFLAGS="${CFLAGS} -mp1"
6532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -mp1, for CXXFLAGS" >&5
6533 $as_echo_n "checking whether ${CXX} supports -mp1, for CXXFLAGS... " >&6; }
6534 if ${pgac_cv_prog_CXX_cxxflags__mp1+:} false; then :
6535 $as_echo_n "(cached) " >&6
6536 else
6537 pgac_save_CXXFLAGS=$CXXFLAGS
6538 pgac_save_CXX=$CXX
6539 CXX=${CXX}
6540 CXXFLAGS="${CXXFLAGS} -mp1"
6541 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6542 ac_cxx_werror_flag=yes
6543 ac_ext=cpp
6544 ac_cpp='$CXXCPP $CPPFLAGS'
6545 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6546 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6547 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6550 /* end confdefs.h. */
6553 main ()
6557 return 0;
6559 _ACEOF
6560 if ac_fn_cxx_try_compile "$LINENO"; then :
6561 pgac_cv_prog_CXX_cxxflags__mp1=yes
6562 else
6563 pgac_cv_prog_CXX_cxxflags__mp1=no
6565 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6566 ac_ext=c
6567 ac_cpp='$CPP $CPPFLAGS'
6568 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6569 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6570 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6572 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6573 CXXFLAGS="$pgac_save_CXXFLAGS"
6574 CXX="$pgac_save_CXX"
6576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__mp1" >&5
6577 $as_echo "$pgac_cv_prog_CXX_cxxflags__mp1" >&6; }
6578 if test x"$pgac_cv_prog_CXX_cxxflags__mp1" = x"yes"; then
6579 CXXFLAGS="${CXXFLAGS} -mp1"
6583 # Make sure strict aliasing is off (though this is said to be the default)
6585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS" >&5
6586 $as_echo_n "checking whether ${CC} supports -fno-strict-aliasing, for CFLAGS... " >&6; }
6587 if ${pgac_cv_prog_CC_cflags__fno_strict_aliasing+:} false; then :
6588 $as_echo_n "(cached) " >&6
6589 else
6590 pgac_save_CFLAGS=$CFLAGS
6591 pgac_save_CC=$CC
6592 CC=${CC}
6593 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6594 ac_save_c_werror_flag=$ac_c_werror_flag
6595 ac_c_werror_flag=yes
6596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6597 /* end confdefs.h. */
6600 main ()
6604 return 0;
6606 _ACEOF
6607 if ac_fn_c_try_compile "$LINENO"; then :
6608 pgac_cv_prog_CC_cflags__fno_strict_aliasing=yes
6609 else
6610 pgac_cv_prog_CC_cflags__fno_strict_aliasing=no
6612 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6613 ac_c_werror_flag=$ac_save_c_werror_flag
6614 CFLAGS="$pgac_save_CFLAGS"
6615 CC="$pgac_save_CC"
6617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&5
6618 $as_echo "$pgac_cv_prog_CC_cflags__fno_strict_aliasing" >&6; }
6619 if test x"$pgac_cv_prog_CC_cflags__fno_strict_aliasing" = x"yes"; then
6620 CFLAGS="${CFLAGS} -fno-strict-aliasing"
6624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS" >&5
6625 $as_echo_n "checking whether ${CXX} supports -fno-strict-aliasing, for CXXFLAGS... " >&6; }
6626 if ${pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing+:} false; then :
6627 $as_echo_n "(cached) " >&6
6628 else
6629 pgac_save_CXXFLAGS=$CXXFLAGS
6630 pgac_save_CXX=$CXX
6631 CXX=${CXX}
6632 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6633 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6634 ac_cxx_werror_flag=yes
6635 ac_ext=cpp
6636 ac_cpp='$CXXCPP $CPPFLAGS'
6637 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6638 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6639 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6642 /* end confdefs.h. */
6645 main ()
6649 return 0;
6651 _ACEOF
6652 if ac_fn_cxx_try_compile "$LINENO"; then :
6653 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=yes
6654 else
6655 pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing=no
6657 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6658 ac_ext=c
6659 ac_cpp='$CPP $CPPFLAGS'
6660 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6661 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6662 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6664 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6665 CXXFLAGS="$pgac_save_CXXFLAGS"
6666 CXX="$pgac_save_CXX"
6668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&5
6669 $as_echo "$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" >&6; }
6670 if test x"$pgac_cv_prog_CXX_cxxflags__fno_strict_aliasing" = x"yes"; then
6671 CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
6675 elif test "$PORTNAME" = "aix"; then
6676 # AIX's xlc has to have strict aliasing turned off too
6678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qnoansialias, for CFLAGS" >&5
6679 $as_echo_n "checking whether ${CC} supports -qnoansialias, for CFLAGS... " >&6; }
6680 if ${pgac_cv_prog_CC_cflags__qnoansialias+:} false; then :
6681 $as_echo_n "(cached) " >&6
6682 else
6683 pgac_save_CFLAGS=$CFLAGS
6684 pgac_save_CC=$CC
6685 CC=${CC}
6686 CFLAGS="${CFLAGS} -qnoansialias"
6687 ac_save_c_werror_flag=$ac_c_werror_flag
6688 ac_c_werror_flag=yes
6689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6690 /* end confdefs.h. */
6693 main ()
6697 return 0;
6699 _ACEOF
6700 if ac_fn_c_try_compile "$LINENO"; then :
6701 pgac_cv_prog_CC_cflags__qnoansialias=yes
6702 else
6703 pgac_cv_prog_CC_cflags__qnoansialias=no
6705 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6706 ac_c_werror_flag=$ac_save_c_werror_flag
6707 CFLAGS="$pgac_save_CFLAGS"
6708 CC="$pgac_save_CC"
6710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qnoansialias" >&5
6711 $as_echo "$pgac_cv_prog_CC_cflags__qnoansialias" >&6; }
6712 if test x"$pgac_cv_prog_CC_cflags__qnoansialias" = x"yes"; then
6713 CFLAGS="${CFLAGS} -qnoansialias"
6717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qnoansialias, for CXXFLAGS" >&5
6718 $as_echo_n "checking whether ${CXX} supports -qnoansialias, for CXXFLAGS... " >&6; }
6719 if ${pgac_cv_prog_CXX_cxxflags__qnoansialias+:} false; then :
6720 $as_echo_n "(cached) " >&6
6721 else
6722 pgac_save_CXXFLAGS=$CXXFLAGS
6723 pgac_save_CXX=$CXX
6724 CXX=${CXX}
6725 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6726 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6727 ac_cxx_werror_flag=yes
6728 ac_ext=cpp
6729 ac_cpp='$CXXCPP $CPPFLAGS'
6730 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6731 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6732 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6735 /* end confdefs.h. */
6738 main ()
6742 return 0;
6744 _ACEOF
6745 if ac_fn_cxx_try_compile "$LINENO"; then :
6746 pgac_cv_prog_CXX_cxxflags__qnoansialias=yes
6747 else
6748 pgac_cv_prog_CXX_cxxflags__qnoansialias=no
6750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6751 ac_ext=c
6752 ac_cpp='$CPP $CPPFLAGS'
6753 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6754 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6755 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6757 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6758 CXXFLAGS="$pgac_save_CXXFLAGS"
6759 CXX="$pgac_save_CXX"
6761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qnoansialias" >&5
6762 $as_echo "$pgac_cv_prog_CXX_cxxflags__qnoansialias" >&6; }
6763 if test x"$pgac_cv_prog_CXX_cxxflags__qnoansialias" = x"yes"; then
6764 CXXFLAGS="${CXXFLAGS} -qnoansialias"
6769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports -qlonglong, for CFLAGS" >&5
6770 $as_echo_n "checking whether ${CC} supports -qlonglong, for CFLAGS... " >&6; }
6771 if ${pgac_cv_prog_CC_cflags__qlonglong+:} false; then :
6772 $as_echo_n "(cached) " >&6
6773 else
6774 pgac_save_CFLAGS=$CFLAGS
6775 pgac_save_CC=$CC
6776 CC=${CC}
6777 CFLAGS="${CFLAGS} -qlonglong"
6778 ac_save_c_werror_flag=$ac_c_werror_flag
6779 ac_c_werror_flag=yes
6780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6781 /* end confdefs.h. */
6784 main ()
6788 return 0;
6790 _ACEOF
6791 if ac_fn_c_try_compile "$LINENO"; then :
6792 pgac_cv_prog_CC_cflags__qlonglong=yes
6793 else
6794 pgac_cv_prog_CC_cflags__qlonglong=no
6796 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6797 ac_c_werror_flag=$ac_save_c_werror_flag
6798 CFLAGS="$pgac_save_CFLAGS"
6799 CC="$pgac_save_CC"
6801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags__qlonglong" >&5
6802 $as_echo "$pgac_cv_prog_CC_cflags__qlonglong" >&6; }
6803 if test x"$pgac_cv_prog_CC_cflags__qlonglong" = x"yes"; then
6804 CFLAGS="${CFLAGS} -qlonglong"
6808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports -qlonglong, for CXXFLAGS" >&5
6809 $as_echo_n "checking whether ${CXX} supports -qlonglong, for CXXFLAGS... " >&6; }
6810 if ${pgac_cv_prog_CXX_cxxflags__qlonglong+:} false; then :
6811 $as_echo_n "(cached) " >&6
6812 else
6813 pgac_save_CXXFLAGS=$CXXFLAGS
6814 pgac_save_CXX=$CXX
6815 CXX=${CXX}
6816 CXXFLAGS="${CXXFLAGS} -qlonglong"
6817 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6818 ac_cxx_werror_flag=yes
6819 ac_ext=cpp
6820 ac_cpp='$CXXCPP $CPPFLAGS'
6821 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6822 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6823 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6826 /* end confdefs.h. */
6829 main ()
6833 return 0;
6835 _ACEOF
6836 if ac_fn_cxx_try_compile "$LINENO"; then :
6837 pgac_cv_prog_CXX_cxxflags__qlonglong=yes
6838 else
6839 pgac_cv_prog_CXX_cxxflags__qlonglong=no
6841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6842 ac_ext=c
6843 ac_cpp='$CPP $CPPFLAGS'
6844 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6845 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6846 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6848 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6849 CXXFLAGS="$pgac_save_CXXFLAGS"
6850 CXX="$pgac_save_CXX"
6852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags__qlonglong" >&5
6853 $as_echo "$pgac_cv_prog_CXX_cxxflags__qlonglong" >&6; }
6854 if test x"$pgac_cv_prog_CXX_cxxflags__qlonglong" = x"yes"; then
6855 CXXFLAGS="${CXXFLAGS} -qlonglong"
6859 elif test "$PORTNAME" = "hpux"; then
6860 # On some versions of HP-UX, libm functions do not set errno by default.
6861 # Fix that by using +Olibmerrno if the compiler recognizes it.
6863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CC} supports +Olibmerrno, for CFLAGS" >&5
6864 $as_echo_n "checking whether ${CC} supports +Olibmerrno, for CFLAGS... " >&6; }
6865 if ${pgac_cv_prog_CC_cflags_pOlibmerrno+:} false; then :
6866 $as_echo_n "(cached) " >&6
6867 else
6868 pgac_save_CFLAGS=$CFLAGS
6869 pgac_save_CC=$CC
6870 CC=${CC}
6871 CFLAGS="${CFLAGS} +Olibmerrno"
6872 ac_save_c_werror_flag=$ac_c_werror_flag
6873 ac_c_werror_flag=yes
6874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6875 /* end confdefs.h. */
6878 main ()
6882 return 0;
6884 _ACEOF
6885 if ac_fn_c_try_compile "$LINENO"; then :
6886 pgac_cv_prog_CC_cflags_pOlibmerrno=yes
6887 else
6888 pgac_cv_prog_CC_cflags_pOlibmerrno=no
6890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6891 ac_c_werror_flag=$ac_save_c_werror_flag
6892 CFLAGS="$pgac_save_CFLAGS"
6893 CC="$pgac_save_CC"
6895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CC_cflags_pOlibmerrno" >&5
6896 $as_echo "$pgac_cv_prog_CC_cflags_pOlibmerrno" >&6; }
6897 if test x"$pgac_cv_prog_CC_cflags_pOlibmerrno" = x"yes"; then
6898 CFLAGS="${CFLAGS} +Olibmerrno"
6902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS" >&5
6903 $as_echo_n "checking whether ${CXX} supports +Olibmerrno, for CXXFLAGS... " >&6; }
6904 if ${pgac_cv_prog_CXX_cxxflags_pOlibmerrno+:} false; then :
6905 $as_echo_n "(cached) " >&6
6906 else
6907 pgac_save_CXXFLAGS=$CXXFLAGS
6908 pgac_save_CXX=$CXX
6909 CXX=${CXX}
6910 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6911 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
6912 ac_cxx_werror_flag=yes
6913 ac_ext=cpp
6914 ac_cpp='$CXXCPP $CPPFLAGS'
6915 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6916 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6917 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
6919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6920 /* end confdefs.h. */
6923 main ()
6927 return 0;
6929 _ACEOF
6930 if ac_fn_cxx_try_compile "$LINENO"; then :
6931 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=yes
6932 else
6933 pgac_cv_prog_CXX_cxxflags_pOlibmerrno=no
6935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6936 ac_ext=c
6937 ac_cpp='$CPP $CPPFLAGS'
6938 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6939 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6940 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6942 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
6943 CXXFLAGS="$pgac_save_CXXFLAGS"
6944 CXX="$pgac_save_CXX"
6946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&5
6947 $as_echo "$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" >&6; }
6948 if test x"$pgac_cv_prog_CXX_cxxflags_pOlibmerrno" = x"yes"; then
6949 CXXFLAGS="${CXXFLAGS} +Olibmerrno"
6958 # Determine flags used to emit bitcode for JIT inlining.
6959 # 1. We must duplicate any behaviour-changing compiler flags used above,
6960 # to keep compatibility with the compiler used for normal Postgres code.
6961 # 2. We don't bother to duplicate extra-warnings switches --- seeing a
6962 # warning in the main build is enough.
6963 # 3. But we must duplicate -Wno-warning flags, else we'll see those anyway.
6964 if test "$with_llvm" = yes ; then
6965 CLANGXX="$CLANG -xc++"
6967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS" >&5
6968 $as_echo_n "checking whether ${CLANG} supports -fno-strict-aliasing, for BITCODE_CFLAGS... " >&6; }
6969 if ${pgac_cv_prog_CLANG_cflags__fno_strict_aliasing+:} false; then :
6970 $as_echo_n "(cached) " >&6
6971 else
6972 pgac_save_CFLAGS=$CFLAGS
6973 pgac_save_CC=$CC
6974 CC=${CLANG}
6975 CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
6976 ac_save_c_werror_flag=$ac_c_werror_flag
6977 ac_c_werror_flag=yes
6978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6979 /* end confdefs.h. */
6982 main ()
6986 return 0;
6988 _ACEOF
6989 if ac_fn_c_try_compile "$LINENO"; then :
6990 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=yes
6991 else
6992 pgac_cv_prog_CLANG_cflags__fno_strict_aliasing=no
6994 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6995 ac_c_werror_flag=$ac_save_c_werror_flag
6996 CFLAGS="$pgac_save_CFLAGS"
6997 CC="$pgac_save_CC"
6999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&5
7000 $as_echo "$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" >&6; }
7001 if test x"$pgac_cv_prog_CLANG_cflags__fno_strict_aliasing" = x"yes"; then
7002 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fno-strict-aliasing"
7005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS" >&5
7006 $as_echo_n "checking whether ${CLANGXX} supports -fno-strict-aliasing, for BITCODE_CXXFLAGS... " >&6; }
7007 if ${pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing+:} false; then :
7008 $as_echo_n "(cached) " >&6
7009 else
7010 pgac_save_CXXFLAGS=$CXXFLAGS
7011 pgac_save_CXX=$CXX
7012 CXX=${CLANGXX}
7013 CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7014 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7015 ac_cxx_werror_flag=yes
7016 ac_ext=cpp
7017 ac_cpp='$CXXCPP $CPPFLAGS'
7018 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7019 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7020 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7023 /* end confdefs.h. */
7026 main ()
7030 return 0;
7032 _ACEOF
7033 if ac_fn_cxx_try_compile "$LINENO"; then :
7034 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=yes
7035 else
7036 pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing=no
7038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7039 ac_ext=c
7040 ac_cpp='$CPP $CPPFLAGS'
7041 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7042 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7043 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7045 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7046 CXXFLAGS="$pgac_save_CXXFLAGS"
7047 CXX="$pgac_save_CXX"
7049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&5
7050 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" >&6; }
7051 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fno_strict_aliasing" = x"yes"; then
7052 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fno-strict-aliasing"
7055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS" >&5
7056 $as_echo_n "checking whether ${CLANG} supports -fwrapv, for BITCODE_CFLAGS... " >&6; }
7057 if ${pgac_cv_prog_CLANG_cflags__fwrapv+:} false; then :
7058 $as_echo_n "(cached) " >&6
7059 else
7060 pgac_save_CFLAGS=$CFLAGS
7061 pgac_save_CC=$CC
7062 CC=${CLANG}
7063 CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7064 ac_save_c_werror_flag=$ac_c_werror_flag
7065 ac_c_werror_flag=yes
7066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7067 /* end confdefs.h. */
7070 main ()
7074 return 0;
7076 _ACEOF
7077 if ac_fn_c_try_compile "$LINENO"; then :
7078 pgac_cv_prog_CLANG_cflags__fwrapv=yes
7079 else
7080 pgac_cv_prog_CLANG_cflags__fwrapv=no
7082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7083 ac_c_werror_flag=$ac_save_c_werror_flag
7084 CFLAGS="$pgac_save_CFLAGS"
7085 CC="$pgac_save_CC"
7087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fwrapv" >&5
7088 $as_echo "$pgac_cv_prog_CLANG_cflags__fwrapv" >&6; }
7089 if test x"$pgac_cv_prog_CLANG_cflags__fwrapv" = x"yes"; then
7090 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fwrapv"
7093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS" >&5
7094 $as_echo_n "checking whether ${CLANGXX} supports -fwrapv, for BITCODE_CXXFLAGS... " >&6; }
7095 if ${pgac_cv_prog_CLANGXX_cxxflags__fwrapv+:} false; then :
7096 $as_echo_n "(cached) " >&6
7097 else
7098 pgac_save_CXXFLAGS=$CXXFLAGS
7099 pgac_save_CXX=$CXX
7100 CXX=${CLANGXX}
7101 CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7102 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7103 ac_cxx_werror_flag=yes
7104 ac_ext=cpp
7105 ac_cpp='$CXXCPP $CPPFLAGS'
7106 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7107 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7108 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7111 /* end confdefs.h. */
7114 main ()
7118 return 0;
7120 _ACEOF
7121 if ac_fn_cxx_try_compile "$LINENO"; then :
7122 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=yes
7123 else
7124 pgac_cv_prog_CLANGXX_cxxflags__fwrapv=no
7126 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7127 ac_ext=c
7128 ac_cpp='$CPP $CPPFLAGS'
7129 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7130 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7131 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7133 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7134 CXXFLAGS="$pgac_save_CXXFLAGS"
7135 CXX="$pgac_save_CXX"
7137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&5
7138 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" >&6; }
7139 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fwrapv" = x"yes"; then
7140 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fwrapv"
7143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS" >&5
7144 $as_echo_n "checking whether ${CLANG} supports -fexcess-precision=standard, for BITCODE_CFLAGS... " >&6; }
7145 if ${pgac_cv_prog_CLANG_cflags__fexcess_precision_standard+:} false; then :
7146 $as_echo_n "(cached) " >&6
7147 else
7148 pgac_save_CFLAGS=$CFLAGS
7149 pgac_save_CC=$CC
7150 CC=${CLANG}
7151 CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7152 ac_save_c_werror_flag=$ac_c_werror_flag
7153 ac_c_werror_flag=yes
7154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7155 /* end confdefs.h. */
7158 main ()
7162 return 0;
7164 _ACEOF
7165 if ac_fn_c_try_compile "$LINENO"; then :
7166 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=yes
7167 else
7168 pgac_cv_prog_CLANG_cflags__fexcess_precision_standard=no
7170 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7171 ac_c_werror_flag=$ac_save_c_werror_flag
7172 CFLAGS="$pgac_save_CFLAGS"
7173 CC="$pgac_save_CC"
7175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&5
7176 $as_echo "$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" >&6; }
7177 if test x"$pgac_cv_prog_CLANG_cflags__fexcess_precision_standard" = x"yes"; then
7178 BITCODE_CFLAGS="${BITCODE_CFLAGS} -fexcess-precision=standard"
7181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS" >&5
7182 $as_echo_n "checking whether ${CLANGXX} supports -fexcess-precision=standard, for BITCODE_CXXFLAGS... " >&6; }
7183 if ${pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard+:} false; then :
7184 $as_echo_n "(cached) " >&6
7185 else
7186 pgac_save_CXXFLAGS=$CXXFLAGS
7187 pgac_save_CXX=$CXX
7188 CXX=${CLANGXX}
7189 CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7190 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
7191 ac_cxx_werror_flag=yes
7192 ac_ext=cpp
7193 ac_cpp='$CXXCPP $CPPFLAGS'
7194 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7195 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7196 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
7198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7199 /* end confdefs.h. */
7202 main ()
7206 return 0;
7208 _ACEOF
7209 if ac_fn_cxx_try_compile "$LINENO"; then :
7210 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=yes
7211 else
7212 pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard=no
7214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7215 ac_ext=c
7216 ac_cpp='$CPP $CPPFLAGS'
7217 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7218 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7219 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7221 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
7222 CXXFLAGS="$pgac_save_CXXFLAGS"
7223 CXX="$pgac_save_CXX"
7225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&5
7226 $as_echo "$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" >&6; }
7227 if test x"$pgac_cv_prog_CLANGXX_cxxflags__fexcess_precision_standard" = x"yes"; then
7228 BITCODE_CXXFLAGS="${BITCODE_CXXFLAGS} -fexcess-precision=standard"
7232 NOT_THE_CFLAGS=""
7233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS" >&5
7234 $as_echo_n "checking whether ${CLANG} supports -Wunused-command-line-argument, for NOT_THE_CFLAGS... " >&6; }
7235 if ${pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument+:} false; then :
7236 $as_echo_n "(cached) " >&6
7237 else
7238 pgac_save_CFLAGS=$CFLAGS
7239 pgac_save_CC=$CC
7240 CC=${CLANG}
7241 CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7242 ac_save_c_werror_flag=$ac_c_werror_flag
7243 ac_c_werror_flag=yes
7244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7245 /* end confdefs.h. */
7248 main ()
7252 return 0;
7254 _ACEOF
7255 if ac_fn_c_try_compile "$LINENO"; then :
7256 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=yes
7257 else
7258 pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument=no
7260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7261 ac_c_werror_flag=$ac_save_c_werror_flag
7262 CFLAGS="$pgac_save_CFLAGS"
7263 CC="$pgac_save_CC"
7265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&5
7266 $as_echo "$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" >&6; }
7267 if test x"$pgac_cv_prog_CLANG_cflags__Wunused_command_line_argument" = x"yes"; then
7268 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wunused-command-line-argument"
7271 if test -n "$NOT_THE_CFLAGS"; then
7272 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-unused-command-line-argument"
7274 NOT_THE_CFLAGS=""
7275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS" >&5
7276 $as_echo_n "checking whether ${CLANG} supports -Wcompound-token-split-by-macro, for NOT_THE_CFLAGS... " >&6; }
7277 if ${pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro+:} false; then :
7278 $as_echo_n "(cached) " >&6
7279 else
7280 pgac_save_CFLAGS=$CFLAGS
7281 pgac_save_CC=$CC
7282 CC=${CLANG}
7283 CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7284 ac_save_c_werror_flag=$ac_c_werror_flag
7285 ac_c_werror_flag=yes
7286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7287 /* end confdefs.h. */
7290 main ()
7294 return 0;
7296 _ACEOF
7297 if ac_fn_c_try_compile "$LINENO"; then :
7298 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=yes
7299 else
7300 pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro=no
7302 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7303 ac_c_werror_flag=$ac_save_c_werror_flag
7304 CFLAGS="$pgac_save_CFLAGS"
7305 CC="$pgac_save_CC"
7307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&5
7308 $as_echo "$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" >&6; }
7309 if test x"$pgac_cv_prog_CLANG_cflags__Wcompound_token_split_by_macro" = x"yes"; then
7310 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wcompound-token-split-by-macro"
7313 if test -n "$NOT_THE_CFLAGS"; then
7314 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-compound-token-split-by-macro"
7316 NOT_THE_CFLAGS=""
7317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS" >&5
7318 $as_echo_n "checking whether ${CLANG} supports -Wformat-truncation, for NOT_THE_CFLAGS... " >&6; }
7319 if ${pgac_cv_prog_CLANG_cflags__Wformat_truncation+:} false; then :
7320 $as_echo_n "(cached) " >&6
7321 else
7322 pgac_save_CFLAGS=$CFLAGS
7323 pgac_save_CC=$CC
7324 CC=${CLANG}
7325 CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7326 ac_save_c_werror_flag=$ac_c_werror_flag
7327 ac_c_werror_flag=yes
7328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7329 /* end confdefs.h. */
7332 main ()
7336 return 0;
7338 _ACEOF
7339 if ac_fn_c_try_compile "$LINENO"; then :
7340 pgac_cv_prog_CLANG_cflags__Wformat_truncation=yes
7341 else
7342 pgac_cv_prog_CLANG_cflags__Wformat_truncation=no
7344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7345 ac_c_werror_flag=$ac_save_c_werror_flag
7346 CFLAGS="$pgac_save_CFLAGS"
7347 CC="$pgac_save_CC"
7349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&5
7350 $as_echo "$pgac_cv_prog_CLANG_cflags__Wformat_truncation" >&6; }
7351 if test x"$pgac_cv_prog_CLANG_cflags__Wformat_truncation" = x"yes"; then
7352 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wformat-truncation"
7355 if test -n "$NOT_THE_CFLAGS"; then
7356 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-format-truncation"
7358 NOT_THE_CFLAGS=""
7359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS" >&5
7360 $as_echo_n "checking whether ${CLANG} supports -Wstringop-truncation, for NOT_THE_CFLAGS... " >&6; }
7361 if ${pgac_cv_prog_CLANG_cflags__Wstringop_truncation+:} false; then :
7362 $as_echo_n "(cached) " >&6
7363 else
7364 pgac_save_CFLAGS=$CFLAGS
7365 pgac_save_CC=$CC
7366 CC=${CLANG}
7367 CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7368 ac_save_c_werror_flag=$ac_c_werror_flag
7369 ac_c_werror_flag=yes
7370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7371 /* end confdefs.h. */
7374 main ()
7378 return 0;
7380 _ACEOF
7381 if ac_fn_c_try_compile "$LINENO"; then :
7382 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=yes
7383 else
7384 pgac_cv_prog_CLANG_cflags__Wstringop_truncation=no
7386 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7387 ac_c_werror_flag=$ac_save_c_werror_flag
7388 CFLAGS="$pgac_save_CFLAGS"
7389 CC="$pgac_save_CC"
7391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&5
7392 $as_echo "$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" >&6; }
7393 if test x"$pgac_cv_prog_CLANG_cflags__Wstringop_truncation" = x"yes"; then
7394 NOT_THE_CFLAGS="${NOT_THE_CFLAGS} -Wstringop-truncation"
7397 if test -n "$NOT_THE_CFLAGS"; then
7398 BITCODE_CFLAGS="$BITCODE_CFLAGS -Wno-stringop-truncation"
7402 # supply -g if --enable-debug
7403 if test "$enable_debug" = yes && test "$ac_cv_prog_cc_g" = yes; then
7404 CFLAGS="$CFLAGS -g"
7407 if test "$enable_debug" = yes && test "$ac_cv_prog_cxx_g" = yes; then
7408 CXXFLAGS="$CXXFLAGS -g"
7411 # enable code coverage if --enable-coverage
7412 if test "$enable_coverage" = yes; then
7413 if test "$GCC" = yes; then
7414 CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage"
7415 CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
7416 else
7417 as_fn_error $? "--enable-coverage is supported only when using GCC" "$LINENO" 5
7421 # enable profiling if --enable-profiling
7422 if test "$enable_profiling" = yes && test "$ac_cv_prog_cc_g" = yes; then
7423 if test "$GCC" = yes; then
7425 $as_echo "#define PROFILE_PID_DIR 1" >>confdefs.h
7427 CFLAGS="$CFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7428 CXXFLAGS="$CXXFLAGS -pg $PLATFORM_PROFILE_FLAGS"
7429 else
7430 as_fn_error $? "--enable-profiling is supported only when using GCC" "$LINENO" 5
7434 # On Solaris, we need this #define to get POSIX-conforming versions
7435 # of many interfaces (sigwait, getpwuid_r, ...).
7436 if test "$PORTNAME" = "solaris"; then
7437 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
7440 # We already have this in Makefile.win32, but configure needs it too
7441 if test "$PORTNAME" = "win32"; then
7442 CPPFLAGS="$CPPFLAGS -I$srcdir/src/include/port/win32"
7445 # Now that we're done automatically adding stuff to C[XX]FLAGS, put back the
7446 # user-specified flags (if any) at the end. This lets users override
7447 # the automatic additions.
7448 CFLAGS="$CFLAGS $user_CFLAGS"
7449 CXXFLAGS="$CXXFLAGS $user_CXXFLAGS"
7450 BITCODE_CFLAGS="$BITCODE_CFLAGS $user_BITCODE_CFLAGS"
7451 BITCODE_CXXFLAGS="$BITCODE_CXXFLAGS $user_BITCODE_CXXFLAGS"
7456 # The template file must set up CFLAGS_SL; we don't support user override
7459 # Check if the compiler still works with the final flag settings
7460 # (note, we're not checking that for CXX, which is optional)
7461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler still works" >&5
7462 $as_echo_n "checking whether the C compiler still works... " >&6; }
7463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7464 /* end confdefs.h. */
7467 main ()
7469 return 0;
7471 return 0;
7473 _ACEOF
7474 if ac_fn_c_try_link "$LINENO"; then :
7475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7476 $as_echo "yes" >&6; }
7477 else
7478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7479 $as_echo "no" >&6; }
7480 as_fn_error $? "cannot proceed" "$LINENO" 5
7482 rm -f core conftest.err conftest.$ac_objext \
7483 conftest$ac_exeext conftest.$ac_ext
7485 # Defend against gcc -ffast-math
7486 if test "$GCC" = yes; then
7487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7488 /* end confdefs.h. */
7491 main ()
7493 #ifdef __FAST_MATH__
7494 choke me
7495 #endif
7497 return 0;
7499 _ACEOF
7500 if ac_fn_c_try_compile "$LINENO"; then :
7502 else
7503 as_fn_error $? "do not put -ffast-math in CFLAGS" "$LINENO" 5
7505 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7508 # Defend against clang being used on x86-32 without SSE2 enabled. As current
7509 # versions of clang do not understand -fexcess-precision=standard, the use of
7510 # x87 floating point operations leads to problems like isinf possibly returning
7511 # false for a value that is infinite when converted from the 80bit register to
7512 # the 8byte memory representation.
7514 # Only perform the test if the compiler doesn't understand
7515 # -fexcess-precision=standard, that way a potentially fixed compiler will work
7516 # automatically.
7517 if test "$pgac_cv_prog_CC_cflags__fexcess_precision_standard" = no; then
7518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7519 /* end confdefs.h. */
7522 main ()
7525 #if defined(__clang__) && defined(__i386__) && !defined(__SSE2_MATH__)
7526 choke me
7527 #endif
7530 return 0;
7532 _ACEOF
7533 if ac_fn_c_try_compile "$LINENO"; then :
7535 else
7536 as_fn_error $? "Compiling PostgreSQL with clang, on 32bit x86, requires SSE2 support. Use -msse2 or use gcc." "$LINENO" 5
7538 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7541 ac_ext=c
7542 ac_cpp='$CPP $CPPFLAGS'
7543 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7544 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7545 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
7547 $as_echo_n "checking how to run the C preprocessor... " >&6; }
7548 # On Suns, sometimes $CPP names a directory.
7549 if test -n "$CPP" && test -d "$CPP"; then
7550 CPP=
7552 if test -z "$CPP"; then
7553 if ${ac_cv_prog_CPP+:} false; then :
7554 $as_echo_n "(cached) " >&6
7555 else
7556 # Double quotes because CPP needs to be expanded
7557 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
7559 ac_preproc_ok=false
7560 for ac_c_preproc_warn_flag in '' yes
7562 # Use a header file that comes with gcc, so configuring glibc
7563 # with a fresh cross-compiler works.
7564 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7565 # <limits.h> exists even on freestanding compilers.
7566 # On the NeXT, cc -E runs the code through the compiler's parser,
7567 # not just through cpp. "Syntax error" is here to catch this case.
7568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7569 /* end confdefs.h. */
7570 #ifdef __STDC__
7571 # include <limits.h>
7572 #else
7573 # include <assert.h>
7574 #endif
7575 Syntax error
7576 _ACEOF
7577 if ac_fn_c_try_cpp "$LINENO"; then :
7579 else
7580 # Broken: fails on valid input.
7581 continue
7583 rm -f conftest.err conftest.i conftest.$ac_ext
7585 # OK, works on sane cases. Now check whether nonexistent headers
7586 # can be detected and how.
7587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7588 /* end confdefs.h. */
7589 #include <ac_nonexistent.h>
7590 _ACEOF
7591 if ac_fn_c_try_cpp "$LINENO"; then :
7592 # Broken: success on invalid input.
7593 continue
7594 else
7595 # Passes both tests.
7596 ac_preproc_ok=:
7597 break
7599 rm -f conftest.err conftest.i conftest.$ac_ext
7601 done
7602 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7603 rm -f conftest.i conftest.err conftest.$ac_ext
7604 if $ac_preproc_ok; then :
7605 break
7608 done
7609 ac_cv_prog_CPP=$CPP
7612 CPP=$ac_cv_prog_CPP
7613 else
7614 ac_cv_prog_CPP=$CPP
7616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
7617 $as_echo "$CPP" >&6; }
7618 ac_preproc_ok=false
7619 for ac_c_preproc_warn_flag in '' yes
7621 # Use a header file that comes with gcc, so configuring glibc
7622 # with a fresh cross-compiler works.
7623 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7624 # <limits.h> exists even on freestanding compilers.
7625 # On the NeXT, cc -E runs the code through the compiler's parser,
7626 # not just through cpp. "Syntax error" is here to catch this case.
7627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7628 /* end confdefs.h. */
7629 #ifdef __STDC__
7630 # include <limits.h>
7631 #else
7632 # include <assert.h>
7633 #endif
7634 Syntax error
7635 _ACEOF
7636 if ac_fn_c_try_cpp "$LINENO"; then :
7638 else
7639 # Broken: fails on valid input.
7640 continue
7642 rm -f conftest.err conftest.i conftest.$ac_ext
7644 # OK, works on sane cases. Now check whether nonexistent headers
7645 # can be detected and how.
7646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7647 /* end confdefs.h. */
7648 #include <ac_nonexistent.h>
7649 _ACEOF
7650 if ac_fn_c_try_cpp "$LINENO"; then :
7651 # Broken: success on invalid input.
7652 continue
7653 else
7654 # Passes both tests.
7655 ac_preproc_ok=:
7656 break
7658 rm -f conftest.err conftest.i conftest.$ac_ext
7660 done
7661 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
7662 rm -f conftest.i conftest.err conftest.$ac_ext
7663 if $ac_preproc_ok; then :
7665 else
7666 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7667 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
7668 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
7669 See \`config.log' for more details" "$LINENO" 5; }
7672 ac_ext=c
7673 ac_cpp='$CPP $CPPFLAGS'
7674 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
7675 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
7676 ac_compiler_gnu=$ac_cv_c_compiler_gnu
7682 # Set up TAS assembly code if needed; the template file has now had its
7683 # chance to request this.
7685 ac_config_links="$ac_config_links src/backend/port/tas.s:src/backend/port/tas/${tas_file}"
7688 if test "$need_tas" = yes ; then
7689 TAS=tas.o
7690 else
7691 TAS=""
7696 cat >>confdefs.h <<_ACEOF
7697 #define DLSUFFIX "$DLSUFFIX"
7698 _ACEOF
7702 # Set up pkg_config in case we need it below
7711 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7712 if test -n "$ac_tool_prefix"; then
7713 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7714 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7716 $as_echo_n "checking for $ac_word... " >&6; }
7717 if ${ac_cv_path_PKG_CONFIG+:} false; then :
7718 $as_echo_n "(cached) " >&6
7719 else
7720 case $PKG_CONFIG in
7721 [\\/]* | ?:[\\/]*)
7722 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7725 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7726 for as_dir in $PATH
7728 IFS=$as_save_IFS
7729 test -z "$as_dir" && as_dir=.
7730 for ac_exec_ext in '' $ac_executable_extensions; do
7731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7732 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7733 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7734 break 2
7736 done
7737 done
7738 IFS=$as_save_IFS
7741 esac
7743 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
7744 if test -n "$PKG_CONFIG"; then
7745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7746 $as_echo "$PKG_CONFIG" >&6; }
7747 else
7748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7749 $as_echo "no" >&6; }
7754 if test -z "$ac_cv_path_PKG_CONFIG"; then
7755 ac_pt_PKG_CONFIG=$PKG_CONFIG
7756 # Extract the first word of "pkg-config", so it can be a program name with args.
7757 set dummy pkg-config; ac_word=$2
7758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7759 $as_echo_n "checking for $ac_word... " >&6; }
7760 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7761 $as_echo_n "(cached) " >&6
7762 else
7763 case $ac_pt_PKG_CONFIG in
7764 [\\/]* | ?:[\\/]*)
7765 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7768 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7769 for as_dir in $PATH
7771 IFS=$as_save_IFS
7772 test -z "$as_dir" && as_dir=.
7773 for ac_exec_ext in '' $ac_executable_extensions; do
7774 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7775 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7776 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7777 break 2
7779 done
7780 done
7781 IFS=$as_save_IFS
7784 esac
7786 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7787 if test -n "$ac_pt_PKG_CONFIG"; then
7788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7789 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
7790 else
7791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7792 $as_echo "no" >&6; }
7795 if test "x$ac_pt_PKG_CONFIG" = x; then
7796 PKG_CONFIG=""
7797 else
7798 case $cross_compiling:$ac_tool_warned in
7799 yes:)
7800 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7801 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7802 ac_tool_warned=yes ;;
7803 esac
7804 PKG_CONFIG=$ac_pt_PKG_CONFIG
7806 else
7807 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7811 if test -n "$PKG_CONFIG"; then
7812 _pkg_min_version=0.9.0
7813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7814 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7815 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7817 $as_echo "yes" >&6; }
7818 else
7819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7820 $as_echo "no" >&6; }
7821 PKG_CONFIG=""
7826 # Automatic dependency tracking
7830 # Check whether --enable-depend was given.
7831 if test "${enable_depend+set}" = set; then :
7832 enableval=$enable_depend;
7833 case $enableval in
7834 yes)
7835 autodepend=yes
7841 as_fn_error $? "no argument expected for --enable-depend option" "$LINENO" 5
7843 esac
7845 else
7846 enable_depend=no
7855 # Enable assert checks
7859 # Check whether --enable-cassert was given.
7860 if test "${enable_cassert+set}" = set; then :
7861 enableval=$enable_cassert;
7862 case $enableval in
7863 yes)
7865 $as_echo "#define USE_ASSERT_CHECKING 1" >>confdefs.h
7872 as_fn_error $? "no argument expected for --enable-cassert option" "$LINENO" 5
7874 esac
7876 else
7877 enable_cassert=no
7885 # Include directories
7887 ac_save_IFS=$IFS
7888 IFS="${IFS}${PATH_SEPARATOR}"
7889 # SRCH_INC comes from the template file
7890 for dir in $with_includes $SRCH_INC; do
7891 if test -d "$dir"; then
7892 INCLUDES="$INCLUDES -I$dir"
7893 else
7894 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Include directory $dir does not exist." >&5
7895 $as_echo "$as_me: WARNING: *** Include directory $dir does not exist." >&2;}
7897 done
7898 IFS=$ac_save_IFS
7903 # Library directories
7905 ac_save_IFS=$IFS
7906 IFS="${IFS}${PATH_SEPARATOR}"
7907 # LIBRARY_DIRS comes from command line, SRCH_LIB from template file.
7908 for dir in $LIBRARY_DIRS $SRCH_LIB; do
7909 if test -d "$dir"; then
7910 LIBDIRS="$LIBDIRS -L$dir"
7911 else
7912 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Library directory $dir does not exist." >&5
7913 $as_echo "$as_me: WARNING: *** Library directory $dir does not exist." >&2;}
7915 done
7916 IFS=$ac_save_IFS
7919 # Enable thread-safe client libraries
7921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking allow thread-safe client libraries" >&5
7922 $as_echo_n "checking allow thread-safe client libraries... " >&6; }
7925 # Check whether --enable-thread-safety was given.
7926 if test "${enable_thread_safety+set}" = set; then :
7927 enableval=$enable_thread_safety;
7928 case $enableval in
7929 yes)
7936 as_fn_error $? "no argument expected for --enable-thread-safety option" "$LINENO" 5
7938 esac
7940 else
7941 enable_thread_safety=yes
7946 if test "$enable_thread_safety" = yes; then
7948 $as_echo "#define ENABLE_THREAD_SAFETY 1" >>confdefs.h
7951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_thread_safety" >&5
7952 $as_echo "$enable_thread_safety" >&6; }
7956 # ICU
7958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ICU support" >&5
7959 $as_echo_n "checking whether to build with ICU support... " >&6; }
7963 # Check whether --with-icu was given.
7964 if test "${with_icu+set}" = set; then :
7965 withval=$with_icu;
7966 case $withval in
7967 yes)
7969 $as_echo "#define USE_ICU 1" >>confdefs.h
7976 as_fn_error $? "no argument expected for --with-icu option" "$LINENO" 5
7978 esac
7980 else
7981 with_icu=no
7986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icu" >&5
7987 $as_echo "$with_icu" >&6; }
7990 if test "$with_icu" = yes; then
7992 pkg_failed=no
7993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icu-uc icu-i18n" >&5
7994 $as_echo_n "checking for icu-uc icu-i18n... " >&6; }
7996 if test -n "$ICU_CFLAGS"; then
7997 pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
7998 elif test -n "$PKG_CONFIG"; then
7999 if test -n "$PKG_CONFIG" && \
8000 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8001 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8002 ac_status=$?
8003 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8004 test $ac_status = 0; }; then
8005 pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc icu-i18n" 2>/dev/null`
8006 test "x$?" != "x0" && pkg_failed=yes
8007 else
8008 pkg_failed=yes
8010 else
8011 pkg_failed=untried
8013 if test -n "$ICU_LIBS"; then
8014 pkg_cv_ICU_LIBS="$ICU_LIBS"
8015 elif test -n "$PKG_CONFIG"; then
8016 if test -n "$PKG_CONFIG" && \
8017 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc icu-i18n\""; } >&5
8018 ($PKG_CONFIG --exists --print-errors "icu-uc icu-i18n") 2>&5
8019 ac_status=$?
8020 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8021 test $ac_status = 0; }; then
8022 pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc icu-i18n" 2>/dev/null`
8023 test "x$?" != "x0" && pkg_failed=yes
8024 else
8025 pkg_failed=yes
8027 else
8028 pkg_failed=untried
8033 if test $pkg_failed = yes; then
8034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8035 $as_echo "no" >&6; }
8037 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8038 _pkg_short_errors_supported=yes
8039 else
8040 _pkg_short_errors_supported=no
8042 if test $_pkg_short_errors_supported = yes; then
8043 ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8044 else
8045 ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc icu-i18n" 2>&1`
8047 # Put the nasty error message in config.log where it belongs
8048 echo "$ICU_PKG_ERRORS" >&5
8050 as_fn_error $? "Package requirements (icu-uc icu-i18n) were not met:
8052 $ICU_PKG_ERRORS
8054 Consider adjusting the PKG_CONFIG_PATH environment variable if you
8055 installed software in a non-standard prefix.
8057 Alternatively, you may set the environment variables ICU_CFLAGS
8058 and ICU_LIBS to avoid the need to call pkg-config.
8059 See the pkg-config man page for more details." "$LINENO" 5
8060 elif test $pkg_failed = untried; then
8061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8062 $as_echo "no" >&6; }
8063 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8064 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8065 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
8066 is in your PATH or set the PKG_CONFIG environment variable to the full
8067 path to pkg-config.
8069 Alternatively, you may set the environment variables ICU_CFLAGS
8070 and ICU_LIBS to avoid the need to call pkg-config.
8071 See the pkg-config man page for more details.
8073 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
8074 See \`config.log' for more details" "$LINENO" 5; }
8075 else
8076 ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
8077 ICU_LIBS=$pkg_cv_ICU_LIBS
8078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8079 $as_echo "yes" >&6; }
8085 # Optionally build Tcl modules (PL/Tcl)
8087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Tcl" >&5
8088 $as_echo_n "checking whether to build with Tcl... " >&6; }
8092 # Check whether --with-tcl was given.
8093 if test "${with_tcl+set}" = set; then :
8094 withval=$with_tcl;
8095 case $withval in
8096 yes)
8103 as_fn_error $? "no argument expected for --with-tcl option" "$LINENO" 5
8105 esac
8107 else
8108 with_tcl=no
8113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcl" >&5
8114 $as_echo "$with_tcl" >&6; }
8117 # We see if the path to the Tcl/Tk configuration scripts is specified.
8118 # This will override the use of tclsh to find the paths to search.
8123 # Check whether --with-tclconfig was given.
8124 if test "${with_tclconfig+set}" = set; then :
8125 withval=$with_tclconfig;
8126 case $withval in
8127 yes)
8128 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8131 as_fn_error $? "argument required for --with-tclconfig option" "$LINENO" 5
8136 esac
8143 # Optionally build Perl modules (PL/Perl)
8145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Perl modules" >&5
8146 $as_echo_n "checking whether to build Perl modules... " >&6; }
8150 # Check whether --with-perl was given.
8151 if test "${with_perl+set}" = set; then :
8152 withval=$with_perl;
8153 case $withval in
8154 yes)
8161 as_fn_error $? "no argument expected for --with-perl option" "$LINENO" 5
8163 esac
8165 else
8166 with_perl=no
8171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_perl" >&5
8172 $as_echo "$with_perl" >&6; }
8176 # Optionally build Python modules (PL/Python)
8178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build Python modules" >&5
8179 $as_echo_n "checking whether to build Python modules... " >&6; }
8183 # Check whether --with-python was given.
8184 if test "${with_python+set}" = set; then :
8185 withval=$with_python;
8186 case $withval in
8187 yes)
8194 as_fn_error $? "no argument expected for --with-python option" "$LINENO" 5
8196 esac
8198 else
8199 with_python=no
8204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
8205 $as_echo "$with_python" >&6; }
8209 # GSSAPI
8211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with GSSAPI support" >&5
8212 $as_echo_n "checking whether to build with GSSAPI support... " >&6; }
8216 # Check whether --with-gssapi was given.
8217 if test "${with_gssapi+set}" = set; then :
8218 withval=$with_gssapi;
8219 case $withval in
8220 yes)
8223 $as_echo "#define ENABLE_GSS 1" >>confdefs.h
8225 krb_srvtab="FILE:\$(sysconfdir)/krb5.keytab"
8232 as_fn_error $? "no argument expected for --with-gssapi option" "$LINENO" 5
8234 esac
8236 else
8237 with_gssapi=no
8242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_gssapi" >&5
8243 $as_echo "$with_gssapi" >&6; }
8251 # Kerberos configuration parameters
8256 # Check whether --with-krb-srvnam was given.
8257 if test "${with_krb_srvnam+set}" = set; then :
8258 withval=$with_krb_srvnam;
8259 case $withval in
8260 yes)
8261 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8264 as_fn_error $? "argument required for --with-krb-srvnam option" "$LINENO" 5
8269 esac
8271 else
8272 with_krb_srvnam="postgres"
8278 cat >>confdefs.h <<_ACEOF
8279 #define PG_KRB_SRVNAM "$with_krb_srvnam"
8280 _ACEOF
8285 # PAM
8287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with PAM support" >&5
8288 $as_echo_n "checking whether to build with PAM support... " >&6; }
8292 # Check whether --with-pam was given.
8293 if test "${with_pam+set}" = set; then :
8294 withval=$with_pam;
8295 case $withval in
8296 yes)
8298 $as_echo "#define USE_PAM 1" >>confdefs.h
8305 as_fn_error $? "no argument expected for --with-pam option" "$LINENO" 5
8307 esac
8309 else
8310 with_pam=no
8315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pam" >&5
8316 $as_echo "$with_pam" >&6; }
8320 # BSD AUTH
8322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with BSD Authentication support" >&5
8323 $as_echo_n "checking whether to build with BSD Authentication support... " >&6; }
8327 # Check whether --with-bsd-auth was given.
8328 if test "${with_bsd_auth+set}" = set; then :
8329 withval=$with_bsd_auth;
8330 case $withval in
8331 yes)
8333 $as_echo "#define USE_BSD_AUTH 1" >>confdefs.h
8340 as_fn_error $? "no argument expected for --with-bsd-auth option" "$LINENO" 5
8342 esac
8344 else
8345 with_bsd_auth=no
8350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bsd_auth" >&5
8351 $as_echo "$with_bsd_auth" >&6; }
8355 # LDAP
8357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LDAP support" >&5
8358 $as_echo_n "checking whether to build with LDAP support... " >&6; }
8362 # Check whether --with-ldap was given.
8363 if test "${with_ldap+set}" = set; then :
8364 withval=$with_ldap;
8365 case $withval in
8366 yes)
8368 $as_echo "#define USE_LDAP 1" >>confdefs.h
8375 as_fn_error $? "no argument expected for --with-ldap option" "$LINENO" 5
8377 esac
8379 else
8380 with_ldap=no
8385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_ldap" >&5
8386 $as_echo "$with_ldap" >&6; }
8391 # Bonjour
8393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with Bonjour support" >&5
8394 $as_echo_n "checking whether to build with Bonjour support... " >&6; }
8398 # Check whether --with-bonjour was given.
8399 if test "${with_bonjour+set}" = set; then :
8400 withval=$with_bonjour;
8401 case $withval in
8402 yes)
8404 $as_echo "#define USE_BONJOUR 1" >>confdefs.h
8411 as_fn_error $? "no argument expected for --with-bonjour option" "$LINENO" 5
8413 esac
8415 else
8416 with_bonjour=no
8421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_bonjour" >&5
8422 $as_echo "$with_bonjour" >&6; }
8426 # SELinux
8428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with SELinux support" >&5
8429 $as_echo_n "checking whether to build with SELinux support... " >&6; }
8433 # Check whether --with-selinux was given.
8434 if test "${with_selinux+set}" = set; then :
8435 withval=$with_selinux;
8436 case $withval in
8437 yes)
8444 as_fn_error $? "no argument expected for --with-selinux option" "$LINENO" 5
8446 esac
8448 else
8449 with_selinux=no
8455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_selinux" >&5
8456 $as_echo "$with_selinux" >&6; }
8459 # Systemd
8461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with systemd support" >&5
8462 $as_echo_n "checking whether to build with systemd support... " >&6; }
8466 # Check whether --with-systemd was given.
8467 if test "${with_systemd+set}" = set; then :
8468 withval=$with_systemd;
8469 case $withval in
8470 yes)
8472 $as_echo "#define USE_SYSTEMD 1" >>confdefs.h
8479 as_fn_error $? "no argument expected for --with-systemd option" "$LINENO" 5
8481 esac
8483 else
8484 with_systemd=no
8490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemd" >&5
8491 $as_echo "$with_systemd" >&6; }
8494 # Readline
8499 # Check whether --with-readline was given.
8500 if test "${with_readline+set}" = set; then :
8501 withval=$with_readline;
8502 case $withval in
8503 yes)
8510 as_fn_error $? "no argument expected for --with-readline option" "$LINENO" 5
8512 esac
8514 else
8515 with_readline=yes
8520 # readline on MinGW has problems with backslashes in psql and other bugs.
8521 # This is particularly a problem with non-US code pages.
8522 # Therefore disable its use until we understand the cause. 2004-07-20
8523 if test "$PORTNAME" = "win32"; then
8524 if test "$with_readline" = yes; then
8525 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Readline does not work on MinGW --- disabling" >&5
8526 $as_echo "$as_me: WARNING: *** Readline does not work on MinGW --- disabling" >&2;}
8527 with_readline=no
8534 # Prefer libedit
8539 # Check whether --with-libedit-preferred was given.
8540 if test "${with_libedit_preferred+set}" = set; then :
8541 withval=$with_libedit_preferred;
8542 case $withval in
8543 yes)
8550 as_fn_error $? "no argument expected for --with-libedit-preferred option" "$LINENO" 5
8552 esac
8554 else
8555 with_libedit_preferred=no
8563 # UUID library
8565 # There are at least three UUID libraries in common use: the FreeBSD/NetBSD
8566 # library, the e2fsprogs libuuid (now part of util-linux-ng), and the OSSP
8567 # UUID library. More than one of these might be present on a given platform,
8568 # so we make the user say which one she wants.
8573 # Check whether --with-uuid was given.
8574 if test "${with_uuid+set}" = set; then :
8575 withval=$with_uuid;
8576 case $withval in
8577 yes)
8578 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8581 as_fn_error $? "argument required for --with-uuid option" "$LINENO" 5
8586 esac
8591 if test x"$with_uuid" = x"" ; then
8592 with_uuid=no
8597 # Check whether --with-ossp-uuid was given.
8598 if test "${with_ossp_uuid+set}" = set; then :
8599 withval=$with_ossp_uuid;
8600 case $withval in
8601 yes)
8608 as_fn_error $? "no argument expected for --with-ossp-uuid option" "$LINENO" 5
8610 esac
8612 else
8613 with_ossp_uuid=no
8618 if test "$with_ossp_uuid" = yes ; then
8619 with_uuid=ossp
8622 if test "$with_uuid" != no ; then
8623 if test "$with_uuid" = bsd ; then
8625 $as_echo "#define HAVE_UUID_BSD 1" >>confdefs.h
8627 elif test "$with_uuid" = e2fs ; then
8629 $as_echo "#define HAVE_UUID_E2FS 1" >>confdefs.h
8631 elif test "$with_uuid" = ossp ; then
8633 $as_echo "#define HAVE_UUID_OSSP 1" >>confdefs.h
8635 else
8636 as_fn_error $? "--with-uuid must specify one of bsd, e2fs, or ossp" "$LINENO" 5
8643 # XML
8645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with XML support" >&5
8646 $as_echo_n "checking whether to build with XML support... " >&6; }
8650 # Check whether --with-libxml was given.
8651 if test "${with_libxml+set}" = set; then :
8652 withval=$with_libxml;
8653 case $withval in
8654 yes)
8656 $as_echo "#define USE_LIBXML 1" >>confdefs.h
8663 as_fn_error $? "no argument expected for --with-libxml option" "$LINENO" 5
8665 esac
8667 else
8668 with_libxml=no
8673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libxml" >&5
8674 $as_echo "$with_libxml" >&6; }
8677 if test "$with_libxml" = yes ; then
8678 # Check pkg-config, then xml2-config. But for backwards compatibility,
8679 # setting XML2_CONFIG overrides pkg-config.
8680 have_libxml2_pkg_config=no
8681 if test -z "$XML2_CONFIG" -a -n "$PKG_CONFIG"; then
8683 pkg_failed=no
8684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml-2.0 >= 2.6.23" >&5
8685 $as_echo_n "checking for libxml-2.0 >= 2.6.23... " >&6; }
8687 if test -n "$XML2_CFLAGS"; then
8688 pkg_cv_XML2_CFLAGS="$XML2_CFLAGS"
8689 elif test -n "$PKG_CONFIG"; then
8690 if test -n "$PKG_CONFIG" && \
8691 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8692 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8693 ac_status=$?
8694 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8695 test $ac_status = 0; }; then
8696 pkg_cv_XML2_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0 >= 2.6.23" 2>/dev/null`
8697 test "x$?" != "x0" && pkg_failed=yes
8698 else
8699 pkg_failed=yes
8701 else
8702 pkg_failed=untried
8704 if test -n "$XML2_LIBS"; then
8705 pkg_cv_XML2_LIBS="$XML2_LIBS"
8706 elif test -n "$PKG_CONFIG"; then
8707 if test -n "$PKG_CONFIG" && \
8708 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0 >= 2.6.23\""; } >&5
8709 ($PKG_CONFIG --exists --print-errors "libxml-2.0 >= 2.6.23") 2>&5
8710 ac_status=$?
8711 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8712 test $ac_status = 0; }; then
8713 pkg_cv_XML2_LIBS=`$PKG_CONFIG --libs "libxml-2.0 >= 2.6.23" 2>/dev/null`
8714 test "x$?" != "x0" && pkg_failed=yes
8715 else
8716 pkg_failed=yes
8718 else
8719 pkg_failed=untried
8724 if test $pkg_failed = yes; then
8725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8726 $as_echo "no" >&6; }
8728 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8729 _pkg_short_errors_supported=yes
8730 else
8731 _pkg_short_errors_supported=no
8733 if test $_pkg_short_errors_supported = yes; then
8734 XML2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8735 else
8736 XML2_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0 >= 2.6.23" 2>&1`
8738 # Put the nasty error message in config.log where it belongs
8739 echo "$XML2_PKG_ERRORS" >&5
8741 # do nothing
8742 elif test $pkg_failed = untried; then
8743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8744 $as_echo "no" >&6; }
8745 # do nothing
8746 else
8747 XML2_CFLAGS=$pkg_cv_XML2_CFLAGS
8748 XML2_LIBS=$pkg_cv_XML2_LIBS
8749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8750 $as_echo "yes" >&6; }
8751 have_libxml2_pkg_config=yes
8754 if test "$have_libxml2_pkg_config" = no ; then
8755 if test -z "$XML2_CONFIG"; then
8756 for ac_prog in xml2-config
8758 # Extract the first word of "$ac_prog", so it can be a program name with args.
8759 set dummy $ac_prog; ac_word=$2
8760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8761 $as_echo_n "checking for $ac_word... " >&6; }
8762 if ${ac_cv_path_XML2_CONFIG+:} false; then :
8763 $as_echo_n "(cached) " >&6
8764 else
8765 case $XML2_CONFIG in
8766 [\\/]* | ?:[\\/]*)
8767 ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path.
8770 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8771 for as_dir in $PATH
8773 IFS=$as_save_IFS
8774 test -z "$as_dir" && as_dir=.
8775 for ac_exec_ext in '' $ac_executable_extensions; do
8776 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8777 ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8778 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8779 break 2
8781 done
8782 done
8783 IFS=$as_save_IFS
8786 esac
8788 XML2_CONFIG=$ac_cv_path_XML2_CONFIG
8789 if test -n "$XML2_CONFIG"; then
8790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8791 $as_echo "$XML2_CONFIG" >&6; }
8792 else
8793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8794 $as_echo "no" >&6; }
8798 test -n "$XML2_CONFIG" && break
8799 done
8801 else
8802 # Report the value of XML2_CONFIG in configure's output in all cases.
8803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML2_CONFIG" >&5
8804 $as_echo_n "checking for XML2_CONFIG... " >&6; }
8805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XML2_CONFIG" >&5
8806 $as_echo "$XML2_CONFIG" >&6; }
8809 if test -n "$XML2_CONFIG"; then
8810 XML2_CFLAGS=`$XML2_CONFIG --cflags`
8811 XML2_LIBS=`$XML2_CONFIG --libs`
8814 # Note the user could also set XML2_CFLAGS/XML2_LIBS directly
8815 for pgac_option in $XML2_CFLAGS; do
8816 case $pgac_option in
8817 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
8818 esac
8819 done
8820 for pgac_option in $XML2_LIBS; do
8821 case $pgac_option in
8822 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
8823 esac
8824 done
8829 # XSLT
8834 # Check whether --with-libxslt was given.
8835 if test "${with_libxslt+set}" = set; then :
8836 withval=$with_libxslt;
8837 case $withval in
8838 yes)
8840 $as_echo "#define USE_LIBXSLT 1" >>confdefs.h
8847 as_fn_error $? "no argument expected for --with-libxslt option" "$LINENO" 5
8849 esac
8851 else
8852 with_libxslt=no
8862 # tzdata
8867 # Check whether --with-system-tzdata was given.
8868 if test "${with_system_tzdata+set}" = set; then :
8869 withval=$with_system_tzdata;
8870 case $withval in
8871 yes)
8872 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8875 as_fn_error $? "argument required for --with-system-tzdata option" "$LINENO" 5
8880 esac
8888 # Zlib
8893 # Check whether --with-zlib was given.
8894 if test "${with_zlib+set}" = set; then :
8895 withval=$with_zlib;
8896 case $withval in
8897 yes)
8904 as_fn_error $? "no argument expected for --with-zlib option" "$LINENO" 5
8906 esac
8908 else
8909 with_zlib=yes
8917 # LZ4
8919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with LZ4 support" >&5
8920 $as_echo_n "checking whether to build with LZ4 support... " >&6; }
8924 # Check whether --with-lz4 was given.
8925 if test "${with_lz4+set}" = set; then :
8926 withval=$with_lz4;
8927 case $withval in
8928 yes)
8930 $as_echo "#define USE_LZ4 1" >>confdefs.h
8937 as_fn_error $? "no argument expected for --with-lz4 option" "$LINENO" 5
8939 esac
8941 else
8942 with_lz4=no
8947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lz4" >&5
8948 $as_echo "$with_lz4" >&6; }
8951 if test "$with_lz4" = yes; then
8953 pkg_failed=no
8954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblz4" >&5
8955 $as_echo_n "checking for liblz4... " >&6; }
8957 if test -n "$LZ4_CFLAGS"; then
8958 pkg_cv_LZ4_CFLAGS="$LZ4_CFLAGS"
8959 elif test -n "$PKG_CONFIG"; then
8960 if test -n "$PKG_CONFIG" && \
8961 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
8962 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
8963 ac_status=$?
8964 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8965 test $ac_status = 0; }; then
8966 pkg_cv_LZ4_CFLAGS=`$PKG_CONFIG --cflags "liblz4" 2>/dev/null`
8967 test "x$?" != "x0" && pkg_failed=yes
8968 else
8969 pkg_failed=yes
8971 else
8972 pkg_failed=untried
8974 if test -n "$LZ4_LIBS"; then
8975 pkg_cv_LZ4_LIBS="$LZ4_LIBS"
8976 elif test -n "$PKG_CONFIG"; then
8977 if test -n "$PKG_CONFIG" && \
8978 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblz4\""; } >&5
8979 ($PKG_CONFIG --exists --print-errors "liblz4") 2>&5
8980 ac_status=$?
8981 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8982 test $ac_status = 0; }; then
8983 pkg_cv_LZ4_LIBS=`$PKG_CONFIG --libs "liblz4" 2>/dev/null`
8984 test "x$?" != "x0" && pkg_failed=yes
8985 else
8986 pkg_failed=yes
8988 else
8989 pkg_failed=untried
8994 if test $pkg_failed = yes; then
8995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8996 $as_echo "no" >&6; }
8998 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
8999 _pkg_short_errors_supported=yes
9000 else
9001 _pkg_short_errors_supported=no
9003 if test $_pkg_short_errors_supported = yes; then
9004 LZ4_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "liblz4" 2>&1`
9005 else
9006 LZ4_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "liblz4" 2>&1`
9008 # Put the nasty error message in config.log where it belongs
9009 echo "$LZ4_PKG_ERRORS" >&5
9011 as_fn_error $? "Package requirements (liblz4) were not met:
9013 $LZ4_PKG_ERRORS
9015 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9016 installed software in a non-standard prefix.
9018 Alternatively, you may set the environment variables LZ4_CFLAGS
9019 and LZ4_LIBS to avoid the need to call pkg-config.
9020 See the pkg-config man page for more details." "$LINENO" 5
9021 elif test $pkg_failed = untried; then
9022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9023 $as_echo "no" >&6; }
9024 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9025 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9026 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9027 is in your PATH or set the PKG_CONFIG environment variable to the full
9028 path to pkg-config.
9030 Alternatively, you may set the environment variables LZ4_CFLAGS
9031 and LZ4_LIBS to avoid the need to call pkg-config.
9032 See the pkg-config man page for more details.
9034 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9035 See \`config.log' for more details" "$LINENO" 5; }
9036 else
9037 LZ4_CFLAGS=$pkg_cv_LZ4_CFLAGS
9038 LZ4_LIBS=$pkg_cv_LZ4_LIBS
9039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9040 $as_echo "yes" >&6; }
9043 # We only care about -I, -D, and -L switches;
9044 # note that -llz4 will be added by AC_CHECK_LIB below.
9045 for pgac_option in $LZ4_CFLAGS; do
9046 case $pgac_option in
9047 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9048 esac
9049 done
9050 for pgac_option in $LZ4_LIBS; do
9051 case $pgac_option in
9052 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9053 esac
9054 done
9058 # ZSTD
9060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with ZSTD support" >&5
9061 $as_echo_n "checking whether to build with ZSTD support... " >&6; }
9065 # Check whether --with-zstd was given.
9066 if test "${with_zstd+set}" = set; then :
9067 withval=$with_zstd;
9068 case $withval in
9069 yes)
9071 $as_echo "#define USE_ZSTD 1" >>confdefs.h
9078 as_fn_error $? "no argument expected for --with-zstd option" "$LINENO" 5
9080 esac
9082 else
9083 with_zstd=no
9088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_zstd" >&5
9089 $as_echo "$with_zstd" >&6; }
9092 if test "$with_zstd" = yes; then
9094 pkg_failed=no
9095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libzstd >= 1.4.0" >&5
9096 $as_echo_n "checking for libzstd >= 1.4.0... " >&6; }
9098 if test -n "$ZSTD_CFLAGS"; then
9099 pkg_cv_ZSTD_CFLAGS="$ZSTD_CFLAGS"
9100 elif test -n "$PKG_CONFIG"; then
9101 if test -n "$PKG_CONFIG" && \
9102 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9103 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9104 ac_status=$?
9105 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9106 test $ac_status = 0; }; then
9107 pkg_cv_ZSTD_CFLAGS=`$PKG_CONFIG --cflags "libzstd >= 1.4.0" 2>/dev/null`
9108 test "x$?" != "x0" && pkg_failed=yes
9109 else
9110 pkg_failed=yes
9112 else
9113 pkg_failed=untried
9115 if test -n "$ZSTD_LIBS"; then
9116 pkg_cv_ZSTD_LIBS="$ZSTD_LIBS"
9117 elif test -n "$PKG_CONFIG"; then
9118 if test -n "$PKG_CONFIG" && \
9119 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libzstd >= 1.4.0\""; } >&5
9120 ($PKG_CONFIG --exists --print-errors "libzstd >= 1.4.0") 2>&5
9121 ac_status=$?
9122 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9123 test $ac_status = 0; }; then
9124 pkg_cv_ZSTD_LIBS=`$PKG_CONFIG --libs "libzstd >= 1.4.0" 2>/dev/null`
9125 test "x$?" != "x0" && pkg_failed=yes
9126 else
9127 pkg_failed=yes
9129 else
9130 pkg_failed=untried
9135 if test $pkg_failed = yes; then
9136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9137 $as_echo "no" >&6; }
9139 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9140 _pkg_short_errors_supported=yes
9141 else
9142 _pkg_short_errors_supported=no
9144 if test $_pkg_short_errors_supported = yes; then
9145 ZSTD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9146 else
9147 ZSTD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libzstd >= 1.4.0" 2>&1`
9149 # Put the nasty error message in config.log where it belongs
9150 echo "$ZSTD_PKG_ERRORS" >&5
9152 as_fn_error $? "Package requirements (libzstd >= 1.4.0) were not met:
9154 $ZSTD_PKG_ERRORS
9156 Consider adjusting the PKG_CONFIG_PATH environment variable if you
9157 installed software in a non-standard prefix.
9159 Alternatively, you may set the environment variables ZSTD_CFLAGS
9160 and ZSTD_LIBS to avoid the need to call pkg-config.
9161 See the pkg-config man page for more details." "$LINENO" 5
9162 elif test $pkg_failed = untried; then
9163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9164 $as_echo "no" >&6; }
9165 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9166 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9167 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
9168 is in your PATH or set the PKG_CONFIG environment variable to the full
9169 path to pkg-config.
9171 Alternatively, you may set the environment variables ZSTD_CFLAGS
9172 and ZSTD_LIBS to avoid the need to call pkg-config.
9173 See the pkg-config man page for more details.
9175 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
9176 See \`config.log' for more details" "$LINENO" 5; }
9177 else
9178 ZSTD_CFLAGS=$pkg_cv_ZSTD_CFLAGS
9179 ZSTD_LIBS=$pkg_cv_ZSTD_LIBS
9180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9181 $as_echo "yes" >&6; }
9184 # We only care about -I, -D, and -L switches;
9185 # note that -lzstd will be added by AC_CHECK_LIB below.
9186 for pgac_option in $ZSTD_CFLAGS; do
9187 case $pgac_option in
9188 -I*|-D*) CPPFLAGS="$CPPFLAGS $pgac_option";;
9189 esac
9190 done
9191 for pgac_option in $ZSTD_LIBS; do
9192 case $pgac_option in
9193 -L*) LDFLAGS="$LDFLAGS $pgac_option";;
9194 esac
9195 done
9198 # Assignments
9201 CPPFLAGS="$CPPFLAGS $INCLUDES"
9202 LDFLAGS="$LDFLAGS $LIBDIRS"
9208 # Check whether --with-gnu-ld was given.
9209 if test "${with_gnu_ld+set}" = set; then :
9210 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
9211 else
9212 with_gnu_ld=no
9215 ac_prog=ld
9216 if test "$GCC" = yes; then
9217 # Check if gcc -print-prog-name=ld gives a path.
9218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
9219 $as_echo_n "checking for ld used by GCC... " >&6; }
9220 case $host in
9221 *-*-mingw*)
9222 # gcc leaves a trailing carriage return which upsets mingw
9223 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
9225 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
9226 esac
9227 case "$ac_prog" in
9228 # Accept absolute paths.
9229 [\\/]* | [A-Za-z]:[\\/]*)
9230 re_direlt='/[^/][^/]*/\.\./'
9231 # Canonicalize the path of ld
9232 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
9233 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
9234 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
9235 done
9236 test -z "$LD" && LD="$ac_prog"
9239 # If it fails, then pretend we aren't using GCC.
9240 ac_prog=ld
9243 # If it is relative, then search for the first ld in PATH.
9244 with_gnu_ld=unknown
9246 esac
9247 elif test "$with_gnu_ld" = yes; then
9248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
9249 $as_echo_n "checking for GNU ld... " >&6; }
9250 else
9251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
9252 $as_echo_n "checking for non-GNU ld... " >&6; }
9254 if ${ac_cv_path_LD+:} false; then :
9255 $as_echo_n "(cached) " >&6
9256 else
9257 if test -z "$LD"; then
9258 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
9259 for ac_dir in $PATH; do
9260 test -z "$ac_dir" && ac_dir=.
9261 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
9262 ac_cv_path_LD="$ac_dir/$ac_prog"
9263 # Check to see if the program is GNU ld. I'd rather use --version,
9264 # but apparently some GNU ld's only accept -v.
9265 # Break only if it was the GNU/non-GNU ld that we prefer.
9266 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
9267 test "$with_gnu_ld" != no && break
9268 else
9269 test "$with_gnu_ld" != yes && break
9272 done
9273 IFS="$ac_save_ifs"
9274 else
9275 ac_cv_path_LD="$LD" # Let the user override the test with a path.
9279 LD="$ac_cv_path_LD"
9280 if test -n "$LD"; then
9281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
9282 $as_echo "$LD" >&6; }
9283 else
9284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9285 $as_echo "no" >&6; }
9287 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
9288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
9289 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
9290 if ${ac_cv_prog_gnu_ld+:} false; then :
9291 $as_echo_n "(cached) " >&6
9292 else
9293 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
9294 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
9295 ac_cv_prog_gnu_ld=yes
9296 else
9297 ac_cv_prog_gnu_ld=no
9300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_ld" >&5
9301 $as_echo "$ac_cv_prog_gnu_ld" >&6; }
9302 with_gnu_ld=$ac_cv_prog_gnu_ld
9307 if test -n "$ac_tool_prefix"; then
9308 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
9309 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
9310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9311 $as_echo_n "checking for $ac_word... " >&6; }
9312 if ${ac_cv_prog_RANLIB+:} false; then :
9313 $as_echo_n "(cached) " >&6
9314 else
9315 if test -n "$RANLIB"; then
9316 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
9317 else
9318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9319 for as_dir in $PATH
9321 IFS=$as_save_IFS
9322 test -z "$as_dir" && as_dir=.
9323 for ac_exec_ext in '' $ac_executable_extensions; do
9324 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9325 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
9326 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9327 break 2
9329 done
9330 done
9331 IFS=$as_save_IFS
9335 RANLIB=$ac_cv_prog_RANLIB
9336 if test -n "$RANLIB"; then
9337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
9338 $as_echo "$RANLIB" >&6; }
9339 else
9340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9341 $as_echo "no" >&6; }
9346 if test -z "$ac_cv_prog_RANLIB"; then
9347 ac_ct_RANLIB=$RANLIB
9348 # Extract the first word of "ranlib", so it can be a program name with args.
9349 set dummy ranlib; ac_word=$2
9350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9351 $as_echo_n "checking for $ac_word... " >&6; }
9352 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
9353 $as_echo_n "(cached) " >&6
9354 else
9355 if test -n "$ac_ct_RANLIB"; then
9356 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
9357 else
9358 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9359 for as_dir in $PATH
9361 IFS=$as_save_IFS
9362 test -z "$as_dir" && as_dir=.
9363 for ac_exec_ext in '' $ac_executable_extensions; do
9364 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9365 ac_cv_prog_ac_ct_RANLIB="ranlib"
9366 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9367 break 2
9369 done
9370 done
9371 IFS=$as_save_IFS
9375 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
9376 if test -n "$ac_ct_RANLIB"; then
9377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
9378 $as_echo "$ac_ct_RANLIB" >&6; }
9379 else
9380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9381 $as_echo "no" >&6; }
9384 if test "x$ac_ct_RANLIB" = x; then
9385 RANLIB=":"
9386 else
9387 case $cross_compiling:$ac_tool_warned in
9388 yes:)
9389 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9390 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9391 ac_tool_warned=yes ;;
9392 esac
9393 RANLIB=$ac_ct_RANLIB
9395 else
9396 RANLIB="$ac_cv_prog_RANLIB"
9400 if test -n "$ac_tool_prefix"; then
9401 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
9402 set dummy ${ac_tool_prefix}strip; ac_word=$2
9403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9404 $as_echo_n "checking for $ac_word... " >&6; }
9405 if ${ac_cv_prog_STRIP+:} false; then :
9406 $as_echo_n "(cached) " >&6
9407 else
9408 if test -n "$STRIP"; then
9409 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
9410 else
9411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9412 for as_dir in $PATH
9414 IFS=$as_save_IFS
9415 test -z "$as_dir" && as_dir=.
9416 for ac_exec_ext in '' $ac_executable_extensions; do
9417 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9418 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
9419 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9420 break 2
9422 done
9423 done
9424 IFS=$as_save_IFS
9428 STRIP=$ac_cv_prog_STRIP
9429 if test -n "$STRIP"; then
9430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
9431 $as_echo "$STRIP" >&6; }
9432 else
9433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9434 $as_echo "no" >&6; }
9439 if test -z "$ac_cv_prog_STRIP"; then
9440 ac_ct_STRIP=$STRIP
9441 # Extract the first word of "strip", so it can be a program name with args.
9442 set dummy strip; ac_word=$2
9443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9444 $as_echo_n "checking for $ac_word... " >&6; }
9445 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
9446 $as_echo_n "(cached) " >&6
9447 else
9448 if test -n "$ac_ct_STRIP"; then
9449 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
9450 else
9451 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9452 for as_dir in $PATH
9454 IFS=$as_save_IFS
9455 test -z "$as_dir" && as_dir=.
9456 for ac_exec_ext in '' $ac_executable_extensions; do
9457 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9458 ac_cv_prog_ac_ct_STRIP="strip"
9459 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9460 break 2
9462 done
9463 done
9464 IFS=$as_save_IFS
9468 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
9469 if test -n "$ac_ct_STRIP"; then
9470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
9471 $as_echo "$ac_ct_STRIP" >&6; }
9472 else
9473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9474 $as_echo "no" >&6; }
9477 if test "x$ac_ct_STRIP" = x; then
9478 STRIP=":"
9479 else
9480 case $cross_compiling:$ac_tool_warned in
9481 yes:)
9482 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9483 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9484 ac_tool_warned=yes ;;
9485 esac
9486 STRIP=$ac_ct_STRIP
9488 else
9489 STRIP="$ac_cv_prog_STRIP"
9493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is possible to strip libraries" >&5
9494 $as_echo_n "checking whether it is possible to strip libraries... " >&6; }
9495 if test x"$STRIP" != x"" && "$STRIP" -V 2>&1 | grep "GNU strip" >/dev/null; then
9496 STRIP_STATIC_LIB="$STRIP -x"
9497 STRIP_SHARED_LIB="$STRIP --strip-unneeded"
9498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9499 $as_echo "yes" >&6; }
9500 else
9501 case $host_os in
9502 darwin*)
9503 STRIP="$STRIP -x"
9504 STRIP_STATIC_LIB=$STRIP
9505 STRIP_SHARED_LIB=$STRIP
9506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9507 $as_echo "yes" >&6; }
9510 STRIP_STATIC_LIB=:
9511 STRIP_SHARED_LIB=:
9512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9513 $as_echo "no" >&6; }
9515 esac
9520 if test -n "$ac_tool_prefix"; then
9521 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
9522 set dummy ${ac_tool_prefix}ar; ac_word=$2
9523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9524 $as_echo_n "checking for $ac_word... " >&6; }
9525 if ${ac_cv_prog_AR+:} false; then :
9526 $as_echo_n "(cached) " >&6
9527 else
9528 if test -n "$AR"; then
9529 ac_cv_prog_AR="$AR" # Let the user override the test.
9530 else
9531 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9532 for as_dir in $PATH
9534 IFS=$as_save_IFS
9535 test -z "$as_dir" && as_dir=.
9536 for ac_exec_ext in '' $ac_executable_extensions; do
9537 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9538 ac_cv_prog_AR="${ac_tool_prefix}ar"
9539 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9540 break 2
9542 done
9543 done
9544 IFS=$as_save_IFS
9548 AR=$ac_cv_prog_AR
9549 if test -n "$AR"; then
9550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
9551 $as_echo "$AR" >&6; }
9552 else
9553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9554 $as_echo "no" >&6; }
9559 if test -z "$ac_cv_prog_AR"; then
9560 ac_ct_AR=$AR
9561 # Extract the first word of "ar", so it can be a program name with args.
9562 set dummy ar; ac_word=$2
9563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9564 $as_echo_n "checking for $ac_word... " >&6; }
9565 if ${ac_cv_prog_ac_ct_AR+:} false; then :
9566 $as_echo_n "(cached) " >&6
9567 else
9568 if test -n "$ac_ct_AR"; then
9569 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
9570 else
9571 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9572 for as_dir in $PATH
9574 IFS=$as_save_IFS
9575 test -z "$as_dir" && as_dir=.
9576 for ac_exec_ext in '' $ac_executable_extensions; do
9577 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9578 ac_cv_prog_ac_ct_AR="ar"
9579 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9580 break 2
9582 done
9583 done
9584 IFS=$as_save_IFS
9588 ac_ct_AR=$ac_cv_prog_ac_ct_AR
9589 if test -n "$ac_ct_AR"; then
9590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
9591 $as_echo "$ac_ct_AR" >&6; }
9592 else
9593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9594 $as_echo "no" >&6; }
9597 if test "x$ac_ct_AR" = x; then
9598 AR="ar"
9599 else
9600 case $cross_compiling:$ac_tool_warned in
9601 yes:)
9602 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9603 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9604 ac_tool_warned=yes ;;
9605 esac
9606 AR=$ac_ct_AR
9608 else
9609 AR="$ac_cv_prog_AR"
9612 if test "$PORTNAME" = "win32"; then
9613 if test -n "$ac_tool_prefix"; then
9614 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
9615 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
9616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9617 $as_echo_n "checking for $ac_word... " >&6; }
9618 if ${ac_cv_prog_DLLTOOL+:} false; then :
9619 $as_echo_n "(cached) " >&6
9620 else
9621 if test -n "$DLLTOOL"; then
9622 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
9623 else
9624 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9625 for as_dir in $PATH
9627 IFS=$as_save_IFS
9628 test -z "$as_dir" && as_dir=.
9629 for ac_exec_ext in '' $ac_executable_extensions; do
9630 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9631 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
9632 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9633 break 2
9635 done
9636 done
9637 IFS=$as_save_IFS
9641 DLLTOOL=$ac_cv_prog_DLLTOOL
9642 if test -n "$DLLTOOL"; then
9643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
9644 $as_echo "$DLLTOOL" >&6; }
9645 else
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9647 $as_echo "no" >&6; }
9652 if test -z "$ac_cv_prog_DLLTOOL"; then
9653 ac_ct_DLLTOOL=$DLLTOOL
9654 # Extract the first word of "dlltool", so it can be a program name with args.
9655 set dummy dlltool; ac_word=$2
9656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9657 $as_echo_n "checking for $ac_word... " >&6; }
9658 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
9659 $as_echo_n "(cached) " >&6
9660 else
9661 if test -n "$ac_ct_DLLTOOL"; then
9662 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
9663 else
9664 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9665 for as_dir in $PATH
9667 IFS=$as_save_IFS
9668 test -z "$as_dir" && as_dir=.
9669 for ac_exec_ext in '' $ac_executable_extensions; do
9670 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9671 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9672 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9673 break 2
9675 done
9676 done
9677 IFS=$as_save_IFS
9681 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
9682 if test -n "$ac_ct_DLLTOOL"; then
9683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
9684 $as_echo "$ac_ct_DLLTOOL" >&6; }
9685 else
9686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9687 $as_echo "no" >&6; }
9690 if test "x$ac_ct_DLLTOOL" = x; then
9691 DLLTOOL="dlltool"
9692 else
9693 case $cross_compiling:$ac_tool_warned in
9694 yes:)
9695 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9696 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9697 ac_tool_warned=yes ;;
9698 esac
9699 DLLTOOL=$ac_ct_DLLTOOL
9701 else
9702 DLLTOOL="$ac_cv_prog_DLLTOOL"
9705 if test -n "$ac_tool_prefix"; then
9706 # Extract the first word of "${ac_tool_prefix}dllwrap", so it can be a program name with args.
9707 set dummy ${ac_tool_prefix}dllwrap; ac_word=$2
9708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9709 $as_echo_n "checking for $ac_word... " >&6; }
9710 if ${ac_cv_prog_DLLWRAP+:} false; then :
9711 $as_echo_n "(cached) " >&6
9712 else
9713 if test -n "$DLLWRAP"; then
9714 ac_cv_prog_DLLWRAP="$DLLWRAP" # Let the user override the test.
9715 else
9716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9717 for as_dir in $PATH
9719 IFS=$as_save_IFS
9720 test -z "$as_dir" && as_dir=.
9721 for ac_exec_ext in '' $ac_executable_extensions; do
9722 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9723 ac_cv_prog_DLLWRAP="${ac_tool_prefix}dllwrap"
9724 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9725 break 2
9727 done
9728 done
9729 IFS=$as_save_IFS
9733 DLLWRAP=$ac_cv_prog_DLLWRAP
9734 if test -n "$DLLWRAP"; then
9735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLWRAP" >&5
9736 $as_echo "$DLLWRAP" >&6; }
9737 else
9738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9739 $as_echo "no" >&6; }
9744 if test -z "$ac_cv_prog_DLLWRAP"; then
9745 ac_ct_DLLWRAP=$DLLWRAP
9746 # Extract the first word of "dllwrap", so it can be a program name with args.
9747 set dummy dllwrap; ac_word=$2
9748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9749 $as_echo_n "checking for $ac_word... " >&6; }
9750 if ${ac_cv_prog_ac_ct_DLLWRAP+:} false; then :
9751 $as_echo_n "(cached) " >&6
9752 else
9753 if test -n "$ac_ct_DLLWRAP"; then
9754 ac_cv_prog_ac_ct_DLLWRAP="$ac_ct_DLLWRAP" # Let the user override the test.
9755 else
9756 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9757 for as_dir in $PATH
9759 IFS=$as_save_IFS
9760 test -z "$as_dir" && as_dir=.
9761 for ac_exec_ext in '' $ac_executable_extensions; do
9762 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9763 ac_cv_prog_ac_ct_DLLWRAP="dllwrap"
9764 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9765 break 2
9767 done
9768 done
9769 IFS=$as_save_IFS
9773 ac_ct_DLLWRAP=$ac_cv_prog_ac_ct_DLLWRAP
9774 if test -n "$ac_ct_DLLWRAP"; then
9775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLWRAP" >&5
9776 $as_echo "$ac_ct_DLLWRAP" >&6; }
9777 else
9778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9779 $as_echo "no" >&6; }
9782 if test "x$ac_ct_DLLWRAP" = x; then
9783 DLLWRAP="dllwrap"
9784 else
9785 case $cross_compiling:$ac_tool_warned in
9786 yes:)
9787 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9788 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9789 ac_tool_warned=yes ;;
9790 esac
9791 DLLWRAP=$ac_ct_DLLWRAP
9793 else
9794 DLLWRAP="$ac_cv_prog_DLLWRAP"
9797 if test -n "$ac_tool_prefix"; then
9798 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
9799 set dummy ${ac_tool_prefix}windres; ac_word=$2
9800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9801 $as_echo_n "checking for $ac_word... " >&6; }
9802 if ${ac_cv_prog_WINDRES+:} false; then :
9803 $as_echo_n "(cached) " >&6
9804 else
9805 if test -n "$WINDRES"; then
9806 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
9807 else
9808 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9809 for as_dir in $PATH
9811 IFS=$as_save_IFS
9812 test -z "$as_dir" && as_dir=.
9813 for ac_exec_ext in '' $ac_executable_extensions; do
9814 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9815 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
9816 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9817 break 2
9819 done
9820 done
9821 IFS=$as_save_IFS
9825 WINDRES=$ac_cv_prog_WINDRES
9826 if test -n "$WINDRES"; then
9827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
9828 $as_echo "$WINDRES" >&6; }
9829 else
9830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9831 $as_echo "no" >&6; }
9836 if test -z "$ac_cv_prog_WINDRES"; then
9837 ac_ct_WINDRES=$WINDRES
9838 # Extract the first word of "windres", so it can be a program name with args.
9839 set dummy windres; ac_word=$2
9840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9841 $as_echo_n "checking for $ac_word... " >&6; }
9842 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
9843 $as_echo_n "(cached) " >&6
9844 else
9845 if test -n "$ac_ct_WINDRES"; then
9846 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
9847 else
9848 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9849 for as_dir in $PATH
9851 IFS=$as_save_IFS
9852 test -z "$as_dir" && as_dir=.
9853 for ac_exec_ext in '' $ac_executable_extensions; do
9854 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9855 ac_cv_prog_ac_ct_WINDRES="windres"
9856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9857 break 2
9859 done
9860 done
9861 IFS=$as_save_IFS
9865 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
9866 if test -n "$ac_ct_WINDRES"; then
9867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
9868 $as_echo "$ac_ct_WINDRES" >&6; }
9869 else
9870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9871 $as_echo "no" >&6; }
9874 if test "x$ac_ct_WINDRES" = x; then
9875 WINDRES="windres"
9876 else
9877 case $cross_compiling:$ac_tool_warned in
9878 yes:)
9879 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9880 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9881 ac_tool_warned=yes ;;
9882 esac
9883 WINDRES=$ac_ct_WINDRES
9885 else
9886 WINDRES="$ac_cv_prog_WINDRES"
9891 # Find a good install program. We prefer a C program (faster),
9892 # so one script is as good as another. But avoid the broken or
9893 # incompatible versions:
9894 # SysV /etc/install, /usr/sbin/install
9895 # SunOS /usr/etc/install
9896 # IRIX /sbin/install
9897 # AIX /bin/install
9898 # AmigaOS /C/install, which installs bootblocks on floppy discs
9899 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
9900 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
9901 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
9902 # OS/2's system install, which has a completely different semantic
9903 # ./install, which can be erroneously created by make from ./install.sh.
9904 # Reject install programs that cannot install multiple files.
9905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
9906 $as_echo_n "checking for a BSD-compatible install... " >&6; }
9907 if test -z "$INSTALL"; then
9908 if ${ac_cv_path_install+:} false; then :
9909 $as_echo_n "(cached) " >&6
9910 else
9911 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9912 for as_dir in $PATH
9914 IFS=$as_save_IFS
9915 test -z "$as_dir" && as_dir=.
9916 # Account for people who put trailing slashes in PATH elements.
9917 case $as_dir/ in #((
9918 ./ | .// | /[cC]/* | \
9919 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
9920 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
9921 /usr/ucb/* ) ;;
9923 # OSF1 and SCO ODT 3.0 have their own names for install.
9924 # Don't use installbsd from OSF since it installs stuff as root
9925 # by default.
9926 for ac_prog in ginstall scoinst install; do
9927 for ac_exec_ext in '' $ac_executable_extensions; do
9928 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
9929 if test $ac_prog = install &&
9930 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9931 # AIX install. It has an incompatible calling convention.
9933 elif test $ac_prog = install &&
9934 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
9935 # program-specific install script used by HP pwplus--don't use.
9937 else
9938 rm -rf conftest.one conftest.two conftest.dir
9939 echo one > conftest.one
9940 echo two > conftest.two
9941 mkdir conftest.dir
9942 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
9943 test -s conftest.one && test -s conftest.two &&
9944 test -s conftest.dir/conftest.one &&
9945 test -s conftest.dir/conftest.two
9946 then
9947 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9948 break 3
9952 done
9953 done
9955 esac
9957 done
9958 IFS=$as_save_IFS
9960 rm -rf conftest.one conftest.two conftest.dir
9963 if test "${ac_cv_path_install+set}" = set; then
9964 INSTALL=$ac_cv_path_install
9965 else
9966 # As a last resort, use the slow shell script. Don't cache a
9967 # value for INSTALL within a source directory, because that will
9968 # break other packages using the cache if that directory is
9969 # removed, or if the value is a relative name.
9970 INSTALL=$ac_install_sh
9973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9974 $as_echo "$INSTALL" >&6; }
9976 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9977 # It thinks the first close brace ends the variable substitution.
9978 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9980 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9982 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9984 # When Autoconf chooses install-sh as install program it tries to generate
9985 # a relative path to it in each makefile where it substitutes it. This clashes
9986 # with our Makefile.global concept. This workaround helps.
9987 case $INSTALL in
9988 *install-sh*) install_bin='';;
9989 *) install_bin=$INSTALL;;
9990 esac
9993 if test -z "$TAR"; then
9994 for ac_prog in tar
9996 # Extract the first word of "$ac_prog", so it can be a program name with args.
9997 set dummy $ac_prog; ac_word=$2
9998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9999 $as_echo_n "checking for $ac_word... " >&6; }
10000 if ${ac_cv_path_TAR+:} false; then :
10001 $as_echo_n "(cached) " >&6
10002 else
10003 case $TAR in
10004 [\\/]* | ?:[\\/]*)
10005 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10008 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10009 for as_dir in $PATH
10011 IFS=$as_save_IFS
10012 test -z "$as_dir" && as_dir=.
10013 for ac_exec_ext in '' $ac_executable_extensions; do
10014 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10015 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10016 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10017 break 2
10019 done
10020 done
10021 IFS=$as_save_IFS
10024 esac
10026 TAR=$ac_cv_path_TAR
10027 if test -n "$TAR"; then
10028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10029 $as_echo "$TAR" >&6; }
10030 else
10031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10032 $as_echo "no" >&6; }
10036 test -n "$TAR" && break
10037 done
10039 else
10040 # Report the value of TAR in configure's output in all cases.
10041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10042 $as_echo_n "checking for TAR... " >&6; }
10043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10044 $as_echo "$TAR" >&6; }
10047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
10048 $as_echo_n "checking whether ln -s works... " >&6; }
10049 LN_S=$as_ln_s
10050 if test "$LN_S" = "ln -s"; then
10051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10052 $as_echo "yes" >&6; }
10053 else
10054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
10055 $as_echo "no, using $LN_S" >&6; }
10058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
10059 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
10060 if test -z "$MKDIR_P"; then
10061 if ${ac_cv_path_mkdir+:} false; then :
10062 $as_echo_n "(cached) " >&6
10063 else
10064 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10065 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
10067 IFS=$as_save_IFS
10068 test -z "$as_dir" && as_dir=.
10069 for ac_prog in mkdir gmkdir; do
10070 for ac_exec_ext in '' $ac_executable_extensions; do
10071 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
10072 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
10073 'mkdir (GNU coreutils) '* | \
10074 'mkdir (coreutils) '* | \
10075 'mkdir (fileutils) '4.1*)
10076 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
10077 break 3;;
10078 esac
10079 done
10080 done
10081 done
10082 IFS=$as_save_IFS
10086 test -d ./--version && rmdir ./--version
10087 if test "${ac_cv_path_mkdir+set}" = set; then
10088 MKDIR_P="$ac_cv_path_mkdir -p"
10089 else
10090 # As a last resort, use the slow shell script. Don't cache a
10091 # value for MKDIR_P within a source directory, because that will
10092 # break other packages using the cache if that directory is
10093 # removed, or if the value is a relative name.
10094 MKDIR_P="$ac_install_sh -d"
10097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
10098 $as_echo "$MKDIR_P" >&6; }
10100 # When Autoconf chooses install-sh as mkdir -p program it tries to generate
10101 # a relative path to it in each makefile where it substitutes it. This clashes
10102 # with our Makefile.global concept. This workaround helps.
10103 case $MKDIR_P in
10104 *install-sh*) MKDIR_P='\${SHELL} \${top_srcdir}/config/install-sh -c -d';;
10105 esac
10107 if test -z "$BISON"; then
10108 for ac_prog in bison
10110 # Extract the first word of "$ac_prog", so it can be a program name with args.
10111 set dummy $ac_prog; ac_word=$2
10112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10113 $as_echo_n "checking for $ac_word... " >&6; }
10114 if ${ac_cv_path_BISON+:} false; then :
10115 $as_echo_n "(cached) " >&6
10116 else
10117 case $BISON in
10118 [\\/]* | ?:[\\/]*)
10119 ac_cv_path_BISON="$BISON" # Let the user override the test with a path.
10122 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10123 for as_dir in $PATH
10125 IFS=$as_save_IFS
10126 test -z "$as_dir" && as_dir=.
10127 for ac_exec_ext in '' $ac_executable_extensions; do
10128 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10129 ac_cv_path_BISON="$as_dir/$ac_word$ac_exec_ext"
10130 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10131 break 2
10133 done
10134 done
10135 IFS=$as_save_IFS
10138 esac
10140 BISON=$ac_cv_path_BISON
10141 if test -n "$BISON"; then
10142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
10143 $as_echo "$BISON" >&6; }
10144 else
10145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10146 $as_echo "no" >&6; }
10150 test -n "$BISON" && break
10151 done
10153 else
10154 # Report the value of BISON in configure's output in all cases.
10155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BISON" >&5
10156 $as_echo_n "checking for BISON... " >&6; }
10157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5
10158 $as_echo "$BISON" >&6; }
10162 if test "$BISON"; then
10163 pgac_bison_version=`$BISON --version 2>/dev/null | sed q`
10164 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_bison_version" >&5
10165 $as_echo "$as_me: using $pgac_bison_version" >&6;}
10166 if echo "$pgac_bison_version" | $AWK '{ if ($4 < 1.875) exit 0; else exit 1;}'
10167 then
10168 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10169 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
10170 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&5
10171 $as_echo "$as_me: WARNING:
10172 *** The installed version of Bison, $BISON, is too old to use with PostgreSQL.
10173 *** Bison version 1.875 or later is required, but this is $pgac_bison_version." >&2;}
10174 BISON=""
10176 # Bison >=3.0 issues warnings about %name-prefix="base_yy", instead
10177 # of the now preferred %name-prefix "base_yy", but the latter
10178 # doesn't work with Bison 2.3 or less. So for now we silence the
10179 # deprecation warnings.
10180 if echo "$pgac_bison_version" | $AWK '{ if ($4 >= 3) exit 0; else exit 1;}'
10181 then
10182 BISONFLAGS="$BISONFLAGS -Wno-deprecated"
10186 if test -z "$BISON"; then
10187 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10188 *** Without Bison you will not be able to build PostgreSQL from Git nor
10189 *** change any of the parser definition files. You can obtain Bison from
10190 *** a GNU mirror site. (If you are using the official distribution of
10191 *** PostgreSQL then you do not need to worry about this, because the Bison
10192 *** output is pre-generated.)" >&5
10193 $as_echo "$as_me: WARNING:
10194 *** Without Bison you will not be able to build PostgreSQL from Git nor
10195 *** change any of the parser definition files. You can obtain Bison from
10196 *** a GNU mirror site. (If you are using the official distribution of
10197 *** PostgreSQL then you do not need to worry about this, because the Bison
10198 *** output is pre-generated.)" >&2;}
10202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flex" >&5
10203 $as_echo_n "checking for flex... " >&6; }
10204 if ${pgac_cv_path_flex+:} false; then :
10205 $as_echo_n "(cached) " >&6
10206 else
10207 # Let the user override the test
10208 if test -n "$FLEX"; then
10209 pgac_cv_path_flex=$FLEX
10210 else
10211 pgac_save_IFS=$IFS
10212 IFS=$PATH_SEPARATOR
10213 for pgac_dir in $PATH; do
10214 IFS=$pgac_save_IFS
10215 if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
10216 pgac_dir=`pwd`
10218 for pgac_prog in flex lex; do
10219 pgac_candidate="$pgac_dir/$pgac_prog"
10220 if test -f "$pgac_candidate" \
10221 && $pgac_candidate --version </dev/null >/dev/null 2>&1
10222 then
10223 echo '%%' > conftest.l
10224 if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
10225 pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
10226 if echo "$pgac_flex_version" | sed 's/[.a-z]/ /g' | $AWK '{ if ($1 == 2 && ($2 > 5 || ($2 == 5 && $3 >= 31))) exit 0; else exit 1;}'
10227 then
10228 pgac_cv_path_flex=$pgac_candidate
10229 break 2
10230 else
10231 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10232 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10233 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&5
10234 $as_echo "$as_me: WARNING:
10235 *** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
10236 *** Flex version 2.5.31 or later is required, but this is $pgac_flex_version." >&2;}
10240 done
10241 done
10242 rm -f conftest.l lex.yy.c
10243 : ${pgac_cv_path_flex=no}
10247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_path_flex" >&5
10248 $as_echo "$pgac_cv_path_flex" >&6; }
10249 if test x"$pgac_cv_path_flex" = x"no"; then
10250 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10251 *** Without Flex you will not be able to build PostgreSQL from Git nor
10252 *** change any of the scanner definition files. You can obtain Flex from
10253 *** a GNU mirror site. (If you are using the official distribution of
10254 *** PostgreSQL then you do not need to worry about this because the Flex
10255 *** output is pre-generated.)" >&5
10256 $as_echo "$as_me: WARNING:
10257 *** Without Flex you will not be able to build PostgreSQL from Git nor
10258 *** change any of the scanner definition files. You can obtain Flex from
10259 *** a GNU mirror site. (If you are using the official distribution of
10260 *** PostgreSQL then you do not need to worry about this because the Flex
10261 *** output is pre-generated.)" >&2;}
10263 FLEX=
10264 else
10265 FLEX=$pgac_cv_path_flex
10266 pgac_flex_version=`$FLEX --version 2>/dev/null`
10267 { $as_echo "$as_me:${as_lineno-$LINENO}: using $pgac_flex_version" >&5
10268 $as_echo "$as_me: using $pgac_flex_version" >&6;}
10275 if test -z "$PERL"; then
10276 for ac_prog in perl
10278 # Extract the first word of "$ac_prog", so it can be a program name with args.
10279 set dummy $ac_prog; ac_word=$2
10280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10281 $as_echo_n "checking for $ac_word... " >&6; }
10282 if ${ac_cv_path_PERL+:} false; then :
10283 $as_echo_n "(cached) " >&6
10284 else
10285 case $PERL in
10286 [\\/]* | ?:[\\/]*)
10287 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
10290 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10291 for as_dir in $PATH
10293 IFS=$as_save_IFS
10294 test -z "$as_dir" && as_dir=.
10295 for ac_exec_ext in '' $ac_executable_extensions; do
10296 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10297 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
10298 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10299 break 2
10301 done
10302 done
10303 IFS=$as_save_IFS
10306 esac
10308 PERL=$ac_cv_path_PERL
10309 if test -n "$PERL"; then
10310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10311 $as_echo "$PERL" >&6; }
10312 else
10313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10314 $as_echo "no" >&6; }
10318 test -n "$PERL" && break
10319 done
10321 else
10322 # Report the value of PERL in configure's output in all cases.
10323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PERL" >&5
10324 $as_echo_n "checking for PERL... " >&6; }
10325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
10326 $as_echo "$PERL" >&6; }
10330 if test "$PERL"; then
10331 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'`
10332 { $as_echo "$as_me:${as_lineno-$LINENO}: using perl $pgac_perl_version" >&5
10333 $as_echo "$as_me: using perl $pgac_perl_version" >&6;}
10334 if echo "$pgac_perl_version" | sed 's/[.a-z_]/ /g' | \
10335 $AWK '{ if ($1 == 5 && ($2 > 8 || ($2 == 8 && $3 >= 3))) exit 1; else exit 0;}'
10336 then
10337 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10338 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10339 *** Perl version 5.8.3 or later is required, but this is $pgac_perl_version." >&5
10340 $as_echo "$as_me: WARNING:
10341 *** The installed version of Perl, $PERL, is too old to use with PostgreSQL.
10342 *** Perl version 5.8.3 or later is required, but this is $pgac_perl_version." >&2;}
10343 PERL=""
10347 if test -z "$PERL"; then
10348 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
10349 *** Without Perl you will not be able to build PostgreSQL from Git.
10350 *** You can obtain Perl from any CPAN mirror site.
10351 *** (If you are using the official distribution of PostgreSQL then you do not
10352 *** need to worry about this, because the Perl output is pre-generated.)" >&5
10353 $as_echo "$as_me: WARNING:
10354 *** Without Perl you will not be able to build PostgreSQL from Git.
10355 *** You can obtain Perl from any CPAN mirror site.
10356 *** (If you are using the official distribution of PostgreSQL then you do not
10357 *** need to worry about this, because the Perl output is pre-generated.)" >&2;}
10360 if test "$with_perl" = yes; then
10361 if test -z "$PERL"; then
10362 as_fn_error $? "Perl not found" "$LINENO" 5
10365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl archlibexp" >&5
10366 $as_echo_n "checking for Perl archlibexp... " >&6; }
10367 perl_archlibexp=`$PERL -MConfig -e 'print $Config{archlibexp}'`
10368 test "$PORTNAME" = "win32" && perl_archlibexp=`echo $perl_archlibexp | sed 's,\\\\,/,g'`
10369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_archlibexp" >&5
10370 $as_echo "$perl_archlibexp" >&6; }
10371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl privlibexp" >&5
10372 $as_echo_n "checking for Perl privlibexp... " >&6; }
10373 perl_privlibexp=`$PERL -MConfig -e 'print $Config{privlibexp}'`
10374 test "$PORTNAME" = "win32" && perl_privlibexp=`echo $perl_privlibexp | sed 's,\\\\,/,g'`
10375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_privlibexp" >&5
10376 $as_echo "$perl_privlibexp" >&6; }
10377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl useshrplib" >&5
10378 $as_echo_n "checking for Perl useshrplib... " >&6; }
10379 perl_useshrplib=`$PERL -MConfig -e 'print $Config{useshrplib}'`
10380 test "$PORTNAME" = "win32" && perl_useshrplib=`echo $perl_useshrplib | sed 's,\\\\,/,g'`
10381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_useshrplib" >&5
10382 $as_echo "$perl_useshrplib" >&6; }
10383 if test "$perl_useshrplib" != yes && test "$perl_useshrplib" != true; then
10384 as_fn_error $? "cannot build PL/Perl because libperl is not a shared library
10385 You might have to rebuild your Perl installation. Refer to the
10386 documentation for details. Use --without-perl to disable building
10387 PL/Perl." "$LINENO" 5
10389 # On most platforms, archlibexp is also where the Perl include files live ...
10390 perl_includespec="-I$perl_archlibexp/CORE"
10391 # ... but on newer macOS versions, we must use -iwithsysroot to look
10392 # under $PG_SYSROOT
10393 if test \! -f "$perl_archlibexp/CORE/perl.h" ; then
10394 if test -f "$PG_SYSROOT$perl_archlibexp/CORE/perl.h" ; then
10395 perl_includespec="-iwithsysroot $perl_archlibexp/CORE"
10399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS recommended by Perl" >&5
10400 $as_echo_n "checking for CFLAGS recommended by Perl... " >&6; }
10401 perl_ccflags=`$PERL -MConfig -e 'print $Config{ccflags}'`
10402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_ccflags" >&5
10403 $as_echo "$perl_ccflags" >&6; }
10404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLAGS to compile embedded Perl" >&5
10405 $as_echo_n "checking for CFLAGS to compile embedded Perl... " >&6; }
10406 perl_embed_ccflags=`$PERL -MConfig -e 'foreach $f (split(" ",$Config{ccflags})) {print $f, " " if ($f =~ /^-D[^_]/ || $f =~ /^-D_USE_32BIT_TIME_T/)}'`
10407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ccflags" >&5
10408 $as_echo "$perl_embed_ccflags" >&6; }
10411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flags to link embedded Perl" >&5
10412 $as_echo_n "checking for flags to link embedded Perl... " >&6; }
10413 if test "$PORTNAME" = "win32" ; then
10414 perl_lib=`basename $perl_archlibexp/CORE/perl[5-9]*.lib .lib`
10415 if test -e "$perl_archlibexp/CORE/$perl_lib.lib"; then
10416 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10417 else
10418 perl_lib=`basename $perl_archlibexp/CORE/libperl[5-9]*.a .a | sed 's/^lib//'`
10419 if test -e "$perl_archlibexp/CORE/lib$perl_lib.a"; then
10420 perl_embed_ldflags="-L$perl_archlibexp/CORE -l$perl_lib"
10423 else
10424 pgac_tmp1=`$PERL -MExtUtils::Embed -e ldopts`
10425 pgac_tmp2=`$PERL -MConfig -e 'print $Config{ccdlflags}'`
10426 perl_embed_ldflags=`echo X"$pgac_tmp1" | sed -e "s/^X//" -e "s%$pgac_tmp2%%" -e "s/ -arch [-a-zA-Z0-9_]*//g"`
10428 if test -z "$perl_embed_ldflags" ; then
10429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10430 $as_echo "no" >&6; }
10431 as_fn_error $? "could not determine flags for linking embedded Perl.
10432 This probably means that ExtUtils::Embed or ExtUtils::MakeMaker is not
10433 installed." "$LINENO" 5
10434 else
10435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $perl_embed_ldflags" >&5
10436 $as_echo "$perl_embed_ldflags" >&6; }
10441 if test "$with_python" = yes; then
10442 if test -z "$PYTHON"; then
10443 for ac_prog in python3 python
10445 # Extract the first word of "$ac_prog", so it can be a program name with args.
10446 set dummy $ac_prog; ac_word=$2
10447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10448 $as_echo_n "checking for $ac_word... " >&6; }
10449 if ${ac_cv_path_PYTHON+:} false; then :
10450 $as_echo_n "(cached) " >&6
10451 else
10452 case $PYTHON in
10453 [\\/]* | ?:[\\/]*)
10454 ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path.
10457 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10458 for as_dir in $PATH
10460 IFS=$as_save_IFS
10461 test -z "$as_dir" && as_dir=.
10462 for ac_exec_ext in '' $ac_executable_extensions; do
10463 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10464 ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext"
10465 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10466 break 2
10468 done
10469 done
10470 IFS=$as_save_IFS
10473 esac
10475 PYTHON=$ac_cv_path_PYTHON
10476 if test -n "$PYTHON"; then
10477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10478 $as_echo "$PYTHON" >&6; }
10479 else
10480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10481 $as_echo "no" >&6; }
10485 test -n "$PYTHON" && break
10486 done
10488 else
10489 # Report the value of PYTHON in configure's output in all cases.
10490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5
10491 $as_echo_n "checking for PYTHON... " >&6; }
10492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
10493 $as_echo "$PYTHON" >&6; }
10496 if test x"$PYTHON" = x""; then
10497 as_fn_error $? "Python not found" "$LINENO" 5
10501 python_fullversion=`${PYTHON} -c "import sys; print(sys.version)" | sed q`
10502 { $as_echo "$as_me:${as_lineno-$LINENO}: using python $python_fullversion" >&5
10503 $as_echo "$as_me: using python $python_fullversion" >&6;}
10504 # python_fullversion is typically n.n.n plus some trailing junk
10505 python_majorversion=`echo "$python_fullversion" | sed 's/^\([0-9]*\).*/\1/'`
10506 python_minorversion=`echo "$python_fullversion" | sed 's/^[0-9]*\.\([0-9]*\).*/\1/'`
10507 python_version=`echo "$python_fullversion" | sed 's/^\([0-9]*\.[0-9]*\).*/\1/'`
10508 # Reject unsupported Python versions as soon as practical.
10509 if test "$python_majorversion" -lt 3; then
10510 as_fn_error $? "Python version $python_version is too old (version 3 or later is required)" "$LINENO" 5
10513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Python sysconfig module" >&5
10514 $as_echo_n "checking for Python sysconfig module... " >&6; }
10515 if "${PYTHON}" -c 'import sysconfig' 2>&5
10516 then
10517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10518 $as_echo "yes" >&6; }
10519 else
10520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10521 $as_echo "no" >&6; }
10522 as_fn_error $? "sysconfig module not found" "$LINENO" 5
10525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python configuration directory" >&5
10526 $as_echo_n "checking Python configuration directory... " >&6; }
10527 python_configdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBPL'))))"`
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_configdir" >&5
10529 $as_echo "$python_configdir" >&6; }
10531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Python include directory" >&5
10532 $as_echo_n "checking Python include directory... " >&6; }
10533 python_includespec=`${PYTHON} -c "import sysconfig; print('-I' + sysconfig.get_config_var('INCLUDEPY'))"`
10534 if test "$PORTNAME" = win32 ; then
10535 python_includespec=`echo $python_includespec | sed 's,[\],/,g'`
10537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_includespec" >&5
10538 $as_echo "$python_includespec" >&6; }
10542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link an embedded Python application" >&5
10543 $as_echo_n "checking how to link an embedded Python application... " >&6; }
10545 python_libdir=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBDIR'))))"`
10546 python_ldlibrary=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDLIBRARY'))))"`
10548 # If LDLIBRARY exists and has a shlib extension, use it verbatim.
10549 ldlibrary=`echo "${python_ldlibrary}" | sed -e 's/\.so$//' -e 's/\.dll$//' -e 's/\.dylib$//' -e 's/\.sl$//'`
10550 if test -e "${python_libdir}/${python_ldlibrary}" -a x"${python_ldlibrary}" != x"${ldlibrary}"
10551 then
10552 ldlibrary=`echo "${ldlibrary}" | sed "s/^lib//"`
10553 found_shlib=1
10554 else
10555 # Otherwise, guess the base name of the shlib.
10556 # LDVERSION was added in Python 3.2, before that use VERSION,
10557 # or failing that, $python_version from _PGAC_CHECK_PYTHON_DIRS.
10558 python_ldversion=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LDVERSION'))))"`
10559 if test x"${python_ldversion}" != x""; then
10560 ldlibrary="python${python_ldversion}"
10561 else
10562 python_version_var=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('VERSION'))))"`
10563 if test x"${python_version_var}" != x""; then
10564 ldlibrary="python${python_version_var}"
10565 else
10566 ldlibrary="python${python_version}"
10569 # Search for a likely-looking file.
10570 found_shlib=0
10571 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10573 # Note: DLSUFFIX is for loadable modules, not shared
10574 # libraries, so cannot be used here portably. Just
10575 # check all known possibilities.
10576 for e in .so .dll .dylib .sl; do
10577 if test -e "$d/lib${ldlibrary}$e"; then
10578 python_libdir="$d"
10579 found_shlib=1
10580 break 2
10582 done
10583 done
10584 # Some platforms (OpenBSD) require us to accept a bare versioned shlib
10585 # (".so.n.n") as well. However, check this only after failing to find
10586 # ".so" anywhere, because yet other platforms (Debian) put the .so
10587 # symlink in a different directory from the underlying versioned shlib.
10588 if test "$found_shlib" != 1; then
10589 for d in "${python_libdir}" "${python_configdir}" /usr/lib64 /usr/lib
10591 for f in "$d/lib${ldlibrary}.so."* ; do
10592 if test -e "$f"; then
10593 python_libdir="$d"
10594 found_shlib=1
10595 break 2
10597 done
10598 done
10600 # As usual, Windows has its own ideas. Possible default library
10601 # locations include c:/Windows/System32 and (for Cygwin) /usr/bin,
10602 # and the "lib" prefix might not be there.
10603 if test "$found_shlib" != 1 -a \( "$PORTNAME" = win32 -o "$PORTNAME" = cygwin \); then
10604 for d in "${python_libdir}" "${python_configdir}" c:/Windows/System32 /usr/bin
10606 for f in "$d/lib${ldlibrary}.dll" "$d/${ldlibrary}.dll" ; do
10607 if test -e "$f"; then
10608 python_libdir="$d"
10609 found_shlib=1
10610 break 2
10612 done
10613 done
10616 if test "$found_shlib" != 1; then
10617 as_fn_error $? "could not find shared library for Python
10618 You might have to rebuild your Python installation. Refer to the
10619 documentation for details. Use --without-python to disable building
10620 PL/Python." "$LINENO" 5
10622 python_libspec="-L${python_libdir} -l${ldlibrary}"
10624 python_additional_libs=`${PYTHON} -c "import sysconfig; print(' '.join(filter(None,sysconfig.get_config_vars('LIBS','LIBC','LIBM','BASEMODLIBS'))))"`
10626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${python_libspec} ${python_additional_libs}" >&5
10627 $as_echo "${python_libspec} ${python_additional_libs}" >&6; }
10633 if test x"$cross_compiling" = x"yes" && test -z "$with_system_tzdata"; then
10634 if test -z "$ZIC"; then
10635 for ac_prog in zic
10637 # Extract the first word of "$ac_prog", so it can be a program name with args.
10638 set dummy $ac_prog; ac_word=$2
10639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10640 $as_echo_n "checking for $ac_word... " >&6; }
10641 if ${ac_cv_path_ZIC+:} false; then :
10642 $as_echo_n "(cached) " >&6
10643 else
10644 case $ZIC in
10645 [\\/]* | ?:[\\/]*)
10646 ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
10649 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10650 for as_dir in $PATH
10652 IFS=$as_save_IFS
10653 test -z "$as_dir" && as_dir=.
10654 for ac_exec_ext in '' $ac_executable_extensions; do
10655 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10656 ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
10657 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10658 break 2
10660 done
10661 done
10662 IFS=$as_save_IFS
10665 esac
10667 ZIC=$ac_cv_path_ZIC
10668 if test -n "$ZIC"; then
10669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10670 $as_echo "$ZIC" >&6; }
10671 else
10672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10673 $as_echo "no" >&6; }
10677 test -n "$ZIC" && break
10678 done
10680 else
10681 # Report the value of ZIC in configure's output in all cases.
10682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIC" >&5
10683 $as_echo_n "checking for ZIC... " >&6; }
10684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIC" >&5
10685 $as_echo "$ZIC" >&6; }
10688 if test -z "$ZIC"; then
10689 as_fn_error $? "
10690 When cross-compiling, either use the option --with-system-tzdata to use
10691 existing time-zone data, or set the environment variable ZIC to a zic
10692 program to use during the build." "$LINENO" 5
10697 # Pthreads
10699 # For each platform, we need to know about any special compile and link
10700 # libraries, and whether the normal C function names are thread-safe.
10701 # See the comment at the top of src/port/thread.c for more information.
10702 # WIN32 doesn't need the pthread tests; it always uses threads
10704 # These tests are run before the library-tests, because linking with the
10705 # other libraries can pull in the pthread functions as a side-effect. We
10706 # want to use the -pthread or similar flags directly, and not rely on
10707 # the side-effects of linking with some other library.
10709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
10710 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
10711 if ${ac_cv_path_SED+:} false; then :
10712 $as_echo_n "(cached) " >&6
10713 else
10714 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
10715 for ac_i in 1 2 3 4 5 6 7; do
10716 ac_script="$ac_script$as_nl$ac_script"
10717 done
10718 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
10719 { ac_script=; unset ac_script;}
10720 if test -z "$SED"; then
10721 ac_path_SED_found=false
10722 # Loop through the user's path and test for each of PROGNAME-LIST
10723 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10724 for as_dir in $PATH
10726 IFS=$as_save_IFS
10727 test -z "$as_dir" && as_dir=.
10728 for ac_prog in sed gsed; do
10729 for ac_exec_ext in '' $ac_executable_extensions; do
10730 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
10731 as_fn_executable_p "$ac_path_SED" || continue
10732 # Check for GNU ac_path_SED and select it if it is found.
10733 # Check for GNU $ac_path_SED
10734 case `"$ac_path_SED" --version 2>&1` in
10735 *GNU*)
10736 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
10738 ac_count=0
10739 $as_echo_n 0123456789 >"conftest.in"
10740 while :
10742 cat "conftest.in" "conftest.in" >"conftest.tmp"
10743 mv "conftest.tmp" "conftest.in"
10744 cp "conftest.in" "conftest.nl"
10745 $as_echo '' >> "conftest.nl"
10746 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
10747 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10748 as_fn_arith $ac_count + 1 && ac_count=$as_val
10749 if test $ac_count -gt ${ac_path_SED_max-0}; then
10750 # Best one so far, save it but keep looking for a better one
10751 ac_cv_path_SED="$ac_path_SED"
10752 ac_path_SED_max=$ac_count
10754 # 10*(2^10) chars as input seems more than enough
10755 test $ac_count -gt 10 && break
10756 done
10757 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10758 esac
10760 $ac_path_SED_found && break 3
10761 done
10762 done
10763 done
10764 IFS=$as_save_IFS
10765 if test -z "$ac_cv_path_SED"; then
10766 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
10768 else
10769 ac_cv_path_SED=$SED
10773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
10774 $as_echo "$ac_cv_path_SED" >&6; }
10775 SED="$ac_cv_path_SED"
10776 rm -f conftest.sed
10779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
10780 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
10781 if ${ac_cv_path_GREP+:} false; then :
10782 $as_echo_n "(cached) " >&6
10783 else
10784 if test -z "$GREP"; then
10785 ac_path_GREP_found=false
10786 # Loop through the user's path and test for each of PROGNAME-LIST
10787 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10788 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10790 IFS=$as_save_IFS
10791 test -z "$as_dir" && as_dir=.
10792 for ac_prog in grep ggrep; do
10793 for ac_exec_ext in '' $ac_executable_extensions; do
10794 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
10795 as_fn_executable_p "$ac_path_GREP" || continue
10796 # Check for GNU ac_path_GREP and select it if it is found.
10797 # Check for GNU $ac_path_GREP
10798 case `"$ac_path_GREP" --version 2>&1` in
10799 *GNU*)
10800 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
10802 ac_count=0
10803 $as_echo_n 0123456789 >"conftest.in"
10804 while :
10806 cat "conftest.in" "conftest.in" >"conftest.tmp"
10807 mv "conftest.tmp" "conftest.in"
10808 cp "conftest.in" "conftest.nl"
10809 $as_echo 'GREP' >> "conftest.nl"
10810 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10811 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10812 as_fn_arith $ac_count + 1 && ac_count=$as_val
10813 if test $ac_count -gt ${ac_path_GREP_max-0}; then
10814 # Best one so far, save it but keep looking for a better one
10815 ac_cv_path_GREP="$ac_path_GREP"
10816 ac_path_GREP_max=$ac_count
10818 # 10*(2^10) chars as input seems more than enough
10819 test $ac_count -gt 10 && break
10820 done
10821 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10822 esac
10824 $ac_path_GREP_found && break 3
10825 done
10826 done
10827 done
10828 IFS=$as_save_IFS
10829 if test -z "$ac_cv_path_GREP"; then
10830 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10832 else
10833 ac_cv_path_GREP=$GREP
10837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
10838 $as_echo "$ac_cv_path_GREP" >&6; }
10839 GREP="$ac_cv_path_GREP"
10842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
10843 $as_echo_n "checking for egrep... " >&6; }
10844 if ${ac_cv_path_EGREP+:} false; then :
10845 $as_echo_n "(cached) " >&6
10846 else
10847 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
10848 then ac_cv_path_EGREP="$GREP -E"
10849 else
10850 if test -z "$EGREP"; then
10851 ac_path_EGREP_found=false
10852 # Loop through the user's path and test for each of PROGNAME-LIST
10853 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10854 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
10856 IFS=$as_save_IFS
10857 test -z "$as_dir" && as_dir=.
10858 for ac_prog in egrep; do
10859 for ac_exec_ext in '' $ac_executable_extensions; do
10860 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
10861 as_fn_executable_p "$ac_path_EGREP" || continue
10862 # Check for GNU ac_path_EGREP and select it if it is found.
10863 # Check for GNU $ac_path_EGREP
10864 case `"$ac_path_EGREP" --version 2>&1` in
10865 *GNU*)
10866 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
10868 ac_count=0
10869 $as_echo_n 0123456789 >"conftest.in"
10870 while :
10872 cat "conftest.in" "conftest.in" >"conftest.tmp"
10873 mv "conftest.tmp" "conftest.in"
10874 cp "conftest.in" "conftest.nl"
10875 $as_echo 'EGREP' >> "conftest.nl"
10876 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
10877 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
10878 as_fn_arith $ac_count + 1 && ac_count=$as_val
10879 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
10880 # Best one so far, save it but keep looking for a better one
10881 ac_cv_path_EGREP="$ac_path_EGREP"
10882 ac_path_EGREP_max=$ac_count
10884 # 10*(2^10) chars as input seems more than enough
10885 test $ac_count -gt 10 && break
10886 done
10887 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
10888 esac
10890 $ac_path_EGREP_found && break 3
10891 done
10892 done
10893 done
10894 IFS=$as_save_IFS
10895 if test -z "$ac_cv_path_EGREP"; then
10896 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
10898 else
10899 ac_cv_path_EGREP=$EGREP
10904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
10905 $as_echo "$ac_cv_path_EGREP" >&6; }
10906 EGREP="$ac_cv_path_EGREP"
10909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
10910 $as_echo_n "checking for ANSI C header files... " >&6; }
10911 if ${ac_cv_header_stdc+:} false; then :
10912 $as_echo_n "(cached) " >&6
10913 else
10914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10915 /* end confdefs.h. */
10916 #include <stdlib.h>
10917 #include <stdarg.h>
10918 #include <string.h>
10919 #include <float.h>
10922 main ()
10926 return 0;
10928 _ACEOF
10929 if ac_fn_c_try_compile "$LINENO"; then :
10930 ac_cv_header_stdc=yes
10931 else
10932 ac_cv_header_stdc=no
10934 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10936 if test $ac_cv_header_stdc = yes; then
10937 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10939 /* end confdefs.h. */
10940 #include <string.h>
10942 _ACEOF
10943 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10944 $EGREP "memchr" >/dev/null 2>&1; then :
10946 else
10947 ac_cv_header_stdc=no
10949 rm -f conftest*
10953 if test $ac_cv_header_stdc = yes; then
10954 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10956 /* end confdefs.h. */
10957 #include <stdlib.h>
10959 _ACEOF
10960 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10961 $EGREP "free" >/dev/null 2>&1; then :
10963 else
10964 ac_cv_header_stdc=no
10966 rm -f conftest*
10970 if test $ac_cv_header_stdc = yes; then
10971 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10972 if test "$cross_compiling" = yes; then :
10974 else
10975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10976 /* end confdefs.h. */
10977 #include <ctype.h>
10978 #include <stdlib.h>
10979 #if ((' ' & 0x0FF) == 0x020)
10980 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10981 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10982 #else
10983 # define ISLOWER(c) \
10984 (('a' <= (c) && (c) <= 'i') \
10985 || ('j' <= (c) && (c) <= 'r') \
10986 || ('s' <= (c) && (c) <= 'z'))
10987 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10988 #endif
10990 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10992 main ()
10994 int i;
10995 for (i = 0; i < 256; i++)
10996 if (XOR (islower (i), ISLOWER (i))
10997 || toupper (i) != TOUPPER (i))
10998 return 2;
10999 return 0;
11001 _ACEOF
11002 if ac_fn_c_try_run "$LINENO"; then :
11004 else
11005 ac_cv_header_stdc=no
11007 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11008 conftest.$ac_objext conftest.beam conftest.$ac_ext
11013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11014 $as_echo "$ac_cv_header_stdc" >&6; }
11015 if test $ac_cv_header_stdc = yes; then
11017 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
11021 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11022 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11023 inttypes.h stdint.h unistd.h
11024 do :
11025 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11026 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
11028 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11029 cat >>confdefs.h <<_ACEOF
11030 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11031 _ACEOF
11035 done
11038 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then :
11039 # then
11044 ac_ext=c
11045 ac_cpp='$CPP $CPPFLAGS'
11046 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11047 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11048 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11050 ax_pthread_ok=no
11052 # We used to check for pthread.h first, but this fails if pthread.h
11053 # requires special compiler flags (e.g. on Tru64 or Sequent).
11054 # It gets checked for in the link test anyway.
11056 # First of all, check if the user has set any of the PTHREAD_LIBS,
11057 # etcetera environment variables, and if threads linking works using
11058 # them:
11059 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
11060 ax_pthread_save_CC="$CC"
11061 ax_pthread_save_CFLAGS="$CFLAGS"
11062 ax_pthread_save_LIBS="$LIBS"
11063 if test "x$PTHREAD_CC" != "x"; then :
11064 CC="$PTHREAD_CC"
11066 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11067 LIBS="$PTHREAD_LIBS $LIBS"
11068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
11069 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
11070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11071 /* end confdefs.h. */
11073 /* Override any GCC internal prototype to avoid an error.
11074 Use char because int might match the return type of a GCC
11075 builtin and then its argument prototype would still apply. */
11076 #ifdef __cplusplus
11077 extern "C"
11078 #endif
11079 char pthread_join ();
11081 main ()
11083 return pthread_join ();
11085 return 0;
11087 _ACEOF
11088 if ac_fn_c_try_link "$LINENO"; then :
11089 ax_pthread_ok=yes
11091 rm -f core conftest.err conftest.$ac_objext \
11092 conftest$ac_exeext conftest.$ac_ext
11093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11094 $as_echo "$ax_pthread_ok" >&6; }
11095 if test "x$ax_pthread_ok" = "xno"; then
11096 PTHREAD_LIBS=""
11097 PTHREAD_CFLAGS=""
11099 CC="$ax_pthread_save_CC"
11100 CFLAGS="$ax_pthread_save_CFLAGS"
11101 LIBS="$ax_pthread_save_LIBS"
11104 # We must check for the threads library under a number of different
11105 # names; the ordering is very important because some systems
11106 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
11107 # libraries is broken (non-POSIX).
11109 # Create a list of thread flags to try. Items starting with a "-" are
11110 # C compiler flags, and other items are library names, except for "none"
11111 # which indicates that we try without any flags at all, and "pthread-config"
11112 # which is a program returning the flags for the Pth emulation library.
11114 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
11116 # The ordering *is* (sometimes) important. Some notes on the
11117 # individual items follow:
11119 # pthreads: AIX (must check this before -lpthread)
11120 # none: in case threads are in libc; should be tried before -Kthread and
11121 # other compiler flags to prevent continual compiler warnings
11122 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
11123 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
11124 # (Note: HP C rejects this with "bad form for `-t' option")
11125 # -pthreads: Solaris/gcc (Note: HP C also rejects)
11126 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
11127 # doesn't hurt to check since this sometimes defines pthreads and
11128 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
11129 # is present but should not be used directly; and before -mthreads,
11130 # because the compiler interprets this as "-mt" + "-hreads")
11131 # -mthreads: Mingw32/gcc, Lynx/gcc
11132 # pthread: Linux, etcetera
11133 # --thread-safe: KAI C++
11134 # pthread-config: use pthread-config program (for GNU Pth library)
11136 case $host_os in
11138 freebsd*)
11140 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
11141 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
11143 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
11146 hpux*)
11148 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
11149 # multi-threading and also sets -lpthread."
11151 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
11154 openedition*)
11156 # IBM z/OS requires a feature-test macro to be defined in order to
11157 # enable POSIX threads at all, so give the user a hint if this is
11158 # not set. (We don't define these ourselves, as they can affect
11159 # other portions of the system API in unpredictable ways.)
11161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11162 /* end confdefs.h. */
11164 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
11165 AX_PTHREAD_ZOS_MISSING
11166 # endif
11168 _ACEOF
11169 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11170 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
11171 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
11172 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
11174 rm -f conftest*
11178 solaris*)
11180 # On Solaris (at least, for some versions), libc contains stubbed
11181 # (non-functional) versions of the pthreads routines, so link-based
11182 # tests will erroneously succeed. (N.B.: The stubs are missing
11183 # pthread_cleanup_push, or rather a function called by this macro,
11184 # so we could check for that, but who knows whether they'll stub
11185 # that too in a future libc.) So we'll check first for the
11186 # standard Solaris way of linking pthreads (-mt -lpthread).
11188 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
11190 esac
11192 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
11194 if test "x$GCC" = "xyes"; then :
11195 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
11198 # The presence of a feature test macro requesting re-entrant function
11199 # definitions is, on some systems, a strong hint that pthreads support is
11200 # correctly enabled
11202 case $host_os in
11203 darwin* | hpux* | linux* | osf* | solaris*)
11204 ax_pthread_check_macro="_REENTRANT"
11207 aix*)
11208 ax_pthread_check_macro="_THREAD_SAFE"
11212 ax_pthread_check_macro="--"
11214 esac
11215 if test "x$ax_pthread_check_macro" = "x--"; then :
11216 ax_pthread_check_cond=0
11217 else
11218 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
11221 # Are we compiling with Clang?
11223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
11224 $as_echo_n "checking whether $CC is Clang... " >&6; }
11225 if ${ax_cv_PTHREAD_CLANG+:} false; then :
11226 $as_echo_n "(cached) " >&6
11227 else
11228 ax_cv_PTHREAD_CLANG=no
11229 # Note that Autoconf sets GCC=yes for Clang as well as GCC
11230 if test "x$GCC" = "xyes"; then
11231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11232 /* end confdefs.h. */
11233 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
11234 # if defined(__clang__) && defined(__llvm__)
11235 AX_PTHREAD_CC_IS_CLANG
11236 # endif
11238 _ACEOF
11239 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11240 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
11241 ax_cv_PTHREAD_CLANG=yes
11243 rm -f conftest*
11248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
11249 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
11250 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
11252 ax_pthread_clang_warning=no
11254 # Clang needs special handling, because older versions handle the -pthread
11255 # option in a rather... idiosyncratic way
11257 if test "x$ax_pthread_clang" = "xyes"; then
11259 # Clang takes -pthread; it has never supported any other flag
11261 # (Note 1: This will need to be revisited if a system that Clang
11262 # supports has POSIX threads in a separate library. This tends not
11263 # to be the way of modern systems, but it's conceivable.)
11265 # (Note 2: On some systems, notably Darwin, -pthread is not needed
11266 # to get POSIX threads support; the API is always present and
11267 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
11268 # -pthread does define _REENTRANT, and while the Darwin headers
11269 # ignore this macro, third-party headers might not.)
11271 PTHREAD_CFLAGS="-pthread"
11272 PTHREAD_LIBS=
11274 ax_pthread_ok=yes
11276 # However, older versions of Clang make a point of warning the user
11277 # that, in an invocation where only linking and no compilation is
11278 # taking place, the -pthread option has no effect ("argument unused
11279 # during compilation"). They expect -pthread to be passed in only
11280 # when source code is being compiled.
11282 # Problem is, this is at odds with the way Automake and most other
11283 # C build frameworks function, which is that the same flags used in
11284 # compilation (CFLAGS) are also used in linking. Many systems
11285 # supported by AX_PTHREAD require exactly this for POSIX threads
11286 # support, and in fact it is often not straightforward to specify a
11287 # flag that is used only in the compilation phase and not in
11288 # linking. Such a scenario is extremely rare in practice.
11290 # Even though use of the -pthread flag in linking would only print
11291 # a warning, this can be a nuisance for well-run software projects
11292 # that build with -Werror. So if the active version of Clang has
11293 # this misfeature, we search for an option to squash it.
11295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
11296 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
11297 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
11298 $as_echo_n "(cached) " >&6
11299 else
11300 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
11301 # Create an alternate version of $ac_link that compiles and
11302 # links in two steps (.c -> .o, .o -> exe) instead of one
11303 # (.c -> exe), because the warning occurs only in the second
11304 # step
11305 ax_pthread_save_ac_link="$ac_link"
11306 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
11307 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
11308 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
11309 ax_pthread_save_CFLAGS="$CFLAGS"
11310 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
11311 if test "x$ax_pthread_try" = "xunknown"; then :
11312 break
11314 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
11315 ac_link="$ax_pthread_save_ac_link"
11316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11317 /* end confdefs.h. */
11318 int main(void){return 0;}
11319 _ACEOF
11320 if ac_fn_c_try_link "$LINENO"; then :
11321 ac_link="$ax_pthread_2step_ac_link"
11322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11323 /* end confdefs.h. */
11324 int main(void){return 0;}
11325 _ACEOF
11326 if ac_fn_c_try_link "$LINENO"; then :
11327 break
11329 rm -f core conftest.err conftest.$ac_objext \
11330 conftest$ac_exeext conftest.$ac_ext
11333 rm -f core conftest.err conftest.$ac_objext \
11334 conftest$ac_exeext conftest.$ac_ext
11335 done
11336 ac_link="$ax_pthread_save_ac_link"
11337 CFLAGS="$ax_pthread_save_CFLAGS"
11338 if test "x$ax_pthread_try" = "x"; then :
11339 ax_pthread_try=no
11341 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
11344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
11345 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
11347 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
11348 no | unknown) ;;
11349 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
11350 esac
11352 fi # $ax_pthread_clang = yes
11354 if test "x$ax_pthread_ok" = "xno"; then
11355 for ax_pthread_try_flag in $ax_pthread_flags; do
11357 case $ax_pthread_try_flag in
11358 none)
11359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
11360 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
11363 -mt,pthread)
11364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
11365 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
11366 PTHREAD_CFLAGS="-mt"
11367 PTHREAD_LIBS="-lpthread"
11371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
11372 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
11373 PTHREAD_CFLAGS="$ax_pthread_try_flag"
11376 pthread-config)
11377 # Extract the first word of "pthread-config", so it can be a program name with args.
11378 set dummy pthread-config; ac_word=$2
11379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11380 $as_echo_n "checking for $ac_word... " >&6; }
11381 if ${ac_cv_prog_ax_pthread_config+:} false; then :
11382 $as_echo_n "(cached) " >&6
11383 else
11384 if test -n "$ax_pthread_config"; then
11385 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
11386 else
11387 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11388 for as_dir in $PATH
11390 IFS=$as_save_IFS
11391 test -z "$as_dir" && as_dir=.
11392 for ac_exec_ext in '' $ac_executable_extensions; do
11393 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11394 ac_cv_prog_ax_pthread_config="yes"
11395 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11396 break 2
11398 done
11399 done
11400 IFS=$as_save_IFS
11402 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
11405 ax_pthread_config=$ac_cv_prog_ax_pthread_config
11406 if test -n "$ax_pthread_config"; then
11407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
11408 $as_echo "$ax_pthread_config" >&6; }
11409 else
11410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11411 $as_echo "no" >&6; }
11415 if test "x$ax_pthread_config" = "xno"; then :
11416 continue
11418 PTHREAD_CFLAGS="`pthread-config --cflags`"
11419 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
11423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
11424 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
11425 PTHREAD_LIBS="-l$ax_pthread_try_flag"
11427 esac
11429 ax_pthread_save_CFLAGS="$CFLAGS"
11430 ax_pthread_save_LIBS="$LIBS"
11431 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11432 LIBS="$PTHREAD_LIBS $LIBS"
11434 # Check for various functions. We must include pthread.h,
11435 # since some functions may be macros. (On the Sequent, we
11436 # need a special flag -Kthread to make this header compile.)
11437 # We check for pthread_join because it is in -lpthread on IRIX
11438 # while pthread_create is in libc. We check for pthread_attr_init
11439 # due to DEC craziness with -lpthreads. We check for
11440 # pthread_cleanup_push because it is one of the few pthread
11441 # functions on Solaris that doesn't have a non-functional libc stub.
11442 # We try pthread_create on general principles.
11444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11445 /* end confdefs.h. */
11446 #include <pthread.h>
11447 # if $ax_pthread_check_cond
11448 # error "$ax_pthread_check_macro must be defined"
11449 # endif
11450 static void routine(void *a) { a = 0; }
11451 static void *start_routine(void *a) { return a; }
11453 main ()
11455 pthread_t th; pthread_attr_t attr;
11456 pthread_create(&th, 0, start_routine, 0);
11457 pthread_join(th, 0);
11458 pthread_attr_init(&attr);
11459 pthread_cleanup_push(routine, 0);
11460 pthread_cleanup_pop(0) /* ; */
11462 return 0;
11464 _ACEOF
11465 if ac_fn_c_try_link "$LINENO"; then :
11466 ax_pthread_ok=yes
11468 rm -f core conftest.err conftest.$ac_objext \
11469 conftest$ac_exeext conftest.$ac_ext
11471 CFLAGS="$ax_pthread_save_CFLAGS"
11472 LIBS="$ax_pthread_save_LIBS"
11474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
11475 $as_echo "$ax_pthread_ok" >&6; }
11476 if test "x$ax_pthread_ok" = "xyes"; then :
11477 break
11480 PTHREAD_LIBS=""
11481 PTHREAD_CFLAGS=""
11482 done
11485 # Various other checks:
11486 if test "x$ax_pthread_ok" = "xyes"; then
11487 ax_pthread_save_CFLAGS="$CFLAGS"
11488 ax_pthread_save_LIBS="$LIBS"
11489 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11490 LIBS="$PTHREAD_LIBS $LIBS"
11492 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
11493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
11494 $as_echo_n "checking for joinable pthread attribute... " >&6; }
11495 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
11496 $as_echo_n "(cached) " >&6
11497 else
11498 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
11499 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
11500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11501 /* end confdefs.h. */
11502 #include <pthread.h>
11504 main ()
11506 int attr = $ax_pthread_attr; return attr /* ; */
11508 return 0;
11510 _ACEOF
11511 if ac_fn_c_try_link "$LINENO"; then :
11512 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
11514 rm -f core conftest.err conftest.$ac_objext \
11515 conftest$ac_exeext conftest.$ac_ext
11516 done
11519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
11520 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
11521 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
11522 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
11523 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
11525 cat >>confdefs.h <<_ACEOF
11526 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
11527 _ACEOF
11529 ax_pthread_joinable_attr_defined=yes
11533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
11534 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
11535 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
11536 $as_echo_n "(cached) " >&6
11537 else
11538 ax_cv_PTHREAD_SPECIAL_FLAGS=no
11539 case $host_os in
11540 solaris*)
11541 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
11543 esac
11546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
11547 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
11548 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
11549 test "x$ax_pthread_special_flags_added" != "xyes"; then :
11550 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
11551 ax_pthread_special_flags_added=yes
11554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
11555 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
11556 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
11557 $as_echo_n "(cached) " >&6
11558 else
11559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11560 /* end confdefs.h. */
11561 #include <pthread.h>
11563 main ()
11565 int i = PTHREAD_PRIO_INHERIT;
11567 return 0;
11569 _ACEOF
11570 if ac_fn_c_try_link "$LINENO"; then :
11571 ax_cv_PTHREAD_PRIO_INHERIT=yes
11572 else
11573 ax_cv_PTHREAD_PRIO_INHERIT=no
11575 rm -f core conftest.err conftest.$ac_objext \
11576 conftest$ac_exeext conftest.$ac_ext
11579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
11580 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
11581 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
11582 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
11584 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
11586 ax_pthread_prio_inherit_defined=yes
11590 CFLAGS="$ax_pthread_save_CFLAGS"
11591 LIBS="$ax_pthread_save_LIBS"
11593 # More AIX lossage: compile with *_r variant
11594 if test "x$GCC" != "xyes"; then
11595 case $host_os in
11596 aix*)
11597 case "x/$CC" in #(
11598 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
11599 #handle absolute path differently from PATH based program lookup
11600 case "x$CC" in #(
11601 x/*) :
11602 if as_fn_executable_p ${CC}_r; then :
11603 PTHREAD_CC="${CC}_r"
11604 fi ;; #(
11605 *) :
11606 for ac_prog in ${CC}_r
11608 # Extract the first word of "$ac_prog", so it can be a program name with args.
11609 set dummy $ac_prog; ac_word=$2
11610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11611 $as_echo_n "checking for $ac_word... " >&6; }
11612 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
11613 $as_echo_n "(cached) " >&6
11614 else
11615 if test -n "$PTHREAD_CC"; then
11616 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
11617 else
11618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11619 for as_dir in $PATH
11621 IFS=$as_save_IFS
11622 test -z "$as_dir" && as_dir=.
11623 for ac_exec_ext in '' $ac_executable_extensions; do
11624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11625 ac_cv_prog_PTHREAD_CC="$ac_prog"
11626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11627 break 2
11629 done
11630 done
11631 IFS=$as_save_IFS
11635 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
11636 if test -n "$PTHREAD_CC"; then
11637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
11638 $as_echo "$PTHREAD_CC" >&6; }
11639 else
11640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11641 $as_echo "no" >&6; }
11645 test -n "$PTHREAD_CC" && break
11646 done
11647 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11649 esac ;; #(
11650 *) :
11652 esac
11654 esac
11658 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
11664 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
11665 if test "x$ax_pthread_ok" = "xyes"; then
11667 $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h
11670 else
11671 ax_pthread_ok=no
11674 ac_ext=c
11675 ac_cpp='$CPP $CPPFLAGS'
11676 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11677 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11678 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11680 # set thread flags
11682 # Some platforms use these, so just define them. They can't hurt if they
11683 # are not supported.
11684 PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE"
11686 # Check for *_r functions
11687 _CFLAGS="$CFLAGS"
11688 _LIBS="$LIBS"
11689 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
11690 LIBS="$LIBS $PTHREAD_LIBS"
11692 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11693 if test "x$ac_cv_header_pthread_h" = xyes; then :
11695 else
11696 as_fn_error $? "
11697 pthread.h not found; use --disable-thread-safety to disable thread safety" "$LINENO" 5
11702 for ac_func in strerror_r getpwuid_r gethostbyname_r
11703 do :
11704 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11705 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11706 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11707 cat >>confdefs.h <<_ACEOF
11708 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11709 _ACEOF
11712 done
11715 # Do test here with the proper thread flags
11716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns int" >&5
11717 $as_echo_n "checking whether strerror_r returns int... " >&6; }
11718 if ${pgac_cv_func_strerror_r_int+:} false; then :
11719 $as_echo_n "(cached) " >&6
11720 else
11721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11722 /* end confdefs.h. */
11723 #include <string.h>
11725 main ()
11727 char buf[100];
11728 switch (strerror_r(1, buf, sizeof(buf)))
11729 { case 0: break; default: break; }
11732 return 0;
11734 _ACEOF
11735 if ac_fn_c_try_compile "$LINENO"; then :
11736 pgac_cv_func_strerror_r_int=yes
11737 else
11738 pgac_cv_func_strerror_r_int=no
11740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_strerror_r_int" >&5
11743 $as_echo "$pgac_cv_func_strerror_r_int" >&6; }
11744 if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
11746 $as_echo "#define STRERROR_R_INT 1" >>confdefs.h
11751 CFLAGS="$_CFLAGS"
11752 LIBS="$_LIBS"
11755 else
11756 # else
11757 # do not use values from template file
11758 PTHREAD_CFLAGS=
11759 PTHREAD_LIBS=
11761 fi # fi
11768 ## Libraries
11770 ## Most libraries are included only if they demonstrably provide a function
11771 ## we need, but libm is an exception: always include it, because there are
11772 ## too many compilers that play cute optimization games that will break
11773 ## probes for standard functions such as pow().
11776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
11777 $as_echo_n "checking for main in -lm... " >&6; }
11778 if ${ac_cv_lib_m_main+:} false; then :
11779 $as_echo_n "(cached) " >&6
11780 else
11781 ac_check_lib_save_LIBS=$LIBS
11782 LIBS="-lm $LIBS"
11783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11784 /* end confdefs.h. */
11788 main ()
11790 return main ();
11792 return 0;
11794 _ACEOF
11795 if ac_fn_c_try_link "$LINENO"; then :
11796 ac_cv_lib_m_main=yes
11797 else
11798 ac_cv_lib_m_main=no
11800 rm -f core conftest.err conftest.$ac_objext \
11801 conftest$ac_exeext conftest.$ac_ext
11802 LIBS=$ac_check_lib_save_LIBS
11804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
11805 $as_echo "$ac_cv_lib_m_main" >&6; }
11806 if test "x$ac_cv_lib_m_main" = xyes; then :
11807 cat >>confdefs.h <<_ACEOF
11808 #define HAVE_LIBM 1
11809 _ACEOF
11811 LIBS="-lm $LIBS"
11815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setproctitle" >&5
11816 $as_echo_n "checking for library containing setproctitle... " >&6; }
11817 if ${ac_cv_search_setproctitle+:} false; then :
11818 $as_echo_n "(cached) " >&6
11819 else
11820 ac_func_search_save_LIBS=$LIBS
11821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11822 /* end confdefs.h. */
11824 /* Override any GCC internal prototype to avoid an error.
11825 Use char because int might match the return type of a GCC
11826 builtin and then its argument prototype would still apply. */
11827 #ifdef __cplusplus
11828 extern "C"
11829 #endif
11830 char setproctitle ();
11832 main ()
11834 return setproctitle ();
11836 return 0;
11838 _ACEOF
11839 for ac_lib in '' util; do
11840 if test -z "$ac_lib"; then
11841 ac_res="none required"
11842 else
11843 ac_res=-l$ac_lib
11844 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11846 if ac_fn_c_try_link "$LINENO"; then :
11847 ac_cv_search_setproctitle=$ac_res
11849 rm -f core conftest.err conftest.$ac_objext \
11850 conftest$ac_exeext
11851 if ${ac_cv_search_setproctitle+:} false; then :
11852 break
11854 done
11855 if ${ac_cv_search_setproctitle+:} false; then :
11857 else
11858 ac_cv_search_setproctitle=no
11860 rm conftest.$ac_ext
11861 LIBS=$ac_func_search_save_LIBS
11863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setproctitle" >&5
11864 $as_echo "$ac_cv_search_setproctitle" >&6; }
11865 ac_res=$ac_cv_search_setproctitle
11866 if test "$ac_res" != no; then :
11867 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11871 # gcc/clang's sanitizer helper library provides dlopen but not dlsym, thus
11872 # when enabling asan the dlopen check doesn't notice that -ldl is actually
11873 # required. Just checking for dlsym() ought to suffice.
11874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
11875 $as_echo_n "checking for library containing dlsym... " >&6; }
11876 if ${ac_cv_search_dlsym+:} false; then :
11877 $as_echo_n "(cached) " >&6
11878 else
11879 ac_func_search_save_LIBS=$LIBS
11880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11881 /* end confdefs.h. */
11883 /* Override any GCC internal prototype to avoid an error.
11884 Use char because int might match the return type of a GCC
11885 builtin and then its argument prototype would still apply. */
11886 #ifdef __cplusplus
11887 extern "C"
11888 #endif
11889 char dlsym ();
11891 main ()
11893 return dlsym ();
11895 return 0;
11897 _ACEOF
11898 for ac_lib in '' dl; do
11899 if test -z "$ac_lib"; then
11900 ac_res="none required"
11901 else
11902 ac_res=-l$ac_lib
11903 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11905 if ac_fn_c_try_link "$LINENO"; then :
11906 ac_cv_search_dlsym=$ac_res
11908 rm -f core conftest.err conftest.$ac_objext \
11909 conftest$ac_exeext
11910 if ${ac_cv_search_dlsym+:} false; then :
11911 break
11913 done
11914 if ${ac_cv_search_dlsym+:} false; then :
11916 else
11917 ac_cv_search_dlsym=no
11919 rm conftest.$ac_ext
11920 LIBS=$ac_func_search_save_LIBS
11922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
11923 $as_echo "$ac_cv_search_dlsym" >&6; }
11924 ac_res=$ac_cv_search_dlsym
11925 if test "$ac_res" != no; then :
11926 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
11931 $as_echo_n "checking for library containing socket... " >&6; }
11932 if ${ac_cv_search_socket+:} false; then :
11933 $as_echo_n "(cached) " >&6
11934 else
11935 ac_func_search_save_LIBS=$LIBS
11936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11937 /* end confdefs.h. */
11939 /* Override any GCC internal prototype to avoid an error.
11940 Use char because int might match the return type of a GCC
11941 builtin and then its argument prototype would still apply. */
11942 #ifdef __cplusplus
11943 extern "C"
11944 #endif
11945 char socket ();
11947 main ()
11949 return socket ();
11951 return 0;
11953 _ACEOF
11954 for ac_lib in '' socket ws2_32; do
11955 if test -z "$ac_lib"; then
11956 ac_res="none required"
11957 else
11958 ac_res=-l$ac_lib
11959 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11961 if ac_fn_c_try_link "$LINENO"; then :
11962 ac_cv_search_socket=$ac_res
11964 rm -f core conftest.err conftest.$ac_objext \
11965 conftest$ac_exeext
11966 if ${ac_cv_search_socket+:} false; then :
11967 break
11969 done
11970 if ${ac_cv_search_socket+:} false; then :
11972 else
11973 ac_cv_search_socket=no
11975 rm conftest.$ac_ext
11976 LIBS=$ac_func_search_save_LIBS
11978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
11979 $as_echo "$ac_cv_search_socket" >&6; }
11980 ac_res=$ac_cv_search_socket
11981 if test "$ac_res" != no; then :
11982 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shl_load" >&5
11987 $as_echo_n "checking for library containing shl_load... " >&6; }
11988 if ${ac_cv_search_shl_load+:} false; then :
11989 $as_echo_n "(cached) " >&6
11990 else
11991 ac_func_search_save_LIBS=$LIBS
11992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11993 /* end confdefs.h. */
11995 /* Override any GCC internal prototype to avoid an error.
11996 Use char because int might match the return type of a GCC
11997 builtin and then its argument prototype would still apply. */
11998 #ifdef __cplusplus
11999 extern "C"
12000 #endif
12001 char shl_load ();
12003 main ()
12005 return shl_load ();
12007 return 0;
12009 _ACEOF
12010 for ac_lib in '' dld; do
12011 if test -z "$ac_lib"; then
12012 ac_res="none required"
12013 else
12014 ac_res=-l$ac_lib
12015 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12017 if ac_fn_c_try_link "$LINENO"; then :
12018 ac_cv_search_shl_load=$ac_res
12020 rm -f core conftest.err conftest.$ac_objext \
12021 conftest$ac_exeext
12022 if ${ac_cv_search_shl_load+:} false; then :
12023 break
12025 done
12026 if ${ac_cv_search_shl_load+:} false; then :
12028 else
12029 ac_cv_search_shl_load=no
12031 rm conftest.$ac_ext
12032 LIBS=$ac_func_search_save_LIBS
12034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shl_load" >&5
12035 $as_echo "$ac_cv_search_shl_load" >&6; }
12036 ac_res=$ac_cv_search_shl_load
12037 if test "$ac_res" != no; then :
12038 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getopt_long" >&5
12043 $as_echo_n "checking for library containing getopt_long... " >&6; }
12044 if ${ac_cv_search_getopt_long+:} false; then :
12045 $as_echo_n "(cached) " >&6
12046 else
12047 ac_func_search_save_LIBS=$LIBS
12048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12049 /* end confdefs.h. */
12051 /* Override any GCC internal prototype to avoid an error.
12052 Use char because int might match the return type of a GCC
12053 builtin and then its argument prototype would still apply. */
12054 #ifdef __cplusplus
12055 extern "C"
12056 #endif
12057 char getopt_long ();
12059 main ()
12061 return getopt_long ();
12063 return 0;
12065 _ACEOF
12066 for ac_lib in '' getopt gnugetopt; do
12067 if test -z "$ac_lib"; then
12068 ac_res="none required"
12069 else
12070 ac_res=-l$ac_lib
12071 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12073 if ac_fn_c_try_link "$LINENO"; then :
12074 ac_cv_search_getopt_long=$ac_res
12076 rm -f core conftest.err conftest.$ac_objext \
12077 conftest$ac_exeext
12078 if ${ac_cv_search_getopt_long+:} false; then :
12079 break
12081 done
12082 if ${ac_cv_search_getopt_long+:} false; then :
12084 else
12085 ac_cv_search_getopt_long=no
12087 rm conftest.$ac_ext
12088 LIBS=$ac_func_search_save_LIBS
12090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getopt_long" >&5
12091 $as_echo "$ac_cv_search_getopt_long" >&6; }
12092 ac_res=$ac_cv_search_getopt_long
12093 if test "$ac_res" != no; then :
12094 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_open" >&5
12099 $as_echo_n "checking for library containing shm_open... " >&6; }
12100 if ${ac_cv_search_shm_open+:} false; then :
12101 $as_echo_n "(cached) " >&6
12102 else
12103 ac_func_search_save_LIBS=$LIBS
12104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12105 /* end confdefs.h. */
12107 /* Override any GCC internal prototype to avoid an error.
12108 Use char because int might match the return type of a GCC
12109 builtin and then its argument prototype would still apply. */
12110 #ifdef __cplusplus
12111 extern "C"
12112 #endif
12113 char shm_open ();
12115 main ()
12117 return shm_open ();
12119 return 0;
12121 _ACEOF
12122 for ac_lib in '' rt; do
12123 if test -z "$ac_lib"; then
12124 ac_res="none required"
12125 else
12126 ac_res=-l$ac_lib
12127 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12129 if ac_fn_c_try_link "$LINENO"; then :
12130 ac_cv_search_shm_open=$ac_res
12132 rm -f core conftest.err conftest.$ac_objext \
12133 conftest$ac_exeext
12134 if ${ac_cv_search_shm_open+:} false; then :
12135 break
12137 done
12138 if ${ac_cv_search_shm_open+:} false; then :
12140 else
12141 ac_cv_search_shm_open=no
12143 rm conftest.$ac_ext
12144 LIBS=$ac_func_search_save_LIBS
12146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5
12147 $as_echo "$ac_cv_search_shm_open" >&6; }
12148 ac_res=$ac_cv_search_shm_open
12149 if test "$ac_res" != no; then :
12150 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shm_unlink" >&5
12155 $as_echo_n "checking for library containing shm_unlink... " >&6; }
12156 if ${ac_cv_search_shm_unlink+:} false; then :
12157 $as_echo_n "(cached) " >&6
12158 else
12159 ac_func_search_save_LIBS=$LIBS
12160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12161 /* end confdefs.h. */
12163 /* Override any GCC internal prototype to avoid an error.
12164 Use char because int might match the return type of a GCC
12165 builtin and then its argument prototype would still apply. */
12166 #ifdef __cplusplus
12167 extern "C"
12168 #endif
12169 char shm_unlink ();
12171 main ()
12173 return shm_unlink ();
12175 return 0;
12177 _ACEOF
12178 for ac_lib in '' rt; do
12179 if test -z "$ac_lib"; then
12180 ac_res="none required"
12181 else
12182 ac_res=-l$ac_lib
12183 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12185 if ac_fn_c_try_link "$LINENO"; then :
12186 ac_cv_search_shm_unlink=$ac_res
12188 rm -f core conftest.err conftest.$ac_objext \
12189 conftest$ac_exeext
12190 if ${ac_cv_search_shm_unlink+:} false; then :
12191 break
12193 done
12194 if ${ac_cv_search_shm_unlink+:} false; then :
12196 else
12197 ac_cv_search_shm_unlink=no
12199 rm conftest.$ac_ext
12200 LIBS=$ac_func_search_save_LIBS
12202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_unlink" >&5
12203 $as_echo "$ac_cv_search_shm_unlink" >&6; }
12204 ac_res=$ac_cv_search_shm_unlink
12205 if test "$ac_res" != no; then :
12206 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
12211 $as_echo_n "checking for library containing clock_gettime... " >&6; }
12212 if ${ac_cv_search_clock_gettime+:} false; then :
12213 $as_echo_n "(cached) " >&6
12214 else
12215 ac_func_search_save_LIBS=$LIBS
12216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12217 /* end confdefs.h. */
12219 /* Override any GCC internal prototype to avoid an error.
12220 Use char because int might match the return type of a GCC
12221 builtin and then its argument prototype would still apply. */
12222 #ifdef __cplusplus
12223 extern "C"
12224 #endif
12225 char clock_gettime ();
12227 main ()
12229 return clock_gettime ();
12231 return 0;
12233 _ACEOF
12234 for ac_lib in '' rt posix4; do
12235 if test -z "$ac_lib"; then
12236 ac_res="none required"
12237 else
12238 ac_res=-l$ac_lib
12239 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12241 if ac_fn_c_try_link "$LINENO"; then :
12242 ac_cv_search_clock_gettime=$ac_res
12244 rm -f core conftest.err conftest.$ac_objext \
12245 conftest$ac_exeext
12246 if ${ac_cv_search_clock_gettime+:} false; then :
12247 break
12249 done
12250 if ${ac_cv_search_clock_gettime+:} false; then :
12252 else
12253 ac_cv_search_clock_gettime=no
12255 rm conftest.$ac_ext
12256 LIBS=$ac_func_search_save_LIBS
12258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
12259 $as_echo "$ac_cv_search_clock_gettime" >&6; }
12260 ac_res=$ac_cv_search_clock_gettime
12261 if test "$ac_res" != no; then :
12262 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12266 # Solaris:
12267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5
12268 $as_echo_n "checking for library containing fdatasync... " >&6; }
12269 if ${ac_cv_search_fdatasync+:} false; then :
12270 $as_echo_n "(cached) " >&6
12271 else
12272 ac_func_search_save_LIBS=$LIBS
12273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12274 /* end confdefs.h. */
12276 /* Override any GCC internal prototype to avoid an error.
12277 Use char because int might match the return type of a GCC
12278 builtin and then its argument prototype would still apply. */
12279 #ifdef __cplusplus
12280 extern "C"
12281 #endif
12282 char fdatasync ();
12284 main ()
12286 return fdatasync ();
12288 return 0;
12290 _ACEOF
12291 for ac_lib in '' rt posix4; do
12292 if test -z "$ac_lib"; then
12293 ac_res="none required"
12294 else
12295 ac_res=-l$ac_lib
12296 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12298 if ac_fn_c_try_link "$LINENO"; then :
12299 ac_cv_search_fdatasync=$ac_res
12301 rm -f core conftest.err conftest.$ac_objext \
12302 conftest$ac_exeext
12303 if ${ac_cv_search_fdatasync+:} false; then :
12304 break
12306 done
12307 if ${ac_cv_search_fdatasync+:} false; then :
12309 else
12310 ac_cv_search_fdatasync=no
12312 rm conftest.$ac_ext
12313 LIBS=$ac_func_search_save_LIBS
12315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5
12316 $as_echo "$ac_cv_search_fdatasync" >&6; }
12317 ac_res=$ac_cv_search_fdatasync
12318 if test "$ac_res" != no; then :
12319 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12323 # Cygwin:
12324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shmget" >&5
12325 $as_echo_n "checking for library containing shmget... " >&6; }
12326 if ${ac_cv_search_shmget+:} false; then :
12327 $as_echo_n "(cached) " >&6
12328 else
12329 ac_func_search_save_LIBS=$LIBS
12330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12331 /* end confdefs.h. */
12333 /* Override any GCC internal prototype to avoid an error.
12334 Use char because int might match the return type of a GCC
12335 builtin and then its argument prototype would still apply. */
12336 #ifdef __cplusplus
12337 extern "C"
12338 #endif
12339 char shmget ();
12341 main ()
12343 return shmget ();
12345 return 0;
12347 _ACEOF
12348 for ac_lib in '' cygipc; do
12349 if test -z "$ac_lib"; then
12350 ac_res="none required"
12351 else
12352 ac_res=-l$ac_lib
12353 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12355 if ac_fn_c_try_link "$LINENO"; then :
12356 ac_cv_search_shmget=$ac_res
12358 rm -f core conftest.err conftest.$ac_objext \
12359 conftest$ac_exeext
12360 if ${ac_cv_search_shmget+:} false; then :
12361 break
12363 done
12364 if ${ac_cv_search_shmget+:} false; then :
12366 else
12367 ac_cv_search_shmget=no
12369 rm conftest.$ac_ext
12370 LIBS=$ac_func_search_save_LIBS
12372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shmget" >&5
12373 $as_echo "$ac_cv_search_shmget" >&6; }
12374 ac_res=$ac_cv_search_shmget
12375 if test "$ac_res" != no; then :
12376 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12380 # *BSD:
12381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing backtrace_symbols" >&5
12382 $as_echo_n "checking for library containing backtrace_symbols... " >&6; }
12383 if ${ac_cv_search_backtrace_symbols+:} false; then :
12384 $as_echo_n "(cached) " >&6
12385 else
12386 ac_func_search_save_LIBS=$LIBS
12387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12388 /* end confdefs.h. */
12390 /* Override any GCC internal prototype to avoid an error.
12391 Use char because int might match the return type of a GCC
12392 builtin and then its argument prototype would still apply. */
12393 #ifdef __cplusplus
12394 extern "C"
12395 #endif
12396 char backtrace_symbols ();
12398 main ()
12400 return backtrace_symbols ();
12402 return 0;
12404 _ACEOF
12405 for ac_lib in '' execinfo; do
12406 if test -z "$ac_lib"; then
12407 ac_res="none required"
12408 else
12409 ac_res=-l$ac_lib
12410 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12412 if ac_fn_c_try_link "$LINENO"; then :
12413 ac_cv_search_backtrace_symbols=$ac_res
12415 rm -f core conftest.err conftest.$ac_objext \
12416 conftest$ac_exeext
12417 if ${ac_cv_search_backtrace_symbols+:} false; then :
12418 break
12420 done
12421 if ${ac_cv_search_backtrace_symbols+:} false; then :
12423 else
12424 ac_cv_search_backtrace_symbols=no
12426 rm conftest.$ac_ext
12427 LIBS=$ac_func_search_save_LIBS
12429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_backtrace_symbols" >&5
12430 $as_echo "$ac_cv_search_backtrace_symbols" >&6; }
12431 ac_res=$ac_cv_search_backtrace_symbols
12432 if test "$ac_res" != no; then :
12433 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12438 if test "$enable_thread_safety" = yes; then
12439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname_r" >&5
12440 $as_echo_n "checking for library containing gethostbyname_r... " >&6; }
12441 if ${ac_cv_search_gethostbyname_r+:} false; then :
12442 $as_echo_n "(cached) " >&6
12443 else
12444 ac_func_search_save_LIBS=$LIBS
12445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12446 /* end confdefs.h. */
12448 /* Override any GCC internal prototype to avoid an error.
12449 Use char because int might match the return type of a GCC
12450 builtin and then its argument prototype would still apply. */
12451 #ifdef __cplusplus
12452 extern "C"
12453 #endif
12454 char gethostbyname_r ();
12456 main ()
12458 return gethostbyname_r ();
12460 return 0;
12462 _ACEOF
12463 for ac_lib in '' nsl; do
12464 if test -z "$ac_lib"; then
12465 ac_res="none required"
12466 else
12467 ac_res=-l$ac_lib
12468 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12470 if ac_fn_c_try_link "$LINENO"; then :
12471 ac_cv_search_gethostbyname_r=$ac_res
12473 rm -f core conftest.err conftest.$ac_objext \
12474 conftest$ac_exeext
12475 if ${ac_cv_search_gethostbyname_r+:} false; then :
12476 break
12478 done
12479 if ${ac_cv_search_gethostbyname_r+:} false; then :
12481 else
12482 ac_cv_search_gethostbyname_r=no
12484 rm conftest.$ac_ext
12485 LIBS=$ac_func_search_save_LIBS
12487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname_r" >&5
12488 $as_echo "$ac_cv_search_gethostbyname_r" >&6; }
12489 ac_res=$ac_cv_search_gethostbyname_r
12490 if test "$ac_res" != no; then :
12491 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_barrier_wait" >&5
12496 $as_echo_n "checking for library containing pthread_barrier_wait... " >&6; }
12497 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12498 $as_echo_n "(cached) " >&6
12499 else
12500 ac_func_search_save_LIBS=$LIBS
12501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12502 /* end confdefs.h. */
12504 /* Override any GCC internal prototype to avoid an error.
12505 Use char because int might match the return type of a GCC
12506 builtin and then its argument prototype would still apply. */
12507 #ifdef __cplusplus
12508 extern "C"
12509 #endif
12510 char pthread_barrier_wait ();
12512 main ()
12514 return pthread_barrier_wait ();
12516 return 0;
12518 _ACEOF
12519 for ac_lib in '' pthread; do
12520 if test -z "$ac_lib"; then
12521 ac_res="none required"
12522 else
12523 ac_res=-l$ac_lib
12524 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12526 if ac_fn_c_try_link "$LINENO"; then :
12527 ac_cv_search_pthread_barrier_wait=$ac_res
12529 rm -f core conftest.err conftest.$ac_objext \
12530 conftest$ac_exeext
12531 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12532 break
12534 done
12535 if ${ac_cv_search_pthread_barrier_wait+:} false; then :
12537 else
12538 ac_cv_search_pthread_barrier_wait=no
12540 rm conftest.$ac_ext
12541 LIBS=$ac_func_search_save_LIBS
12543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_barrier_wait" >&5
12544 $as_echo "$ac_cv_search_pthread_barrier_wait" >&6; }
12545 ac_res=$ac_cv_search_pthread_barrier_wait
12546 if test "$ac_res" != no; then :
12547 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12553 if test "$with_readline" = yes; then
12556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing readline" >&5
12557 $as_echo_n "checking for library containing readline... " >&6; }
12558 if ${pgac_cv_check_readline+:} false; then :
12559 $as_echo_n "(cached) " >&6
12560 else
12561 pgac_cv_check_readline=no
12562 pgac_save_LIBS=$LIBS
12563 if test x"$with_libedit_preferred" != x"yes"
12564 then READLINE_ORDER="-lreadline -ledit"
12565 else READLINE_ORDER="-ledit -lreadline"
12567 for pgac_rllib in $READLINE_ORDER ; do
12568 for pgac_lib in "" " -ltermcap" " -lncurses" " -lcurses" ; do
12569 LIBS="${pgac_rllib}${pgac_lib} $pgac_save_LIBS"
12570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12571 /* end confdefs.h. */
12573 /* Override any GCC internal prototype to avoid an error.
12574 Use char because int might match the return type of a GCC
12575 builtin and then its argument prototype would still apply. */
12576 #ifdef __cplusplus
12577 extern "C"
12578 #endif
12579 char readline ();
12581 main ()
12583 return readline ();
12585 return 0;
12587 _ACEOF
12588 if ac_fn_c_try_link "$LINENO"; then :
12590 # Older NetBSD and OpenBSD have a broken linker that does not
12591 # recognize dependent libraries; assume curses is needed if we didn't
12592 # find any dependency.
12593 case $host_os in
12594 netbsd* | openbsd*)
12595 if test x"$pgac_lib" = x"" ; then
12596 pgac_lib=" -lcurses"
12597 fi ;;
12598 esac
12600 pgac_cv_check_readline="${pgac_rllib}${pgac_lib}"
12601 break
12604 rm -f core conftest.err conftest.$ac_objext \
12605 conftest$ac_exeext conftest.$ac_ext
12606 done
12607 if test "$pgac_cv_check_readline" != no ; then
12608 break
12610 done
12611 LIBS=$pgac_save_LIBS
12614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_check_readline" >&5
12615 $as_echo "$pgac_cv_check_readline" >&6; }
12616 if test "$pgac_cv_check_readline" != no ; then
12617 LIBS="$pgac_cv_check_readline $LIBS"
12619 $as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
12624 if test x"$pgac_cv_check_readline" = x"no"; then
12625 as_fn_error $? "readline library not found
12626 If you have readline already installed, see config.log for details on the
12627 failure. It is possible the compiler isn't looking in the proper directory.
12628 Use --without-readline to disable readline support." "$LINENO" 5
12632 if test "$with_zlib" = yes; then
12633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
12634 $as_echo_n "checking for inflate in -lz... " >&6; }
12635 if ${ac_cv_lib_z_inflate+:} false; then :
12636 $as_echo_n "(cached) " >&6
12637 else
12638 ac_check_lib_save_LIBS=$LIBS
12639 LIBS="-lz $LIBS"
12640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12641 /* end confdefs.h. */
12643 /* Override any GCC internal prototype to avoid an error.
12644 Use char because int might match the return type of a GCC
12645 builtin and then its argument prototype would still apply. */
12646 #ifdef __cplusplus
12647 extern "C"
12648 #endif
12649 char inflate ();
12651 main ()
12653 return inflate ();
12655 return 0;
12657 _ACEOF
12658 if ac_fn_c_try_link "$LINENO"; then :
12659 ac_cv_lib_z_inflate=yes
12660 else
12661 ac_cv_lib_z_inflate=no
12663 rm -f core conftest.err conftest.$ac_objext \
12664 conftest$ac_exeext conftest.$ac_ext
12665 LIBS=$ac_check_lib_save_LIBS
12667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
12668 $as_echo "$ac_cv_lib_z_inflate" >&6; }
12669 if test "x$ac_cv_lib_z_inflate" = xyes; then :
12670 cat >>confdefs.h <<_ACEOF
12671 #define HAVE_LIBZ 1
12672 _ACEOF
12674 LIBS="-lz $LIBS"
12676 else
12677 as_fn_error $? "zlib library not found
12678 If you have zlib already installed, see config.log for details on the
12679 failure. It is possible the compiler isn't looking in the proper directory.
12680 Use --without-zlib to disable zlib support." "$LINENO" 5
12685 if test "$enable_spinlocks" = yes; then
12687 $as_echo "#define HAVE_SPINLOCKS 1" >>confdefs.h
12689 else
12690 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12691 *** Not using spinlocks will cause poor performance." >&5
12692 $as_echo "$as_me: WARNING:
12693 *** Not using spinlocks will cause poor performance." >&2;}
12696 if test "$enable_atomics" = yes; then
12698 $as_echo "#define HAVE_ATOMICS 1" >>confdefs.h
12700 else
12701 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
12702 *** Not using atomic operations will cause poor performance." >&5
12703 $as_echo "$as_me: WARNING:
12704 *** Not using atomic operations will cause poor performance." >&2;}
12707 if test "$with_gssapi" = yes ; then
12708 if test "$PORTNAME" != "win32"; then
12709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gss_init_sec_context" >&5
12710 $as_echo_n "checking for library containing gss_init_sec_context... " >&6; }
12711 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12712 $as_echo_n "(cached) " >&6
12713 else
12714 ac_func_search_save_LIBS=$LIBS
12715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12716 /* end confdefs.h. */
12718 /* Override any GCC internal prototype to avoid an error.
12719 Use char because int might match the return type of a GCC
12720 builtin and then its argument prototype would still apply. */
12721 #ifdef __cplusplus
12722 extern "C"
12723 #endif
12724 char gss_init_sec_context ();
12726 main ()
12728 return gss_init_sec_context ();
12730 return 0;
12732 _ACEOF
12733 for ac_lib in '' gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'; do
12734 if test -z "$ac_lib"; then
12735 ac_res="none required"
12736 else
12737 ac_res=-l$ac_lib
12738 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12740 if ac_fn_c_try_link "$LINENO"; then :
12741 ac_cv_search_gss_init_sec_context=$ac_res
12743 rm -f core conftest.err conftest.$ac_objext \
12744 conftest$ac_exeext
12745 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12746 break
12748 done
12749 if ${ac_cv_search_gss_init_sec_context+:} false; then :
12751 else
12752 ac_cv_search_gss_init_sec_context=no
12754 rm conftest.$ac_ext
12755 LIBS=$ac_func_search_save_LIBS
12757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gss_init_sec_context" >&5
12758 $as_echo "$ac_cv_search_gss_init_sec_context" >&6; }
12759 ac_res=$ac_cv_search_gss_init_sec_context
12760 if test "$ac_res" != no; then :
12761 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12763 else
12764 as_fn_error $? "could not find function 'gss_init_sec_context' required for GSSAPI" "$LINENO" 5
12767 else
12768 LIBS="$LIBS -lgssapi32"
12773 # SSL Library
12775 # There is currently only one supported SSL/TLS library: OpenSSL.
12780 # Check whether --with-ssl was given.
12781 if test "${with_ssl+set}" = set; then :
12782 withval=$with_ssl;
12783 case $withval in
12784 yes)
12785 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12788 as_fn_error $? "argument required for --with-ssl option" "$LINENO" 5
12793 esac
12798 if test x"$with_ssl" = x"" ; then
12799 with_ssl=no
12804 # Check whether --with-openssl was given.
12805 if test "${with_openssl+set}" = set; then :
12806 withval=$with_openssl;
12807 case $withval in
12808 yes)
12815 as_fn_error $? "no argument expected for --with-openssl option" "$LINENO" 5
12817 esac
12819 else
12820 with_openssl=no
12825 if test "$with_openssl" = yes ; then
12826 with_ssl=openssl
12829 if test "$with_ssl" = openssl ; then
12830 # Minimum required OpenSSL version is 1.0.1
12832 $as_echo "#define OPENSSL_API_COMPAT 0x10001000L" >>confdefs.h
12834 if test "$PORTNAME" != "win32"; then
12835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_new_ex_data in -lcrypto" >&5
12836 $as_echo_n "checking for CRYPTO_new_ex_data in -lcrypto... " >&6; }
12837 if ${ac_cv_lib_crypto_CRYPTO_new_ex_data+:} false; then :
12838 $as_echo_n "(cached) " >&6
12839 else
12840 ac_check_lib_save_LIBS=$LIBS
12841 LIBS="-lcrypto $LIBS"
12842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12843 /* end confdefs.h. */
12845 /* Override any GCC internal prototype to avoid an error.
12846 Use char because int might match the return type of a GCC
12847 builtin and then its argument prototype would still apply. */
12848 #ifdef __cplusplus
12849 extern "C"
12850 #endif
12851 char CRYPTO_new_ex_data ();
12853 main ()
12855 return CRYPTO_new_ex_data ();
12857 return 0;
12859 _ACEOF
12860 if ac_fn_c_try_link "$LINENO"; then :
12861 ac_cv_lib_crypto_CRYPTO_new_ex_data=yes
12862 else
12863 ac_cv_lib_crypto_CRYPTO_new_ex_data=no
12865 rm -f core conftest.err conftest.$ac_objext \
12866 conftest$ac_exeext conftest.$ac_ext
12867 LIBS=$ac_check_lib_save_LIBS
12869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_new_ex_data" >&5
12870 $as_echo "$ac_cv_lib_crypto_CRYPTO_new_ex_data" >&6; }
12871 if test "x$ac_cv_lib_crypto_CRYPTO_new_ex_data" = xyes; then :
12872 cat >>confdefs.h <<_ACEOF
12873 #define HAVE_LIBCRYPTO 1
12874 _ACEOF
12876 LIBS="-lcrypto $LIBS"
12878 else
12879 as_fn_error $? "library 'crypto' is required for OpenSSL" "$LINENO" 5
12882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_new in -lssl" >&5
12883 $as_echo_n "checking for SSL_new in -lssl... " >&6; }
12884 if ${ac_cv_lib_ssl_SSL_new+:} false; then :
12885 $as_echo_n "(cached) " >&6
12886 else
12887 ac_check_lib_save_LIBS=$LIBS
12888 LIBS="-lssl $LIBS"
12889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12890 /* end confdefs.h. */
12892 /* Override any GCC internal prototype to avoid an error.
12893 Use char because int might match the return type of a GCC
12894 builtin and then its argument prototype would still apply. */
12895 #ifdef __cplusplus
12896 extern "C"
12897 #endif
12898 char SSL_new ();
12900 main ()
12902 return SSL_new ();
12904 return 0;
12906 _ACEOF
12907 if ac_fn_c_try_link "$LINENO"; then :
12908 ac_cv_lib_ssl_SSL_new=yes
12909 else
12910 ac_cv_lib_ssl_SSL_new=no
12912 rm -f core conftest.err conftest.$ac_objext \
12913 conftest$ac_exeext conftest.$ac_ext
12914 LIBS=$ac_check_lib_save_LIBS
12916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_new" >&5
12917 $as_echo "$ac_cv_lib_ssl_SSL_new" >&6; }
12918 if test "x$ac_cv_lib_ssl_SSL_new" = xyes; then :
12919 cat >>confdefs.h <<_ACEOF
12920 #define HAVE_LIBSSL 1
12921 _ACEOF
12923 LIBS="-lssl $LIBS"
12925 else
12926 as_fn_error $? "library 'ssl' is required for OpenSSL" "$LINENO" 5
12929 else
12930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing CRYPTO_new_ex_data" >&5
12931 $as_echo_n "checking for library containing CRYPTO_new_ex_data... " >&6; }
12932 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12933 $as_echo_n "(cached) " >&6
12934 else
12935 ac_func_search_save_LIBS=$LIBS
12936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12937 /* end confdefs.h. */
12939 /* Override any GCC internal prototype to avoid an error.
12940 Use char because int might match the return type of a GCC
12941 builtin and then its argument prototype would still apply. */
12942 #ifdef __cplusplus
12943 extern "C"
12944 #endif
12945 char CRYPTO_new_ex_data ();
12947 main ()
12949 return CRYPTO_new_ex_data ();
12951 return 0;
12953 _ACEOF
12954 for ac_lib in '' eay32 crypto; do
12955 if test -z "$ac_lib"; then
12956 ac_res="none required"
12957 else
12958 ac_res=-l$ac_lib
12959 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12961 if ac_fn_c_try_link "$LINENO"; then :
12962 ac_cv_search_CRYPTO_new_ex_data=$ac_res
12964 rm -f core conftest.err conftest.$ac_objext \
12965 conftest$ac_exeext
12966 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12967 break
12969 done
12970 if ${ac_cv_search_CRYPTO_new_ex_data+:} false; then :
12972 else
12973 ac_cv_search_CRYPTO_new_ex_data=no
12975 rm conftest.$ac_ext
12976 LIBS=$ac_func_search_save_LIBS
12978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_CRYPTO_new_ex_data" >&5
12979 $as_echo "$ac_cv_search_CRYPTO_new_ex_data" >&6; }
12980 ac_res=$ac_cv_search_CRYPTO_new_ex_data
12981 if test "$ac_res" != no; then :
12982 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12984 else
12985 as_fn_error $? "library 'eay32' or 'crypto' is required for OpenSSL" "$LINENO" 5
12988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_new" >&5
12989 $as_echo_n "checking for library containing SSL_new... " >&6; }
12990 if ${ac_cv_search_SSL_new+:} false; then :
12991 $as_echo_n "(cached) " >&6
12992 else
12993 ac_func_search_save_LIBS=$LIBS
12994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12995 /* end confdefs.h. */
12997 /* Override any GCC internal prototype to avoid an error.
12998 Use char because int might match the return type of a GCC
12999 builtin and then its argument prototype would still apply. */
13000 #ifdef __cplusplus
13001 extern "C"
13002 #endif
13003 char SSL_new ();
13005 main ()
13007 return SSL_new ();
13009 return 0;
13011 _ACEOF
13012 for ac_lib in '' ssleay32 ssl; do
13013 if test -z "$ac_lib"; then
13014 ac_res="none required"
13015 else
13016 ac_res=-l$ac_lib
13017 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13019 if ac_fn_c_try_link "$LINENO"; then :
13020 ac_cv_search_SSL_new=$ac_res
13022 rm -f core conftest.err conftest.$ac_objext \
13023 conftest$ac_exeext
13024 if ${ac_cv_search_SSL_new+:} false; then :
13025 break
13027 done
13028 if ${ac_cv_search_SSL_new+:} false; then :
13030 else
13031 ac_cv_search_SSL_new=no
13033 rm conftest.$ac_ext
13034 LIBS=$ac_func_search_save_LIBS
13036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_new" >&5
13037 $as_echo "$ac_cv_search_SSL_new" >&6; }
13038 ac_res=$ac_cv_search_SSL_new
13039 if test "$ac_res" != no; then :
13040 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13042 else
13043 as_fn_error $? "library 'ssleay32' or 'ssl' is required for OpenSSL" "$LINENO" 5
13047 # Function introduced in OpenSSL 1.0.2.
13048 for ac_func in X509_get_signature_nid
13049 do :
13050 ac_fn_c_check_func "$LINENO" "X509_get_signature_nid" "ac_cv_func_X509_get_signature_nid"
13051 if test "x$ac_cv_func_X509_get_signature_nid" = xyes; then :
13052 cat >>confdefs.h <<_ACEOF
13053 #define HAVE_X509_GET_SIGNATURE_NID 1
13054 _ACEOF
13057 done
13059 # Functions introduced in OpenSSL 1.1.0. We used to check for
13060 # OPENSSL_VERSION_NUMBER, but that didn't work with 1.1.0, because LibreSSL
13061 # defines OPENSSL_VERSION_NUMBER to claim version 2.0.0, even though it
13062 # doesn't have these OpenSSL 1.1.0 functions. So check for individual
13063 # functions.
13064 for ac_func in OPENSSL_init_ssl BIO_get_data BIO_meth_new ASN1_STRING_get0_data HMAC_CTX_new HMAC_CTX_free
13065 do :
13066 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13067 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13068 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13069 cat >>confdefs.h <<_ACEOF
13070 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13071 _ACEOF
13074 done
13076 # OpenSSL versions before 1.1.0 required setting callback functions, for
13077 # thread-safety. In 1.1.0, it's no longer required, and CRYPTO_lock()
13078 # function was removed.
13079 for ac_func in CRYPTO_lock
13080 do :
13081 ac_fn_c_check_func "$LINENO" "CRYPTO_lock" "ac_cv_func_CRYPTO_lock"
13082 if test "x$ac_cv_func_CRYPTO_lock" = xyes; then :
13083 cat >>confdefs.h <<_ACEOF
13084 #define HAVE_CRYPTO_LOCK 1
13085 _ACEOF
13088 done
13091 $as_echo "#define USE_OPENSSL 1" >>confdefs.h
13093 elif test "$with_ssl" != no ; then
13094 as_fn_error $? "--with-ssl must specify openssl" "$LINENO" 5
13098 if test "$with_pam" = yes ; then
13099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_start in -lpam" >&5
13100 $as_echo_n "checking for pam_start in -lpam... " >&6; }
13101 if ${ac_cv_lib_pam_pam_start+:} false; then :
13102 $as_echo_n "(cached) " >&6
13103 else
13104 ac_check_lib_save_LIBS=$LIBS
13105 LIBS="-lpam $LIBS"
13106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13107 /* end confdefs.h. */
13109 /* Override any GCC internal prototype to avoid an error.
13110 Use char because int might match the return type of a GCC
13111 builtin and then its argument prototype would still apply. */
13112 #ifdef __cplusplus
13113 extern "C"
13114 #endif
13115 char pam_start ();
13117 main ()
13119 return pam_start ();
13121 return 0;
13123 _ACEOF
13124 if ac_fn_c_try_link "$LINENO"; then :
13125 ac_cv_lib_pam_pam_start=yes
13126 else
13127 ac_cv_lib_pam_pam_start=no
13129 rm -f core conftest.err conftest.$ac_objext \
13130 conftest$ac_exeext conftest.$ac_ext
13131 LIBS=$ac_check_lib_save_LIBS
13133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_start" >&5
13134 $as_echo "$ac_cv_lib_pam_pam_start" >&6; }
13135 if test "x$ac_cv_lib_pam_pam_start" = xyes; then :
13136 cat >>confdefs.h <<_ACEOF
13137 #define HAVE_LIBPAM 1
13138 _ACEOF
13140 LIBS="-lpam $LIBS"
13142 else
13143 as_fn_error $? "library 'pam' is required for PAM" "$LINENO" 5
13148 if test "$with_libxml" = yes ; then
13149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xmlSaveToBuffer in -lxml2" >&5
13150 $as_echo_n "checking for xmlSaveToBuffer in -lxml2... " >&6; }
13151 if ${ac_cv_lib_xml2_xmlSaveToBuffer+:} false; then :
13152 $as_echo_n "(cached) " >&6
13153 else
13154 ac_check_lib_save_LIBS=$LIBS
13155 LIBS="-lxml2 $LIBS"
13156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13157 /* end confdefs.h. */
13159 /* Override any GCC internal prototype to avoid an error.
13160 Use char because int might match the return type of a GCC
13161 builtin and then its argument prototype would still apply. */
13162 #ifdef __cplusplus
13163 extern "C"
13164 #endif
13165 char xmlSaveToBuffer ();
13167 main ()
13169 return xmlSaveToBuffer ();
13171 return 0;
13173 _ACEOF
13174 if ac_fn_c_try_link "$LINENO"; then :
13175 ac_cv_lib_xml2_xmlSaveToBuffer=yes
13176 else
13177 ac_cv_lib_xml2_xmlSaveToBuffer=no
13179 rm -f core conftest.err conftest.$ac_objext \
13180 conftest$ac_exeext conftest.$ac_ext
13181 LIBS=$ac_check_lib_save_LIBS
13183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xml2_xmlSaveToBuffer" >&5
13184 $as_echo "$ac_cv_lib_xml2_xmlSaveToBuffer" >&6; }
13185 if test "x$ac_cv_lib_xml2_xmlSaveToBuffer" = xyes; then :
13186 cat >>confdefs.h <<_ACEOF
13187 #define HAVE_LIBXML2 1
13188 _ACEOF
13190 LIBS="-lxml2 $LIBS"
13192 else
13193 as_fn_error $? "library 'xml2' (version >= 2.6.23) is required for XML support" "$LINENO" 5
13198 if test "$with_libxslt" = yes ; then
13199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for xsltCleanupGlobals in -lxslt" >&5
13200 $as_echo_n "checking for xsltCleanupGlobals in -lxslt... " >&6; }
13201 if ${ac_cv_lib_xslt_xsltCleanupGlobals+:} false; then :
13202 $as_echo_n "(cached) " >&6
13203 else
13204 ac_check_lib_save_LIBS=$LIBS
13205 LIBS="-lxslt $LIBS"
13206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13207 /* end confdefs.h. */
13209 /* Override any GCC internal prototype to avoid an error.
13210 Use char because int might match the return type of a GCC
13211 builtin and then its argument prototype would still apply. */
13212 #ifdef __cplusplus
13213 extern "C"
13214 #endif
13215 char xsltCleanupGlobals ();
13217 main ()
13219 return xsltCleanupGlobals ();
13221 return 0;
13223 _ACEOF
13224 if ac_fn_c_try_link "$LINENO"; then :
13225 ac_cv_lib_xslt_xsltCleanupGlobals=yes
13226 else
13227 ac_cv_lib_xslt_xsltCleanupGlobals=no
13229 rm -f core conftest.err conftest.$ac_objext \
13230 conftest$ac_exeext conftest.$ac_ext
13231 LIBS=$ac_check_lib_save_LIBS
13233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xslt_xsltCleanupGlobals" >&5
13234 $as_echo "$ac_cv_lib_xslt_xsltCleanupGlobals" >&6; }
13235 if test "x$ac_cv_lib_xslt_xsltCleanupGlobals" = xyes; then :
13236 cat >>confdefs.h <<_ACEOF
13237 #define HAVE_LIBXSLT 1
13238 _ACEOF
13240 LIBS="-lxslt $LIBS"
13242 else
13243 as_fn_error $? "library 'xslt' is required for XSLT support" "$LINENO" 5
13248 if test "$with_lz4" = yes ; then
13249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4_compress_default in -llz4" >&5
13250 $as_echo_n "checking for LZ4_compress_default in -llz4... " >&6; }
13251 if ${ac_cv_lib_lz4_LZ4_compress_default+:} false; then :
13252 $as_echo_n "(cached) " >&6
13253 else
13254 ac_check_lib_save_LIBS=$LIBS
13255 LIBS="-llz4 $LIBS"
13256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13257 /* end confdefs.h. */
13259 /* Override any GCC internal prototype to avoid an error.
13260 Use char because int might match the return type of a GCC
13261 builtin and then its argument prototype would still apply. */
13262 #ifdef __cplusplus
13263 extern "C"
13264 #endif
13265 char LZ4_compress_default ();
13267 main ()
13269 return LZ4_compress_default ();
13271 return 0;
13273 _ACEOF
13274 if ac_fn_c_try_link "$LINENO"; then :
13275 ac_cv_lib_lz4_LZ4_compress_default=yes
13276 else
13277 ac_cv_lib_lz4_LZ4_compress_default=no
13279 rm -f core conftest.err conftest.$ac_objext \
13280 conftest$ac_exeext conftest.$ac_ext
13281 LIBS=$ac_check_lib_save_LIBS
13283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lz4_LZ4_compress_default" >&5
13284 $as_echo "$ac_cv_lib_lz4_LZ4_compress_default" >&6; }
13285 if test "x$ac_cv_lib_lz4_LZ4_compress_default" = xyes; then :
13286 cat >>confdefs.h <<_ACEOF
13287 #define HAVE_LIBLZ4 1
13288 _ACEOF
13290 LIBS="-llz4 $LIBS"
13292 else
13293 as_fn_error $? "library 'lz4' is required for LZ4 support" "$LINENO" 5
13298 if test "$with_zstd" = yes ; then
13299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD_compress in -lzstd" >&5
13300 $as_echo_n "checking for ZSTD_compress in -lzstd... " >&6; }
13301 if ${ac_cv_lib_zstd_ZSTD_compress+:} false; then :
13302 $as_echo_n "(cached) " >&6
13303 else
13304 ac_check_lib_save_LIBS=$LIBS
13305 LIBS="-lzstd $LIBS"
13306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13307 /* end confdefs.h. */
13309 /* Override any GCC internal prototype to avoid an error.
13310 Use char because int might match the return type of a GCC
13311 builtin and then its argument prototype would still apply. */
13312 #ifdef __cplusplus
13313 extern "C"
13314 #endif
13315 char ZSTD_compress ();
13317 main ()
13319 return ZSTD_compress ();
13321 return 0;
13323 _ACEOF
13324 if ac_fn_c_try_link "$LINENO"; then :
13325 ac_cv_lib_zstd_ZSTD_compress=yes
13326 else
13327 ac_cv_lib_zstd_ZSTD_compress=no
13329 rm -f core conftest.err conftest.$ac_objext \
13330 conftest$ac_exeext conftest.$ac_ext
13331 LIBS=$ac_check_lib_save_LIBS
13333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_compress" >&5
13334 $as_echo "$ac_cv_lib_zstd_ZSTD_compress" >&6; }
13335 if test "x$ac_cv_lib_zstd_ZSTD_compress" = xyes; then :
13336 cat >>confdefs.h <<_ACEOF
13337 #define HAVE_LIBZSTD 1
13338 _ACEOF
13340 LIBS="-lzstd $LIBS"
13342 else
13343 as_fn_error $? "library 'zstd' is required for ZSTD support" "$LINENO" 5
13348 # Note: We can test for libldap_r only after we know PTHREAD_LIBS;
13349 # also, on AIX, we may need to have openssl in LIBS for this step.
13350 if test "$with_ldap" = yes ; then
13351 _LIBS="$LIBS"
13352 if test "$PORTNAME" != "win32"; then
13353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap" >&5
13354 $as_echo_n "checking for ldap_bind in -lldap... " >&6; }
13355 if ${ac_cv_lib_ldap_ldap_bind+:} false; then :
13356 $as_echo_n "(cached) " >&6
13357 else
13358 ac_check_lib_save_LIBS=$LIBS
13359 LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
13360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13361 /* end confdefs.h. */
13363 /* Override any GCC internal prototype to avoid an error.
13364 Use char because int might match the return type of a GCC
13365 builtin and then its argument prototype would still apply. */
13366 #ifdef __cplusplus
13367 extern "C"
13368 #endif
13369 char ldap_bind ();
13371 main ()
13373 return ldap_bind ();
13375 return 0;
13377 _ACEOF
13378 if ac_fn_c_try_link "$LINENO"; then :
13379 ac_cv_lib_ldap_ldap_bind=yes
13380 else
13381 ac_cv_lib_ldap_ldap_bind=no
13383 rm -f core conftest.err conftest.$ac_objext \
13384 conftest$ac_exeext conftest.$ac_ext
13385 LIBS=$ac_check_lib_save_LIBS
13387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_ldap_bind" >&5
13388 $as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
13389 if test "x$ac_cv_lib_ldap_ldap_bind" = xyes; then :
13390 cat >>confdefs.h <<_ACEOF
13391 #define HAVE_LIBLDAP 1
13392 _ACEOF
13394 LIBS="-lldap $LIBS"
13396 else
13397 as_fn_error $? "library 'ldap' is required for LDAP" "$LINENO" 5
13400 LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
13401 # This test is carried out against libldap.
13402 for ac_func in ldap_initialize
13403 do :
13404 ac_fn_c_check_func "$LINENO" "ldap_initialize" "ac_cv_func_ldap_initialize"
13405 if test "x$ac_cv_func_ldap_initialize" = xyes; then :
13406 cat >>confdefs.h <<_ACEOF
13407 #define HAVE_LDAP_INITIALIZE 1
13408 _ACEOF
13411 done
13413 # The separate ldap_r library only exists in OpenLDAP < 2.5, and if we
13414 # have 2.5 or later, we shouldn't even probe for ldap_r (we might find a
13415 # library from a separate OpenLDAP installation). The most reliable
13416 # way to check that is to check for a function introduced in 2.5.
13417 ac_fn_c_check_func "$LINENO" "ldap_verify_credentials" "ac_cv_func_ldap_verify_credentials"
13418 if test "x$ac_cv_func_ldap_verify_credentials" = xyes; then :
13419 thread_safe_libldap=yes
13420 else
13421 thread_safe_libldap=no
13424 if test "$enable_thread_safety" = yes -a "$thread_safe_libldap" = no; then
13425 # Use ldap_r for FE if available, else assume ldap is thread-safe.
13426 # On some platforms ldap_r fails to link without PTHREAD_LIBS.
13427 LIBS="$_LIBS"
13428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lldap_r" >&5
13429 $as_echo_n "checking for ldap_bind in -lldap_r... " >&6; }
13430 if ${ac_cv_lib_ldap_r_ldap_bind+:} false; then :
13431 $as_echo_n "(cached) " >&6
13432 else
13433 ac_check_lib_save_LIBS=$LIBS
13434 LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
13435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13436 /* end confdefs.h. */
13438 /* Override any GCC internal prototype to avoid an error.
13439 Use char because int might match the return type of a GCC
13440 builtin and then its argument prototype would still apply. */
13441 #ifdef __cplusplus
13442 extern "C"
13443 #endif
13444 char ldap_bind ();
13446 main ()
13448 return ldap_bind ();
13450 return 0;
13452 _ACEOF
13453 if ac_fn_c_try_link "$LINENO"; then :
13454 ac_cv_lib_ldap_r_ldap_bind=yes
13455 else
13456 ac_cv_lib_ldap_r_ldap_bind=no
13458 rm -f core conftest.err conftest.$ac_objext \
13459 conftest$ac_exeext conftest.$ac_ext
13460 LIBS=$ac_check_lib_save_LIBS
13462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ldap_r_ldap_bind" >&5
13463 $as_echo "$ac_cv_lib_ldap_r_ldap_bind" >&6; }
13464 if test "x$ac_cv_lib_ldap_r_ldap_bind" = xyes; then :
13465 LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
13466 else
13467 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13470 else
13471 LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
13473 else
13474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_bind in -lwldap32" >&5
13475 $as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
13476 if ${ac_cv_lib_wldap32_ldap_bind+:} false; then :
13477 $as_echo_n "(cached) " >&6
13478 else
13479 ac_check_lib_save_LIBS=$LIBS
13480 LIBS="-lwldap32 $LIBS"
13481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13482 /* end confdefs.h. */
13484 /* Override any GCC internal prototype to avoid an error.
13485 Use char because int might match the return type of a GCC
13486 builtin and then its argument prototype would still apply. */
13487 #ifdef __cplusplus
13488 extern "C"
13489 #endif
13490 char ldap_bind ();
13492 main ()
13494 return ldap_bind ();
13496 return 0;
13498 _ACEOF
13499 if ac_fn_c_try_link "$LINENO"; then :
13500 ac_cv_lib_wldap32_ldap_bind=yes
13501 else
13502 ac_cv_lib_wldap32_ldap_bind=no
13504 rm -f core conftest.err conftest.$ac_objext \
13505 conftest$ac_exeext conftest.$ac_ext
13506 LIBS=$ac_check_lib_save_LIBS
13508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wldap32_ldap_bind" >&5
13509 $as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
13510 if test "x$ac_cv_lib_wldap32_ldap_bind" = xyes; then :
13511 cat >>confdefs.h <<_ACEOF
13512 #define HAVE_LIBWLDAP32 1
13513 _ACEOF
13515 LIBS="-lwldap32 $LIBS"
13517 else
13518 as_fn_error $? "library 'wldap32' is required for LDAP" "$LINENO" 5
13521 LDAP_LIBS_FE="-lwldap32"
13522 LDAP_LIBS_BE="-lwldap32"
13524 LIBS="$_LIBS"
13529 # for contrib/sepgsql
13530 if test "$with_selinux" = yes; then
13531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for security_compute_create_name in -lselinux" >&5
13532 $as_echo_n "checking for security_compute_create_name in -lselinux... " >&6; }
13533 if ${ac_cv_lib_selinux_security_compute_create_name+:} false; then :
13534 $as_echo_n "(cached) " >&6
13535 else
13536 ac_check_lib_save_LIBS=$LIBS
13537 LIBS="-lselinux $LIBS"
13538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13539 /* end confdefs.h. */
13541 /* Override any GCC internal prototype to avoid an error.
13542 Use char because int might match the return type of a GCC
13543 builtin and then its argument prototype would still apply. */
13544 #ifdef __cplusplus
13545 extern "C"
13546 #endif
13547 char security_compute_create_name ();
13549 main ()
13551 return security_compute_create_name ();
13553 return 0;
13555 _ACEOF
13556 if ac_fn_c_try_link "$LINENO"; then :
13557 ac_cv_lib_selinux_security_compute_create_name=yes
13558 else
13559 ac_cv_lib_selinux_security_compute_create_name=no
13561 rm -f core conftest.err conftest.$ac_objext \
13562 conftest$ac_exeext conftest.$ac_ext
13563 LIBS=$ac_check_lib_save_LIBS
13565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_security_compute_create_name" >&5
13566 $as_echo "$ac_cv_lib_selinux_security_compute_create_name" >&6; }
13567 if test "x$ac_cv_lib_selinux_security_compute_create_name" = xyes; then :
13568 cat >>confdefs.h <<_ACEOF
13569 #define HAVE_LIBSELINUX 1
13570 _ACEOF
13572 LIBS="-lselinux $LIBS"
13574 else
13575 as_fn_error $? "library 'libselinux', version 2.1.10 or newer, is required for SELinux support" "$LINENO" 5
13580 # for contrib/uuid-ossp
13581 if test "$with_uuid" = bsd ; then
13582 # On BSD, the UUID functions are in libc
13583 ac_fn_c_check_func "$LINENO" "uuid_to_string" "ac_cv_func_uuid_to_string"
13584 if test "x$ac_cv_func_uuid_to_string" = xyes; then :
13585 UUID_LIBS=""
13586 else
13587 as_fn_error $? "BSD UUID functions are not present" "$LINENO" 5
13590 elif test "$with_uuid" = e2fs ; then
13591 # On macOS, the UUID functions are in libc
13592 ac_fn_c_check_func "$LINENO" "uuid_generate" "ac_cv_func_uuid_generate"
13593 if test "x$ac_cv_func_uuid_generate" = xyes; then :
13594 UUID_LIBS=""
13595 else
13596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
13597 $as_echo_n "checking for uuid_generate in -luuid... " >&6; }
13598 if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
13599 $as_echo_n "(cached) " >&6
13600 else
13601 ac_check_lib_save_LIBS=$LIBS
13602 LIBS="-luuid $LIBS"
13603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13604 /* end confdefs.h. */
13606 /* Override any GCC internal prototype to avoid an error.
13607 Use char because int might match the return type of a GCC
13608 builtin and then its argument prototype would still apply. */
13609 #ifdef __cplusplus
13610 extern "C"
13611 #endif
13612 char uuid_generate ();
13614 main ()
13616 return uuid_generate ();
13618 return 0;
13620 _ACEOF
13621 if ac_fn_c_try_link "$LINENO"; then :
13622 ac_cv_lib_uuid_uuid_generate=yes
13623 else
13624 ac_cv_lib_uuid_uuid_generate=no
13626 rm -f core conftest.err conftest.$ac_objext \
13627 conftest$ac_exeext conftest.$ac_ext
13628 LIBS=$ac_check_lib_save_LIBS
13630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
13631 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
13632 if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
13633 UUID_LIBS="-luuid"
13634 else
13635 as_fn_error $? "library 'uuid' is required for E2FS UUID" "$LINENO" 5
13640 elif test "$with_uuid" = ossp ; then
13641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -lossp-uuid" >&5
13642 $as_echo_n "checking for uuid_export in -lossp-uuid... " >&6; }
13643 if ${ac_cv_lib_ossp_uuid_uuid_export+:} false; then :
13644 $as_echo_n "(cached) " >&6
13645 else
13646 ac_check_lib_save_LIBS=$LIBS
13647 LIBS="-lossp-uuid $LIBS"
13648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13649 /* end confdefs.h. */
13651 /* Override any GCC internal prototype to avoid an error.
13652 Use char because int might match the return type of a GCC
13653 builtin and then its argument prototype would still apply. */
13654 #ifdef __cplusplus
13655 extern "C"
13656 #endif
13657 char uuid_export ();
13659 main ()
13661 return uuid_export ();
13663 return 0;
13665 _ACEOF
13666 if ac_fn_c_try_link "$LINENO"; then :
13667 ac_cv_lib_ossp_uuid_uuid_export=yes
13668 else
13669 ac_cv_lib_ossp_uuid_uuid_export=no
13671 rm -f core conftest.err conftest.$ac_objext \
13672 conftest$ac_exeext conftest.$ac_ext
13673 LIBS=$ac_check_lib_save_LIBS
13675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ossp_uuid_uuid_export" >&5
13676 $as_echo "$ac_cv_lib_ossp_uuid_uuid_export" >&6; }
13677 if test "x$ac_cv_lib_ossp_uuid_uuid_export" = xyes; then :
13678 UUID_LIBS="-lossp-uuid"
13679 else
13680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_export in -luuid" >&5
13681 $as_echo_n "checking for uuid_export in -luuid... " >&6; }
13682 if ${ac_cv_lib_uuid_uuid_export+:} false; then :
13683 $as_echo_n "(cached) " >&6
13684 else
13685 ac_check_lib_save_LIBS=$LIBS
13686 LIBS="-luuid $LIBS"
13687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13688 /* end confdefs.h. */
13690 /* Override any GCC internal prototype to avoid an error.
13691 Use char because int might match the return type of a GCC
13692 builtin and then its argument prototype would still apply. */
13693 #ifdef __cplusplus
13694 extern "C"
13695 #endif
13696 char uuid_export ();
13698 main ()
13700 return uuid_export ();
13702 return 0;
13704 _ACEOF
13705 if ac_fn_c_try_link "$LINENO"; then :
13706 ac_cv_lib_uuid_uuid_export=yes
13707 else
13708 ac_cv_lib_uuid_uuid_export=no
13710 rm -f core conftest.err conftest.$ac_objext \
13711 conftest$ac_exeext conftest.$ac_ext
13712 LIBS=$ac_check_lib_save_LIBS
13714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_export" >&5
13715 $as_echo "$ac_cv_lib_uuid_uuid_export" >&6; }
13716 if test "x$ac_cv_lib_uuid_uuid_export" = xyes; then :
13717 UUID_LIBS="-luuid"
13718 else
13719 as_fn_error $? "library 'ossp-uuid' or 'uuid' is required for OSSP UUID" "$LINENO" 5
13729 ## Header files
13732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
13733 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
13734 if ${ac_cv_header_stdbool_h+:} false; then :
13735 $as_echo_n "(cached) " >&6
13736 else
13737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13738 /* end confdefs.h. */
13740 #include <stdbool.h>
13741 #ifndef bool
13742 "error: bool is not defined"
13743 #endif
13744 #ifndef false
13745 "error: false is not defined"
13746 #endif
13747 #if false
13748 "error: false is not 0"
13749 #endif
13750 #ifndef true
13751 "error: true is not defined"
13752 #endif
13753 #if true != 1
13754 "error: true is not 1"
13755 #endif
13756 #ifndef __bool_true_false_are_defined
13757 "error: __bool_true_false_are_defined is not defined"
13758 #endif
13760 struct s { _Bool s: 1; _Bool t; } s;
13762 char a[true == 1 ? 1 : -1];
13763 char b[false == 0 ? 1 : -1];
13764 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
13765 char d[(bool) 0.5 == true ? 1 : -1];
13766 /* See body of main program for 'e'. */
13767 char f[(_Bool) 0.0 == false ? 1 : -1];
13768 char g[true];
13769 char h[sizeof (_Bool)];
13770 char i[sizeof s.t];
13771 enum { j = false, k = true, l = false * true, m = true * 256 };
13772 /* The following fails for
13773 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
13774 _Bool n[m];
13775 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
13776 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
13777 /* Catch a bug in an HP-UX C compiler. See
13778 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
13779 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
13781 _Bool q = true;
13782 _Bool *pq = &q;
13785 main ()
13788 bool e = &s;
13789 *pq |= q;
13790 *pq |= ! q;
13791 /* Refer to every declared value, to avoid compiler optimizations. */
13792 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
13793 + !m + !n + !o + !p + !q + !pq);
13796 return 0;
13798 _ACEOF
13799 if ac_fn_c_try_compile "$LINENO"; then :
13800 ac_cv_header_stdbool_h=yes
13801 else
13802 ac_cv_header_stdbool_h=no
13804 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
13807 $as_echo "$ac_cv_header_stdbool_h" >&6; }
13808 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
13809 if test "x$ac_cv_type__Bool" = xyes; then :
13811 cat >>confdefs.h <<_ACEOF
13812 #define HAVE__BOOL 1
13813 _ACEOF
13819 if test $ac_cv_header_stdbool_h = yes; then
13821 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
13826 for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/event.h sys/ipc.h sys/personality.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/signalfd.h sys/sockio.h sys/tas.h sys/uio.h sys/un.h termios.h ucred.h wctype.h
13827 do :
13828 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13829 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13830 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13831 cat >>confdefs.h <<_ACEOF
13832 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13833 _ACEOF
13837 done
13840 # On BSD, test for net/if.h will fail unless sys/socket.h
13841 # is included first.
13842 for ac_header in net/if.h
13843 do :
13844 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
13845 #include <sys/socket.h>
13848 if test "x$ac_cv_header_net_if_h" = xyes; then :
13849 cat >>confdefs.h <<_ACEOF
13850 #define HAVE_NET_IF_H 1
13851 _ACEOF
13855 done
13858 # On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
13859 # is included first.
13860 for ac_header in sys/ucred.h
13861 do :
13862 ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
13863 #include <sys/param.h>
13866 if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
13867 cat >>confdefs.h <<_ACEOF
13868 #define HAVE_SYS_UCRED_H 1
13869 _ACEOF
13873 done
13876 # At least on IRIX, test for netinet/tcp.h will fail unless
13877 # netinet/in.h is included first.
13878 for ac_header in netinet/tcp.h
13879 do :
13880 ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
13881 #include <netinet/in.h>
13884 if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
13885 cat >>confdefs.h <<_ACEOF
13886 #define HAVE_NETINET_TCP_H 1
13887 _ACEOF
13891 done
13894 if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
13895 for ac_header in readline/readline.h
13896 do :
13897 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13898 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13899 cat >>confdefs.h <<_ACEOF
13900 #define HAVE_READLINE_READLINE_H 1
13901 _ACEOF
13903 else
13904 for ac_header in readline.h
13905 do :
13906 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13907 if test "x$ac_cv_header_readline_h" = xyes; then :
13908 cat >>confdefs.h <<_ACEOF
13909 #define HAVE_READLINE_H 1
13910 _ACEOF
13912 else
13913 as_fn_error $? "readline header not found
13914 If you have readline already installed, see config.log for details on the
13915 failure. It is possible the compiler isn't looking in the proper directory.
13916 Use --without-readline to disable readline support." "$LINENO" 5
13919 done
13923 done
13925 for ac_header in readline/history.h
13926 do :
13927 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
13928 if test "x$ac_cv_header_readline_history_h" = xyes; then :
13929 cat >>confdefs.h <<_ACEOF
13930 #define HAVE_READLINE_HISTORY_H 1
13931 _ACEOF
13933 else
13934 for ac_header in history.h
13935 do :
13936 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
13937 if test "x$ac_cv_header_history_h" = xyes; then :
13938 cat >>confdefs.h <<_ACEOF
13939 #define HAVE_HISTORY_H 1
13940 _ACEOF
13942 else
13943 as_fn_error $? "history header not found
13944 If you have readline already installed, see config.log for details on the
13945 failure. It is possible the compiler isn't looking in the proper directory.
13946 Use --without-readline to disable readline support." "$LINENO" 5
13949 done
13953 done
13957 if expr x"$pgac_cv_check_readline" : 'x-ledit' >/dev/null ; then
13958 # Some installations of libedit usurp /usr/include/readline/, which seems
13959 # bad practice, since in combined installations readline will have its headers
13960 # there. We might have to resort to AC_EGREP checks to make sure we found
13961 # the proper header...
13962 for ac_header in editline/readline.h
13963 do :
13964 ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default"
13965 if test "x$ac_cv_header_editline_readline_h" = xyes; then :
13966 cat >>confdefs.h <<_ACEOF
13967 #define HAVE_EDITLINE_READLINE_H 1
13968 _ACEOF
13970 else
13971 for ac_header in readline.h
13972 do :
13973 ac_fn_c_check_header_mongrel "$LINENO" "readline.h" "ac_cv_header_readline_h" "$ac_includes_default"
13974 if test "x$ac_cv_header_readline_h" = xyes; then :
13975 cat >>confdefs.h <<_ACEOF
13976 #define HAVE_READLINE_H 1
13977 _ACEOF
13979 else
13980 for ac_header in readline/readline.h
13981 do :
13982 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
13983 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
13984 cat >>confdefs.h <<_ACEOF
13985 #define HAVE_READLINE_READLINE_H 1
13986 _ACEOF
13988 else
13989 as_fn_error $? "readline header not found
13990 If you have libedit already installed, see config.log for details on the
13991 failure. It is possible the compiler isn't looking in the proper directory.
13992 Use --without-readline to disable libedit support." "$LINENO" 5
13995 done
13999 done
14003 done
14005 # Note: in a libedit installation, history.h is sometimes a dummy, and may
14006 # not be there at all. Hence, don't complain if not found. We must check
14007 # though, since in yet other versions it is an independent header.
14008 for ac_header in editline/history.h
14009 do :
14010 ac_fn_c_check_header_mongrel "$LINENO" "editline/history.h" "ac_cv_header_editline_history_h" "$ac_includes_default"
14011 if test "x$ac_cv_header_editline_history_h" = xyes; then :
14012 cat >>confdefs.h <<_ACEOF
14013 #define HAVE_EDITLINE_HISTORY_H 1
14014 _ACEOF
14016 else
14017 for ac_header in history.h
14018 do :
14019 ac_fn_c_check_header_mongrel "$LINENO" "history.h" "ac_cv_header_history_h" "$ac_includes_default"
14020 if test "x$ac_cv_header_history_h" = xyes; then :
14021 cat >>confdefs.h <<_ACEOF
14022 #define HAVE_HISTORY_H 1
14023 _ACEOF
14025 else
14026 for ac_header in readline/history.h
14027 do :
14028 ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default"
14029 if test "x$ac_cv_header_readline_history_h" = xyes; then :
14030 cat >>confdefs.h <<_ACEOF
14031 #define HAVE_READLINE_HISTORY_H 1
14032 _ACEOF
14036 done
14040 done
14044 done
14048 if test "$with_zlib" = yes; then
14049 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
14050 if test "x$ac_cv_header_zlib_h" = xyes; then :
14052 else
14053 as_fn_error $? "zlib header not found
14054 If you have zlib already installed, see config.log for details on the
14055 failure. It is possible the compiler isn't looking in the proper directory.
14056 Use --without-zlib to disable zlib support." "$LINENO" 5
14062 if test -z "$LZ4"; then
14063 for ac_prog in lz4
14065 # Extract the first word of "$ac_prog", so it can be a program name with args.
14066 set dummy $ac_prog; ac_word=$2
14067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14068 $as_echo_n "checking for $ac_word... " >&6; }
14069 if ${ac_cv_path_LZ4+:} false; then :
14070 $as_echo_n "(cached) " >&6
14071 else
14072 case $LZ4 in
14073 [\\/]* | ?:[\\/]*)
14074 ac_cv_path_LZ4="$LZ4" # Let the user override the test with a path.
14077 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14078 for as_dir in $PATH
14080 IFS=$as_save_IFS
14081 test -z "$as_dir" && as_dir=.
14082 for ac_exec_ext in '' $ac_executable_extensions; do
14083 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14084 ac_cv_path_LZ4="$as_dir/$ac_word$ac_exec_ext"
14085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14086 break 2
14088 done
14089 done
14090 IFS=$as_save_IFS
14093 esac
14095 LZ4=$ac_cv_path_LZ4
14096 if test -n "$LZ4"; then
14097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
14098 $as_echo "$LZ4" >&6; }
14099 else
14100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14101 $as_echo "no" >&6; }
14105 test -n "$LZ4" && break
14106 done
14108 else
14109 # Report the value of LZ4 in configure's output in all cases.
14110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LZ4" >&5
14111 $as_echo_n "checking for LZ4... " >&6; }
14112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LZ4" >&5
14113 $as_echo "$LZ4" >&6; }
14116 if test "$with_lz4" = yes; then
14117 ac_fn_c_check_header_mongrel "$LINENO" "lz4.h" "ac_cv_header_lz4_h" "$ac_includes_default"
14118 if test "x$ac_cv_header_lz4_h" = xyes; then :
14120 else
14121 as_fn_error $? "lz4.h header file is required for LZ4" "$LINENO" 5
14127 if test -z "$ZSTD"; then
14128 for ac_prog in zstd
14130 # Extract the first word of "$ac_prog", so it can be a program name with args.
14131 set dummy $ac_prog; ac_word=$2
14132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14133 $as_echo_n "checking for $ac_word... " >&6; }
14134 if ${ac_cv_path_ZSTD+:} false; then :
14135 $as_echo_n "(cached) " >&6
14136 else
14137 case $ZSTD in
14138 [\\/]* | ?:[\\/]*)
14139 ac_cv_path_ZSTD="$ZSTD" # Let the user override the test with a path.
14142 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14143 for as_dir in $PATH
14145 IFS=$as_save_IFS
14146 test -z "$as_dir" && as_dir=.
14147 for ac_exec_ext in '' $ac_executable_extensions; do
14148 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14149 ac_cv_path_ZSTD="$as_dir/$ac_word$ac_exec_ext"
14150 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14151 break 2
14153 done
14154 done
14155 IFS=$as_save_IFS
14158 esac
14160 ZSTD=$ac_cv_path_ZSTD
14161 if test -n "$ZSTD"; then
14162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
14163 $as_echo "$ZSTD" >&6; }
14164 else
14165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14166 $as_echo "no" >&6; }
14170 test -n "$ZSTD" && break
14171 done
14173 else
14174 # Report the value of ZSTD in configure's output in all cases.
14175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZSTD" >&5
14176 $as_echo_n "checking for ZSTD... " >&6; }
14177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZSTD" >&5
14178 $as_echo "$ZSTD" >&6; }
14181 if test "$with_zstd" = yes; then
14182 ac_fn_c_check_header_mongrel "$LINENO" "zstd.h" "ac_cv_header_zstd_h" "$ac_includes_default"
14183 if test "x$ac_cv_header_zstd_h" = xyes; then :
14185 else
14186 as_fn_error $? "zstd.h header file is required for ZSTD" "$LINENO" 5
14192 if test "$with_gssapi" = yes ; then
14193 for ac_header in gssapi/gssapi.h
14194 do :
14195 ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default"
14196 if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then :
14197 cat >>confdefs.h <<_ACEOF
14198 #define HAVE_GSSAPI_GSSAPI_H 1
14199 _ACEOF
14201 else
14202 for ac_header in gssapi.h
14203 do :
14204 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
14205 if test "x$ac_cv_header_gssapi_h" = xyes; then :
14206 cat >>confdefs.h <<_ACEOF
14207 #define HAVE_GSSAPI_H 1
14208 _ACEOF
14210 else
14211 as_fn_error $? "gssapi.h header file is required for GSSAPI" "$LINENO" 5
14214 done
14218 done
14222 if test "$with_ssl" = openssl ; then
14223 ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
14224 if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
14226 else
14227 as_fn_error $? "header file <openssl/ssl.h> is required for OpenSSL" "$LINENO" 5
14231 ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default"
14232 if test "x$ac_cv_header_openssl_err_h" = xyes; then :
14234 else
14235 as_fn_error $? "header file <openssl/err.h> is required for OpenSSL" "$LINENO" 5
14241 if test "$with_pam" = yes ; then
14242 for ac_header in security/pam_appl.h
14243 do :
14244 ac_fn_c_check_header_mongrel "$LINENO" "security/pam_appl.h" "ac_cv_header_security_pam_appl_h" "$ac_includes_default"
14245 if test "x$ac_cv_header_security_pam_appl_h" = xyes; then :
14246 cat >>confdefs.h <<_ACEOF
14247 #define HAVE_SECURITY_PAM_APPL_H 1
14248 _ACEOF
14250 else
14251 for ac_header in pam/pam_appl.h
14252 do :
14253 ac_fn_c_check_header_mongrel "$LINENO" "pam/pam_appl.h" "ac_cv_header_pam_pam_appl_h" "$ac_includes_default"
14254 if test "x$ac_cv_header_pam_pam_appl_h" = xyes; then :
14255 cat >>confdefs.h <<_ACEOF
14256 #define HAVE_PAM_PAM_APPL_H 1
14257 _ACEOF
14259 else
14260 as_fn_error $? "header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM." "$LINENO" 5
14263 done
14267 done
14271 if test "$with_bsd_auth" = yes ; then
14272 ac_fn_c_check_header_mongrel "$LINENO" "bsd_auth.h" "ac_cv_header_bsd_auth_h" "$ac_includes_default"
14273 if test "x$ac_cv_header_bsd_auth_h" = xyes; then :
14275 else
14276 as_fn_error $? "header file <bsd_auth.h> is required for BSD Authentication support" "$LINENO" 5
14282 if test "$with_systemd" = yes ; then
14283 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default"
14284 if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then :
14286 else
14287 as_fn_error $? "header file <systemd/sd-daemon.h> is required for systemd support" "$LINENO" 5
14293 if test "$with_libxml" = yes ; then
14294 ac_fn_c_check_header_mongrel "$LINENO" "libxml/parser.h" "ac_cv_header_libxml_parser_h" "$ac_includes_default"
14295 if test "x$ac_cv_header_libxml_parser_h" = xyes; then :
14297 else
14298 as_fn_error $? "header file <libxml/parser.h> is required for XML support" "$LINENO" 5
14304 if test "$with_libxslt" = yes ; then
14305 ac_fn_c_check_header_mongrel "$LINENO" "libxslt/xslt.h" "ac_cv_header_libxslt_xslt_h" "$ac_includes_default"
14306 if test "x$ac_cv_header_libxslt_xslt_h" = xyes; then :
14308 else
14309 as_fn_error $? "header file <libxslt/xslt.h> is required for XSLT support" "$LINENO" 5
14315 if test "$with_ldap" = yes ; then
14316 if test "$PORTNAME" != "win32"; then
14317 for ac_header in ldap.h
14318 do :
14319 ac_fn_c_check_header_mongrel "$LINENO" "ldap.h" "ac_cv_header_ldap_h" "$ac_includes_default"
14320 if test "x$ac_cv_header_ldap_h" = xyes; then :
14321 cat >>confdefs.h <<_ACEOF
14322 #define HAVE_LDAP_H 1
14323 _ACEOF
14325 else
14326 as_fn_error $? "header file <ldap.h> is required for LDAP" "$LINENO" 5
14329 done
14331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compatible LDAP implementation" >&5
14332 $as_echo_n "checking for compatible LDAP implementation... " >&6; }
14333 if ${pgac_cv_ldap_safe+:} false; then :
14334 $as_echo_n "(cached) " >&6
14335 else
14336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14337 /* end confdefs.h. */
14338 #include <ldap.h>
14339 #if !defined(LDAP_VENDOR_VERSION) || \
14340 (defined(LDAP_API_FEATURE_X_OPENLDAP) && \
14341 LDAP_VENDOR_VERSION >= 20424 && LDAP_VENDOR_VERSION <= 20431)
14342 choke me
14343 #endif
14345 main ()
14349 return 0;
14351 _ACEOF
14352 if ac_fn_c_try_compile "$LINENO"; then :
14353 pgac_cv_ldap_safe=yes
14354 else
14355 pgac_cv_ldap_safe=no
14357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_ldap_safe" >&5
14360 $as_echo "$pgac_cv_ldap_safe" >&6; }
14362 if test "$pgac_cv_ldap_safe" != yes; then
14363 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
14364 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
14365 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
14366 *** also uses LDAP will crash on exit." >&5
14367 $as_echo "$as_me: WARNING:
14368 *** With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, each backend
14369 *** process that loads libpq (via WAL receiver, dblink, or postgres_fdw) and
14370 *** also uses LDAP will crash on exit." >&2;}
14372 else
14373 for ac_header in winldap.h
14374 do :
14375 ac_fn_c_check_header_compile "$LINENO" "winldap.h" "ac_cv_header_winldap_h" "$ac_includes_default
14376 #include <windows.h>
14379 if test "x$ac_cv_header_winldap_h" = xyes; then :
14380 cat >>confdefs.h <<_ACEOF
14381 #define HAVE_WINLDAP_H 1
14382 _ACEOF
14384 else
14385 as_fn_error $? "header file <winldap.h> is required for LDAP" "$LINENO" 5
14388 done
14393 if test "$with_bonjour" = yes ; then
14394 ac_fn_c_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default"
14395 if test "x$ac_cv_header_dns_sd_h" = xyes; then :
14397 else
14398 as_fn_error $? "header file <dns_sd.h> is required for Bonjour" "$LINENO" 5
14404 # for contrib/uuid-ossp
14405 if test "$with_uuid" = bsd ; then
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_to_string" >/dev/null 2>&1; then :
14421 else
14422 as_fn_error $? "header file <uuid.h> does not match BSD UUID library" "$LINENO" 5
14424 rm -f conftest*
14426 else
14427 as_fn_error $? "header file <uuid.h> is required for BSD UUID" "$LINENO" 5
14430 done
14432 elif test "$with_uuid" = e2fs ; then
14433 for ac_header in uuid/uuid.h
14434 do :
14435 ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
14436 if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
14437 cat >>confdefs.h <<_ACEOF
14438 #define HAVE_UUID_UUID_H 1
14439 _ACEOF
14440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14441 /* end confdefs.h. */
14442 #include <uuid/uuid.h>
14444 _ACEOF
14445 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14446 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14448 else
14449 as_fn_error $? "header file <uuid/uuid.h> does not match E2FS UUID library" "$LINENO" 5
14451 rm -f conftest*
14453 else
14454 for ac_header in uuid.h
14455 do :
14456 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14457 if test "x$ac_cv_header_uuid_h" = xyes; then :
14458 cat >>confdefs.h <<_ACEOF
14459 #define HAVE_UUID_H 1
14460 _ACEOF
14461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14462 /* end confdefs.h. */
14463 #include <uuid.h>
14465 _ACEOF
14466 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14467 $EGREP "uuid_generate" >/dev/null 2>&1; then :
14469 else
14470 as_fn_error $? "header file <uuid.h> does not match E2FS UUID library" "$LINENO" 5
14472 rm -f conftest*
14474 else
14475 as_fn_error $? "header file <uuid/uuid.h> or <uuid.h> is required for E2FS UUID" "$LINENO" 5
14478 done
14482 done
14484 elif test "$with_uuid" = ossp ; then
14485 for ac_header in ossp/uuid.h
14486 do :
14487 ac_fn_c_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default"
14488 if test "x$ac_cv_header_ossp_uuid_h" = xyes; then :
14489 cat >>confdefs.h <<_ACEOF
14490 #define HAVE_OSSP_UUID_H 1
14491 _ACEOF
14492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14493 /* end confdefs.h. */
14494 #include <ossp/uuid.h>
14496 _ACEOF
14497 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14498 $EGREP "uuid_export" >/dev/null 2>&1; then :
14500 else
14501 as_fn_error $? "header file <ossp/uuid.h> does not match OSSP UUID library" "$LINENO" 5
14503 rm -f conftest*
14505 else
14506 for ac_header in uuid.h
14507 do :
14508 ac_fn_c_check_header_mongrel "$LINENO" "uuid.h" "ac_cv_header_uuid_h" "$ac_includes_default"
14509 if test "x$ac_cv_header_uuid_h" = xyes; then :
14510 cat >>confdefs.h <<_ACEOF
14511 #define HAVE_UUID_H 1
14512 _ACEOF
14513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14514 /* end confdefs.h. */
14515 #include <uuid.h>
14517 _ACEOF
14518 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14519 $EGREP "uuid_export" >/dev/null 2>&1; then :
14521 else
14522 as_fn_error $? "header file <uuid.h> does not match OSSP UUID library" "$LINENO" 5
14524 rm -f conftest*
14526 else
14527 as_fn_error $? "header file <ossp/uuid.h> or <uuid.h> is required for OSSP UUID" "$LINENO" 5
14530 done
14534 done
14538 if test "$PORTNAME" = "win32" ; then
14539 for ac_header in crtdefs.h
14540 do :
14541 ac_fn_c_check_header_mongrel "$LINENO" "crtdefs.h" "ac_cv_header_crtdefs_h" "$ac_includes_default"
14542 if test "x$ac_cv_header_crtdefs_h" = xyes; then :
14543 cat >>confdefs.h <<_ACEOF
14544 #define HAVE_CRTDEFS_H 1
14545 _ACEOF
14549 done
14554 ## Types, structures, compiler characteristics
14557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14558 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
14559 if ${ac_cv_c_bigendian+:} false; then :
14560 $as_echo_n "(cached) " >&6
14561 else
14562 ac_cv_c_bigendian=unknown
14563 # See if we're dealing with a universal compiler.
14564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14565 /* end confdefs.h. */
14566 #ifndef __APPLE_CC__
14567 not a universal capable compiler
14568 #endif
14569 typedef int dummy;
14571 _ACEOF
14572 if ac_fn_c_try_compile "$LINENO"; then :
14574 # Check for potential -arch flags. It is not universal unless
14575 # there are at least two -arch flags with different values.
14576 ac_arch=
14577 ac_prev=
14578 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14579 if test -n "$ac_prev"; then
14580 case $ac_word in
14581 i?86 | x86_64 | ppc | ppc64)
14582 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14583 ac_arch=$ac_word
14584 else
14585 ac_cv_c_bigendian=universal
14586 break
14589 esac
14590 ac_prev=
14591 elif test "x$ac_word" = "x-arch"; then
14592 ac_prev=arch
14594 done
14596 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14597 if test $ac_cv_c_bigendian = unknown; then
14598 # See if sys/param.h defines the BYTE_ORDER macro.
14599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14600 /* end confdefs.h. */
14601 #include <sys/types.h>
14602 #include <sys/param.h>
14605 main ()
14607 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14608 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14609 && LITTLE_ENDIAN)
14610 bogus endian macros
14611 #endif
14614 return 0;
14616 _ACEOF
14617 if ac_fn_c_try_compile "$LINENO"; then :
14618 # It does; now see whether it defined to BIG_ENDIAN or not.
14619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14620 /* end confdefs.h. */
14621 #include <sys/types.h>
14622 #include <sys/param.h>
14625 main ()
14627 #if BYTE_ORDER != BIG_ENDIAN
14628 not big endian
14629 #endif
14632 return 0;
14634 _ACEOF
14635 if ac_fn_c_try_compile "$LINENO"; then :
14636 ac_cv_c_bigendian=yes
14637 else
14638 ac_cv_c_bigendian=no
14640 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14644 if test $ac_cv_c_bigendian = unknown; then
14645 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14647 /* end confdefs.h. */
14648 #include <limits.h>
14651 main ()
14653 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14654 bogus endian macros
14655 #endif
14658 return 0;
14660 _ACEOF
14661 if ac_fn_c_try_compile "$LINENO"; then :
14662 # It does; now see whether it defined to _BIG_ENDIAN or not.
14663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14664 /* end confdefs.h. */
14665 #include <limits.h>
14668 main ()
14670 #ifndef _BIG_ENDIAN
14671 not big endian
14672 #endif
14675 return 0;
14677 _ACEOF
14678 if ac_fn_c_try_compile "$LINENO"; then :
14679 ac_cv_c_bigendian=yes
14680 else
14681 ac_cv_c_bigendian=no
14683 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14685 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14687 if test $ac_cv_c_bigendian = unknown; then
14688 # Compile a test program.
14689 if test "$cross_compiling" = yes; then :
14690 # Try to guess by grepping values from an object file.
14691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14692 /* end confdefs.h. */
14693 short int ascii_mm[] =
14694 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14695 short int ascii_ii[] =
14696 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14697 int use_ascii (int i) {
14698 return ascii_mm[i] + ascii_ii[i];
14700 short int ebcdic_ii[] =
14701 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14702 short int ebcdic_mm[] =
14703 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14704 int use_ebcdic (int i) {
14705 return ebcdic_mm[i] + ebcdic_ii[i];
14707 extern int foo;
14710 main ()
14712 return use_ascii (foo) == use_ebcdic (foo);
14714 return 0;
14716 _ACEOF
14717 if ac_fn_c_try_compile "$LINENO"; then :
14718 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14719 ac_cv_c_bigendian=yes
14721 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14722 if test "$ac_cv_c_bigendian" = unknown; then
14723 ac_cv_c_bigendian=no
14724 else
14725 # finding both strings is unlikely to happen, but who knows?
14726 ac_cv_c_bigendian=unknown
14730 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14731 else
14732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14733 /* end confdefs.h. */
14734 $ac_includes_default
14736 main ()
14739 /* Are we little or big endian? From Harbison&Steele. */
14740 union
14742 long int l;
14743 char c[sizeof (long int)];
14744 } u;
14745 u.l = 1;
14746 return u.c[sizeof (long int) - 1] == 1;
14749 return 0;
14751 _ACEOF
14752 if ac_fn_c_try_run "$LINENO"; then :
14753 ac_cv_c_bigendian=no
14754 else
14755 ac_cv_c_bigendian=yes
14757 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14758 conftest.$ac_objext conftest.beam conftest.$ac_ext
14763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14764 $as_echo "$ac_cv_c_bigendian" >&6; }
14765 case $ac_cv_c_bigendian in #(
14766 yes)
14767 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14768 ;; #(
14770 ;; #(
14771 universal)
14773 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14775 ;; #(
14777 as_fn_error $? "unknown endianness
14778 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14779 esac
14781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
14782 $as_echo_n "checking for inline... " >&6; }
14783 if ${ac_cv_c_inline+:} false; then :
14784 $as_echo_n "(cached) " >&6
14785 else
14786 ac_cv_c_inline=no
14787 for ac_kw in inline __inline__ __inline; do
14788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14789 /* end confdefs.h. */
14790 #ifndef __cplusplus
14791 typedef int foo_t;
14792 static $ac_kw foo_t static_foo () {return 0; }
14793 $ac_kw foo_t foo () {return 0; }
14794 #endif
14796 _ACEOF
14797 if ac_fn_c_try_compile "$LINENO"; then :
14798 ac_cv_c_inline=$ac_kw
14800 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14801 test "$ac_cv_c_inline" != no && break
14802 done
14805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
14806 $as_echo "$ac_cv_c_inline" >&6; }
14808 case $ac_cv_c_inline in
14809 inline | yes) ;;
14811 case $ac_cv_c_inline in
14812 no) ac_val=;;
14813 *) ac_val=$ac_cv_c_inline;;
14814 esac
14815 cat >>confdefs.h <<_ACEOF
14816 #ifndef __cplusplus
14817 #define inline $ac_val
14818 #endif
14819 _ACEOF
14821 esac
14823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf format archetype" >&5
14824 $as_echo_n "checking for printf format archetype... " >&6; }
14825 if ${pgac_cv_printf_archetype+:} false; then :
14826 $as_echo_n "(cached) " >&6
14827 else
14828 pgac_cv_printf_archetype=gnu_printf
14829 ac_save_c_werror_flag=$ac_c_werror_flag
14830 ac_c_werror_flag=yes
14831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14832 /* end confdefs.h. */
14833 extern void pgac_write(int ignore, const char *fmt,...)
14834 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14836 main ()
14838 pgac_write(0, "error %s: %m", "foo");
14840 return 0;
14842 _ACEOF
14843 if ac_fn_c_try_compile "$LINENO"; then :
14844 ac_archetype_ok=yes
14845 else
14846 ac_archetype_ok=no
14848 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14849 ac_c_werror_flag=$ac_save_c_werror_flag
14851 if [ "$ac_archetype_ok" = no ]; then
14852 pgac_cv_printf_archetype=__syslog__
14853 ac_save_c_werror_flag=$ac_c_werror_flag
14854 ac_c_werror_flag=yes
14855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14856 /* end confdefs.h. */
14857 extern void pgac_write(int ignore, const char *fmt,...)
14858 __attribute__((format($pgac_cv_printf_archetype, 2, 3)));
14860 main ()
14862 pgac_write(0, "error %s: %m", "foo");
14864 return 0;
14866 _ACEOF
14867 if ac_fn_c_try_compile "$LINENO"; then :
14868 ac_archetype_ok=yes
14869 else
14870 ac_archetype_ok=no
14872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14873 ac_c_werror_flag=$ac_save_c_werror_flag
14875 if [ "$ac_archetype_ok" = no ]; then
14876 pgac_cv_printf_archetype=printf
14880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_printf_archetype" >&5
14881 $as_echo "$pgac_cv_printf_archetype" >&6; }
14883 cat >>confdefs.h <<_ACEOF
14884 #define PG_PRINTF_ATTRIBUTE $pgac_cv_printf_archetype
14885 _ACEOF
14888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __func__" >&5
14889 $as_echo_n "checking for __func__... " >&6; }
14890 if ${pgac_cv_funcname_func_support+:} false; then :
14891 $as_echo_n "(cached) " >&6
14892 else
14893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14894 /* end confdefs.h. */
14895 #include <stdio.h>
14897 main ()
14899 printf("%s\n", __func__);
14901 return 0;
14903 _ACEOF
14904 if ac_fn_c_try_compile "$LINENO"; then :
14905 pgac_cv_funcname_func_support=yes
14906 else
14907 pgac_cv_funcname_func_support=no
14909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_func_support" >&5
14912 $as_echo "$pgac_cv_funcname_func_support" >&6; }
14913 if test x"$pgac_cv_funcname_func_support" = xyes ; then
14915 $as_echo "#define HAVE_FUNCNAME__FUNC 1" >>confdefs.h
14917 else
14918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __FUNCTION__" >&5
14919 $as_echo_n "checking for __FUNCTION__... " >&6; }
14920 if ${pgac_cv_funcname_function_support+:} false; then :
14921 $as_echo_n "(cached) " >&6
14922 else
14923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14924 /* end confdefs.h. */
14925 #include <stdio.h>
14927 main ()
14929 printf("%s\n", __FUNCTION__);
14931 return 0;
14933 _ACEOF
14934 if ac_fn_c_try_compile "$LINENO"; then :
14935 pgac_cv_funcname_function_support=yes
14936 else
14937 pgac_cv_funcname_function_support=no
14939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_funcname_function_support" >&5
14942 $as_echo "$pgac_cv_funcname_function_support" >&6; }
14943 if test x"$pgac_cv_funcname_function_support" = xyes ; then
14945 $as_echo "#define HAVE_FUNCNAME__FUNCTION 1" >>confdefs.h
14949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Static_assert" >&5
14950 $as_echo_n "checking for _Static_assert... " >&6; }
14951 if ${pgac_cv__static_assert+:} false; then :
14952 $as_echo_n "(cached) " >&6
14953 else
14954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14955 /* end confdefs.h. */
14958 main ()
14960 ({ _Static_assert(1, "foo"); })
14962 return 0;
14964 _ACEOF
14965 if ac_fn_c_try_link "$LINENO"; then :
14966 pgac_cv__static_assert=yes
14967 else
14968 pgac_cv__static_assert=no
14970 rm -f core conftest.err conftest.$ac_objext \
14971 conftest$ac_exeext conftest.$ac_ext
14973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__static_assert" >&5
14974 $as_echo "$pgac_cv__static_assert" >&6; }
14975 if test x"$pgac_cv__static_assert" = xyes ; then
14977 $as_echo "#define HAVE__STATIC_ASSERT 1" >>confdefs.h
14980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for typeof" >&5
14981 $as_echo_n "checking for typeof... " >&6; }
14982 if ${pgac_cv_c_typeof+:} false; then :
14983 $as_echo_n "(cached) " >&6
14984 else
14985 pgac_cv_c_typeof=no
14986 for pgac_kw in typeof __typeof__ decltype; do
14987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14988 /* end confdefs.h. */
14991 main ()
14993 int x = 0;
14994 $pgac_kw(x) y;
14995 y = x;
14996 return y;
14998 return 0;
15000 _ACEOF
15001 if ac_fn_c_try_compile "$LINENO"; then :
15002 pgac_cv_c_typeof=$pgac_kw
15004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15005 test "$pgac_cv_c_typeof" != no && break
15006 done
15008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_c_typeof" >&5
15009 $as_echo "$pgac_cv_c_typeof" >&6; }
15010 if test "$pgac_cv_c_typeof" != no; then
15012 $as_echo "#define HAVE_TYPEOF 1" >>confdefs.h
15014 if test "$pgac_cv_c_typeof" != typeof; then
15016 cat >>confdefs.h <<_ACEOF
15017 #define typeof $pgac_cv_c_typeof
15018 _ACEOF
15022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_types_compatible_p" >&5
15023 $as_echo_n "checking for __builtin_types_compatible_p... " >&6; }
15024 if ${pgac_cv__types_compatible+:} false; then :
15025 $as_echo_n "(cached) " >&6
15026 else
15027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15028 /* end confdefs.h. */
15031 main ()
15033 int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)];
15035 return 0;
15037 _ACEOF
15038 if ac_fn_c_try_compile "$LINENO"; then :
15039 pgac_cv__types_compatible=yes
15040 else
15041 pgac_cv__types_compatible=no
15043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__types_compatible" >&5
15046 $as_echo "$pgac_cv__types_compatible" >&6; }
15047 if test x"$pgac_cv__types_compatible" = xyes ; then
15049 $as_echo "#define HAVE__BUILTIN_TYPES_COMPATIBLE_P 1" >>confdefs.h
15052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_constant_p" >&5
15053 $as_echo_n "checking for __builtin_constant_p... " >&6; }
15054 if ${pgac_cv__builtin_constant_p+:} false; then :
15055 $as_echo_n "(cached) " >&6
15056 else
15057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15058 /* end confdefs.h. */
15059 static int x;
15060 static int y[__builtin_constant_p(x) ? x : 1];
15061 static int z[__builtin_constant_p("string literal") ? 1 : x];
15064 _ACEOF
15065 if ac_fn_c_try_compile "$LINENO"; then :
15066 pgac_cv__builtin_constant_p=yes
15067 else
15068 pgac_cv__builtin_constant_p=no
15070 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_constant_p" >&5
15073 $as_echo "$pgac_cv__builtin_constant_p" >&6; }
15074 if test x"$pgac_cv__builtin_constant_p" = xyes ; then
15076 $as_echo "#define HAVE__BUILTIN_CONSTANT_P 1" >>confdefs.h
15079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_unreachable" >&5
15080 $as_echo_n "checking for __builtin_unreachable... " >&6; }
15081 if ${pgac_cv__builtin_unreachable+:} false; then :
15082 $as_echo_n "(cached) " >&6
15083 else
15084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15085 /* end confdefs.h. */
15088 main ()
15090 __builtin_unreachable();
15092 return 0;
15094 _ACEOF
15095 if ac_fn_c_try_link "$LINENO"; then :
15096 pgac_cv__builtin_unreachable=yes
15097 else
15098 pgac_cv__builtin_unreachable=no
15100 rm -f core conftest.err conftest.$ac_objext \
15101 conftest$ac_exeext conftest.$ac_ext
15103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_unreachable" >&5
15104 $as_echo "$pgac_cv__builtin_unreachable" >&6; }
15105 if test x"$pgac_cv__builtin_unreachable" = xyes ; then
15107 $as_echo "#define HAVE__BUILTIN_UNREACHABLE 1" >>confdefs.h
15110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for computed goto support" >&5
15111 $as_echo_n "checking for computed goto support... " >&6; }
15112 if ${pgac_cv_computed_goto+:} false; then :
15113 $as_echo_n "(cached) " >&6
15114 else
15115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15116 /* end confdefs.h. */
15119 main ()
15121 void *labeladdrs[] = {&&my_label};
15122 goto *labeladdrs[0];
15123 my_label:
15124 return 1;
15127 return 0;
15129 _ACEOF
15130 if ac_fn_c_try_compile "$LINENO"; then :
15131 pgac_cv_computed_goto=yes
15132 else
15133 pgac_cv_computed_goto=no
15135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_computed_goto" >&5
15138 $as_echo "$pgac_cv_computed_goto" >&6; }
15139 if test x"$pgac_cv_computed_goto" = xyes ; then
15141 $as_echo "#define HAVE_COMPUTED_GOTO 1" >>confdefs.h
15144 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
15145 #include <time.h>
15148 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
15150 cat >>confdefs.h <<_ACEOF
15151 #define HAVE_STRUCT_TM_TM_ZONE 1
15152 _ACEOF
15158 ac_fn_c_check_type "$LINENO" "union semun" "ac_cv_type_union_semun" "#include <sys/types.h>
15159 #ifdef HAVE_SYS_IPC_H
15160 #include <sys/ipc.h>
15161 #endif
15162 #ifdef HAVE_SYS_SEM_H
15163 #include <sys/sem.h>
15164 #endif
15166 if test "x$ac_cv_type_union_semun" = xyes; then :
15168 cat >>confdefs.h <<_ACEOF
15169 #define HAVE_UNION_SEMUN 1
15170 _ACEOF
15175 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/socket.h>
15177 if test "x$ac_cv_type_socklen_t" = xyes; then :
15179 cat >>confdefs.h <<_ACEOF
15180 #define HAVE_SOCKLEN_T 1
15181 _ACEOF
15186 ac_fn_c_check_type "$LINENO" "struct sockaddr_un" "ac_cv_type_struct_sockaddr_un" "#include <sys/types.h>
15187 #ifdef HAVE_SYS_UN_H
15188 #include <sys/un.h>
15189 #endif
15192 if test "x$ac_cv_type_struct_sockaddr_un" = xyes; then :
15194 cat >>confdefs.h <<_ACEOF
15195 #define HAVE_STRUCT_SOCKADDR_UN 1
15196 _ACEOF
15201 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "#include <sys/types.h>
15202 #include <sys/socket.h>
15205 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
15207 cat >>confdefs.h <<_ACEOF
15208 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
15209 _ACEOF
15214 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
15215 #include <sys/socket.h>
15218 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then :
15220 cat >>confdefs.h <<_ACEOF
15221 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
15222 _ACEOF
15226 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_family" "ac_cv_member_struct_sockaddr_storage___ss_family" "#include <sys/types.h>
15227 #include <sys/socket.h>
15230 if test "x$ac_cv_member_struct_sockaddr_storage___ss_family" = xyes; then :
15232 cat >>confdefs.h <<_ACEOF
15233 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY 1
15234 _ACEOF
15238 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_len" "ac_cv_member_struct_sockaddr_storage_ss_len" "#include <sys/types.h>
15239 #include <sys/socket.h>
15242 if test "x$ac_cv_member_struct_sockaddr_storage_ss_len" = xyes; then :
15244 cat >>confdefs.h <<_ACEOF
15245 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN 1
15246 _ACEOF
15250 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "__ss_len" "ac_cv_member_struct_sockaddr_storage___ss_len" "#include <sys/types.h>
15251 #include <sys/socket.h>
15254 if test "x$ac_cv_member_struct_sockaddr_storage___ss_len" = xyes; then :
15256 cat >>confdefs.h <<_ACEOF
15257 #define HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN 1
15258 _ACEOF
15262 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/types.h>
15263 #include <sys/socket.h>
15266 if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
15268 cat >>confdefs.h <<_ACEOF
15269 #define HAVE_STRUCT_SOCKADDR_SA_LEN 1
15270 _ACEOF
15275 ac_fn_c_check_type "$LINENO" "struct addrinfo" "ac_cv_type_struct_addrinfo" "#include <sys/types.h>
15276 #include <sys/socket.h>
15277 #include <netdb.h>
15280 if test "x$ac_cv_type_struct_addrinfo" = xyes; then :
15282 cat >>confdefs.h <<_ACEOF
15283 #define HAVE_STRUCT_ADDRINFO 1
15284 _ACEOF
15290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale_t" >&5
15291 $as_echo_n "checking for locale_t... " >&6; }
15292 if ${pgac_cv_type_locale_t+:} false; then :
15293 $as_echo_n "(cached) " >&6
15294 else
15295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15296 /* end confdefs.h. */
15297 #include <locale.h>
15298 locale_t x;
15300 main ()
15304 return 0;
15306 _ACEOF
15307 if ac_fn_c_try_compile "$LINENO"; then :
15308 pgac_cv_type_locale_t=yes
15309 else
15310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15311 /* end confdefs.h. */
15312 #include <xlocale.h>
15313 locale_t x;
15315 main ()
15319 return 0;
15321 _ACEOF
15322 if ac_fn_c_try_compile "$LINENO"; then :
15323 pgac_cv_type_locale_t='yes (in xlocale.h)'
15324 else
15325 pgac_cv_type_locale_t=no
15327 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15329 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_locale_t" >&5
15332 $as_echo "$pgac_cv_type_locale_t" >&6; }
15333 if test "$pgac_cv_type_locale_t" != no; then
15335 $as_echo "#define HAVE_LOCALE_T 1" >>confdefs.h
15338 if test "$pgac_cv_type_locale_t" = 'yes (in xlocale.h)'; then
15340 $as_echo "#define LOCALE_T_IN_XLOCALE 1" >>confdefs.h
15344 # MSVC doesn't cope well with defining restrict to __restrict, the
15345 # spelling it understands, because it conflicts with
15346 # __declspec(restrict). Therefore we define pg_restrict to the
15347 # appropriate definition, which presumably won't conflict.
15349 # Allow platforms with buggy compilers to force restrict to not be
15350 # used by setting $FORCE_DISABLE_RESTRICT=yes in the relevant
15351 # template.
15352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
15353 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
15354 if ${ac_cv_c_restrict+:} false; then :
15355 $as_echo_n "(cached) " >&6
15356 else
15357 ac_cv_c_restrict=no
15358 # The order here caters to the fact that C++ does not require restrict.
15359 for ac_kw in __restrict __restrict__ _Restrict restrict; do
15360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15361 /* end confdefs.h. */
15362 typedef int * int_ptr;
15363 int foo (int_ptr $ac_kw ip) {
15364 return ip[0];
15367 main ()
15369 int s[1];
15370 int * $ac_kw t = s;
15371 t[0] = 0;
15372 return foo(t)
15374 return 0;
15376 _ACEOF
15377 if ac_fn_c_try_compile "$LINENO"; then :
15378 ac_cv_c_restrict=$ac_kw
15380 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15381 test "$ac_cv_c_restrict" != no && break
15382 done
15385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
15386 $as_echo "$ac_cv_c_restrict" >&6; }
15388 case $ac_cv_c_restrict in
15389 restrict) ;;
15390 no) $as_echo "#define restrict /**/" >>confdefs.h
15392 *) cat >>confdefs.h <<_ACEOF
15393 #define restrict $ac_cv_c_restrict
15394 _ACEOF
15396 esac
15398 if test "$ac_cv_c_restrict" = "no" -o "x$FORCE_DISABLE_RESTRICT" = "xyes"; then
15399 pg_restrict=""
15400 else
15401 pg_restrict="$ac_cv_c_restrict"
15404 cat >>confdefs.h <<_ACEOF
15405 #define pg_restrict $pg_restrict
15406 _ACEOF
15409 ac_fn_c_check_type "$LINENO" "struct cmsgcred" "ac_cv_type_struct_cmsgcred" "#include <sys/socket.h>
15410 #include <sys/param.h>
15411 #ifdef HAVE_SYS_UCRED_H
15412 #include <sys/ucred.h>
15413 #endif
15415 if test "x$ac_cv_type_struct_cmsgcred" = xyes; then :
15417 cat >>confdefs.h <<_ACEOF
15418 #define HAVE_STRUCT_CMSGCRED 1
15419 _ACEOF
15425 ac_fn_c_check_type "$LINENO" "struct option" "ac_cv_type_struct_option" "#ifdef HAVE_GETOPT_H
15426 #include <getopt.h>
15427 #endif
15429 if test "x$ac_cv_type_struct_option" = xyes; then :
15431 cat >>confdefs.h <<_ACEOF
15432 #define HAVE_STRUCT_OPTION 1
15433 _ACEOF
15439 if test "$with_zlib" = yes; then
15440 # Check that <zlib.h> defines z_streamp (versions before about 1.0.4
15441 # did not). While we could work around the lack of z_streamp, it
15442 # seems unwise to encourage people to use such old zlib versions...
15443 ac_fn_c_check_type "$LINENO" "z_streamp" "ac_cv_type_z_streamp" "#include <zlib.h>
15445 if test "x$ac_cv_type_z_streamp" = xyes; then :
15447 else
15448 as_fn_error $? "zlib version is too old
15449 Use --without-zlib to disable zlib support." "$LINENO" 5
15454 case $host_cpu in
15455 x86_64)
15456 # On x86_64, check if we can compile a popcntq instruction
15457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports x86_64 popcntq" >&5
15458 $as_echo_n "checking whether assembler supports x86_64 popcntq... " >&6; }
15459 if ${pgac_cv_have_x86_64_popcntq+:} false; then :
15460 $as_echo_n "(cached) " >&6
15461 else
15462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15463 /* end confdefs.h. */
15466 main ()
15468 long long x = 1; long long r;
15469 __asm__ __volatile__ (" popcntq %1,%0\n" : "=q"(r) : "rm"(x));
15471 return 0;
15473 _ACEOF
15474 if ac_fn_c_try_compile "$LINENO"; then :
15475 pgac_cv_have_x86_64_popcntq=yes
15476 else
15477 pgac_cv_have_x86_64_popcntq=no
15479 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_x86_64_popcntq" >&5
15482 $as_echo "$pgac_cv_have_x86_64_popcntq" >&6; }
15483 if test x"$pgac_cv_have_x86_64_popcntq" = xyes ; then
15485 $as_echo "#define HAVE_X86_64_POPCNTQ 1" >>confdefs.h
15489 ppc*|powerpc*)
15490 # On PPC, check if assembler supports LWARX instruction's mutex hint bit
15491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports lwarx hint bit" >&5
15492 $as_echo_n "checking whether assembler supports lwarx hint bit... " >&6; }
15493 if ${pgac_cv_have_ppc_mutex_hint+:} false; then :
15494 $as_echo_n "(cached) " >&6
15495 else
15496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15497 /* end confdefs.h. */
15500 main ()
15502 int a = 0; int *p = &a; int r;
15503 __asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));
15505 return 0;
15507 _ACEOF
15508 if ac_fn_c_try_compile "$LINENO"; then :
15509 pgac_cv_have_ppc_mutex_hint=yes
15510 else
15511 pgac_cv_have_ppc_mutex_hint=no
15513 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_ppc_mutex_hint" >&5
15516 $as_echo "$pgac_cv_have_ppc_mutex_hint" >&6; }
15517 if test x"$pgac_cv_have_ppc_mutex_hint" = xyes ; then
15519 $as_echo "#define HAVE_PPC_LWARX_MUTEX_HINT 1" >>confdefs.h
15522 # Check if compiler accepts "i"(x) when __builtin_constant_p(x).
15523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance" >&5
15524 $as_echo_n "checking whether __builtin_constant_p(x) implies \"i\"(x) acceptance... " >&6; }
15525 if ${pgac_cv_have_i_constraint__builtin_constant_p+:} false; then :
15526 $as_echo_n "(cached) " >&6
15527 else
15528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15529 /* end confdefs.h. */
15530 static inline int
15531 addi(int ra, int si)
15533 int res = 0;
15534 if (__builtin_constant_p(si))
15535 __asm__ __volatile__(
15536 " addi %0,%1,%2\n" : "=r"(res) : "b"(ra), "i"(si));
15537 return res;
15539 int test_adds(int x) { return addi(3, x) + addi(x, 5); }
15541 main ()
15545 return 0;
15547 _ACEOF
15548 if ac_fn_c_try_compile "$LINENO"; then :
15549 pgac_cv_have_i_constraint__builtin_constant_p=yes
15550 else
15551 pgac_cv_have_i_constraint__builtin_constant_p=no
15553 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_i_constraint__builtin_constant_p" >&5
15556 $as_echo "$pgac_cv_have_i_constraint__builtin_constant_p" >&6; }
15557 if test x"$pgac_cv_have_i_constraint__builtin_constant_p" = xyes ; then
15559 $as_echo "#define HAVE_I_CONSTRAINT__BUILTIN_CONSTANT_P 1" >>confdefs.h
15563 esac
15565 # Check largefile support. You might think this is a system service not a
15566 # compiler characteristic, but you'd be wrong. We must check this before
15567 # probing existence of related functions such as fseeko, since the largefile
15568 # defines can affect what is generated for that.
15569 if test "$PORTNAME" != "win32"; then
15570 # Check whether --enable-largefile was given.
15571 if test "${enable_largefile+set}" = set; then :
15572 enableval=$enable_largefile;
15575 if test "$enable_largefile" != no; then
15577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
15578 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
15579 if ${ac_cv_sys_largefile_CC+:} false; then :
15580 $as_echo_n "(cached) " >&6
15581 else
15582 ac_cv_sys_largefile_CC=no
15583 if test "$GCC" != yes; then
15584 ac_save_CC=$CC
15585 while :; do
15586 # IRIX 6.2 and later do not support large files by default,
15587 # so use the C compiler's -n32 option if that helps.
15588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15589 /* end confdefs.h. */
15590 #include <sys/types.h>
15591 /* Check that off_t can represent 2**63 - 1 correctly.
15592 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15593 since some C++ compilers masquerading as C compilers
15594 incorrectly reject 9223372036854775807. */
15595 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15596 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15597 && LARGE_OFF_T % 2147483647 == 1)
15598 ? 1 : -1];
15600 main ()
15604 return 0;
15606 _ACEOF
15607 if ac_fn_c_try_compile "$LINENO"; then :
15608 break
15610 rm -f core conftest.err conftest.$ac_objext
15611 CC="$CC -n32"
15612 if ac_fn_c_try_compile "$LINENO"; then :
15613 ac_cv_sys_largefile_CC=' -n32'; break
15615 rm -f core conftest.err conftest.$ac_objext
15616 break
15617 done
15618 CC=$ac_save_CC
15619 rm -f conftest.$ac_ext
15622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
15623 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
15624 if test "$ac_cv_sys_largefile_CC" != no; then
15625 CC=$CC$ac_cv_sys_largefile_CC
15628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
15629 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
15630 if ${ac_cv_sys_file_offset_bits+:} false; then :
15631 $as_echo_n "(cached) " >&6
15632 else
15633 while :; do
15634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15635 /* end confdefs.h. */
15636 #include <sys/types.h>
15637 /* Check that off_t can represent 2**63 - 1 correctly.
15638 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15639 since some C++ compilers masquerading as C compilers
15640 incorrectly reject 9223372036854775807. */
15641 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15642 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15643 && LARGE_OFF_T % 2147483647 == 1)
15644 ? 1 : -1];
15646 main ()
15650 return 0;
15652 _ACEOF
15653 if ac_fn_c_try_compile "$LINENO"; then :
15654 ac_cv_sys_file_offset_bits=no; break
15656 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15658 /* end confdefs.h. */
15659 #define _FILE_OFFSET_BITS 64
15660 #include <sys/types.h>
15661 /* Check that off_t can represent 2**63 - 1 correctly.
15662 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15663 since some C++ compilers masquerading as C compilers
15664 incorrectly reject 9223372036854775807. */
15665 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15666 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15667 && LARGE_OFF_T % 2147483647 == 1)
15668 ? 1 : -1];
15670 main ()
15674 return 0;
15676 _ACEOF
15677 if ac_fn_c_try_compile "$LINENO"; then :
15678 ac_cv_sys_file_offset_bits=64; break
15680 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15681 ac_cv_sys_file_offset_bits=unknown
15682 break
15683 done
15685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
15686 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
15687 case $ac_cv_sys_file_offset_bits in #(
15688 no | unknown) ;;
15690 cat >>confdefs.h <<_ACEOF
15691 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
15692 _ACEOF
15694 esac
15695 rm -rf conftest*
15696 if test $ac_cv_sys_file_offset_bits = unknown; then
15697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
15698 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
15699 if ${ac_cv_sys_large_files+:} false; then :
15700 $as_echo_n "(cached) " >&6
15701 else
15702 while :; do
15703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15704 /* end confdefs.h. */
15705 #include <sys/types.h>
15706 /* Check that off_t can represent 2**63 - 1 correctly.
15707 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15708 since some C++ compilers masquerading as C compilers
15709 incorrectly reject 9223372036854775807. */
15710 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15711 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15712 && LARGE_OFF_T % 2147483647 == 1)
15713 ? 1 : -1];
15715 main ()
15719 return 0;
15721 _ACEOF
15722 if ac_fn_c_try_compile "$LINENO"; then :
15723 ac_cv_sys_large_files=no; break
15725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15727 /* end confdefs.h. */
15728 #define _LARGE_FILES 1
15729 #include <sys/types.h>
15730 /* Check that off_t can represent 2**63 - 1 correctly.
15731 We can't simply define LARGE_OFF_T to be 9223372036854775807,
15732 since some C++ compilers masquerading as C compilers
15733 incorrectly reject 9223372036854775807. */
15734 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
15735 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
15736 && LARGE_OFF_T % 2147483647 == 1)
15737 ? 1 : -1];
15739 main ()
15743 return 0;
15745 _ACEOF
15746 if ac_fn_c_try_compile "$LINENO"; then :
15747 ac_cv_sys_large_files=1; break
15749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15750 ac_cv_sys_large_files=unknown
15751 break
15752 done
15754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
15755 $as_echo "$ac_cv_sys_large_files" >&6; }
15756 case $ac_cv_sys_large_files in #(
15757 no | unknown) ;;
15759 cat >>confdefs.h <<_ACEOF
15760 #define _LARGE_FILES $ac_cv_sys_large_files
15761 _ACEOF
15763 esac
15764 rm -rf conftest*
15773 # The cast to long int works around a bug in the HP C Compiler
15774 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15775 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15776 # This bug is HP SR number 8606223364.
15777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
15778 $as_echo_n "checking size of off_t... " >&6; }
15779 if ${ac_cv_sizeof_off_t+:} false; then :
15780 $as_echo_n "(cached) " >&6
15781 else
15782 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then :
15784 else
15785 if test "$ac_cv_type_off_t" = yes; then
15786 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15787 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15788 as_fn_error 77 "cannot compute sizeof (off_t)
15789 See \`config.log' for more details" "$LINENO" 5; }
15790 else
15791 ac_cv_sizeof_off_t=0
15796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
15797 $as_echo "$ac_cv_sizeof_off_t" >&6; }
15801 cat >>confdefs.h <<_ACEOF
15802 #define SIZEOF_OFF_T $ac_cv_sizeof_off_t
15803 _ACEOF
15807 # If we don't have largefile support, can't handle segsize >= 2GB.
15808 if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
15809 as_fn_error $? "Large file support is not enabled. Segment size cannot be larger than 1GB." "$LINENO" 5
15812 # The cast to long int works around a bug in the HP C Compiler
15813 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15814 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15815 # This bug is HP SR number 8606223364.
15816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of bool" >&5
15817 $as_echo_n "checking size of bool... " >&6; }
15818 if ${ac_cv_sizeof_bool+:} false; then :
15819 $as_echo_n "(cached) " >&6
15820 else
15821 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (bool))" "ac_cv_sizeof_bool" "#ifdef HAVE_STDBOOL_H
15822 #include <stdbool.h>
15823 #endif
15824 "; then :
15826 else
15827 if test "$ac_cv_type_bool" = yes; then
15828 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15829 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15830 as_fn_error 77 "cannot compute sizeof (bool)
15831 See \`config.log' for more details" "$LINENO" 5; }
15832 else
15833 ac_cv_sizeof_bool=0
15838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_bool" >&5
15839 $as_echo "$ac_cv_sizeof_bool" >&6; }
15843 cat >>confdefs.h <<_ACEOF
15844 #define SIZEOF_BOOL $ac_cv_sizeof_bool
15845 _ACEOF
15849 if test "$ac_cv_header_stdbool_h" = yes -a "$ac_cv_sizeof_bool" = 1; then
15851 $as_echo "#define PG_USE_STDBOOL 1" >>confdefs.h
15857 ## Functions, global variables
15860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int timezone" >&5
15861 $as_echo_n "checking for int timezone... " >&6; }
15862 if ${pgac_cv_var_int_timezone+:} false; then :
15863 $as_echo_n "(cached) " >&6
15864 else
15865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15866 /* end confdefs.h. */
15867 #include <time.h>
15868 int res;
15870 main ()
15872 #ifndef __CYGWIN__
15873 res = timezone / 60;
15874 #else
15875 res = _timezone / 60;
15876 #endif
15878 return 0;
15880 _ACEOF
15881 if ac_fn_c_try_link "$LINENO"; then :
15882 pgac_cv_var_int_timezone=yes
15883 else
15884 pgac_cv_var_int_timezone=no
15886 rm -f core conftest.err conftest.$ac_objext \
15887 conftest$ac_exeext conftest.$ac_ext
15889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_timezone" >&5
15890 $as_echo "$pgac_cv_var_int_timezone" >&6; }
15891 if test x"$pgac_cv_var_int_timezone" = xyes ; then
15893 $as_echo "#define HAVE_INT_TIMEZONE 1" >>confdefs.h
15896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday takes only one argument" >&5
15897 $as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
15898 if ${pgac_cv_func_gettimeofday_1arg+:} false; then :
15899 $as_echo_n "(cached) " >&6
15900 else
15901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15902 /* end confdefs.h. */
15903 #include <sys/time.h>
15905 main ()
15907 struct timeval *tp;
15908 struct timezone *tzp;
15909 gettimeofday(tp,tzp);
15911 return 0;
15913 _ACEOF
15914 if ac_fn_c_try_compile "$LINENO"; then :
15915 pgac_cv_func_gettimeofday_1arg=no
15916 else
15917 pgac_cv_func_gettimeofday_1arg=yes
15919 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_gettimeofday_1arg" >&5
15922 $as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
15923 if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
15925 $as_echo "#define GETTIMEOFDAY_1ARG 1" >>confdefs.h
15929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcstombs_l declaration" >&5
15930 $as_echo_n "checking for wcstombs_l declaration... " >&6; }
15931 if ${pgac_cv_func_wcstombs_l+:} false; then :
15932 $as_echo_n "(cached) " >&6
15933 else
15934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15935 /* end confdefs.h. */
15936 #include <stdlib.h>
15937 #include <locale.h>
15939 main ()
15941 #ifndef wcstombs_l
15942 (void) wcstombs_l;
15943 #endif
15945 return 0;
15947 _ACEOF
15948 if ac_fn_c_try_compile "$LINENO"; then :
15949 pgac_cv_func_wcstombs_l='yes'
15950 else
15951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15952 /* end confdefs.h. */
15953 #include <stdlib.h>
15954 #include <locale.h>
15955 #include <xlocale.h>
15957 main ()
15959 #ifndef wcstombs_l
15960 (void) wcstombs_l;
15961 #endif
15963 return 0;
15965 _ACEOF
15966 if ac_fn_c_try_compile "$LINENO"; then :
15967 pgac_cv_func_wcstombs_l='yes (in xlocale.h)'
15968 else
15969 pgac_cv_func_wcstombs_l='no'
15971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_func_wcstombs_l" >&5
15976 $as_echo "$pgac_cv_func_wcstombs_l" >&6; }
15977 if test "$pgac_cv_func_wcstombs_l" = 'yes (in xlocale.h)'; then
15979 $as_echo "#define WCSTOMBS_L_IN_XLOCALE 1" >>confdefs.h
15983 # Some versions of libedit contain strlcpy(), setproctitle(), and other
15984 # symbols that that library has no business exposing to the world. Pending
15985 # acquisition of a clue by those developers, ignore libedit (including its
15986 # possible alias of libreadline) while checking for everything else.
15987 LIBS_including_readline="$LIBS"
15988 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
15990 for ac_func in backtrace_symbols clock_gettime copyfile fdatasync getifaddrs getpeerucred getrlimit inet_pton kqueue mbstowcs_l memset_s poll posix_fallocate ppoll pstat pthread_is_threaded_np readlink readv setproctitle setproctitle_fast setsid shm_open strchrnul strsignal symlink syncfs sync_file_range uselocale wcstombs_l writev
15991 do :
15992 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15993 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15994 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15995 cat >>confdefs.h <<_ACEOF
15996 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15997 _ACEOF
16000 done
16003 # These typically are compiler builtins, for which AC_CHECK_FUNCS fails.
16004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap16" >&5
16005 $as_echo_n "checking for __builtin_bswap16... " >&6; }
16006 if ${pgac_cv__builtin_bswap16+:} false; then :
16007 $as_echo_n "(cached) " >&6
16008 else
16009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16010 /* end confdefs.h. */
16013 call__builtin_bswap16(int x)
16015 return __builtin_bswap16(x);
16018 main ()
16022 return 0;
16024 _ACEOF
16025 if ac_fn_c_try_link "$LINENO"; then :
16026 pgac_cv__builtin_bswap16=yes
16027 else
16028 pgac_cv__builtin_bswap16=no
16030 rm -f core conftest.err conftest.$ac_objext \
16031 conftest$ac_exeext conftest.$ac_ext
16033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap16" >&5
16034 $as_echo "$pgac_cv__builtin_bswap16" >&6; }
16035 if test x"${pgac_cv__builtin_bswap16}" = xyes ; then
16037 cat >>confdefs.h <<_ACEOF
16038 #define HAVE__BUILTIN_BSWAP16 1
16039 _ACEOF
16042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap32" >&5
16043 $as_echo_n "checking for __builtin_bswap32... " >&6; }
16044 if ${pgac_cv__builtin_bswap32+:} false; then :
16045 $as_echo_n "(cached) " >&6
16046 else
16047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16048 /* end confdefs.h. */
16051 call__builtin_bswap32(int x)
16053 return __builtin_bswap32(x);
16056 main ()
16060 return 0;
16062 _ACEOF
16063 if ac_fn_c_try_link "$LINENO"; then :
16064 pgac_cv__builtin_bswap32=yes
16065 else
16066 pgac_cv__builtin_bswap32=no
16068 rm -f core conftest.err conftest.$ac_objext \
16069 conftest$ac_exeext conftest.$ac_ext
16071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap32" >&5
16072 $as_echo "$pgac_cv__builtin_bswap32" >&6; }
16073 if test x"${pgac_cv__builtin_bswap32}" = xyes ; then
16075 cat >>confdefs.h <<_ACEOF
16076 #define HAVE__BUILTIN_BSWAP32 1
16077 _ACEOF
16080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_bswap64" >&5
16081 $as_echo_n "checking for __builtin_bswap64... " >&6; }
16082 if ${pgac_cv__builtin_bswap64+:} false; then :
16083 $as_echo_n "(cached) " >&6
16084 else
16085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16086 /* end confdefs.h. */
16089 call__builtin_bswap64(long int x)
16091 return __builtin_bswap64(x);
16094 main ()
16098 return 0;
16100 _ACEOF
16101 if ac_fn_c_try_link "$LINENO"; then :
16102 pgac_cv__builtin_bswap64=yes
16103 else
16104 pgac_cv__builtin_bswap64=no
16106 rm -f core conftest.err conftest.$ac_objext \
16107 conftest$ac_exeext conftest.$ac_ext
16109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_bswap64" >&5
16110 $as_echo "$pgac_cv__builtin_bswap64" >&6; }
16111 if test x"${pgac_cv__builtin_bswap64}" = xyes ; then
16113 cat >>confdefs.h <<_ACEOF
16114 #define HAVE__BUILTIN_BSWAP64 1
16115 _ACEOF
16118 # We assume that we needn't test all widths of these explicitly:
16119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_clz" >&5
16120 $as_echo_n "checking for __builtin_clz... " >&6; }
16121 if ${pgac_cv__builtin_clz+:} false; then :
16122 $as_echo_n "(cached) " >&6
16123 else
16124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16125 /* end confdefs.h. */
16128 call__builtin_clz(unsigned int x)
16130 return __builtin_clz(x);
16133 main ()
16137 return 0;
16139 _ACEOF
16140 if ac_fn_c_try_link "$LINENO"; then :
16141 pgac_cv__builtin_clz=yes
16142 else
16143 pgac_cv__builtin_clz=no
16145 rm -f core conftest.err conftest.$ac_objext \
16146 conftest$ac_exeext conftest.$ac_ext
16148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_clz" >&5
16149 $as_echo "$pgac_cv__builtin_clz" >&6; }
16150 if test x"${pgac_cv__builtin_clz}" = xyes ; then
16152 cat >>confdefs.h <<_ACEOF
16153 #define HAVE__BUILTIN_CLZ 1
16154 _ACEOF
16157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_ctz" >&5
16158 $as_echo_n "checking for __builtin_ctz... " >&6; }
16159 if ${pgac_cv__builtin_ctz+:} false; then :
16160 $as_echo_n "(cached) " >&6
16161 else
16162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16163 /* end confdefs.h. */
16166 call__builtin_ctz(unsigned int x)
16168 return __builtin_ctz(x);
16171 main ()
16175 return 0;
16177 _ACEOF
16178 if ac_fn_c_try_link "$LINENO"; then :
16179 pgac_cv__builtin_ctz=yes
16180 else
16181 pgac_cv__builtin_ctz=no
16183 rm -f core conftest.err conftest.$ac_objext \
16184 conftest$ac_exeext conftest.$ac_ext
16186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_ctz" >&5
16187 $as_echo "$pgac_cv__builtin_ctz" >&6; }
16188 if test x"${pgac_cv__builtin_ctz}" = xyes ; then
16190 cat >>confdefs.h <<_ACEOF
16191 #define HAVE__BUILTIN_CTZ 1
16192 _ACEOF
16195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_popcount" >&5
16196 $as_echo_n "checking for __builtin_popcount... " >&6; }
16197 if ${pgac_cv__builtin_popcount+:} false; then :
16198 $as_echo_n "(cached) " >&6
16199 else
16200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16201 /* end confdefs.h. */
16204 call__builtin_popcount(unsigned int x)
16206 return __builtin_popcount(x);
16209 main ()
16213 return 0;
16215 _ACEOF
16216 if ac_fn_c_try_link "$LINENO"; then :
16217 pgac_cv__builtin_popcount=yes
16218 else
16219 pgac_cv__builtin_popcount=no
16221 rm -f core conftest.err conftest.$ac_objext \
16222 conftest$ac_exeext conftest.$ac_ext
16224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_popcount" >&5
16225 $as_echo "$pgac_cv__builtin_popcount" >&6; }
16226 if test x"${pgac_cv__builtin_popcount}" = xyes ; then
16228 cat >>confdefs.h <<_ACEOF
16229 #define HAVE__BUILTIN_POPCOUNT 1
16230 _ACEOF
16233 # __builtin_frame_address may draw a diagnostic for non-constant argument,
16234 # so it needs a different test function.
16235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_frame_address" >&5
16236 $as_echo_n "checking for __builtin_frame_address... " >&6; }
16237 if ${pgac_cv__builtin_frame_address+:} false; then :
16238 $as_echo_n "(cached) " >&6
16239 else
16240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16241 /* end confdefs.h. */
16243 void *
16244 call__builtin_frame_address(void)
16246 return __builtin_frame_address(0);
16249 main ()
16253 return 0;
16255 _ACEOF
16256 if ac_fn_c_try_link "$LINENO"; then :
16257 pgac_cv__builtin_frame_address=yes
16258 else
16259 pgac_cv__builtin_frame_address=no
16261 rm -f core conftest.err conftest.$ac_objext \
16262 conftest$ac_exeext conftest.$ac_ext
16264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_frame_address" >&5
16265 $as_echo "$pgac_cv__builtin_frame_address" >&6; }
16266 if test x"${pgac_cv__builtin_frame_address}" = xyes ; then
16268 cat >>confdefs.h <<_ACEOF
16269 #define HAVE__BUILTIN_FRAME_ADDRESS 1
16270 _ACEOF
16274 # We require 64-bit fseeko() to be available, but run this check anyway
16275 # in case it finds that _LARGEFILE_SOURCE has to be #define'd for that.
16276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
16277 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
16278 if ${ac_cv_sys_largefile_source+:} false; then :
16279 $as_echo_n "(cached) " >&6
16280 else
16281 while :; do
16282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16283 /* end confdefs.h. */
16284 #include <sys/types.h> /* for off_t */
16285 #include <stdio.h>
16287 main ()
16289 int (*fp) (FILE *, off_t, int) = fseeko;
16290 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
16292 return 0;
16294 _ACEOF
16295 if ac_fn_c_try_link "$LINENO"; then :
16296 ac_cv_sys_largefile_source=no; break
16298 rm -f core conftest.err conftest.$ac_objext \
16299 conftest$ac_exeext conftest.$ac_ext
16300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16301 /* end confdefs.h. */
16302 #define _LARGEFILE_SOURCE 1
16303 #include <sys/types.h> /* for off_t */
16304 #include <stdio.h>
16306 main ()
16308 int (*fp) (FILE *, off_t, int) = fseeko;
16309 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
16311 return 0;
16313 _ACEOF
16314 if ac_fn_c_try_link "$LINENO"; then :
16315 ac_cv_sys_largefile_source=1; break
16317 rm -f core conftest.err conftest.$ac_objext \
16318 conftest$ac_exeext conftest.$ac_ext
16319 ac_cv_sys_largefile_source=unknown
16320 break
16321 done
16323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
16324 $as_echo "$ac_cv_sys_largefile_source" >&6; }
16325 case $ac_cv_sys_largefile_source in #(
16326 no | unknown) ;;
16328 cat >>confdefs.h <<_ACEOF
16329 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
16330 _ACEOF
16332 esac
16333 rm -rf conftest*
16335 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
16336 # in glibc 2.1.3, but that breaks too many other things.
16337 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
16338 if test $ac_cv_sys_largefile_source != unknown; then
16340 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
16345 # Make sure there's a declaration for sigwait(), then make sure
16346 # that it conforms to the POSIX standard (there seem to still be
16347 # some platforms out there with pre-POSIX sigwait()). On Solaris,
16348 # _POSIX_PTHREAD_SEMANTICS affects the result, but we already
16349 # added that to CPPFLAGS.
16350 # The Clang compiler raises a warning for an undeclared identifier that matches
16351 # a compiler builtin function. All extant Clang versions are affected, as of
16352 # Clang 3.6.0. Test a builtin known to every version. This problem affects the
16353 # C and Objective C languages, but Clang does report an error under C++ and
16354 # Objective C++.
16356 # Passing -fno-builtin to the compiler would suppress this problem. That
16357 # strategy would have the advantage of being insensitive to stray warnings, but
16358 # it would make tests less realistic.
16359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how $CC reports undeclared, standard C functions" >&5
16360 $as_echo_n "checking how $CC reports undeclared, standard C functions... " >&6; }
16361 if ${ac_cv_c_decl_report+:} false; then :
16362 $as_echo_n "(cached) " >&6
16363 else
16364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16365 /* end confdefs.h. */
16368 main ()
16370 (void) strchr;
16372 return 0;
16374 _ACEOF
16375 if ac_fn_c_try_compile "$LINENO"; then :
16376 if test -s conftest.err; then :
16377 # For AC_CHECK_DECL to react to warnings, the compiler must be silent on
16378 # valid AC_CHECK_DECL input. No library function is consistently available
16379 # on freestanding implementations, so test against a dummy declaration.
16380 # Include always-available headers on the off chance that they somehow
16381 # elicit warnings.
16382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16383 /* end confdefs.h. */
16384 #include <float.h>
16385 #include <limits.h>
16386 #include <stdarg.h>
16387 #include <stddef.h>
16388 extern void ac_decl (int, char *);
16390 main ()
16392 #ifdef __cplusplus
16393 (void) ac_decl ((int) 0, (char *) 0);
16394 (void) ac_decl;
16395 #else
16396 (void) ac_decl;
16397 #endif
16400 return 0;
16402 _ACEOF
16403 if ac_fn_c_try_compile "$LINENO"; then :
16404 if test -s conftest.err; then :
16405 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16406 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16407 as_fn_error $? "cannot detect from compiler exit status or warnings
16408 See \`config.log' for more details" "$LINENO" 5; }
16409 else
16410 ac_cv_c_decl_report=warning
16412 else
16413 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16414 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16415 as_fn_error $? "cannot compile a simple declaration test
16416 See \`config.log' for more details" "$LINENO" 5; }
16418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16419 else
16420 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16421 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
16422 as_fn_error $? "compiler does not report undeclared identifiers
16423 See \`config.log' for more details" "$LINENO" 5; }
16425 else
16426 ac_cv_c_decl_report=error
16428 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_decl_report" >&5
16431 $as_echo "$ac_cv_c_decl_report" >&6; }
16433 case $ac_cv_c_decl_report in
16434 warning) ac_c_decl_warn_flag=yes ;;
16435 *) ac_c_decl_warn_flag= ;;
16436 esac
16438 ac_fn_c_check_decl "$LINENO" "sigwait" "ac_cv_have_decl_sigwait" "#include <signal.h>
16440 if test "x$ac_cv_have_decl_sigwait" = xyes; then :
16441 ac_have_decl=1
16442 else
16443 ac_have_decl=0
16446 cat >>confdefs.h <<_ACEOF
16447 #define HAVE_DECL_SIGWAIT $ac_have_decl
16448 _ACEOF
16450 if test "x$ac_cv_have_decl_sigwait" = xyes; then
16451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for POSIX-conforming sigwait declaration" >&5
16452 $as_echo_n "checking for POSIX-conforming sigwait declaration... " >&6; }
16453 if ${pgac_cv_have_posix_decl_sigwait+:} false; then :
16454 $as_echo_n "(cached) " >&6
16455 else
16456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16457 /* end confdefs.h. */
16459 #include <signal.h>
16460 int sigwait(const sigset_t *set, int *sig);
16463 main ()
16467 return 0;
16469 _ACEOF
16470 if ac_fn_c_try_compile "$LINENO"; then :
16471 pgac_cv_have_posix_decl_sigwait=yes
16472 else
16473 pgac_cv_have_posix_decl_sigwait=no
16475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_have_posix_decl_sigwait" >&5
16478 $as_echo "$pgac_cv_have_posix_decl_sigwait" >&6; }
16480 if test "x$pgac_cv_have_posix_decl_sigwait" = xyes; then
16482 $as_echo "#define HAVE_POSIX_DECL_SIGWAIT 1" >>confdefs.h
16484 else
16485 # On non-Windows, libpq requires POSIX sigwait() for thread safety.
16486 if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
16487 as_fn_error $? "POSIX-conforming sigwait is required to enable thread safety." "$LINENO" 5
16491 # posix_fadvise() is a no-op on Solaris, so don't incur function overhead
16492 # by calling it, 2009-04-02
16493 # http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
16494 if test "$PORTNAME" != "solaris"; then :
16496 for ac_func in posix_fadvise
16497 do :
16498 ac_fn_c_check_func "$LINENO" "posix_fadvise" "ac_cv_func_posix_fadvise"
16499 if test "x$ac_cv_func_posix_fadvise" = xyes; then :
16500 cat >>confdefs.h <<_ACEOF
16501 #define HAVE_POSIX_FADVISE 1
16502 _ACEOF
16505 done
16507 ac_fn_c_check_decl "$LINENO" "posix_fadvise" "ac_cv_have_decl_posix_fadvise" "#include <fcntl.h>
16509 if test "x$ac_cv_have_decl_posix_fadvise" = xyes; then :
16510 ac_have_decl=1
16511 else
16512 ac_have_decl=0
16515 cat >>confdefs.h <<_ACEOF
16516 #define HAVE_DECL_POSIX_FADVISE $ac_have_decl
16517 _ACEOF
16520 fi # fi
16522 ac_fn_c_check_decl "$LINENO" "fdatasync" "ac_cv_have_decl_fdatasync" "#include <unistd.h>
16524 if test "x$ac_cv_have_decl_fdatasync" = xyes; then :
16525 ac_have_decl=1
16526 else
16527 ac_have_decl=0
16530 cat >>confdefs.h <<_ACEOF
16531 #define HAVE_DECL_FDATASYNC $ac_have_decl
16532 _ACEOF
16534 ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default"
16535 if test "x$ac_cv_have_decl_strlcat" = xyes; then :
16536 ac_have_decl=1
16537 else
16538 ac_have_decl=0
16541 cat >>confdefs.h <<_ACEOF
16542 #define HAVE_DECL_STRLCAT $ac_have_decl
16543 _ACEOF
16544 ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default"
16545 if test "x$ac_cv_have_decl_strlcpy" = xyes; then :
16546 ac_have_decl=1
16547 else
16548 ac_have_decl=0
16551 cat >>confdefs.h <<_ACEOF
16552 #define HAVE_DECL_STRLCPY $ac_have_decl
16553 _ACEOF
16554 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
16555 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
16556 ac_have_decl=1
16557 else
16558 ac_have_decl=0
16561 cat >>confdefs.h <<_ACEOF
16562 #define HAVE_DECL_STRNLEN $ac_have_decl
16563 _ACEOF
16566 # We can't use AC_REPLACE_FUNCS to replace these functions, because it
16567 # won't handle deployment target restrictions on macOS
16568 ac_fn_c_check_decl "$LINENO" "preadv" "ac_cv_have_decl_preadv" "#include <sys/uio.h>
16570 if test "x$ac_cv_have_decl_preadv" = xyes; then :
16571 ac_have_decl=1
16572 else
16573 ac_have_decl=0
16576 cat >>confdefs.h <<_ACEOF
16577 #define HAVE_DECL_PREADV $ac_have_decl
16578 _ACEOF
16579 if test $ac_have_decl = 1; then :
16581 else
16582 case " $LIBOBJS " in
16583 *" preadv.$ac_objext "* ) ;;
16584 *) LIBOBJS="$LIBOBJS preadv.$ac_objext"
16586 esac
16590 ac_fn_c_check_decl "$LINENO" "pwritev" "ac_cv_have_decl_pwritev" "#include <sys/uio.h>
16592 if test "x$ac_cv_have_decl_pwritev" = xyes; then :
16593 ac_have_decl=1
16594 else
16595 ac_have_decl=0
16598 cat >>confdefs.h <<_ACEOF
16599 #define HAVE_DECL_PWRITEV $ac_have_decl
16600 _ACEOF
16601 if test $ac_have_decl = 1; then :
16603 else
16604 case " $LIBOBJS " in
16605 *" pwritev.$ac_objext "* ) ;;
16606 *) LIBOBJS="$LIBOBJS pwritev.$ac_objext"
16608 esac
16613 # This is probably only present on macOS, but may as well check always
16614 ac_fn_c_check_decl "$LINENO" "F_FULLFSYNC" "ac_cv_have_decl_F_FULLFSYNC" "#include <fcntl.h>
16616 if test "x$ac_cv_have_decl_F_FULLFSYNC" = xyes; then :
16617 ac_have_decl=1
16618 else
16619 ac_have_decl=0
16622 cat >>confdefs.h <<_ACEOF
16623 #define HAVE_DECL_F_FULLFSYNC $ac_have_decl
16624 _ACEOF
16627 ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
16629 if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
16630 ac_have_decl=1
16631 else
16632 ac_have_decl=0
16635 cat >>confdefs.h <<_ACEOF
16636 #define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
16637 _ACEOF
16638 ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
16640 if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
16641 ac_have_decl=1
16642 else
16643 ac_have_decl=0
16646 cat >>confdefs.h <<_ACEOF
16647 #define HAVE_DECL_RTLD_NOW $ac_have_decl
16648 _ACEOF
16651 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "$ac_includes_default
16652 #include <netinet/in.h>
16654 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes; then :
16656 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
16661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5
16662 $as_echo_n "checking for PS_STRINGS... " >&6; }
16663 if ${pgac_cv_var_PS_STRINGS+:} false; then :
16664 $as_echo_n "(cached) " >&6
16665 else
16666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16667 /* end confdefs.h. */
16668 #include <machine/vmparam.h>
16669 #include <sys/exec.h>
16672 main ()
16674 PS_STRINGS->ps_nargvstr = 1;
16675 PS_STRINGS->ps_argvstr = "foo";
16677 return 0;
16679 _ACEOF
16680 if ac_fn_c_try_link "$LINENO"; then :
16681 pgac_cv_var_PS_STRINGS=yes
16682 else
16683 pgac_cv_var_PS_STRINGS=no
16685 rm -f core conftest.err conftest.$ac_objext \
16686 conftest$ac_exeext conftest.$ac_ext
16688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_PS_STRINGS" >&5
16689 $as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
16690 if test "$pgac_cv_var_PS_STRINGS" = yes ; then
16692 $as_echo "#define HAVE_PS_STRINGS 1" >>confdefs.h
16696 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
16697 if test "x$ac_cv_func_dlopen" = xyes; then :
16698 $as_echo "#define HAVE_DLOPEN 1" >>confdefs.h
16700 else
16701 case " $LIBOBJS " in
16702 *" dlopen.$ac_objext "* ) ;;
16703 *) LIBOBJS="$LIBOBJS dlopen.$ac_objext"
16705 esac
16709 ac_fn_c_check_func "$LINENO" "explicit_bzero" "ac_cv_func_explicit_bzero"
16710 if test "x$ac_cv_func_explicit_bzero" = xyes; then :
16711 $as_echo "#define HAVE_EXPLICIT_BZERO 1" >>confdefs.h
16713 else
16714 case " $LIBOBJS " in
16715 *" explicit_bzero.$ac_objext "* ) ;;
16716 *) LIBOBJS="$LIBOBJS explicit_bzero.$ac_objext"
16718 esac
16722 ac_fn_c_check_func "$LINENO" "fls" "ac_cv_func_fls"
16723 if test "x$ac_cv_func_fls" = xyes; then :
16724 $as_echo "#define HAVE_FLS 1" >>confdefs.h
16726 else
16727 case " $LIBOBJS " in
16728 *" fls.$ac_objext "* ) ;;
16729 *) LIBOBJS="$LIBOBJS fls.$ac_objext"
16731 esac
16735 ac_fn_c_check_func "$LINENO" "getopt" "ac_cv_func_getopt"
16736 if test "x$ac_cv_func_getopt" = xyes; then :
16737 $as_echo "#define HAVE_GETOPT 1" >>confdefs.h
16739 else
16740 case " $LIBOBJS " in
16741 *" getopt.$ac_objext "* ) ;;
16742 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
16744 esac
16748 ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid"
16749 if test "x$ac_cv_func_getpeereid" = xyes; then :
16750 $as_echo "#define HAVE_GETPEEREID 1" >>confdefs.h
16752 else
16753 case " $LIBOBJS " in
16754 *" getpeereid.$ac_objext "* ) ;;
16755 *) LIBOBJS="$LIBOBJS getpeereid.$ac_objext"
16757 esac
16761 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
16762 if test "x$ac_cv_func_getrusage" = xyes; then :
16763 $as_echo "#define HAVE_GETRUSAGE 1" >>confdefs.h
16765 else
16766 case " $LIBOBJS " in
16767 *" getrusage.$ac_objext "* ) ;;
16768 *) LIBOBJS="$LIBOBJS getrusage.$ac_objext"
16770 esac
16774 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
16775 if test "x$ac_cv_func_inet_aton" = xyes; then :
16776 $as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
16778 else
16779 case " $LIBOBJS " in
16780 *" inet_aton.$ac_objext "* ) ;;
16781 *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
16783 esac
16787 ac_fn_c_check_func "$LINENO" "link" "ac_cv_func_link"
16788 if test "x$ac_cv_func_link" = xyes; then :
16789 $as_echo "#define HAVE_LINK 1" >>confdefs.h
16791 else
16792 case " $LIBOBJS " in
16793 *" link.$ac_objext "* ) ;;
16794 *) LIBOBJS="$LIBOBJS link.$ac_objext"
16796 esac
16800 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
16801 if test "x$ac_cv_func_mkdtemp" = xyes; then :
16802 $as_echo "#define HAVE_MKDTEMP 1" >>confdefs.h
16804 else
16805 case " $LIBOBJS " in
16806 *" mkdtemp.$ac_objext "* ) ;;
16807 *) LIBOBJS="$LIBOBJS mkdtemp.$ac_objext"
16809 esac
16813 ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread"
16814 if test "x$ac_cv_func_pread" = xyes; then :
16815 $as_echo "#define HAVE_PREAD 1" >>confdefs.h
16817 else
16818 case " $LIBOBJS " in
16819 *" pread.$ac_objext "* ) ;;
16820 *) LIBOBJS="$LIBOBJS pread.$ac_objext"
16822 esac
16826 ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
16827 if test "x$ac_cv_func_pwrite" = xyes; then :
16828 $as_echo "#define HAVE_PWRITE 1" >>confdefs.h
16830 else
16831 case " $LIBOBJS " in
16832 *" pwrite.$ac_objext "* ) ;;
16833 *) LIBOBJS="$LIBOBJS pwrite.$ac_objext"
16835 esac
16839 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
16840 if test "x$ac_cv_func_strlcat" = xyes; then :
16841 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
16843 else
16844 case " $LIBOBJS " in
16845 *" strlcat.$ac_objext "* ) ;;
16846 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
16848 esac
16852 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
16853 if test "x$ac_cv_func_strlcpy" = xyes; then :
16854 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
16856 else
16857 case " $LIBOBJS " in
16858 *" strlcpy.$ac_objext "* ) ;;
16859 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
16861 esac
16865 ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen"
16866 if test "x$ac_cv_func_strnlen" = xyes; then :
16867 $as_echo "#define HAVE_STRNLEN 1" >>confdefs.h
16869 else
16870 case " $LIBOBJS " in
16871 *" strnlen.$ac_objext "* ) ;;
16872 *) LIBOBJS="$LIBOBJS strnlen.$ac_objext"
16874 esac
16878 ac_fn_c_check_func "$LINENO" "strtof" "ac_cv_func_strtof"
16879 if test "x$ac_cv_func_strtof" = xyes; then :
16880 $as_echo "#define HAVE_STRTOF 1" >>confdefs.h
16882 else
16883 case " $LIBOBJS " in
16884 *" strtof.$ac_objext "* ) ;;
16885 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16887 esac
16893 if test "$enable_thread_safety" = yes; then
16894 ac_fn_c_check_func "$LINENO" "pthread_barrier_wait" "ac_cv_func_pthread_barrier_wait"
16895 if test "x$ac_cv_func_pthread_barrier_wait" = xyes; then :
16896 $as_echo "#define HAVE_PTHREAD_BARRIER_WAIT 1" >>confdefs.h
16898 else
16899 case " $LIBOBJS " in
16900 *" pthread_barrier_wait.$ac_objext "* ) ;;
16901 *) LIBOBJS="$LIBOBJS pthread_barrier_wait.$ac_objext"
16903 esac
16910 if test "$PORTNAME" = "win32" -o "$PORTNAME" = "cygwin"; then
16911 # Cygwin and (apparently, based on test results) Mingw both
16912 # have a broken strtof(), so substitute the same replacement
16913 # code we use with VS2013. That's not a perfect fix, since
16914 # (unlike with VS2013) it doesn't avoid double-rounding, but
16915 # we have no better options. To get that, though, we have to
16916 # force the file to be compiled despite HAVE_STRTOF.
16917 case " $LIBOBJS " in
16918 *" strtof.$ac_objext "* ) ;;
16919 *) LIBOBJS="$LIBOBJS strtof.$ac_objext"
16921 esac
16923 { $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
16924 $as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
16927 case $host_os in
16928 # Windows uses a specialised env handler
16929 mingw*)
16931 $as_echo "#define HAVE_SETENV 1" >>confdefs.h
16934 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
16936 ac_cv_func_setenv=yes
16937 ac_cv_func_unsetenv=yes
16940 ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
16941 if test "x$ac_cv_func_setenv" = xyes; then :
16942 $as_echo "#define HAVE_SETENV 1" >>confdefs.h
16944 else
16945 case " $LIBOBJS " in
16946 *" setenv.$ac_objext "* ) ;;
16947 *) LIBOBJS="$LIBOBJS setenv.$ac_objext"
16949 esac
16953 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
16954 if test "x$ac_cv_func_unsetenv" = xyes; then :
16955 $as_echo "#define HAVE_UNSETENV 1" >>confdefs.h
16957 else
16958 case " $LIBOBJS " in
16959 *" unsetenv.$ac_objext "* ) ;;
16960 *) LIBOBJS="$LIBOBJS unsetenv.$ac_objext"
16962 esac
16968 esac
16970 # System's version of getaddrinfo(), if any, may be used only if we found
16971 # a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
16972 # We use only our own getaddrinfo.c on Windows, but it's time to revisit that.
16973 if test x"$ac_cv_type_struct_addrinfo" = xyes && \
16974 test "$PORTNAME" != "win32"; then
16975 ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
16976 if test "x$ac_cv_func_getaddrinfo" = xyes; then :
16977 $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
16979 else
16980 case " $LIBOBJS " in
16981 *" getaddrinfo.$ac_objext "* ) ;;
16982 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16984 esac
16989 else
16990 case " $LIBOBJS " in
16991 *" getaddrinfo.$ac_objext "* ) ;;
16992 *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
16994 esac
16998 # Similarly, use system's getopt_long() only if system provides struct option.
16999 if test x"$ac_cv_type_struct_option" = xyes ; then
17000 ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
17001 if test "x$ac_cv_func_getopt_long" = xyes; then :
17002 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
17004 else
17005 case " $LIBOBJS " in
17006 *" getopt_long.$ac_objext "* ) ;;
17007 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
17009 esac
17014 else
17015 case " $LIBOBJS " in
17016 *" getopt_long.$ac_objext "* ) ;;
17017 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
17019 esac
17023 # On OpenBSD and Solaris, getopt() doesn't do what we want for long options
17024 # (i.e., allow '-' as a flag character), so use our version on those platforms.
17025 if test "$PORTNAME" = "openbsd" -o "$PORTNAME" = "solaris"; then
17026 case " $LIBOBJS " in
17027 *" getopt.$ac_objext "* ) ;;
17028 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
17030 esac
17034 # mingw has adopted a GNU-centric interpretation of optind/optreset,
17035 # so always use our version on Windows.
17036 if test "$PORTNAME" = "win32"; then
17037 case " $LIBOBJS " in
17038 *" getopt.$ac_objext "* ) ;;
17039 *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
17041 esac
17043 case " $LIBOBJS " in
17044 *" getopt_long.$ac_objext "* ) ;;
17045 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
17047 esac
17051 # Win32 (really MinGW) support
17052 if test "$PORTNAME" = "win32"; then
17053 for ac_func in _configthreadlocale
17054 do :
17055 ac_fn_c_check_func "$LINENO" "_configthreadlocale" "ac_cv_func__configthreadlocale"
17056 if test "x$ac_cv_func__configthreadlocale" = xyes; then :
17057 cat >>confdefs.h <<_ACEOF
17058 #define HAVE__CONFIGTHREADLOCALE 1
17059 _ACEOF
17062 done
17064 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
17065 if test "x$ac_cv_func_gettimeofday" = xyes; then :
17066 $as_echo "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h
17068 else
17069 case " $LIBOBJS " in
17070 *" gettimeofday.$ac_objext "* ) ;;
17071 *) LIBOBJS="$LIBOBJS gettimeofday.$ac_objext"
17073 esac
17078 case " $LIBOBJS " in
17079 *" dirmod.$ac_objext "* ) ;;
17080 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
17082 esac
17084 case " $LIBOBJS " in
17085 *" kill.$ac_objext "* ) ;;
17086 *) LIBOBJS="$LIBOBJS kill.$ac_objext"
17088 esac
17090 case " $LIBOBJS " in
17091 *" open.$ac_objext "* ) ;;
17092 *) LIBOBJS="$LIBOBJS open.$ac_objext"
17094 esac
17096 case " $LIBOBJS " in
17097 *" system.$ac_objext "* ) ;;
17098 *) LIBOBJS="$LIBOBJS system.$ac_objext"
17100 esac
17102 case " $LIBOBJS " in
17103 *" win32env.$ac_objext "* ) ;;
17104 *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
17106 esac
17108 case " $LIBOBJS " in
17109 *" win32error.$ac_objext "* ) ;;
17110 *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
17112 esac
17114 case " $LIBOBJS " in
17115 *" win32ntdll.$ac_objext "* ) ;;
17116 *) LIBOBJS="$LIBOBJS win32ntdll.$ac_objext"
17118 esac
17120 case " $LIBOBJS " in
17121 *" win32security.$ac_objext "* ) ;;
17122 *) LIBOBJS="$LIBOBJS win32security.$ac_objext"
17124 esac
17126 case " $LIBOBJS " in
17127 *" win32setlocale.$ac_objext "* ) ;;
17128 *) LIBOBJS="$LIBOBJS win32setlocale.$ac_objext"
17130 esac
17132 case " $LIBOBJS " in
17133 *" win32stat.$ac_objext "* ) ;;
17134 *) LIBOBJS="$LIBOBJS win32stat.$ac_objext"
17136 esac
17139 $as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
17141 ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
17142 #define WIN32_LEAN_AND_MEAN
17143 #include <windows.h>
17144 #include <string.h>
17145 #include <dbghelp.h>
17147 if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
17149 cat >>confdefs.h <<_ACEOF
17150 #define HAVE_MINIDUMP_TYPE 1
17151 _ACEOF
17153 pgac_minidump_type=yes
17154 else
17155 pgac_minidump_type=no
17159 if test x"$pgac_minidump_type" = x"yes" ; then
17160 have_win32_dbghelp=yes
17162 else
17163 have_win32_dbghelp=no
17167 # Cygwin needs only a bit of that
17168 if test "$PORTNAME" = "cygwin"; then
17169 case " $LIBOBJS " in
17170 *" dirmod.$ac_objext "* ) ;;
17171 *) LIBOBJS="$LIBOBJS dirmod.$ac_objext"
17173 esac
17177 ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
17178 if test "x$ac_cv_func_syslog" = xyes; then :
17179 ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
17180 if test "x$ac_cv_header_syslog_h" = xyes; then :
17182 $as_echo "#define HAVE_SYSLOG 1" >>confdefs.h
17190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opterr" >&5
17191 $as_echo_n "checking for opterr... " >&6; }
17192 if ${pgac_cv_var_int_opterr+:} false; then :
17193 $as_echo_n "(cached) " >&6
17194 else
17195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17196 /* end confdefs.h. */
17197 #include <unistd.h>
17199 main ()
17201 extern int opterr; opterr = 1;
17203 return 0;
17205 _ACEOF
17206 if ac_fn_c_try_link "$LINENO"; then :
17207 pgac_cv_var_int_opterr=yes
17208 else
17209 pgac_cv_var_int_opterr=no
17211 rm -f core conftest.err conftest.$ac_objext \
17212 conftest$ac_exeext conftest.$ac_ext
17214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_opterr" >&5
17215 $as_echo "$pgac_cv_var_int_opterr" >&6; }
17216 if test x"$pgac_cv_var_int_opterr" = x"yes"; then
17218 $as_echo "#define HAVE_INT_OPTERR 1" >>confdefs.h
17222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for optreset" >&5
17223 $as_echo_n "checking for optreset... " >&6; }
17224 if ${pgac_cv_var_int_optreset+:} false; then :
17225 $as_echo_n "(cached) " >&6
17226 else
17227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17228 /* end confdefs.h. */
17229 #include <unistd.h>
17231 main ()
17233 extern int optreset; optreset = 1;
17235 return 0;
17237 _ACEOF
17238 if ac_fn_c_try_link "$LINENO"; then :
17239 pgac_cv_var_int_optreset=yes
17240 else
17241 pgac_cv_var_int_optreset=no
17243 rm -f core conftest.err conftest.$ac_objext \
17244 conftest$ac_exeext conftest.$ac_ext
17246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_int_optreset" >&5
17247 $as_echo "$pgac_cv_var_int_optreset" >&6; }
17248 if test x"$pgac_cv_var_int_optreset" = x"yes"; then
17250 $as_echo "#define HAVE_INT_OPTRESET 1" >>confdefs.h
17254 for ac_func in strtoll __strtoll strtoq
17255 do :
17256 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17257 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17258 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17259 cat >>confdefs.h <<_ACEOF
17260 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17261 _ACEOF
17262 break
17264 done
17266 for ac_func in strtoull __strtoull strtouq
17267 do :
17268 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17269 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17270 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17271 cat >>confdefs.h <<_ACEOF
17272 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17273 _ACEOF
17274 break
17276 done
17278 # strto[u]ll may exist but not be declared
17279 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
17280 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
17281 ac_have_decl=1
17282 else
17283 ac_have_decl=0
17286 cat >>confdefs.h <<_ACEOF
17287 #define HAVE_DECL_STRTOLL $ac_have_decl
17288 _ACEOF
17289 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
17290 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
17291 ac_have_decl=1
17292 else
17293 ac_have_decl=0
17296 cat >>confdefs.h <<_ACEOF
17297 #define HAVE_DECL_STRTOULL $ac_have_decl
17298 _ACEOF
17301 if test "$with_icu" = yes; then
17302 ac_save_CPPFLAGS=$CPPFLAGS
17303 CPPFLAGS="$ICU_CFLAGS $CPPFLAGS"
17305 # Verify we have ICU's header files
17306 ac_fn_c_check_header_mongrel "$LINENO" "unicode/ucol.h" "ac_cv_header_unicode_ucol_h" "$ac_includes_default"
17307 if test "x$ac_cv_header_unicode_ucol_h" = xyes; then :
17309 else
17310 as_fn_error $? "header file <unicode/ucol.h> is required for ICU" "$LINENO" 5
17315 CPPFLAGS=$ac_save_CPPFLAGS
17318 if test "$with_llvm" = yes; then
17320 # Check which functionality is present
17321 SAVE_CPPFLAGS="$CPPFLAGS"
17322 CPPFLAGS="$CPPFLAGS $LLVM_CPPFLAGS"
17323 ac_fn_c_check_decl "$LINENO" "LLVMOrcGetSymbolAddressIn" "ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" "#include <llvm-c/OrcBindings.h>
17325 if test "x$ac_cv_have_decl_LLVMOrcGetSymbolAddressIn" = xyes; then :
17326 ac_have_decl=1
17327 else
17328 ac_have_decl=0
17331 cat >>confdefs.h <<_ACEOF
17332 #define HAVE_DECL_LLVMORCGETSYMBOLADDRESSIN $ac_have_decl
17333 _ACEOF
17335 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUName" "ac_cv_have_decl_LLVMGetHostCPUName" "#include <llvm-c/TargetMachine.h>
17337 if test "x$ac_cv_have_decl_LLVMGetHostCPUName" = xyes; then :
17338 ac_have_decl=1
17339 else
17340 ac_have_decl=0
17343 cat >>confdefs.h <<_ACEOF
17344 #define HAVE_DECL_LLVMGETHOSTCPUNAME $ac_have_decl
17345 _ACEOF
17346 ac_fn_c_check_decl "$LINENO" "LLVMGetHostCPUFeatures" "ac_cv_have_decl_LLVMGetHostCPUFeatures" "#include <llvm-c/TargetMachine.h>
17348 if test "x$ac_cv_have_decl_LLVMGetHostCPUFeatures" = xyes; then :
17349 ac_have_decl=1
17350 else
17351 ac_have_decl=0
17354 cat >>confdefs.h <<_ACEOF
17355 #define HAVE_DECL_LLVMGETHOSTCPUFEATURES $ac_have_decl
17356 _ACEOF
17358 ac_fn_c_check_decl "$LINENO" "LLVMCreateGDBRegistrationListener" "ac_cv_have_decl_LLVMCreateGDBRegistrationListener" "#include <llvm-c/ExecutionEngine.h>
17360 if test "x$ac_cv_have_decl_LLVMCreateGDBRegistrationListener" = xyes; then :
17361 ac_have_decl=1
17362 else
17363 ac_have_decl=0
17366 cat >>confdefs.h <<_ACEOF
17367 #define HAVE_DECL_LLVMCREATEGDBREGISTRATIONLISTENER $ac_have_decl
17368 _ACEOF
17369 ac_fn_c_check_decl "$LINENO" "LLVMCreatePerfJITEventListener" "ac_cv_have_decl_LLVMCreatePerfJITEventListener" "#include <llvm-c/ExecutionEngine.h>
17371 if test "x$ac_cv_have_decl_LLVMCreatePerfJITEventListener" = xyes; then :
17372 ac_have_decl=1
17373 else
17374 ac_have_decl=0
17377 cat >>confdefs.h <<_ACEOF
17378 #define HAVE_DECL_LLVMCREATEPERFJITEVENTLISTENER $ac_have_decl
17379 _ACEOF
17381 CPPFLAGS="$SAVE_CPPFLAGS"
17385 # Lastly, restore full LIBS list and check for readline/libedit symbols
17386 LIBS="$LIBS_including_readline"
17388 if test "$with_readline" = yes; then
17389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_suppress_quote" >&5
17390 $as_echo_n "checking for rl_completion_suppress_quote... " >&6; }
17391 if ${pgac_cv_var_rl_completion_suppress_quote+:} false; then :
17392 $as_echo_n "(cached) " >&6
17393 else
17394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17395 /* end confdefs.h. */
17396 #include <stdio.h>
17397 #if defined(HAVE_READLINE_READLINE_H)
17398 #include <readline/readline.h>
17399 #elif defined(HAVE_EDITLINE_READLINE_H)
17400 #include <editline/readline.h>
17401 #elif defined(HAVE_READLINE_H)
17402 #include <readline.h>
17403 #endif
17406 main ()
17408 rl_completion_suppress_quote = 1;
17410 return 0;
17412 _ACEOF
17413 if ac_fn_c_try_link "$LINENO"; then :
17414 pgac_cv_var_rl_completion_suppress_quote=yes
17415 else
17416 pgac_cv_var_rl_completion_suppress_quote=no
17418 rm -f core conftest.err conftest.$ac_objext \
17419 conftest$ac_exeext conftest.$ac_ext
17421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_completion_suppress_quote" >&5
17422 $as_echo "$pgac_cv_var_rl_completion_suppress_quote" >&6; }
17423 if test x"$pgac_cv_var_rl_completion_suppress_quote" = x"yes"; then
17425 $as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_QUOTE 1" >>confdefs.h
17428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quote_characters" >&5
17429 $as_echo_n "checking for rl_filename_quote_characters... " >&6; }
17430 if ${pgac_cv_var_rl_filename_quote_characters+:} false; then :
17431 $as_echo_n "(cached) " >&6
17432 else
17433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17434 /* end confdefs.h. */
17435 #include <stdio.h>
17436 #if defined(HAVE_READLINE_READLINE_H)
17437 #include <readline/readline.h>
17438 #elif defined(HAVE_EDITLINE_READLINE_H)
17439 #include <editline/readline.h>
17440 #elif defined(HAVE_READLINE_H)
17441 #include <readline.h>
17442 #endif
17445 main ()
17447 rl_filename_quote_characters = "x";
17449 return 0;
17451 _ACEOF
17452 if ac_fn_c_try_link "$LINENO"; then :
17453 pgac_cv_var_rl_filename_quote_characters=yes
17454 else
17455 pgac_cv_var_rl_filename_quote_characters=no
17457 rm -f core conftest.err conftest.$ac_objext \
17458 conftest$ac_exeext conftest.$ac_ext
17460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quote_characters" >&5
17461 $as_echo "$pgac_cv_var_rl_filename_quote_characters" >&6; }
17462 if test x"$pgac_cv_var_rl_filename_quote_characters" = x"yes"; then
17464 $as_echo "#define HAVE_RL_FILENAME_QUOTE_CHARACTERS 1" >>confdefs.h
17467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_filename_quoting_function" >&5
17468 $as_echo_n "checking for rl_filename_quoting_function... " >&6; }
17469 if ${pgac_cv_var_rl_filename_quoting_function+:} false; then :
17470 $as_echo_n "(cached) " >&6
17471 else
17472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17473 /* end confdefs.h. */
17474 #include <stdio.h>
17475 #if defined(HAVE_READLINE_READLINE_H)
17476 #include <readline/readline.h>
17477 #elif defined(HAVE_EDITLINE_READLINE_H)
17478 #include <editline/readline.h>
17479 #elif defined(HAVE_READLINE_H)
17480 #include <readline.h>
17481 #endif
17484 main ()
17486 rl_filename_quoting_function = 0;
17488 return 0;
17490 _ACEOF
17491 if ac_fn_c_try_link "$LINENO"; then :
17492 pgac_cv_var_rl_filename_quoting_function=yes
17493 else
17494 pgac_cv_var_rl_filename_quoting_function=no
17496 rm -f core conftest.err conftest.$ac_objext \
17497 conftest$ac_exeext conftest.$ac_ext
17499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_var_rl_filename_quoting_function" >&5
17500 $as_echo "$pgac_cv_var_rl_filename_quoting_function" >&6; }
17501 if test x"$pgac_cv_var_rl_filename_quoting_function" = x"yes"; then
17503 $as_echo "#define HAVE_RL_FILENAME_QUOTING_FUNCTION 1" >>confdefs.h
17507 for ac_func in append_history history_truncate_file rl_completion_matches rl_filename_completion_function rl_reset_screen_size rl_variable_bind
17508 do :
17509 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17510 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17511 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17512 cat >>confdefs.h <<_ACEOF
17513 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17514 _ACEOF
17517 done
17522 # This test makes sure that run tests work at all. Sometimes a shared
17523 # library is found by the linker, but the runtime linker can't find it.
17524 # This check should come after all modifications of compiler or linker
17525 # variables, and before any other run tests.
17526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking test program" >&5
17527 $as_echo_n "checking test program... " >&6; }
17528 if test "$cross_compiling" = yes; then :
17529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling" >&5
17530 $as_echo "cross-compiling" >&6; }
17531 else
17532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17533 /* end confdefs.h. */
17534 int main() { return 0; }
17535 _ACEOF
17536 if ac_fn_c_try_run "$LINENO"; then :
17537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
17538 $as_echo "ok" >&6; }
17539 else
17540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
17541 $as_echo "failed" >&6; }
17542 as_fn_error $? "
17543 Could not execute a simple test program. This may be a problem
17544 related to locating shared libraries. Check the file 'config.log'
17545 for the exact reason." "$LINENO" 5
17547 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17548 conftest.$ac_objext conftest.beam conftest.$ac_ext
17552 # --------------------
17553 # Run tests below here
17554 # --------------------
17557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long int is 64 bits" >&5
17558 $as_echo_n "checking whether long int is 64 bits... " >&6; }
17559 if ${pgac_cv_type_long_int_64+:} false; then :
17560 $as_echo_n "(cached) " >&6
17561 else
17562 if test "$cross_compiling" = yes; then :
17563 # If cross-compiling, check the size reported by the compiler and
17564 # trust that the arithmetic works.
17565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17566 /* end confdefs.h. */
17569 main ()
17571 static int test_array [1 - 2 * !(sizeof(long int) == 8)];
17572 test_array [0] = 0;
17573 return test_array [0];
17576 return 0;
17578 _ACEOF
17579 if ac_fn_c_try_compile "$LINENO"; then :
17580 pgac_cv_type_long_int_64=yes
17581 else
17582 pgac_cv_type_long_int_64=no
17584 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17585 else
17586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17587 /* end confdefs.h. */
17588 typedef long int ac_int64;
17591 * These are globals to discourage the compiler from folding all the
17592 * arithmetic tests down to compile-time constants.
17594 ac_int64 a = 20000001;
17595 ac_int64 b = 40000005;
17597 int does_int64_work()
17599 ac_int64 c,d;
17601 if (sizeof(ac_int64) != 8)
17602 return 0; /* definitely not the right size */
17604 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17605 c = a * b;
17606 d = (c + b) / b;
17607 if (d != a+1)
17608 return 0;
17609 return 1;
17613 main() {
17614 return (! does_int64_work());
17616 _ACEOF
17617 if ac_fn_c_try_run "$LINENO"; then :
17618 pgac_cv_type_long_int_64=yes
17619 else
17620 pgac_cv_type_long_int_64=no
17622 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17623 conftest.$ac_objext conftest.beam conftest.$ac_ext
17627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_int_64" >&5
17628 $as_echo "$pgac_cv_type_long_int_64" >&6; }
17630 HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
17631 if test x"$pgac_cv_type_long_int_64" = xyes ; then
17633 $as_echo "#define HAVE_LONG_INT_64 1" >>confdefs.h
17638 if test x"$HAVE_LONG_INT_64" = x"yes" ; then
17639 pg_int64_type="long int"
17640 else
17641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long long int is 64 bits" >&5
17642 $as_echo_n "checking whether long long int is 64 bits... " >&6; }
17643 if ${pgac_cv_type_long_long_int_64+:} false; then :
17644 $as_echo_n "(cached) " >&6
17645 else
17646 if test "$cross_compiling" = yes; then :
17647 # If cross-compiling, check the size reported by the compiler and
17648 # trust that the arithmetic works.
17649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17650 /* end confdefs.h. */
17653 main ()
17655 static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
17656 test_array [0] = 0;
17657 return test_array [0];
17660 return 0;
17662 _ACEOF
17663 if ac_fn_c_try_compile "$LINENO"; then :
17664 pgac_cv_type_long_long_int_64=yes
17665 else
17666 pgac_cv_type_long_long_int_64=no
17668 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17669 else
17670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17671 /* end confdefs.h. */
17672 typedef long long int ac_int64;
17675 * These are globals to discourage the compiler from folding all the
17676 * arithmetic tests down to compile-time constants.
17678 ac_int64 a = 20000001;
17679 ac_int64 b = 40000005;
17681 int does_int64_work()
17683 ac_int64 c,d;
17685 if (sizeof(ac_int64) != 8)
17686 return 0; /* definitely not the right size */
17688 /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
17689 c = a * b;
17690 d = (c + b) / b;
17691 if (d != a+1)
17692 return 0;
17693 return 1;
17697 main() {
17698 return (! does_int64_work());
17700 _ACEOF
17701 if ac_fn_c_try_run "$LINENO"; then :
17702 pgac_cv_type_long_long_int_64=yes
17703 else
17704 pgac_cv_type_long_long_int_64=no
17706 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17707 conftest.$ac_objext conftest.beam conftest.$ac_ext
17711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_type_long_long_int_64" >&5
17712 $as_echo "$pgac_cv_type_long_long_int_64" >&6; }
17714 HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
17715 if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
17717 $as_echo "#define HAVE_LONG_LONG_INT_64 1" >>confdefs.h
17721 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17722 pg_int64_type="long long int"
17723 else
17724 as_fn_error $? "Cannot find a working 64-bit integer type." "$LINENO" 5
17729 cat >>confdefs.h <<_ACEOF
17730 #define PG_INT64_TYPE $pg_int64_type
17731 _ACEOF
17734 # Select the printf length modifier that goes with that, too.
17735 if test x"$pg_int64_type" = x"long long int" ; then
17736 INT64_MODIFIER='"ll"'
17737 else
17738 INT64_MODIFIER='"l"'
17742 cat >>confdefs.h <<_ACEOF
17743 #define INT64_MODIFIER $INT64_MODIFIER
17744 _ACEOF
17747 # has to be down here, rather than with the other builtins, because
17748 # the test uses PG_INT64_TYPE.
17749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_mul_overflow" >&5
17750 $as_echo_n "checking for __builtin_mul_overflow... " >&6; }
17751 if ${pgac_cv__builtin_op_overflow+:} false; then :
17752 $as_echo_n "(cached) " >&6
17753 else
17754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17755 /* end confdefs.h. */
17757 PG_INT64_TYPE a = 1;
17758 PG_INT64_TYPE b = 1;
17759 PG_INT64_TYPE result;
17760 int oflo;
17763 main ()
17765 oflo = __builtin_mul_overflow(a, b, &result);
17767 return 0;
17769 _ACEOF
17770 if ac_fn_c_try_link "$LINENO"; then :
17771 pgac_cv__builtin_op_overflow=yes
17772 else
17773 pgac_cv__builtin_op_overflow=no
17775 rm -f core conftest.err conftest.$ac_objext \
17776 conftest$ac_exeext conftest.$ac_ext
17778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__builtin_op_overflow" >&5
17779 $as_echo "$pgac_cv__builtin_op_overflow" >&6; }
17780 if test x"$pgac_cv__builtin_op_overflow" = xyes ; then
17782 $as_echo "#define HAVE__BUILTIN_OP_OVERFLOW 1" >>confdefs.h
17786 # Check size of void *, size_t (enables tweaks for > 32bit address space)
17787 # The cast to long int works around a bug in the HP C Compiler
17788 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17789 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17790 # This bug is HP SR number 8606223364.
17791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
17792 $as_echo_n "checking size of void *... " >&6; }
17793 if ${ac_cv_sizeof_void_p+:} false; then :
17794 $as_echo_n "(cached) " >&6
17795 else
17796 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
17798 else
17799 if test "$ac_cv_type_void_p" = yes; then
17800 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17801 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17802 as_fn_error 77 "cannot compute sizeof (void *)
17803 See \`config.log' for more details" "$LINENO" 5; }
17804 else
17805 ac_cv_sizeof_void_p=0
17810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
17811 $as_echo "$ac_cv_sizeof_void_p" >&6; }
17815 cat >>confdefs.h <<_ACEOF
17816 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
17817 _ACEOF
17820 # The cast to long int works around a bug in the HP C Compiler
17821 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17822 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17823 # This bug is HP SR number 8606223364.
17824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
17825 $as_echo_n "checking size of size_t... " >&6; }
17826 if ${ac_cv_sizeof_size_t+:} false; then :
17827 $as_echo_n "(cached) " >&6
17828 else
17829 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
17831 else
17832 if test "$ac_cv_type_size_t" = yes; then
17833 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17834 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17835 as_fn_error 77 "cannot compute sizeof (size_t)
17836 See \`config.log' for more details" "$LINENO" 5; }
17837 else
17838 ac_cv_sizeof_size_t=0
17843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
17844 $as_echo "$ac_cv_sizeof_size_t" >&6; }
17848 cat >>confdefs.h <<_ACEOF
17849 #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
17850 _ACEOF
17853 # The cast to long int works around a bug in the HP C Compiler
17854 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17855 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17856 # This bug is HP SR number 8606223364.
17857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
17858 $as_echo_n "checking size of long... " >&6; }
17859 if ${ac_cv_sizeof_long+:} false; then :
17860 $as_echo_n "(cached) " >&6
17861 else
17862 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
17864 else
17865 if test "$ac_cv_type_long" = yes; then
17866 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17867 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17868 as_fn_error 77 "cannot compute sizeof (long)
17869 See \`config.log' for more details" "$LINENO" 5; }
17870 else
17871 ac_cv_sizeof_long=0
17876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
17877 $as_echo "$ac_cv_sizeof_long" >&6; }
17881 cat >>confdefs.h <<_ACEOF
17882 #define SIZEOF_LONG $ac_cv_sizeof_long
17883 _ACEOF
17887 # Determine memory alignment requirements for the basic C data types.
17889 # The cast to long int works around a bug in the HP C Compiler,
17890 # see AC_CHECK_SIZEOF for more information.
17891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of short" >&5
17892 $as_echo_n "checking alignment of short... " >&6; }
17893 if ${ac_cv_alignof_short+:} false; then :
17894 $as_echo_n "(cached) " >&6
17895 else
17896 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_short" "$ac_includes_default
17897 #ifndef offsetof
17898 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17899 #endif
17900 typedef struct { char x; short y; } ac__type_alignof_;"; then :
17902 else
17903 if test "$ac_cv_type_short" = yes; then
17904 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17905 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17906 as_fn_error 77 "cannot compute alignment of short
17907 See \`config.log' for more details" "$LINENO" 5; }
17908 else
17909 ac_cv_alignof_short=0
17914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_short" >&5
17915 $as_echo "$ac_cv_alignof_short" >&6; }
17919 cat >>confdefs.h <<_ACEOF
17920 #define ALIGNOF_SHORT $ac_cv_alignof_short
17921 _ACEOF
17924 # The cast to long int works around a bug in the HP C Compiler,
17925 # see AC_CHECK_SIZEOF for more information.
17926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of int" >&5
17927 $as_echo_n "checking alignment of int... " >&6; }
17928 if ${ac_cv_alignof_int+:} false; then :
17929 $as_echo_n "(cached) " >&6
17930 else
17931 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_int" "$ac_includes_default
17932 #ifndef offsetof
17933 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17934 #endif
17935 typedef struct { char x; int y; } ac__type_alignof_;"; then :
17937 else
17938 if test "$ac_cv_type_int" = yes; then
17939 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17940 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17941 as_fn_error 77 "cannot compute alignment of int
17942 See \`config.log' for more details" "$LINENO" 5; }
17943 else
17944 ac_cv_alignof_int=0
17949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_int" >&5
17950 $as_echo "$ac_cv_alignof_int" >&6; }
17954 cat >>confdefs.h <<_ACEOF
17955 #define ALIGNOF_INT $ac_cv_alignof_int
17956 _ACEOF
17959 # The cast to long int works around a bug in the HP C Compiler,
17960 # see AC_CHECK_SIZEOF for more information.
17961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
17962 $as_echo_n "checking alignment of long... " >&6; }
17963 if ${ac_cv_alignof_long+:} false; then :
17964 $as_echo_n "(cached) " >&6
17965 else
17966 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
17967 #ifndef offsetof
17968 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
17969 #endif
17970 typedef struct { char x; long y; } ac__type_alignof_;"; then :
17972 else
17973 if test "$ac_cv_type_long" = yes; then
17974 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17975 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17976 as_fn_error 77 "cannot compute alignment of long
17977 See \`config.log' for more details" "$LINENO" 5; }
17978 else
17979 ac_cv_alignof_long=0
17984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
17985 $as_echo "$ac_cv_alignof_long" >&6; }
17989 cat >>confdefs.h <<_ACEOF
17990 #define ALIGNOF_LONG $ac_cv_alignof_long
17991 _ACEOF
17994 if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
17995 # The cast to long int works around a bug in the HP C Compiler,
17996 # see AC_CHECK_SIZEOF for more information.
17997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of long long int" >&5
17998 $as_echo_n "checking alignment of long long int... " >&6; }
17999 if ${ac_cv_alignof_long_long_int+:} false; then :
18000 $as_echo_n "(cached) " >&6
18001 else
18002 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long_int" "$ac_includes_default
18003 #ifndef offsetof
18004 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
18005 #endif
18006 typedef struct { char x; long long int y; } ac__type_alignof_;"; then :
18008 else
18009 if test "$ac_cv_type_long_long_int" = yes; then
18010 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18011 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18012 as_fn_error 77 "cannot compute alignment of long long int
18013 See \`config.log' for more details" "$LINENO" 5; }
18014 else
18015 ac_cv_alignof_long_long_int=0
18020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long_int" >&5
18021 $as_echo "$ac_cv_alignof_long_long_int" >&6; }
18025 cat >>confdefs.h <<_ACEOF
18026 #define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
18027 _ACEOF
18031 # The cast to long int works around a bug in the HP C Compiler,
18032 # see AC_CHECK_SIZEOF for more information.
18033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
18034 $as_echo_n "checking alignment of double... " >&6; }
18035 if ${ac_cv_alignof_double+:} false; then :
18036 $as_echo_n "(cached) " >&6
18037 else
18038 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
18039 #ifndef offsetof
18040 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
18041 #endif
18042 typedef struct { char x; double y; } ac__type_alignof_;"; then :
18044 else
18045 if test "$ac_cv_type_double" = yes; then
18046 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18047 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18048 as_fn_error 77 "cannot compute alignment of double
18049 See \`config.log' for more details" "$LINENO" 5; }
18050 else
18051 ac_cv_alignof_double=0
18056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
18057 $as_echo "$ac_cv_alignof_double" >&6; }
18061 cat >>confdefs.h <<_ACEOF
18062 #define ALIGNOF_DOUBLE $ac_cv_alignof_double
18063 _ACEOF
18067 # Compute maximum alignment of any basic type.
18068 # We assume long's alignment is at least as strong as char, short, or int;
18069 # but we must check long long (if it is being used for int64) and double.
18070 # Note that we intentionally do not consider any types wider than 64 bits,
18071 # as allowing MAXIMUM_ALIGNOF to exceed 8 would be too much of a penalty
18072 # for disk and memory space.
18074 MAX_ALIGNOF=$ac_cv_alignof_long
18075 if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
18076 MAX_ALIGNOF=$ac_cv_alignof_double
18078 if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
18079 MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
18082 cat >>confdefs.h <<_ACEOF
18083 #define MAXIMUM_ALIGNOF $MAX_ALIGNOF
18084 _ACEOF
18088 # Some platforms predefine the types int8, int16, etc. Only check
18089 # a (hopefully) representative subset.
18090 ac_fn_c_check_type "$LINENO" "int8" "ac_cv_type_int8" "#include <stdio.h>
18092 if test "x$ac_cv_type_int8" = xyes; then :
18094 cat >>confdefs.h <<_ACEOF
18095 #define HAVE_INT8 1
18096 _ACEOF
18100 ac_fn_c_check_type "$LINENO" "uint8" "ac_cv_type_uint8" "#include <stdio.h>
18102 if test "x$ac_cv_type_uint8" = xyes; then :
18104 cat >>confdefs.h <<_ACEOF
18105 #define HAVE_UINT8 1
18106 _ACEOF
18110 ac_fn_c_check_type "$LINENO" "int64" "ac_cv_type_int64" "#include <stdio.h>
18112 if test "x$ac_cv_type_int64" = xyes; then :
18114 cat >>confdefs.h <<_ACEOF
18115 #define HAVE_INT64 1
18116 _ACEOF
18120 ac_fn_c_check_type "$LINENO" "uint64" "ac_cv_type_uint64" "#include <stdio.h>
18122 if test "x$ac_cv_type_uint64" = xyes; then :
18124 cat >>confdefs.h <<_ACEOF
18125 #define HAVE_UINT64 1
18126 _ACEOF
18132 # Some compilers offer a 128-bit integer scalar type.
18133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128" >&5
18134 $as_echo_n "checking for __int128... " >&6; }
18135 if ${pgac_cv__128bit_int+:} false; then :
18136 $as_echo_n "(cached) " >&6
18137 else
18138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18139 /* end confdefs.h. */
18142 * We don't actually run this test, just link it to verify that any support
18143 * functions needed for __int128 are present.
18145 * These are globals to discourage the compiler from folding all the
18146 * arithmetic tests down to compile-time constants. We do not have
18147 * convenient support for 128bit literals at this point...
18149 __int128 a = 48828125;
18150 __int128 b = 97656250;
18153 main ()
18156 __int128 c,d;
18157 a = (a << 12) + 1; /* 200000000001 */
18158 b = (b << 12) + 5; /* 400000000005 */
18159 /* try the most relevant arithmetic ops */
18160 c = a * b;
18161 d = (c + b) / b;
18162 /* must use the results, else compiler may optimize arithmetic away */
18163 if (d != a+1)
18164 return 1;
18167 return 0;
18169 _ACEOF
18170 if ac_fn_c_try_link "$LINENO"; then :
18171 pgac_cv__128bit_int=yes
18172 else
18173 pgac_cv__128bit_int=no
18175 rm -f core conftest.err conftest.$ac_objext \
18176 conftest$ac_exeext conftest.$ac_ext
18178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int" >&5
18179 $as_echo "$pgac_cv__128bit_int" >&6; }
18180 if test x"$pgac_cv__128bit_int" = xyes ; then
18181 # Use of non-default alignment with __int128 tickles bugs in some compilers.
18182 # If not cross-compiling, we can test for bugs and disable use of __int128
18183 # with buggy compilers. If cross-compiling, hope for the best.
18184 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83925
18185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __int128 alignment bug" >&5
18186 $as_echo_n "checking for __int128 alignment bug... " >&6; }
18187 if ${pgac_cv__128bit_int_bug+:} false; then :
18188 $as_echo_n "(cached) " >&6
18189 else
18190 if test "$cross_compiling" = yes; then :
18191 pgac_cv__128bit_int_bug="assuming ok"
18192 else
18193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18194 /* end confdefs.h. */
18196 /* This must match the corresponding code in c.h: */
18197 #if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
18198 #define pg_attribute_aligned(a) __attribute__((aligned(a)))
18199 #endif
18200 typedef __int128 int128a
18201 #if defined(pg_attribute_aligned)
18202 pg_attribute_aligned(8)
18203 #endif
18205 int128a holder;
18206 void pass_by_val(void *buffer, int128a par) { holder = par; }
18209 main ()
18212 long int i64 = 97656225L << 12;
18213 int128a q;
18214 pass_by_val(main, (int128a) i64);
18215 q = (int128a) i64;
18216 if (q != holder)
18217 return 1;
18220 return 0;
18222 _ACEOF
18223 if ac_fn_c_try_run "$LINENO"; then :
18224 pgac_cv__128bit_int_bug=ok
18225 else
18226 pgac_cv__128bit_int_bug=broken
18228 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18229 conftest.$ac_objext conftest.beam conftest.$ac_ext
18233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__128bit_int_bug" >&5
18234 $as_echo "$pgac_cv__128bit_int_bug" >&6; }
18235 if test x"$pgac_cv__128bit_int_bug" != xbroken ; then
18237 $as_echo "#define PG_INT128_TYPE __int128" >>confdefs.h
18239 # The cast to long int works around a bug in the HP C Compiler,
18240 # see AC_CHECK_SIZEOF for more information.
18241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking alignment of PG_INT128_TYPE" >&5
18242 $as_echo_n "checking alignment of PG_INT128_TYPE... " >&6; }
18243 if ${ac_cv_alignof_PG_INT128_TYPE+:} false; then :
18244 $as_echo_n "(cached) " >&6
18245 else
18246 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_PG_INT128_TYPE" "$ac_includes_default
18247 #ifndef offsetof
18248 # define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
18249 #endif
18250 typedef struct { char x; PG_INT128_TYPE y; } ac__type_alignof_;"; then :
18252 else
18253 if test "$ac_cv_type_PG_INT128_TYPE" = yes; then
18254 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18255 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18256 as_fn_error 77 "cannot compute alignment of PG_INT128_TYPE
18257 See \`config.log' for more details" "$LINENO" 5; }
18258 else
18259 ac_cv_alignof_PG_INT128_TYPE=0
18264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_PG_INT128_TYPE" >&5
18265 $as_echo "$ac_cv_alignof_PG_INT128_TYPE" >&6; }
18269 cat >>confdefs.h <<_ACEOF
18270 #define ALIGNOF_PG_INT128_TYPE $ac_cv_alignof_PG_INT128_TYPE
18271 _ACEOF
18277 # Check for various atomic operations now that we have checked how to declare
18278 # 64bit integers.
18279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync char locking functions" >&5
18280 $as_echo_n "checking for builtin __sync char locking functions... " >&6; }
18281 if ${pgac_cv_gcc_sync_char_tas+:} false; then :
18282 $as_echo_n "(cached) " >&6
18283 else
18284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18285 /* end confdefs.h. */
18288 main ()
18290 char lock = 0;
18291 __sync_lock_test_and_set(&lock, 1);
18292 __sync_lock_release(&lock);
18294 return 0;
18296 _ACEOF
18297 if ac_fn_c_try_link "$LINENO"; then :
18298 pgac_cv_gcc_sync_char_tas="yes"
18299 else
18300 pgac_cv_gcc_sync_char_tas="no"
18302 rm -f core conftest.err conftest.$ac_objext \
18303 conftest$ac_exeext conftest.$ac_ext
18305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_char_tas" >&5
18306 $as_echo "$pgac_cv_gcc_sync_char_tas" >&6; }
18307 if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
18309 $as_echo "#define HAVE_GCC__SYNC_CHAR_TAS 1" >>confdefs.h
18312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 locking functions" >&5
18313 $as_echo_n "checking for builtin __sync int32 locking functions... " >&6; }
18314 if ${pgac_cv_gcc_sync_int32_tas+:} false; then :
18315 $as_echo_n "(cached) " >&6
18316 else
18317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18318 /* end confdefs.h. */
18321 main ()
18323 int lock = 0;
18324 __sync_lock_test_and_set(&lock, 1);
18325 __sync_lock_release(&lock);
18327 return 0;
18329 _ACEOF
18330 if ac_fn_c_try_link "$LINENO"; then :
18331 pgac_cv_gcc_sync_int32_tas="yes"
18332 else
18333 pgac_cv_gcc_sync_int32_tas="no"
18335 rm -f core conftest.err conftest.$ac_objext \
18336 conftest$ac_exeext conftest.$ac_ext
18338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_tas" >&5
18339 $as_echo "$pgac_cv_gcc_sync_int32_tas" >&6; }
18340 if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
18342 $as_echo "#define HAVE_GCC__SYNC_INT32_TAS 1" >>confdefs.h
18345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int32 atomic operations" >&5
18346 $as_echo_n "checking for builtin __sync int32 atomic operations... " >&6; }
18347 if ${pgac_cv_gcc_sync_int32_cas+:} false; then :
18348 $as_echo_n "(cached) " >&6
18349 else
18350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18351 /* end confdefs.h. */
18354 main ()
18356 int val = 0;
18357 __sync_val_compare_and_swap(&val, 0, 37);
18359 return 0;
18361 _ACEOF
18362 if ac_fn_c_try_link "$LINENO"; then :
18363 pgac_cv_gcc_sync_int32_cas="yes"
18364 else
18365 pgac_cv_gcc_sync_int32_cas="no"
18367 rm -f core conftest.err conftest.$ac_objext \
18368 conftest$ac_exeext conftest.$ac_ext
18370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int32_cas" >&5
18371 $as_echo "$pgac_cv_gcc_sync_int32_cas" >&6; }
18372 if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
18374 $as_echo "#define HAVE_GCC__SYNC_INT32_CAS 1" >>confdefs.h
18377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __sync int64 atomic operations" >&5
18378 $as_echo_n "checking for builtin __sync int64 atomic operations... " >&6; }
18379 if ${pgac_cv_gcc_sync_int64_cas+:} false; then :
18380 $as_echo_n "(cached) " >&6
18381 else
18382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18383 /* end confdefs.h. */
18386 main ()
18388 PG_INT64_TYPE lock = 0;
18389 __sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);
18391 return 0;
18393 _ACEOF
18394 if ac_fn_c_try_link "$LINENO"; then :
18395 pgac_cv_gcc_sync_int64_cas="yes"
18396 else
18397 pgac_cv_gcc_sync_int64_cas="no"
18399 rm -f core conftest.err conftest.$ac_objext \
18400 conftest$ac_exeext conftest.$ac_ext
18402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_sync_int64_cas" >&5
18403 $as_echo "$pgac_cv_gcc_sync_int64_cas" >&6; }
18404 if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
18406 $as_echo "#define HAVE_GCC__SYNC_INT64_CAS 1" >>confdefs.h
18409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int32 atomic operations" >&5
18410 $as_echo_n "checking for builtin __atomic int32 atomic operations... " >&6; }
18411 if ${pgac_cv_gcc_atomic_int32_cas+:} false; then :
18412 $as_echo_n "(cached) " >&6
18413 else
18414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18415 /* end confdefs.h. */
18418 main ()
18420 int val = 0;
18421 int expect = 0;
18422 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
18424 return 0;
18426 _ACEOF
18427 if ac_fn_c_try_link "$LINENO"; then :
18428 pgac_cv_gcc_atomic_int32_cas="yes"
18429 else
18430 pgac_cv_gcc_atomic_int32_cas="no"
18432 rm -f core conftest.err conftest.$ac_objext \
18433 conftest$ac_exeext conftest.$ac_ext
18435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int32_cas" >&5
18436 $as_echo "$pgac_cv_gcc_atomic_int32_cas" >&6; }
18437 if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
18439 $as_echo "#define HAVE_GCC__ATOMIC_INT32_CAS 1" >>confdefs.h
18442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builtin __atomic int64 atomic operations" >&5
18443 $as_echo_n "checking for builtin __atomic int64 atomic operations... " >&6; }
18444 if ${pgac_cv_gcc_atomic_int64_cas+:} false; then :
18445 $as_echo_n "(cached) " >&6
18446 else
18447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18448 /* end confdefs.h. */
18451 main ()
18453 PG_INT64_TYPE val = 0;
18454 PG_INT64_TYPE expect = 0;
18455 __atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);
18457 return 0;
18459 _ACEOF
18460 if ac_fn_c_try_link "$LINENO"; then :
18461 pgac_cv_gcc_atomic_int64_cas="yes"
18462 else
18463 pgac_cv_gcc_atomic_int64_cas="no"
18465 rm -f core conftest.err conftest.$ac_objext \
18466 conftest$ac_exeext conftest.$ac_ext
18468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_gcc_atomic_int64_cas" >&5
18469 $as_echo "$pgac_cv_gcc_atomic_int64_cas" >&6; }
18470 if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
18472 $as_echo "#define HAVE_GCC__ATOMIC_INT64_CAS 1" >>confdefs.h
18477 # Check for x86 cpuid instruction
18478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __get_cpuid" >&5
18479 $as_echo_n "checking for __get_cpuid... " >&6; }
18480 if ${pgac_cv__get_cpuid+:} false; then :
18481 $as_echo_n "(cached) " >&6
18482 else
18483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18484 /* end confdefs.h. */
18485 #include <cpuid.h>
18487 main ()
18489 unsigned int exx[4] = {0, 0, 0, 0};
18490 __get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
18493 return 0;
18495 _ACEOF
18496 if ac_fn_c_try_link "$LINENO"; then :
18497 pgac_cv__get_cpuid="yes"
18498 else
18499 pgac_cv__get_cpuid="no"
18501 rm -f core conftest.err conftest.$ac_objext \
18502 conftest$ac_exeext conftest.$ac_ext
18504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__get_cpuid" >&5
18505 $as_echo "$pgac_cv__get_cpuid" >&6; }
18506 if test x"$pgac_cv__get_cpuid" = x"yes"; then
18508 $as_echo "#define HAVE__GET_CPUID 1" >>confdefs.h
18512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cpuid" >&5
18513 $as_echo_n "checking for __cpuid... " >&6; }
18514 if ${pgac_cv__cpuid+:} false; then :
18515 $as_echo_n "(cached) " >&6
18516 else
18517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18518 /* end confdefs.h. */
18519 #include <intrin.h>
18521 main ()
18523 unsigned int exx[4] = {0, 0, 0, 0};
18524 __get_cpuid(exx[0], 1);
18527 return 0;
18529 _ACEOF
18530 if ac_fn_c_try_link "$LINENO"; then :
18531 pgac_cv__cpuid="yes"
18532 else
18533 pgac_cv__cpuid="no"
18535 rm -f core conftest.err conftest.$ac_objext \
18536 conftest$ac_exeext conftest.$ac_ext
18538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv__cpuid" >&5
18539 $as_echo "$pgac_cv__cpuid" >&6; }
18540 if test x"$pgac_cv__cpuid" = x"yes"; then
18542 $as_echo "#define HAVE__CPUID 1" >>confdefs.h
18546 # Check for Intel SSE 4.2 intrinsics to do CRC calculations.
18548 # First check if the _mm_crc32_u8 and _mm_crc32_u64 intrinsics can be used
18549 # with the default compiler flags. If not, check if adding the -msse4.2
18550 # flag helps. CFLAGS_SSE42 is set to -msse4.2 if that's required.
18551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=" >&5
18552 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=... " >&6; }
18553 if ${pgac_cv_sse42_crc32_intrinsics_+:} false; then :
18554 $as_echo_n "(cached) " >&6
18555 else
18556 pgac_save_CFLAGS=$CFLAGS
18557 CFLAGS="$pgac_save_CFLAGS "
18558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18559 /* end confdefs.h. */
18560 #include <nmmintrin.h>
18562 main ()
18564 unsigned int crc = 0;
18565 crc = _mm_crc32_u8(crc, 0);
18566 crc = _mm_crc32_u32(crc, 0);
18567 /* return computed value, to prevent the above being optimized away */
18568 return crc == 0;
18570 return 0;
18572 _ACEOF
18573 if ac_fn_c_try_link "$LINENO"; then :
18574 pgac_cv_sse42_crc32_intrinsics_=yes
18575 else
18576 pgac_cv_sse42_crc32_intrinsics_=no
18578 rm -f core conftest.err conftest.$ac_objext \
18579 conftest$ac_exeext conftest.$ac_ext
18580 CFLAGS="$pgac_save_CFLAGS"
18582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics_" >&5
18583 $as_echo "$pgac_cv_sse42_crc32_intrinsics_" >&6; }
18584 if test x"$pgac_cv_sse42_crc32_intrinsics_" = x"yes"; then
18585 CFLAGS_SSE42=""
18586 pgac_sse42_crc32_intrinsics=yes
18589 if test x"$pgac_sse42_crc32_intrinsics" != x"yes"; then
18590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2" >&5
18591 $as_echo_n "checking for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=-msse4.2... " >&6; }
18592 if ${pgac_cv_sse42_crc32_intrinsics__msse4_2+:} false; then :
18593 $as_echo_n "(cached) " >&6
18594 else
18595 pgac_save_CFLAGS=$CFLAGS
18596 CFLAGS="$pgac_save_CFLAGS -msse4.2"
18597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18598 /* end confdefs.h. */
18599 #include <nmmintrin.h>
18601 main ()
18603 unsigned int crc = 0;
18604 crc = _mm_crc32_u8(crc, 0);
18605 crc = _mm_crc32_u32(crc, 0);
18606 /* return computed value, to prevent the above being optimized away */
18607 return crc == 0;
18609 return 0;
18611 _ACEOF
18612 if ac_fn_c_try_link "$LINENO"; then :
18613 pgac_cv_sse42_crc32_intrinsics__msse4_2=yes
18614 else
18615 pgac_cv_sse42_crc32_intrinsics__msse4_2=no
18617 rm -f core conftest.err conftest.$ac_objext \
18618 conftest$ac_exeext conftest.$ac_ext
18619 CFLAGS="$pgac_save_CFLAGS"
18621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_sse42_crc32_intrinsics__msse4_2" >&5
18622 $as_echo "$pgac_cv_sse42_crc32_intrinsics__msse4_2" >&6; }
18623 if test x"$pgac_cv_sse42_crc32_intrinsics__msse4_2" = x"yes"; then
18624 CFLAGS_SSE42="-msse4.2"
18625 pgac_sse42_crc32_intrinsics=yes
18631 # Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
18632 # define __SSE4_2__ in that case.
18633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18634 /* end confdefs.h. */
18637 main ()
18640 #ifndef __SSE4_2__
18641 #error __SSE4_2__ not defined
18642 #endif
18645 return 0;
18647 _ACEOF
18648 if ac_fn_c_try_compile "$LINENO"; then :
18649 SSE4_2_TARGETED=1
18651 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18653 # Check for ARMv8 CRC Extension intrinsics to do CRC calculations.
18655 # First check if __crc32c* intrinsics can be used with the default compiler
18656 # flags. If not, check if adding -march=armv8-a+crc flag helps.
18657 # CFLAGS_ARMV8_CRC32C is set if the extra flag is required.
18658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=" >&5
18659 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=... " >&6; }
18660 if ${pgac_cv_armv8_crc32c_intrinsics_+:} false; then :
18661 $as_echo_n "(cached) " >&6
18662 else
18663 pgac_save_CFLAGS=$CFLAGS
18664 CFLAGS="$pgac_save_CFLAGS "
18665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18666 /* end confdefs.h. */
18667 #include <arm_acle.h>
18669 main ()
18671 unsigned int crc = 0;
18672 crc = __crc32cb(crc, 0);
18673 crc = __crc32ch(crc, 0);
18674 crc = __crc32cw(crc, 0);
18675 crc = __crc32cd(crc, 0);
18676 /* return computed value, to prevent the above being optimized away */
18677 return crc == 0;
18679 return 0;
18681 _ACEOF
18682 if ac_fn_c_try_link "$LINENO"; then :
18683 pgac_cv_armv8_crc32c_intrinsics_=yes
18684 else
18685 pgac_cv_armv8_crc32c_intrinsics_=no
18687 rm -f core conftest.err conftest.$ac_objext \
18688 conftest$ac_exeext conftest.$ac_ext
18689 CFLAGS="$pgac_save_CFLAGS"
18691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics_" >&5
18692 $as_echo "$pgac_cv_armv8_crc32c_intrinsics_" >&6; }
18693 if test x"$pgac_cv_armv8_crc32c_intrinsics_" = x"yes"; then
18694 CFLAGS_ARMV8_CRC32C=""
18695 pgac_armv8_crc32c_intrinsics=yes
18698 if test x"$pgac_armv8_crc32c_intrinsics" != x"yes"; then
18699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc" >&5
18700 $as_echo_n "checking for __crc32cb, __crc32ch, __crc32cw, and __crc32cd with CFLAGS=-march=armv8-a+crc... " >&6; }
18701 if ${pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc+:} false; then :
18702 $as_echo_n "(cached) " >&6
18703 else
18704 pgac_save_CFLAGS=$CFLAGS
18705 CFLAGS="$pgac_save_CFLAGS -march=armv8-a+crc"
18706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18707 /* end confdefs.h. */
18708 #include <arm_acle.h>
18710 main ()
18712 unsigned int crc = 0;
18713 crc = __crc32cb(crc, 0);
18714 crc = __crc32ch(crc, 0);
18715 crc = __crc32cw(crc, 0);
18716 crc = __crc32cd(crc, 0);
18717 /* return computed value, to prevent the above being optimized away */
18718 return crc == 0;
18720 return 0;
18722 _ACEOF
18723 if ac_fn_c_try_link "$LINENO"; then :
18724 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=yes
18725 else
18726 pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc=no
18728 rm -f core conftest.err conftest.$ac_objext \
18729 conftest$ac_exeext conftest.$ac_ext
18730 CFLAGS="$pgac_save_CFLAGS"
18732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&5
18733 $as_echo "$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" >&6; }
18734 if test x"$pgac_cv_armv8_crc32c_intrinsics__march_armv8_apcrc" = x"yes"; then
18735 CFLAGS_ARMV8_CRC32C="-march=armv8-a+crc"
18736 pgac_armv8_crc32c_intrinsics=yes
18742 # Select CRC-32C implementation.
18744 # If we are targeting a processor that has Intel SSE 4.2 instructions, we can
18745 # use the special CRC instructions for calculating CRC-32C. If we're not
18746 # targeting such a processor, but we can nevertheless produce code that uses
18747 # the SSE intrinsics, perhaps with some extra CFLAGS, compile both
18748 # implementations and select which one to use at runtime, depending on whether
18749 # SSE 4.2 is supported by the processor we're running on.
18751 # Similarly, if we are targeting an ARM processor that has the CRC
18752 # instructions that are part of the ARMv8 CRC Extension, use them. And if
18753 # we're not targeting such a processor, but can nevertheless produce code that
18754 # uses the CRC instructions, compile both, and select at runtime.
18756 # You can override this logic by setting the appropriate USE_*_CRC32 flag to 1
18757 # in the template or configure command line.
18758 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
18759 # Use Intel SSE 4.2 if available.
18760 if test x"$pgac_sse42_crc32_intrinsics" = x"yes" && test x"$SSE4_2_TARGETED" = x"1" ; then
18761 USE_SSE42_CRC32C=1
18762 else
18763 # Intel SSE 4.2, with runtime check? The CPUID instruction is needed for
18764 # the runtime check.
18765 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
18766 USE_SSE42_CRC32C_WITH_RUNTIME_CHECK=1
18767 else
18768 # Use ARM CRC Extension if available.
18769 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes" && test x"$CFLAGS_ARMV8_CRC32C" = x""; then
18770 USE_ARMV8_CRC32C=1
18771 else
18772 # ARM CRC Extension, with runtime check?
18773 if test x"$pgac_armv8_crc32c_intrinsics" = x"yes"; then
18774 USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK=1
18775 else
18776 # fall back to slicing-by-8 algorithm, which doesn't require any
18777 # special CPU support.
18778 USE_SLICING_BY_8_CRC32C=1
18785 # Set PG_CRC32C_OBJS appropriately depending on the selected implementation.
18786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which CRC-32C implementation to use" >&5
18787 $as_echo_n "checking which CRC-32C implementation to use... " >&6; }
18788 if test x"$USE_SSE42_CRC32C" = x"1"; then
18790 $as_echo "#define USE_SSE42_CRC32C 1" >>confdefs.h
18792 PG_CRC32C_OBJS="pg_crc32c_sse42.o"
18793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2" >&5
18794 $as_echo "SSE 4.2" >&6; }
18795 else
18796 if test x"$USE_SSE42_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18798 $as_echo "#define USE_SSE42_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18800 PG_CRC32C_OBJS="pg_crc32c_sse42.o pg_crc32c_sb8.o pg_crc32c_sse42_choose.o"
18801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SSE 4.2 with runtime check" >&5
18802 $as_echo "SSE 4.2 with runtime check" >&6; }
18803 else
18804 if test x"$USE_ARMV8_CRC32C" = x"1"; then
18806 $as_echo "#define USE_ARMV8_CRC32C 1" >>confdefs.h
18808 PG_CRC32C_OBJS="pg_crc32c_armv8.o"
18809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions" >&5
18810 $as_echo "ARMv8 CRC instructions" >&6; }
18811 else
18812 if test x"$USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK" = x"1"; then
18814 $as_echo "#define USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK 1" >>confdefs.h
18816 PG_CRC32C_OBJS="pg_crc32c_armv8.o pg_crc32c_sb8.o pg_crc32c_armv8_choose.o"
18817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ARMv8 CRC instructions with runtime check" >&5
18818 $as_echo "ARMv8 CRC instructions with runtime check" >&6; }
18819 else
18821 $as_echo "#define USE_SLICING_BY_8_CRC32C 1" >>confdefs.h
18823 PG_CRC32C_OBJS="pg_crc32c_sb8.o"
18824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: slicing-by-8" >&5
18825 $as_echo "slicing-by-8" >&6; }
18833 # Select semaphore implementation type.
18834 if test "$PORTNAME" != "win32"; then
18835 if test x"$PREFERRED_SEMAPHORES" = x"NAMED_POSIX" ; then
18836 # Need sem_open for this
18837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
18838 $as_echo_n "checking for library containing sem_open... " >&6; }
18839 if ${ac_cv_search_sem_open+:} false; then :
18840 $as_echo_n "(cached) " >&6
18841 else
18842 ac_func_search_save_LIBS=$LIBS
18843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18844 /* end confdefs.h. */
18846 /* Override any GCC internal prototype to avoid an error.
18847 Use char because int might match the return type of a GCC
18848 builtin and then its argument prototype would still apply. */
18849 #ifdef __cplusplus
18850 extern "C"
18851 #endif
18852 char sem_open ();
18854 main ()
18856 return sem_open ();
18858 return 0;
18860 _ACEOF
18861 for ac_lib in '' rt pthread; do
18862 if test -z "$ac_lib"; then
18863 ac_res="none required"
18864 else
18865 ac_res=-l$ac_lib
18866 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18868 if ac_fn_c_try_link "$LINENO"; then :
18869 ac_cv_search_sem_open=$ac_res
18871 rm -f core conftest.err conftest.$ac_objext \
18872 conftest$ac_exeext
18873 if ${ac_cv_search_sem_open+:} false; then :
18874 break
18876 done
18877 if ${ac_cv_search_sem_open+:} false; then :
18879 else
18880 ac_cv_search_sem_open=no
18882 rm conftest.$ac_ext
18883 LIBS=$ac_func_search_save_LIBS
18885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
18886 $as_echo "$ac_cv_search_sem_open" >&6; }
18887 ac_res=$ac_cv_search_sem_open
18888 if test "$ac_res" != no; then :
18889 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18890 USE_NAMED_POSIX_SEMAPHORES=1
18894 if test x"$PREFERRED_SEMAPHORES" = x"UNNAMED_POSIX" ; then
18895 # Need sem_init for this
18896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
18897 $as_echo_n "checking for library containing sem_init... " >&6; }
18898 if ${ac_cv_search_sem_init+:} false; then :
18899 $as_echo_n "(cached) " >&6
18900 else
18901 ac_func_search_save_LIBS=$LIBS
18902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18903 /* end confdefs.h. */
18905 /* Override any GCC internal prototype to avoid an error.
18906 Use char because int might match the return type of a GCC
18907 builtin and then its argument prototype would still apply. */
18908 #ifdef __cplusplus
18909 extern "C"
18910 #endif
18911 char sem_init ();
18913 main ()
18915 return sem_init ();
18917 return 0;
18919 _ACEOF
18920 for ac_lib in '' rt pthread; do
18921 if test -z "$ac_lib"; then
18922 ac_res="none required"
18923 else
18924 ac_res=-l$ac_lib
18925 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18927 if ac_fn_c_try_link "$LINENO"; then :
18928 ac_cv_search_sem_init=$ac_res
18930 rm -f core conftest.err conftest.$ac_objext \
18931 conftest$ac_exeext
18932 if ${ac_cv_search_sem_init+:} false; then :
18933 break
18935 done
18936 if ${ac_cv_search_sem_init+:} false; then :
18938 else
18939 ac_cv_search_sem_init=no
18941 rm conftest.$ac_ext
18942 LIBS=$ac_func_search_save_LIBS
18944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
18945 $as_echo "$ac_cv_search_sem_init" >&6; }
18946 ac_res=$ac_cv_search_sem_init
18947 if test "$ac_res" != no; then :
18948 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18949 USE_UNNAMED_POSIX_SEMAPHORES=1
18953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which semaphore API to use" >&5
18954 $as_echo_n "checking which semaphore API to use... " >&6; }
18955 if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
18957 $as_echo "#define USE_NAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18959 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18960 sematype="named POSIX"
18961 else
18962 if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
18964 $as_echo "#define USE_UNNAMED_POSIX_SEMAPHORES 1" >>confdefs.h
18966 SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
18967 sematype="unnamed POSIX"
18968 else
18970 $as_echo "#define USE_SYSV_SEMAPHORES 1" >>confdefs.h
18972 SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
18973 sematype="System V"
18976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sematype" >&5
18977 $as_echo "$sematype" >&6; }
18978 else
18980 $as_echo "#define USE_WIN32_SEMAPHORES 1" >>confdefs.h
18982 SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
18986 # Select shared-memory implementation type.
18987 if test "$PORTNAME" != "win32"; then
18989 $as_echo "#define USE_SYSV_SHARED_MEMORY 1" >>confdefs.h
18991 SHMEM_IMPLEMENTATION="src/backend/port/sysv_shmem.c"
18992 else
18994 $as_echo "#define USE_WIN32_SHARED_MEMORY 1" >>confdefs.h
18996 SHMEM_IMPLEMENTATION="src/backend/port/win32_shmem.c"
18999 # Select random number source. If a TLS library is used then it will be the
19000 # first choice, else the native platform sources (Windows API or /dev/urandom)
19001 # will be used.
19002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which random number source to use" >&5
19003 $as_echo_n "checking which random number source to use... " >&6; }
19004 if test x"$with_ssl" = x"openssl" ; then
19005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenSSL" >&5
19006 $as_echo "OpenSSL" >&6; }
19007 elif test x"$PORTNAME" = x"win32" ; then
19008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows native" >&5
19009 $as_echo "Windows native" >&6; }
19010 elif test x"$cross_compiling" = x"yes"; then
19011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assuming /dev/urandom" >&5
19012 $as_echo "assuming /dev/urandom" >&6; }
19013 else
19014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: /dev/urandom" >&5
19015 $as_echo "/dev/urandom" >&6; }
19016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5
19017 $as_echo_n "checking for /dev/urandom... " >&6; }
19018 if ${ac_cv_file__dev_urandom+:} false; then :
19019 $as_echo_n "(cached) " >&6
19020 else
19021 test "$cross_compiling" = yes &&
19022 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
19023 if test -r "/dev/urandom"; then
19024 ac_cv_file__dev_urandom=yes
19025 else
19026 ac_cv_file__dev_urandom=no
19029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5
19030 $as_echo "$ac_cv_file__dev_urandom" >&6; }
19031 if test "x$ac_cv_file__dev_urandom" = xyes; then :
19036 if test x"$ac_cv_file__dev_urandom" = x"no" ; then
19037 as_fn_error $? "
19038 no source of strong random numbers was found
19039 PostgreSQL can use OpenSSL, native Windows API or /dev/urandom as a source of random numbers." "$LINENO" 5
19043 # If not set in template file, set bytes to use libc memset()
19044 if test x"$MEMSET_LOOP_LIMIT" = x"" ; then
19045 MEMSET_LOOP_LIMIT=1024
19048 cat >>confdefs.h <<_ACEOF
19049 #define MEMSET_LOOP_LIMIT ${MEMSET_LOOP_LIMIT}
19050 _ACEOF
19054 if test "$enable_nls" = yes ; then
19056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind_textdomain_codeset" >&5
19057 $as_echo_n "checking for library containing bind_textdomain_codeset... " >&6; }
19058 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
19059 $as_echo_n "(cached) " >&6
19060 else
19061 ac_func_search_save_LIBS=$LIBS
19062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19063 /* end confdefs.h. */
19065 /* Override any GCC internal prototype to avoid an error.
19066 Use char because int might match the return type of a GCC
19067 builtin and then its argument prototype would still apply. */
19068 #ifdef __cplusplus
19069 extern "C"
19070 #endif
19071 char bind_textdomain_codeset ();
19073 main ()
19075 return bind_textdomain_codeset ();
19077 return 0;
19079 _ACEOF
19080 for ac_lib in '' intl; do
19081 if test -z "$ac_lib"; then
19082 ac_res="none required"
19083 else
19084 ac_res=-l$ac_lib
19085 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
19087 if ac_fn_c_try_link "$LINENO"; then :
19088 ac_cv_search_bind_textdomain_codeset=$ac_res
19090 rm -f core conftest.err conftest.$ac_objext \
19091 conftest$ac_exeext
19092 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
19093 break
19095 done
19096 if ${ac_cv_search_bind_textdomain_codeset+:} false; then :
19098 else
19099 ac_cv_search_bind_textdomain_codeset=no
19101 rm conftest.$ac_ext
19102 LIBS=$ac_func_search_save_LIBS
19104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind_textdomain_codeset" >&5
19105 $as_echo "$ac_cv_search_bind_textdomain_codeset" >&6; }
19106 ac_res=$ac_cv_search_bind_textdomain_codeset
19107 if test "$ac_res" != no; then :
19108 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19110 else
19111 as_fn_error $? "a gettext implementation is required for NLS" "$LINENO" 5
19114 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
19115 if test "x$ac_cv_header_libintl_h" = xyes; then :
19117 else
19118 as_fn_error $? "header file <libintl.h> is required for NLS" "$LINENO" 5
19122 if test -z "$MSGFMT"; then
19123 for ac_prog in msgfmt
19125 # Extract the first word of "$ac_prog", so it can be a program name with args.
19126 set dummy $ac_prog; ac_word=$2
19127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19128 $as_echo_n "checking for $ac_word... " >&6; }
19129 if ${ac_cv_path_MSGFMT+:} false; then :
19130 $as_echo_n "(cached) " >&6
19131 else
19132 case $MSGFMT in
19133 [\\/]* | ?:[\\/]*)
19134 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
19137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19138 for as_dir in $PATH
19140 IFS=$as_save_IFS
19141 test -z "$as_dir" && as_dir=.
19142 for ac_exec_ext in '' $ac_executable_extensions; do
19143 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19144 ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
19145 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19146 break 2
19148 done
19149 done
19150 IFS=$as_save_IFS
19153 esac
19155 MSGFMT=$ac_cv_path_MSGFMT
19156 if test -n "$MSGFMT"; then
19157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
19158 $as_echo "$MSGFMT" >&6; }
19159 else
19160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19161 $as_echo "no" >&6; }
19165 test -n "$MSGFMT" && break
19166 done
19168 else
19169 # Report the value of MSGFMT in configure's output in all cases.
19170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGFMT" >&5
19171 $as_echo_n "checking for MSGFMT... " >&6; }
19172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
19173 $as_echo "$MSGFMT" >&6; }
19176 if test -z "$MSGFMT"; then
19177 as_fn_error $? "msgfmt is required for NLS" "$LINENO" 5
19179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msgfmt flags" >&5
19180 $as_echo_n "checking for msgfmt flags... " >&6; }
19181 if ${pgac_cv_msgfmt_flags+:} false; then :
19182 $as_echo_n "(cached) " >&6
19183 else
19184 if test x"$MSGFMT" != x"" && "$MSGFMT" --version 2>&1 | grep "GNU" >/dev/null; then
19185 pgac_cv_msgfmt_flags=-c
19188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_msgfmt_flags" >&5
19189 $as_echo "$pgac_cv_msgfmt_flags" >&6; }
19190 MSGFMT_FLAGS=$pgac_cv_msgfmt_flags
19192 if test -z "$MSGMERGE"; then
19193 for ac_prog in msgmerge
19195 # Extract the first word of "$ac_prog", so it can be a program name with args.
19196 set dummy $ac_prog; ac_word=$2
19197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19198 $as_echo_n "checking for $ac_word... " >&6; }
19199 if ${ac_cv_path_MSGMERGE+:} false; then :
19200 $as_echo_n "(cached) " >&6
19201 else
19202 case $MSGMERGE in
19203 [\\/]* | ?:[\\/]*)
19204 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
19207 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19208 for as_dir in $PATH
19210 IFS=$as_save_IFS
19211 test -z "$as_dir" && as_dir=.
19212 for ac_exec_ext in '' $ac_executable_extensions; do
19213 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19214 ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
19215 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19216 break 2
19218 done
19219 done
19220 IFS=$as_save_IFS
19223 esac
19225 MSGMERGE=$ac_cv_path_MSGMERGE
19226 if test -n "$MSGMERGE"; then
19227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
19228 $as_echo "$MSGMERGE" >&6; }
19229 else
19230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19231 $as_echo "no" >&6; }
19235 test -n "$MSGMERGE" && break
19236 done
19238 else
19239 # Report the value of MSGMERGE in configure's output in all cases.
19240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MSGMERGE" >&5
19241 $as_echo_n "checking for MSGMERGE... " >&6; }
19242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
19243 $as_echo "$MSGMERGE" >&6; }
19246 if test -z "$XGETTEXT"; then
19247 for ac_prog in xgettext
19249 # Extract the first word of "$ac_prog", so it can be a program name with args.
19250 set dummy $ac_prog; ac_word=$2
19251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19252 $as_echo_n "checking for $ac_word... " >&6; }
19253 if ${ac_cv_path_XGETTEXT+:} false; then :
19254 $as_echo_n "(cached) " >&6
19255 else
19256 case $XGETTEXT in
19257 [\\/]* | ?:[\\/]*)
19258 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
19261 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19262 for as_dir in $PATH
19264 IFS=$as_save_IFS
19265 test -z "$as_dir" && as_dir=.
19266 for ac_exec_ext in '' $ac_executable_extensions; do
19267 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19268 ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
19269 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19270 break 2
19272 done
19273 done
19274 IFS=$as_save_IFS
19277 esac
19279 XGETTEXT=$ac_cv_path_XGETTEXT
19280 if test -n "$XGETTEXT"; then
19281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
19282 $as_echo "$XGETTEXT" >&6; }
19283 else
19284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19285 $as_echo "no" >&6; }
19289 test -n "$XGETTEXT" && break
19290 done
19292 else
19293 # Report the value of XGETTEXT in configure's output in all cases.
19294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XGETTEXT" >&5
19295 $as_echo_n "checking for XGETTEXT... " >&6; }
19296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
19297 $as_echo "$XGETTEXT" >&6; }
19303 # Check for Tcl configuration script tclConfig.sh
19304 if test "$with_tcl" = yes; then
19305 if test -z "$TCLSH"; then
19306 for ac_prog in tclsh tcl tclsh8.6 tclsh86 tclsh8.5 tclsh85 tclsh8.4 tclsh84
19308 # Extract the first word of "$ac_prog", so it can be a program name with args.
19309 set dummy $ac_prog; ac_word=$2
19310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19311 $as_echo_n "checking for $ac_word... " >&6; }
19312 if ${ac_cv_path_TCLSH+:} false; then :
19313 $as_echo_n "(cached) " >&6
19314 else
19315 case $TCLSH in
19316 [\\/]* | ?:[\\/]*)
19317 ac_cv_path_TCLSH="$TCLSH" # Let the user override the test with a path.
19320 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19321 for as_dir in $PATH
19323 IFS=$as_save_IFS
19324 test -z "$as_dir" && as_dir=.
19325 for ac_exec_ext in '' $ac_executable_extensions; do
19326 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19327 ac_cv_path_TCLSH="$as_dir/$ac_word$ac_exec_ext"
19328 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19329 break 2
19331 done
19332 done
19333 IFS=$as_save_IFS
19336 esac
19338 TCLSH=$ac_cv_path_TCLSH
19339 if test -n "$TCLSH"; then
19340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
19341 $as_echo "$TCLSH" >&6; }
19342 else
19343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19344 $as_echo "no" >&6; }
19348 test -n "$TCLSH" && break
19349 done
19351 else
19352 # Report the value of TCLSH in configure's output in all cases.
19353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCLSH" >&5
19354 $as_echo_n "checking for TCLSH... " >&6; }
19355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH" >&5
19356 $as_echo "$TCLSH" >&6; }
19359 if test x"$TCLSH" = x""; then
19360 as_fn_error $? "Tcl shell not found" "$LINENO" 5
19363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5
19364 $as_echo_n "checking for tclConfig.sh... " >&6; }
19365 # Let user override test
19366 if test -z "$TCL_CONFIG_SH"; then
19367 pgac_test_dirs="$with_tclconfig"
19369 set X $pgac_test_dirs; shift
19370 if test $# -eq 0; then
19371 test -z "$TCLSH" && as_fn_error $? "unable to locate tclConfig.sh because no Tcl shell was found" "$LINENO" 5
19372 pgac_test_dirs=`echo 'puts $auto_path' | $TCLSH`
19373 # On newer macOS, $auto_path frequently doesn't include the place
19374 # where tclConfig.sh actually lives. Append that to the end, so as not
19375 # to break cases where a non-default Tcl installation is being used.
19376 if test -d "$PG_SYSROOT/System/Library/Frameworks/Tcl.framework" ; then
19377 pgac_test_dirs="$pgac_test_dirs $PG_SYSROOT/System/Library/Frameworks/Tcl.framework"
19379 set X $pgac_test_dirs; shift
19382 for pgac_dir do
19383 if test -r "$pgac_dir/tclConfig.sh"; then
19384 TCL_CONFIG_SH=$pgac_dir/tclConfig.sh
19385 break
19387 done
19390 if test -z "$TCL_CONFIG_SH"; then
19391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19392 $as_echo "no" >&6; }
19393 as_fn_error $? "file 'tclConfig.sh' is required for Tcl" "$LINENO" 5
19394 else
19395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCL_CONFIG_SH" >&5
19396 $as_echo "$TCL_CONFIG_SH" >&6; }
19401 . "$TCL_CONFIG_SH"
19402 eval TCL_INCLUDE_SPEC=\"$TCL_INCLUDE_SPEC\"
19403 eval TCL_LIBS=\"$TCL_LIBS\"
19404 eval TCL_LIB_SPEC=\"$TCL_LIB_SPEC\"
19405 eval TCL_SHARED_BUILD=\"$TCL_SHARED_BUILD\"
19407 if test "$TCL_SHARED_BUILD" != 1; then
19408 as_fn_error $? "cannot build PL/Tcl because Tcl is not a shared library
19409 Use --without-tcl to disable building PL/Tcl." "$LINENO" 5
19411 # now that we have TCL_INCLUDE_SPEC, we can check for <tcl.h>
19412 ac_save_CPPFLAGS=$CPPFLAGS
19413 CPPFLAGS="$TCL_INCLUDE_SPEC $CPPFLAGS"
19414 ac_fn_c_check_header_mongrel "$LINENO" "tcl.h" "ac_cv_header_tcl_h" "$ac_includes_default"
19415 if test "x$ac_cv_header_tcl_h" = xyes; then :
19417 else
19418 as_fn_error $? "header file <tcl.h> is required for Tcl" "$LINENO" 5
19422 CPPFLAGS=$ac_save_CPPFLAGS
19425 # check for <perl.h>
19426 if test "$with_perl" = yes; then
19427 ac_save_CPPFLAGS=$CPPFLAGS
19428 CPPFLAGS="$CPPFLAGS $perl_includespec"
19429 ac_fn_c_check_header_compile "$LINENO" "perl.h" "ac_cv_header_perl_h" "#include <EXTERN.h>
19431 if test "x$ac_cv_header_perl_h" = xyes; then :
19433 else
19434 as_fn_error $? "header file <perl.h> is required for Perl" "$LINENO" 5
19438 # While we're at it, check that we can link to libperl.
19439 # On most platforms, if perl.h is there then libperl.so will be too, but at
19440 # this writing Debian packages them separately. There is no known reason to
19441 # waste cycles on separate probes for the Tcl or Python libraries, though.
19442 # On some Red Hat platforms, the link attempt can fail if we don't use
19443 # CFLAGS_SL while building the test program.
19444 ac_save_CFLAGS=$CFLAGS
19445 CFLAGS="$CFLAGS $CFLAGS_SL"
19446 pgac_save_LIBS=$LIBS
19447 LIBS="$perl_embed_ldflags"
19448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libperl" >&5
19449 $as_echo_n "checking for libperl... " >&6; }
19450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19451 /* end confdefs.h. */
19453 #include <EXTERN.h>
19454 #include <perl.h>
19457 main ()
19459 perl_alloc();
19461 return 0;
19463 _ACEOF
19464 if ac_fn_c_try_link "$LINENO"; then :
19465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19466 $as_echo "yes" >&6; }
19467 else
19468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19469 $as_echo "no" >&6; }
19470 as_fn_error $? "libperl library is required for Perl" "$LINENO" 5
19472 rm -f core conftest.err conftest.$ac_objext \
19473 conftest$ac_exeext conftest.$ac_ext
19474 LIBS=$pgac_save_LIBS
19475 CFLAGS=$ac_save_CFLAGS
19476 CPPFLAGS=$ac_save_CPPFLAGS
19479 # check for <Python.h>
19480 if test "$with_python" = yes; then
19481 ac_save_CPPFLAGS=$CPPFLAGS
19482 CPPFLAGS="$python_includespec $CPPFLAGS"
19483 ac_fn_c_check_header_mongrel "$LINENO" "Python.h" "ac_cv_header_Python_h" "$ac_includes_default"
19484 if test "x$ac_cv_header_Python_h" = xyes; then :
19486 else
19487 as_fn_error $? "header file <Python.h> is required for Python" "$LINENO" 5
19491 CPPFLAGS=$ac_save_CPPFLAGS
19495 # Check for documentation-building tools
19497 if test -z "$XMLLINT"; then
19498 for ac_prog in xmllint
19500 # Extract the first word of "$ac_prog", so it can be a program name with args.
19501 set dummy $ac_prog; ac_word=$2
19502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19503 $as_echo_n "checking for $ac_word... " >&6; }
19504 if ${ac_cv_path_XMLLINT+:} false; then :
19505 $as_echo_n "(cached) " >&6
19506 else
19507 case $XMLLINT in
19508 [\\/]* | ?:[\\/]*)
19509 ac_cv_path_XMLLINT="$XMLLINT" # Let the user override the test with a path.
19512 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19513 for as_dir in $PATH
19515 IFS=$as_save_IFS
19516 test -z "$as_dir" && as_dir=.
19517 for ac_exec_ext in '' $ac_executable_extensions; do
19518 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19519 ac_cv_path_XMLLINT="$as_dir/$ac_word$ac_exec_ext"
19520 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19521 break 2
19523 done
19524 done
19525 IFS=$as_save_IFS
19528 esac
19530 XMLLINT=$ac_cv_path_XMLLINT
19531 if test -n "$XMLLINT"; then
19532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
19533 $as_echo "$XMLLINT" >&6; }
19534 else
19535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19536 $as_echo "no" >&6; }
19540 test -n "$XMLLINT" && break
19541 done
19543 else
19544 # Report the value of XMLLINT in configure's output in all cases.
19545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XMLLINT" >&5
19546 $as_echo_n "checking for XMLLINT... " >&6; }
19547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5
19548 $as_echo "$XMLLINT" >&6; }
19551 if test -z "$XSLTPROC"; then
19552 for ac_prog in xsltproc
19554 # Extract the first word of "$ac_prog", so it can be a program name with args.
19555 set dummy $ac_prog; ac_word=$2
19556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19557 $as_echo_n "checking for $ac_word... " >&6; }
19558 if ${ac_cv_path_XSLTPROC+:} false; then :
19559 $as_echo_n "(cached) " >&6
19560 else
19561 case $XSLTPROC in
19562 [\\/]* | ?:[\\/]*)
19563 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19567 for as_dir in $PATH
19569 IFS=$as_save_IFS
19570 test -z "$as_dir" && as_dir=.
19571 for ac_exec_ext in '' $ac_executable_extensions; do
19572 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19573 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19574 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19575 break 2
19577 done
19578 done
19579 IFS=$as_save_IFS
19582 esac
19584 XSLTPROC=$ac_cv_path_XSLTPROC
19585 if test -n "$XSLTPROC"; then
19586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19587 $as_echo "$XSLTPROC" >&6; }
19588 else
19589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19590 $as_echo "no" >&6; }
19594 test -n "$XSLTPROC" && break
19595 done
19597 else
19598 # Report the value of XSLTPROC in configure's output in all cases.
19599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XSLTPROC" >&5
19600 $as_echo_n "checking for XSLTPROC... " >&6; }
19601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19602 $as_echo "$XSLTPROC" >&6; }
19605 if test -z "$FOP"; then
19606 for ac_prog in fop
19608 # Extract the first word of "$ac_prog", so it can be a program name with args.
19609 set dummy $ac_prog; ac_word=$2
19610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19611 $as_echo_n "checking for $ac_word... " >&6; }
19612 if ${ac_cv_path_FOP+:} false; then :
19613 $as_echo_n "(cached) " >&6
19614 else
19615 case $FOP in
19616 [\\/]* | ?:[\\/]*)
19617 ac_cv_path_FOP="$FOP" # Let the user override the test with a path.
19620 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19621 for as_dir in $PATH
19623 IFS=$as_save_IFS
19624 test -z "$as_dir" && as_dir=.
19625 for ac_exec_ext in '' $ac_executable_extensions; do
19626 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19627 ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext"
19628 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19629 break 2
19631 done
19632 done
19633 IFS=$as_save_IFS
19636 esac
19638 FOP=$ac_cv_path_FOP
19639 if test -n "$FOP"; then
19640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19641 $as_echo "$FOP" >&6; }
19642 else
19643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19644 $as_echo "no" >&6; }
19648 test -n "$FOP" && break
19649 done
19651 else
19652 # Report the value of FOP in configure's output in all cases.
19653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FOP" >&5
19654 $as_echo_n "checking for FOP... " >&6; }
19655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5
19656 $as_echo "$FOP" >&6; }
19659 if test -z "$DBTOEPUB"; then
19660 for ac_prog in dbtoepub
19662 # Extract the first word of "$ac_prog", so it can be a program name with args.
19663 set dummy $ac_prog; ac_word=$2
19664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19665 $as_echo_n "checking for $ac_word... " >&6; }
19666 if ${ac_cv_path_DBTOEPUB+:} false; then :
19667 $as_echo_n "(cached) " >&6
19668 else
19669 case $DBTOEPUB in
19670 [\\/]* | ?:[\\/]*)
19671 ac_cv_path_DBTOEPUB="$DBTOEPUB" # Let the user override the test with a path.
19674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19675 for as_dir in $PATH
19677 IFS=$as_save_IFS
19678 test -z "$as_dir" && as_dir=.
19679 for ac_exec_ext in '' $ac_executable_extensions; do
19680 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19681 ac_cv_path_DBTOEPUB="$as_dir/$ac_word$ac_exec_ext"
19682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19683 break 2
19685 done
19686 done
19687 IFS=$as_save_IFS
19690 esac
19692 DBTOEPUB=$ac_cv_path_DBTOEPUB
19693 if test -n "$DBTOEPUB"; then
19694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19695 $as_echo "$DBTOEPUB" >&6; }
19696 else
19697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19698 $as_echo "no" >&6; }
19702 test -n "$DBTOEPUB" && break
19703 done
19705 else
19706 # Report the value of DBTOEPUB in configure's output in all cases.
19707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBTOEPUB" >&5
19708 $as_echo_n "checking for DBTOEPUB... " >&6; }
19709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DBTOEPUB" >&5
19710 $as_echo "$DBTOEPUB" >&6; }
19715 # Check for test tools
19717 if test "$enable_tap_tests" = yes; then
19718 # Make sure we know where prove is.
19719 if test -z "$PROVE"; then
19720 for ac_prog in prove
19722 # Extract the first word of "$ac_prog", so it can be a program name with args.
19723 set dummy $ac_prog; ac_word=$2
19724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19725 $as_echo_n "checking for $ac_word... " >&6; }
19726 if ${ac_cv_path_PROVE+:} false; then :
19727 $as_echo_n "(cached) " >&6
19728 else
19729 case $PROVE in
19730 [\\/]* | ?:[\\/]*)
19731 ac_cv_path_PROVE="$PROVE" # Let the user override the test with a path.
19734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19735 for as_dir in $PATH
19737 IFS=$as_save_IFS
19738 test -z "$as_dir" && as_dir=.
19739 for ac_exec_ext in '' $ac_executable_extensions; do
19740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19741 ac_cv_path_PROVE="$as_dir/$ac_word$ac_exec_ext"
19742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19743 break 2
19745 done
19746 done
19747 IFS=$as_save_IFS
19750 esac
19752 PROVE=$ac_cv_path_PROVE
19753 if test -n "$PROVE"; then
19754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19755 $as_echo "$PROVE" >&6; }
19756 else
19757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19758 $as_echo "no" >&6; }
19762 test -n "$PROVE" && break
19763 done
19765 else
19766 # Report the value of PROVE in configure's output in all cases.
19767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROVE" >&5
19768 $as_echo_n "checking for PROVE... " >&6; }
19769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROVE" >&5
19770 $as_echo "$PROVE" >&6; }
19773 if test -z "$PROVE"; then
19774 as_fn_error $? "prove not found" "$LINENO" 5
19776 # Check for necessary Perl modules. You might think we should use
19777 # AX_PROG_PERL_MODULES here, but prove might be part of a different Perl
19778 # installation than perl, eg on MSys, so we have to check using prove.
19779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Perl modules required for TAP tests" >&5
19780 $as_echo_n "checking for Perl modules required for TAP tests... " >&6; }
19781 __CONFIG_HOST_OS__=$host_os; export __CONFIG_HOST_OS__
19782 modulestderr=`"$PROVE" "$srcdir/config/check_modules.pl" 2>&1 >/dev/null`
19783 if test $? -eq 0; then
19784 # log the module version details, but don't show them interactively
19785 echo "$modulestderr" >&5
19786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19787 $as_echo "yes" >&6; }
19788 else
19789 # on failure, though, show the results to the user
19790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $modulestderr" >&5
19791 $as_echo "$modulestderr" >&6; }
19792 as_fn_error $? "Additional Perl modules are required to run TAP tests" "$LINENO" 5
19796 # If compiler will take -Wl,--as-needed (or various platform-specific
19797 # spellings thereof) then add that to LDFLAGS. This is much easier than
19798 # trying to filter LIBS to the minimum for each executable.
19799 # On (at least) some Red-Hat-derived systems, this switch breaks linking to
19800 # libreadline; therefore we postpone testing it until we know what library
19801 # dependencies readline has. The test code will try to link with $LIBS.
19802 if test "$with_readline" = yes; then
19803 link_test_func=readline
19804 else
19805 link_test_func=exit
19808 if test "$PORTNAME" = "darwin"; then
19809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-dead_strip_dylibs" >&5
19810 $as_echo_n "checking whether $CC supports -Wl,-dead_strip_dylibs... " >&6; }
19811 if ${pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs+:} false; then :
19812 $as_echo_n "(cached) " >&6
19813 else
19814 pgac_save_LDFLAGS=$LDFLAGS
19815 LDFLAGS="$pgac_save_LDFLAGS -Wl,-dead_strip_dylibs"
19816 if test "$cross_compiling" = yes; then :
19817 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs="assuming no"
19818 else
19819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19820 /* end confdefs.h. */
19821 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19823 main ()
19827 return 0;
19829 _ACEOF
19830 if ac_fn_c_try_run "$LINENO"; then :
19831 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=yes
19832 else
19833 pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs=no
19835 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19836 conftest.$ac_objext conftest.beam conftest.$ac_ext
19839 LDFLAGS="$pgac_save_LDFLAGS"
19841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&5
19842 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" >&6; }
19843 if test x"$pgac_cv_prog_cc_ldflags__Wl__dead_strip_dylibs" = x"yes"; then
19844 LDFLAGS="$LDFLAGS -Wl,-dead_strip_dylibs"
19847 elif test "$PORTNAME" = "openbsd"; then
19848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,-Bdynamic" >&5
19849 $as_echo_n "checking whether $CC supports -Wl,-Bdynamic... " >&6; }
19850 if ${pgac_cv_prog_cc_ldflags__Wl__Bdynamic+:} false; then :
19851 $as_echo_n "(cached) " >&6
19852 else
19853 pgac_save_LDFLAGS=$LDFLAGS
19854 LDFLAGS="$pgac_save_LDFLAGS -Wl,-Bdynamic"
19855 if test "$cross_compiling" = yes; then :
19856 pgac_cv_prog_cc_ldflags__Wl__Bdynamic="assuming no"
19857 else
19858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19859 /* end confdefs.h. */
19860 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19862 main ()
19866 return 0;
19868 _ACEOF
19869 if ac_fn_c_try_run "$LINENO"; then :
19870 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=yes
19871 else
19872 pgac_cv_prog_cc_ldflags__Wl__Bdynamic=no
19874 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19875 conftest.$ac_objext conftest.beam conftest.$ac_ext
19878 LDFLAGS="$pgac_save_LDFLAGS"
19880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&5
19881 $as_echo "$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" >&6; }
19882 if test x"$pgac_cv_prog_cc_ldflags__Wl__Bdynamic" = x"yes"; then
19883 LDFLAGS="$LDFLAGS -Wl,-Bdynamic"
19886 else
19887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wl,--as-needed" >&5
19888 $as_echo_n "checking whether $CC supports -Wl,--as-needed... " >&6; }
19889 if ${pgac_cv_prog_cc_ldflags__Wl___as_needed+:} false; then :
19890 $as_echo_n "(cached) " >&6
19891 else
19892 pgac_save_LDFLAGS=$LDFLAGS
19893 LDFLAGS="$pgac_save_LDFLAGS -Wl,--as-needed"
19894 if test "$cross_compiling" = yes; then :
19895 pgac_cv_prog_cc_ldflags__Wl___as_needed="assuming no"
19896 else
19897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19898 /* end confdefs.h. */
19899 extern void $link_test_func (); void (*fptr) () = $link_test_func;
19901 main ()
19905 return 0;
19907 _ACEOF
19908 if ac_fn_c_try_run "$LINENO"; then :
19909 pgac_cv_prog_cc_ldflags__Wl___as_needed=yes
19910 else
19911 pgac_cv_prog_cc_ldflags__Wl___as_needed=no
19913 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19914 conftest.$ac_objext conftest.beam conftest.$ac_ext
19917 LDFLAGS="$pgac_save_LDFLAGS"
19919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_cc_ldflags__Wl___as_needed" >&5
19920 $as_echo "$pgac_cv_prog_cc_ldflags__Wl___as_needed" >&6; }
19921 if test x"$pgac_cv_prog_cc_ldflags__Wl___as_needed" = x"yes"; then
19922 LDFLAGS="$LDFLAGS -Wl,--as-needed"
19927 # Create compiler version string
19928 if test x"$GCC" = x"yes" ; then
19929 cc_string=`${CC} --version | sed q`
19930 case $cc_string in [A-Za-z]*) ;; *) cc_string="GCC $cc_string";; esac
19931 elif test x"$SUN_STUDIO_CC" = x"yes" ; then
19932 cc_string=`${CC} -V 2>&1 | sed q`
19933 else
19934 cc_string=$CC
19938 cat >>confdefs.h <<_ACEOF
19939 #define PG_VERSION_STR "PostgreSQL $PG_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
19940 _ACEOF
19943 # Supply a numeric version string for use by 3rd party add-ons
19944 # awk -F is a regex on some platforms, and not on others, so make "." a tab
19945 PG_VERSION_NUM="`echo $PG_MAJORVERSION $PG_MINORVERSION |
19946 $AWK '{printf "%d%04d", $1, $2}'`"
19948 cat >>confdefs.h <<_ACEOF
19949 #define PG_VERSION_NUM $PG_VERSION_NUM
19950 _ACEOF
19954 # If we are inserting PG_SYSROOT into CPPFLAGS, do so symbolically not
19955 # literally, so that it's possible to override it at build time using
19956 # a command like "make ... PG_SYSROOT=path". This has to be done after
19957 # we've finished all configure checks that depend on CPPFLAGS.
19958 # The same for LDFLAGS, too.
19959 if test x"$PG_SYSROOT" != x; then
19960 CPPFLAGS=`echo "$CPPFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19961 LDFLAGS=`echo "$LDFLAGS" | sed -e "s| $PG_SYSROOT | \\\$(PG_SYSROOT) |"`
19966 # Begin output steps
19968 { $as_echo "$as_me:${as_lineno-$LINENO}: using compiler=$cc_string" >&5
19969 $as_echo "$as_me: using compiler=$cc_string" >&6;}
19970 { $as_echo "$as_me:${as_lineno-$LINENO}: using CFLAGS=$CFLAGS" >&5
19971 $as_echo "$as_me: using CFLAGS=$CFLAGS" >&6;}
19972 { $as_echo "$as_me:${as_lineno-$LINENO}: using CPPFLAGS=$CPPFLAGS" >&5
19973 $as_echo "$as_me: using CPPFLAGS=$CPPFLAGS" >&6;}
19974 { $as_echo "$as_me:${as_lineno-$LINENO}: using LDFLAGS=$LDFLAGS" >&5
19975 $as_echo "$as_me: using LDFLAGS=$LDFLAGS" >&6;}
19976 # Currently only used when LLVM is used
19977 if test "$with_llvm" = yes ; then
19978 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXX=$CXX" >&5
19979 $as_echo "$as_me: using CXX=$CXX" >&6;}
19980 { $as_echo "$as_me:${as_lineno-$LINENO}: using CXXFLAGS=$CXXFLAGS" >&5
19981 $as_echo "$as_me: using CXXFLAGS=$CXXFLAGS" >&6;}
19982 { $as_echo "$as_me:${as_lineno-$LINENO}: using CLANG=$CLANG" >&5
19983 $as_echo "$as_me: using CLANG=$CLANG" >&6;}
19984 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&5
19985 $as_echo "$as_me: using BITCODE_CFLAGS=$BITCODE_CFLAGS" >&6;}
19986 { $as_echo "$as_me:${as_lineno-$LINENO}: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&5
19987 $as_echo "$as_me: using BITCODE_CXXFLAGS=$BITCODE_CXXFLAGS" >&6;}
19990 # prepare build tree if outside source tree
19991 # Note 1: test -ef might not exist, but it's more reliable than `pwd`.
19992 # Note 2: /bin/pwd might be better than shell's built-in at getting
19993 # a symlink-free name.
19994 if ( test "$srcdir" -ef . ) >/dev/null 2>&1 || test "`cd $srcdir && /bin/pwd`" = "`/bin/pwd`"; then
19995 vpath_build=no
19996 else
19997 vpath_build=yes
19998 if test "$no_create" != yes; then
19999 $as_echo_n "preparing build tree... " >&6
20000 pgac_abs_top_srcdir=`cd "$srcdir" && pwd`
20001 $SHELL "$ac_aux_dir/prep_buildtree" "$pgac_abs_top_srcdir" "." \
20002 || as_fn_error $? "failed" "$LINENO" 5
20003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
20004 $as_echo "done" >&6; }
20010 ac_config_files="$ac_config_files GNUmakefile src/Makefile.global"
20013 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}"
20016 if test "$PORTNAME" = "win32"; then
20017 ac_config_commands="$ac_config_commands check_win32_symlinks"
20021 ac_config_headers="$ac_config_headers src/include/pg_config.h"
20024 ac_config_headers="$ac_config_headers src/include/pg_config_ext.h"
20027 ac_config_headers="$ac_config_headers src/interfaces/ecpg/include/ecpg_config.h"
20030 cat >confcache <<\_ACEOF
20031 # This file is a shell script that caches the results of configure
20032 # tests run on this system so they can be shared between configure
20033 # scripts and configure runs, see configure's option --config-cache.
20034 # It is not useful on other systems. If it contains results you don't
20035 # want to keep, you may remove or edit it.
20037 # config.status only pays attention to the cache file if you give it
20038 # the --recheck option to rerun configure.
20040 # `ac_cv_env_foo' variables (set or unset) will be overridden when
20041 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20042 # following values.
20044 _ACEOF
20046 # The following way of writing the cache mishandles newlines in values,
20047 # but we know of no workaround that is simple, portable, and efficient.
20048 # So, we kill variables containing newlines.
20049 # Ultrix sh set writes to stderr and can't be redirected directly,
20050 # and sets the high bit in the cache file unless we assign to the vars.
20052 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20053 eval ac_val=\$$ac_var
20054 case $ac_val in #(
20055 *${as_nl}*)
20056 case $ac_var in #(
20057 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
20058 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
20059 esac
20060 case $ac_var in #(
20061 _ | IFS | as_nl) ;; #(
20062 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
20063 *) { eval $ac_var=; unset $ac_var;} ;;
20064 esac ;;
20065 esac
20066 done
20068 (set) 2>&1 |
20069 case $as_nl`(ac_space=' '; set) 2>&1` in #(
20070 *${as_nl}ac_space=\ *)
20071 # `set' does not quote correctly, so add quotes: double-quote
20072 # substitution turns \\\\ into \\, and sed turns \\ into \.
20073 sed -n \
20074 "s/'/'\\\\''/g;
20075 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20076 ;; #(
20078 # `set' quotes correctly as required by POSIX, so do not add quotes.
20079 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
20081 esac |
20082 sort
20084 sed '
20085 /^ac_cv_env_/b end
20086 t clear
20087 :clear
20088 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20089 t end
20090 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20091 :end' >>confcache
20092 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20093 if test -w "$cache_file"; then
20094 if test "x$cache_file" != "x/dev/null"; then
20095 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
20096 $as_echo "$as_me: updating cache $cache_file" >&6;}
20097 if test ! -f "$cache_file" || test -h "$cache_file"; then
20098 cat confcache >"$cache_file"
20099 else
20100 case $cache_file in #(
20101 */* | ?:*)
20102 mv -f confcache "$cache_file"$$ &&
20103 mv -f "$cache_file"$$ "$cache_file" ;; #(
20105 mv -f confcache "$cache_file" ;;
20106 esac
20109 else
20110 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
20111 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
20114 rm -f confcache
20116 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20117 # Let make expand exec_prefix.
20118 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20120 DEFS=-DHAVE_CONFIG_H
20122 ac_libobjs=
20123 ac_ltlibobjs=
20125 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20126 # 1. Remove the extension, and $U if already installed.
20127 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20128 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
20129 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
20130 # will be set to the directory where LIBOBJS objects are built.
20131 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20132 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
20133 done
20134 LIBOBJS=$ac_libobjs
20136 LTLIBOBJS=$ac_ltlibobjs
20141 : "${CONFIG_STATUS=./config.status}"
20142 ac_write_fail=0
20143 ac_clean_files_save=$ac_clean_files
20144 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20145 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
20146 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
20147 as_write_fail=0
20148 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
20149 #! $SHELL
20150 # Generated by $as_me.
20151 # Run this file to recreate the current configuration.
20152 # Compiler output produced by configure, useful for debugging
20153 # configure, is in config.log if it exists.
20155 debug=false
20156 ac_cs_recheck=false
20157 ac_cs_silent=false
20159 SHELL=\${CONFIG_SHELL-$SHELL}
20160 export SHELL
20161 _ASEOF
20162 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
20163 ## -------------------- ##
20164 ## M4sh Initialization. ##
20165 ## -------------------- ##
20167 # Be more Bourne compatible
20168 DUALCASE=1; export DUALCASE # for MKS sh
20169 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20170 emulate sh
20171 NULLCMD=:
20172 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
20173 # is contrary to our usage. Disable this feature.
20174 alias -g '${1+"$@"}'='"$@"'
20175 setopt NO_GLOB_SUBST
20176 else
20177 case `(set -o) 2>/dev/null` in #(
20178 *posix*) :
20179 set -o posix ;; #(
20180 *) :
20182 esac
20186 as_nl='
20188 export as_nl
20189 # Printing a long string crashes Solaris 7 /usr/bin/printf.
20190 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
20191 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
20192 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
20193 # Prefer a ksh shell builtin over an external printf program on Solaris,
20194 # but without wasting forks for bash or zsh.
20195 if test -z "$BASH_VERSION$ZSH_VERSION" \
20196 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
20197 as_echo='print -r --'
20198 as_echo_n='print -rn --'
20199 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
20200 as_echo='printf %s\n'
20201 as_echo_n='printf %s'
20202 else
20203 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
20204 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
20205 as_echo_n='/usr/ucb/echo -n'
20206 else
20207 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
20208 as_echo_n_body='eval
20209 arg=$1;
20210 case $arg in #(
20211 *"$as_nl"*)
20212 expr "X$arg" : "X\\(.*\\)$as_nl";
20213 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
20214 esac;
20215 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
20217 export as_echo_n_body
20218 as_echo_n='sh -c $as_echo_n_body as_echo'
20220 export as_echo_body
20221 as_echo='sh -c $as_echo_body as_echo'
20224 # The user is always right.
20225 if test "${PATH_SEPARATOR+set}" != set; then
20226 PATH_SEPARATOR=:
20227 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
20228 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
20229 PATH_SEPARATOR=';'
20234 # IFS
20235 # We need space, tab and new line, in precisely that order. Quoting is
20236 # there to prevent editors from complaining about space-tab.
20237 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
20238 # splitting by setting IFS to empty value.)
20239 IFS=" "" $as_nl"
20241 # Find who we are. Look in the path if we contain no directory separator.
20242 as_myself=
20243 case $0 in #((
20244 *[\\/]* ) as_myself=$0 ;;
20245 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20246 for as_dir in $PATH
20248 IFS=$as_save_IFS
20249 test -z "$as_dir" && as_dir=.
20250 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20251 done
20252 IFS=$as_save_IFS
20255 esac
20256 # We did not find ourselves, most probably we were run as `sh COMMAND'
20257 # in which case we are not to be found in the path.
20258 if test "x$as_myself" = x; then
20259 as_myself=$0
20261 if test ! -f "$as_myself"; then
20262 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20263 exit 1
20266 # Unset variables that we do not need and which cause bugs (e.g. in
20267 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
20268 # suppresses any "Segmentation fault" message there. '((' could
20269 # trigger a bug in pdksh 5.2.14.
20270 for as_var in BASH_ENV ENV MAIL MAILPATH
20271 do eval test x\${$as_var+set} = xset \
20272 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
20273 done
20274 PS1='$ '
20275 PS2='> '
20276 PS4='+ '
20278 # NLS nuisances.
20279 LC_ALL=C
20280 export LC_ALL
20281 LANGUAGE=C
20282 export LANGUAGE
20284 # CDPATH.
20285 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20288 # as_fn_error STATUS ERROR [LINENO LOG_FD]
20289 # ----------------------------------------
20290 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20291 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
20292 # script with STATUS, using 1 if that was 0.
20293 as_fn_error ()
20295 as_status=$1; test $as_status -eq 0 && as_status=1
20296 if test "$4"; then
20297 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
20298 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
20300 $as_echo "$as_me: error: $2" >&2
20301 as_fn_exit $as_status
20302 } # as_fn_error
20305 # as_fn_set_status STATUS
20306 # -----------------------
20307 # Set $? to STATUS, without forking.
20308 as_fn_set_status ()
20310 return $1
20311 } # as_fn_set_status
20313 # as_fn_exit STATUS
20314 # -----------------
20315 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
20316 as_fn_exit ()
20318 set +e
20319 as_fn_set_status $1
20320 exit $1
20321 } # as_fn_exit
20323 # as_fn_unset VAR
20324 # ---------------
20325 # Portably unset VAR.
20326 as_fn_unset ()
20328 { eval $1=; unset $1;}
20330 as_unset=as_fn_unset
20331 # as_fn_append VAR VALUE
20332 # ----------------------
20333 # Append the text in VALUE to the end of the definition contained in VAR. Take
20334 # advantage of any shell optimizations that allow amortized linear growth over
20335 # repeated appends, instead of the typical quadratic growth present in naive
20336 # implementations.
20337 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
20338 eval 'as_fn_append ()
20340 eval $1+=\$2
20342 else
20343 as_fn_append ()
20345 eval $1=\$$1\$2
20347 fi # as_fn_append
20349 # as_fn_arith ARG...
20350 # ------------------
20351 # Perform arithmetic evaluation on the ARGs, and store the result in the
20352 # global $as_val. Take advantage of shells that can avoid forks. The arguments
20353 # must be portable across $(()) and expr.
20354 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
20355 eval 'as_fn_arith ()
20357 as_val=$(( $* ))
20359 else
20360 as_fn_arith ()
20362 as_val=`expr "$@" || test $? -eq 1`
20364 fi # as_fn_arith
20367 if expr a : '\(a\)' >/dev/null 2>&1 &&
20368 test "X`expr 00001 : '.*\(...\)'`" = X001; then
20369 as_expr=expr
20370 else
20371 as_expr=false
20374 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20375 as_basename=basename
20376 else
20377 as_basename=false
20380 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20381 as_dirname=dirname
20382 else
20383 as_dirname=false
20386 as_me=`$as_basename -- "$0" ||
20387 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20388 X"$0" : 'X\(//\)$' \| \
20389 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20390 $as_echo X/"$0" |
20391 sed '/^.*\/\([^/][^/]*\)\/*$/{
20392 s//\1/
20395 /^X\/\(\/\/\)$/{
20396 s//\1/
20399 /^X\/\(\/\).*/{
20400 s//\1/
20403 s/.*/./; q'`
20405 # Avoid depending upon Character Ranges.
20406 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20407 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20408 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20409 as_cr_digits='0123456789'
20410 as_cr_alnum=$as_cr_Letters$as_cr_digits
20412 ECHO_C= ECHO_N= ECHO_T=
20413 case `echo -n x` in #(((((
20414 -n*)
20415 case `echo 'xy\c'` in
20416 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
20417 xy) ECHO_C='\c';;
20418 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
20419 ECHO_T=' ';;
20420 esac;;
20422 ECHO_N='-n';;
20423 esac
20425 rm -f conf$$ conf$$.exe conf$$.file
20426 if test -d conf$$.dir; then
20427 rm -f conf$$.dir/conf$$.file
20428 else
20429 rm -f conf$$.dir
20430 mkdir conf$$.dir 2>/dev/null
20432 if (echo >conf$$.file) 2>/dev/null; then
20433 if ln -s conf$$.file conf$$ 2>/dev/null; then
20434 as_ln_s='ln -s'
20435 # ... but there are two gotchas:
20436 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20437 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20438 # In both cases, we have to default to `cp -pR'.
20439 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20440 as_ln_s='cp -pR'
20441 elif ln conf$$.file conf$$ 2>/dev/null; then
20442 as_ln_s=ln
20443 else
20444 as_ln_s='cp -pR'
20446 else
20447 as_ln_s='cp -pR'
20449 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20450 rmdir conf$$.dir 2>/dev/null
20453 # as_fn_mkdir_p
20454 # -------------
20455 # Create "$as_dir" as a directory, including parents if necessary.
20456 as_fn_mkdir_p ()
20459 case $as_dir in #(
20460 -*) as_dir=./$as_dir;;
20461 esac
20462 test -d "$as_dir" || eval $as_mkdir_p || {
20463 as_dirs=
20464 while :; do
20465 case $as_dir in #(
20466 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20467 *) as_qdir=$as_dir;;
20468 esac
20469 as_dirs="'$as_qdir' $as_dirs"
20470 as_dir=`$as_dirname -- "$as_dir" ||
20471 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20472 X"$as_dir" : 'X\(//\)[^/]' \| \
20473 X"$as_dir" : 'X\(//\)$' \| \
20474 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20475 $as_echo X"$as_dir" |
20476 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20477 s//\1/
20480 /^X\(\/\/\)[^/].*/{
20481 s//\1/
20484 /^X\(\/\/\)$/{
20485 s//\1/
20488 /^X\(\/\).*/{
20489 s//\1/
20492 s/.*/./; q'`
20493 test -d "$as_dir" && break
20494 done
20495 test -z "$as_dirs" || eval "mkdir $as_dirs"
20496 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
20499 } # as_fn_mkdir_p
20500 if mkdir -p . 2>/dev/null; then
20501 as_mkdir_p='mkdir -p "$as_dir"'
20502 else
20503 test -d ./-p && rmdir ./-p
20504 as_mkdir_p=false
20508 # as_fn_executable_p FILE
20509 # -----------------------
20510 # Test if FILE is an executable regular file.
20511 as_fn_executable_p ()
20513 test -f "$1" && test -x "$1"
20514 } # as_fn_executable_p
20515 as_test_x='test -x'
20516 as_executable_p=as_fn_executable_p
20518 # Sed expression to map a string onto a valid CPP name.
20519 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20521 # Sed expression to map a string onto a valid variable name.
20522 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20525 exec 6>&1
20526 ## ----------------------------------- ##
20527 ## Main body of $CONFIG_STATUS script. ##
20528 ## ----------------------------------- ##
20529 _ASEOF
20530 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20532 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20533 # Save the log message, to keep $0 and so on meaningful, and to
20534 # report actual input values of CONFIG_FILES etc. instead of their
20535 # values after options handling.
20536 ac_log="
20537 This file was extended by PostgreSQL $as_me 15devel, which was
20538 generated by GNU Autoconf 2.69. Invocation command line was
20540 CONFIG_FILES = $CONFIG_FILES
20541 CONFIG_HEADERS = $CONFIG_HEADERS
20542 CONFIG_LINKS = $CONFIG_LINKS
20543 CONFIG_COMMANDS = $CONFIG_COMMANDS
20544 $ $0 $@
20546 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20549 _ACEOF
20551 case $ac_config_files in *"
20552 "*) set x $ac_config_files; shift; ac_config_files=$*;;
20553 esac
20555 case $ac_config_headers in *"
20556 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20557 esac
20560 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20561 # Files that config.status was made for.
20562 config_files="$ac_config_files"
20563 config_headers="$ac_config_headers"
20564 config_links="$ac_config_links"
20565 config_commands="$ac_config_commands"
20567 _ACEOF
20569 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20570 ac_cs_usage="\
20571 \`$as_me' instantiates files and other configuration actions
20572 from templates according to the current configuration. Unless the files
20573 and actions are specified as TAGs, all are instantiated by default.
20575 Usage: $0 [OPTION]... [TAG]...
20577 -h, --help print this help, then exit
20578 -V, --version print version number and configuration settings, then exit
20579 --config print configuration, then exit
20580 -q, --quiet, --silent
20581 do not print progress messages
20582 -d, --debug don't remove temporary files
20583 --recheck update $as_me by reconfiguring in the same conditions
20584 --file=FILE[:TEMPLATE]
20585 instantiate the configuration file FILE
20586 --header=FILE[:TEMPLATE]
20587 instantiate the configuration header FILE
20589 Configuration files:
20590 $config_files
20592 Configuration headers:
20593 $config_headers
20595 Configuration links:
20596 $config_links
20598 Configuration commands:
20599 $config_commands
20601 Report bugs to <pgsql-bugs@lists.postgresql.org>.
20602 PostgreSQL home page: <https://www.postgresql.org/>."
20604 _ACEOF
20605 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20606 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20607 ac_cs_version="\\
20608 PostgreSQL config.status 15devel
20609 configured by $0, generated by GNU Autoconf 2.69,
20610 with options \\"\$ac_cs_config\\"
20612 Copyright (C) 2012 Free Software Foundation, Inc.
20613 This config.status script is free software; the Free Software Foundation
20614 gives unlimited permission to copy, distribute and modify it."
20616 ac_pwd='$ac_pwd'
20617 srcdir='$srcdir'
20618 INSTALL='$INSTALL'
20619 MKDIR_P='$MKDIR_P'
20620 AWK='$AWK'
20621 test -n "\$AWK" || AWK=awk
20622 _ACEOF
20624 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20625 # The default lists apply if the user does not specify any file.
20626 ac_need_defaults=:
20627 while test $# != 0
20629 case $1 in
20630 --*=?*)
20631 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20632 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20633 ac_shift=:
20635 --*=)
20636 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20637 ac_optarg=
20638 ac_shift=:
20641 ac_option=$1
20642 ac_optarg=$2
20643 ac_shift=shift
20645 esac
20647 case $ac_option in
20648 # Handling of the options.
20649 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20650 ac_cs_recheck=: ;;
20651 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20652 $as_echo "$ac_cs_version"; exit ;;
20653 --config | --confi | --conf | --con | --co | --c )
20654 $as_echo "$ac_cs_config"; exit ;;
20655 --debug | --debu | --deb | --de | --d | -d )
20656 debug=: ;;
20657 --file | --fil | --fi | --f )
20658 $ac_shift
20659 case $ac_optarg in
20660 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20661 '') as_fn_error $? "missing file argument" ;;
20662 esac
20663 as_fn_append CONFIG_FILES " '$ac_optarg'"
20664 ac_need_defaults=false;;
20665 --header | --heade | --head | --hea )
20666 $ac_shift
20667 case $ac_optarg in
20668 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20669 esac
20670 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20671 ac_need_defaults=false;;
20672 --he | --h)
20673 # Conflict between --help and --header
20674 as_fn_error $? "ambiguous option: \`$1'
20675 Try \`$0 --help' for more information.";;
20676 --help | --hel | -h )
20677 $as_echo "$ac_cs_usage"; exit ;;
20678 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20679 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20680 ac_cs_silent=: ;;
20682 # This is an error.
20683 -*) as_fn_error $? "unrecognized option: \`$1'
20684 Try \`$0 --help' for more information." ;;
20686 *) as_fn_append ac_config_targets " $1"
20687 ac_need_defaults=false ;;
20689 esac
20690 shift
20691 done
20693 ac_configure_extra_args=
20695 if $ac_cs_silent; then
20696 exec 6>/dev/null
20697 ac_configure_extra_args="$ac_configure_extra_args --silent"
20700 _ACEOF
20701 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20702 if \$ac_cs_recheck; then
20703 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20704 shift
20705 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20706 CONFIG_SHELL='$SHELL'
20707 export CONFIG_SHELL
20708 exec "\$@"
20711 _ACEOF
20712 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20713 exec 5>>config.log
20715 echo
20716 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20717 ## Running $as_me. ##
20718 _ASBOX
20719 $as_echo "$ac_log"
20720 } >&5
20722 _ACEOF
20723 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20724 _ACEOF
20726 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20728 # Handling of arguments.
20729 for ac_config_target in $ac_config_targets
20731 case $ac_config_target in
20732 "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;;
20733 "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;;
20734 "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;;
20735 "src/backend/port/pg_sema.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION}" ;;
20736 "src/backend/port/pg_shmem.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION}" ;;
20737 "src/include/pg_config_os.h") CONFIG_LINKS="$CONFIG_LINKS src/include/pg_config_os.h:src/include/port/${template}.h" ;;
20738 "src/Makefile.port") CONFIG_LINKS="$CONFIG_LINKS src/Makefile.port:src/makefiles/Makefile.${template}" ;;
20739 "check_win32_symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS check_win32_symlinks" ;;
20740 "src/include/pg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config.h" ;;
20741 "src/include/pg_config_ext.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/pg_config_ext.h" ;;
20742 "src/interfaces/ecpg/include/ecpg_config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/interfaces/ecpg/include/ecpg_config.h" ;;
20744 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20745 esac
20746 done
20749 # If the user did not use the arguments to specify the items to instantiate,
20750 # then the envvar interface is used. Set only those that are not.
20751 # We use the long form for the default assignment because of an extremely
20752 # bizarre bug on SunOS 4.1.3.
20753 if $ac_need_defaults; then
20754 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20755 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20756 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20757 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20760 # Have a temporary directory for convenience. Make it in the build tree
20761 # simply because there is no reason against having it here, and in addition,
20762 # creating and moving files from /tmp can sometimes cause problems.
20763 # Hook for its removal unless debugging.
20764 # Note that there is a small window in which the directory will not be cleaned:
20765 # after its creation but before its name has been assigned to `$tmp'.
20766 $debug ||
20768 tmp= ac_tmp=
20769 trap 'exit_status=$?
20770 : "${ac_tmp:=$tmp}"
20771 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20773 trap 'as_fn_exit 1' 1 2 13 15
20775 # Create a (secure) tmp directory for tmp files.
20778 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20779 test -d "$tmp"
20780 } ||
20782 tmp=./conf$$-$RANDOM
20783 (umask 077 && mkdir "$tmp")
20784 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20785 ac_tmp=$tmp
20787 # Set up the scripts for CONFIG_FILES section.
20788 # No need to generate them if there are no CONFIG_FILES.
20789 # This happens for instance with `./config.status config.h'.
20790 if test -n "$CONFIG_FILES"; then
20793 ac_cr=`echo X | tr X '\015'`
20794 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20795 # But we know of no other shell where ac_cr would be empty at this
20796 # point, so we can use a bashism as a fallback.
20797 if test "x$ac_cr" = x; then
20798 eval ac_cr=\$\'\\r\'
20800 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20801 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20802 ac_cs_awk_cr='\\r'
20803 else
20804 ac_cs_awk_cr=$ac_cr
20807 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20808 _ACEOF
20812 echo "cat >conf$$subs.awk <<_ACEOF" &&
20813 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20814 echo "_ACEOF"
20815 } >conf$$subs.sh ||
20816 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20817 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20818 ac_delim='%!_!# '
20819 for ac_last_try in false false false false false :; do
20820 . ./conf$$subs.sh ||
20821 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20823 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20824 if test $ac_delim_n = $ac_delim_num; then
20825 break
20826 elif $ac_last_try; then
20827 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20828 else
20829 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20831 done
20832 rm -f conf$$subs.sh
20834 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20835 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20836 _ACEOF
20837 sed -n '
20839 s/^/S["/; s/!.*/"]=/
20842 s/^[^!]*!//
20843 :repl
20844 t repl
20845 s/'"$ac_delim"'$//
20846 t delim
20849 s/\(.\{148\}\)..*/\1/
20850 t more1
20851 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20854 b repl
20855 :more1
20856 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20859 s/.\{148\}//
20860 t nl
20861 :delim
20863 s/\(.\{148\}\)..*/\1/
20864 t more2
20865 s/["\\]/\\&/g; s/^/"/; s/$/"/
20868 :more2
20869 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20872 s/.\{148\}//
20873 t delim
20874 ' <conf$$subs.awk | sed '
20875 /^[^""]/{
20877 s/\n//
20879 ' >>$CONFIG_STATUS || ac_write_fail=1
20880 rm -f conf$$subs.awk
20881 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20882 _ACAWK
20883 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20884 for (key in S) S_is_set[key] = 1
20885 FS = "\a"
20889 line = $ 0
20890 nfields = split(line, field, "@")
20891 substed = 0
20892 len = length(field[1])
20893 for (i = 2; i < nfields; i++) {
20894 key = field[i]
20895 keylen = length(key)
20896 if (S_is_set[key]) {
20897 value = S[key]
20898 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20899 len += length(value) + length(field[++i])
20900 substed = 1
20901 } else
20902 len += 1 + keylen
20905 print line
20908 _ACAWK
20909 _ACEOF
20910 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20911 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20912 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20913 else
20915 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20916 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20917 _ACEOF
20919 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20920 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20921 # trailing colons and then remove the whole line if VPATH becomes empty
20922 # (actually we leave an empty line to preserve line numbers).
20923 if test "x$srcdir" = x.; then
20924 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20926 s///
20927 s/^/:/
20928 s/[ ]*$/:/
20929 s/:\$(srcdir):/:/g
20930 s/:\${srcdir}:/:/g
20931 s/:@srcdir@:/:/g
20932 s/^:*//
20933 s/:*$//
20935 s/\(=[ ]*\).*/\1/
20937 s/\n//
20938 s/^[^=]*=[ ]*$//
20942 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20943 fi # test -n "$CONFIG_FILES"
20945 # Set up the scripts for CONFIG_HEADERS section.
20946 # No need to generate them if there are no CONFIG_HEADERS.
20947 # This happens for instance with `./config.status Makefile'.
20948 if test -n "$CONFIG_HEADERS"; then
20949 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20950 BEGIN {
20951 _ACEOF
20953 # Transform confdefs.h into an awk script `defines.awk', embedded as
20954 # here-document in config.status, that substitutes the proper values into
20955 # config.h.in to produce config.h.
20957 # Create a delimiter string that does not exist in confdefs.h, to ease
20958 # handling of long lines.
20959 ac_delim='%!_!# '
20960 for ac_last_try in false false :; do
20961 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20962 if test -z "$ac_tt"; then
20963 break
20964 elif $ac_last_try; then
20965 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20966 else
20967 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20969 done
20971 # For the awk script, D is an array of macro values keyed by name,
20972 # likewise P contains macro parameters if any. Preserve backslash
20973 # newline sequences.
20975 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20976 sed -n '
20977 s/.\{148\}/&'"$ac_delim"'/g
20978 t rset
20979 :rset
20980 s/^[ ]*#[ ]*define[ ][ ]*/ /
20981 t def
20983 :def
20984 s/\\$//
20985 t bsnl
20986 s/["\\]/\\&/g
20987 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20988 D["\1"]=" \3"/p
20989 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20991 :bsnl
20992 s/["\\]/\\&/g
20993 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20994 D["\1"]=" \3\\\\\\n"\\/p
20995 t cont
20996 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20997 t cont
20999 :cont
21001 s/.\{148\}/&'"$ac_delim"'/g
21002 t clear
21003 :clear
21004 s/\\$//
21005 t bsnlc
21006 s/["\\]/\\&/g; s/^/"/; s/$/"/p
21008 :bsnlc
21009 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
21010 b cont
21011 ' <confdefs.h | sed '
21012 s/'"$ac_delim"'/"\\\
21013 "/g' >>$CONFIG_STATUS || ac_write_fail=1
21015 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21016 for (key in D) D_is_set[key] = 1
21017 FS = "\a"
21019 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
21020 line = \$ 0
21021 split(line, arg, " ")
21022 if (arg[1] == "#") {
21023 defundef = arg[2]
21024 mac1 = arg[3]
21025 } else {
21026 defundef = substr(arg[1], 2)
21027 mac1 = arg[2]
21029 split(mac1, mac2, "(") #)
21030 macro = mac2[1]
21031 prefix = substr(line, 1, index(line, defundef) - 1)
21032 if (D_is_set[macro]) {
21033 # Preserve the white space surrounding the "#".
21034 print prefix "define", macro P[macro] D[macro]
21035 next
21036 } else {
21037 # Replace #undef with comments. This is necessary, for example,
21038 # in the case of _POSIX_SOURCE, which is predefined and required
21039 # on some systems where configure will not decide to define it.
21040 if (defundef == "undef") {
21041 print "/*", prefix defundef, macro, "*/"
21042 next
21046 { print }
21047 _ACAWK
21048 _ACEOF
21049 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21050 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
21051 fi # test -n "$CONFIG_HEADERS"
21054 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
21055 shift
21056 for ac_tag
21058 case $ac_tag in
21059 :[FHLC]) ac_mode=$ac_tag; continue;;
21060 esac
21061 case $ac_mode$ac_tag in
21062 :[FHL]*:*);;
21063 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
21064 :[FH]-) ac_tag=-:-;;
21065 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21066 esac
21067 ac_save_IFS=$IFS
21068 IFS=:
21069 set x $ac_tag
21070 IFS=$ac_save_IFS
21071 shift
21072 ac_file=$1
21073 shift
21075 case $ac_mode in
21076 :L) ac_source=$1;;
21077 :[FH])
21078 ac_file_inputs=
21079 for ac_f
21081 case $ac_f in
21082 -) ac_f="$ac_tmp/stdin";;
21083 *) # Look for the file first in the build tree, then in the source tree
21084 # (if the path is not absolute). The absolute path cannot be DOS-style,
21085 # because $ac_f cannot contain `:'.
21086 test -f "$ac_f" ||
21087 case $ac_f in
21088 [\\/$]*) false;;
21089 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21090 esac ||
21091 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
21092 esac
21093 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
21094 as_fn_append ac_file_inputs " '$ac_f'"
21095 done
21097 # Let's still pretend it is `configure' which instantiates (i.e., don't
21098 # use $as_me), people would be surprised to read:
21099 # /* config.h. Generated by config.status. */
21100 configure_input='Generated from '`
21101 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
21102 `' by configure.'
21103 if test x"$ac_file" != x-; then
21104 configure_input="$ac_file. $configure_input"
21105 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
21106 $as_echo "$as_me: creating $ac_file" >&6;}
21108 # Neutralize special characters interpreted by sed in replacement strings.
21109 case $configure_input in #(
21110 *\&* | *\|* | *\\* )
21111 ac_sed_conf_input=`$as_echo "$configure_input" |
21112 sed 's/[\\\\&|]/\\\\&/g'`;; #(
21113 *) ac_sed_conf_input=$configure_input;;
21114 esac
21116 case $ac_tag in
21117 *:-:* | *:-) cat >"$ac_tmp/stdin" \
21118 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
21119 esac
21121 esac
21123 ac_dir=`$as_dirname -- "$ac_file" ||
21124 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21125 X"$ac_file" : 'X\(//\)[^/]' \| \
21126 X"$ac_file" : 'X\(//\)$' \| \
21127 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21128 $as_echo X"$ac_file" |
21129 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21130 s//\1/
21133 /^X\(\/\/\)[^/].*/{
21134 s//\1/
21137 /^X\(\/\/\)$/{
21138 s//\1/
21141 /^X\(\/\).*/{
21142 s//\1/
21145 s/.*/./; q'`
21146 as_dir="$ac_dir"; as_fn_mkdir_p
21147 ac_builddir=.
21149 case "$ac_dir" in
21150 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21152 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21153 # A ".." for each directory in $ac_dir_suffix.
21154 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21155 case $ac_top_builddir_sub in
21156 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21157 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21158 esac ;;
21159 esac
21160 ac_abs_top_builddir=$ac_pwd
21161 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21162 # for backward compatibility:
21163 ac_top_builddir=$ac_top_build_prefix
21165 case $srcdir in
21166 .) # We are building in place.
21167 ac_srcdir=.
21168 ac_top_srcdir=$ac_top_builddir_sub
21169 ac_abs_top_srcdir=$ac_pwd ;;
21170 [\\/]* | ?:[\\/]* ) # Absolute name.
21171 ac_srcdir=$srcdir$ac_dir_suffix;
21172 ac_top_srcdir=$srcdir
21173 ac_abs_top_srcdir=$srcdir ;;
21174 *) # Relative name.
21175 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21176 ac_top_srcdir=$ac_top_build_prefix$srcdir
21177 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21178 esac
21179 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21182 case $ac_mode in
21185 # CONFIG_FILE
21188 case $INSTALL in
21189 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21190 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
21191 esac
21192 ac_MKDIR_P=$MKDIR_P
21193 case $MKDIR_P in
21194 [\\/$]* | ?:[\\/]* ) ;;
21195 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
21196 esac
21197 _ACEOF
21199 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21200 # If the template does not know about datarootdir, expand it.
21201 # FIXME: This hack should be removed a few years after 2.60.
21202 ac_datarootdir_hack=; ac_datarootdir_seen=
21203 ac_sed_dataroot='
21204 /datarootdir/ {
21208 /@datadir@/p
21209 /@docdir@/p
21210 /@infodir@/p
21211 /@localedir@/p
21212 /@mandir@/p'
21213 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
21214 *datarootdir*) ac_datarootdir_seen=yes;;
21215 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21216 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21217 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21218 _ACEOF
21219 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21220 ac_datarootdir_hack='
21221 s&@datadir@&$datadir&g
21222 s&@docdir@&$docdir&g
21223 s&@infodir@&$infodir&g
21224 s&@localedir@&$localedir&g
21225 s&@mandir@&$mandir&g
21226 s&\\\${datarootdir}&$datarootdir&g' ;;
21227 esac
21228 _ACEOF
21230 # Neutralize VPATH when `$srcdir' = `.'.
21231 # Shell code in configure.ac might set extrasub.
21232 # FIXME: do we really want to maintain this feature?
21233 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21234 ac_sed_extra="$ac_vpsub
21235 $extrasub
21236 _ACEOF
21237 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21239 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21240 s|@configure_input@|$ac_sed_conf_input|;t t
21241 s&@top_builddir@&$ac_top_builddir_sub&;t t
21242 s&@top_build_prefix@&$ac_top_build_prefix&;t t
21243 s&@srcdir@&$ac_srcdir&;t t
21244 s&@abs_srcdir@&$ac_abs_srcdir&;t t
21245 s&@top_srcdir@&$ac_top_srcdir&;t t
21246 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21247 s&@builddir@&$ac_builddir&;t t
21248 s&@abs_builddir@&$ac_abs_builddir&;t t
21249 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21250 s&@INSTALL@&$ac_INSTALL&;t t
21251 s&@MKDIR_P@&$ac_MKDIR_P&;t t
21252 $ac_datarootdir_hack
21254 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
21255 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21257 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21258 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
21259 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
21260 "$ac_tmp/out"`; test -z "$ac_out"; } &&
21261 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21262 which seems to be undefined. Please make sure it is defined" >&5
21263 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21264 which seems to be undefined. Please make sure it is defined" >&2;}
21266 rm -f "$ac_tmp/stdin"
21267 case $ac_file in
21268 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
21269 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
21270 esac \
21271 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21275 # CONFIG_HEADER
21277 if test x"$ac_file" != x-; then
21279 $as_echo "/* $configure_input */" \
21280 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
21281 } >"$ac_tmp/config.h" \
21282 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21283 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
21284 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
21285 $as_echo "$as_me: $ac_file is unchanged" >&6;}
21286 else
21287 rm -f "$ac_file"
21288 mv "$ac_tmp/config.h" "$ac_file" \
21289 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21291 else
21292 $as_echo "/* $configure_input */" \
21293 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
21294 || as_fn_error $? "could not create -" "$LINENO" 5
21299 # CONFIG_LINK
21302 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
21304 else
21305 # Prefer the file from the source tree if names are identical.
21306 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
21307 ac_source=$srcdir/$ac_source
21310 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
21311 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
21313 if test ! -r "$ac_source"; then
21314 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
21316 rm -f "$ac_file"
21318 # Try a relative symlink, then a hard link, then a copy.
21319 case $ac_source in
21320 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
21321 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
21322 esac
21323 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
21324 ln "$ac_source" "$ac_file" 2>/dev/null ||
21325 cp -p "$ac_source" "$ac_file" ||
21326 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
21329 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
21330 $as_echo "$as_me: executing $ac_file commands" >&6;}
21332 esac
21335 case $ac_file$ac_mode in
21336 "check_win32_symlinks":C)
21337 # Links sometimes fail undetected on Mingw -
21338 # so here we detect it and warn the user
21339 for FILE in $CONFIG_LINKS
21341 # test -e works for symlinks in the MinGW console
21342 test -e `expr "$FILE" : '\([^:]*\)'` || { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** link for $FILE -- please fix by hand" >&5
21343 $as_echo "$as_me: WARNING: *** link for $FILE -- please fix by hand" >&2;}
21344 done
21346 "src/include/pg_config.h":H)
21347 # Update timestamp for pg_config.h (see Makefile.global)
21348 echo >src/include/stamp-h
21350 "src/include/pg_config_ext.h":H)
21351 # Update timestamp for pg_config_ext.h (see Makefile.global)
21352 echo >src/include/stamp-ext-h
21354 "src/interfaces/ecpg/include/ecpg_config.h":H) echo >src/interfaces/ecpg/include/stamp-h ;;
21356 esac
21357 done # for ac_tag
21360 as_fn_exit 0
21361 _ACEOF
21362 ac_clean_files=$ac_clean_files_save
21364 test $ac_write_fail = 0 ||
21365 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
21368 # configure is writing to config.log, and then calls config.status.
21369 # config.status does its own redirection, appending to config.log.
21370 # Unfortunately, on DOS this fails, as config.log is still kept open
21371 # by configure, so config.status won't be able to write to it; its
21372 # output is simply discarded. So we exec the FD to /dev/null,
21373 # effectively closing config.log, so it can be properly (re)opened and
21374 # appended to by config.status. When coming back to configure, we
21375 # need to make the FD available again.
21376 if test "$no_create" != yes; then
21377 ac_cs_success=:
21378 ac_config_status_args=
21379 test "$silent" = yes &&
21380 ac_config_status_args="$ac_config_status_args --quiet"
21381 exec 5>/dev/null
21382 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21383 exec 5>>config.log
21384 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21385 # would make configure fail if this is the last instruction.
21386 $ac_cs_success || as_fn_exit 1
21388 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
21389 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21390 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}